/* Elevate Thrive editorial type + motion tokens (shared by index, heuristic sheet, evaluator).
   Fonts are open-licence (SIL OFL), self-hosted latin + latin-ext subsets in /fonts.
   Switch themes with html[data-type="current|a|b|c"] (see type-switcher.js). */

@import url("fonts/_downloaded-faces.css");

@font-face{font-family:"Instrument Serif";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/instrument-serif-400.woff2) format("woff2")}
@font-face{font-family:"Instrument Serif";font-style:italic;font-weight:400;font-display:swap;src:url(fonts/instrument-serif-400-italic.woff2) format("woff2")}
@font-face{font-family:"Inter Tight";font-style:normal;font-weight:400 700;font-display:swap;src:url(fonts/inter-tight-var.woff2) format("woff2")}
@font-face{font-family:"Syncopate";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/syncopate-700.woff2) format("woff2")}

/* ---------- theme tokens ---------- */
/* Current (harder to read): display serif with modest x-height, condensed Inter Tight, Syncopate wide caps. */
:root,html[data-type="current"]{
  --f-serif:"Instrument Serif","Iowan Old Style","Times New Roman",Georgia,serif;
  --f-sans:"Inter Tight",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --f-wide:"Syncopate","Arial Black",system-ui,sans-serif;
  --c-ink:#101633;--c-paper:#F6F4EE;--c-blue:#0022cb;--c-muted:#5A6080;--c-mist:#DDE3FF;--c-sun:#eed200;
  --hair:#1016332b;--hair-dark:#dde3ff38;
  --ease-std:cubic-bezier(.7,.6,0,1);--ease-menu:cubic-bezier(.4,.3,0,.99);--ease-card:cubic-bezier(.18,.13,0,.99);
  --ease-out-4:cubic-bezier(.22,1,.36,1);--ease-out-2:cubic-bezier(.33,1,.68,1);
  --dur-line:.8s;--stagger-line:90ms;--dur-image:1.2s;
  --type-body:1.0625rem;--type-leading:1.6;
}

/* A (recommended): Space Grotesk (portfolio brand) + Inter.
   High x-height, open apertures, excellent at UI and paragraph sizes; Inter is not condensed. */
html[data-type="a"]{
  --f-serif:"Space Grotesk",system-ui,-apple-system,"Segoe UI",sans-serif;
  --f-sans:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --f-wide:"Space Grotesk",system-ui,sans-serif;
  --c-muted:#4A5168;
}

/* B: Source Serif 4 + Inter.
   Keeps an editorial serif, but Source Serif 4 is a screen text face (optical sizes, sturdier serifs)
   rather than a display italic. Inter for body and labels. */
html[data-type="b"]{
  --f-serif:"Source Serif 4","Iowan Old Style","Times New Roman",Georgia,serif;
  --f-sans:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --f-wide:"Inter",system-ui,sans-serif;
  --c-muted:#4A5168;
}

/* C: Manrope + Atkinson Hyperlegible.
   Manrope has a large x-height and even colour for headings. Atkinson was drawn for low-vision
   readers (distinct I/l/1, open counters) and stays clear at small sizes. */
html[data-type="c"]{
  --f-serif:"Manrope",system-ui,-apple-system,"Segoe UI",sans-serif;
  --f-sans:"Atkinson Hyperlegible",system-ui,-apple-system,"Segoe UI",sans-serif;
  --f-wide:"Manrope",system-ui,sans-serif;
  --c-muted:#4A5168;
}

html[data-type="a"] .editorial,
html[data-type="b"] .editorial,
html[data-type="c"] .editorial,
html[data-type="a"] .sheet,
html[data-type="b"] .sheet,
html[data-type="c"] .sheet{--muted:var(--c-muted)}

/* Body size / leading bump on every theme (was 16px / 1.55). */
html body.editorial,html body.sheet{font-size:var(--type-body);line-height:var(--type-leading)}

