/* Mosterd — site styles */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url("/assets/fonts/source-serif.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url("/assets/fonts/source-serif-italic.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #1f2226;
  --ink-2: #3b4047;
  --muted: #646a72;
  --line: #e3dfd6;
  --line-strong: #cfc9bc;
  --paper: #fbfaf7;
  --tint: #f3f0e8;
  --surface: #ffffff;
  --mustard: #d4a013;
  --mustard-deep: #8a6608;
  --mustard-soft: #f6ecd0;
  --dark: #1c1f23;
  --dark-2: #272b30;
  --on-dark: #f1eee7;
  --on-dark-muted: #a9adb3;

  --serif: "Source Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 6px;
  --section: clamp(4rem, 9vw, 7rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin: 0 0 0.6em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.35rem; line-height: 1.3; }
h4 { font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: 0; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
em { font-style: italic; }
strong { font-weight: 600; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.05em 0.35em;
  overflow-wrap: anywhere;
}

a { color: var(--mustard-deep); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--mustard); outline-offset: 3px; border-radius: 2px; }

::selection { background: var(--mustard-soft); }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: 42rem; }
.measure-wide { max-width: 52rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font: 500 0.98rem/1 var(--sans);
  padding: 0.95em 1.4em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn--small { padding: 0.7em 1.1em; font-size: 0.92rem; }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--mustard-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--accent { background: var(--mustard); color: var(--dark); }
.btn--accent:hover { background: #e6b42a; color: var(--dark); }
.btn--outline-light { color: var(--on-dark); border-color: #4a4f57; }
.btn--outline-light:hover { border-color: var(--on-dark); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.link-arrow { font-weight: 500; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--mustard); padding-bottom: 1px; }
.link-arrow:hover { color: var(--mustard-deep); }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 247, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 2rem; min-height: 4.5rem; }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand__name { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }

.logo { width: 2.1rem; height: 2.1rem; overflow: visible; }
.logo-bg { fill: var(--logo-bg, #fff); }
.logo-l { fill: none; stroke: var(--logo-stroke, var(--ink)); stroke-width: 1; stroke-linejoin: round; }
.logo-c1 { fill: #d4a013; }
.logo-c2 { fill: #a67c0a; }
.logo-c3 { fill: #e9c763; }

.site-nav { display: flex; align-items: center; gap: 2rem; margin-left: auto; }
.site-nav nav { display: flex; gap: 1.6rem; }
.site-nav nav a {
  color: var(--ink-2); text-decoration: none; font-size: 0.95rem; font-weight: 450;
  padding: 0.35rem 0; border-bottom: 1px solid transparent;
}
.site-nav nav a:hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.site-nav nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--mustard); }

.nav-toggle { display: none; }

@media (max-width: 68rem) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto; width: 2.75rem; height: 2.75rem;
    background: none; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 1.1rem; height: 1.5px; background: var(--ink); position: relative; transition: transform .2s ease;
  }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -6px; }
  .nav-toggle__bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 1.25rem;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 1rem var(--gutter) 1.5rem;
  }
  .site-nav.is-open { display: flex; }
  .site-nav nav { flex-direction: column; gap: 0; }
  .site-nav nav a { padding: 0.8rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .site-nav nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--mustard-deep); }
}

/* ---------- Sections ---------- */

.section { padding: var(--section) 0; }
.section--tint { background: var(--tint); }
.section--rule { border-top: 1px solid var(--line); }
.section--dark { background: var(--dark); color: var(--on-dark); }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: var(--on-dark-muted); }
.section--dark a:not(.btn) { color: var(--mustard); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font: 600 0.75rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--mustard-deep); margin: 0 0 1.4rem;
}
.eyebrow::before { content: ""; width: 1.75rem; height: 1px; background: var(--mustard); }
.section--dark .eyebrow { color: var(--mustard); }

.lede { font-size: clamp(1.12rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--ink-2); }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }

.section-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* ---------- Home hero ---------- */

.hero { padding: clamp(4rem, 10vw, 8rem) 0 clamp(4rem, 8vw, 6rem); position: relative; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 4rem; align-items: center; }
.hero h1 { margin-bottom: 1.6rem; }
.hero h1 em { color: var(--mustard-deep); font-style: italic; }
.hero__note { margin-top: 2.5rem; font-size: 0.92rem; color: var(--muted); }
.hero__note a { color: var(--ink-2); }

