/* =========================================================
   RenderQ Media — light-reactive redesign
   The wand tip is the key light: script.js feeds CSS variables
   (--mx/--my globally, --x/--y per element, --power for
   Lumos/Nox) and CSS does the lighting.
   Themes: dark (default) and light (black / #0040FF / white).
   ========================================================= */

:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07070a;
  --bg-2: #0d0d12;
  --surface: #121219;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f3f1ec;
  --muted: #9a98a3;
  --dim: #5f5d68;

  --accent: #ff6a2b;
  --accent-2: #ffb347;
  --accent-3: #ff2f6e;
  --accent-rgb: 255, 106, 43;
  --on-accent: #0a0a0a;
  --btn-bg: #f3f1ec;
  --btn-fg: #0a0a0a;
  --ghost-hi: #ffffff;
  --light: 255, 138, 76;          /* rgb of the wand light (shifts per section) */

  --lit-1: #ffffff; --lit-2: #ffd2b0; --lit-3: #a19dab; --lit-4: #64626e;
  --spot-a: .13; --spot-blend: screen;
  --grain: .06; --grain-blend: normal;
  --nav-bg: rgba(7, 7, 10, .6);
  --overlay: rgba(5, 5, 8, .9);
  --chip: rgba(255, 255, 255, .04);
  --card-a: rgba(255, 255, 255, .035); --card-b: rgba(255, 255, 255, .01);
  --stroke-word: rgba(255, 255, 255, .55);
  --marquee-stroke: rgba(255, 255, 255, .35);
  --glow-a: rgba(255, 106, 43, .22); --glow-b: rgba(124, 108, 255, .15);
  --ring-a: rgba(255, 106, 43, .25); --ring-b: rgba(124, 108, 255, .12);
  --tile-tag: #ffb347;
  --logo-filter: none;

  --wand-hi: #f0cfa0; --wand-wood: #b07a4a; --wand-handle: #4a2c18; --wand-ring: #e8c48f;
  --tip-rgb: 255, 240, 214;

  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --radius: 22px;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .8, .2, 1);

  --mx: 50vw; --my: 40vh;
  --power: 0;                     /* 0 = Nox, 1 = Lumos */
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #f2f5ff;
  --surface: #ffffff;
  --line: rgba(0, 0, 0, 0.08);
  --line-2: rgba(0, 0, 0, 0.18);
  --text: #000000;
  --muted: #4a4f5e;
  --dim: #8b90a0;

  --accent: #0040ff;
  --accent-2: #2a5cff;
  --accent-3: #001a80;
  --accent-rgb: 0, 64, 255;
  --on-accent: #ffffff;
  --btn-bg: #0040ff;
  --btn-fg: #ffffff;
  --ghost-hi: #4d7bff;
  --light: 0, 64, 255;

  --lit-1: #0040ff; --lit-2: #2a5cff; --lit-3: #14161f; --lit-4: #000000;
  --spot-a: .10; --spot-blend: normal;
  --grain: .035; --grain-blend: multiply;
  --nav-bg: rgba(255, 255, 255, .72);
  --overlay: rgba(255, 255, 255, .92);
  --chip: rgba(0, 0, 0, .04);
  --card-a: rgba(0, 64, 255, .03); --card-b: rgba(0, 0, 0, .01);
  --stroke-word: rgba(0, 0, 0, .7);
  --marquee-stroke: rgba(0, 0, 0, .4);
  --glow-a: rgba(0, 64, 255, .16); --glow-b: rgba(0, 64, 255, .08);
  --ring-a: rgba(0, 64, 255, .18); --ring-b: rgba(0, 64, 255, .08);
  --tile-tag: #9db4ff;
  --logo-filter: invert(1);

  --wand-hi: #4a4a52; --wand-wood: #1a1a1f; --wand-handle: #000000; --wand-ring: #0040ff;
  --tip-rgb: 120, 160, 255;
}

/* Light mode: bold blue bands so the page isn't all white.
   Inside these, the tokens flip to white-on-blue. */