/* Sans display faces need a little more weight and air than a 400 display serif. */
html[data-type="a"] .editorial :where(h1,h2),
html[data-type="a"] .editorial .row-copy h3,
html[data-type="a"] .editorial .founder blockquote,
html[data-type="a"] .editorial .value-card .who strong,
html[data-type="a"] .editorial .impact-preview h3,
html[data-type="a"] .editorial .faq summary,
html[data-type="a"] .editorial .lead-form h3,
html[data-type="a"] .editorial .pull-quotes blockquote,
html[data-type="a"] .next-title,
html[data-type="a"] .sheet h1,
html[data-type="a"] .h-body h3,
html[data-type="a"] .editorial .dock-links a,
html[data-type="c"] .editorial :where(h1,h2),
html[data-type="c"] .editorial .row-copy h3,
html[data-type="c"] .editorial .founder blockquote,
html[data-type="c"] .editorial .value-card .who strong,
html[data-type="c"] .editorial .impact-preview h3,
html[data-type="c"] .editorial .faq summary,
html[data-type="c"] .editorial .lead-form h3,
html[data-type="c"] .editorial .pull-quotes blockquote,
html[data-type="c"] .next-title,
html[data-type="c"] .sheet h1,
html[data-type="c"] .h-body h3,
html[data-type="c"] .editorial .dock-links a{
  font-weight:500;letter-spacing:-.03em;line-height:1.06
}
html[data-type="a"] .editorial .hero h1,
html[data-type="c"] .editorial .hero h1{line-height:1.02}
html[data-type="a"] .editorial .tile .num,
html[data-type="a"] .editorial .plan-price,
html[data-type="a"] .editorial .impact-example strong,
html[data-type="a"] .editorial .pain li span,
html[data-type="a"] .row-num,
html[data-type="a"] .h-num,
html[data-type="c"] .editorial .tile .num,
html[data-type="c"] .editorial .plan-price,
html[data-type="c"] .editorial .impact-example strong,
html[data-type="c"] .editorial .pain li span,
html[data-type="c"] .row-num,
html[data-type="c"] .h-num{font-weight:500}

/* Space Grotesk and Manrope have no italic; keep the colour cue, drop fake italics. */
html[data-type="a"] .editorial .hero h1>span:not(.lw),
html[data-type="c"] .editorial .hero h1>span:not(.lw){font-style:normal;font-weight:500}

/* Labels: drop Syncopate-style wide caps on A/B/C. Use the theme's label face at a
   legible 13px with generous tracking. */
html:is([data-type="a"],[data-type="b"],[data-type="c"]) .label,
html:is([data-type="a"],[data-type="b"],[data-type="c"]) .editorial .eyebrow,
html:is([data-type="a"],[data-type="b"],[data-type="c"]) .editorial .stage-tag,
html:is([data-type="a"],[data-type="b"],[data-type="c"]) .editorial .proof-row ul li,
html:is([data-type="a"],[data-type="b"],[data-type="c"]) .editorial .plan-card h3,
html:is([data-type="a"],[data-type="b"],[data-type="c"]) .editorial .badge,
html:is([data-type="a"],[data-type="b"],[data-type="c"]) .editorial .metric-group h3,
html:is([data-type="a"],[data-type="b"],[data-type="c"]) .editorial .pull-quotes figcaption,
html:is([data-type="a"],[data-type="b"],[data-type="c"]) .chip,
html:is([data-type="a"],[data-type="b"],[data-type="c"]) .mock-bar span,
html:is([data-type="a"],[data-type="b"],[data-type="c"]) .mock-k,
html:is([data-type="a"],[data-type="b"],[data-type="c"]) .sheet main>.wrap>p strong:first-child{
  font-family:var(--f-wide);
  font-weight:650;
  font-size:.8125rem;
  letter-spacing:.1em;
  line-height:1.45;
  text-transform:uppercase
}

