/* Kuhu — kuhu.fm · "Dawn paper"
   Warm cream, ink serif, one coral. The only dark thing on the page is
   the app itself. References: HODINKEE (numbered editorial on cream),
   Sana (dark phone on light), Suno (the prompt performs the product). */

:root {
  --paper: #fbf7f0;
  --paper-deep: #f3ece0;
  --ink: #221a22;
  --ink-2: #766e78;
  --coral: #ff6b4a;
  --coral-ink: #c2401f; /* text-safe coral, 4.6:1 on paper */
  --hairline: #e7ded0;
  --app-dark: #0e0e12;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", -apple-system, "Helvetica Neue", sans-serif;
  --out: cubic-bezier(0.19, 1, 0.22, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* paper grain — multiply so it darkens like fiber, never glows */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 80;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: rgba(255, 107, 74, 0.28); }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--coral-ink); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 78rem; margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 4rem); }

/* links that draw their own underline */
.uline { position: relative; }
.uline::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -2px;
  height: 1px;
  background: currentColor;
  transition: right 0.4s var(--out);
}
.uline:hover::after { right: 0; }

/* ------------------------------------------------------------- nav */

.nav {
  position: absolute;
  inset-inline: 0; top: 0;
  z-index: 30;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: clamp(1.25rem, 3vw, 2.1rem) clamp(1.25rem, 5vw, 4rem);
}
.wordmark { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; }
.wordmark em { font-style: normal; color: var(--coral); }
.nav-links { display: flex; gap: 2.25rem; font-size: 0.9rem; color: var(--ink-2); }
.nav-links a { transition: color 0.25s var(--out); }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 46rem) { .nav-links { display: none; } }

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

.hero { position: relative; overflow: hidden; }
.hero .dawn {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.hero-grid {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  min-height: 100svh;
  padding-block: clamp(6.5rem, 12vh, 8rem) clamp(3rem, 8vh, 5rem);
}
@media (max-width: 62rem) {
  .hero-grid { grid-template-columns: 1fr; min-height: auto; }
}

.kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: clamp(1.4rem, 3.5vh, 2.4rem);
}
.kicker b { color: var(--coral-ink); font-weight: 600; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 570;
  font-variation-settings: "SOFT" 55, "opsz" 144;
  font-size: clamp(2.8rem, 6.6vw, 5.6rem);
  line-height: 1.03;
  letter-spacing: -0.022em;
}
.hero h1 .sings { font-style: italic; font-weight: 470; color: var(--coral); }

