  /* Brand tokens, taken from the idents. Solus is a dark-only brand,
     so every theme resolves to the same warm charcoal palette. */
  :root {
    --ink: #232120;          /* ident background */
    --ink-deep: #181615;     /* hero / space */
    --ink-raised: #2c2927;
    --line: #3a3532;
    --gold: #ffae00;         /* ident gold */
    --gold-soft: #ffd27a;
    --paper: #f4f0ea;
    --muted: #a8a096;
    --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
    --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
    --display-tracking: 0.01em;
    color-scheme: dark;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) { --ink: #232120; --ink-deep: #181615; }
  }
  :root[data-theme="dark"] { --ink: #232120; --ink-deep: #181615; }

  :root { box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 72px); scroll-behavior: smooth; }
  *, *::before, *::after { box-sizing: inherit; margin: 0; padding: 0; }
  body {
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    overflow-x: hidden;
  }
  img { max-width: 100%; }
  a { color: inherit; }
  :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

  h1, h2, h3, .wordmark { font-family: var(--font-display); letter-spacing: var(--display-tracking); font-weight: 700; line-height: 1.1; }

  /* ===== Header ===== */
  #progress {
    position: fixed; top: 0; left: 0; height: 2px; width: 100%;
    background: var(--gold); transform-origin: 0 50%; transform: scaleX(0);
    z-index: 1100;
  }
  header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: calc(env(safe-area-inset-top, 0px) + 18px) clamp(20px, 6vw, 72px) 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    transition: background-color .3s ease, border-color .3s ease;
    border-bottom: 1px solid transparent;
  }
  header.scrolled { background: rgba(24, 22, 21, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom-color: var(--line); }
  .wordmark { display: block; line-height: 0; }
  .wordmark svg { height: 26px; width: auto; display: block; }
  nav ul { list-style: none; display: flex; gap: clamp(16px, 2.5vw, 32px); }
  nav a { text-decoration: none; font-size: .95rem; color: var(--muted); transition: color .2s ease; }
  nav a:hover, nav a[aria-current="true"] { color: var(--paper); }
  nav a[aria-current="true"] { box-shadow: inset 0 -2px 0 var(--gold); padding-bottom: 4px; }
  .menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--paper); font: inherit; font-size: .9rem; padding: 6px 14px; border-radius: 999px; cursor: pointer; }

  @media (max-width: 720px) {
    .menu-btn { display: inline-block; }
    nav { position: absolute; top: 100%; left: 0; right: 0; background: rgba(24,22,21,.97); border-bottom: 1px solid var(--line); display: none; }
    nav.open { display: block; }
    nav ul { flex-direction: column; gap: 0; padding: 8px clamp(20px, 6vw, 72px) 16px; }
    nav a { display: block; padding: 12px 0; font-size: 1.05rem; }
    nav a[aria-current="true"] { box-shadow: none; color: var(--gold); padding-bottom: 12px; }
  }

  /* ===== Hero ===== */
  #hero {
    position: relative; min-height: 100svh; overflow: hidden;
    background: var(--ink-deep);
    display: flex; align-items: flex-end;
    padding: 0 clamp(20px, 6vw, 72px) clamp(48px, 10vh, 110px);
  }
  #hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: crosshair; }
  .hero-copy { position: relative; z-index: 1; pointer-events: none; max-width: 100%; }
  .hero-copy .lockup { line-height: 0; }
  .hero-copy .lockup svg { width: clamp(260px, 52vw, 720px); height: auto; display: block; filter: drop-shadow(0 4px 24px rgba(0,0,0,.55)); }
  .hero-copy p { font-size: clamp(1.1rem, 2.2vw, 1.5rem); color: var(--gold-soft); margin-top: 1em; }
  .tagline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .7em; letter-spacing: .04em; }
  .tagline .sep {
    width: .42em; height: .42em; border-radius: 50%;
    border: 2px solid var(--gold); background: #050404;
    box-shadow: 0 0 8px rgba(255,174,0,.45);
    flex: none;
    /* sit on the baseline, then lift so the dot centres on the letters' optical middle (~0.3em) */
    align-self: baseline;
    transform: translateY(-0.09em);
  }
  .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  /* ===== Content sections ===== */
  /* content sits in a centred 1100px column; text inside it stays left-aligned */
  .band { padding: clamp(80px, 14vh, 160px) max(clamp(20px, 6vw, 72px), calc((100% - 1100px) / 2)); border-top: 1px solid var(--line); }
  .band > * { max-width: 1100px; }
  .band h2 { font-size: clamp(1.5rem, 3.4vw, 2.4rem); color: var(--gold); margin-bottom: 1.2em; }
  .lede { font-size: clamp(1.2rem, 2.4vw, 1.65rem); line-height: 1.45; max-width: 38ch; font-weight: 500; }
  .lede + p { margin-top: 1.2em; color: var(--muted); max-width: 60ch; }

  .games { list-style: none; display: grid; gap: 28px; }
  .game {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px 44px; align-items: center;
    background: var(--ink-raised); border: 1px solid var(--line); border-radius: 20px;
    padding: clamp(20px, 3.2vw, 40px);
    transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: border-color .3s ease, transform .25s ease-out, box-shadow .3s ease;
  }
  .game:hover, .game:focus-within { border-color: var(--gold); box-shadow: 0 18px 50px rgba(0,0,0,.35), 0 0 0 1px rgba(255,174,0,.15); }
  .game h3 { font-size: clamp(1.3rem, 3vw, 2rem); color: var(--paper); margin-bottom: .6em; }
  .game p { color: var(--muted); max-width: 46ch; }
  .game-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 1.4em; }
  .game-link {
    display: inline-block; text-decoration: none; font-weight: 600;
    background: var(--gold); color: #1d1a18; padding: 10px 20px; border-radius: 999px;
    transition: background-color .2s ease;
  }
  .game-link:hover { background: var(--gold-soft); }
  .game .price { font-size: .9rem; }
  .tray-wrap { margin: 0; }
  .tray-wrap figcaption { margin-top: 10px; font-size: .8rem; color: #8a8279; text-align: right; font-style: italic; }
  .game .tray-hint { font-size: .85rem; margin-top: 1.4em; color: #8a8279; }
  .tray {
    position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden;
    background: radial-gradient(120% 100% at 30% 20%, #221f1d, #151312);
    box-shadow: inset 0 2px 14px rgba(0,0,0,.65), inset 0 0 0 1px #34302d;
  }
  .tray canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: pointer; }
  .sunk {
    position: absolute; top: 12px; left: 12px; z-index: 1; pointer-events: none;
    display: flex; align-items: center; gap: 8px;
    padding: 5px 12px 5px 8px; border-radius: 999px;
    background: rgba(21,19,18,.75); box-shadow: inset 0 0 0 1px #34302d;
    color: var(--paper); font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums;
  }
  .sunk-dot { width: 12px; height: 12px; border-radius: 50%; background: #050404; border: 2px solid var(--gold); box-shadow: 0 0 6px rgba(255,174,0,.45); }
  .sunk.pop { animation: sunk-pop .45s ease-out; }
  @keyframes sunk-pop { 0% { transform: scale(1); } 35% { transform: scale(1.18); box-shadow: inset 0 0 0 1px var(--gold), 0 0 16px rgba(255,174,0,.35); } 100% { transform: scale(1); } }
  @media (prefers-reduced-motion: reduce) { .sunk.pop { animation: none; } }
  .works-divider { display: flex; align-items: center; gap: 16px; margin: clamp(56px, 8vh, 88px) 0 clamp(28px, 4vh, 40px); }
  .works-divider::before, .works-divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line)); }
  .works-divider::after { background: linear-gradient(90deg, var(--line), transparent); }
  .works-divider span {
    width: 12px; height: 12px; border-radius: 50%; flex: none;
    background: #050404; border: 2px solid var(--gold); box-shadow: 0 0 10px rgba(255,174,0,.45);
  }
  .works { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .work {
    background: var(--ink-raised); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
    transition: border-color .3s ease, box-shadow .3s ease;
  }
  .work:hover { border-color: var(--gold); box-shadow: 0 18px 50px rgba(0,0,0,.35); }
  .work canvas { display: block; width: 100%; aspect-ratio: 4 / 5; background: #151312; touch-action: pan-y; cursor: pointer; }
  .work-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 14px 18px 16px; border-top: 1px solid var(--line); }
  .work-signal { flex-basis: 100%; font-size: .8rem; color: #8a8279; letter-spacing: .02em; white-space: pre; overflow: hidden; }
  .work-signal::after { content: ""; display: inline-block; width: .45em; height: .9em; margin-left: 3px; vertical-align: -0.1em; background: var(--gold); opacity: .7; animation: signal-caret 1.1s steps(1) infinite; }
  @keyframes signal-caret { 50% { opacity: 0; } }
  @media (prefers-reduced-motion: reduce) { .work-signal::after { animation: none; } }
  .work-name { font-family: var(--font-display); font-weight: 700; letter-spacing: .06em; font-size: .9rem; color: var(--muted); white-space: pre; overflow: hidden; min-width: 0; }
  .work-status { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: #8a8279; white-space: nowrap; }
  .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: work-pulse 2.4s ease-in-out infinite; }
  @keyframes work-pulse { 0%, 100% { opacity: .35; box-shadow: 0 0 0 0 rgba(255,174,0,.45); } 50% { opacity: 1; box-shadow: 0 0 0 5px rgba(255,174,0,0); } }
  @media (max-width: 900px) { .works { grid-template-columns: 1fr; } .work canvas { aspect-ratio: 16 / 10; } }
  @media (prefers-reduced-motion: reduce) { .pulse { animation: none; opacity: .8; } }
  @media (max-width: 720px) { .game { grid-template-columns: 1fr; } }
  @media (prefers-reduced-motion: reduce) { .game { transform: none; transition: border-color .3s ease; } }

  #contact > p { color: var(--muted); max-width: 60ch; }
  .mail { position: relative; margin: 1.4em 0 1.2em; }
  .mail-address {
    font-family: var(--font-display); font-weight: 700; letter-spacing: var(--display-tracking);
    font-size: clamp(1.15rem, 4.4vw, 3.2rem); line-height: 1.25;
    color: var(--paper); text-decoration: none; display: inline-block;
  }
  .mail-address .grp { white-space: nowrap; display: inline-block; }
  .mail-address .ch { display: inline-block; will-change: transform; transition: color .2s ease; }
  .mail-address .at { color: var(--gold); }
  .mail-address:hover .ch { animation: ch-wave .6s ease-in-out; animation-delay: calc(var(--i) * 18ms); }
  @keyframes ch-wave { 50% { transform: translateY(-0.12em); color: var(--gold-soft); } }
  .mail-star {
    position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%;
    background: #050404; border: 2px solid var(--gold); box-shadow: 0 0 14px rgba(255,174,0,.55);
    opacity: 0; pointer-events: none; transition: opacity .6s ease;
  }
  .mail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
  .mail-copy {
    font: inherit; font-weight: 600; color: var(--paper); background: none; cursor: pointer;
    border: 1px solid var(--line); padding: 9px 19px; border-radius: 999px;
    transition: border-color .2s ease, color .2s ease;
  }
  .mail-copy:hover { border-color: var(--gold); }
  .mail-copy.done { border-color: var(--gold); color: var(--gold); }
  .flyer {
    position: fixed; z-index: 1300; pointer-events: none;
    width: var(--d); height: var(--d); margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2);
    border-radius: 50%; background: #050404; border: 2px solid var(--gold);
    box-shadow: 0 0 10px rgba(255,174,0,.6);
  }
  .flyer::before {                 /* comet tail, like the ident's slash */
    content: ""; position: absolute; right: 50%; top: 50%;
    width: calc(var(--d) * 3); height: 2px; transform: translateY(-50%);
    background: linear-gradient(90deg, rgba(255,174,0,0), rgba(255,174,0,.8));
    border-radius: 2px; z-index: -1;
  }
  @media (prefers-reduced-motion: reduce) { .mail-address:hover .ch { animation: none; } }

  footer { padding: 48px max(clamp(20px, 6vw, 72px), calc((100% - 1100px) / 2)) calc(48px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; background: var(--ink-deep); }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    header, nav a { transition: none; }
  }

  /* Logo sprite colours (kept here so no inline styles are needed) */
  .logo-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
  .logo-w { fill: #fff; }
  .logo-o { fill: #212121; }
  .logo-g { fill: var(--gold); }