/* extended-caps label (current theme keeps Syncopate at .75rem) */
.label{font-family:var(--f-wide);font-weight:700;font-size:.75rem;line-height:1.5;letter-spacing:.08em;text-transform:uppercase}
.serif{font-family:var(--f-serif);font-weight:400}

/* ---------- one-word logo C lockup ---------- */
.brand{display:inline-flex;align-items:center;gap:0;text-decoration:none;color:inherit;min-height:44px}
.brand picture{display:block;line-height:0}
.brand .brand-logo,
.brand picture .brand-logo,
img.brand-logo{
  display:block;height:48px;width:auto;max-width:min(100%,260px)
}
#brand-logo{height:40px;width:auto;max-width:180px;object-fit:contain}
@media(max-width:640px){
  .brand .brand-logo,.brand picture .brand-logo,img.brand-logo{height:40px}
}
.site-footer .brand .brand-logo,
.site-footer .brand picture .brand-logo{height:52px}
@media(max-width:640px){
  .site-footer .brand .brand-logo,.site-footer .brand picture .brand-logo{height:44px}
}
footer .brand{flex:none}
footer .footer-row{align-items:center}

/* ---------- type switcher (preview only, bottom-left, clear of the dock) ---------- */
.type-switcher{
  position:fixed;
  left:max(12px,env(safe-area-inset-left,0px));
  bottom:calc(16px + env(safe-area-inset-bottom,0px));
  z-index:40;
  display:flex;flex-direction:column;gap:6px;
  padding:8px 8px 8px;
  width:max-content;max-width:calc(100vw - 24px);
  border-radius:14px;
  background:#fff;color:#101633;
  border:1px solid #10163324;
  box-shadow:0 10px 28px #10163324;
  font-family:"Inter",system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:11px;line-height:1.3;
}
.type-switcher-kicker{
  margin:0 2px;padding:0 4px;
  font-weight:650;letter-spacing:.08em;text-transform:uppercase;color:#4A5168
}
.type-switcher-row{display:flex;gap:4px}
.type-switcher button{
  appearance:none;margin:0;min-width:40px;min-height:36px;padding:4px 8px;
  border-radius:9px;border:1px solid #1016332b;background:#f6f4ee;color:#101633;
  font:650 12px/1.2 "Inter",system-ui,sans-serif;cursor:pointer
}
.type-switcher button:hover{background:#fff}
.type-switcher button[aria-pressed="true"]{background:#0022cb;border-color:#0022cb;color:#fff}
.type-switcher button:focus-visible{outline:3px solid #0022cb;outline-offset:2px}
@media print{.type-switcher{display:none!important}}

/* Line reveal: motion.js wraps words as .lw > .lwi and sets --l (line index). Text is plain HTML without JS. */
.lw{display:inline-block;overflow:hidden;vertical-align:top;padding:.06em .02em .16em;margin:-.06em -.02em -.16em}
.motion-on .lines-ready .lwi{display:inline-block;transform:translateY(112%) skewY(-1deg);transform-origin:0 0}
.motion-on .lines-ready.is-in .lwi{transform:none;transition:transform var(--dur-line) var(--ease-out-2) calc(var(--l,0) * var(--stagger-line))}

/* Cross-document view transitions (same-origin pages that opt in), off under reduced motion */
@media (prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  ::view-transition-old(root){animation:.28s var(--ease-std) both et-vt-out}
  ::view-transition-new(root){animation:.55s var(--ease-out-4) both et-vt-in}
}
@keyframes et-vt-out{to{opacity:0;transform:translateY(-12px)}}
@keyframes et-vt-in{from{opacity:0;transform:translateY(24px)}}
@media (prefers-reduced-motion:reduce){
  .lwi{transform:none!important;transition:none!important}
}

.footer-brand{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.footer-note{color:inherit;font-size:.9rem}
