/* Cortex Digital Hub — site styles. Mobile-first, light/dark via tokens. */
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/assets/fonts/outfit-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/assets/fonts/outfit-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/assets/fonts/inter-latin.woff2") format("woff2"); }

:root {
  --bg: #ffffff;
  --bg-2: #f5f7fb;
  --surface: #ffffff;
  --border: #e4e8f0;
  --text: #0b1220;
  --text-2: #4b5567;
  --muted: #7a8396;
  --brand: #2f6bff;
  --brand-2: #12c2b5;
  --brand-ink: #1a4fd6;
  --ring: rgba(47, 107, 255, .35);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 18, 32, .05), 0 8px 24px rgba(11, 18, 32, .06);
  --font-head: "Outfit", "Gilmer", "Aptos", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", "Aptos", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --bg-2: #0f172a; --surface: #111a2e; --border: #1f2a44;
    --text: #e8ecf5; --text-2: #b3bccd; --muted: #8290a8; --brand: #5b8cff; --brand-2: #2fd5c7; --brand-ink: #8fb0ff;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220; --bg-2: #0f172a; --surface: #111a2e; --border: #1f2a44;
  --text: #e8ecf5; --text-2: #b3bccd; --muted: #8290a8; --brand: #5b8cff; --brand-2: #2fd5c7; --brand-ink: #8fb0ff;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.6; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-head); font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand strong { font-weight: 700; }
.brand-text { white-space: nowrap; }
.site-nav { display: none; }
.site-nav a { color: var(--text-2); font-weight: 500; padding: 8px 10px; border-radius: 8px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); background: var(--bg-2); text-decoration: none; }
.theme-toggle { background: none; border: 1px solid var(--border); color: var(--text-2); border-radius: 999px; width: 38px; height: 38px; display: inline-grid; place-items: center; cursor: pointer; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}
.nav-toggle { background: none; border: 1px solid var(--border); border-radius: 10px; width: 42px; height: 40px; display: grid; gap: 4px; place-content: center; cursor: pointer; }
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; }
.site-nav.open { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 64px; background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 16px 16px; gap: 4px; box-shadow: var(--shadow); }
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; align-items: center; gap: 4px; }
}

/* Hero */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(28px, 5vw, 56px); text-align: center; background: radial-gradient(900px 400px at 50% -10%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%); }
.hero h1 { max-width: 20ch; margin-inline: auto; }
.hero p.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-2); max-width: 56ch; margin: 0 auto 1.5em; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-ink); background: color-mix(in srgb, var(--brand) 10%, transparent); border-radius: 999px; padding: 6px 12px; margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; padding: 12px 20px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; font-family: var(--font-body); font-size: 1rem; }
.btn:hover { text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.trust { display: flex; gap: 18px 28px; justify-content: center; flex-wrap: wrap; margin-top: 28px; color: var(--text-2); font-size: .92rem; }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { color: var(--brand-2); }

/* Sections and cards */
.section { padding: clamp(32px, 5vw, 64px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head p { margin: 0; color: var(--text-2); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; color: var(--text); position: relative; transition: transform .15s ease, border-color .15s ease; }
a.card:hover { text-decoration: none; transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--text-2); font-size: .95rem; }
.card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand-ink); margin-bottom: 6px; }
.pill { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--bg-2); color: var(--muted); border: 1px solid var(--border); vertical-align: middle; }
.pill.live { background: color-mix(in srgb, var(--brand-2) 18%, transparent); color: #0a7a71; border-color: transparent; }
.pill.building { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-ink); border-color: transparent; }
.card .pill { align-self: flex-start; margin-bottom: 2px; }

/* Prose pages */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.page-head { padding: clamp(32px, 6vw, 64px) 0 8px; }
.page-head p { color: var(--text-2); font-size: 1.1rem; max-width: 60ch; }
.breadcrumb { font-size: .875rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }

/* Tool workspace shell */
.tool { padding: 24px 0 48px; }
.tool-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 20px; }
.dropzone { border: 2px dashed color-mix(in srgb, var(--brand) 45%, var(--border)); border-radius: 14px; padding: clamp(28px, 6vw, 56px) 20px; text-align: center; background: color-mix(in srgb, var(--brand) 4%, var(--bg-2)); color: var(--text-2); cursor: pointer; transition: background .15s ease; }
.dropzone:hover, .dropzone.drag { background: color-mix(in srgb, var(--brand) 9%, var(--bg-2)); }
.dropzone strong { color: var(--text); font-family: var(--font-head); font-size: 1.1rem; display: block; margin-bottom: 4px; }
.note { border-left: 3px solid var(--brand-2); background: var(--bg-2); padding: 12px 16px; border-radius: 0 10px 10px 0; color: var(--text-2); font-size: .95rem; }
.steps { counter-reset: s; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 0; list-style: none; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 16px 16px 52px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.faq details { border-bottom: 1px solid var(--border); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-family: var(--font-head); font-size: 1.05rem; }
.faq p { margin: 8px 0 0; color: var(--text-2); }
.ad-slot { display: none; min-height: 90px; display: grid; place-items: center; color: var(--muted); font-size: .8rem; border: 1px dashed var(--border); border-radius: 10px; margin: 24px 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 40px 0 24px; margin-top: 40px; font-size: .95rem; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
.footer-grid h3 { font-size: .95rem; margin-bottom: 10px; }
.footer-grid h3 a { color: var(--text); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-grid li a { color: var(--text-2); }
.footer-brand p { color: var(--text-2); max-width: 32ch; margin-top: 12px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border); font-size: .85rem; color: var(--text-2); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.6fr repeat(5, 1fr); } }

/* Forms */
input, textarea, select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; width: 100%; }
label { font-weight: 500; display: block; margin-bottom: 6px; }
.field { margin-bottom: 14px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