:root[data-theme="light"] .marquee,
:root[data-theme="light"] .services,
:root[data-theme="light"] .band__inner,
:root[data-theme="light"] .footer,
:root[data-theme="light"] .spellbook__head {
  --bg: #0040ff; --bg-2: #0040ff;
  --text: #ffffff; --muted: rgba(255, 255, 255, .8); --dim: rgba(255, 255, 255, .6);
  --line: rgba(255, 255, 255, .2); --line-2: rgba(255, 255, 255, .4);
  --accent: #ffffff; --accent-2: #ffffff; --accent-3: #cfdcff; --accent-rgb: 255, 255, 255; --on-accent: #0040ff;
  --btn-bg: #ffffff; --btn-fg: #0040ff; --ghost-hi: #ffffff;
  --light: 255, 255, 255;
  --lit-1: #ffffff; --lit-2: #eef2ff; --lit-3: #c4d2ff; --lit-4: #a9bdff;
  --chip: rgba(255, 255, 255, .1); --card-a: rgba(255, 255, 255, .12); --card-b: rgba(255, 255, 255, .04);
  --marquee-stroke: rgba(255, 255, 255, .65);
  --glow-a: rgba(255, 255, 255, .22); --glow-b: rgba(0, 0, 40, .25);
  background-color: #0040ff; color: var(--text);
}
:root[data-theme="light"] .services { background-image: radial-gradient(900px 500px at 90% 0%, rgba(255, 255, 255, .16), transparent 60%), radial-gradient(700px 400px at 0% 100%, rgba(0, 20, 120, .35), transparent 60%); }
:root[data-theme="light"] .hero { background: radial-gradient(900px 620px at 88% 45%, rgba(0, 64, 255, .16), transparent 62%), radial-gradient(600px 400px at 0% 0%, rgba(0, 64, 255, .07), transparent 60%); }
:root[data-theme="light"] .band { padding-top: 0; }
:root[data-theme="light"] .reviews .light-card,
:root[data-theme="light"] .about__frame,
:root[data-theme="light"] .form { background: linear-gradient(180deg, #f3f6ff, #ffffff); border-color: rgba(0, 64, 255, .18); }
:root[data-theme="light"] .review__quote { color: #0040ff; }
:root[data-theme="light"] .contact { background: linear-gradient(180deg, transparent, rgba(0, 64, 255, .06)); }

/* circular reveal when switching themes */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

*, *::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;
  -webkit-font-smoothing: antialiased;
  transition: background-color .5s, color .5s;
}
body.has-wand, body.has-wand a, body.has-wand button, body.has-wand select, body.has-wand label { cursor: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
::selection { background: var(--accent); color: var(--on-accent); }

/* ---------- Global light layers ---------- */
#dust, #sparks { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#dust { z-index: 0; }
#sparks { z-index: 290; }
.spotlight {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(calc(600px * (1 + var(--maxima, 0) * 1.5)) circle at var(--mx) var(--my), rgba(var(--light), var(--spot-a)), transparent 60%),
    radial-gradient(calc(160px * (1 + var(--maxima, 0) * 2)) circle at var(--mx) var(--my), rgba(var(--light), calc(var(--spot-a) * .8)), transparent 70%);
  mix-blend-mode: var(--spot-blend);
  opacity: var(--power);
}
.spotlight::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(380px circle at var(--mx) var(--my), #000 0%, transparent 70%);
          mask-image: radial-gradient(380px circle at var(--mx) var(--my), #000 0%, transparent 70%);
}
.grain {
  position: fixed; inset: -50%; pointer-events: none; z-index: 60; opacity: var(--grain); mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
main, .footer, .nav { position: relative; z-index: 2; }

/* ---------- Wand cursor ---------- */
.wand {
  position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none;
  width: 84px; height: 84px; margin: -6px 0 0 -6px;   /* tip (6,6) lands on the pointer */
  transform-origin: 6px 6px;
  opacity: 0; transition: opacity .25s;
  will-change: transform;
}
body.has-wand .wand { opacity: 1; }
body.has-wand.wand-away .wand { opacity: 0; }
.wand__svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(2px 4px 4px rgba(0, 0, 0, .35)); }
.w-hi { stop-color: var(--wand-hi); } .w-wood { stop-color: var(--wand-wood); } .w-handle { stop-color: var(--wand-handle); }
.w-handle-fill { fill: var(--wand-handle); } .w-ring { fill: var(--wand-ring); }
.wand__tip {
  position: absolute; left: 6px; top: 6px; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--tip-rgb), 1) 0 18%, rgba(var(--light), .7) 40%, transparent 70%);
  opacity: calc(.18 + var(--power) * .82);
  transform: scale(calc(.45 + var(--power) * .85));
  box-shadow: 0 0 calc(var(--power) * 26px) calc(var(--power) * 8px) rgba(var(--light), .55);
}
.wand.is-hover .wand__tip { transform: scale(calc(.7 + var(--power) * 1.1)); }
.wand__label {
  position: absolute; left: 22px; top: -30px; padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  font: 600 11px/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase;
  background: var(--btn-bg); color: var(--btn-fg);
  opacity: 0; transform: translateY(6px) scale(.9); transition: opacity .2s, transform .3s var(--ease);
}
.wand.is-label .wand__label { opacity: 1; transform: none; }

/* spell text that floats up from the wand tip */
.spell-pop {
  position: fixed; z-index: 301; pointer-events: none; white-space: nowrap;
  font: italic 800 clamp(22px, 3vw, 34px)/1 var(--font-display); letter-spacing: -.01em;
  color: rgb(var(--light)); text-shadow: 0 0 18px rgba(var(--light), .8);
  transform: translate(-50%, -100%); animation: spellPop 1.4s var(--ease) forwards;
}
@keyframes spellPop {
  0% { opacity: 0; transform: translate(-50%, -60%) scale(.6); }
  20% { opacity: 1; transform: translate(-50%, -110%) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -220%) scale(1); }
}

/* click ripple */
.ripple {
  position: fixed; pointer-events: none; z-index: 299; border-radius: 50%;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border: 1px solid rgba(var(--light), .9);
  animation: ripple .8s var(--ease) forwards;
}
.ripple--big { border-width: 2px; animation-duration: 1.2s; }
@keyframes ripple { to { transform: scale(18); opacity: 0; } }
.ripple--big { animation-name: rippleBig; }
@keyframes rippleBig { to { transform: scale(60); opacity: 0; } }

/* ---------- Spell dock ---------- */
.dock {
  position: fixed; left: 20px; bottom: 20px; z-index: 70; display: flex; gap: 8px;
  opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease) .8s, transform .6s var(--ease) .8s;
}
.is-loaded .dock { opacity: 1; transform: none; }
.dock__btn {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 999px;
  background: var(--nav-bg); border: 1px solid var(--line-2); color: var(--text);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 13px; font-weight: 600; transition: border-color .3s, box-shadow .3s, background .3s;
}
.dock__btn:hover { border-color: rgba(var(--light), .8); }
.dock__btn svg { width: 18px; height: 18px; }
.dock__orb {
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(var(--light), calc(.25 + var(--power) * .75));
  box-shadow: 0 0 calc(var(--power) * 14px) calc(var(--power) * 3px) rgba(var(--light), .8);
}
.dock__spell { font-family: var(--font-display); font-style: italic; letter-spacing: .01em; }
.dock__spell[aria-pressed="false"] { animation: beckon 2.6s ease-in-out 2s infinite; }
@keyframes beckon { 50% { box-shadow: 0 0 0 6px rgba(var(--light), .15), 0 0 30px rgba(var(--light), .35); } }
.dock__mic[aria-pressed="true"] { border-color: #ff3b3b; }
.dock__mic[aria-pressed="true"] svg { color: #ff3b3b; animation: blink 1.2s infinite; }
.dock__book[aria-expanded="true"] { border-color: rgb(var(--light)); box-shadow: 0 0 24px rgba(var(--light), .35); }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.dock__music[aria-pressed="false"] .eq i { height: 2px; }
.eq i { width: 3px; height: 4px; border-radius: 1px; background: currentColor; opacity: .6; }
.dock__music[aria-pressed="true"] .eq i { opacity: 1; animation: eq 1s ease-in-out infinite; background: rgb(var(--light)); }
.dock__music[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: -.3s; }
.dock__music[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: -.6s; }
.dock__music[aria-pressed="true"] .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }

/* ---------- Spellbook ---------- */
.spellbook {
  position: fixed; left: 20px; bottom: 78px; z-index: 72; width: min(400px, calc(100vw - 24px));
  max-height: min(70vh, 620px); display: flex; flex-direction: column; overflow: hidden;
  border-radius: 22px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5), 0 0 0 1px rgba(var(--accent-rgb), .08);
  transform-origin: 20px 100%; animation: bookIn .45s var(--ease);
}
.spellbook[hidden] { display: none; }
@keyframes bookIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.spellbook__head {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(300px 120px at 0 0, rgba(var(--accent-rgb), .18), transparent 70%);
}
.spellbook__head h2 { font: 800 24px/1 var(--font-display); letter-spacing: -.02em; margin: 0 0 6px; }
.spellbook__head p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.spellbook__close { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); flex: none; font-size: 13px; }
.spellbook__close:hover { background: var(--text); color: var(--bg); }
.spellbook__list { list-style: none; margin: 0; padding: 8px; overflow-y: auto; overscroll-behavior: contain; }
.spell {
  width: 100%; text-align: left; display: grid; grid-template-columns: 34px 1fr; gap: 2px 12px; align-items: center;
  padding: 11px 12px; border-radius: 14px; transition: background .25s;
}
.spell:hover, .spell:focus-visible { background: rgba(var(--accent-rgb), .1); outline: none; }
.spell__icon { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: var(--chip); border: 1px solid var(--line); }
.spell__name { font: italic 700 16px/1.2 var(--font-display); color: var(--accent-2); }
.spell__desc { font-size: 13px; color: var(--muted); line-height: 1.35; }
.spell.is-cast .spell__icon { animation: castPulse .7s var(--ease); }
@keyframes castPulse { 50% { transform: scale(1.25); box-shadow: 0 0 20px rgba(var(--accent-rgb), .6); } }

