:root {
  --bg: #070B14;
  --panel: #0C1322;
  --line: #1E2840;
  --line-2: #2A3550;
  --text: #E8ECF5;
  --soft: #C3CBDB;
  --muted: #A3AEC4;
  --cyan: #5CE1E6;
  --cyan-hi: #9DF0F2;
  --amber: #F5B547;
  --lime: #9BF06B;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { overflow-x: clip; background: #05070d; }  /* no white flash between pages */
body { background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--body); overflow-x: hidden; }
a { color: var(--cyan); }
a:hover { color: var(--cyan-hi); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--cyan); color: var(--bg); padding: 12px 16px; border-radius: 8px; }
.skip:focus { left: 16px; }

/* Loading intro */
.intro { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: var(--bg); transition: opacity .8s ease, visibility .8s; }
.intro.done { opacity: 0; visibility: hidden; }
.intro { animation: intro-away .6s ease 4s forwards; }   /* safety: it always clears, even if the page's scripts never run */
@keyframes intro-away { to { opacity: 0; visibility: hidden; } }
.intro .wordmark { font-size: clamp(32px, 7vw, 64px); animation: flicker 1.4s steps(1) both; }

/* Neon wordmark */
.wordmark { font-family: var(--display); font-weight: 700; letter-spacing: .03em; color: #EFFFFF;
  text-shadow: 0 0 4px #fff, 0 0 12px var(--cyan), 0 0 28px var(--cyan), 0 0 56px rgba(92,225,230,.6); }
.wordmark .amp { color: #FFF4DE; text-shadow: 0 0 4px #fff, 0 0 12px var(--amber), 0 0 28px var(--amber), 0 0 56px rgba(245,181,71,.6); }

/* Header */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 16px clamp(16px, 4vw, 40px); background: linear-gradient(var(--bg), rgba(7,11,20,0)); }
.site-header .wordmark { font-size: 22px; text-decoration: none; display: inline-block; line-height: 44px; }
.wordmark-art img { display: block; height: 26px; width: auto; margin: 9px 0; filter: drop-shadow(0 0 6px rgba(92,225,230,.55)); }
.hero-copy h1 span { display: block; }
.site-header nav { display: flex; gap: 0; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 clamp(8px, .9vw, 14px); color: var(--soft); text-decoration: none; font-size: 15px; white-space: nowrap; border-radius: 999px; }
.site-header nav a:hover { color: var(--text); background: rgba(92,225,230,.08); }
.menu-btn { display: none; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(12,19,34,.7); color: var(--text); font: 600 15px var(--body); cursor: pointer; }
/* .nav-compact is set by js/site.js whenever the links don't fit (narrow windows, browser zoom). */
.nav-compact .menu-btn { display: inline-flex; align-items: center; }
.nav-compact .site-header nav { display: none; flex-basis: 100%; flex-direction: column; padding: 8px; border-radius: 16px; background: rgba(12,19,34,.96); border: 1px solid var(--line); }
.nav-compact.menu-open .site-header nav { display: flex; }

/* Hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
#brain { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-fallback { position: absolute; inset: 0; display: none; background:
  radial-gradient(circle at 68% 48%, rgba(255,255,255,.9) 0, rgba(92,225,230,.8) 3%, rgba(92,225,230,.18) 16%, transparent 34%),
  radial-gradient(circle at 40% 25%, rgba(92,225,230,.35), transparent 14%),
  radial-gradient(circle at 88% 30%, rgba(245,181,71,.35), transparent 14%),
  radial-gradient(circle at 72% 82%, rgba(155,240,107,.3), transparent 14%), var(--bg); }
/* The approved still of the grown brain, for devices without 3D. */
.hero-fallback { background: url(../assets/home/hero-fallback.webp) 70% 50% / cover no-repeat, var(--bg); }
.no-webgl .hero-fallback { display: block; }
.no-webgl #brain { display: none; }

.hero-copy { position: absolute; z-index: 5; left: clamp(16px, 5vw, 72px); bottom: clamp(32px, 9vh, 96px); max-width: min(560px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 18px; pointer-events: none; }
.hero-copy > * { pointer-events: auto; }
.hero-copy h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(30px, min(5.2vw, 7.4vh), 68px); line-height: 1.02; }
.hero-copy p { margin: 0; font-size: clamp(15px, min(1.4vw, 2.3vh), 19px); color: var(--soft); max-width: 46ch; }

/* Scroll cue */
.scroll-cue { position: absolute; z-index: 5; left: 50%; bottom: 14px; transform: translateX(-50%); display: inline-flex; flex-direction: column; align-items: center; gap: 10px; min-height: 44px; padding: 4px 14px; color: var(--cyan); text-decoration: none; font-size: 13px; text-shadow: 0 0 10px rgba(92,225,230,.7); }
.scroll-cue .chev { width: 14px; height: 14px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); filter: drop-shadow(0 0 6px var(--cyan)); animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { translate: 0 0; } 50% { translate: 0 6px; } }

