/* Lumé — shared styles.
   Palette and type are lifted from the app itself (ColorExtension.swift,
   Font+Lume.swift) so the site and the product read as one thing.

   Fonts are self-hosted, converted from the very files the app bundles. A site
   that promises "nothing leaves your device" should not hand every visitor's IP
   to a font CDN on load. */

@font-face {
  font-family: 'Source Serif 4'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('/assets/fonts/source-serif-4-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4'; font-style: italic; font-weight: 400;
  font-display: swap; src: url('/assets/fonts/source-serif-4-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 300;
  font-display: swap; src: url('/assets/fonts/manrope-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 500;
  font-display: swap; src: url('/assets/fonts/manrope-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 600;
  font-display: swap; src: url('/assets/fonts/manrope-600.woff2') format('woff2');
}

:root {
  --ink: #1A130D;
  --char: #241B12;
  --gold: #D39758;
  --gold-dim: #8C6033;
  --paper: #FBF6EF;
  --paper-dim: #A89A82;
  --paper-mute: #6B5E4E;
  --sand: #E5C9A6;
  /* 0.13 was the app's value, but a 0.5px border at that alpha rounds away to
     almost nothing on non-retina displays. */
  --hair: rgba(251, 246, 239, 0.19);

  --serif: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --measure: 62ch;
  --gutter: clamp(20px, 5vw, 40px);
}

*, *::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: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Film grain — the app is about grain; the page may as well have some.
   Fixed, non-interactive, very low opacity. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .035;
  background-image: 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='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { max-width: 940px; margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: var(--measure); }

/* ── Masthead ─────────────────────────────────────────────── */

.masthead {
  display: flex;
  align-items: center;
  flex-wrap: wrap;          /* without this the nav pushes the body wide at 320px */
  gap: 10px 16px;
  padding: 28px 0 24px;
  border-bottom: 0.5px solid var(--hair);
}
.wordmark {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 3.4px;
  color: var(--paper);
  text-decoration: none;
}
.wordmark .dot { color: var(--gold); }
.masthead nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.masthead nav a {
  font-size: 11px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--paper-dim); text-decoration: none;
}
.masthead nav a:hover, .masthead nav a:focus-visible { color: var(--gold); }

/* ── Type ─────────────────────────────────────────────────── */

/* --gold, not --gold-dim: at 11px this is normal-size text and needs 4.5:1.
   gold-dim on ink is 3.36:1; gold is 7.30:1. */
.stamp {
  font-size: 11px; font-weight: 600; letter-spacing: 2.2px;
  text-transform: uppercase; color: var(--gold);
}
h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 8.5vw, 76px);
  line-height: 1.04; letter-spacing: -0.015em;
  margin: 18px 0 0; text-wrap: balance;
}
h1 em { font-style: italic; color: var(--gold); }
h2 {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(26px, 4vw, 34px); line-height: 1.2;
  margin: 0 0 14px; text-wrap: balance;
}
h3 { font-family: var(--serif); font-weight: 400; font-size: 19px; margin: 0 0 6px; }
p { margin: 0 0 18px; }
.lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--paper-dim); line-height: 1.6; }
a { color: var(--gold); text-decoration-color: rgba(211, 151, 88, .4); text-underline-offset: 3px; }
a:hover { color: var(--sand); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
strong { font-weight: 500; color: var(--paper); }

/* ── Sections ─────────────────────────────────────────────── */

section { padding: clamp(56px, 10vw, 96px) 0; border-top: 0.5px solid var(--hair); }
section:first-of-type { border-top: none; }
.numeral {
  font-family: var(--serif); font-style: italic; font-size: 26px;
  color: var(--gold); display: block; margin-bottom: 10px;
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero { padding: clamp(48px, 9vw, 96px) 0 clamp(40px, 7vw, 72px); }
.hero-icon {
  width: 76px; height: 76px; border-radius: 17px; display: block;
  margin-bottom: 26px;
}
.hero .lede { margin-top: 22px; max-width: 46ch; }
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 26px; padding: 11px 18px;
  border: 0.5px solid var(--gold); border-radius: 2px;
  font-size: 11px; font-weight: 600; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--gold);
}

/* ── Film strip ───────────────────────────────────────────── */