/* ---------- Spell effects ---------- */
.veil {
  position: fixed; inset: 0; z-index: 285; pointer-events: none; opacity: 0; transition: opacity .8s var(--ease);
  background: radial-gradient(ellipse at center, rgba(4, 10, 34, .35), rgba(1, 4, 20, .82));
}
.veil.is-on { opacity: 1; }
.flash {
  position: fixed; inset: 0; z-index: 286; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--mx) var(--my), #fff, rgba(var(--light), .85) 30%, rgba(var(--light), .25) 70%);
}
.flash.is-on { animation: flash 1.3s var(--ease) forwards; }
@keyframes flash { 0% { opacity: 0; } 12% { opacity: .95; } 100% { opacity: 0; } }

/* Wingardium Leviosa: things float up, sway, and settle back down */
body.leviosa .lv { animation: levitate var(--lv-dur, 4.4s) cubic-bezier(.45, 0, .55, 1) var(--lv-d, 0s) both; }
@keyframes levitate {
  0% { translate: 0 0; rotate: 0deg; }
  22% { translate: 0 var(--lv-h, -40px); rotate: var(--lv-r, 2deg); }
  50% { translate: 0 calc(var(--lv-h, -40px) * .7); rotate: calc(var(--lv-r, 2deg) * -1); }
  78% { translate: 0 var(--lv-h, -40px); rotate: var(--lv-r, 2deg); }
  100% { translate: 0 0; rotate: 0deg; }
}

/* Revelio: the page shows its hidden "render wireframe" */
body.revelio main :is(section, article, figure, h1, h2, h3, p, a, button, li, img, form, label, .frame) {
  outline: 1px dashed rgba(var(--light), .6); outline-offset: -1px;
}
body.revelio main img { filter: grayscale(1) contrast(1.5) brightness(1.15) !important; }
body.revelio main { animation: revelioTint 3.6s ease-in-out; }
@keyframes revelioTint { 10%, 85% { filter: hue-rotate(0deg) saturate(.6); } }
.scanline {
  position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 289; pointer-events: none;
  background: rgb(var(--light)); box-shadow: 0 0 24px 6px rgba(var(--light), .7);
  animation: scan 1.6s cubic-bezier(.6, 0, .4, 1) 2 alternate forwards;
}
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(100vh); } }

/* Obliviate: the page forgets itself, then comes back at the top */
body.obliviate :is(main, .footer, .nav) { animation: obliviate 2.2s var(--ease); }
@keyframes obliviate {
  0% { filter: none; opacity: 1; }
  40%, 55% { filter: blur(16px) grayscale(1); opacity: .15; }
  100% { filter: none; opacity: 1; }
}

/* Accio: the summoned heading glows as it arrives */
.summoned { animation: summoned 1.6s var(--ease); }
@keyframes summoned {
  0% { text-shadow: none; transform: scale(1); }
  30% { text-shadow: 0 0 40px rgba(var(--light), .9); transform: scale(1.05); }
  100% { text-shadow: none; transform: scale(1); }
}

.toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 80; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 14px; font-size: 14px; text-align: center;
  background: var(--btn-bg); color: var(--btn-fg);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  display: grid; place-items: center;
  transition: clip-path 1s var(--ease) .1s;
  clip-path: inset(0 0 0 0);
}
.loader.is-done { clip-path: inset(0 0 100% 0); }
.loader__inner { width: min(320px, 80vw); font-family: var(--font-display); }
.loader__label { display: block; font: 500 12px/1 var(--font-body); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.loader__count { display: block; font-size: clamp(64px, 14vw, 120px); font-weight: 800; line-height: 1; margin: 12px 0 18px; font-variant-numeric: tabular-nums; }
.loader__bar { height: 2px; background: var(--line); overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 14px var(--accent); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 18px var(--gutter);
  transition: background .4s, backdrop-filter .4s, padding .4s;
}
.nav.is-scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  padding-top: 12px; padding-bottom: 12px;
}
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); }
.logo__img {
  height: clamp(44px, 4vw, 56px); width: auto; display: block;
  filter: var(--logo-filter);
  transition: filter .4s var(--ease), height .4s var(--ease);
}
.logo:hover .logo__img { filter: var(--logo-filter) drop-shadow(0 0 10px rgba(var(--light), .85)) drop-shadow(0 0 24px rgba(var(--light), .45)); }
.nav.is-scrolled .logo__img { height: 36px; }
.logo__fallback { display: none; align-items: center; gap: 10px; }
.logo.is-fallback .logo__fallback { display: flex; }
.logo__mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; white-space: nowrap; letter-spacing: -.04em;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 0 0 24px rgba(var(--accent-rgb), .45);
}
.logo__mark span { opacity: .75; }
.logo__text { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.logo__text em { font-style: normal; color: var(--muted); font-weight: 500; margin-left: 4px; }
.nav__links { display: flex; gap: 6px; margin-left: auto; }
.nav__links a {
  position: relative; padding: 8px 14px; border-radius: 999px; color: var(--muted);
  font-size: 14px; font-weight: 500; transition: color .3s;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); transform: translateX(-50%) scale(0); transition: transform .3s var(--ease);
  box-shadow: 0 0 8px var(--accent);
}
.nav__links a.is-active::after { transform: translateX(-50%) scale(1); }

