/* Cacher · waitlist landing page
   Tokens from the Cacher app: paper #f6f5f0, ink #20211f, sun #ffde59,
   soft yellow #fff1b4, muted #696a63, border #e4e4dd.
   Plus Jakarta Sans for statements, Instrument Serif italic for the turn of phrase.
   One screen, one form, one yellow form drifting behind it. */

:root {
  --paper: #f6f5f0;
  --paper-2: #fbfaf6;
  --ink: #20211f;
  --muted: #696a63;
  --sun: #ffde59;
  --sun-soft: #fff1b4;
  --line: #e4e4dd;

  --sc-canvas: var(--paper);
  --sc-surface: #ffffff;
  --sc-ink: var(--ink);
  --sc-ink-soft: var(--muted);
  --sc-accent: var(--sun);
  --sc-accent-ink: var(--ink);
  --sc-font-display: "Plus Jakarta Sans", "Jakarta", system-ui, sans-serif;
  --sc-font-text: "Plus Jakarta Sans", "Jakarta", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sc-r-sm: 8px; --sc-r-md: 16px; --sc-r-lg: 24px;
  --sc-shadow-color: 50 10% 10%;
  --sc-maxw: 72rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);

  /* type scale, deliberate: every size on the page is one of these */
  --t-eyebrow: 0.75rem;                       /* 12px, +0.16em, caps */
  --t-h1: clamp(2.75rem, 6.4vw, 5.5rem);      /* 44 to 88px, 1.0, -0.035em */
  --t-lead: 1.25rem;                           /* 20px, 600, 1.3 */
  --t-body: 1rem;                              /* 16px, 1.55 */
  --t-pill: 0.9375rem;                         /* 15px, 500 */
  --t-btn: 0.9375rem;                          /* 15px, 600 */
  --t-fine: 0.8125rem;                         /* 13px */
  /* spacing on an 8px rhythm */
  --s-1: 0.5rem; --s-2: 1rem; --s-3: 1.5rem; --s-4: 2rem; --s-5: 2.5rem; --s-6: 3rem; --s-8: 4rem;
}
body { font-size: var(--t-body); line-height: 1.55; -webkit-font-smoothing: antialiased; }

html { background: var(--paper); }
body { color: var(--ink); font-weight: 400; background: var(--paper); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
[hidden] { display: none !important; }
.em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.015em; }

/* ---------------------------------------------------------------- bar -- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(1rem, 2.4vw, 1.6rem) var(--gutter);
  padding-top: calc(clamp(1rem, 2.4vw, 1.6rem) + env(safe-area-inset-top, 0px));
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar::before { content: ""; position: absolute; inset: 0; background: rgba(246, 245, 240, 0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity 240ms; pointer-events: none; }
.bar.is-scrolled::before { opacity: 1; }
.bar > * { position: relative; }
.mark { display: inline-flex; align-items: baseline; gap: 0.3rem; text-decoration: none; color: var(--ink); }
.mark__word { font-family: var(--sc-font-display); font-weight: 600; font-size: 1.5rem; letter-spacing: -0.04em; line-height: 1; }
.mark__dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--sun); transform: translateY(-0.1rem); }

.menu-btn {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; position: relative; cursor: pointer;
  padding: 0; transition: transform 200ms var(--sc-ease-out), border-color 200ms;
}
.menu-btn span { position: absolute; left: 50%; top: 50%; width: 1.1rem; height: 1.5px; margin: -0.75px 0 0 -0.55rem; background: var(--ink); border-radius: 2px; transition: transform 240ms var(--sc-ease-out); }
.menu-btn span:first-child { transform: translateY(-0.2rem); }
.menu-btn span:last-child { transform: translateY(0.2rem); }
.menu-btn:hover { transform: translateY(-1px); border-color: #d6d6cd; }
.menu-btn[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

.menu { position: fixed; inset: 0; z-index: 30; }
.menu__scrim { position: absolute; inset: 0; background: rgba(32, 33, 31, 0.18); border: 0; cursor: default; animation: fade 240ms var(--sc-ease-out) both; }
.menu__panel {
  position: absolute; top: calc(4.6rem + env(safe-area-inset-top, 0px)); right: var(--gutter); z-index: 1;
  min-width: 15rem; background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 0.5rem; box-shadow: 0 24px 48px -24px rgba(32, 33, 31, 0.28);
  animation: rise 280ms var(--sc-ease-out) both;
}
.menu__item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  height: 3rem; padding: 0 1rem; border-radius: 14px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: var(--t-pill);
  transition: background 160ms;
}
.menu__item:hover { background: var(--sun-soft); }
.menu__item--quiet { color: var(--muted); font-weight: 400; font-size: var(--t-fine); }
.menu__arrow { color: var(--muted); }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes rise { from { opacity: 0; transform: translateY(-6px) } to { opacity: 1; transform: none } }

/* --------------------------------------------------------------- page -- */
.page { position: relative; min-height: 100svh; overflow: clip; display: flex; flex-direction: column; }
.page::after { display: none !important; } /* the engine's own spotlight light; we only want its --sc-mx/--sc-my */