.strip {
  margin-top: clamp(40px, 6vw, 64px);
  background: var(--char);
  border-top: 0.5px solid var(--hair);
  border-bottom: 0.5px solid var(--hair);
  padding: 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
/* Perforation drawn across the FULL scroll width — a fixed row of spans only
   reached as far as its own content and stopped a fifth of the way along. */
.strip-inner {
  display: flex; gap: 8px; padding: 14px var(--gutter) 0; width: max-content;
  background-image: repeating-linear-gradient(
    to right, var(--ink) 0 14px, transparent 14px 24px);
  background-size: 100% 9px;
  background-repeat: repeat-x;
}
.frame {
  min-width: 104px; flex: none;   /* min- so names still fit at forced text sizes */
  border: 0.5px solid var(--hair);
  padding: 8px 8px 10px;
  background: var(--ink);
}
.frame .swatch { height: 62px; border-radius: 1px; }
.frame .name {
  display: block; margin-top: 8px;
  font-size: 10px; font-weight: 600; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--paper-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* ── Feature grid ─────────────────────────────────────────── */

.cols {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 34px;
}
.cols p { font-size: 15px; color: var(--paper-dim); margin: 0; }

/* ── Phone rendering ──────────────────────────────────────── */

.showcase {
  display: grid; gap: clamp(32px, 6vw, 60px);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (min-width: 760px) {
  .showcase { grid-template-columns: minmax(0, 1fr) 300px; }
}
.phone {
  width: 300px; max-width: 100%; margin: 0 auto;
  background: var(--ink);
  border: 1px solid rgba(251, 246, 239, .16);
  border-radius: 34px;
  padding: 10px;
}
.phone-screen { background: var(--ink); border-radius: 25px; overflow: hidden; }
.phone-photo { height: 132px; background: linear-gradient(128deg, #7FA8B8, #C4B091 46%, #6E7C4C); }
.panel { background: var(--char); padding: 14px 16px 18px; }
.panel-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px;
}
.panel-head .l { font-size: 10px; font-weight: 600; letter-spacing: 1.8px; color: var(--paper-dim); }
.panel-head .r { font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--gold); }
/* The phone is a rendering of real UI, so its text is real DOM text and has to
   be legible — --gold and --paper-dim clear AA on --char, the dim tokens didn't. */
.kicker-sm {
  font-size: 9px; font-weight: 600; letter-spacing: 1.6px;
  color: var(--gold); margin-bottom: 9px;
}
.slider { margin-bottom: 12px; }
.slider .row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; margin-bottom: 5px;
}
.slider .row .v { font-family: var(--serif); font-style: italic; color: var(--paper-dim); }
.slider .row .v.on { color: var(--gold); }
.track { position: relative; height: 3px; border-radius: 2px; background: #0F0A08; }
.track.warm { background: linear-gradient(90deg, #4E6E8C, #4A4036 50%, #C77B3A); }
.track.light { background: linear-gradient(90deg, #0F0A08, #8C8478); }
.thumb {
  position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper); transform: translate(-50%, -50%);
}

/* ── Privacy panel ────────────────────────────────────────── */

.plain {
  background: var(--char); border-radius: 4px;
  padding: clamp(26px, 4vw, 38px);
  border-left: 2px solid var(--gold);
}
.plain h2 { margin-top: 0; }
.plain p:last-child { margin-bottom: 0; }

/* ── Prose (privacy / support pages) ──────────────────────── */

.prose { padding: clamp(40px, 7vw, 64px) 0 clamp(56px, 9vw, 88px); }
.prose h2 {
  font-family: var(--sans); font-style: normal;
  font-size: 12px; font-weight: 600; letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--paper-dim);
  margin: 42px 0 12px; padding-bottom: 9px;
  border-bottom: 0.5px solid var(--hair);
}
/* h3 must read as subordinate to the h2 above it — it was rendering larger. */
.prose h3 { font-size: 17px; color: var(--paper); margin-top: 22px; }
.prose > .measure > p, .prose li { color: var(--paper); }
.prose ul { padding-left: 20px; margin: 0 0 18px; }
.prose li { margin-bottom: 9px; }
.updated { font-size: 13px; color: var(--paper-dim); margin-top: 6px; }
mark {
  background: var(--gold); color: var(--ink);
  padding: 1px 7px; border-radius: 2px;
  font-size: 13px; font-weight: 600; letter-spacing: .4px;
}

/* ── Footer ───────────────────────────────────────────────── */

footer {
  border-top: 0.5px solid var(--hair);
  padding: 34px 0 46px;
  display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: baseline;
  font-size: 13px; color: var(--paper-dim);
}
/* Carries the developer's legal name — paper-mute was 2.92:1 and failed AA. */
footer .colophon { font-family: var(--serif); font-style: italic; color: var(--paper-dim); }
footer nav { margin-left: auto; display: flex; gap: 20px; flex-wrap: wrap; }
footer nav a { color: var(--paper-dim); text-decoration: none; }
footer nav a:hover { color: var(--gold); }

/* ── Print ────────────────────────────────────────────────────
   A privacy policy gets printed and saved as PDF. Without this it
   comes out as near-white text on white paper. */
@media print {
  body { background: #fff; color: #111; }
  body::after { display: none; }
  .wordmark, h1, h2, h3, strong { color: #111; }
  h1 em { color: #6B4A22; }
  .stamp, .updated, .lede, p, li, footer, footer .colophon { color: #333; }
  .prose h2 { color: #111; border-bottom-color: #bbb; }
  .plain { background: #f4f1ea; border-left-color: #8C6033; }
  a { color: #6B4A22; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 11px; color: #555; }
  .masthead, footer { border-color: #ccc; }
  .masthead nav, .strip, .phone { display: none; }
  section { border-top-color: #ddd; page-break-inside: avoid; }
  mark { background: none; color: #111; border: 1px solid #999; }
}