.theme-toggle {
  position: relative; width: 44px; height: 44px; border-radius: 50%; flex: none;
  border: 1px solid var(--line-2); display: grid; place-items: center; overflow: hidden;
  transition: border-color .3s, background .3s, transform .35s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); background: rgba(var(--accent-rgb), .08); }
.theme-toggle svg { width: 20px; height: 20px; grid-area: 1 / 1; transition: transform .6s var(--ease), opacity .4s; }
:root[data-theme="dark"] .theme-toggle__moon, :root:not([data-theme]) .theme-toggle__moon { transform: translateY(140%) rotate(-90deg); opacity: 0; }
:root[data-theme="light"] .theme-toggle__sun { transform: translateY(-140%) rotate(90deg); opacity: 0; }

.nav__burger { display: none; width: 44px; height: 44px; position: relative; }
.nav__burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); transition: transform .3s var(--ease); }
.nav__burger span:first-child { top: 17px; } .nav__burger span:last-child { top: 25px; }
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  --bx: 50%; --by: 50%;
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 28px; border-radius: 999px; overflow: hidden; isolation: isolate;
  font-weight: 600; font-size: 15px; letter-spacing: .01em;
  background: var(--btn-bg); color: var(--btn-fg);
  transition: transform .35s var(--ease), box-shadow .35s, color .3s;
  will-change: transform;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120px circle at var(--bx) var(--by), var(--accent-2), var(--accent) 45%, transparent 75%);
  opacity: 0; transition: opacity .3s;
}
.btn:hover::before { opacity: 1; }
.btn:hover { color: var(--on-accent); box-shadow: 0 10px 40px -8px rgba(var(--accent-rgb), .6); }
.btn span { position: relative; pointer-events: none; }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn--ghost:hover { color: var(--on-accent); border-color: transparent; }
.btn--ghost::before { background: radial-gradient(160px circle at var(--bx) var(--by), var(--ghost-hi), var(--accent-2) 60%, var(--accent)); }
.btn--small { padding: 11px 20px; font-size: 14px; }
.btn--big { padding: 22px 40px; font-size: 17px; }
.btn--full { width: 100%; margin-top: 6px; }

