/* =========================================================
   Catch Me Up! — Coming soon landing page
   Direction: "morning edition" — editorial, flat colors, thin rules.
   Structure: tokens → base → sections (top to bottom)
   Naming: BEM-ish (block__element--modifier)
   ========================================================= */

/* ---------- Design tokens (brand colors sampled from the logo) ---------- */
:root {
  --c-bg: #F1E7F2;          /* lavender (logo background) */
  --c-paper: #FBF7FB;       /* lighter card surface */
  --c-primary: #5E3563;     /* logo purple */
  --c-primary-dark: #45254A;
  --c-ink: #2B1A2E;         /* body text */
  --c-muted: #6D5A70;
  --c-rule: #5E3563;        /* hairlines */
  --c-accent: #FED220;      /* logo yellow */
  --c-error: #B3261E;
  --c-success: #1E6B42;

  --font-display: "Roboto Slab", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Sunrise gradient: used sparingly to signal "new" */
  --g-sunrise: linear-gradient(120deg, #FED220 0%, #FFB45E 55%, #F28DB2 100%);

  --radius: 6px;
  --container: 1120px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  position: relative;
}
html, main { overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: var(--c-primary); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); color: var(--c-primary); margin: 0; line-height: 1.05; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 28px; }

/* Small uppercase label used across sections */
.kicker {
  margin: 0 0 20px;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--c-muted);
}
.kicker--light { color: #D9C6DC; }

/* "New" pill: one of the few places using the sunrise gradient */
.new-pill {
  display: inline-block; margin-right: 10px; padding: 3px 9px;
  font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--c-ink);
  background: var(--g-sunrise);
  border-radius: 999px;
  vertical-align: 1px;
}

