/* Atlas Mind website: tokens, base, header, footer and shared components.
 * Palette: the site's near-black ground and three text greys (design/tokens.css);
 * accents are the five colours of the Atlas Mind mark (assets/img/logos), lightened
 * where they carry text so they keep 4.5:1 on the ground. Page styles live beside:
 * home.css, pricing.css, auth.css, policies.css. */
@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #0b0b0b;
  --panel: #141414;
  --panel-raised: #181818;
  --panel-active: #1f1f1f;
  --border: #222;
  --border-strong: #343434;
  --text: #f2f2f2;
  --text-body: #c9c9c9;
  --text-dim: #8a8a8a;
  --chip: #ececec;
  --chip-text: #0b0b0b;
  --focus: #6fb4ff;
  --green: #3ece37;
  --periwinkle: #8aa8ff;
  --amber: #ffbf2e;
  --violet: #a98bff;
  --violet-deep: #6811ff;
  --cyan: #00d0ff;
  --red: #ff6161;
  --yellow: #ffb800;
  --danger: #ff7b72;
  --success: #7ee787;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  /* Oliver's mock: soft rounded panels without hard borders, pill controls. */
  --radius: 10px;
  --radius-small: 6px;
  --radius-panel: 18px;
  --radius-pill: 999px;
  --gutter: clamp(16px, 4vw, 56px);
  /* The widest the content runs; the header, the page and the footer share it (.wrap, footer.css). */
  --page-width: 1180px;
  --measure: 62ch;
  --nav-height: 64px;
  --motion: 140ms ease-out;
  color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) { :root { --motion: 0ms; } }

