@font-face { font-family: "Figtree"; src: url("assets/fonts/Figtree-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("assets/fonts/Figtree-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("assets/fonts/Figtree-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
/* New York (ui-serif) on Apple devices; Source Serif 4 everywhere else */
@font-face { font-family: "Serif Fallback"; src: url("assets/fonts/SourceSerif4-opsz.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Serif Fallback"; src: url("assets/fonts/SourceSerif4-opsz-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  --milk: #fbf8f3;
  --bloom-bg: #fdf7f1; /* the film's own cream, so the stage never shows a seam */
  --morning: #fff4e4;
  --dusk: #ebe5f3;
  --night: #1c2742;
  --night-deep: #151d33;
  --ink: #22304a;
  --ink-soft: #586176;
  --glory-ink: #4a5fa6;
  --moon: #a7a2ec;
  --moon-text: #c9cfe0;
  --twig: #8b7563;
  --serif: ui-serif, "Serif Fallback", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.25 0 0 0 0 0.2 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--milk);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--glory-ink); outline-offset: 3px; border-radius: 4px; }

/* Header */
.site-header {
  position: absolute; inset: 0 0 auto; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(20px, env(safe-area-inset-top)) clamp(20px, 3vw, 40px) 0;
}
.wordmark { font: 600 1.375rem/1 var(--serif); letter-spacing: -0.01em; text-decoration: none; color: var(--ink); margin: 0; }
.site-nav, .site-header .wordmark {
  background: rgba(253, 247, 241, 0.74);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-radius: 999px;
}
.site-header .wordmark { padding: 9px 16px; margin-left: -8px; }
.site-nav { display: flex; gap: clamp(18px, 2.4vw, 32px); padding: 2px 20px; }
.site-nav a { font-size: 0.9375rem; color: var(--ink-soft); text-decoration: none; padding: 8px 0; }
.site-nav a:hover { color: var(--ink); }

/* Hero: a tall section whose stage stays pinned while scrolling plays the bloom film (js/film.js) */
.hero { position: relative; height: 260vh; background: var(--bloom-bg); }
.hero-stage {
  position: sticky; top: 0;
  height: 100svh; min-height: 560px;
  display: grid; place-items: center;
  overflow: hidden;
  background: var(--bloom-bg);
}
.bloom-film { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-copy {
  position: relative; z-index: 2;
  max-width: 60rem; padding: 0 24px;
  text-align: center;
}
h1 {
  margin: 0 0 0.35em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 7.4vw, 7.5rem);
  line-height: 0.96;
  letter-spacing: -0.028em;
  color: var(--ink);
  text-wrap: balance;
}
h1 .line { display: block; white-space: nowrap; }
h1 .line--italic { font-style: italic; font-weight: 400; color: var(--glory-ink); letter-spacing: -0.02em; }
.lede { max-width: 30rem; margin: 0 auto 1.75rem; color: var(--ink-soft); font-size: clamp(1rem, 1.25vw, 1.125rem); text-wrap: pretty; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 28px; border-radius: 999px;
  background: var(--ink); color: #fff; text-decoration: none;
  font: 600 0.9688rem/1 var(--sans);
  box-shadow: 0 10px 24px -14px rgba(34, 48, 74, 0.7);
  transition: transform 160ms ease, background-color 160ms ease;
}
.button:hover { background: #2e3e5e; }
.button:active { transform: scale(0.97); }
.fine { margin: 0.9rem 0 0; font-size: 0.8125rem; color: var(--ink-soft); }

/* Copy settles in first; the garden grows around it */
.hero-copy > * { opacity: 0; transform: translateY(10px); }
.is-ready .hero-copy > * { animation: rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.is-ready .hero-copy > :nth-child(2) { animation-delay: 120ms; }
.is-ready .hero-copy > :nth-child(3) { animation-delay: 220ms; }
.is-ready .hero-copy > :nth-child(4) { animation-delay: 300ms; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Apps */
.day { position: relative; }
.chapter { position: relative; min-height: 175vh; }
.chapter-stage {
  position: sticky; top: 0;
  min-height: 100svh;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  gap: clamp(24px, 5vw, 96px);
  padding: 80px clamp(24px, 6vw, 112px);
  max-width: 1440px; margin: 0 auto;
}
.chapter--flip .chapter-flower { order: 2; }
.chapter--morning { background: linear-gradient(180deg, var(--bloom-bg), var(--morning)); }
.chapter--noon { background: linear-gradient(180deg, var(--morning) 0%, #fbf3ea 50%, var(--dusk) 100%); }
.dusk { height: 70vh; background: linear-gradient(180deg, var(--dusk) 0%, #8d8fb8 38%, #3b4570 72%, var(--night) 100%); }
.chapter--night { background: linear-gradient(180deg, var(--night) 0%, var(--night-deep) 100%); color: #fff; }
.chapter-flower { position: relative; margin: 0; display: grid; justify-items: center; gap: 18px; }
.bloom-canvas { display: block; width: var(--s); aspect-ratio: 1 / 1.08; --s: min(36vw, 64vh, 560px); }
.chapter-flower figcaption { font: italic 400 1rem/1.3 var(--serif); color: var(--ink-soft); }
.chapter--night figcaption { color: var(--moon-text); }
.moon-glow {
  position: absolute; left: 50%; top: calc(min(36vw, 62vh, 560px) / 2); width: min(52vw, 90vh, 820px); aspect-ratio: 1;
  translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 197, 255, 0.28), rgba(167, 162, 236, 0.08) 45%, rgba(167, 162, 236, 0) 70%);
}

.chapter-copy { max-width: 31rem; }
.app-id { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.app-icon { width: 64px; height: 64px; border-radius: 22.5%; box-shadow: 0 8px 22px -10px rgba(20, 30, 60, 0.55); }
.app-id h2 { margin: 0; font: 600 1.375rem/1.15 var(--sans); letter-spacing: -0.01em; }
.app-id p { margin: 2px 0 0; color: var(--ink-soft); font-size: 0.9375rem; }
.chapter-title {
  margin: 0 0 18px;
  font: 500 clamp(2.25rem, 4.2vw, 3.75rem)/1.02 var(--serif);
  letter-spacing: -0.024em;
  text-wrap: balance;
}
.chapter-body { margin: 0 0 30px; color: var(--ink-soft); text-wrap: pretty; }
.chapter--night .app-id p, .chapter--night .chapter-body { color: var(--moon-text); }
.soon {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; margin: 0;
  border-radius: 999px; border: 1px solid rgba(201, 207, 224, 0.4);
  color: #fff; font-weight: 600; font-size: 0.9375rem;
}
.stars {
  position: absolute; inset: -40vh 0 0; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 46% 12%, #d9d6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 44%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 78% 22%, #d9d6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 70%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 36% 84%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 52%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 38%, #fff 50%, transparent 51%);
  opacity: 0.7;
}

/* Footer */
.site-footer {
  background: var(--night-deep); color: var(--moon-text);
  padding: 56px clamp(24px, 6vw, 112px) max(40px, env(safe-area-inset-bottom));
  display: grid; gap: 18px; justify-items: start;
}
.site-footer .wordmark { color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 0.9375rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: #fff; }
.legal { margin: 0; font-size: 0.8125rem; opacity: 0.75; }

/* Phones */
@media (max-width: 760px) {
  .site-nav { display: none; }

  .chapter { min-height: 170vh; }
  .chapter-stage { grid-template-columns: 1fr; align-content: center; gap: 20px; padding: 64px 24px 40px; }
  .chapter--flip .chapter-flower { order: 0; }
  .bloom-canvas { --s: min(70vw, 40svh); }
  .moon-glow { top: calc(min(70vw, 40svh) * 0.45); width: 110vw; }
  .app-id { margin-bottom: 16px; }
  .app-icon { width: 52px; height: 52px; }
  .chapter-title { margin-bottom: 12px; }
  .chapter-body { margin-bottom: 22px; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero { height: auto; }
  .hero-copy > * { opacity: 1 !important; transform: none; animation: none !important; }
}

