/* after* placeholder site
   Tokens mirror docs/DESIGN.md §2 of the app repository. Paper and capsules:
   a warm grey ground, one red used like a stamp, heavy sans headlines with
   the second line in grey, hairline rows instead of boxes, one Glyph. */

@font-face { font-family: Nimbus; src: url(fonts/nimbus-400.otf) format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Nimbus; src: url(fonts/nimbus-700.otf) format("opentype"); font-weight: 600 700; font-display: swap; }

:root {
  /* grounds */
  --paper: #DEDCD4;
  --surface: #EEECE5;
  --soft: #F4F2EB;
  /* text */
  --ink: #101110;
  --ink-soft: #5F5F58;
  --grey: #74756E;
  /* lines */
  --line: #C6C5BD;
  --dash: #7A7A72;
  /* the stamp */
  --accent: #F13D29;
  --accent-deep: #DC2F1A;
  --accent-text: #B8281A;
  --glyph-grey: #ACAFA4;
  --focus: #3C54AF;

  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Nimbus, Arial, sans-serif;

  /* motion (DESIGN §8) */
  --fast: 160ms;
  --base: 260ms;
  --slow: 420ms;
  --spring: cubic-bezier(.22, 1.1, .36, 1);
  --spring-over: cubic-bezier(.34, 1.56, .64, 1);
  --stagger: 40ms;

  --pad: 22px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; overflow-x: clip; }
