/* Directionary — contemporary product site.
   One typeface (Inter), warm off-white light theme, restrained dark theme.
   Yellow is an accent only: tags, underlines, current-page marker. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #faf9f6;
  --bg-alt: #f3f1ec;
  --surface: #ffffff;
  --text: #191815;
  --muted: #5c584e;
  --text-2: #3f3c34;
  --border: #e4e1d9;
  --border-strong: #cdc9bd;
  --accent: #f9cb42;
  --on-accent: #191815;
  --focus: #191815;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --max: 66rem;
  --section: clamp(2.5rem, 5vw, 4rem);
  /* spacing scale */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2.5rem;
  --sp-5: 4rem;
  --sp-6: clamp(2.5rem, 5vw, 3.75rem);
  --sp-7: clamp(3rem, 6vw, 4.5rem);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #191815;
  --bg-alt: #1f1d18;
  --surface: #25231d;
  --text: #fef7e3;
  --muted: #b5af9f;
  --text-2: #d6d0c0;
  --border: #34312a;
  --border-strong: #4a463b;
  --focus: #f9cb42;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(1rem, 0.97rem + 0.12vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
[id] { scroll-margin-top: 1.5rem; }

/* Links: inline links keep a persistent underline (not colour alone); navigation,
   footer and actions override it below. Yellow is reserved for emphasis. */
a {
  color: var(--text);
  text-decoration-line: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  padding: 0.5rem 1rem; border-radius: var(--r-sm);
  background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Icons (inline Material Symbols SVG, decorative) ---------- */
.icon { display: block; flex: none; width: 1.25rem; height: 1.25rem; fill: currentColor; }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem); font-weight: 650; line-height: 1.1; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); font-weight: 650; line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.005em; }

p { margin: 0 0 1rem; max-width: 40rem; }
p:last-child { margin-bottom: 0; }

.lede { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); color: var(--muted); line-height: 1.6; }
.muted { color: var(--muted); }

.tag {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.125rem 0.625rem; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-size: 0.8125rem; font-weight: 600; line-height: 1.5;
}
.tag-accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--border); }
.bar { display: flex; flex-wrap: wrap; align-items: center; column-gap: 0.5rem; row-gap: 0.25rem; padding-block: 0.75rem; }

.brand {
  flex: 0 0 100%;
  display: inline-flex; align-items: center; gap: 0.625rem;
  font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.01em; text-decoration: none;
}
.brand-mark { display: block; width: 1.75rem; height: auto; }

.site-nav { min-width: 0; }
@media (min-width: 40rem) {
  .bar { column-gap: 1.5rem; }
  .brand { flex: 0 0 auto; margin-right: auto; }
}
.nav-links { display: flex; flex-wrap: wrap; gap: 0.125rem; margin: 0 0 0 -0.6rem; padding: 0; list-style: none; }
@media (min-width: 40rem) { .nav-links { margin-left: 0; gap: 0.25rem; } .nav-links a { padding-inline: 0.75rem; } }
.nav-links a {
  display: inline-block; padding: 0.4rem 0.6rem; border-radius: var(--r-sm);
  color: var(--muted); font-size: 0.9375rem; font-weight: 500; text-decoration: none;
}
.nav-links a:hover { background: var(--bg-alt); color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--bg-alt); }

/* Theme toggle: shadcn-style outline icon button */
.theme-toggle {
  margin-left: auto;
  display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  background: transparent; color: var(--text); cursor: pointer; font: inherit;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}
@media (min-width: 40rem) { .theme-toggle { margin-left: 0; } }
.theme-toggle:hover { background: var(--bg-alt); }
.theme-toggle .icon { grid-area: 1 / 1; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 1rem; border-radius: var(--r-sm);
  border: 1px solid var(--text); background: var(--text); color: var(--bg);
  font-size: 0.9375rem; font-weight: 500; text-decoration: none;
}
.btn:hover { opacity: 0.9; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg-alt); opacity: 1; }
.btn .icon { width: 1.125rem; height: 1.125rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* ---------- Layout ---------- */
.section { padding-block: var(--section); border-top: 1px solid var(--border); }
.band { background: var(--bg-alt); }
.section-head { margin-bottom: 1.75rem; }
.section-head h2 { margin-bottom: 0.5rem; }
.section-head p { color: var(--muted); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--section); }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 56rem) { .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem; } }
.hero .tag { margin-bottom: 1.25rem; }
.hero h1 { margin-bottom: 1rem; max-width: 18ch; }
.hero .lede { max-width: 36rem; }

