/* Hermizan public site.
   Tokens come from the Hermizan design system (tokens.json): colours, type,
   spacing and radii. `deep` / `on-deep` are the only local additions: a tide
   ground that stays dark in both themes. */

:root {
  --surface: #FBF6EE;
  --sand: #F1E4D1;
  --line: #DCCBB5;
  --ink: #2A211C;
  --ink-muted: #6B5B50;
  --clay: #C4552F;
  --clay-strong: #A3431F;
  --tide: #1F4E57;
  --glow: #E3A33B;
  --on-brand: #FFFFFF;
  --deep: #1F4E57;
  --on-deep: #FBF6EE;
  --on-deep-muted: #BCD3D6;
  --deep-line: #3B6770;

  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "Figtree", system-ui, sans-serif;

  --space-1: 4px; --space-2: 8px; --space-4: 16px; --space-6: 24px;
  --space-8: 32px; --space-12: 48px;
  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 24px;

  --gutter: 24px;
  --section: clamp(72px, 10vw, 128px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #1C1715;
    --sand: #3A2E27;
    --line: #4A3D35;
    --ink: #F4ECE3;
    --ink-muted: #BBAC9F;
    --clay: #E0714A;
    --clay-strong: #EE8C68;
    --tide: #7DB5BE;
    --glow: #EDB75A;
    --on-brand: #1C1715;
    --deep: #15343A;
    --on-deep: #F4ECE3;
    --on-deep-muted: #A9C4C8;
    --deep-line: #2C5058;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/24px var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--clay-strong); text-underline-offset: 3px; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, .h-display {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.625rem, 5.6vw, 4.25rem); line-height: 1.05; }
h2 { font-size: clamp(1.875rem, 3.6vw, 2.5rem); line-height: 1.15; }
h2.h-heading { font-size: 1.625rem; line-height: 2rem; }
h3 { font: 600 1.125rem/1.6rem var(--font-sans); }
h4 { font: 600 1rem/1.5rem var(--font-sans); }
.body-l, .lede { font-size: 1.125rem; line-height: 1.75rem; color: var(--ink-muted); text-wrap: pretty; }
p { text-wrap: pretty; }

.eyebrow {
  font: 600 0.875rem/1.25rem var(--font-sans);
  color: var(--clay-strong);
  margin-bottom: var(--space-4);
}

.wrap { width: 100%; max-width: 1168px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--tight { padding-block: 0 var(--section); }
.section--sand { background: var(--sand); }
.section__head { max-width: 760px; margin-bottom: var(--space-12); }
.section__head h2 + p { margin-top: var(--space-4); }
.section__head--center { margin-inline: auto; text-align: center; }

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  background: var(--ink); color: var(--surface);
  padding: 10px 16px; border-radius: var(--radius-sm); text-decoration: none;
}
.skip:focus { top: 16px; }

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

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px;
  border-radius: var(--radius-md); border: 1.5px solid transparent;
  font: 600 1rem/1.5rem var(--font-sans); text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 0.9375rem; }
.btn--primary { background: var(--tide); color: var(--on-brand); }
.btn--primary:hover { background: color-mix(in srgb, var(--tide) 86%, var(--ink)); }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink-muted); }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: var(--space-8); height: 72px; }
.nav__logo img { height: 32px; width: auto; }
.nav__links { display: flex; gap: var(--space-8); margin-left: auto; }
.nav__links a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.9375rem; }
.nav__links a:hover { color: var(--clay-strong); }

/* ── Hero ── */
.hero { padding-block: clamp(40px, 6vw, 88px) var(--section); overflow: clip; }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero__copy { padding-block: var(--space-6); }
.h1-accent { color: var(--clay); display: block; }
.lede { margin-top: var(--space-6); max-width: 34em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--space-8); }
.hero__status {
  display: flex; gap: 10px; align-items: baseline;
  margin-top: var(--space-8); font-size: 0.875rem; line-height: 1.25rem; color: var(--ink-muted);
  max-width: 30em;
}
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--glow); transform: translateY(-1px); }