.link-arrow { display: inline-flex; gap: 10px; align-items: center; font-weight: 600; color: var(--accent-2); margin-top: 8px; }
.link-arrow span { transition: transform .3s var(--ease); }
.link-arrow:hover span { transform: translateX(6px); }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font-size: 12px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--accent); }
.hero .eyebrow::before { display: none; }
.rec { width: 8px; height: 8px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 10px #ff3b3b; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* Text lit by the wand: a radial gradient clipped to glyphs, centred on the tip.
   With Nox the lit radius shrinks to a faint glow. */
.lit-text {
  --tx: 50%; --ty: 50%;
  background: radial-gradient(calc(140px + 280px * var(--power)) circle at var(--tx) var(--ty), var(--lit-1) 0%, var(--lit-2) 18%, var(--lit-3) 46%, var(--lit-4) 80%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.lit-words .word {
  --tx: -999px; --ty: -999px;
  background: radial-gradient(calc(160px + 360px * var(--power)) circle at var(--tx) var(--ty), var(--lit-1) 0%, var(--lit-2) 16%, var(--lit-3) 42%, var(--lit-4) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lit-text .word--accent, .lit-words .word--accent {
  background: linear-gradient(100deg, var(--accent), var(--accent-2) 50%, var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh; padding: 140px var(--gutter) 80px;
  display: flex; flex-direction: column; justify-content: center; position: relative;
  overflow: hidden;
}
.hero__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(48px, 11vw, 176px); line-height: .9; letter-spacing: -.045em;
  margin: 0 0 32px;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .word { display: inline-block; transform: translateY(110%); transition: transform 1.1s var(--ease); }
.is-loaded .hero__title .word { transform: translateY(0); }
.is-loaded .hero__title .line:nth-child(2) .word { transition-delay: .08s; }
.is-loaded .hero__title .line:nth-child(3) .word { transition-delay: .16s; }
.hero__title .word--outline {
  -webkit-text-stroke: 1.5px var(--stroke-word);
  color: transparent; background: none; position: relative;
}
.hero__title .word--outline::after {
  content: attr(data-text); position: absolute; inset: 0; -webkit-text-stroke: 0;
  background: radial-gradient(calc(120px + 160px * var(--power)) circle at var(--wx, -999px) var(--wy, -999px), var(--accent-2), rgba(var(--accent-rgb), .6) 40%, transparent 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: calc(.25 + var(--power) * .75);
}
.hero__rotator { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 36px; }
.hero__rotator-label { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); }
.hero__rotator-word { font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 2.6vw, 32px); color: var(--accent-2); min-height: 1.3em; }
.hero__rotator-word::after { content: "▍"; color: var(--accent); animation: blink 1s infinite; margin-left: 2px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__meta { display: flex; gap: clamp(20px, 5vw, 64px); margin-top: 64px; flex-wrap: wrap; }
.hero__meta div { border-left: 1px solid var(--line-2); padding-left: 16px; }
.hero__meta b { display: block; font-family: var(--font-display); font-size: 20px; }
.hero__meta span { color: var(--muted); font-size: 14px; }

.hero__rings {
  position: absolute; right: -10vw; top: 50%; width: 70vw; max-width: 900px; aspect-ratio: 1;
  transform: translate(calc(var(--px, 0) * -30px), calc(-50% + var(--py, 0) * -30px));
  pointer-events: none; z-index: -1;
}
.hero__rings span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line); }
.hero__rings span:nth-child(1) {
  background: conic-gradient(from var(--ang, 0deg), transparent 0 70%, rgba(var(--light), .55) 85%, transparent 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  opacity: calc(.15 + var(--power) * .85);
}
.hero__rings span:nth-child(2) { inset: 14%; }
.hero__rings span:nth-child(3) {
  inset: 32%; border: 0; filter: blur(20px);
  background: radial-gradient(circle at 35% 35%, var(--ring-a), var(--ring-b) 50%, transparent 70%);
}
.scroll-hint { position: absolute; bottom: 28px; left: 50%; width: 26px; height: 42px; margin-left: -13px; border: 1px solid var(--line-2); border-radius: 20px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: scroll 1.8s infinite; }
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0; }
.marquee__track { display: flex; gap: 36px; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee span {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 4vw, 48px); white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px var(--marquee-stroke); transition: color .3s, -webkit-text-stroke-color .3s;
}
.marquee span:hover { color: var(--accent-2); -webkit-text-stroke-color: transparent; text-shadow: 0 0 30px rgba(var(--accent-rgb), .6); }
.marquee i { color: var(--accent); font-style: normal; align-self: center; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 12vw, 160px) var(--gutter); position: relative; }
.section__head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.section__head--row .section__sub { max-width: 380px; margin: 0; }
.section__title { font-family: var(--font-display); font-weight: 800; letter-spacing: -.035em; font-size: clamp(40px, 6.5vw, 96px); line-height: .95; margin: 0; }
.section__sub { color: var(--muted); font-size: 18px; margin-top: 20px; }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Light-reactive card ---------- */
.light-card {
  --x: 50%; --y: 50%; --rx: 0deg; --ry: 0deg; --glow: 0;
  position: relative; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-a), var(--card-b));
  border: 1px solid var(--line);
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .5s var(--ease), border-color .4s;
  isolation: isolate;
}
.light-card.is-tilting { transition: transform .08s linear, border-color .4s; }
.light-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(500px circle at var(--x) var(--y), rgba(var(--light), .16), transparent 45%);
  opacity: var(--glow); transition: opacity .4s;
}
.light-card::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
  background: radial-gradient(300px circle at var(--x) var(--y), rgba(var(--light), .95), var(--line-2) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: var(--glow); transition: opacity .4s;
}
.light-card .sheen { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; overflow: hidden; z-index: 3; }
.light-card .sheen::before {
  content: ""; position: absolute; width: 60%; height: 200%; top: -50%; left: -80%;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .12) 50%, transparent 70%);
  transform: skewX(-15deg);
}
.light-card:hover .sheen::before { left: 130%; transition: left .9s var(--ease); }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.lead { font-family: var(--font-display); font-size: clamp(24px, 3vw, 38px); line-height: 1.2; font-weight: 700; letter-spacing: -.02em; margin: 0 0 24px; }
.about__copy p:not(.lead) { color: var(--muted); font-size: 18px; max-width: 560px; }
.hi { color: var(--accent-2); display: inline-block; transition: transform .4s var(--ease); }
.hi:hover { transform: rotate(-8deg) scale(1.2); }
.about__frame { aspect-ratio: 4/3; padding: 0; overflow: hidden; }
.frame {
  position: absolute; inset: 18px; display: flex; flex-direction: column; justify-content: space-between;
  font: 500 12px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .1em; color: var(--muted);
  transform: translateZ(40px);
}
.frame::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background:
    linear-gradient(var(--text), var(--text)) top left / 22px 1px no-repeat,
    linear-gradient(var(--text), var(--text)) top left / 1px 22px no-repeat,
    linear-gradient(var(--text), var(--text)) top right / 22px 1px no-repeat,
    linear-gradient(var(--text), var(--text)) top right / 1px 22px no-repeat,
    linear-gradient(var(--text), var(--text)) bottom left / 22px 1px no-repeat,
    linear-gradient(var(--text), var(--text)) bottom left / 1px 22px no-repeat,
    linear-gradient(var(--text), var(--text)) bottom right / 22px 1px no-repeat,
    linear-gradient(var(--text), var(--text)) bottom right / 1px 22px no-repeat;
}
.frame__top, .frame__bottom { display: flex; gap: 16px; align-items: center; padding: 14px; }
.frame__top .frame__tc { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.frame__bottom { justify-content: space-between; }
.frame__center { text-align: center; position: relative; }
.frame__center p { font-family: var(--font-display); font-size: clamp(18px, 2vw, 24px); letter-spacing: -.01em; color: var(--text); line-height: 1.3; margin: 0; }
.frame__cross { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px; border: 1px solid rgba(var(--light), .5); border-radius: 50%; animation: focus 3s var(--ease) infinite; }
@keyframes focus { 0%, 100% { transform: scale(1.8); opacity: 0; } 50% { transform: scale(1); opacity: 1; } }

/* ---------- Services ---------- */
.services__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service { padding: 32px 28px 28px; min-height: 380px; display: flex; flex-direction: column; }
.service > * { transform: translateZ(30px); }
.service__num { font: 500 13px/1 ui-monospace, Menlo, monospace; color: var(--dim); }
.service__icon {
  width: 64px; height: 64px; margin: 40px 0 28px; border-radius: 18px; display: grid; place-items: center;
  background: var(--chip); border: 1px solid var(--line); color: var(--text);
  transition: color .4s, background .4s, box-shadow .4s, transform .5s var(--ease);
}
.service__icon svg { width: 30px; height: 30px; }
.service:hover .service__icon {
  color: var(--on-accent); background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 40px rgba(var(--accent-rgb), .55); transform: translateZ(60px) rotate(-6deg);
}
.service h3 { font-family: var(--font-display); font-size: 24px; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 12px; }
.service p { color: var(--muted); margin: 0 0 24px; font-size: 15px; }
.tags { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 12px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }

/* ---------- Portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; max-width: 760px; justify-content: flex-end; }
.filter { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: 13px; font-weight: 500; transition: color .3s, background .3s, border-color .3s; }
.filter:hover { color: var(--text); border-color: var(--text); }
.filter.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.work__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.tile {
  grid-column: span 4; aspect-ratio: 16/10; overflow: hidden; padding: 0; color: #fff;
  text-align: left; display: block; width: 100%; background: #0d0d12;
  transition: transform .5s var(--ease), opacity .5s var(--ease), border-color .4s;
}
.tile.is-wide { grid-column: span 8; aspect-ratio: auto; }
.tile.is-hidden { display: none; }
.tile.is-entering { animation: tileIn .7s var(--ease) both; }
@keyframes tileIn { from { opacity: 0; transform: translateY(30px) scale(.97); } }
.tile__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; border-radius: inherit;
  filter: grayscale(.85) brightness(.55) contrast(1.1);
  transform: scale(1.08) translate(calc(var(--px, 0) * 10px), calc(var(--py, 0) * 10px));
  transition: filter .6s var(--ease), transform .8s var(--ease);
}
.tile:hover .tile__img { filter: grayscale(0) brightness(.8) contrast(1.05); transform: scale(1.14) translate(calc(var(--px, 0) * 16px), calc(var(--py, 0) * 16px)); }
.tile__shade { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, .85)); }
.tile__body { position: absolute; inset: auto 0 0 0; padding: 22px 24px; transform: translateZ(40px); }
.tile__tags { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.tile__tags span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--tile-tag); }
.tile__tags span + span::before { content: "·"; margin-right: 6px; color: rgba(255, 255, 255, .4); }
.tile h3 { font-family: var(--font-display); font-size: clamp(20px, 2vw, 28px); line-height: 1.1; margin: 0; letter-spacing: -.02em; }
.tile__play {
  position: absolute; top: 20px; right: 20px; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .1); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .2); transform: translateZ(50px) scale(.85); opacity: .7;
  transition: transform .4s var(--ease), opacity .4s, background .4s;
}
.tile__play svg { width: 18px; height: 18px; margin-left: 3px; }
.tile:hover .tile__play { transform: translateZ(50px) scale(1); opacity: 1; background: var(--accent); }
.work__more { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 48px; }

/* ---------- Reviews ---------- */
.reviews__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.review { margin: 0; padding: 36px 32px 28px; display: flex; flex-direction: column; min-height: 320px; }
.review > * { transform: translateZ(26px); }
.review__quote { font-family: var(--font-display); font-size: 88px; line-height: .6; color: var(--accent); height: 40px; text-shadow: 0 0 30px rgba(var(--accent-rgb), .5); }
.review blockquote { margin: 0 0 28px; font-size: 19px; line-height: 1.5; letter-spacing: -.005em; }
.review figcaption { margin-top: auto; display: flex; align-items: center; gap: 14px; }
.review img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); }
.review b { display: block; font-weight: 600; }
.review small { color: var(--muted); }

