/* Donematic site. One stylesheet, no framework, no build, no JavaScript.

   Colours come from the app's own tokens (DonematicCore/DesignTokens.swift,
   locked 19 Nov 2026): Warm clay accent, warm cream surfaces, warm dark surfaces.
   Never Notematic ink blue. Every colour pair below is checked for WCAG AA
   contrast against the surface it sits on.

   Type: the system font stack only. No web font, no download, no layout shift. */

:root {
  color-scheme: light dark;

  /* Surfaces (app tokens: backgroundTop / backgroundBottom / surface) */
  --bg-top: #FBF7F3;
  --bg-bottom: #F5EFEA;
  --surface: #FFFFFF;
  --surface-2: #F7F1EB;

  /* Text (app tokens: text / text2 / text3) */
  --text: #1A1D22;      /* 16.1:1 on --surface */
  --text-2: #5B5550;    /*  6.4:1 on --surface */
  --text-3: #6E675F;    /*  5.6:1 on --surface, 4.9:1 on --bg-bottom */

  /* Accent (app tokens: accent / accentText / accentSoft) */
  --accent: #A87862;        /* Warm clay: decoration, icons, large type only */
  --accent-text: #8C5F4B;   /*  5.6:1 on --surface: links and small text */
  --accent-soft: #F6EDE6;

  --line: #E7DED4;
  --line-strong: #D8CBBE;

  --shadow-sm: 0 1px 2px rgba(60, 40, 25, .06);
  --shadow-md: 0 2px 4px rgba(60, 40, 25, .05), 0 14px 34px rgba(60, 40, 25, .09);
  --shadow-lg: 0 2px 6px rgba(60, 40, 25, .06), 0 26px 60px rgba(60, 40, 25, .13);

  --serif: "New York", ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step-0: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  --step-1: clamp(1.25rem, 1.14rem + .55vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.28rem + 1.1vw, 2.125rem);
  --step-3: clamp(1.875rem, 1.45rem + 2.1vw, 3.25rem);
  --step-4: clamp(2.25rem, 1.6rem + 3.2vw, 4.25rem);

  --measure: 34rem;
  --page: 68rem;
  --radius: 14px;
  --radius-lg: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-top: #1A1614;
    --bg-bottom: #1A1614;
    --surface: #24201D;
    --surface-2: #2B2622;
    --text: #F3EEEA;      /* 13.4:1 on --surface */
    --text-2: #B8AFA8;    /*  7.2:1 on --surface */
    --text-3: #A79E96;    /*  5.4:1 on --surface */
    --accent: #C99A82;
    --accent-text: #E0B39A;  /*  7.3:1 on --surface */
    --accent-soft: #332924;
    --line: #3A322D;
    --line-strong: #4C423B;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, .45), 0 16px 38px rgba(0, 0, 0, .5);
    --shadow-lg: 0 2px 8px rgba(0, 0, 0, .5), 0 30px 70px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background-color: var(--bg-bottom);
  background-image: linear-gradient(var(--bg-top), var(--bg-bottom));
  font: var(--step-0)/1.6 var(--sans);
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-text); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection { background: var(--accent-soft); color: var(--text); }

.skip {
  position: absolute; left: -9999px; top: 0;
  z-index: 10;
  background: var(--surface); color: var(--text);
  padding: .7rem 1rem; border-radius: 0 0 var(--radius) 0;
  box-shadow: var(--shadow-md);
}
.skip:focus { left: 0; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }

/* ---------------- Header ---------------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem 1.5rem; flex-wrap: wrap;
  padding: clamp(1rem, 2.5vw, 1.5rem) 0;
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--text); font-weight: 700; font-size: var(--step-1);
  letter-spacing: -.015em; text-decoration: none;
}
.brand .mark { width: 1.5rem; height: 1.5rem; color: var(--accent); flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: .35rem 1.4rem; }
.nav a {
  color: var(--text-2); text-decoration: none;
  font-size: var(--step-0); font-weight: 500;
  padding: .35rem .1rem; border-radius: 6px;
}
.nav a:hover { color: var(--text); text-decoration: underline; }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

/* ---------------- Layout ---------------- */
main { display: block; }
section { padding: clamp(2.75rem, 6vw, 5rem) 0; }
section + section { padding-top: 0; }

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--text-2);
  max-width: 38rem;
  text-wrap: pretty;
}
h1 {
  font-size: var(--step-4);
  line-height: 1.04;
  letter-spacing: -.025em;
  font-weight: 700;
  margin: 0 0 .75rem;
  max-width: 18ch;
  text-wrap: balance;
}
h2 {
  font-size: var(--step-2);
  line-height: 1.15;
  letter-spacing: -.015em;
  font-weight: 700;
  margin: 0 0 .6rem;
  text-wrap: balance;
}
h3 {
  font-size: var(--step-1);
  line-height: 1.25;
  letter-spacing: -.01em;
  font-weight: 650;
  margin: 0 0 .35rem;
}
p { margin: .6rem 0; }
p, li { text-wrap: pretty; }
.measure { max-width: var(--measure); }
.center { margin-inline: auto; }
.center-text { text-align: center; }