.glance {
  margin: 0; padding: 0.5rem 1.25rem; list-style: none;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface);
}
.glance li { display: flex; gap: 0.875rem; align-items: flex-start; padding-block: 0.875rem; }
.glance li + li { border-top: 1px solid var(--border); }
.glance .icon { margin-top: 0.0625rem; color: var(--muted); }
.glance strong { display: block; font-size: 0.9375rem; font-weight: 600; }
.glance .d { color: var(--muted); font-size: 0.9375rem; }

/* ---------- Feature cards ---------- */
.cards { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 48rem) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.ic {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: 1rem;
  border-radius: var(--r-md); background: var(--bg-alt); border: 1px solid var(--border);
}
.card h3 { margin-bottom: 0.375rem; }
.card p { color: var(--muted); font-size: 0.96875rem; }

/* ---------- Steps ---------- */
.steps { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; } }
.steps li { counter-increment: step; padding-top: 1rem; border-top: 2px solid var(--text); }
.steps li::before {
  content: "0" counter(step); display: block; margin-bottom: 0.375rem;
  color: var(--muted); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em;
}
.steps h3 { margin-bottom: 0.375rem; }
.steps p { color: var(--muted); font-size: 0.96875rem; }

/* ---------- Two-column text ---------- */
.split { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 56rem) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

.terms-list { margin: 0; }
/* Label / description rows (Our approach, framework, acknowledgements):
   no rule above the first row or below the last; hairlines only between rows. */
.terms-list > div, .people > div { display: grid; gap: 0.125rem 1.5rem; padding-block: 1rem; }
.terms-list > div:first-child, .people > div:first-child { padding-top: 0; }
.terms-list > div:last-child, .people > div:last-child { padding-bottom: 0; }
.terms-list > div + div, .people > div + div { border-top: 1px solid var(--border); }
@media (min-width: 40rem) { .terms-list > div, .people > div { grid-template-columns: 10rem minmax(0, 1fr); } }
.terms-list dt { font-weight: 600; }
.terms-list dd { margin: 0; color: var(--muted); }
.terms-list .q { color: var(--text); font-weight: 500; }

.inline-link {
  display: inline-flex; align-items: center; gap: 0.25rem; margin-top: 1rem; font-weight: 500; text-decoration: none;
}
.inline-link:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.inline-link .icon { width: 1.125rem; height: 1.125rem; }
.small-note { margin-top: 1.5rem; font-size: 0.9375rem; color: var(--muted); }

/* ---------- Inner pages ---------- */
.page-head { padding-block: clamp(2rem, 5vw, 3.5rem) var(--section); }
.page-head h1 { margin-bottom: 0.75rem; }
.page-head .lede { max-width: 38rem; }
.page-head--compact { padding-bottom: clamp(2rem, 4vw, 3rem); }
.block { padding-bottom: var(--sp-6); }
.section.tight { padding-block: var(--sp-6); border-top: 0; }
.h2-sm { margin-bottom: 0.75rem; font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.625rem); line-height: 1.25; }
.lead { font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem); font-weight: 500; line-height: 1.55; }

.feature-rows { margin: 0; padding: 0; list-style: none; }
.feature-rows > li {
  display: grid; gap: var(--sp-1) var(--sp-4); align-items: baseline;
  padding-block: 1.25rem; border-top: 1px solid var(--border);
}
.feature-rows > li:last-child { border-bottom: 1px solid var(--border); }
@media (min-width: 48rem) { .feature-rows > li { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.feature-rows h2 { display: flex; align-items: center; gap: 0.75rem; font-size: 1.1875rem; line-height: 1.4; letter-spacing: -0.01em; }
.feature-rows .icon { color: var(--muted); }
.feature-rows p { color: var(--muted); }

.notice {
  display: flex; gap: 0.875rem; padding: 1.25rem; border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); background: var(--surface);
}
.notice .icon { color: var(--muted); margin-top: 0.0625rem; }
.notice h2, .notice h3 { margin-bottom: 0.375rem; }
.notice h2 { font-size: 1.125rem; }
.notice p { color: var(--muted); font-size: 0.96875rem; }
.notice p + p { margin-top: 0.5rem; }

.feature-cards { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 48rem) { .feature-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; } }
.feature-card { padding: 1.75rem; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-alt); }
.feature-card .ic { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-bottom: 1.25rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.feature-card .icon { width: 1.5rem; height: 1.5rem; }
.feature-card h2 { margin-bottom: 0.5rem; font-size: 1.1875rem; line-height: 1.35; letter-spacing: -0.01em; }
.feature-card p { color: var(--text-2); }

.info-card { max-width: 48rem; padding: 1.5rem 1.75rem; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-alt); }
.info-card p { color: var(--text-2); font-size: 0.96875rem; }

