/* Cortex716 — one stylesheet for the whole site.
   Colours come straight from logo kit D: ink-black field, brain orange, pixel teal. */

:root {
  --bg: #0B0F1A;
  --surface: #111725;
  --surface-2: #171F31;
  --line: rgba(242, 244, 248, 0.09);
  --line-strong: rgba(242, 244, 248, 0.16);
  --ink: #F2F4F8;
  --muted: #8E97AB;
  --teal: #18D2B8;
  --teal-hi: #5BF0DA;
  --teal-lo: #10A894;
  --orange: #FF7A1A;

  --radius: 14px;
  --radius-lg: 22px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);

  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  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(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal-hi); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--teal); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-weight: 600;
}
.skip:focus { left: 8px; z-index: 100; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 26, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: block; flex-shrink: 0; }
.brand img { height: 46px; width: auto; }

.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); }

@media (max-width: 560px) {
  .brand img { height: 30px; }
  .nav a { padding: 8px 8px; font-size: 14px; }
}

/* ---------- Type ---------- */

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 750; }
h1 { font-size: clamp(38px, 6.4vw, 68px); letter-spacing: -0.035em; }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: 21px; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 18px;
}
.eyebrow .dot { color: var(--orange); }
.lede { font-size: clamp(18px, 2vw, 21px); color: #C3CAD8; max-width: 38em; }
.muted { color: var(--muted); }
.accent { color: var(--teal); }
.warm { color: var(--orange); }

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

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-size: 16px; font-weight: 650; text-decoration: none;
  padding: 13px 22px; border-radius: 12px; border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: var(--bg); }
.btn-primary:hover { background: var(--teal-hi); color: var(--bg); }
.btn-ghost { color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--teal); color: var(--ink); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */

.hero { padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 8vw, 96px); position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero h1 .accent { color: var(--teal); }
.hero h1 .warm { color: var(--orange); }
.hero .btn-row { margin-top: 32px; }

.hero-art { position: relative; justify-self: end; width: 100%; max-width: 380px; }
.hero-art::before {
  content: ""; position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(24, 210, 184, .22), rgba(255, 122, 26, .08) 60%, transparent);
  filter: blur(24px);
}
.hero-mark { position: relative; width: 100%; height: auto; display: block; }
.hero-mark rect { animation: blink 6s ease-in-out infinite; }
.hero-mark rect:nth-child(3n) { animation-delay: -1.4s; }
.hero-mark rect:nth-child(4n+1) { animation-delay: -2.9s; }
.hero-mark rect:nth-child(5n+2) { animation-delay: -4.3s; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .hero-mark rect { animation: none; } html { scroll-behavior: auto; } }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { grid-row: 1; justify-self: start; max-width: 160px; margin-bottom: -8px; }
}

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

.section { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; max-width: 30em; }

/* ---------- App cards (home) ---------- */

.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px) { .app-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .app-grid { grid-template-columns: 1fr; } }