.hero__stage { position: relative; }
.hero__art {
  position: absolute; z-index: 0;
  width: 112%; max-width: none; left: -6%; top: 50%; transform: translateY(-50%);
}
.art-clay { fill: var(--clay); }
.art-tide { fill: var(--tide); }
.art-bridge { fill: none; stroke: var(--glow); stroke-width: 40; stroke-linecap: round; }
.art-bridge--sm { stroke-width: 8; }
@media (prefers-color-scheme: dark) { .hero__art .art-tide { fill: #2F6B76; } }

/* ── Call demo ── */
.demo {
  position: relative; z-index: 1;
  margin: 44px 9% 44px 13%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 0 rgb(42 33 28 / .04), 0 24px 48px -24px rgb(42 33 28 / .28);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.demo__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 12px; }
.demo__title { display: flex; align-items: center; gap: 10px; font: 600 0.875rem/1.25rem var(--font-sans); }
.demo__live { width: 8px; height: 8px; border-radius: 50%; background: var(--clay); }
.demo.is-playing .demo__live { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.demo__note { font-size: 0.8125rem; line-height: 1.125rem; color: var(--ink-muted); }

.demo__tabs { display: flex; gap: 4px; margin: 0 16px; padding: 4px; background: var(--sand); border-radius: var(--radius-md); }
.demo__tabs button {
  flex: 1 1 auto; min-height: 36px; padding: 6px 4px; white-space: nowrap;
  border: 0; border-radius: 9px; background: transparent; color: var(--ink-muted);
  font: 600 0.8125rem/1.125rem var(--font-sans); cursor: pointer;
}
.demo__tabs button:hover { color: var(--ink); }
.demo__tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(42 33 28 / .12); }

.demo__stream {
  height: 400px; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 20px 8px;
  display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.demo__noscript { color: var(--ink-muted); font-size: 0.9375rem; }

.turn { max-width: 86%; display: flex; flex-direction: column; gap: 4px; }
.turn__who { font-size: 0.75rem; line-height: 1rem; color: var(--ink-muted); font-weight: 500; }
.turn__text { padding: 10px 14px; font-size: 0.9375rem; line-height: 1.375rem; border-radius: 18px; }
.turn--caller { align-self: flex-start; }
.turn--caller .turn__text { background: color-mix(in srgb, var(--clay) 16%, var(--surface)); border-bottom-left-radius: 4px; }
.turn--hz { align-self: flex-end; align-items: flex-end; }
.turn--hz .turn__text { background: var(--tide); color: var(--on-brand); border-top-right-radius: 4px; }
.turn--hz .tag { margin-top: 2px; }

.rec {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8125rem; line-height: 1.125rem; color: var(--ink-muted);
  padding: 2px 0;
}
.rec::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.rec-icon {
  flex: none; display: inline-block; width: 14px; height: 14px; border-radius: 4px;
  border: 1.5px solid var(--glow);
  background:
    linear-gradient(var(--glow), var(--glow)) 50% 35% / 6px 1.5px no-repeat,
    linear-gradient(var(--glow), var(--glow)) 50% 65% / 6px 1.5px no-repeat;
}
.rec--key { color: var(--ink); font-weight: 600; }
.rec--key .rec-icon { background-color: color-mix(in srgb, var(--glow) 30%, transparent); }

.demo__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px 14px; border-top: 1px solid var(--line);
}
.demo__legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.75rem; line-height: 1rem; color: var(--ink-muted); }
.demo__legend-sep { margin-inline: 2px; }
.bubble-swatch { width: 14px; height: 14px; border-radius: 5px 2px 5px 5px; background: var(--tide); }
.demo__replay {
  border: 0; background: none; padding: 6px 4px; cursor: pointer;
  font: 600 0.8125rem/1.125rem var(--font-sans); color: var(--clay-strong);
  text-decoration: underline; text-underline-offset: 3px;
}

.js .demo__stream > * { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ── Tags (the four kinds of statement) ── */
.tag {
  display: inline-flex; align-items: center; align-self: flex-start;
  padding: 3px 10px; border-radius: 999px;
  font: 600 0.75rem/1.125rem var(--font-sans); letter-spacing: 0.01em;
}
.turn--hz .tag { align-self: flex-end; }
.tag--information { background: color-mix(in srgb, var(--tide) 14%, var(--surface)); color: var(--tide); }
.tag--promise { background: color-mix(in srgb, var(--clay) 15%, var(--surface)); color: var(--clay-strong); }
.tag--offer { background: color-mix(in srgb, var(--glow) 30%, var(--surface)); color: var(--ink); }
.tag--safety { background: var(--ink); color: var(--surface); }

/* ── Moments ── */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.split--top { align-items: start; }
.split h2 + p { margin-top: var(--space-4); }
.moments__list {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8);
  margin-top: var(--space-12); padding-top: var(--space-8); border-top: 1px solid var(--line);
}
.moments__list h3 { margin-bottom: var(--space-2); }
.moments__list p { color: var(--ink-muted); }

/* ── Jobs ── */
.jobs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.job {
  display: flex; flex-direction: column; gap: 12px;
  padding: var(--space-8); border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface);
}
.job h3 { font-size: 1.375rem; line-height: 1.75rem; font-family: var(--font-display); font-variation-settings: "SOFT" 100; letter-spacing: -0.01em; margin-top: 4px; }
.job > p { color: var(--ink-muted); }
.job blockquote {
  margin-top: 4px; padding: 12px 16px;
  background: var(--sand); border-radius: 16px 16px 16px 4px;
  font-size: 1rem; line-height: 1.5rem; color: var(--ink);
}
.job .job__behind { margin-top: auto; padding-top: 12px; font-size: 0.875rem; line-height: 1.25rem; }
.job__behind strong { color: var(--ink); font-weight: 600; }