.spoken {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "SOFT" 100, "opsz" 40;
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  line-height: 1.3;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  margin-block: clamp(0.8rem, 2vh, 1.3rem);
  min-height: 2.7em;
  max-width: 26ch;
}
.spoken .caret {
  display: inline-block;
  width: 2px; height: 1em;
  transform: translateY(0.17em);
  background: var(--coral);
  animation: caret 1.1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.hero-sub {
  margin-top: clamp(1.4rem, 3vh, 2.2rem);
  max-width: 30rem;
  color: var(--ink-2);
  font-size: 1.05rem;
}
.hero-sub strong { color: var(--ink); font-weight: 550; }

.cta-row { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; margin-top: 2.2rem; }
.cta-note { font-size: 0.85rem; color: var(--ink-2); max-width: 17rem; line-height: 1.5; }
.cta-note em { color: var(--coral-ink); font-style: normal; font-weight: 550; }

/* the badge is magnetic — dawn.js nudges it toward the cursor */
.badge-appstore {
  display: inline-block;
  will-change: transform;
  transition: transform 0.6s var(--out);
}
.badge-appstore svg { display: block; height: 3.4rem; width: auto; }
.badge-appstore rect { transition: fill 0.3s var(--out); }
.badge-appstore:hover rect:first-of-type { fill: #241c24; }

/* ------------------------------------------------ the phone (CSS-built) */

.phone-stage {
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1200px;
  padding-block: 1rem;
}
.phone {
  position: relative;
  width: min(19.5rem, 78vw);
  aspect-ratio: 9 / 19.2;
  border-radius: 3.2rem;
  background: linear-gradient(160deg, #3a323c, #16121a 60%);
  padding: 0.6rem;
  box-shadow:
    0 2px 6px rgba(34, 26, 34, 0.18),
    0 24px 60px -12px rgba(34, 26, 34, 0.38),
    0 60px 120px -30px rgba(255, 107, 74, 0.18);
  transform-style: preserve-3d;
  will-change: transform;
}
.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 2.65rem;
  background: var(--app-dark);
  overflow: hidden;
  color: #f4f1ea;
  display: flex;
  flex-direction: column;
  padding: 2.9rem 1.15rem 1rem;
  font-size: 0.72rem;
}
.phone-island {
  position: absolute;
  top: 0.85rem; left: 50%;
  transform: translateX(-50%);
  width: 5.6rem; height: 1.35rem;
  border-radius: 1rem;
  background: #000;
}
.p-kicker {
  font-size: 0.5rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #9b99a3;
  margin-bottom: 0.3rem;
}
.p-title {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.28rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 0.9rem;
}
.p-pill {
  display: flex; align-items: center; gap: 0.45rem;
  background: #17171d;
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.2rem;
  padding: 0.55rem 0.7rem;
  color: #9b99a3;
  margin-bottom: 1rem;
}
.p-pill .dot {
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff8a6a, #b03a20);
  flex-shrink: 0;
}
.p-pill .p-caret { display: inline-block; width: 1px; height: 0.7rem; background: #ff6b4a; animation: caret 1.1s steps(1) infinite; }
.p-shelf-label { font-size: 0.5rem; font-weight: 600; letter-spacing: 0.2em; color: #9b99a3; text-transform: uppercase; margin-bottom: 0.45rem; }
.p-cards { display: flex; gap: 0.5rem; }
.p-card {
  flex: 1;
  aspect-ratio: 4 / 5.1;
  border-radius: 0.9rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0.55rem;
  border: 0.5px solid rgba(255, 255, 255, 0.07);
}
.p-card b { font-family: var(--serif); font-weight: 560; font-size: 0.78rem; line-height: 1.1; letter-spacing: -0.01em; }
.p-card span { font-size: 0.52rem; color: rgba(244, 241, 234, 0.72); margin-top: 0.15rem; }
.p-card::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(90% 70% at 25% 18%, var(--c1), transparent 62%),
    radial-gradient(90% 80% at 80% 45%, var(--c2), transparent 66%),
    #101016;
}
.p-card::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, transparent 45%, rgba(4, 4, 8, 0.72));
}
.p-player {
  margin-top: auto;
  display: flex; align-items: center; gap: 0.5rem;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(6px);
  border: 0.5px solid rgba(255, 255, 255, 0.09);
  border-radius: 1.1rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.62rem;
}
.p-player .art { width: 1.5rem; height: 1.5rem; border-radius: 0.4rem; background: radial-gradient(circle at 30% 25%, #4fc3c3, #14424a); flex-shrink: 0; }
.p-player .bars { display: flex; gap: 2px; align-items: flex-end; height: 0.8rem; margin-left: auto; }
.p-player .bars i { width: 2.5px; border-radius: 1px; background: var(--coral); animation: eq 1.1s ease-in-out infinite; }
.p-player .bars i:nth-child(1) { height: 45%; animation-delay: 0s; }
.p-player .bars i:nth-child(2) { height: 90%; animation-delay: 0.18s; }
.p-player .bars i:nth-child(3) { height: 60%; animation-delay: 0.34s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .p-player .bars i, .p-pill .p-caret { animation: none; } }

/* a soft dawn halo behind the phone */
.phone-stage::before {
  content: "";
  position: absolute;
  width: 130%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 138, 106, 0.22), rgba(255, 197, 143, 0.1) 55%, transparent 72%);
  z-index: -1;
}

/* --------------------------------------------------------- sections */

.section-head {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--coral-ink);
  margin-bottom: clamp(2rem, 5vh, 3.2rem);
}

