/* ToothPal — Light Ocean.
   Tokens mirror apps/mobile/src/theme/tokens.ts so the site and the app stay one
   brand. Change a hex here only if it changed there too. */

:root {
  --bone: #eff6fa;
  --paper: #fafcfe;
  --paper-soft: #eaf3f9;
  --mist: #d4e4ef;
  --clay-soft: #dff0f8;
  --forest: #1b4a62;
  --sage-deep: #2d7a9e;
  --sage: #4a9ec4;
  --clay: #6bb8d6;
  --ink: #152830;
  --stone: #6a8a9b;
  --gold: #e0aa3f;
  --gold-soft: #ffd27a;
  --gold-ink: #3a2a06;
  --success: #2e9e5e;

  /* the five scan dimensions */
  --dim-bright: #ffd27a;
  --dim-gums: #7be08f;
  --dim-clean: #a8d8ea;
  --dim-tongue: #f0a795;
  --dim-fresh: #c9a6e0;

  --bg: var(--bone);
  --surface: var(--paper);
  --tint: var(--clay-soft);
  --border: var(--mist);
  --accent: var(--sage-deep);
  --accent-strong: var(--forest);

  --measure: 68ch;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 1px 2px rgba(21, 40, 48, .04), 0 12px 32px -14px rgba(27, 74, 98, .18);
  --shadow-lg: 0 2px 4px rgba(21, 40, 48, .05), 0 32px 64px -26px rgba(27, 74, 98, .28);

  --display: 'Tenor Sans', ui-serif, Georgia, serif;
  --serif: 'Fraunces', ui-serif, Georgia, serif;
  --body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Light Ocean is a deliberately bright, spa-like system. In dark mode we keep
   the sage/clay relationships and only sink the surfaces, so the brand survives
   instead of collapsing into generic grey. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1c24;
    --surface: #12262f;
    --tint: #163040;
    --border: #23414f;
    --ink: #e8f2f7;
    --forest: #cfe6f1;
    --stone: #93b0bf;
    --accent: #6bb8d6;
    --accent-strong: #a8d8ea;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 32px -14px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .35), 0 32px 64px -26px rgba(0, 0, 0, .7);
  }
}

*, *::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(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.2; letter-spacing: -.005em; color: var(--forest); margin: 0; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.1vw, 2.05rem); }
h3 { font-size: 1.14rem; }
p { margin: 0 0 1.1em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
strong { font-weight: 600; color: var(--ink); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .89em; background: var(--tint); padding: .1em .38em; border-radius: 5px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 3rem 0; }

.wrap { width: min(100% - 2.5rem, 1080px); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--forest); color: var(--paper); padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 500;
}
.skip:focus { left: 0; }

.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-head .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--display); font-size: 1.18rem; letter-spacing: .01em; color: var(--forest); text-decoration: none; }
.brand:hover { color: var(--forest); }
.brand .mark {
  width: 28px; height: 28px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(140deg, var(--clay), var(--sage-deep) 70%);
  box-shadow: inset 0 -2px 6px rgba(27, 74, 98, .35);
}
.site-nav { margin-left: auto; display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-nav a { color: var(--stone); text-decoration: none; font-size: .93rem; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }

.hero { position: relative; overflow: hidden; padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 130%;
  background:
    radial-gradient(46% 40% at 16% 18%, color-mix(in srgb, var(--clay) 30%, transparent), transparent 70%),
    radial-gradient(42% 38% at 86% 14%, color-mix(in srgb, var(--dim-fresh) 26%, transparent), transparent 70%),
    radial-gradient(50% 42% at 64% 90%, color-mix(in srgb, var(--dim-gums) 20%, transparent), transparent 72%);
  pointer-events: none;
}
.hero > * { position: relative; }
.kicker { font-family: var(--body); text-transform: uppercase; letter-spacing: .14em; font-size: .79rem; font-weight: 600; color: var(--sage-deep); margin: 0 0 .9rem; }
.hero p.lede { font-size: clamp(1.06rem, 2.1vw, 1.26rem); color: var(--stone); max-width: 47ch; margin-top: 1.3rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .82rem 1.5rem; border-radius: 999px;
  font-size: .95rem; font-weight: 500; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-primary { background: var(--forest); color: var(--paper); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--sage-deep); color: var(--paper); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { color: var(--ink); border-color: var(--clay); transform: translateY(-1px); }

.grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--stone); font-size: .96rem; margin: 0; }
.card .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; margin-bottom: .95rem; font-size: 1.02rem; }
.dot--bright { background: var(--dim-bright); }
.dot--gums   { background: var(--dim-gums); }
.dot--clean  { background: var(--dim-clean); }
.dot--tongue { background: var(--dim-tongue); }
.dot--fresh  { background: var(--dim-fresh); }
.dot--sage   { background: var(--clay-soft); }