/* ── Steps ── */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-8); counter-reset: none; }
.steps li { position: relative; padding-top: var(--space-6); border-top: 2px solid var(--ink); }
.steps__n {
  display: block; margin-bottom: var(--space-4);
  font: 600 2.5rem/1 var(--font-display); font-variation-settings: "SOFT" 100; color: var(--clay);
}
.steps h3 { margin-bottom: var(--space-2); }
.steps p { color: var(--ink-muted); }

/* ── Deep (reliability) ── */
.section--deep { background: var(--deep); color: var(--on-deep); }
.section--deep .eyebrow { color: var(--glow); }
.section--deep .body-l { color: var(--on-deep-muted); margin-top: var(--space-4); }
.section--deep :focus-visible { outline-color: var(--glow); }
.deep__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8) var(--space-8); margin-top: var(--space-12); }
.facts dt { font-weight: 600; margin-bottom: 6px; padding-top: var(--space-4); border-top: 1px solid var(--deep-line); }
.facts dd { color: var(--on-deep-muted); font-size: 0.9375rem; line-height: 1.4375rem; }

.ladder {
  padding: var(--space-8); border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--on-deep) 7%, transparent);
  border: 1px solid var(--deep-line);
}
.ladder h3 { font-size: 1.25rem; line-height: 1.75rem; }
.ladder > p { color: var(--on-deep-muted); margin-top: 6px; font-size: 0.9375rem; }
.ladder ol { margin-top: var(--space-6); display: grid; gap: 8px; counter-reset: rung; }
.ladder li {
  counter-increment: rung;
  margin-left: calc(var(--i) * 14px);
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--on-deep) 9%, transparent);
  font-size: 0.9375rem; line-height: 1.375rem;
}
.ladder li::before {
  content: counter(rung); flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--glow); color: #2A211C; font-weight: 600; font-size: 0.8125rem;
}
.ladder li:last-child { background: transparent; border: 1px dashed var(--deep-line); color: var(--on-deep-muted); }
.ladder li:last-child::before { background: transparent; border: 1.5px solid var(--on-deep-muted); color: var(--on-deep-muted); }

/* ── Won't do ── */
.wont { display: grid; gap: 0; border-top: 1px solid var(--line); }
.wont li {
  position: relative; padding: 18px 0 18px 40px; border-bottom: 1px solid var(--line);
  color: var(--ink-muted);
}
.wont li strong { color: var(--ink); font-weight: 600; }
.wont li::before, .wont li::after {
  content: ""; position: absolute; left: 4px; top: 29px; width: 18px; height: 2px;
  background: var(--clay); border-radius: 2px;
}
.wont li::before { transform: rotate(45deg); }
.wont li::after { transform: rotate(-45deg); }

/* ── Status ── */
.status {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 72px);
  padding: clamp(24px, 4vw, 48px); border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--glow), var(--glow)) left / 6px 100% no-repeat,
    var(--surface);
}
.status p + p { margin-top: var(--space-4); }
.status > div:last-child { color: var(--ink-muted); }