/* how — HODINKEE-style numbered editorial over one hairline each */
.how { padding-block: clamp(5rem, 12vh, 8.5rem) clamp(4rem, 9vh, 6.5rem); }
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
}
@media (max-width: 56rem) { .how-grid { grid-template-columns: 1fr; } }
.step { border-top: 1px solid var(--ink); padding-top: 1.1rem; }
.step-n { font-family: var(--serif); font-style: italic; font-size: 0.95rem; color: var(--coral-ink); }
.step h3 {
  font-family: var(--serif);
  font-weight: 550;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  letter-spacing: -0.01em;
  margin: 0.4rem 0 0.6rem;
}
.step p { color: var(--ink-2); font-size: 0.98rem; }
.step p strong { color: var(--ink); font-weight: 550; }

/* moods — colorful objects drifting across a deeper paper band */
.moods { background: var(--paper-deep); padding-block: clamp(4rem, 9vh, 6.5rem); overflow: hidden; }
.moods .section-head, .moods .moods-note { padding-inline: clamp(1.25rem, 5vw, 4rem); max-width: 78rem; margin-inline: auto; }
.shelf-clip { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, black 7%, black 93%, transparent); mask-image: linear-gradient(to right, transparent, black 7%, black 93%, transparent); }
.shelf { display: flex; gap: 1.1rem; width: max-content; padding-block: 0.6rem; }
@media (prefers-reduced-motion: no-preference) {
  .shelf { animation: drift 85s linear infinite; }
  .shelf-clip + .shelf-clip .shelf { animation-duration: 102s; animation-direction: reverse; }
  .shelf:hover { animation-play-state: paused; }
}
@keyframes drift { to { transform: translateX(-50%); } }

.mood {
  position: relative;
  width: 12.5rem; height: 15.5rem;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1rem;
  color: #f7f3ec;
  box-shadow: 0 1px 2px rgba(34, 26, 34, 0.1), 0 14px 34px -12px rgba(34, 26, 34, 0.35);
  transition: transform 0.5s var(--out), box-shadow 0.5s var(--out);
  isolation: isolate;
}
.mood:hover { transform: translateY(-6px) rotate(-0.5deg); box-shadow: 0 2px 4px rgba(34, 26, 34, 0.12), 0 26px 48px -14px rgba(34, 26, 34, 0.42); }
.mood::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(90% 70% at 22% 16%, var(--m1), transparent 62%),
    radial-gradient(85% 80% at 82% 42%, var(--m2), transparent 66%),
    radial-gradient(110% 70% at 50% 108%, var(--m3), transparent 72%),
    #14121a;
}
.mood::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, transparent 42%, rgba(6, 5, 10, 0.16) 56%, rgba(6, 5, 10, 0.74));
}
.mood h4 { font-family: var(--serif); font-weight: 560; font-size: 1.2rem; line-height: 1.12; letter-spacing: -0.01em; }
.mood p { font-size: 0.74rem; color: rgba(247, 243, 236, 0.78); margin-top: 0.2rem; line-height: 1.4; }
.moods-note { margin-top: 1.6rem; color: var(--ink-2); font-size: 0.9rem; }

/* moments — ink serif ledger lines */
.moments { padding-block: clamp(5rem, 12vh, 8.5rem); }
.moment {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: clamp(1.3rem, 3vh, 2rem);
  border-top: 1px solid var(--hairline);
  transition: padding-left 0.45s var(--out);
}
.moment:last-of-type { border-bottom: 1px solid var(--hairline); }
.moment:hover { padding-left: 0.9rem; }
.moment-text {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 3.4vw, 2.6rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
}
.moment-text em { font-style: italic; color: var(--coral-ink); transition: color 0.3s var(--out); }
.moment:hover .moment-text em { color: var(--coral); }
.moment small { display: block; font-family: var(--sans); font-size: 0.85rem; color: var(--ink-2); margin-top: 0.35rem; }
.moment-arrow {
  flex-shrink: 0;
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--coral-ink);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.35s var(--out), transform 0.35s var(--out);
}
.moment:hover .moment-arrow { opacity: 1; transform: none; }