/* ---------- CTA band ---------- */
.band { padding: 0 var(--gutter); }
.band__inner {
  padding: clamp(48px, 9vw, 120px) clamp(24px, 6vw, 96px); text-align: center; overflow: hidden;
  background:
    radial-gradient(800px 400px at 50% 120%, var(--glow-a), transparent 60%),
    radial-gradient(600px 300px at 10% -20%, var(--glow-b), transparent 60%),
    var(--bg-2);
}
.band__inner .eyebrow { justify-content: center; }
.band__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(32px, 5.4vw, 80px); line-height: 1; letter-spacing: -.035em; margin: 0 auto 44px; max-width: 1100px; }

/* ---------- Careers ---------- */
.jobs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.job {
  --x: 50%; position: relative; display: grid; grid-template-columns: 56px 1fr auto auto; gap: 24px; align-items: center;
  padding: 28px 8px; border-bottom: 1px solid var(--line); overflow: hidden; isolation: isolate;
}
.job::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(400px 120px at var(--x) 50%, rgba(var(--light), .14), transparent 70%);
  opacity: 0; transition: opacity .4s;
}
.job:hover::before { opacity: calc(.3 + var(--power) * .7); }
.job__emoji { font-size: 30px; transition: transform .5s var(--ease); }
.job:hover .job__emoji { transform: scale(1.25) rotate(-10deg); }
.job h3 { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 34px); letter-spacing: -.02em; margin: 0; line-height: 1.1; transition: transform .5s var(--ease); }
.job:hover h3 { transform: translateX(10px); }
.job p { color: var(--muted); margin: 6px 0 0; max-width: 560px; font-size: 15px; }
.job__meta { font-size: 13px; color: var(--muted); white-space: nowrap; }
.job__apply { padding: 10px 20px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; transition: background .3s, color .3s, border-color .3s; }
.job:hover .job__apply { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.contact__lines { margin: 40px 0 32px; display: grid; gap: 4px; }
.contact__line { display: block; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact__line small { display: block; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.contact__line span { font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 30px); font-weight: 700; letter-spacing: -.02em; word-break: break-word; }
a.contact__line:hover span { color: var(--accent-2); }
.socials { display: flex; gap: 10px; }
.socials a { width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: background .3s, color .3s, border-color .3s, box-shadow .3s; }
.socials a:hover { background: var(--text); color: var(--bg); box-shadow: 0 0 30px rgba(var(--light), .35); }
.socials svg { width: 20px; height: 20px; }

.form { padding: clamp(24px, 4vw, 40px); display: grid; gap: 14px; }
.form__tabs { display: flex; padding: 4px; border-radius: 999px; background: var(--chip); border: 1px solid var(--line); margin-bottom: 8px; }
.form__tab { flex: 1; padding: 10px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); transition: background .3s, color .3s; }
.form__tab.is-active { background: var(--text); color: var(--bg); }
.field { position: relative; display: block; }
.field[hidden] { display: none; }
.field input, .field textarea, .field select {
  width: 100%; padding: 26px 18px 10px; border-radius: 14px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--chip); border: 1px solid var(--line-2); outline: none; resize: vertical;
  transition: border-color .3s, background .3s, box-shadow .3s; appearance: none; -webkit-appearance: none;
}
.field--select::after { content: "▾"; position: absolute; right: 18px; top: 50%; transform: translateY(-30%); color: var(--muted); pointer-events: none; }
.field select option { background: var(--surface); color: var(--text); }
.field span { position: absolute; left: 19px; top: 18px; color: var(--muted); font-size: 16px; pointer-events: none; transition: font-size .25s, color .25s, top .25s; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent); background: rgba(var(--accent-rgb), .05); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .12);
}
.field input:focus + span, .field input:not(:placeholder-shown) + span,
.field textarea:focus + span, .field textarea:not(:placeholder-shown) + span,
.field--select span { top: 9px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #ff4d6d; }
.form__note { margin: 4px 0 0; font-size: 13px; color: var(--dim); text-align: center; }
.form__note.is-ok { color: var(--accent-2); }

/* ---------- Footer ---------- */
.footer { padding: 40px var(--gutter) 96px; border-top: 1px solid var(--line); overflow: hidden; }
.footer__big { font-family: var(--font-display); font-weight: 800; letter-spacing: -.06em; line-height: .8; font-size: clamp(64px, 19vw, 340px); text-align: center; margin-bottom: 32px; white-space: nowrap; user-select: none; }
.footer__row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.footer__row nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__row a:hover { color: var(--text); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; align-content: center; gap: 18px;
  padding: 24px; background: var(--overlay); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  animation: fade .4s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lightbox__frame {
  width: min(1100px, 100%); aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; background: #000;
  box-shadow: 0 40px 120px -20px rgba(var(--accent-rgb), .4); animation: pop .6s var(--ease);
}
@keyframes pop { from { transform: scale(.9) translateY(20px); opacity: 0; } }
.lightbox__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.lightbox__title { font-family: var(--font-display); font-size: 20px; margin: 0; text-align: center; }
.lightbox__close {
  position: absolute; top: 20px; right: 20px; z-index: 2; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line-2); font-size: 18px; transition: background .3s, color .3s;
}
.lightbox__close:hover { background: var(--text); color: var(--bg); }

/* ---------- 3D Patronus + Avada Kedavra layers ---------- */
#patronusCanvas, #burn { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#patronusCanvas { z-index: 289; filter: drop-shadow(0 0 10px rgba(160, 205, 255, .95)) drop-shadow(0 0 28px rgba(120, 170, 255, .6)); }
#burn { z-index: 288; transition: opacity .9s ease; filter: blur(1.5px); }

/* elements react to the Patronus: stepped on → pressed down, flown past → gust */
.stomped { translate: 0 var(--press, 10px) !important; transition: translate .12s ease-out !important; }
.unstomp { transition: translate .7s cubic-bezier(.34, 1.8, .5, 1) !important; }
.gust { animation: gust .9s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes gust { 30% { rotate: var(--gust, 2deg); translate: calc(var(--gust-x, 6px)) -4px; } 100% { rotate: 0deg; translate: 0 0; } }

/* Avada Kedavra screen shake */
body.quake :is(main, .nav, .footer) { animation: quake .6s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes quake {
  10%, 90% { transform: translate(-3px, 2px); } 20%, 80% { transform: translate(6px, -4px); }
  30%, 50%, 70% { transform: translate(-10px, 6px) rotate(-.4deg); } 40%, 60% { transform: translate(10px, -6px) rotate(.4deg); }
}
body.avada-tint :is(main, .nav, .footer) { filter: saturate(.4) brightness(1.1) sepia(.3) hue-rotate(60deg); transition: filter .2s; }

/* ---------- Footer: Investors dropdown ---------- */
.foot-dd { position: relative; }
.foot-dd__btn { color: var(--muted); font-size: 14px; transition: color .3s; }
.foot-dd__btn span { display: inline-block; font-size: 10px; transition: transform .3s var(--ease); }
.foot-dd__btn:hover, .foot-dd.is-open .foot-dd__btn { color: var(--text); }
.foot-dd.is-open .foot-dd__btn span { transform: rotate(180deg); }
.foot-dd__menu {
  position: absolute; right: 0; bottom: calc(100% + 12px); min-width: 230px; padding: 8px; border-radius: 16px; z-index: 5;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -14px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .25s, transform .3s var(--ease), visibility .25s;
}
:root[data-theme="light"] .footer .foot-dd__menu { --surface: #ffffff; --text: #000; --muted: #4a4f5e; --line-2: rgba(0, 0, 0, .12); color: #000; }
.foot-dd.is-open .foot-dd__menu, .foot-dd:focus-within .foot-dd__menu { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) { .foot-dd:hover .foot-dd__menu { opacity: 1; visibility: visible; transform: none; } }
.foot-dd__label { display: block; padding: 8px 12px 4px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.foot-dd__menu a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 500; }
.foot-dd__menu a:hover { background: rgba(var(--accent-rgb), .12); color: var(--text); }
:root[data-theme="light"] .footer .foot-dd__menu a:hover { background: rgba(0, 64, 255, .1); color: #0040ff; }

/* ---------- Ask Q assistant ---------- */
.ask-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 70; height: 50px; padding: 0 20px 0 8px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px;
  background: var(--btn-bg); color: var(--btn-fg); box-shadow: 0 14px 40px -10px rgba(var(--accent-rgb), .6);
  opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease) 1s, transform .6s var(--ease) 1s, box-shadow .3s;
}
.is-loaded .ask-fab { opacity: 1; transform: none; }
.ask-fab__orb {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 16px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--on-accent);
  animation: orbit 6s linear infinite;
}
@keyframes orbit { to { rotate: 360deg; } }
.ask-fab[aria-expanded="true"] { box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .25); }
.ask {
  position: fixed; right: 20px; bottom: 82px; z-index: 72; width: min(390px, calc(100vw - 24px)); height: min(580px, calc(100vh - 120px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 22px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55);
  transform-origin: 100% 100%; animation: bookIn .45s var(--ease);
}
.ask[hidden] { display: none; }
.ask__head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; border-bottom: 1px solid var(--line); background: radial-gradient(260px 100px at 0 0, rgba(var(--accent-rgb), .2), transparent 70%); }
:root[data-theme="light"] .ask__head { background: #0040ff; color: #fff; --muted: rgba(255, 255, 255, .8); --line-2: rgba(255, 255, 255, .4); }
.ask__avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--on-accent); flex: none; }
:root[data-theme="light"] .ask__avatar { background: #fff; color: #0040ff; }
.ask__head h2 { margin: 0; font: 800 19px/1.1 var(--font-display); }
.ask__head p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.ask__close { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 13px; }
.ask__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; animation: msgIn .35s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.msg--bot { align-self: flex-start; background: var(--chip); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg--me { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.msg a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
.msg__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.msg__actions button, .msg__actions a {
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; text-decoration: none;
  background: var(--btn-bg); color: var(--btn-fg);
}
.typing { display: inline-flex; gap: 4px; padding: 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typing 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.ask__chips { display: flex; gap: 6px; padding: 0 16px 10px; overflow-x: auto; scrollbar-width: none; }
.ask__chips button { flex: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12px; color: var(--muted); white-space: nowrap; transition: color .2s, border-color .2s; }
.ask__chips button:hover { color: var(--text); border-color: var(--accent); }
.ask__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.ask__form input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; font: inherit; font-size: 15px; color: var(--text); background: var(--chip); border: 1px solid var(--line-2); outline: none; }
.ask__form input:focus { border-color: var(--accent); }
.ask__form button { width: 46px; border-radius: 12px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.ask__form svg { width: 20px; height: 20px; }

/* ---------- Greeting, season toggle, weather ---------- */
.greet {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 18px; padding: 7px 14px 7px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap;
  border: 1px solid var(--line); background: var(--chip);
  animation: greetIn .8s var(--ease) 1.2s both;
}
@keyframes greetIn { from { opacity: 0; transform: translateX(-8px); } }
.greet__icon { font-size: 14px; line-height: 1; }
.season-toggle {
  position: relative; width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line-2); font-size: 18px; color: var(--text); transition: border-color .3s, background .3s, opacity .3s;
}
.season-toggle[hidden] { display: none; }
.season-toggle:hover { border-color: var(--accent); background: rgba(var(--accent-rgb), .08); }
.season-toggle[aria-pressed="false"] { opacity: .55; }
.season-toggle[aria-pressed="false"]::after {
  content: ""; position: absolute; width: 26px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(-45deg);
}
#weather { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 64; }

/* About frame: one tip per spell, click to cast */
.frame__tip {
  display: block; margin: 0 auto; max-width: 92%; cursor: pointer; text-align: center;
  font-family: var(--font-display); font-size: clamp(18px, 2vw, 24px); letter-spacing: -.01em; color: var(--text); line-height: 1.3;
  transition: color .3s;
}
.frame__tip:hover { color: var(--accent-2); }
.frame__tip.in { animation: tipIn .7s var(--ease); }
@keyframes tipIn { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }
.frame__tipn { display: block; margin-top: 14px; font: 500 11px/1 ui-monospace, Menlo, monospace; letter-spacing: .16em; color: var(--dim); }
.tc-reset { animation: tcReset .8s var(--ease); }
@keyframes tcReset { 0%, 40% { color: rgb(var(--light)); text-shadow: 0 0 12px rgba(var(--light), .9); } }
.dock__text.swap { animation: swapIn .45s var(--ease); }
@keyframes swapIn { from { opacity: 0; transform: translateY(8px); } }

/* Live caption of what the microphone heard */
.voice-cap {
  position: fixed; left: 20px; bottom: 78px; z-index: 71; max-width: min(420px, calc(100vw - 40px));
  display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 14px;
  font-size: 13px; line-height: 1.35; color: var(--text); background: var(--nav-bg);
  border: 1px solid var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease);
}
.voice-cap.is-on { opacity: 1; transform: none; }
.voice-cap b { color: rgb(var(--light)); font-family: var(--font-display); font-style: italic; }
.voice-cap__dot { width: 8px; height: 8px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 8px #ff3b3b; animation: blink 1.2s infinite; flex: none; }
.voice-cap__miss { color: var(--dim); }
.spellbook:not([hidden]) ~ .voice-cap { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .dock__mic .dock__text, .dock__book .dock__text, .dock__music .dock__text { display: none; }
  .dock__mic, .dock__book, .dock__music { width: 46px; padding: 0; justify-content: center; }
}
@media (max-width: 1100px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .tile, .tile.is-wide { grid-column: span 6; aspect-ratio: 16/10; }
  .job { grid-template-columns: 48px 1fr auto; }
  .job__meta { display: none; }
}
@media (max-width: 860px) {
  .nav__links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; align-items: center; gap: 8px;
    background: var(--bg); opacity: 0; pointer-events: none; transition: opacity .4s; z-index: -1;
  }
  .nav__links.is-open { opacity: 1; pointer-events: auto; }
  .nav__links a { font-family: var(--font-display); font-size: 36px; font-weight: 700; color: var(--text); }
  .nav__cta { display: none; }
  .season-toggle { margin-left: auto; }
  .season-toggle:not([hidden]) + .theme-toggle { margin-left: 0; }
  .season-toggle[hidden] + .theme-toggle { margin-left: auto; }
  .greet { margin-left: 10px; padding: 6px 10px; font-size: 12px; }
  .nav__burger { display: block; }
  .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .reviews__grid { grid-template-columns: 1fr; }
  .filters { justify-content: flex-start; }
  .hero__rings { width: 120vw; right: -50vw; opacity: .6; }
}
@media (max-width: 600px) {
  .greet__text { display: none; }
  .greet { padding: 6px 9px; }
  .services__grid { grid-template-columns: 1fr; }
  .service { min-height: 0; }
  .tile, .tile.is-wide { grid-column: span 12; }
  .job { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
  .job__emoji { font-size: 26px; }
  .job__apply { justify-self: start; }
  .hero { padding-top: 120px; }
  .hero__meta { margin-top: 40px; }
  .scroll-hint { display: none; }
  .dock { left: 12px; bottom: 12px; gap: 6px; }
  .dock__btn { height: 42px; padding: 0 13px; font-size: 12px; }
  .dock__mic .dock__text, .dock__book .dock__text, .dock__music .dock__text { display: none; }
  .dock__mic, .dock__book, .dock__music { width: 42px; padding: 0; justify-content: center; }
  .spellbook { left: 12px; bottom: 64px; }
  .ask-fab { right: 12px; bottom: 12px; height: 42px; padding: 0 3px; }
  .ask-fab__text { display: none; }
  .ask { right: 12px; bottom: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .marquee__track { animation: none; }
  .grain { display: none; }
}
