/* GLPosage brand system
   Type:  Schibsted Grotesk (voice), DM Mono (data, labels, spec)
   Ink:   near-black on bone, with pine as the brand and signal as the shout
   Grid:  8pt scale, 1200 container, generous vertical rhythm */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Schibsted+Grotesk:wght@400;500;600;700;800&display=swap');

:root {
  --bone: #FBFAF7;
  --bone-2: #F2F0EA;
  --ink: #101418;
  --ink-2: #4A5257;
  --rule: #DEDAD1;
  --pine: #16453B;
  --pine-2: #1E5A4C;
  --mist: #DCE8E2;
  --signal: #FF5A33;
  --signal-2: #FFE7DF;
  --white: #FFFFFF;

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 48px; --s6: 64px; --s7: 96px; --s8: 128px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.measure { max-width: 62ch; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.032em; line-height: 1.02; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; line-height: 1.0; }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.15; }
h4 { font-size: 1.02rem; letter-spacing: -0.01em; }
p { margin: 0 0 var(--s2); }
.lede { font-size: clamp(1.08rem, 1.5vw, 1.28rem); color: var(--ink-2); line-height: 1.5; }

.mono {
  font-family: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.mono-tag { color: var(--pine); display: inline-block; margin-bottom: var(--s2); }

a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px;
}

/* Header */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bone) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.head-in { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 800; letter-spacing: -0.03em; font-size: 1.06rem; }
.logo svg { width: 22px; height: 22px; display: block; }
.head-nav { display: flex; align-items: center; gap: var(--s4); }
.head-nav a { text-decoration: none; font-size: 0.95rem; color: var(--ink-2); font-weight: 500; }
.head-nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .head-nav .hide-sm { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; text-decoration: none;
  font: inherit; font-weight: 600; font-size: 0.98rem;
  padding: 13px 22px; border-radius: 4px;
  background: var(--ink); color: var(--bone);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--pine); }
.btn--signal { background: var(--signal); color: #fff; }
.btn--signal:hover { background: #E64A24; }
.btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule); }
.btn--line:hover { background: var(--white); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--sm { padding: 9px 16px; font-size: 0.9rem; }

/* Sections */
section { padding: var(--s7) 0; }
/* Anchors must clear the sticky header, or a jump link hides the heading. */
[id] { scroll-margin-top: 84px; }
.band { border-top: 1px solid var(--rule); }

/* Hero */
.hero { padding: var(--s6) 0 var(--s5); }
.hero-grid { display: grid; grid-template-columns: 1.06fr 0.94fr; gap: var(--s6); align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: var(--s5); } }
.hero h1 em { font-style: normal; color: var(--pine); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: var(--s4); }

.spec {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule); margin-top: var(--s5);
}
.spec div { padding: var(--s3) var(--s3) 0 0; }
.spec div + div { border-left: 1px solid var(--rule); padding-left: var(--s3); }
.spec dt { color: var(--ink-2); }
.spec dd { margin: 6px 0 0; font-weight: 600; font-size: 1.02rem; letter-spacing: -0.015em; }
@media (max-width: 620px) {
  .spec { grid-template-columns: 1fr; }
  .spec div + div { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; }
}