/* ---------- Background: paper grain + soft washes + halftone dots ---------- */
.paper { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.paper__wash { position: absolute; border-radius: 50%; filter: blur(80px); }
.paper__wash--sun  { width: 620px; height: 620px; top: -160px; right: -160px; background: radial-gradient(circle, rgba(254, 210, 32, .45), rgba(255, 159, 107, .25) 50%, transparent 70%); }
.paper__wash--plum { width: 700px; height: 700px; bottom: -300px; left: -260px; background: radial-gradient(circle, rgba(185, 138, 192, .45), transparent 70%); }
/* newspaper-print halftone */
.paper__dots {
  position: absolute; width: 420px; height: 420px;
  background-image: radial-gradient(rgba(94, 53, 99, .28) 1.3px, transparent 1.6px);
  background-size: 12px 12px;
}
.paper__dots--tr { top: 90px; right: -60px; -webkit-mask-image: radial-gradient(circle at 70% 30%, #000, transparent 65%); mask-image: radial-gradient(circle at 70% 30%, #000, transparent 65%); }
.paper__dots--bl { bottom: -40px; left: -40px; -webkit-mask-image: radial-gradient(circle at 30% 70%, #000, transparent 65%); mask-image: radial-gradient(circle at 30% 70%, #000, transparent 65%); }
.paper__grain {
  position: absolute; inset: 0; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.37 0 0 0 0 0.21 0 0 0 0 0.39 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Masthead ---------- */
.masthead { border-bottom: 3px double var(--c-rule); }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.brand__logo { width: 60px; height: auto; }
.masthead__meta {
  margin: 0;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--c-muted);
}
.status {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  font-size: 14px; font-weight: 600; color: var(--c-primary);
}
.status__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--c-accent);
  outline: 1.5px solid var(--c-primary); outline-offset: 2px;
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .35; } }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 104px; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 72px; align-items: center; }

.hero__title {
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
}
/* Hand-drawn underline under "brewing." */
.scribble { position: relative; display: inline-block; white-space: nowrap; }
.scribble__line {
  position: absolute; left: -2%; bottom: -.12em;
  width: 104%; height: .26em;
  color: var(--c-accent);
  z-index: -1;
  stroke-dasharray: 340; stroke-dashoffset: 340;
  animation: draw 1s .4s ease-out forwards;
}
.hero__copy { position: relative; z-index: 0; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero__lead { margin: 30px 0 36px; max-width: 31em; font-size: 18px; color: var(--c-muted); }

/* ---------- Waitlist form ---------- */
.waitlist {
  max-width: 520px;
  padding: 24px;
  background: var(--c-paper);
  border: 1px solid var(--c-rule);
  border-radius: var(--radius);
}
.waitlist__fields { display: grid; grid-template-columns: 1fr 1.35fr; gap: 20px; margin-bottom: 22px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); }
.field__input {
  width: 100%;
  padding: 8px 0 10px;
  font: 500 17px/1.3 var(--font-body);
  color: var(--c-ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid rgba(94, 53, 99, .35);
  border-radius: 0;
  transition: border-color .15s;
}
.field__input::placeholder { color: #B3A3B6; }
.field__input:focus { outline: none; border-bottom-color: var(--c-primary); }
.field__input[aria-invalid="true"] { border-bottom-color: var(--c-error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 16px 24px;
  font: 700 15px/1 var(--font-body);
  letter-spacing: .02em;
  color: #fff;
  text-decoration: none;
  background: var(--c-primary);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--c-primary-dark); }
.btn:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 3px; }
.btn[disabled] { opacity: .75; cursor: progress; }
.btn__spinner {
  display: none; width: 15px; height: 15px;
  border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
.btn.is-loading .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.waitlist__note { margin: 12px 0 0; font-size: 13px; color: var(--c-muted); text-align: center; }
.waitlist__status { margin: 6px 0 0; font-size: 15px; font-weight: 600; text-align: center; }
.waitlist__status:empty { display: none; }
.waitlist__status.is-error { color: var(--c-error); }
.waitlist__status.is-success { color: var(--c-success); }
.waitlist.is-done .waitlist__fields,
.waitlist.is-done .btn,
.waitlist.is-done .waitlist__note { display: none; }
.waitlist.is-done .waitlist__status { margin: 4px 0; font-family: var(--font-display); font-size: 20px; color: var(--c-primary); }

/* ---------- Hero visual: sunrise + envelope ---------- */
.hero__visual { position: relative; padding-top: 20px; }
.sunrise {
  position: absolute; left: 50%; top: 0;
  width: 78%; aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(180deg, #FED220 0%, #FFC24A 45%, #FF9F6B 80%, #F28DB2 100%);
  transform: translate(-50%, 18%);
  animation: rise 1.6s cubic-bezier(.2, .7, .2, 1) both, breathe 6s ease-in-out 1.6s infinite;
}
@keyframes breathe { 50% { filter: brightness(1.06) saturate(1.1); } }
.envelope-wrap {
  position: relative; z-index: 1;
  margin-top: 44%;
  animation: hover 4.5s ease-in-out infinite;
}
.envelope {
  display: block;
  width: 100%; height: auto;
  transform: rotate(-5deg);
  filter: drop-shadow(0 18px 24px rgba(43, 26, 46, .22));
}
@keyframes hover {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-12px) rotate(1.5deg); }
}

/* light sweep across the flap every few seconds */
.envelope__shine { animation: shine 5s ease-in-out 1.5s infinite; }
@keyframes shine { 0% { transform: skewX(-20deg) translateX(0); } 40%, 100% { transform: skewX(-20deg) translateX(620px); } }

/* postmark gets "stamped" once on load */
.envelope__postmark, .envelope__postmark-text {
  transform-box: view-box; transform-origin: 352px 226px;
  animation: postmark .45s 1.2s cubic-bezier(.3, 1.6, .5, 1) both;
}
@keyframes postmark { from { transform: scale(1.8); opacity: 0; } }

/* notification ping, echoing the yellow dot in the logo */
.ping {
  position: absolute; z-index: 2; top: 2%; right: 3%;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--c-accent);
  border: 3px solid var(--c-bg);
}
.ping::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--c-accent);
  animation: ripple 2s ease-out infinite;
}
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

/* "in transit" motion lines behind the envelope */
.speed {
  position: absolute; z-index: -1; left: -6%;
  height: 3px; border-radius: 3px;
  background: var(--c-primary); opacity: .25;
  animation: whoosh 2.4s ease-in-out infinite;
}
.speed--1 { top: 34%; width: 70px; }
.speed--2 { top: 48%; width: 110px; left: -12%; animation-delay: .3s; }
.speed--3 { top: 62%; width: 54px; animation-delay: .6s; }
@keyframes whoosh { 0%, 100% { transform: translateX(0); opacity: .25; } 50% { transform: translateX(-14px); opacity: .08; } }
.envelope__seal { transform-box: fill-box; transform-origin: center; animation: nudge 5s ease-in-out 2s infinite; }
@keyframes nudge { 0%, 90%, 100% { transform: rotate(0); } 93% { transform: rotate(-9deg); } 96% { transform: rotate(6deg); } }