section.band { padding: clamp(3rem, 7vw, 5rem) 0; }
section.band.tint { background: var(--tint); border-block: 1px solid var(--border); }
.section-head { max-width: 52ch; margin-bottom: 2.2rem; }
.section-head p { color: var(--stone); margin-bottom: 0; }

.doc { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 7vw, 5rem); }
.doc-head { border-bottom: 1px solid var(--border); padding-bottom: 1.6rem; margin-bottom: 2.4rem; }
.doc-head .meta { color: var(--stone); font-size: .9rem; margin: .9rem 0 0; }
.doc article { max-width: var(--measure); }
.doc article h2 { margin: 2.6rem 0 .8rem; font-size: 1.4rem; }
.doc article h2:first-child { margin-top: 0; }
.doc article h3 { margin: 1.8rem 0 .5rem; font-size: 1.02rem; font-family: var(--body); font-weight: 600; color: var(--ink); }
.doc article ul, .doc article ol { padding-left: 1.3rem; margin: 0 0 1.1em; }
.doc article li { margin-bottom: .45em; }
.doc article li::marker { color: var(--sage); }

.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.5rem; margin-bottom: 2.6rem; }
.toc p { font-weight: 600; margin: 0 0 .6rem; font-size: .92rem; }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.toc li { margin-bottom: .3em; font-size: .92rem; }
@media (max-width: 560px) { .toc ol { columns: 1; } }

.note { border-left: 3px solid var(--sage); background: var(--tint); padding: 1rem 1.2rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.6rem 0; }
.note p:last-child { margin-bottom: 0; }
.note.warn { border-left-color: #d4663a; }

/* A placeholder the operator still has to fill. Deliberately loud — an
   unreplaced token must be impossible to miss in review, not blend in. */
.todo {
  background: var(--gold-soft); color: var(--gold-ink); font-weight: 600;
  padding: .06em .42em; border-radius: 4px; font-size: .92em;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

.table-scroll { overflow-x: auto; margin: 1.4rem 0 1.8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; background: var(--surface); }
th, td { text-align: left; padding: .72rem .95rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; background: var(--tint); white-space: nowrap; color: var(--forest); }
tbody tr:last-child td { border-bottom: 0; }

dl.faq dt { font-weight: 600; margin-top: 1.6rem; }
dl.faq dd { margin: .4rem 0 0; color: var(--stone); }

.site-foot { border-top: 1px solid var(--border); padding: 2.6rem 0 3rem; margin-top: 2rem; background: var(--surface); }
.foot-grid { display: flex; flex-wrap: wrap; gap: 1.4rem 2.5rem; align-items: baseline; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-left: auto; }
.foot-links a { color: var(--stone); text-decoration: none; font-size: .92rem; }
.foot-links a:hover { color: var(--accent); }
.site-foot small { display: block; color: var(--stone); margin-top: 1.6rem; font-size: .86rem; }

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

/* Long-form copy inside a full-width band: keep the left edge aligned with the
   rest of the page, cap the line length rather than centring the block. */
.prose { max-width: var(--measure); }

/* The product is the hero; the company signs its name underneath. */
.powered {
  margin: 1.6rem 0 0;
  font-size: .86rem;
  color: var(--muted, var(--stone));
  letter-spacing: .01em;
}
.powered strong { font-weight: 600; color: var(--ink); }

/* ---- analytics consent ----
   Shown only when an Amplitude key is configured and no choice is stored yet.
   Nothing loads, and no identifier is created, until "That's fine" is clicked. */
.tp-consent {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 60;
  width: min(560px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.5;
}
.tp-consent p { margin: 0; flex: 1 1 260px; min-width: 0; color: var(--stone); }
.tp-consent a { color: var(--accent); }
.tp-consent-btns { display: flex; gap: 8px; flex: 0 0 auto; }
.tp-consent button {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.tp-consent button.primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.tp-consent button:hover { border-color: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tp-consent button.primary { color: #0c1c24; }
}
@media (max-width: 440px) {
  .tp-consent { gap: 10px; }
  .tp-consent-btns { width: 100%; }
  .tp-consent button { flex: 1; }
}