/* Device */
.device { width: 316px; max-width: 100%; margin-inline: auto; }
.device-shell {
  background: var(--ink); border-radius: 40px; padding: 10px;
  box-shadow: 0 40px 70px -40px rgba(16,20,24,.5), 0 2px 0 0 rgba(255,255,255,.04) inset;
}
.device-screen {
  background: var(--bone); border-radius: 31px; padding: 16px 14px 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.scr-head { display: flex; justify-content: space-between; align-items: center; color: var(--ink-2); }
.dose-card { background: var(--mist); border-radius: 14px; padding: 15px; display: flex; gap: 10px; align-items: center; justify-content: space-between; transition: background .35s ease; }
.dose-card[data-state="due"] { background: #D7EBDD; }
.dose-card[data-state="soon"] { background: #FBEBD8; }
.dose-k { color: var(--pine); }
.dose-v { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.035em; margin-top: 3px; line-height: 1.05; }
.dose-s { font-size: .8rem; color: var(--ink-2); margin-top: 4px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: var(--white); border: 1px solid var(--rule); border-radius: 999px; padding: 6px 11px; font-size: .76rem; }
.chip b { font-weight: 600; }
.scr-btn { width: 100%; border-radius: 10px; }
.scr-toast {
  background: var(--signal-2); color: #8C2E12; border-radius: 10px; font-size: .8rem; font-weight: 600;
  max-height: 0; padding: 0 12px; overflow: hidden; opacity: 0;
  transition: max-height .28s ease, padding .28s ease, opacity .22s ease;
}
.scr-toast.on { max-height: 54px; padding: 9px 12px; opacity: 1; }
.scr-streak { background: var(--white); border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 9px; font-size: .84rem; }
.scr-streak b { font-size: 1.02rem; font-weight: 700; letter-spacing: -0.02em; }
.mark { transition: transform .42s cubic-bezier(.2,1.5,.4,1); }
.mark.hop { transform: translateY(-11px) rotate(-5deg); }
.caption { color: var(--ink-2); font-size: .84rem; text-align: center; margin-top: var(--s2); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.step { background: var(--bone); padding: var(--s4); }
.step .num { color: var(--signal); }
.step h3 { margin: var(--s2) 0 8px; }
.step p { color: var(--ink-2); margin: 0; font-size: .98rem; }
.step svg { margin-top: var(--s3); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Alternating features */
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); align-items: center; }
.feat + .feat { margin-top: var(--s7); }
.feat.flip > *:first-child { order: 2; }
@media (max-width: 900px) {
  .feat { grid-template-columns: 1fr; gap: var(--s4); }
  .feat.flip > *:first-child { order: 0; }
}
.panel { background: var(--white); border: 1px solid var(--rule); padding: var(--s4); }

/* Controls */
.seg { display: inline-flex; border: 1px solid var(--rule); background: var(--white); padding: 3px; gap: 3px; }
.seg button {
  border: 0; background: transparent; font: inherit; font-size: .9rem; font-weight: 600;
  padding: 8px 15px; cursor: pointer; color: var(--ink-2); border-radius: 2px;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bone); }
.readout { font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.045em; margin: var(--s3) 0 6px; font-variant-numeric: tabular-nums; }

/* Chart */
.plot { display: flex; align-items: flex-end; gap: 8px; height: 200px; margin-top: var(--s3); border-bottom: 1px solid var(--rule); }
.col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; height: 100%; }
.col .v { font-size: .76rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.col .b { width: 100%; background: var(--pine); min-height: 3px; transition: height .55s cubic-bezier(.2,.85,.25,1), background .2s ease; cursor: pointer; }
.col .b:hover { background: var(--pine-2); }
.col .b.peak { background: var(--signal); }
.axis { display: flex; gap: 8px; margin-top: 8px; }
.axis span { flex: 1; text-align: center; color: var(--ink-2); }

/* Dark band */
.dark { background: var(--pine); color: var(--bone); }
.dark h2 { color: #fff; }
.dark .lede { color: #B9CEC6; }
.dark .mono-tag { color: #8FC0B2; }
.claims { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.16); margin-top: var(--s5); }
.claim { background: var(--pine); padding: var(--s3); }
.claim h4 { color: #fff; }
.claim p { color: #B9CEC6; font-size: .92rem; margin: 6px 0 0; }
@media (max-width: 860px) { .claims { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .claims { grid-template-columns: 1fr; } }

/* CTA */
.cta { background: var(--ink); color: var(--bone); text-align: center; padding: var(--s7) 0; }
.cta h2 { color: #fff; margin-bottom: var(--s3); }
.cta p { color: #98A1A7; }

/* Note */
.note { border-left: 3px solid var(--signal); padding-left: var(--s3); color: var(--ink-2); font-size: .96rem; }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); padding: var(--s5) 0 var(--s6); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s5); }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr; gap: var(--s4); } }
.foot-grid h4 { margin-bottom: 10px; }
.foot-grid a { display: block; text-decoration: none; color: var(--ink-2); font-size: .95rem; padding: 3px 0; }
.foot-grid a:hover { color: var(--ink); }
.foot-legal { color: var(--ink-2); font-size: .86rem; margin-top: var(--s5); }

/* Reveal */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Doc pages */
.doc { padding: var(--s6) 0 var(--s7); }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 10px; }
.doc h2 { font-size: 1.5rem; margin-top: var(--s5); margin-bottom: 10px; }
.doc h3 { font-size: 1.1rem; margin-top: var(--s3); margin-bottom: 6px; }
.doc ul { padding-left: 1.15em; }
.doc li { margin-bottom: 8px; }
.updated { color: var(--ink-2); font-size: .9rem; }
.callout { background: var(--white); border: 1px solid var(--rule); padding: var(--s3); margin: var(--s3) 0; }
.wrapx { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; min-width: 460px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { color: var(--ink-2); font-family: "DM Mono", monospace; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 400; }