.hero__caption {
  position: relative; z-index: 1;
  margin: 18px 0 0; text-align: right;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em;
  color: var(--c-muted);
}

/* ---------- What's not changing: newspaper columns ---------- */
.columns { padding: 88px 0 104px; border-top: 1px solid var(--c-rule); }
.section-head { display: flex; align-items: baseline; gap: 24px; margin-bottom: 48px; }
.section-title { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.02em; white-space: nowrap; }
.section-head__rule { flex: 1; height: 1px; background: var(--c-rule); }

.columns__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.col { padding: 0 28px; border-left: 1px solid rgba(94, 53, 99, .3); }
.col:first-child { padding-left: 0; border-left: 0; }
.col:last-child { padding-right: 0; }
.col__no {
  display: block; margin-bottom: 18px;
  font-family: var(--font-display); font-weight: 400;
  font-size: 56px; line-height: 1;
  color: var(--c-primary);
}
.col__title { font-size: 21px; line-height: 1.2; margin-bottom: 10px; }
.col__text { margin: 0; color: var(--c-muted); font-size: 15.5px; }
.col--secret .col__no {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px; font-size: 30px; font-weight: 700;
  background: var(--g-sunrise); border-radius: 50%;
  margin-bottom: 18px;
}

/* Column 04: blurred copy + rubber stamp */
.secret { position: relative; }
.secret__blur { filter: blur(5px); opacity: .7; user-select: none; }
.stamp {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  padding: 8px 14px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; white-space: nowrap;
  color: var(--c-primary);
  border: 2px solid var(--c-primary);
  border-radius: 4px;
  outline: 1px solid var(--c-primary); outline-offset: 3px;
  background: rgba(251, 247, 251, .55);
  opacity: .9;
  animation: stamp .5s 1s cubic-bezier(.3, 1.6, .5, 1) both;
}
@keyframes stamp { from { transform: translate(-50%, -50%) rotate(-8deg) scale(1.6); opacity: 0; } }
.col__text--after { margin-top: 14px; }