/* Sections below the hero */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.band { padding: clamp(64px, 10vh, 112px) 0; border-top: 1px solid var(--line); }
.band h2 { margin: 0 0 28px; font-family: var(--display); font-size: clamp(30px, 4.4vw, 48px); line-height: 1.08; }
.band p { color: var(--soft); max-width: 60ch; margin: 0; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.brand-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; overflow: hidden; transition: border-color .3s, box-shadow .3s; }
.brand-card::before { content: ""; position: absolute; inset: -40% 40% 60% -40%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 35%, transparent), transparent 70%); pointer-events: none; }
.brand-card:hover, .brand-card:focus-visible { color: var(--text); border-color: var(--c); box-shadow: 0 0 40px color-mix(in srgb, var(--c) 30%, transparent); }
.brand-card h3 { margin: 0; font-family: var(--display); font-size: 24px; }
/* Each project's own approved art, bleeding to the card edges and fading into it. */
.brand-art { position: relative; display: block; width: calc(100% + 56px); max-width: none; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin: -28px -28px 4px;
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent);
  filter: brightness(.88); transition: transform .6s ease, filter .6s ease; }
.brand-card:hover .brand-art, .brand-card:focus-visible .brand-art { transform: scale(1.04); filter: brightness(1.05) saturate(1.1); }
.brand-card p { font-size: 15px; }
.brand-card .go { margin-top: auto; padding-top: 8px; color: var(--c); font-weight: 600; }
.split { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.split h2 { margin-bottom: 12px; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-row a { display: inline-flex; align-items: center; min-height: 44px; color: var(--soft); }
.support-btn { gap: 8px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); text-decoration: none; }
.support-btn:hover { color: var(--text); box-shadow: 0 0 18px rgba(92,225,230,.35); }
[data-support][hidden] { display: none !important; }
.support-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.support-card p { margin: 0; color: var(--soft); }
.support-card .btn { gap: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 999px; border: 0; font: 600 16px var(--body); text-decoration: none; cursor: pointer; transition: box-shadow .3s, background .3s; will-change: transform; }
/* The energised Ignite button: a charge running round its edge, crackling sparks and a breathing glow. */
@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.btn-ignite { z-index: 6; min-width: 150px; color: #04121a; font-size: 17px; font-weight: 700; letter-spacing: .04em; isolation: isolate;
  /* moving plasma surface, kept light so the dark label stays readable */
  background: radial-gradient(circle at var(--px, 30%) 40%, #ffffff 0, #c8fbff 25%, transparent 55%), radial-gradient(circle at var(--qx, 75%) 70%, #b3a8ff 0, transparent 45%), linear-gradient(120deg, #7ff0f4, #5CE1E6 45%, #9DF0F2);
  box-shadow: 0 0 24px rgba(92,225,230,.6), 0 0 60px rgba(92,225,230,.25);
  animation: beckon 2.2s ease-in-out infinite, plasma 3.4s ease-in-out infinite alternate, heartbeat 1.6s ease-in-out infinite; }
@property --px { syntax: '<percentage>'; inherits: false; initial-value: 30%; }
@property --qx { syntax: '<percentage>'; inherits: false; initial-value: 75%; }
@keyframes plasma { 0% { --px: 20%; --qx: 80%; } 50% { --px: 65%; --qx: 35%; } 100% { --px: 40%; --qx: 70%; } }
@keyframes heartbeat { 0%, 100% { filter: brightness(1); } 12% { filter: brightness(1.18); } 24% { filter: brightness(1.02); } 36% { filter: brightness(1.12); } }
.ignite-fx { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; transition: opacity .3s; }
.btn-ignite::before { content: ""; position: absolute; inset: -3px; z-index: -1; border-radius: inherit; background: conic-gradient(from var(--spin), transparent 0 60%, #fff 70%, var(--cyan) 78%, transparent 86%); animation: charge 1.6s linear infinite; }
.btn-ignite::after { content: ""; position: absolute; inset: -10px; z-index: -2; border-radius: inherit; pointer-events: none;
  background: radial-gradient(2px 2px at 12% 20%, #fff, transparent), radial-gradient(2px 2px at 88% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 92%, #fff, transparent), radial-gradient(1.5px 1.5px at 25% 85%, #fff, transparent);
  animation: crackle .9s steps(3) infinite; }
.urge .btn-ignite { animation-duration: 1.2s; }
.urge .btn-ignite::before { animation-duration: .9s; }
.btn-ignite:hover { box-shadow: 0 0 44px rgba(92,225,230,.9); }
.btn-ignite[aria-pressed="true"] { min-width: 0; font-size: 14px; min-height: 44px; padding: 0 18px; animation: none; background: transparent; color: var(--cyan); box-shadow: inset 0 0 0 1px var(--cyan); }
.btn-ignite[aria-pressed="true"]::before, .btn-ignite[aria-pressed="true"]::after { display: none; }
@keyframes charge { to { --spin: 360deg; } }
@keyframes crackle { 0% { opacity: .9; transform: rotate(0); } 33% { opacity: .2; transform: rotate(40deg); } 66% { opacity: .7; transform: rotate(-30deg); } }

/* Power cable from the button to the core, and the ignition flash */
.cable { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.cable path { fill: none; stroke: rgba(92,225,230,.28); stroke-width: 1.5; stroke-dasharray: 3 7; animation: flow 1.2s linear infinite; }
.cable circle { fill: #fff; filter: drop-shadow(0 0 8px var(--cyan)) drop-shadow(0 0 16px var(--cyan)); opacity: 0; }
.surging .cable circle { opacity: 1; }
.surging .cable path { stroke: rgba(157,240,242,.9); stroke-width: 2.5; }
.lit .cable { opacity: 0; transition: opacity .4s; }
@keyframes flow { to { stroke-dashoffset: -20; } }
.flash { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; background: radial-gradient(circle at 62% 45%, #fff, rgba(157,240,242,.6) 30%, transparent 70%); }
.flash.go { animation: flash .7s ease-out; }
@keyframes flash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
#brain.chroma { filter: drop-shadow(4px 0 rgba(255,40,120,.55)) drop-shadow(-4px 0 rgba(0,240,255,.55)); }
.door { margin-top: 14px; transition: opacity .6s ease, margin-top .6s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.lit .door { margin-top: 0; }
.lit li:nth-child(1) .door { transition-delay: .9s; }
.lit li:nth-child(2) .door { transition-delay: 1.2s; }
.lit li:nth-child(3) .door { transition-delay: 1.5s; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--cyan); }

/* Brand doors, positioned over each nebula by the script */
.doors { list-style: none; margin: 0; padding: 0; }
.door { position: absolute; left: 0; top: 0; z-index: 6; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: rgba(12,19,34,.72); backdrop-filter: blur(6px); color: var(--text); text-decoration: none; font: 600 14px var(--body); white-space: nowrap;
  border: 1px solid var(--c); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 45%, transparent);
  opacity: 0; pointer-events: none; transition: opacity .6s ease, box-shadow .3s; }
.door::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
/* Patch 1.0.1: each door is a round glowing emblem with its name underneath (owner, 29 Oct 2026). */
.door:has(.door-inner) { padding: 6px 8px; border: 0; border-radius: 18px; background: none; backdrop-filter: none; box-shadow: none; }
.door:has(.door-inner)::before { display: none; }
.door-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; transform-origin: 50% 30%; will-change: transform; }
.door-emblem { display: block; width: 56px; height: 56px; border-radius: 50%; background: #0c1322;
  box-shadow: 0 0 0 2px var(--c), 0 0 22px color-mix(in srgb, var(--c) 55%, transparent); transition: box-shadow .3s; }
.door-name { font: 600 13px/1.2 var(--body); color: var(--text); text-shadow: 0 1px 6px #000, 0 0 2px #000; }
.door-name .short { display: none; }
.door:hover .door-emblem, .door:focus-visible .door-emblem { box-shadow: 0 0 0 2px var(--c), 0 0 40px var(--c); }
.door:has(.door-inner):hover, .door:has(.door-inner):focus-visible { box-shadow: none; }
.door:hover, .door:focus-visible { color: var(--text); box-shadow: 0 0 40px var(--c); }
.lit .door { opacity: 1; pointer-events: auto; }
.lit.flying .door { opacity: 0; }
.door, .btn, .brand-card { -webkit-tap-highlight-color: transparent; }
.no-webgl .doors { position: absolute; z-index: 6; right: 16px; top: 96px; display: flex; flex-direction: column; gap: 10px; }
.no-webgl .door { position: static; opacity: 1; pointer-events: auto; }

/* Fly-in curtain and "coming next" panel (demo only) */
.curtain { position: fixed; inset: 0; z-index: 30; background: var(--bg); opacity: 0; visibility: hidden; display: grid; place-items: center; padding: 24px; transition: opacity .5s, visibility .5s; }
.curtain.on { opacity: 1; visibility: visible; }
.curtain-box { max-width: 460px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.curtain-box h2 { margin: 0; font-family: var(--display); font-size: 32px; }
.curtain-box p { margin: 0; color: var(--soft); }

/* Cursor glow (fine pointers only) */
.cursor-glow { position: fixed; left: 0; top: 0; z-index: 4; width: 420px; height: 420px; margin: -210px 0 0 -210px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(92,225,230,.10), transparent 60%); opacity: 0; transition: opacity .4s; }
@media (pointer: fine) { .cursor-glow.on { opacity: 1; } }

.hint { position: absolute; z-index: 5; right: clamp(16px, 4vw, 40px); bottom: 24px; margin: 0; font-size: 13px; color: var(--muted); }
@media (max-height: 560px) { .hint, .scroll-cue { display: none; } }

@keyframes flicker { 0% { opacity: 0; } 10% { opacity: 1; } 14% { opacity: .2; } 20% { opacity: 1; } 26% { opacity: .4; } 32%, 100% { opacity: 1; } }
@keyframes beckon { 0%, 100% { box-shadow: 0 0 0 0 rgba(92,225,230,.5), 0 0 24px rgba(92,225,230,.4); } 50% { box-shadow: 0 0 0 10px rgba(92,225,230,0), 0 0 30px rgba(92,225,230,.6); } }

@media (max-width: 600px) {
  .hero-copy h1 { font-size: clamp(26px, 8vw, 38px); }
  .hero-copy p { font-size: 15px; line-height: 1.5; }
  .btn { min-height: 46px; padding: 0 20px; }
  .long { display: none; }
}
@media (max-width: 640px) {
  .hero-copy { bottom: 60px; gap: 12px; }
  .hint { display: none; }
  .door { font-size: 13px; padding: 0 12px; }
  /* Phones: short names, smaller resting emblems. Each arrives a little larger, then eases into place
     (transform only, so nothing reflows) and leaves the brain clear. */
  .door:has(.door-inner) { padding: 4px 6px; }
  .door-emblem { width: 44px; height: 44px; }
  .door-name { font-size: 12px; }
  .door-name .long { display: none; }
  .door-name .short { display: inline; }
  .door-inner { transform: scale(1.45); transition: transform 1s cubic-bezier(.22, 1, .36, 1) .7s; }
  .door.arrived .door-inner { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .brand-card:hover .brand-art, .brand-card:focus-visible .brand-art { transform: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Header order: nav on the right; on narrow screens the Menu button comes before the nav. */
.site-header nav { order: 2; margin-left: auto; }
.nav-compact .menu-btn { order: 3; }
.nav-compact [data-theme="axel"] .site-header nav, .nav-compact .site-header nav { order: 4; margin-left: 0; }

/* Patch 1.0.1: footer links are at least 44 px wide to tap. */
.footer-row a { min-width: 44px; justify-content: center; }

/* Patch 1.0.1: swipe between the project pages on touch screens (js/swipe.js). */
.swipe-dots { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 10px); z-index: 20; transform: translateX(-50%);
  display: flex; gap: 2px; padding: 0 6px; border-radius: 999px; background: rgba(8,12,22,.55); backdrop-filter: blur(6px); }
.swipe-dots a { display: grid; place-items: center; width: 28px; height: 28px; }
.swipe-dots a::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); transition: transform .2s, background .2s; }
.swipe-dots a[aria-current="page"]::before { background: #fff; transform: scale(1.25); }
.swipe-out-next { animation: swipeOutNext .25s ease-in forwards; }
.swipe-out-prev { animation: swipeOutPrev .25s ease-in forwards; }
.swipe-in-next { animation: swipeInNext .3s ease-out; }
.swipe-in-prev { animation: swipeInPrev .3s ease-out; }
@keyframes swipeOutNext { to { transform: translateX(-30%); opacity: 0; } }
@keyframes swipeOutPrev { to { transform: translateX(30%); opacity: 0; } }
@keyframes swipeInNext { from { transform: translateX(30%); opacity: 0; } }
@keyframes swipeInPrev { from { transform: translateX(-30%); opacity: 0; } }