:root {
  --cream: #f4f2ee;
  --cream-deep: #ece9e2;
  --paper: #e4dfd5;
  --teal: #2f6f6a;
  --teal-deep: #245854;
  --ink: #1c1b19;
  --muted: #6b6862;
  --line: color-mix(in srgb, var(--ink) 11%, transparent);
  --soft: #fffdf9;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
}

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

html { scroll-behavior: smooth; }

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: 0.14;
  background-image: url("/assets/grain.png");
  background-size: 180px 180px;
  mix-blend-mode: multiply;
}

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

a { color: inherit; text-decoration-color: color-mix(in srgb, var(--teal) 55%, transparent); text-underline-offset: 0.18em; }
a:hover { color: var(--teal-deep); }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  background: var(--ink);
  color: var(--cream);
  padding: 8px 12px;
  border-radius: 8px;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(var(--wrap), 100%);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--cream) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}

.brand:hover { color: var(--ink); }

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 8%, transparent), 0 8px 18px color-mix(in srgb, var(--ink) 8%, transparent);
}

.brand span {
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.11em;
  line-height: 1;
}

.site-header nav {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: var(--ink); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 64px) 0 clamp(56px, 8vw, 108px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.9fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  min-height: min(calc(100svh - 160px), 760px);
}

.hero-copy { position: relative; z-index: 1; max-width: 36rem; }

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(4.6rem, 11vw, 8rem);
  line-height: 0.88;
  letter-spacing: -0.038em;
  text-wrap: balance;
}

.lede {
  margin: 0 0 32px;
  max-width: 32rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.55;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: #fff;
  border-radius: 999px;
  padding: 15px 24px;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--teal) 28%, transparent);
}

.btn:hover {
  color: #fff;
  background: var(--teal-deep);
}

.btn--static { cursor: default; }

.quiet {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.quiet:hover { color: var(--ink); }

.hero-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 520px;
}

.hero-stage::before {
  content: "";
  position: absolute;
  width: 130%;
  height: 86%;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--teal) 16%, var(--cream-deep)) 0%, transparent 74%);
  filter: blur(8px);
  z-index: 0;
}

/* Phone */
.device { position: relative; z-index: 1; }

.phone {
  --bezel: 0;
  width: min(340px, 86vw);
  aspect-ratio: auto;
  position: relative;
  padding: 0;
  border-radius: 28px;
  background: transparent;
  box-shadow: none;
}

.device--sm .phone { width: min(320px, 86vw); border-radius: 24px; }

.glass {
  position: relative;
  height: auto;
  border-radius: 28px;
  overflow: hidden;
  background: var(--cream);
  box-shadow:
    0 1px 1px rgba(28, 27, 25, 0.18),
    0 18px 30px rgba(28, 27, 25, 0.12),
    0 50px 80px rgba(28, 27, 25, 0.14);
}

.device--sm .glass { border-radius: 24px; }

.glass img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

.hard-btn { display: none !important; }

.island {
  display: none;
}

.hard-btn {
  position: absolute;
  background: #2a2926;
  border-radius: 2px;
}

.hard-btn.silent {
  left: -3px;
  top: 92px;
  width: 3px;
  height: 22px;
}

.hard-btn.vol {
  left: -3px;
  top: 132px;
  width: 3px;
  height: 56px;
}

.hard-btn.power {
  right: -3px;
  top: 168px;
  width: 3px;
  height: 64px;
}

.device-hero { animation: drift 9s ease-in-out infinite; }

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -12px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .device-hero { animation: none; }
}

/* Proof strip */
.proof {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--cream-deep) 55%, var(--cream));
}

.proof-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 0;
  padding: 18px 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.proof-row span + span::before {
  content: "·";
  margin: 0 16px;
  color: color-mix(in srgb, var(--ink) 28%, transparent);
}

/* Features */
.features { padding: clamp(72px, 10vw, 120px) 0 40px; }

.features-intro {
  max-width: 38rem;
  margin: 0 0 clamp(48px, 7vw, 88px);
}

.features-intro h2 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

/* Chapters */
.chapter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  padding: clamp(28px, 5vw, 48px) 0 clamp(56px, 8vw, 96px);
}

.chapter--flip .chapter-copy { order: 2; }

.idx {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.chapter h3,
.page h1,
.closer h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.chapter h3 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.08;
}