.hero__figure { position: relative; justify-self: end; width: min(100%, 24rem); aspect-ratio: 1; }
.hero__figure svg { width: 100%; height: 100%; overflow: visible; }
.wire { fill: none; stroke: var(--line-strong); stroke-width: 0.18; stroke-linejoin: round; }
.wire--strong { stroke: var(--ink); stroke-width: 0.22; }
.facet { stroke: var(--ink); stroke-width: 0.22; stroke-linejoin: round; }
.facet--1 { fill: #d4a013; }
.facet--2 { fill: #a67c0a; }
.facet--3 { fill: #e9c763; }
.grid-dots { fill: var(--line-strong); }

@media (max-width: 56rem) {
  .hero__grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero__figure { justify-self: start; width: min(60%, 16rem); order: -1; }
}

/* ---------- Page hero (inner pages) ---------- */

.page-hero { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 20em; font-size: clamp(2.2rem, 4.6vw, 3.5rem); }
.page-hero .lede { max-width: 42rem; margin-top: 1.25rem; }

/* ---------- Cards / grids ---------- */

.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 56rem) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card { padding-top: 1.5rem; border-top: 1px solid var(--line-strong); }
.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--ink-2); }
.card__index { font: 500 0.85rem/1 var(--sans); color: var(--muted); letter-spacing: 0.08em; margin-bottom: 1.2rem; display: block; }
.card--featured {
  border-top: 2px solid var(--mustard);
  background: var(--surface); padding: 1.75rem; margin-top: -1px;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(31, 34, 38, 0.35);
}
.card--featured .card__index { color: var(--mustard-deep); }

/* Proof strip */
.proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proof__item { padding: 2rem 2rem 2rem 0; }
.proof__item + .proof__item { padding-left: 2rem; border-left: 1px solid var(--line); }
.proof__item strong { display: block; font-family: var(--serif); font-size: 1.35rem; font-weight: 500; margin-bottom: 0.35rem; }
.proof__item span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 56rem) {
  .proof { grid-template-columns: 1fr; }
  .proof__item, .proof__item + .proof__item { padding: 1.5rem 0; border-left: 0; }
  .proof__item + .proof__item { border-top: 1px solid var(--line); }
}

/* Split layout: heading left, text right */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.split > :first-child { position: sticky; top: 7rem; }
@media (max-width: 56rem) { .split { grid-template-columns: 1fr; } .split > :first-child { position: static; } }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 2rem; padding: 2.5rem 0; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step__num { font: 400 3.5rem/1 var(--serif); color: var(--mustard); }
.step h3 { font-size: 1.6rem; margin-bottom: 0.75rem; }
.step p { color: var(--ink-2); max-width: 40rem; }
@media (max-width: 40rem) { .step { grid-template-columns: 1fr; gap: 0.75rem; } .step__num { font-size: 2.5rem; } }

/* Q&A (Why not…) */
.qa { border-top: 1px solid var(--line); }
.qa__item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(1.5rem, 5vw, 5rem); padding: clamp(2.5rem, 5vw, 3.5rem) 0; border-bottom: 1px solid var(--line); }
.qa__item h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0; }
.qa__item h2 span { color: var(--muted); }
.qa__body p { color: var(--ink-2); }
.qa__body h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; margin: 1.6em 0 0.4em; }
.qa__item--key { background: var(--surface); margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); border-left: 2px solid var(--mustard); }
.qa__verdict { font-family: var(--serif); font-size: 1.2rem; line-height: 1.5; color: var(--ink) !important; border-left: 2px solid var(--mustard); padding-left: 1.25rem; margin-top: 1.5rem; }
@media (max-width: 56rem) { .qa__item { grid-template-columns: 1fr; } }

/* Feature list (Platform) */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 5vw, 4rem); }
.feature { padding: 2rem 0; border-top: 1px solid var(--line); }
.feature h3 { font-size: 1.25rem; margin-bottom: 0.5rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; }
.feature p { color: var(--ink-2); font-size: 1rem; }
@media (max-width: 56rem) { .features { grid-template-columns: 1fr; } }