/* ---------- Bottom CTA ---------- */
.cta {
  position: relative; overflow: hidden;
  padding: 104px 0 230px;
  background: linear-gradient(180deg, #4A2850 0%, var(--c-primary) 60%, #7A4078 100%);
  text-align: center;
}
.cta__inner { position: relative; z-index: 1; }
.cta__title { color: #fff; font-size: clamp(36px, 5.6vw, 64px); letter-spacing: -.03em; }
.cta__text { margin: 18px auto 36px; max-width: 30em; font-size: 18px; color: #E2D3E4; }
.btn--accent { width: auto; padding: 16px 34px; color: var(--c-ink); background: var(--c-accent); }
.btn--accent:hover { background: #FFDD4D; }
.btn--accent:focus-visible { outline-color: var(--c-accent); }
.cta__sun {
  position: absolute; left: 50%; bottom: 0;
  width: 320px; height: 160px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #FED220 0%, #FFB45E 60%, #F28DB2 100%);
  border-radius: 160px 160px 0 0;
  box-shadow: 0 0 120px 40px rgba(255, 180, 94, .35);
}

/* ---------- Footer ---------- */
.site-footer { padding: 28px 0; font-size: 14px; color: var(--c-muted); }
.site-footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .paper__dots { width: 260px; height: 260px; }
  .hero { padding: 56px 0 80px; }
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__visual { max-width: 440px; width: 100%; margin: 0 auto; order: -1; }
  .columns__grid { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .col:nth-child(3) { padding-left: 0; border-left: 0; }
  .col:nth-child(2) { padding-right: 0; }
}
@media (max-width: 600px) {
  .speed { display: none; }
  .container { padding: 0 20px; }
  .masthead__meta { display: none; }
  .brand__logo { width: 48px; }
  .waitlist { padding: 20px; }
  .hero { padding-top: 24px; }
  .hero__grid { gap: 28px; }
  .hero__visual { max-width: 300px; padding-top: 0; }
  .hero__caption { display: none; }
  .ping { width: 18px; height: 18px; }
  .waitlist__fields { grid-template-columns: 1fr; gap: 16px; }
  .section-head__rule { display: none; }
  .columns__grid { grid-template-columns: 1fr; row-gap: 0; }
  .col, .col:nth-child(3) { padding: 28px 0; border-left: 0; border-top: 1px solid rgba(94, 53, 99, .3); }
  .col:first-child { border-top: 0; padding-top: 0; }
  .col__no { font-size: 44px; }
  .cta { padding: 80px 0 180px; }
  .cta__sun { width: 240px; height: 120px; }
}


/* =========================================================
   Intro sequence
   Only active when <html class="intro"> (set in <head> when JS runs
   and the visitor hasn't asked for reduced motion). main.js adds
   .is-in to each [data-step] element in order.
   ========================================================= */

/* Curtain with the logo */
.curtain { display: none; }
.intro .curtain {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--c-bg);
  transition: transform .9s cubic-bezier(.7, 0, .2, 1);
}
.curtain__logo { width: 120px; height: auto; animation: logo-pop .7s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes logo-pop { from { transform: scale(.4) rotate(-8deg); opacity: 0; } }
.intro.curtain-up .curtain { transform: translateY(-100%); }
.intro.curtain-gone .curtain { display: none; }

/* Generic step: hidden, then fades/slides up */
.intro [data-step]:not(.is-in) { opacity: 0; }
.intro [data-step].is-in { animation: step-up .8s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes step-up { from { opacity: 0; transform: translateY(18px); } }

.intro .masthead.is-in { animation-name: step-down; }
@keyframes step-down { from { opacity: 0; transform: translateY(-14px); } }

/* Sun rises only once its step starts */
.intro .sunrise:not(.is-in) { animation: none; }
.intro .sunrise.is-in { animation: rise 1.4s cubic-bezier(.2, .7, .2, 1) both, breathe 6s ease-in-out 1.4s infinite; }
.intro .sunrise.is-in { opacity: 1; }
@keyframes rise { from { transform: translate(-50%, 70%); opacity: 0; } }

/* Envelope flies in and lands */
.envelope-enter { position: relative; }
.intro .envelope-enter.is-in { animation: fly-in 1.1s cubic-bezier(.2, .8, .25, 1) both; }
@keyframes fly-in {
  0%   { opacity: 0; transform: translate(-90%, -70%) rotate(-28deg) scale(.55); }
  60%  { opacity: 1; transform: translate(3%, 4%) rotate(5deg) scale(1.03); }
  80%  { transform: translate(-1%, -1%) rotate(-1.5deg) scale(.99); }
  100% { transform: none; }
}
/* Things that appear only after the envelope lands */
.intro .hero__visual:not(.is-landed) .ping,
.intro .hero__visual:not(.is-landed) .speed,
.intro .hero__visual:not(.is-landed) .envelope__postmark,
.intro .hero__visual:not(.is-landed) .envelope__postmark-text { animation: none; opacity: 0; }
.intro .hero__visual.is-landed .envelope__postmark,
.intro .hero__visual.is-landed .envelope__postmark-text { animation-delay: .1s; }
.intro .hero__visual.is-landed .ping { animation: ping-in .4s cubic-bezier(.3, 1.6, .5, 1) .5s both; }
@keyframes ping-in { from { transform: scale(0); } }

/* Typewriter headline */
.tw-char { opacity: 0; }
.tw-char.on { opacity: 1; }
.tw-caret {
  display: inline-block;
  width: .06em; height: .85em;
  margin-left: .04em;
  vertical-align: -.05em;
  background: var(--c-primary);
  animation: caret .8s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.tw-caret.is-done { animation: caret .8s steps(1) 3, caret-out .3s 2.4s forwards; }
@keyframes caret-out { to { opacity: 0; width: 0; margin: 0; } }

/* Scribble waits for the typewriter */
.intro .scribble__line { animation: none; }
.intro .scribble.is-drawn .scribble__line { animation: draw .8s ease-out forwards; }

/* Sections below the fold reveal on scroll */
.intro [data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--delay, 0s);
}
.intro [data-reveal].is-in { opacity: 1; transform: none; }
/* The "Under wraps" stamp lands when its column appears */
.intro .col--secret:not(.is-in) .stamp { animation: none; opacity: 0; }
.intro .col--secret.is-in .stamp { animation-delay: .7s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .scribble__line { stroke-dashoffset: 0; }
}