* { box-sizing: border-box; }
html { height: 100%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
::selection { background: #2d4a73; color: #fff; }
.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: var(--gutter); top: -48px; z-index: 50; padding: 8px 12px; background: var(--chip); color: var(--chip-text); border-radius: var(--radius); text-decoration: none; font-weight: 500; }
.skip-link:focus { top: 10px; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; }
p { margin: 0; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.lede { font-size: clamp(15px, 1.2vw, 17px); color: var(--text-body); max-width: var(--measure); }
.dim { color: var(--text-dim); }
.accent-green { color: var(--green); }
.accent-violet { color: var(--violet); }
.accent-cyan { color: var(--cyan); }
.accent-yellow { color: var(--yellow); }
.accent-periwinkle { color: var(--periwinkle); }
.accent-amber { color: var(--amber); }
.accent-red { color: var(--red); }
.mono { font-family: var(--font-mono); font-size: 0.92em; }

/* ---------- Breadcrumbs ----------
 * The trail above a page's heading, written by tools/generate/seo_parts.py with the matching BreadcrumbList.
 * A 24px row so each link is a full target. Where a heading has room above it, the trail sits in
 * that room out of the flow, one gap above the heading, so the heading keeps its place; elsewhere
 * (the policy pages) it is in the flow. */
.crumbs { font-size: 13px; line-height: 24px; color: var(--text-dim); }
.crumbs ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.crumbs li { display: inline-flex; min-width: 0; }
.crumbs li + li::before { content: "/" / ""; padding: 0 8px; color: var(--text-dim); }
.crumbs a { color: var(--text-dim); text-decoration: none; transition: color var(--motion); }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current="page"] { color: var(--text-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-head:has(> .crumbs) { position: relative; }
.section-head > .crumbs { position: absolute; left: 0; right: 0; bottom: calc(100% + 12px); }

/* ---------- Layout ---------- */
.wrap { width: min(var(--page-width), 100% - 2 * var(--gutter)); margin: 0 auto; }
.section { padding: clamp(56px, 8vw, 112px) 0; }
.section-head { display: grid; gap: 12px; max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
/* One heading scale with the topic pages (Oliver, 29 Oct 2026: the rest of the site in a similar style). */
.section-head h2 { font-size: clamp(28px, 3.2vw, 44px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; text-wrap: balance; }
.page-title { font-size: clamp(40px, 5vw, 76px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; text-wrap: balance; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.panel { background: var(--panel); border-radius: var(--radius-panel); padding: clamp(20px, 2.6vw, 32px); }
.hairline-list { margin: 0; padding: 0; list-style: none; }
.hairline-list > li { padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-body); }
.hairline-list > li:first-child { border-top: 0; }
.hairline-list strong { color: var(--text); font-weight: 500; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border: 1px solid var(--border-strong); border-radius: 0;
  background: transparent; color: var(--text);
  font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--motion), border-color var(--motion), color var(--motion);
}
.button:hover { background: var(--panel-active); border-color: #444; }
.button:active { background: #222; }
.button-primary { background: var(--chip); color: var(--chip-text); border-color: var(--chip); }
.button-primary:hover { background: #fff; border-color: #fff; }
.button-primary:active { background: #d8d8d8; }
.button-quiet { border-color: transparent; color: var(--text-body); }
.button-quiet:hover { color: var(--text); }
.button-small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.button-block { width: 100%; }
.button[disabled], .button[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.button[disabled]:hover { background: transparent; border-color: var(--border-strong); }
.button-primary[disabled]:hover { background: var(--chip); border-color: var(--chip); }
.button-danger { border-color: #4a2a2a; color: var(--danger); }
.button-danger:hover { background: #2a1818; border-color: #6a3a3a; }

/* ---------- Header ---------- */
/* Oliver 18 Oct: the header is an overlay on the page, not a separate bar. */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 40; background: transparent; }
.site-header[data-open="true"] { background: rgba(11, 11, 11, 0.96); }
/* The overlay takes no space, so content starts below it; the home hero runs underneath instead. */
main { padding-top: var(--nav-height); }
main:has(> .hero:first-child) { padding-top: 0; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: var(--nav-height); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); font-weight: 300; letter-spacing: 0.2em; font-size: 14px; }
.brand img { width: 24px; height: 24px; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a { letter-spacing: 0.06em; }
.site-nav a { padding: 8px 12px; border-radius: var(--radius-pill); font-size: 14px; color: var(--text-body); text-decoration: none; transition: color var(--motion), background var(--motion); }
.site-nav a:hover { color: var(--text); background: var(--panel-active); }
.site-nav a[aria-current="page"] { color: var(--text); }
.site-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.site-actions:empty { display: none; }
.menu-button { display: none; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--border-strong); border-radius: 0; background: transparent; cursor: pointer; align-items: center; justify-content: center; }
.menu-button svg { width: 18px; height: 18px; }
/* The Download action carries a glyph; on a phone it stays in the bar beside the menu. */
.button-download svg { width: 15px; height: 15px; }
@media (max-width: 760px) {
  .site-nav, .site-actions { display: none; }
  .menu-button { display: inline-flex; }
  .site-header[data-open="true"] .wrap { flex-wrap: wrap; padding-bottom: 12px; }
  .site-header[data-open="true"] .site-nav, .site-header[data-open="true"] .site-actions { display: flex; flex-direction: column; align-items: stretch; width: 100%; margin: 0; gap: 2px; }
  .site-header[data-open="true"] .site-nav { order: 3; padding-top: 8px; }
  .site-header[data-open="true"] .site-actions { order: 4; padding-top: 8px; gap: 8px; }
  .site-header[data-open="true"] .site-nav a { padding: 12px 10px; }
}

/* ---------- Footer: assets/css/footer.css ---------- */

/* ---------- Notices and form parts shared across pages ---------- */
.notice { display: block; padding: 12px 14px; border: 1px solid var(--border); border-radius: 0; background: var(--panel); font-size: 14px; color: var(--text-body); }
.notice strong { color: var(--text); font-weight: 500; }
.notice-warn { border-color: #4a3a12; background: #1c1708; }
.notice-error { border-color: #4a2a2a; background: #1e1111; color: #ffb8b2; }
.notice-ok { border-color: #1d3b24; background: #0f1a12; }
.notice-pending { border-color: #2a2a2a; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-body); }
.field .hint { font-size: 12px; color: var(--text-dim); }
.input {
  width: 100%; min-height: 42px; padding: 0 12px;
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: 0;
  color: var(--text); font-size: 15px;
  transition: border-color var(--motion);
}
.input::placeholder { color: #6a6a6a; }
.input:hover { border-color: #444; }
.input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(111, 180, 255, 0.18); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input[disabled] { opacity: 0.5; }
.field-error { font-size: 13px; color: var(--danger); }
.field-error:empty { display: none; }
.state-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 12px; color: var(--text-body); white-space: nowrap; }
.state-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); }
.state-pill[data-state="ok"]::before { background: var(--success); }
.state-pill[data-state="warn"]::before { background: var(--yellow); }
.state-pill[data-state="off"]::before { background: var(--text-dim); }
.state-pill[data-state="error"]::before { background: var(--danger); }
.spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.25); border-top-color: currentColor; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; border-top-color: rgba(255,255,255,0.25); } }

/* Anchor targets clear the floating header when a link jumps to them. */
[id] { scroll-margin-top: calc(var(--nav-height) + 16px); }