.chapter p {
  margin: 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.chapter-stage {
  display: flex;
  justify-content: center;
  position: relative;
}

.chapter-stage::before {
  content: "";
  position: absolute;
  inset: 8% 12%;
  background: radial-gradient(closest-side, var(--paper), transparent 78%);
}

/* Manifest */
.manifest {
  margin: 24px 0 0;
  border-top: 1px solid var(--line);
}

.manifest-row {
  display: grid;
  grid-template-columns: 3.2rem minmax(12rem, 18rem) minmax(0, 1fr);
  gap: 16px 28px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.manifest-row .idx { margin: 0; }

.manifest-row h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.manifest-row p {
  margin: 0;
  color: var(--muted);
  max-width: 36rem;
}

/* Closer */
.closer {
  margin-top: 72px;
  background: var(--ink);
  color: var(--cream);
}

.closer-inner {
  padding: clamp(72px, 10vw, 120px) 0 80px;
  max-width: 40rem;
}

.closer h2 {
  margin: 0 0 16px;
  font-size: clamp(3rem, 7vw, 5.2rem);
  line-height: 0.92;
}

.closer p {
  margin: 0 0 28px;
  color: color-mix(in srgb, var(--cream) 68%, var(--muted));
  font-size: 1.1rem;
}

.closer .btn {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.site-footer {
  background: var(--ink);
  color: color-mix(in srgb, var(--cream) 58%, var(--muted));
  border-top: 1px solid color-mix(in srgb, var(--cream) 10%, transparent);
  font-size: 0.86rem;
}

.site-footer .bar { min-height: 72px; }

.site-footer nav { display: flex; gap: 22px; }

.site-footer a {
  color: color-mix(in srgb, var(--cream) 70%, transparent);
  text-decoration: none;
}

.site-footer a:hover { color: var(--cream); }

/* Pages */
.page {
  padding: clamp(36px, 6vw, 72px) 0 100px;
  max-width: 44rem;
}

.page h1 {
  margin: 0 0 18px;
  font-size: clamp(2.6rem, 6vw, 4.1rem);
  line-height: 1.02;
}

.page > p,
.page li,
.page td {
  color: var(--muted);
}

.page h2 {
  margin: 40px 0 10px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.page p { margin: 0 0 14px; line-height: 1.65; }

.page ul { padding-left: 1.15em; margin: 0 0 16px; }
.page li { margin: 0 0 8px; line-height: 1.6; }

.page strong { color: var(--ink); font-weight: 600; }

.page code {
  font-size: 0.88em;
  background: var(--cream-deep);
  padding: 0.08em 0.35em;
  border-radius: 5px;
}

.page-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 24px;
  font-size: 0.92rem;
}

.page-table th,
.page-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--line);
}

.page-table th {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table-scroll { overflow-x: auto; }

.contact-block {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.contact-block:last-of-type { border-bottom: 1px solid var(--line); }

.contact-block .idx { margin-bottom: 8px; }

.contact-block h2 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.contact-block h2 a { text-decoration: none; }
.contact-block h2 a:hover { color: var(--teal); }

.page .closer,
.page + .closer { display: none; }

@media (max-width: 880px) {
  .hero-grid,
  .chapter {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 28px;
  }

  .chapter--flip .chapter-copy { order: 0; }

  .hero { padding-top: 12px; padding-bottom: 40px; }

  .hero-stage { min-height: 0; padding-top: 8px; }

  .hero h1 {
    font-size: clamp(2.6rem, 12vw, 4.2rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
  }

  .phone { width: min(340px, 86vw); }

  .manifest-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .manifest-row .idx { margin: 0; }
  .manifest-row h3 { max-width: none; }
  .manifest-row p { max-width: none; }
}

@media (max-width: 560px) {
  :root { --gutter: 18px; }

  .bar {
    min-height: 56px;
    gap: 10px;
  }

  .brand img { width: 32px; height: 32px; border-radius: 9px; }
  .brand span { letter-spacing: 0.08em; font-size: 0.76rem; }

  .site-header nav { gap: 12px; flex-shrink: 0; }
  .site-header nav a { font-size: 0.8rem; }

  .hero h1 {
    font-size: clamp(2.35rem, 11.5vw, 2.9rem);
    line-height: 1.04;
    margin-bottom: 16px;
  }

  .lede {
    font-size: 1.02rem;
    margin-bottom: 22px;
  }

  .phone,
  .device--sm .phone {
    width: min(340px, 86vw);
    border-radius: 24px;
  }

  .features { padding-top: 52px; }

  .features-intro h2 { font-size: clamp(1.85rem, 8vw, 2.4rem); }

  .chapter { padding: 20px 0 40px; gap: 20px; }
  .chapter h3 { font-size: clamp(1.7rem, 7vw, 2.1rem); }

  .manifest-row {
    padding: 20px 0;
  }

  .manifest-row .idx { font-size: 0.85rem; }
  .manifest-row h3 { font-size: 1.28rem; }

  .closer h2 { font-size: clamp(2.2rem, 12vw, 3rem); line-height: 1.02; }
  .closer-inner { padding: 56px 0 64px; }

  .page h1 { font-size: clamp(2rem, 10vw, 2.6rem); }

  .proof-row {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    gap: 8px 0;
  }
  .proof-row span + span::before { margin: 0 10px; }
}
