/* Hypnos website. Palette from assets/logo.png: navy #0d0f43, orange #fd6000, white. */

:root {
  --navy: #0d0f43;
  --navy-deep: #080a2e;
  --navy-soft: #1a1d5c;
  --orange: #fd6000;

  /* Light theme */
  --bg: #ffffff;
  --bg-alt: #f4f5fb;
  --surface: #ffffff;
  --surface-2: #eef0f8;
  --border: #dfe2ef;
  --text: #0d0f43;
  --text-muted: #4b4f78;
  --heading: #0d0f43;
  --accent: var(--orange);
  --accent-text: #c24a00;      /* orange that passes AA on white */
  --accent-soft: rgba(253, 96, 0, 0.12);
  --on-accent: #0d0f43;
  --hero-bg: #0d0f43;
  --hero-text: #ffffff;
  --hero-muted: #c9ccee;
  --code-bg: #0d0f43;
  --code-text: #e9ebff;
  --code-head: #1a1d5c;
  --shadow: 0 10px 30px rgba(13, 15, 67, 0.10);
  --radius: 14px;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --max: 1160px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080a2e;
    --bg-alt: #0d0f43;
    --surface: #12154d;
    --surface-2: #1a1d5c;
    --border: #262a6e;
    --text: #e9ebff;
    --text-muted: #a9adde;
    --heading: #ffffff;
    --accent-text: #ff8a3d;
    --accent-soft: rgba(253, 96, 0, 0.18);
    --hero-bg: #080a2e;
    --code-bg: #05061f;
    --code-head: #12154d;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] {
  --bg: #080a2e;
  --bg-alt: #0d0f43;
  --surface: #12154d;
  --surface-2: #1a1d5c;
  --border: #262a6e;
  --text: #e9ebff;
  --text-muted: #a9adde;
  --heading: #ffffff;
  --accent-text: #ff8a3d;
  --accent-soft: rgba(253, 96, 0, 0.18);
  --hero-bg: #080a2e;
  --code-bg: #05061f;
  --code-head: #12154d;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); color: var(--heading); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 6px; }
pre code { background: none; padding: 0; font-size: 0.85rem; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--heading); }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--text); font-weight: 500; font-size: 0.95rem; }
.nav a:hover { color: var(--accent-text); text-decoration: none; }
.header-actions { display: flex; gap: 6px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.menu-btn { display: none; }
#theme-toggle .moon { display: none; }
:root[data-theme="dark"] #theme-toggle .moon { display: block; }
:root[data-theme="dark"] #theme-toggle .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #theme-toggle .moon { display: block; }
  :root:not([data-theme="light"]) #theme-toggle .sun { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 0.98rem;
  border: 1px solid transparent; transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #ff7a26; }
.btn-ghost { background: transparent; color: var(--hero-text); border-color: rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { border-color: var(--accent); color: #fff; }

/* Hero */
.hero { position: relative; background: var(--hero-bg); color: var(--hero-text); padding: 72px 0 56px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: auto -20% -40% auto; width: 70vw; max-width: 900px; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(253, 96, 0, 0.35), rgba(253, 96, 0, 0) 70%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { font-family: var(--font-display); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 14px; }
.hero .eyebrow { color: #ff8a3d; }
.hero h1 { color: #fff; }
.lede { font-size: 1.12rem; color: var(--hero-muted); max-width: 56ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 28px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: var(--hero-muted); font-size: 0.95rem; }
.hero-points li { padding-left: 22px; position: relative; }
.hero-points li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.hero-points strong { color: #fff; }
.hero-demo { margin: 0; }
.window { background: #05061f; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45); }
.window-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #12154d; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.window-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }
.window-bar span:first-child { background: var(--accent); }
.window-bar em { margin-left: auto; font-style: normal; font-size: 0.75rem; color: #a9adde; font-family: var(--font-mono); }
.hero-demo figcaption { font-size: 0.82rem; color: var(--hero-muted); margin-top: 12px; line-height: 1.5; }

/* Stats */
.stats { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 36px 0; }
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat-value { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; color: var(--heading); line-height: 1.1; }
.stat-value small { font-size: 0.95rem; color: var(--accent-text); font-weight: 600; }
.stat-label { display: block; font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; line-height: 1.4; }
.stats-note { font-size: 0.85rem; color: var(--text-muted); margin: 16px 0 0; }
.stat-group-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--heading); margin: 0 0 12px; }
.stat-group-title span { font-weight: 500; color: var(--text-muted); font-size: 0.88rem; margin-left: 8px; }
.stat-grid + .stat-group-title { margin-top: 24px; }
#desktop .cta-row { margin-top: 28px; }
#desktop .btn-ghost { color: var(--heading); border-color: var(--border); }
#desktop .btn-ghost:hover { border-color: var(--accent); color: var(--accent-text); }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-lede { color: var(--text-muted); font-size: 1.05rem; }

/* Feature cards */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.card p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.card-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 16px; }
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Tiers */
.tiers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.tiers-copy p:not(.eyebrow) { color: var(--text-muted); }
.check-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 28px; color: var(--text); font-size: 0.95rem; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-soft); }
.check-list li::after { content: ""; position: absolute; left: 5px; top: 0.35em; width: 4px; height: 8px; margin-top: 2px; border: solid var(--accent-text); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tiers-diagram { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.tier { border-radius: 12px; padding: 14px 16px; border: 1px solid var(--border); background: var(--surface-2); }
.tier-1 { background: linear-gradient(135deg, var(--navy), var(--navy-soft)); border-color: transparent; color: #fff; }
.tier-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; font-family: var(--font-display); }
.tier-num { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.tier-1 .tier-num { color: #ff8a3d; }
.tier-name { font-weight: 600; }
.tier-tag { margin-left: auto; font-size: 0.72rem; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-family: var(--font-body); font-weight: 600; }
.tier-1 .tier-tag { background: rgba(253, 96, 0, 0.25); color: #ffb27a; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--font-mono); font-size: 0.78rem; padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.tier-1 .chip { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); color: #e9ebff; }
.chip-pinned { border-color: var(--accent) !important; box-shadow: inset 0 0 0 1px var(--accent); }
.chip-active { background: var(--accent) !important; color: var(--navy) !important; border-color: var(--accent) !important; font-weight: 600; }
.chip em { font-style: normal; font-weight: 400; opacity: 0.8; margin-left: 4px; }
.chip-cold { opacity: 0.7; }
.tier-arrows { display: flex; justify-content: center; gap: 36px; padding: 6px 0; font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-display); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.arrow { position: relative; padding-left: 18px; }
.arrow::before { content: ""; position: absolute; left: 4px; top: 50%; width: 7px; height: 7px; border: solid var(--accent-text); border-width: 2px 0 0 2px; transform: translateY(-30%) rotate(45deg); }
.arrow.down::before { transform: translateY(-80%) rotate(225deg); }
.tier-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 0.78rem; color: var(--text-muted); }
.chip-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--border); vertical-align: -1px; margin-right: 6px; background: var(--surface); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--border); }
thead th { font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); background: var(--surface-2); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: none; }
tbody th { font-weight: 600; color: var(--heading); white-space: nowrap; }
td code { white-space: nowrap; }
.compare td:first-of-type { font-weight: 500; color: var(--heading); }
.pill { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); margin-right: 6px; vertical-align: 1px; }
.pill-high { background: var(--accent-soft); color: var(--accent-text); }
.pill-pinned { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .pill-pinned { background: #fff; color: var(--navy); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill-pinned { background: #fff; color: var(--navy); } }
.pill-low { background: var(--surface-2); color: var(--text-muted); }

/* Model catalog (under the default lineup) */
.catalog { margin-top: 48px; }
.catalog-title { font-size: 1.35rem; }
.catalog-lede { color: var(--text-muted); max-width: 760px; margin-bottom: 8px; }
.catalog-group { font-family: var(--font-display); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); margin: 28px 0 10px; }
.catalog-table { table-layout: fixed; }
.catalog-table th:nth-child(1) { width: 29%; }
.catalog-table th:nth-child(2) { width: 10%; }
.catalog-table th:nth-child(3) { width: 25%; }
.catalog-table td:nth-child(2) { white-space: nowrap; color: var(--text-muted); }
.catalog-table td:first-child code { white-space: normal; overflow-wrap: anywhere; }
.catalog-table td:nth-child(3) { white-space: nowrap; }

/* Code blocks */
.code { position: relative; margin: 0; background: var(--code-bg); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.code figcaption { font-family: var(--font-mono); font-size: 0.75rem; color: #a9adde; background: var(--code-head); padding: 8px 14px; }
.code pre { margin: 0; padding: 16px; overflow-x: auto; color: var(--code-text); line-height: 1.55; }
.copy { position: absolute; top: 6px; right: 8px; font: 600 0.72rem var(--font-body); padding: 4px 9px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.18); background: transparent; color: #e9ebff; cursor: pointer; }
.copy:hover { border-color: var(--accent); color: #ff8a3d; }
.copy.done { border-color: var(--accent); color: #ff8a3d; }
.code-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.code-single { margin-top: 28px; }

/* Tabs */
.tab-list { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; }
.tab-list [role="tab"] {
  font: 600 0.95rem var(--font-body); color: var(--text-muted); background: none; border: none;
  padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab-list [role="tab"][aria-selected="true"] { color: var(--heading); border-bottom-color: var(--accent); }
.tab-panel p:not(.eyebrow) { color: var(--text-muted); }
.fine { font-size: 0.88rem; color: var(--text-muted); margin-top: 14px; }

/* Footer */
.site-footer { background: var(--navy-deep); color: #c9ccee; padding: 48px 0; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand strong { color: #fff; font-family: var(--font-display); font-size: 1.1rem; }
.footer-brand p { margin: 4px 0 0; font-size: 0.9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-content: flex-start; justify-content: flex-end; }
.footer-links a { color: #e9ebff; font-weight: 500; font-size: 0.92rem; }
.footer-links a:hover { color: #ff8a3d; text-decoration: none; }
.footer-link-button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: #e9ebff; font-weight: 500; font-size: 0.92rem; }
.footer-link-button:hover { color: #ff8a3d; }

/* Cookie consent banner (script.js); Accept and Decline weigh the same, as GDPR guidance asks. */
.cookie-banner {
  position: fixed; z-index: 100; left: var(--gutter); right: var(--gutter); bottom: var(--gutter);
  max-width: 640px; margin: 0 auto; padding: 16px 18px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); font-size: 0.9rem;
}
.cookie-banner p { margin: 0; flex: 1 1 300px; line-height: 1.5; }
.cookie-banner a { color: var(--accent-text); }
.cookie-actions { display: flex; gap: 10px; }
.cookie-btn {
  padding: 9px 18px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent);
}
.cookie-btn:hover { background: #ff7a26; }
.footer-license { grid-column: 1 / -1; font-size: 0.8rem; color: #8e93c9; margin: 8px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 18px; }

/* Responsive */
@media (max-width: 1000px) {
  .hero-grid, .tiers-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .code-pair { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px var(--gutter) 12px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .nav a:last-child { border-bottom: none; }
  .menu-btn { display: inline-flex; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 56px 0; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .tier-arrows { gap: 20px; }
}
@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
}