body {
  overflow-x: clip;
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, ol { margin: 0; }
ol { padding: 0; list-style: none; }
svg { display: block; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }

.skip {
  position: absolute; left: var(--pad); top: -60px;
  background: var(--ink); color: var(--soft);
  padding: 10px 16px; border-radius: 100px; font-size: 13px; font-weight: 600;
  transition: top var(--fast);
}
.skip:focus { top: 14px; }

/* ----- layout ------------------------------------------------------------ */

.top, main, .foot {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.top {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 22px;
  animation: fade-in var(--slow) ease-out both;
}

.wordmark {
  font-size: 32px; font-weight: 700; letter-spacing: -.08em; line-height: 1;
}
.wordmark span { color: var(--accent); font-weight: 600; }

main { flex: 1; }

/* ----- type -------------------------------------------------------------- */

.heading {
  font-weight: 700;
  letter-spacing: -.052em;
  line-height: .96;
  font-size: 32px;
}
.heading.large { font-size: clamp(44px, 6.2vw, 92px); letter-spacing: -.055em; }
.heading.compact { font-size: clamp(30px, 4vw, 44px); }
.heading .line { display: block; }
.heading .sub { color: var(--grey); }

.copy {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.45;
  letter-spacing: -.02em;
  color: var(--ink-soft);
  max-width: 34ch;
}
.hint { font-size: 13px; line-height: 18px; color: var(--ink-soft); }
.small { font-size: 12px; line-height: 17px; color: var(--ink-soft); }
.small .star { color: var(--accent); }

/* ----- pieces ------------------------------------------------------------ */

.pill {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
  border-radius: 100px; font-size: 13px; font-weight: 600; letter-spacing: -.01em;
  color: var(--ink-soft);
}
.pill.dashed { border: 1px dashed var(--dash); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px; padding: 14px 24px; border-radius: 100px;
  font-size: 16px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2;
  transition: transform var(--fast) ease-out, background var(--fast), opacity var(--fast);
  will-change: transform;
}
.btn svg { width: 20px; height: 20px; transition: transform var(--base) var(--spring); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ink); color: var(--soft); }
.btn.primary:hover { background: #1c1e1c; }
.btn.secondary { border: 1px dashed var(--dash); color: var(--ink); }
.btn.secondary:hover { background: var(--surface); border-color: transparent; }

/* ----- hero -------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: clamp(28px, 6vh, 72px) 0 clamp(40px, 8vh, 96px);
  align-items: center;
}
.hero-text { display: flex; flex-direction: column; align-items: flex-start; }
.hero-text .heading { margin-bottom: clamp(22px, 3vw, 34px); }
.hero-text .copy { margin-bottom: clamp(28px, 4vw, 44px); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }

/* entrance: lines rise 8 px, 40 ms stagger */
.hero .line, .hero .copy, .hero .actions, .hero .hint {
  animation: rise var(--slow) var(--spring) both;
}
.hero .line:nth-child(1) { animation-delay: calc(var(--stagger) * 2); }
.hero .line:nth-child(2) { animation-delay: calc(var(--stagger) * 3); }
.hero .copy    { animation-delay: calc(var(--stagger) * 5); }
.hero .actions { animation-delay: calc(var(--stagger) * 7); }
.hero .hint    { animation-delay: calc(var(--stagger) * 9); }

@media (min-width: 880px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(32px, 5vw, 72px);
    min-height: calc(100dvh - 180px);
  }
  .hero.single { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}

/* ----- the Glyph (DESIGN §4): five capsules, rotated −7°, red ------------ */

.glyph {
  --tilt: -7deg; --tx: 0; --ty: 0;
  height: clamp(250px, 56vw, 300px);
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 0 -30px;
  color: var(--accent);
  transform: rotate(var(--tilt));
  transition: transform 900ms var(--spring);
  will-change: transform;
  pointer-events: none;
}
.glyph i {
  display: block; flex: 1; min-width: 0;
  /* parallax depth: each capsule moves a different amount */
  transform: translate(calc(var(--tx) * var(--d, 0) * 12px), calc(var(--ty) * var(--d, 0) * 16px));
  transition: transform 700ms var(--spring);
}
.glyph b {
  display: block; width: 100%; height: 100%; border-radius: 100px;
  background: currentColor;
  transform-origin: 50% 50%;
  animation:
    capsule-in 760ms var(--spring-over) both,
    breathe 7s ease-in-out 1.2s infinite;
}
.glyph i:nth-child(1) { height: 46.2%; }
.glyph i:nth-child(2) { height: 91.4%; }
.glyph i:nth-child(3) { height: 67.6%; }
.glyph i:nth-child(4) { height: 98.6%; }
.glyph i:nth-child(5) { height: 36.9%; }
.glyph i:nth-child(1) b { animation-delay: calc(var(--stagger) * 0), calc(1.2s + 0s); }
.glyph i:nth-child(2) b { animation-delay: calc(var(--stagger) * 1), calc(1.2s + .9s); }
.glyph i:nth-child(3) b { animation-delay: calc(var(--stagger) * 2), calc(1.2s + 1.7s); }
.glyph i:nth-child(4) b { animation-delay: calc(var(--stagger) * 3), calc(1.2s + .4s); }
.glyph i:nth-child(5) b { animation-delay: calc(var(--stagger) * 4), calc(1.2s + 2.3s); }

@media (min-width: 880px) {
  .glyph {
    height: auto;
    aspect-ratio: 450 / 290;
    max-height: 520px;
    margin: 0;
    gap: clamp(7px, 1vw, 12px);
  }
}

/* moon variant: two half discs and a circle, grey (404) */
.glyph.moon { gap: 0; --tilt: 0deg; }
.glyph.moon.grey { color: var(--glyph-grey); }
.glyph.moon i { flex: none; height: 66%; aspect-ratio: 112 / 194; }
.glyph.moon i:nth-child(2) { aspect-ratio: 1; height: 66%; }
.glyph.moon i b { border-radius: 100px 0 0 100px; }
.glyph.moon i:nth-child(2) b { border-radius: 50%; }

.mini-glyph { display: inline-flex; gap: 3px; align-items: center; height: 26px; }
.mini-glyph i { display: block; width: 9px; height: 20px; border-radius: 20px; background: var(--accent); }
.mini-glyph i:nth-child(2) { height: 12px; }
.mini-glyph i:nth-child(3) { height: 26px; }

/* ----- how it works: rows, not boxes ------------------------------------ */

.how {
  padding: clamp(24px, 5vh, 56px) 0 clamp(56px, 10vh, 120px);
  border-top: 1px solid var(--line);
}
.how .heading { margin-bottom: clamp(18px, 3vw, 30px); }
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: flex-start; gap: clamp(18px, 3vw, 40px);
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left var(--base) var(--spring);
}
.num {
  font-size: clamp(32px, 3vw, 38px); font-weight: 400; letter-spacing: -.06em; line-height: 1;
  color: var(--grey); min-width: 2ch;
  font-variant-numeric: tabular-nums;
  transition: color var(--base);
}
.row:hover .num { color: var(--accent); }
.row-text { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; }
.title { font-size: clamp(18px, 1.6vw, 22px); font-weight: 600; letter-spacing: -.035em; line-height: 1.15; }
.meta { font-size: 13px; line-height: 18px; color: var(--ink-soft); }
.how .hint { margin-top: 18px; }

@media (min-width: 880px) {
  .how { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
  .how .heading { margin-bottom: 0; position: sticky; top: 32px; }
  .how .hint { grid-column: 2; }
}

/* ----- scroll reveal ----------------------------------------------------- */

.js .reveal { opacity: 0; transform: translateY(8px); transition: opacity var(--slow) ease-out, transform var(--slow) var(--spring); }
.js .reveal.in { opacity: 1; transform: none; }
.rows .row:nth-child(1) { transition-delay: calc(var(--stagger) * 1); }
.rows .row:nth-child(2) { transition-delay: calc(var(--stagger) * 2); }
.rows .row:nth-child(3) { transition-delay: calc(var(--stagger) * 3); }
.how .hint.reveal { transition-delay: calc(var(--stagger) * 4); }

/* ----- footer ------------------------------------------------------------ */

.foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 20px; padding-bottom: 26px;
  border-top: 1px solid var(--line);
}
.foot .small { padding-top: 2px; }

/* ----- keyframes --------------------------------------------------------- */

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes capsule-in { from { transform: scaleY(.6); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
@keyframes breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.965); } }

/* ----- reduce motion: durations become 0, the glyph appears without animation */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .glyph i { transform: none; }
}
