:root {
  /* palette drawn from the app icon: violet gradient #6d4df6 → #3b2bb8,
     teal #0b9e90 document, coral #ff5d73 document */
  --paper: oklch(96.8% 0.012 290);
  --paper-deep: oklch(93% 0.025 288);
  --ink: oklch(26% 0.085 284);
  --ink-soft: oklch(46% 0.06 284);
  --accent: oklch(54% 0.225 281);
  --teal: oklch(58% 0.115 183);
  --coral: oklch(66% 0.19 14);
  --rule: oklch(26% 0.085 284 / 0.16);
  --shot: url('assets/app-light.png');
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: oklch(20% 0.055 283);
    --paper-deep: oklch(16.5% 0.05 281);
    --ink: oklch(94% 0.018 290);
    --ink-soft: oklch(74% 0.045 288);
    --accent: oklch(74% 0.155 285);
    --teal: oklch(70% 0.11 183);
    --coral: oklch(72% 0.17 14);
    --rule: oklch(94% 0.018 290 / 0.18);
    --shot: url('assets/app-dark.png');
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 clamp(24px, 5vw, 64px);
  max-width: 1200px;
  margin: 0 auto;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sans {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
}

/* ---- masthead ---- */
.masthead {
  flex: none;
  display: flex; align-items: center; gap: 12px;
  padding: clamp(14px, 2.4vh, 24px) 0;
  border-bottom: 1px solid var(--rule);
}
.masthead .brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink); text-decoration: none;
}
.masthead img { width: 32px; height: 32px; }
.masthead .word { font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.masthead nav { margin-left: auto; display: flex; gap: clamp(14px, 2.5vw, 26px); }
.masthead nav a { color: var(--ink-soft); text-decoration: none; }
.masthead nav a:hover { color: var(--accent); }
.masthead nav a[aria-current="page"] { color: var(--accent); }
.masthead.no-rule { border-bottom: none; }

/* ---- page shell ---- */
main {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
}
main > * { width: 100%; }

/* ---- home: hero ---- */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
}
h1 {
  font-size: clamp(2.1rem, 3.2vw + 1.4vh, 3.6rem);
  line-height: 1.05;
  font-weight: 620;
  letter-spacing: -0.022em;
  max-width: 15ch;
  text-wrap: balance;
}
h1 em { font-style: italic; font-weight: 480; color: var(--accent); }
.lede {
  margin-top: clamp(14px, 2.6vh, 26px);
  font-size: clamp(0.98rem, 0.9vw + 0.6vh, 1.18rem);
  max-width: 52ch;
  color: var(--ink-soft);
}
.lede strong { color: var(--ink); font-weight: 600; }

.dl-row {
  margin-top: clamp(18px, 3.6vh, 34px);
  display: flex; flex-wrap: wrap; gap: 12px 14px;
}
.dl {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  border-radius: 10px;
  padding: 12px 20px;
  flex: 1 1 220px;
  background: linear-gradient(135deg, oklch(56% 0.225 283), oklch(42% 0.215 276));
  color: oklch(98% 0.008 290);
}
.dl:hover { background: linear-gradient(135deg, oklch(50% 0.23 281), oklch(38% 0.21 276)); }
.dl .big { font-size: 16.5px; font-weight: 640; }
.dl .sub {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11.5px; margin-top: 2px; opacity: 0.78; letter-spacing: 0.02em;
  display: block;
}
.dl-note {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px; color: var(--ink-soft);
  margin-top: clamp(10px, 2vh, 16px); max-width: 58ch; line-height: 1.5;
}
.dl-note a { color: inherit; }
.dl-note.tad {
  margin-top: clamp(14px, 2.6vh, 22px);
  padding-top: clamp(12px, 2.2vh, 18px);
  border-top: 1px solid var(--rule);
}
.dl-note.tad a { color: var(--accent); }

.hero-shot { min-width: 0; }
.frame {
  border-radius: 14px;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  box-shadow:
    0 1px 2px oklch(26% 0.085 284 / 0.08),
    0 24px 60px -18px oklch(35% 0.16 280 / 0.35);
  overflow: hidden;
  max-width: min(100%, 64vh);
  margin: 0 auto;
}
.frame .bar {
  display: flex; gap: 7px; padding: 11px 13px;
  border-bottom: 1px solid var(--rule);
}
.frame .bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--rule); }
.frame .bar i:first-child { background: var(--coral); }
.frame .shot {
  aspect-ratio: 1440 / 1200;
  background-image: var(--shot);
  background-size: cover;
}
.shot-caption {
  text-align: center; font-style: italic; color: var(--ink-soft);
  margin-top: 12px; font-size: 14px;
}

/* ---- why page ---- */
.manifesto {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
.manifesto h2 {
  font-size: clamp(1.8rem, 2.6vw + 1vh, 2.6rem);
  font-weight: 600; line-height: 1.12; letter-spacing: -0.015em;
  text-wrap: balance;
}
.manifesto h2 .orn { color: var(--coral); font-style: italic; }
.manifesto .prose { font-size: clamp(0.98rem, 0.8vw + 0.7vh, 1.15rem); max-width: 58ch; }
.manifesto .prose p + p { margin-top: 1.1em; }

/* ---- how page ---- */
.how { max-width: 900px; }
.how > .sans { color: var(--ink-soft); margin-bottom: clamp(16px, 3vh, 28px); }
.how-line {
  font-size: clamp(1.9rem, 2.8vw + 1.6vh, 3.2rem);
  line-height: 1.16;
  font-weight: 560;
  letter-spacing: -0.015em;
  max-width: 26ch;
  text-wrap: balance;
}
.how-line .t { color: var(--teal); }
.how-line .a { color: var(--accent); }
.how-line .c { color: var(--coral); font-style: italic; }
.honest {
  margin-top: clamp(22px, 4.5vh, 40px);
  padding-left: 18px;
  border-left: 2px solid var(--coral);
  color: var(--ink-soft);
  font-size: clamp(0.95rem, 0.75vw + 0.6vh, 1.08rem);
  max-width: 60ch;
}
.honest strong { color: var(--ink); font-weight: 600; }

/* ---- entrance ---- */
@media (prefers-reduced-motion: no-preference) {
  main > * > * { animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
  main > * > *:nth-child(2) { animation-delay: 0.08s; }
  main > * > *:nth-child(3) { animation-delay: 0.16s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---- small screens: allow scrolling, stack ---- */
@media (max-width: 820px), (max-height: 560px) {
  html, body { height: auto; }
  body { overflow: auto; min-height: 100dvh; }
  main { padding: clamp(24px, 6vw, 48px) 0; }
  .hero-grid, .manifesto { grid-template-columns: 1fr; }
  .hero-shot { max-width: 540px; }
  .frame { max-width: 100%; }
}