/* ── Company ── */
.company { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.company__copy h2 + p { margin-top: var(--space-6); }
.company__copy p + p { margin-top: var(--space-4); }
.company__copy > p:last-child { color: var(--ink-muted); }
.markfig {
  padding: var(--space-8); border-radius: var(--radius-lg); background: var(--surface);
  display: grid; gap: var(--space-6); justify-items: center;
}
.markfig svg { width: min(200px, 60%); }
.markfig figcaption { display: grid; gap: 10px; width: 100%; font-size: 0.9375rem; line-height: 1.375rem; color: var(--ink-muted); }
.markfig figcaption p { position: relative; padding-left: 24px; }
.markfig strong { color: var(--ink); font-weight: 600; }
.key { position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border-radius: 4px; }
.key--clay { background: var(--clay); } .key--tide { background: var(--tide); } .key--glow { background: var(--glow); }

.history { margin-top: var(--section); }
.history > h3 { font: 600 1.625rem/2rem var(--font-display); font-variation-settings: "SOFT" 100; letter-spacing: -0.01em; margin-bottom: var(--space-8); }
.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-8); }
.timeline li { position: relative; padding-top: var(--space-6); border-top: 2px solid var(--line); }
.timeline li::before {
  content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--sand); border: 2px solid var(--tide);
}
.timeline li:last-child::before { background: var(--glow); border-color: var(--glow); }
.timeline time { display: block; font: 600 0.875rem/1.25rem var(--font-sans); color: var(--clay-strong); margin-bottom: 6px; }
.timeline p { color: var(--ink-muted); margin-top: 4px; font-size: 0.9375rem; line-height: 1.4375rem; }

/* ── Involved ── */
.involved { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.involved article {
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
  padding: var(--space-8); border-radius: var(--radius-lg); background: var(--sand);
}
.involved h3 { font: 600 1.375rem/1.75rem var(--font-display); font-variation-settings: "SOFT" 100; }
.involved p { color: var(--ink-muted); margin-bottom: var(--space-4); }
.involved .btn { margin-top: auto; }
.involved .btn--ghost { border-color: color-mix(in srgb, var(--ink-muted) 45%, transparent); }

/* ── Footer ── */
.footer { border-top: 1px solid var(--line); padding-block: var(--space-12) var(--space-8); }
.footer__inner { display: flex; justify-content: space-between; gap: var(--space-8); flex-wrap: wrap; }
.footer__inner img { height: 28px; width: auto; }
.footer__inner p { margin-top: 12px; color: var(--ink-muted); font-size: 0.9375rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 12px var(--space-6); align-items: flex-start; }
.footer nav a { color: var(--ink); text-decoration: none; font-size: 0.9375rem; padding-block: 4px; }
.footer nav a:hover { color: var(--clay-strong); }
.footer__legal { margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--line); }
.footer__legal p { font-size: 0.8125rem; line-height: 1.125rem; color: var(--ink-muted); }

/* ── Reveal on scroll ── */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__stage { max-width: 560px; width: 100%; margin-inline: auto; }
  .steps, .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deep__grid, .company, .split, .status { grid-template-columns: minmax(0, 1fr); }
  .involved { grid-template-columns: minmax(0, 1fr); }
  .split { align-items: start; gap: var(--space-4); }
  .split--top { gap: var(--space-8); }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .nav__links { display: none; }
  .nav__inner { justify-content: space-between; height: 64px; }
  .nav__logo img { height: 28px; }
  .jobs, .moments__list, .facts { grid-template-columns: minmax(0, 1fr); }
  .job, .ladder, .involved article, .markfig { padding: var(--space-6); }
  .demo { margin: 32px 0; }
  .hero__art { width: 100%; left: 0; }
  .demo__stream { height: 380px; padding-inline: 16px; }
  .demo__tabs { margin-inline: 12px; }
  .demo__tabs button { font-size: 0.75rem; padding-inline: 4px; }
  .ladder li { margin-left: calc(var(--i) * 6px); }
  .hero__cta .btn { flex: 1 1 auto; }
}
@media (max-width: 480px) {
  .steps, .timeline { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