/* Status badges */
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font: 600 0.7rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.4rem 0.6rem; border-radius: 999px; border: 1px solid; white-space: nowrap; vertical-align: middle;
}
.badge::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.badge--available { color: #2f5d3a; border-color: #c4d6c7; background: #eef4ef; }
.badge--dev { color: var(--mustard-deep); border-color: #e6d29a; background: var(--mustard-soft); }
.badge--planned { color: var(--muted); border-color: var(--line-strong); background: transparent; }
.badge--planned::before { background: transparent; border: 1.5px solid currentColor; }

/* Changelog */
.log__month { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 2rem; padding: 3rem 0; border-top: 1px solid var(--line); }
.log__month h2 { font-size: 1.5rem; position: sticky; top: 7rem; align-self: start; }
.log__month h2 small { display: block; font: 500 0.82rem/1.4 var(--sans); color: var(--mustard-deep); margin-top: 0.4rem; letter-spacing: 0; }
.log__entry + .log__entry { margin-top: 2.25rem; padding-top: 2.25rem; border-top: 1px dashed var(--line); }
.log__entry h3 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.log__entry .badge { margin-bottom: 0.9rem; }
.log__entry p { color: var(--ink-2); }
.log__tech { font-size: 0.9rem; color: var(--muted) !important; border-left: 2px solid var(--line-strong); padding-left: 1rem; margin-top: 0.9rem; }
.log__tech b { font-weight: 600; color: var(--ink-2); }
@media (max-width: 48rem) { .log__month { grid-template-columns: 1fr; gap: 1.25rem; } .log__month h2 { position: static; } }

/* Roadmap */
.roadmap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2rem); align-items: start; }
.roadmap__col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.roadmap__col > h2 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.roadmap__col > p { font-size: 0.92rem; color: var(--muted); margin-bottom: 1.5rem; }
.roadmap__col--available { border-top: 3px solid #5f8a69; }
.roadmap__col--dev { border-top: 3px solid var(--mustard); }
.roadmap__col--planned { border-top: 3px solid var(--line-strong); }
.roadmap__item { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.roadmap__item h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; margin-bottom: 0.3rem; }
.roadmap__item p { font-size: 0.93rem; color: var(--ink-2); }
@media (max-width: 60rem) { .roadmap { grid-template-columns: 1fr; } }

/* Prose */
.prose h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--mustard); }

.callout { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--mustard); border-radius: var(--radius); padding: 1.5rem 1.75rem; margin: 2rem 0; }
.callout h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; margin: 0 0 0.5rem; }
.callout p { font-size: 0.98rem; }

/* Definition list */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 2rem; margin: 0; }
.facts dt { font-weight: 600; color: var(--ink); }
.facts dd { margin: 0; color: var(--ink-2); }
@media (max-width: 36rem) { .facts { grid-template-columns: 1fr; gap: 0.2rem; } .facts dd { margin-bottom: 0.8rem; } }

/* Timeline for "What happens next" */
.flow { list-style: none; padding: 0; margin: 0; counter-reset: flow; }
.flow li { counter-increment: flow; position: relative; padding: 0 0 2rem 3.5rem; color: var(--ink-2); }
.flow li::before {
  content: counter(flow); position: absolute; left: 0; top: -0.1rem;
  width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--mustard);
  display: grid; place-items: center; font: 500 0.95rem/1 var(--serif); color: var(--mustard-deep); background: var(--paper);
}
.flow li::after { content: ""; position: absolute; left: 1.1rem; top: 2.3rem; bottom: 0.2rem; width: 1px; background: var(--line-strong); }
.flow li:last-child::after { display: none; }
.flow strong { color: var(--ink); display: block; margin-bottom: 0.2rem; }

/* CTA band */
.cta-band { background: var(--dark); color: var(--on-dark); padding: clamp(4rem, 8vw, 6rem) 0; }
.cta-band__inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 0.6rem; max-width: 18em; }
.cta-band p { color: var(--on-dark-muted); margin: 0; max-width: 34rem; }
.cta-band .btn-row { margin-top: 0; }

/* ---------- Footer ---------- */

.site-footer { background: var(--dark-2); color: var(--on-dark-muted); padding: 4rem 0 2rem; font-size: 0.94rem; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--mustard); }
.site-footer__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid #3a3f46; }
.site-footer__tagline { font-family: var(--serif); font-style: italic; color: var(--on-dark-muted); margin-top: 1rem; font-size: 1.05rem; }
.site-footer__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.site-footer__heading { font: 600 0.72rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--mustard); margin-bottom: 1.2rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: 0.6rem; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; padding-top: 1.75rem; font-size: 0.85rem; }
.site-footer__legal p { margin: 0; }
.brand--inverse { color: #fff; }
.brand--inverse:hover { color: #fff; }
.brand--inverse .logo { --logo-bg: var(--dark-2); --logo-stroke: var(--on-dark); }
@media (max-width: 56rem) {
  .site-footer__top { grid-template-columns: 1fr; }
  .site-footer__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 30rem) { .site-footer__cols { grid-template-columns: 1fr; } }

/* ---------- Consent banner ---------- */

.consent {
  position: fixed; z-index: 60; left: 1rem; right: 1rem; bottom: 1rem;
  max-width: 34rem; margin-left: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 20px 50px -20px rgba(31, 34, 38, 0.35);
  padding: 1.25rem 1.4rem; font-size: 0.93rem;
}
.consent p { margin: 0 0 1rem; color: var(--ink-2); }
.consent__actions { display: flex; gap: 0.6rem; justify-content: flex-end; }

/* ---------- 404 ---------- */
.notfound { min-height: 50vh; display: grid; align-content: center; }

/* ---------- Utilities ---------- */
.section--flush { padding-top: 0; }
.note-after { margin-top: 3rem; }
.card > .badge + h3 { margin-top: 1rem; }