.app-card {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; text-decoration: none; color: inherit;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.app-card:hover { border-color: rgba(24, 210, 184, .45); transform: translateY(-3px); background: var(--surface-2); color: inherit; }
.app-card .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-card h3 { margin: 0 0 4px; }
.app-card p { margin: 0; color: #B9C0CE; font-size: 16px; }
.app-card .meta { margin-top: auto; padding-top: 8px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; color: var(--muted); }
.app-card .go { color: var(--teal); font-weight: 600; font-size: 15px; }

.badge {
  display: inline-block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap;
}
.badge-live { color: var(--teal-hi); border-color: rgba(24, 210, 184, .45); background: rgba(24, 210, 184, .08); }
.badge-soon { color: var(--orange); border-color: rgba(255, 122, 26, .45); background: rgba(255, 122, 26, .07); }

/* App icons: real images, plus a CSS-built tile for Wordslot until its icon ships */
.app-icon { width: 72px; height: 72px; border-radius: 17px; flex-shrink: 0; box-shadow: 0 0 0 1px var(--line); }
.app-icon-lg { width: 112px; height: 112px; border-radius: 26px; }

.ws-icon {
  display: grid; place-items: center; background: linear-gradient(145deg, #2a1f55, #120d26);
}
.ws-icon span {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; width: 62%;
}
.ws-icon b {
  aspect-ratio: 1; border-radius: 5px; display: grid; place-items: center;
  font: 800 15px/1 var(--font); color: #120d26;
}
.app-icon-lg.ws-icon b { font-size: 24px; border-radius: 7px; }
.ws-icon b:nth-child(1) { background: #ffd23f; }
.ws-icon b:nth-child(2) { background: #2fe0ff; }
.ws-icon b:nth-child(3) { background: #ff3d8b; }
.ws-icon b:nth-child(4) { background: #7cf24a; }

/* ---------- About band ---------- */

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; }
@media (max-width: 820px) { .pillars { grid-template-columns: 1fr; } }
.pillar { border-top: 2px solid var(--teal); padding-top: 18px; }
.pillar:nth-child(2) { border-color: var(--orange); }
.pillar:nth-child(3) { border-color: var(--teal-lo); }
.pillar h3 { font-size: 19px; }
.pillar p { color: #B9C0CE; font-size: 16px; margin: 0; }

/* ---------- App pages ---------- */

.app-hero { padding: clamp(48px, 8vw, 88px) 0 clamp(40px, 6vw, 64px); }
.app-hero .head { display: flex; gap: 24px; align-items: center; margin-bottom: 28px; flex-wrap: wrap; }
.app-hero h1 { margin: 0 0 6px; }
.app-hero .tagline { margin: 0; color: var(--muted); font-size: 19px; }
.app-hero .btn-row { margin-top: 28px; }

.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 28px 0 0; padding: 0; list-style: none; font-family: var(--mono); font-size: 13.5px; color: var(--muted); }
.facts strong { color: var(--ink); font-weight: 600; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature h3 { font-size: 17.5px; margin-bottom: 6px; }
.feature p { margin: 0; color: #B9C0CE; font-size: 15.5px; }

.shots-tv { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.shots-phone { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 16px; justify-content: start; margin-top: 16px; }
@media (max-width: 700px) { .shots-tv { grid-template-columns: 1fr; } }
.shot { margin: 0; }
.shot img { border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.shot figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }

.note {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--orange);
  border-radius: var(--radius); padding: 18px 22px; color: #C3CAD8; font-size: 16px;
}
.note p:last-child { margin: 0; }

/* Wordslot mini board */
.board {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px;
  width: 100%; max-width: 300px; padding: 12px; border-radius: 18px;
  background: #120d26; border: 1px solid rgba(138, 92, 255, .35);
}
.board b {
  aspect-ratio: 1; border-radius: 6px; display: grid; place-items: center;
  font: 800 clamp(13px, 3vw, 18px)/1 var(--font); color: #120d26; background: rgba(217, 204, 255, .06);
}
.board b.y { background: #ffd23f; } .board b.c { background: #2fe0ff; }
.board b.p { background: #ff3d8b; } .board b.g { background: #7cf24a; }
.board b.w { background: #d9ccff; }
.board b.glow { box-shadow: 0 0 0 2px #fff, 0 0 18px rgba(124, 242, 74, .7); }

/* Cold Front visual */
.cf-panel {
  aspect-ratio: 21 / 8; min-height: 220px; border-radius: var(--radius-lg); border: 1px solid var(--line);
  background:
    radial-gradient(60% 80% at 75% 30%, rgba(122, 240, 205, .16), transparent 60%),
    radial-gradient(50% 70% at 20% 85%, rgba(255, 196, 77, .12), transparent 60%),
    repeating-linear-gradient(0deg, rgba(122, 240, 205, .06) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(122, 240, 205, .06) 0 1px, transparent 1px 40px),
    #10171a;
  display: grid; place-items: center; overflow: hidden; position: relative;
}
.cf-panel img { width: 30%; max-width: 160px; border-radius: 22%; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.cf-panel .hud {
  position: absolute; left: 16px; bottom: 14px; font-family: var(--mono); font-size: 12px;
  letter-spacing: .14em; color: rgba(122, 240, 205, .75); text-transform: uppercase;
}

/* ---------- Prose (support / privacy) ---------- */

.prose { max-width: 760px; }
.prose h2 { font-size: 27px; margin-top: 2.2em; }
.prose h3 { font-size: 19px; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
.page-head { padding: clamp(48px, 8vw, 88px) 0 8px; }
.page-head h1 { font-size: clamp(36px, 5.5vw, 56px); }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.toc a { display: inline-block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 15px; }
.toc a:hover { border-color: var(--teal); }

.contact-card {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 28px; margin: 28px 0 8px;
}
.contact-card h2 { font-size: 22px; margin: 0 0 4px; }
.contact-card p { margin: 0; color: var(--muted); }

details { border-bottom: 1px solid var(--line); padding: 4px 0; }
details summary {
  cursor: pointer; list-style: none; padding: 14px 32px 14px 0; font-weight: 620; position: relative;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+"; position: absolute; right: 4px; top: 10px; font-size: 22px; color: var(--teal); font-weight: 400;
}
details[open] summary::after { content: "–"; }
details > div { padding: 0 0 16px; color: #C3CAD8; }
details > div p:last-child { margin: 0; }

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

.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; margin-top: 32px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: start; }
.site-footer img { height: 34px; width: auto; margin-bottom: 10px; }
.site-footer p { margin: 0; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

/* ---------- 404 ---------- */

.lost { min-height: 60vh; display: grid; align-content: center; padding: 64px 0; }
.lost .code { font-family: var(--mono); color: var(--orange); letter-spacing: .2em; }

/* Two-column hero used by Wordslot (copy + board) */
.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 48px; align-items: center; }
.split .board { justify-self: end; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split .board { justify-self: start; } }
.prose .toc { padding-left: 0; }