/* credits — a quiet ledger; numbers tick up when seen */
.credits { padding-block: clamp(4rem, 9vh, 7rem); }
.credits-lede {
  font-family: var(--serif);
  font-weight: 540;
  font-size: clamp(1.8rem, 3.6vw, 2.9rem);
  line-height: 1.16;
  letter-spacing: -0.018em;
  max-width: 22ch;
  margin-bottom: 0.9rem;
}
.credits-lede em { color: var(--coral-ink); font-style: italic; }
.credits-sub { color: var(--ink-2); max-width: 34rem; margin-bottom: clamp(2.2rem, 5vh, 3.6rem); }

.packs { max-width: 42rem; }
.pack {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1.5rem;
  align-items: baseline;
  padding-block: 1.15rem;
  border-top: 1px solid var(--hairline);
  transition: padding-left 0.4s var(--out);
}
.pack:hover { padding-left: 0.6rem; }
.pack:last-child { border-bottom: 1px solid var(--hairline); }
.pack-name { font-weight: 550; }
.pack-name small { display: block; font-weight: 400; font-size: 0.82rem; color: var(--ink-2); }
.pack-name .loved { color: var(--coral-ink); font-size: 0.72rem; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; margin-left: 0.5rem; }
.pack-mins { color: var(--ink-2); font-size: 0.88rem; font-style: italic; font-family: var(--serif); }
.pack-price { font-family: var(--serif); font-size: 1.3rem; font-weight: 560; font-variant-numeric: lining-nums tabular-nums; }
.credits-foot { margin-top: 1.5rem; font-size: 0.83rem; color: var(--ink-2); max-width: 42rem; }
.credits-foot a { color: var(--ink); }

/* finale — the dawn returns, warm */
.finale { position: relative; overflow: hidden; text-align: center; padding-block: clamp(6rem, 15vh, 10rem); }
.finale .dawn { position: absolute; inset: 0; width: 100%; height: 100%; }
.finale::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, var(--paper), transparent 40%, transparent 65%, var(--paper)); pointer-events: none; }
.finale-inner { position: relative; z-index: 2; }
.finale h2 {
  font-family: var(--serif);
  font-weight: 550;
  font-size: clamp(2.3rem, 6vw, 4.6rem);
  letter-spacing: -0.022em;
  line-height: 1.06;
}
.finale h2 em { font-style: italic; color: var(--coral-ink); }
.finale .cta-row { justify-content: center; margin-top: 2.4rem; }

/* footer */
footer { border-top: 1px solid var(--hairline); padding-block: 2.4rem 3rem; font-size: 0.85rem; color: var(--ink-2); }
.foot-row { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: baseline; }
.foot-links { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.foot-links a:hover { color: var(--ink); }
.foot-el { margin-top: 1rem; font-size: 0.78rem; }
.foot-el a { color: var(--ink); }

/* --------------------------------------------------------- legal pages */

.legal { max-width: 44rem; margin-inline: auto; padding: clamp(6rem, 14vh, 8.5rem) clamp(1.25rem, 5vw, 3.5rem) 5rem; }
.legal h1 { font-family: var(--serif); font-weight: 570; font-size: clamp(2.2rem, 5vw, 3.3rem); letter-spacing: -0.02em; margin-bottom: 0.4rem; }
.legal .updated { color: var(--ink-2); font-size: 0.85rem; margin-bottom: 2.8rem; }
.legal h2 { font-family: var(--serif); font-weight: 550; font-size: 1.4rem; margin: 2.6rem 0 0.7rem; }
.legal p, .legal li { color: var(--ink-2); margin-bottom: 0.9rem; }
.legal li { margin-left: 1.25rem; margin-bottom: 0.5rem; }
.legal strong { color: var(--ink); font-weight: 550; }
.legal a { color: var(--ink); border-bottom: 1px solid var(--hairline); }

/* one orchestrated entrance */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.85s var(--out), transform 0.85s var(--out); }
  .reveal.in { opacity: 1; transform: none; }
  .reveal:nth-child(2) { transition-delay: 0.08s; }
  .reveal:nth-child(3) { transition-delay: 0.16s; }
}