.terms-list--plain > div + div { border-top: 0; }
.terms-list--plain dd { color: var(--text-2); }

/* Design principles: three balanced columns */
.principles-head { margin-bottom: var(--sp-4); }
.principles-3 { display: grid; gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
.principles-3 .n { display: block; margin-bottom: 0.75rem; color: var(--muted); font-size: 1.25rem; font-weight: 600; line-height: 1; letter-spacing: -0.01em; }
.principles-3 h3 { margin-bottom: 0.5rem; font-size: 1.125rem; }
.principles-3 p { color: var(--text-2); font-size: 0.96875rem; }
@media (min-width: 48rem) { .principles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); } }

/* Acknowledgements */
.people { margin: 0; }
.people dt { font-weight: 600; }
.people dd { margin: 0; color: var(--text-2); }
.closing-note { margin-top: var(--sp-3); color: var(--muted); font-size: 0.9375rem; }
.person-link { font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 2.5rem 2rem; border-top: 1px solid var(--border); background: var(--bg-alt); font-size: 0.9375rem; }
.fgrid { display: grid; gap: 1.75rem 2rem; }
@media (min-width: 40rem) { .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .fgrid { grid-template-columns: minmax(0, 4fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 3fr); } }
.footer-brand { display: flex; align-items: center; gap: 0.625rem; margin-bottom: 0.75rem; font-weight: 650; font-size: 1.0625rem; }
.site-footer h2 { margin-bottom: 0.5rem; font-size: 0.8125rem; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.flinks { margin: 0; padding: 0; list-style: none; }
.flinks a { display: inline-block; padding-block: 0.25rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a.footer-email { display: inline-block; padding-block: 0.25rem; overflow-wrap: anywhere; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; }

/* ---------- Document pages ---------- */
.doc { padding-bottom: 4rem; max-width: 44rem; }
.doc-notice { margin-bottom: 2rem; }
.prose section { padding-block: 1.25rem; border-top: 1px solid var(--border); }
.prose section:first-child { border-top: 0; padding-top: 0; }
.prose h2 { margin-bottom: 0.5rem; font-size: 1.25rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.25rem; max-width: 40rem; }
.prose li { margin-bottom: 0.25rem; }
.pending { padding: 0.875rem 1rem; border: 1px dashed var(--border-strong); border-radius: var(--r-md); background: var(--surface); }
.pending .tag { margin-bottom: 0.5rem; }
.pending p { color: var(--muted); font-size: 0.9375rem; max-width: none; }
.contact-line { font-size: clamp(1.0625rem, 0.7rem + 2vw, 1.25rem); font-weight: 600; overflow-wrap: anywhere; }

/* Robustness for long strings (emails) and enlarged text: let grid/flex children shrink and wrap */
body { overflow-wrap: break-word; }
:where(.hero-grid, .split, .fgrid, .cards, .feature-cards, .steps, .principles-3) { grid-template-columns: minmax(0, 1fr); }
.hero-grid > *, .split > *, .fgrid > *, .notice > div, .brand span { min-width: 0; }

/* Larger touch targets for coarse pointers; desktop visuals unchanged */
@media (pointer: coarse) {
  .nav-links a { padding-block: 0.7rem; }
  .theme-toggle { width: 2.75rem; height: 2.75rem; }
  .flinks a, .site-footer a.footer-email { padding-block: 0.6rem; }
  .inline-link { padding-block: 0.5rem; }
}

@media print { .theme-toggle, .skip-link { display: none; } }
