*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Patrick Hand', cursive, sans-serif;
  font-size: 1.15rem;
  line-height: 1.5;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; padding: 0; }

:root {
  --paper: #f5efdf;
  --paper-deep: #ede4cd;
  --ink: #241f18;
  --zig-green: #2fb673;
  --zig-blue: #7fd4f0;
  --marker-yellow: #ffcf3f;
  --marker-coral: #ff7a5c;
  --line: rgba(36,31,24,0.18);
}

.paper {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    repeating-linear-gradient(rgba(36,31,24,0.035) 0 1px, transparent 1px 34px);
}

.section-title {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  line-height: 1.15;
  color: var(--ink);
}
.tag-scribble {
  display: inline-block;
  font-family: 'Patrick Hand', cursive;
  font-size: 1rem;
  color: var(--ink);
  border-bottom: 3px solid var(--marker-yellow);
  padding-bottom: 0.15rem;
  margin-bottom: 1rem;
  filter: url(#rough);
}
.tag-scribble--pale { color: #fff; border-bottom-color: var(--marker-coral); }

/* ---------- Reveal (tilt-safe) ---------- */
.reveal { opacity: 0; transform: translateY(26px) rotate(var(--tilt, 0deg)); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0) rotate(var(--tilt, 0deg)); }
@media (prefers-reduced-motion: reduce) { .reveal { transition: none; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.6rem;
  background: rgba(245,239,223,0.9);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--ink);
}
.nav__logo {
  font-family: 'Permanent Marker', cursive;
  font-size: 1.3rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.nav__pill {
  font-family: 'Patrick Hand', cursive;
  font-size: 0.85rem;
  border: 2px solid var(--ink);
  padding: 0.15rem 0.6rem;
  border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
  background: var(--zig-blue);
}
.nav__links { display: flex; gap: 1.6rem; }
.nav__links a { font-size: 1.05rem; }
.nav__links a:hover { color: var(--marker-coral); }
.nav__burger { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__burger span { width: 22px; height: 3px; background: var(--ink); display: block; border-radius: 2px; }

/* ---------- Buttons: deliberately all different ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-family: 'Patrick Hand', cursive; }

.btn--pill {
  font-size: 0.9rem;
  padding: 0.45rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 40% 60% 60% 40% / 60% 55% 45% 40%;
}

.btn--marker {
  position: relative;
  font-size: 1.5rem;
  padding: 0.5rem 1.6rem 0.35rem;
  color: var(--ink);
  transform: rotate(-1.5deg);
}
.btn--marker span { position: relative; z-index: 2; }
.btn--marker::before {
  content: "";
  position: absolute;
  left: -6px; right: -6px; top: 6px; bottom: -2px;
  background: var(--marker-yellow);
  border-radius: 45% 55% 50% 50% / 60% 40% 60% 40%;
  filter: url(#rough);
  z-index: 1;
}
.btn--marker:hover { transform: rotate(-1.5deg) translateY(-2px); }

.btn--outline-round {
  font-size: 1.15rem;
  padding: 0.7rem 1.6rem;
  border: 3px solid var(--ink);
  border-radius: 50% 50% 48% 52% / 55% 45% 55% 45%;
  filter: url(#rough);
  transform: rotate(1deg);
}
.btn--outline-round:hover { background: var(--ink); color: var(--paper); }

.btn--circle {
  font-size: 1.05rem;
  padding: 0.35rem 1.3rem;
  border: 3px solid var(--ink);
  border-radius: 50%;
  filter: url(#rough);
  margin-top: 1.4rem;
}
.btn--circle:hover { background: var(--marker-yellow); }

.btn--sticker {
  font-family: 'Permanent Marker', cursive;
  font-size: 1.3rem;
  padding: 1.1rem 2.4rem;
  background: var(--marker-coral);
  color: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 60% 40% 55% 45% / 45% 55% 45% 55%;
  box-shadow: 6px 6px 0 var(--ink);
  transform: rotate(-2deg);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn--sticker:hover { transform: rotate(-2deg) translate(-3px,-3px); box-shadow: 9px 9px 0 var(--ink); }

.inline-link a { text-decoration: underline wavy var(--marker-coral); text-underline-offset: 4px; }
.inline-link a:hover { color: var(--marker-coral); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 8rem 1.8rem 3rem;
  z-index: 1;
  scroll-margin-top: 84px;
}
.hero__text { max-width: 620px; }
.hero__title {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  line-height: 1.15;
  margin-bottom: 1.1rem;
}
.hero__sub { font-size: 1.2rem; max-width: 50ch; margin-bottom: 1.8rem; }
.hero__cta { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
.hero__char {
  position: absolute;
  right: 3vw; bottom: 0;
  max-width: min(38vw, 460px);
  max-height: 70svh;
  width: auto; height: auto;
}
.hero__doodles { position: absolute; inset: 0; color: var(--ink); opacity: 0.55; pointer-events: none; }
.doodle--arrow1 { position: absolute; width: 90px; top: 18%; left: 6%; }
.doodle--star1 { position: absolute; width: 46px; top: 12%; right: 42%; }

/* ---------- Note ticker ---------- */
.notebar { background: var(--paper-deep); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); overflow: hidden; white-space: nowrap; padding: 0.6rem 0; position: relative; z-index: 1; }
.notebar__track { display: inline-flex; gap: 2.5rem; animation: scrollLeft 24s linear infinite; font-size: 1rem; }
.notebar__track span { padding: 0.15rem 0.7rem; border: 2px solid var(--ink); border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%; }
@media (prefers-reduced-motion: reduce) { .notebar__track { animation: none; } }

/* ---------- Confused ---------- */
.confused {
  position: relative; z-index: 1;
  padding: 6rem 1.8rem;
  display: flex; align-items: center; justify-content: center; gap: 3rem;
  flex-wrap: wrap;
  scroll-margin-top: 84px;
}
.confused__page {
  --tilt: -0.6deg;
  max-width: 480px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 2px 14px 4px 16px / 12px 4px 16px 4px;
  padding: 2.2rem 2rem;
  box-shadow: 8px 8px 0 var(--line);
}
.confused__body { font-size: 1.15rem; }
.confused__char { max-width: min(30vw, 280px); max-height: 46svh; width: auto; height: auto; }

/* ---------- Frozen ---------- */
.frozen {
  position: relative; z-index: 1;
  padding: 6rem 1.8rem;
  background: var(--zig-blue);
  display: flex; align-items: center; justify-content: center; gap: 3rem;
  flex-wrap: wrap;
  scroll-margin-top: 84px;
}
.frozen__char { max-width: min(32vw, 320px); max-height: 48svh; width: auto; height: auto; }
.frozen__text { max-width: 480px; }
.frozen__body { font-size: 1.15rem; margin-bottom: 0.4rem; }

/* ---------- Everywhere ---------- */
.everywhere {
  position: relative; z-index: 1;
  padding: 6rem 1.8rem;
  display: flex; align-items: center; justify-content: center; gap: 3.5rem;
  flex-wrap: wrap;
  scroll-margin-top: 84px;
}
.everywhere__frame { --tilt: 1.2deg; }
.everywhere__img {
  width: min(80vw, 380px);
  border: 4px solid var(--ink);
  border-radius: 3px;
  box-shadow: 8px 8px 0 var(--marker-yellow);
}
.everywhere__cap { font-size: 1rem; text-align: center; margin-top: 0.7rem; }
.everywhere__text { max-width: 440px; }
.everywhere__body { font-size: 1.15rem; }

/* ---------- Journey / outro ---------- */
.journey {
  position: relative; z-index: 1;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: 6rem 1.8rem;
  text-align: center;
  overflow: hidden;
  scroll-margin-top: 84px;
}
.journey__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.journey__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,12,24,0.55) 0%, rgba(10,12,24,0.8) 100%); }
.journey__panel { position: relative; z-index: 2; max-width: 560px; }
.journey__title { font-family: 'Permanent Marker', cursive; font-size: clamp(2rem, 4.6vw, 3rem); color: #fff; line-height: 1.15; margin-bottom: 1rem; }
.journey__sub { color: #ece7d8; font-size: 1.15rem; margin-bottom: 1.8rem; }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 1; padding: 2rem 1.8rem; border-top: 3px solid var(--ink); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; font-size: 0.95rem; }

@keyframes scrollLeft { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .confused, .everywhere, .frozen { flex-direction: column; text-align: center; }
  .confused__page { order: 2; }
  .everywhere__text { order: 2; }
}

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__links.is-open { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--paper); padding: 1.2rem 1.8rem; gap: 1rem; border-bottom: 3px solid var(--ink); }

  .hero { flex-direction: column; align-items: center; text-align: center; padding-top: 8rem; }
  .hero__text { margin: 0 auto; }
  .hero__cta { justify-content: center; }
  .hero__char { position: static; margin: 1.6rem auto 0; max-width: min(58vw, 260px); max-height: 38svh; }
  .doodle--arrow1, .doodle--star1 { display: none; }

  .confused__char, .frozen__char { max-width: 220px; }
}
