/* ═══════════════════════════════════════════════════════════════
   Lunira — site styles

   Palette and voice come from the app itself (src/theme/palettes.ts):
   blush ground, deep-rose accent, plum-black ink.

   The type system encodes what a thing IS, and is used consistently:
     Fraunces  — the app speaking. Statements, headings.
     Karla     — prose. Explanation, captions, UI.
     DM Mono   — money. Every figure, everywhere.

   Committed to a light palette on purpose: the app itself is light-only
   (app.json userInterfaceStyle), and a dark blush reads as mud.
   ═══════════════════════════════════════════════════════════════ */

:root {
  color-scheme: light;

  /* ink */
  --ink: #241e28;
  --ink-70: #5c525f;
  --ink-45: #8b8290;

  /* brand */
  --rose: #ab4c5d;
  --petal: #e9899a;
  --blush: #fdf4f3;
  --shell: #fbedeb;
  --paper: #ffffff;
  --line: #f0e0dd;

  /* the "every other app" voice — cold and loud, on purpose */
  --alarm: #b8332a;
  --alarm-bg: #f4f2f3;
  --alarm-line: #ddd8dc;

  --display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --measure: 40rem;
  --gutter: 1.5rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--blush);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--rose); }

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── shell ──────────────────────────────────────────────────── */

.shell {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.shell--narrow { max-width: var(--measure); }

/* ── masthead ───────────────────────────────────────────────── */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.75rem 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 1;
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.015em;
}

.wordmark img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.masthead nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.94rem;
}

.masthead nav a {
  color: var(--ink-70);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.masthead nav a:hover {
  color: var(--rose);
  border-bottom-color: var(--petal);
}

/* ── shared type ────────────────────────────────────────────── */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose);
  margin: 0 0 1.25rem;
}

.statement {
  font-family: var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 1;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin: 0;
  font-size: clamp(2.6rem, 7.5vw, 4.6rem);
}

.statement .loud { display: block; }

/* Money is always mono, wherever a figure appears. */
.figure {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.88em;
  letter-spacing: -0.03em;
  color: var(--rose);
}

/* The second beat of the headline. The size drop is the joke: the loud
   claim is set loud, and the answer to it is set quiet. */
.statement .quiet {
  display: block;
  font-weight: 400;
  font-variation-settings: "SOFT" 90, "WONK" 0;
  color: var(--ink-45);
  font-size: 0.44em;
  letter-spacing: -0.01em;
  margin-top: 0.6em;
}

.lede {
  font-size: 1.14rem;
  line-height: 1.55;
  color: var(--ink-70);
  max-width: 30rem;
  margin: 1.75rem 0 0;
}

.section-head {
  font-family: var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 1;
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.9rem;
}

.section-note {
  color: var(--ink-70);
  max-width: 32rem;
  margin: 0 0 3rem;
}

/* ── hero ───────────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 0 5.5rem;
}

.hero-figure { position: relative; }

.hero-figure img {
  width: min(100%, 320px);
  margin: 0 auto;
  filter: drop-shadow(0 24px 40px rgba(171, 76, 93, 0.16));
  position: relative;
  z-index: 1;
}

/* a soft halo, so the mascot sits on something.
   stacked with z-index 0/1 rather than -1, because the entrance animation
   gives .hero-figure a transform and a negative z-index child would then be
   trapped in the new stacking context. */
.hero-figure::before {
  content: "";
  position: absolute;
  inset: 12% 8% 6%;
  background: radial-gradient(circle at 50% 45%, var(--shell), transparent 68%);
  z-index: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--shell);
  color: var(--rose);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 1.4rem;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--petal);
}

/* ── call to action ─────────────────────────────────────────── */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-top: 2.25rem;
}

.cta {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  background: var(--ink);
  color: var(--blush);
  text-decoration: none;
  border-radius: 999px;
  padding: 0.95rem 1.7rem;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 24px rgba(36, 30, 40, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s;
}

.cta:hover {
  background: var(--rose);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(171, 76, 93, 0.28);
}

.cta:active { transform: translateY(0); }

.cta-aside {
  font-size: 0.92rem;
  color: var(--ink-45);
  margin: 0;
}

/* ── the signature: one fact, two voices ────────────────────── */

.voices { padding: 4.5rem 0; }

.voices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.voice {
  border-radius: 20px;
  padding: 1.6rem 1.7rem 1.8rem;
  height: 100%;
}

.voice-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 1.2rem;
}

/* the loud one — deliberately unpleasant. this is the argument. */
.voice--loud {
  background: var(--alarm-bg);
  border: 1px solid var(--alarm-line);
}

.voice--loud .voice-label { color: var(--ink-45); }

.voice-shout {
  font-family: var(--body);
  font-weight: 800;
  font-size: 1.42rem;
  line-height: 1.18;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--alarm);
  margin: 0 0 0.9rem;
}

.voice-scold {
  color: #6a5f68;
  font-size: 0.98rem;
  margin: 0;
}

.voice-streak {
  display: inline-block;
  margin-top: 1rem;
  background: var(--alarm);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.7rem;
  border-radius: 5px;
  text-transform: uppercase;
}

/* the quiet one */
.voice--calm {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(171, 76, 93, 0.09);
}

.voice--calm .voice-label { color: var(--rose); }