.updated { color: var(--text-3); font-size: .9375rem; margin: 0 0 1.5rem; }

/* ---------------- Hero ---------------- */
.hero { padding-top: clamp(2rem, 5vw, 4rem); }
.hero-grid {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
}
.hero-copy .lede { font-size: var(--step-1); }
.hero-note {
  margin: 1.5rem 0 0; color: var(--text-3); font-size: .9375rem;
}

/* Device frame: a real app screenshot on a soft clay bezel. */
.device {
  position: relative;
  width: min(17.5rem, 78vw);
  margin-inline: auto;
  padding: .6rem;
  background: linear-gradient(160deg, var(--accent-soft), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: 2.6rem;
  box-shadow: var(--shadow-lg);
}
.device img {
  width: 100%;
  border-radius: 2.1rem;
  background: var(--surface);
}
.device-caption {
  margin: 1rem 0 0; text-align: center;
  color: var(--text-3); font-size: .875rem;
}

/* ---------------- Facts ---------------- */
.facts {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (min-width: 46rem) { .facts { grid-template-columns: repeat(3, 1fr); } }
.facts li { background: var(--surface); padding: clamp(1.25rem, 3vw, 1.75rem); }
.facts h2 { font-size: var(--step-1); margin: 0 0 .4rem; }
.facts p { color: var(--text-2); margin: 0; font-size: .9375rem; }
.fact-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .7rem; }
.fact-head svg { width: 1.5rem; height: 1.5rem; color: var(--accent); flex: none; }

/* ---------------- Pro ---------------- */
.split {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center;
}
@media (min-width: 58rem) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.feature-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.1rem; }
.feature-list li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .85rem; align-items: start; }
.feature-list svg { width: 1.6rem; height: 1.6rem; color: var(--accent); margin-top: .15rem; }
.feature-list b { display: block; font-weight: 650; }
.feature-list span { color: var(--text-2); font-size: .9375rem; }

.plans {
  display: grid; gap: 1rem; margin: 2rem 0 0;
}
@media (min-width: 34rem) { .plans { grid-template-columns: repeat(2, 1fr); } }
.plan {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.4rem 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.plan.featured { border-color: var(--accent); box-shadow: var(--shadow-md); }
.plan-name { font-weight: 700; font-size: var(--step-1); letter-spacing: -.01em; }
.plan-price { font-size: var(--step-3); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: .35rem 0 0; }
.plan-price small { display: block; font-size: var(--step-0); font-weight: 500; color: var(--text-2); letter-spacing: 0; margin-top: .1rem; }
.plan-note { color: var(--text-2); font-size: .9375rem; margin: .5rem 0 0; }
.plan-terms { color: var(--text-3); font-size: .8125rem; margin: .9rem 0 0; }

/* ---------------- Trust strip ---------------- */
.trust {
  display: flex; flex-wrap: wrap; gap: .6rem 1.6rem;
  align-items: center; justify-content: center;
  color: var(--text-2); font-size: .9375rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: var(--shadow-sm);
}
.trust span { display: inline-flex; align-items: center; gap: .45rem; }
.trust svg { width: 1rem; height: 1rem; color: var(--accent); flex: none; }

/* ---------------- Coming soon ---------------- */
.coming {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: var(--shadow-sm);
}
.coming h2 { margin-bottom: .4rem; }
.coming p { color: var(--text-2); max-width: 32rem; margin-inline: auto; }
.coming .soon {
  display: inline-block; margin-top: 1.25rem;
  font-size: .875rem; font-weight: 700; letter-spacing: .02em;
  color: var(--accent-text); background: var(--accent-soft);
  border-radius: 999px; padding: .5rem 1.1rem;
}

/* ---------------- Prose pages ---------------- */
.prose { max-width: var(--measure); margin-inline: auto; }
.prose h1 { max-width: 22ch; }
.prose h2 { margin-top: 2.5rem; font-size: var(--step-1); }
.prose h3 { margin-top: 1.75rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .45rem 0; }
.prose li strong { font-weight: 650; }
.prose a { color: var(--accent-text); }
.prose code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: .9em; background: var(--surface-2);
  padding: .1em .35em; border-radius: 5px;
}
.prose .lede { font-size: var(--step-1); color: var(--text); }
.prose .updated { color: var(--text-3); }
.back {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .9375rem; font-weight: 600; text-decoration: none;
  color: var(--text-2); margin-bottom: 1.75rem;
}
.back:hover { color: var(--text); text-decoration: underline; }
.back svg { width: 1rem; height: 1rem; }

/* ---------------- Footer ---------------- */
.foot {
  margin-top: clamp(3rem, 8vw, 6rem);
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.foot .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem 1.5rem; flex-wrap: wrap;
  padding-block: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--text-3); font-size: .9375rem;
}
.foot .nav a { color: var(--text-2); }
.foot .nav a:hover { color: var(--text); }

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