/* the one yellow form: the brand's rounded shape, drifting with the pointer */
.sun {
  position: absolute; z-index: 0; pointer-events: none;
  width: clamp(18rem, 34vw, 30rem); aspect-ratio: 1 / 1.08; border-radius: 46% 54% 52% 48% / 52% 44% 56% 48%;
  background: var(--sun); opacity: 0.95;
  right: calc(-1 * clamp(6rem, 12vw, 12rem)); top: clamp(-9rem, -12vw, -5rem);
  transform: translate3d(calc((var(--sc-mx, 0.5) - 0.5) * -22px), calc((var(--sc-my, 0.5) - 0.5) * -16px), 0);
  transition: transform 900ms var(--sc-ease-out);
  animation: breathe 14s ease-in-out infinite alternate;
}
.sun--2 {
  width: clamp(9rem, 16vw, 14rem); aspect-ratio: 1; border-radius: 50%; background: var(--sun-soft); opacity: 1;
  right: auto; left: calc(-1 * clamp(2rem, 5vw, 5rem)); top: auto; bottom: clamp(2rem, 8vh, 6rem);
  transform: translate3d(calc((var(--sc-mx, 0.5) - 0.5) * 14px), calc((var(--sc-my, 0.5) - 0.5) * 10px), 0);
  animation-duration: 18s; animation-direction: alternate-reverse;
}
@keyframes breathe { from { border-radius: 46% 54% 52% 48% / 52% 44% 56% 48%; } to { border-radius: 52% 48% 46% 54% / 46% 56% 44% 54%; } }

.hero {
  position: relative; z-index: 1; flex: 1;
  width: min(100% - 2 * var(--gutter), var(--sc-maxw)); margin: 0 auto;
  padding-top: calc(7.5rem + env(safe-area-inset-top, 0px)); padding-bottom: 3rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.eyebrow {
  margin: 0 0 var(--s-2); font-size: var(--t-eyebrow); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.h1 {
  margin: 0; max-width: 20ch;
  font-family: var(--sc-font-display); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02;
  font-size: var(--t-h1); text-wrap: balance;
}
.h1 .em { display: block; font-size: 1.04em; letter-spacing: -0.02em; }

.pills {
  list-style: none; margin: var(--s-5) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; width: min(100%, 40rem);
}
.pill {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  height: 3.25rem; padding: 0 1.25rem; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  font-weight: 500; font-size: var(--t-pill); color: var(--ink); line-height: 1.2;
  transition: transform 220ms var(--sc-ease-out), border-color 220ms;
}
.pill:hover { transform: translateY(-2px); border-color: #d9d9cf; }
.tick { position: relative; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--sun); flex: none; }
.tick::after { content: ""; position: absolute; left: 0.3rem; top: 0.22rem; width: 0.45rem; height: 0.26rem; border: 2px solid var(--ink); border-top: 0; border-right: 0; transform: rotate(-45deg); }

.register { margin-top: var(--s-6); width: min(100%, 36rem); }
.lead { margin: 0; font-weight: 600; font-size: var(--t-lead); line-height: 1.3; letter-spacing: -0.02em; }
.sub { margin: var(--s-1) 0 var(--s-3); color: var(--muted); font-size: var(--t-body); }
.form {
  display: flex; gap: var(--s-1); padding: 0.375rem; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 18px 40px -28px rgba(32, 33, 31, 0.35);
  transition: box-shadow 240ms, border-color 240ms;
}
.form:focus-within { border-color: #cfcfc5; box-shadow: 0 22px 48px -26px rgba(32, 33, 31, 0.4); }
.input {
  flex: 1; min-width: 0; border: 0; background: transparent; height: 3rem; padding: 0 1.25rem; font: inherit; font-size: var(--t-body); color: var(--ink); outline: none;
}
.input::placeholder { color: #9a9b92; }
.btn {
  border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); font: inherit; font-weight: 600; font-size: var(--t-btn);
  height: 3rem; padding: 0 1.5rem; cursor: pointer; white-space: nowrap;
  transition: background 200ms, transform 200ms var(--sc-ease-out);
}
.btn:hover { background: #000; }
.btn:disabled { background: #8d8e86; cursor: default; }
.note { min-height: 1.4em; margin: 0.75rem 0 0; font-size: var(--t-fine); color: var(--muted); }
.note.is-error { color: #a3392f; }
.done { margin-top: var(--s-1); padding: var(--s-3); border-radius: 20px; background: var(--sun-soft); text-align: left; animation: rise 320ms var(--sc-ease-out) both; }
.done__title { margin: 0; font-weight: 700; font-size: var(--t-lead); letter-spacing: -0.02em; }
.done__sub { margin: var(--s-1) 0 0; color: var(--ink); font-size: var(--t-body); }
.done__sub a { color: var(--ink); font-weight: 600; text-underline-offset: 0.25em; }

.foot {
  position: relative; z-index: 1;
  width: min(100% - 2 * var(--gutter), var(--sc-maxw)); margin: 0 auto;
  padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom, 0px));
  display: flex; justify-content: space-between; font-size: var(--t-fine); color: var(--muted);
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ------------------------------------------------------------- mobile -- */
@media (max-width: 720px) {
  .hero { padding-top: calc(6.5rem + env(safe-area-inset-top, 0px)); text-align: left; align-items: flex-start; justify-content: flex-start; }
  .h1 { font-size: clamp(2.25rem, 11vw, 3rem); max-width: none; }
  .pills { grid-template-columns: 1fr; gap: var(--s-1); margin-top: var(--s-4); }
  .pill { justify-content: flex-start; height: 3rem; padding: 0 1rem; }
  .register { margin-top: var(--s-5); }
  .form { flex-direction: column; border-radius: 22px; padding: 0.375rem; }
  .input { padding: 0 1rem; }
  .btn { width: 100%; }
  .sun { width: 78vw; right: -34vw; top: -14vw; opacity: 0.85; }
  .sun--2 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sun, .sun--2 { animation: none; transition: none; }
  .pill, .btn, .menu-btn { transition: none; }
}