.voice-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.35rem 0.6rem;
  margin-bottom: 1.1rem;
  background: var(--paper);
}

.voice-after {
  color: var(--ink-70);
  font-size: 0.98rem;
  margin: 0;
}

.voice-after strong { color: var(--ink); font-weight: 700; }

/* the two panels arrive differently — see the motion section below */

/* ── the real thing ─────────────────────────────────────────── */

.proof {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 4.5rem 0;
}

.strip {
  display: grid;
  grid-template-columns: 1fr 15rem;
  gap: 2rem;
  align-items: center;
  padding: 1.9rem 0;
  border-top: 1px solid var(--line);
}

.strip:first-of-type { border-top: 0; }

.strip figcaption {
  color: var(--ink-70);
  font-size: 0.99rem;
}

.strip figcaption b {
  display: block;
  font-family: var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 1;
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

/* ── on-device ──────────────────────────────────────────────── */

.trust { padding: 5rem 0; }

.trust-grid {
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 3rem;
  align-items: center;
}

.trust-grid img { width: 100%; max-width: 220px; }

.trust p { color: var(--ink-70); }

.trust p:last-child { margin-bottom: 0; }

/* ── footer ─────────────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3.5rem;
  font-size: 0.93rem;
  color: var(--ink-45);
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}

.foot a { color: var(--ink-70); text-decoration: none; }

.foot a:hover { color: var(--rose); text-decoration: underline; }

.foot-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* ═══ legal pages ═══════════════════════════════════════════ */

.legal { padding: 1rem 0 4rem; }

.legal h1 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 1;
  font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 2.9rem);
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 1.5rem 0 0.4rem;
}

.legal h2 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 0;
  font-weight: 600;
  font-size: 1.28rem;
  letter-spacing: -0.015em;
  margin: 2.8rem 0 0.7rem;
}

.legal p, .legal li { margin: 0 0 1.05rem; }

.legal ul { padding-left: 1.15rem; }

.legal li::marker { color: var(--petal); }

.legal .updated {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-45);
  margin: 0 0 2.5rem;
}

.pull {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--petal);
  border-radius: 4px 16px 16px 4px;
  padding: 1.35rem 1.5rem;
  margin: 2rem 0 2.5rem;
  box-shadow: 0 10px 26px rgba(171, 76, 93, 0.07);
}

.pull p {
  margin: 0;
  font-family: var(--display);
  font-variation-settings: "SOFT" 70, "WONK" 0;
  font-size: 1.16rem;
  line-height: 1.45;
  color: var(--ink);
}

/* ═══ motion ═══════════════════════════════════════════════════
   The product refuses to raise its voice, so the motion doesn't
   either: long durations, soft easing, no bounce, no overshoot,
   nothing that pulls at you. The CTA in particular never pulses
   or wiggles — an app about not nagging you shouldn't nag.

   There is exactly one deliberate exception, and it is the point
   of the page: in the comparison, the loud panel snaps in hard
   while the calm one settles slowly after it. The two easings are
   the argument.
   ══════════════════════════════════════════════════════════════ */

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* abrupt, with a small overshoot — this is what "shouting" looks like */
@keyframes snap {
  0%   { opacity: 0; transform: translateY(-7px) scale(0.985); }
  55%  { opacity: 1; transform: translateY(3px) scale(1.008); }
  100% { opacity: 1; transform: none; }
}

/* slow, no overshoot, arrives and stays put */
@keyframes settle {
  from { opacity: 0; transform: translateY(26px) scale(0.99); }
  to   { opacity: 1; transform: none; }
}

/* the companion is alive, not animated: 7s, 9px, barely there */
@keyframes breathe {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

.on-load {
  animation: rise 0.75s cubic-bezier(0.22, 0.68, 0.24, 1) both;
  animation-delay: var(--d, 0s);
}

.on-view { opacity: 0; }

.on-view.is-in {
  animation: rise 0.75s cubic-bezier(0.22, 0.68, 0.24, 1) both;
  animation-delay: var(--d, 0s);
}

.hero-figure img { animation: breathe 7s ease-in-out infinite; }

/* the signature beat. three classes, so these win over .on-view.is-in */
.voice--loud.on-view.is-in {
  animation: snap 0.38s cubic-bezier(0.2, 0.9, 0.35, 1) both;
}

.voice--calm.on-view.is-in {
  animation: settle 1s cubic-bezier(0.22, 0.68, 0.24, 1) 0.45s both;
}

/* the whole page holds still for anyone who asked it to */
@media (prefers-reduced-motion: reduce) {
  .on-load,
  .on-view,
  .on-view.is-in,
  .voice--loud.on-view.is-in,
  .voice--calm.on-view.is-in,
  .hero-figure img {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ── responsive ─────────────────────────────────────────────── */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem 0 3.5rem;
  }
  .hero-figure { order: -1; }
  .hero-figure img { width: min(64%, 220px); }
  .voices-grid { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr; gap: 1.1rem; }
  .trust-grid { grid-template-columns: 1fr; gap: 1.5rem; text-align: left; }
  .trust-grid img { max-width: 150px; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .masthead { padding: 1.25rem 0; }
  .masthead nav { gap: 1.1rem; }
  .cta { width: 100%; justify-content: center; }
  .voice { padding: 1.3rem 1.35rem 1.5rem; }
}
