@font-face { font-family: "Agera Gothic"; src: url("assets/fonts/AgeraGothic-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Agera Gothic"; src: url("assets/fonts/AgeraGothic-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Agera Gothic"; src: url("assets/fonts/AgeraGothic-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Agera Gothic"; src: url("assets/fonts/AgeraGothic-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --lime: #D7FF00;
  --ink: #0a0a0b;
  --ink-2: #141416;
  --text: #f4f4f1;
  --muted: rgba(244, 244, 241, .62);
  --line: rgba(244, 244, 241, .12);
  --fg-rgb: 244, 244, 241; /* foreground as rgb, for translucent lines/text */
  --ink-rgb: 10, 10, 11;
  --accent-text: var(--lime); /* lime text — swapped for a readable olive on light */
  --tip: #fff; /* small highlights (star tip, sparkles) */
  color-scheme: dark;
  --ar: "Alexandria", system-ui, sans-serif;
  --lat: "Agera Gothic", "Alexandria", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--ink); }
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--ar);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* branded scrollbar + text selection; the thumb uses --accent-text so it stays visible in the light theme */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--accent-text); border: 3px solid var(--ink); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--text); }
::-webkit-scrollbar-corner { background: var(--ink); }
@supports not selector(::-webkit-scrollbar) { /* Firefox */
  html { scrollbar-color: var(--accent-text) var(--ink); scrollbar-width: thin; }
}
::selection { background: var(--lime); color: #0a0a0b; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Scroll scene ---------- */
.hero { position: relative; height: 860vh; }
.stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 50% 55%, rgba(215, 255, 0, .06), transparent 70%),
    var(--ink);
}
.stage::before { /* faint dot grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(var(--fg-rgb), .07) 1px, transparent 1.5px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

/* ---------- Top bar ---------- */
.topbar {
  position: absolute; z-index: 20; inset: 0 0 auto 0;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px clamp(16px, 4vw, 48px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand-name { font-family: var(--lat); font-weight: 900; font-size: 15px; letter-spacing: .06em; direction: ltr; }
.brand-name span { font-weight: 400; color: var(--accent-text); margin-inline-start: 6px; }
.nav { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav a { transition: color .2s; }
.nav a:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--ar); font-weight: 600; white-space: nowrap;
  border-radius: 999px; transition: transform .2s, background-color .2s, color .2s;
}
.btn:active { transform: scale(.96); }
.btn-small { font-size: 13px; padding: 9px 18px; border: 1px solid var(--line); }
.btn-small:hover { border-color: var(--lime); color: var(--accent-text); }
.btn-primary { background: var(--lime); color: var(--ink); padding: .85em 1.8em; }
.btn-primary:hover { background: var(--text); color: var(--ink); }
.btn-ghost { border: 1px solid rgba(var(--fg-rgb), .25); padding: .85em 1.6em; background: rgba(var(--ink-rgb), .5); backdrop-filter: blur(6px); }
.btn-ghost span { font-size: .7em; color: var(--accent-text); }
.btn-ghost:hover { border-color: var(--lime); }

.top-actions { display: flex; align-items: center; gap: 10px; }
.sound {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: none; color: var(--text); cursor: pointer; display: grid; place-items: center;
  transition: border-color .2s, color .2s, transform .2s;
}
.sound:hover { border-color: var(--lime); color: var(--accent-text); }
.sound:active { transform: scale(.94); }
.sound svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound .spk { fill: currentColor; stroke: none; }
.sound .mute { display: none; }
.sound[aria-pressed="false"] .wave { display: none; }
.sound[aria-pressed="false"] .mute { display: block; }

/* ---------- Intro (empty puzzle) ---------- */
.intro {
  position: absolute; z-index: 6; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  text-align: center; pointer-events: none;
}
.kicker { font-family: var(--lat); font-weight: 700; font-size: 12px; letter-spacing: .35em; color: var(--accent-text); direction: ltr; }
.intro-title {
  font-weight: 900; line-height: 1.05;
  font-size: clamp(40px, 7vw, 96px);
  margin: 14px 0 18px;
}
.intro-hint { color: var(--muted); font-size: 14px; }
.mouse {
  display: block; margin: 18px auto 0; width: 22px; height: 34px;
  border: 1.5px solid rgba(var(--fg-rgb), .4); border-radius: 12px; position: relative;
}
.mouse span {
  position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px;
  background: var(--lime); border-radius: 2px; animation: wheel 1.6s ease-in-out infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(-3px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(9px); } }

/* wind streaks of the tornado, drawn per frame behind the pieces */
.wind { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }

/* ---------- Board & pieces ---------- */
.board {
  position: absolute; z-index: 5; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  --glow: 0;
}
.board::after { /* completion glow */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(215, 255, 0, .8), 0 0 60px 4px rgba(215, 255, 0, .25);
  opacity: var(--glow);
}
.ghost { position: absolute; z-index: 0; }
.pieces { position: absolute; inset: 0; z-index: 1; }
.piece { position: absolute; will-change: transform; } /* its shadow is baked into the canvas */
.piece .inner {
  position: relative;
  animation: bob 3.2s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.piece canvas { display: block; }
/* hero pieces are only grabbable while they lie scattered (before the first scroll), and only on their shape */
.piece, .piece .inner, .piece canvas { pointer-events: none; }
.board.playable .piece canvas { pointer-events: auto; cursor: grab; touch-action: none; }
.board.playable .piece.held canvas { cursor: grabbing; }
.piece.held { filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .55)) drop-shadow(0 0 12px rgba(215, 255, 0, .35)); }
@keyframes bob {
  0%, 100% { transform: translate3d(0, -8px, 0) rotate(-3deg); }
  50% { transform: translate3d(0, 8px, 0) rotate(3deg); }
}
.stage.calm .piece .inner { animation: none; } /* once the storm takes the pieces, the idle bob is switched off */

.seamless { /* the clean artwork; a soft-edged mask wipes it in left → right */
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none;
  visibility: hidden; /* shown only from the final sweep on */
  --wipe: -35%;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--wipe) - 7%), transparent calc(var(--wipe) + 7%));
  mask-image: linear-gradient(90deg, #000 calc(var(--wipe) - 7%), transparent calc(var(--wipe) + 7%));
}
.seamless.clean { -webkit-mask-image: none; mask-image: none; } /* fully revealed: no mask to composite */
.sheen { position: absolute; inset: 0; z-index: 3; overflow: hidden; pointer-events: none; mix-blend-mode: screen; visibility: hidden; } /* shown only during the final sweep */
.sheen span {
  position: absolute; inset: -10% auto -10% 0; width: 35%;
  background: linear-gradient(100deg, transparent, rgba(215, 255, 0, .22), rgba(255, 255, 255, .18), transparent);
  transform: translateX(-150%) skewX(-12deg);
}

.cta { position: absolute; z-index: 4; display: flex; gap: 12px; opacity: 0; visibility: hidden; }


/* ---------- The missing piece ---------- */
.piece.key { z-index: 5; filter: drop-shadow(0 0 14px rgba(215, 255, 0, .55)) drop-shadow(0 10px 18px rgba(0, 0, 0, .6)); }
.hole { position: absolute; opacity: 0; pointer-events: none; }
.hole canvas { display: block; animation: hole 1.1s ease-in-out infinite alternate; }
@keyframes hole { from { opacity: .45; } to { opacity: 1; } }
.key-caption {
  position: absolute; z-index: 7; left: 0; right: 0; bottom: 8vh;
  text-align: center; font-weight: 400; font-size: clamp(18px, 2.4vw, 28px);
  opacity: 0; visibility: hidden; pointer-events: none;
}
.key-caption b { font-weight: 900; color: var(--accent-text); }

/* ---------- Shared section bits ---------- */
.section-title {
  font-weight: 900; line-height: 1.05; color: var(--lime);
  font-size: clamp(44px, 6.5vw, 96px);
  margin: 10px 0 0;
}

.values-copy .kicker, .partners-head .kicker { text-align: right; }

/* ---------- Values ---------- */
.values { position: relative; height: 420vh; border-top: 1px solid var(--line); }
.values-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4vw;
  padding: 90px clamp(16px, 6vw, 96px) 60px;
  background:
    radial-gradient(45% 55% at 28% 55%, rgba(215, 255, 0, .10), transparent 70%),
    var(--ink);
}
.values-stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--fg-rgb), .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--fg-rgb), .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.values-copy { position: relative; z-index: 1; }
.value-list { position: relative; margin-top: clamp(24px, 4vh, 48px); min-height: clamp(190px, 30vh, 260px); }
.value {
  position: absolute; inset: 0 0 auto 0;
  opacity: 0; transform: translateY(26px); filter: blur(6px);
  transition: opacity .5s ease, transform .6s cubic-bezier(.2, .7, .2, 1), filter .5s ease;
  pointer-events: none;
}
.value.is-active { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.value h3 { font-weight: 900; font-size: clamp(38px, 5.2vw, 76px); line-height: 1.1; }
.value p { margin-top: 14px; max-width: 34ch; color: var(--muted); font-size: clamp(16px, 1.35vw, 20px); line-height: 1.9; }

.values-visual { display: grid; place-items: center; position: relative; z-index: 1; }
.orbit { position: relative; width: min(40vw, 64vh); aspect-ratio: 1; }
.orbit::before, .orbit::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.orbit::before { inset: 15%; border: 1px dashed rgba(var(--fg-rgb), .14); }
.orbit::after { inset: 4%; border: 1px solid rgba(215, 255, 0, .12); }
.star3d {
  position: absolute; inset: 22%; width: 56%; height: 56%; overflow: visible;
  filter: drop-shadow(0 0 28px rgba(215, 255, 0, .55)) drop-shadow(0 18px 40px rgba(0, 0, 0, .6));
  animation: star-float 5s ease-in-out infinite;
}
@keyframes star-float { 0%, 100% { translate: 0 -6px; } 50% { translate: 0 6px; } }
.star-tip { fill: var(--tip); filter: drop-shadow(0 0 6px var(--tip)); }
.orbit-label {
  position: absolute; font-weight: 800; white-space: nowrap;
  font-size: clamp(18px, 2.2vw, 30px); color: rgba(var(--fg-rgb), .35);
  transition: color .4s ease, text-shadow .4s ease, scale .4s ease;
}
.orbit-label.is-active { color: var(--accent-text); text-shadow: 0 0 22px rgba(215, 255, 0, .6); scale: 1.12; }
.orbit { cursor: pointer; }
.orbit-label:hover { color: rgba(var(--fg-rgb), .7); }
.orbit-label.is-active:hover { color: var(--accent-text); }
.orbit-label:focus-visible { outline: 2px solid var(--lime); outline-offset: 6px; border-radius: 6px; }
.pos-top { top: 0; left: 50%; translate: -50% -40%; }
.pos-bottom { bottom: 0; left: 50%; translate: -50% 40%; }
.pos-right { right: 0; top: 50%; translate: 30% -50%; }
.pos-left { left: 0; top: 50%; translate: -30% -50%; }
.mini-star { position: absolute; fill: var(--lime); opacity: .85; filter: drop-shadow(0 0 12px rgba(215, 255, 0, .7)); }
.mini-star.a { width: 9%; top: 12%; right: 14%; animation: star-float 4s ease-in-out infinite reverse; }
.mini-star.b { width: 6%; bottom: 16%; left: 12%; fill: var(--tip); animation: star-float 3.4s ease-in-out infinite; }

/* ---------- Partners ---------- */
.partners { position: relative; height: 300vh; border-top: 1px solid var(--line); }
.partners-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: minmax(260px, 1fr) auto; align-items: center; gap: 5vw;
  padding: 80px clamp(16px, 6vw, 96px) 40px;
}
.partners-head { align-self: center; }
.partners-sub { margin-top: 18px; max-width: 30ch; color: var(--muted); font-size: clamp(16px, 1.35vw, 20px); line-height: 1.9; }
/* lime picture frame hung on the wall around the puzzle */
.partners-frame {
  --fw: clamp(12px, 1.5vw, 22px);
  position: relative; padding: var(--fw); border-radius: 3px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .55), transparent 28%, transparent 72%, rgba(0, 0, 0, .22)),
    linear-gradient(180deg, #e6ff4a, #d7ff00 45%, #b9de00);
  box-shadow:
    0 34px 60px -10px rgba(0, 0, 0, .75),
    0 0 90px rgba(215, 255, 0, .16),
    inset 0 1px 0 rgba(255, 255, 255, .75),
    inset 0 -2px 0 rgba(0, 0, 0, .25);
  transform-origin: 50% -46px; /* swings from the nail */
}
.partners-frame::before { /* inner bevel of the moulding */
  content: ""; position: absolute; inset: calc(var(--fw) - 5px); pointer-events: none;
  border: 5px solid; border-color: #8fae00 #ecff7a #ecff7a #8fae00;
}
.partners-frame.nudge { animation: frame-swing 1.6s cubic-bezier(.3, .6, .3, 1) 1; }
@keyframes frame-swing {
  0% { rotate: 0deg; } 18% { rotate: 1.6deg; } 40% { rotate: -1deg; }
  62% { rotate: .5deg; } 82% { rotate: -.2deg; } 100% { rotate: 0deg; }
}
.partners-mat {
  position: relative; padding: clamp(6px, .8vw, 10px);
  background: #0b0b0c;
  box-shadow: inset 0 6px 16px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(0, 0, 0, .6);
}
.frame-wire {
  position: absolute; left: 25%; width: 50%; bottom: 100%; height: 46px; overflow: visible;
  fill: none; stroke: rgba(var(--fg-rgb), .35); stroke-width: 1.2; vector-effect: non-scaling-stroke;
}
.frame-wire path { vector-effect: non-scaling-stroke; }
.frame-nail {
  position: absolute; left: 50%; bottom: calc(100% + 40px); width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #9a9a9a 55%, #444);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .7);
}
.partners-board { position: relative; }.partners-board .pp { position: absolute; will-change: transform; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.partners-board .pp .inner { transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.partners-board.done .pp:hover { z-index: 3; }
.partners-board.done .pp:hover .inner { transform: translateY(-6px) scale(1.06); }
.partners-board canvas { display: block; }
.partners-board .pp.key { z-index: 2; filter: drop-shadow(0 0 18px rgba(215, 255, 0, .65)); animation: key-glow 1.4s ease-in-out infinite alternate; }
@keyframes key-glow { from { filter: drop-shadow(0 0 8px rgba(215, 255, 0, .35)); } to { filter: drop-shadow(0 0 26px rgba(215, 255, 0, .9)); } }
.partners-cta {
  grid-column: 1; align-self: end; margin-bottom: 4vh;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  opacity: 0; visibility: hidden;
}
.partners-cta p { font-size: clamp(16px, 1.4vw, 20px); color: var(--muted); }
.partners-cta b { color: var(--text); font-weight: 800; }
.partners-cta .btn { font-size: 15px; }

.partners-board.done .pp { cursor: pointer; }
/* hits land only on the (outline-clipped) canvas, not on the square wrappers around it */
.partners-board .pp, .partners-board .pp .inner { pointer-events: none; }
.partners-board .pp canvas { pointer-events: auto; }

/* things you drag, spin or click shouldn't highlight like text */
.pp-pop, .pp-pop *, .board, .board *, .partners-board, .partners-board *, .orbit, .orbit *, .cursor, .cursor * {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.pp-pop svg text, .pp-pop-stack svg { -webkit-user-select: none; user-select: none; }

/* ---------- Partner piece pop-up ---------- */
.pp-pop { position: fixed; inset: 0; z-index: 100; }
.pp-pop-backdrop {
  position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(60% 60% at 50% 50%, rgba(215, 255, 0, .10), transparent 70%), rgba(var(--ink-rgb), .82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.pp-pop-stage { position: absolute; inset: 0; perspective: 1100px; pointer-events: none; }
.pp-pop-piece {
  position: absolute; left: 50%; top: 50%;
  transform-style: preserve-3d; pointer-events: auto; cursor: grab; touch-action: none;
}
.pp-pop-piece.dragging { cursor: grabbing; }
.pp-pop-stack { position: absolute; left: 0; top: 0; transform-origin: 0 0; transform-style: preserve-3d; }
.pp-pop-stack svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* only the piece's own shape is grabbable: the square box and the cut-ins let clicks through to the backdrop */
.pp-pop-piece, .pp-pop-stack, .pp-pop-stack svg, .pp-pop-stack svg * { pointer-events: none; }
.pp-pop-stack svg > path, .pp-pop-stack svg > g > path { pointer-events: visiblePainted; }
.pp-pop-stack .front, .pp-pop-stack .back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.pp-pop-shadow { /* soft contact shadow under the floating piece */
  position: absolute; left: 50%; top: 50%; width: min(46vw, 420px); height: 60px;
  margin: min(24vw, 26vh) 0 0 calc(min(46vw, 420px) / -2);
  background: radial-gradient(closest-side, rgba(0, 0, 0, .75), transparent);
  filter: blur(6px); opacity: 0; pointer-events: none;
}
.pp-pop-hint {
  position: absolute; left: 0; right: 0; bottom: 6vh; text-align: center;
  color: var(--muted); font-size: 14px; opacity: 0; pointer-events: none;
}

/* ---------- Light theme ---------- */
:root[data-theme="light"] {
  --ink: #efefe9;
  --ink-2: #e6e6df;
  --text: #0d0d0e;
  --muted: rgba(13, 13, 14, .64);
  --line: rgba(13, 13, 14, .12);
  --fg-rgb: 13, 13, 14;
  --ink-rgb: 239, 239, 233;
  --accent-text: #5d7400;
  --tip: #0d0d0e;
  color-scheme: light;
}
/* big lime titles don't read on off-white: dark title with a lime bar under it */
:root[data-theme="light"] .section-title { color: var(--text); }
:root[data-theme="light"] .section-title::after {
  content: ""; display: block; width: 1.3em; height: .12em; margin-top: .14em;
  background: var(--lime); border-radius: 99px;
}
:root[data-theme="light"] .orbit-label.is-active { text-shadow: 0 0 18px rgba(215, 255, 0, .9); }
:root[data-theme="light"] .stage { background: radial-gradient(60% 50% at 50% 55%, rgba(200, 240, 0, .16), transparent 70%), var(--ink); }

/* the puzzle wipe that carries the theme change */
.theme-wipe { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 9500; }
.theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }
/* ---------- Custom cursor (mouse only) ---------- */
html.has-cursor, html.has-cursor * { cursor: none !important; }
.cursor {
  position: fixed; left: 0; top: 0; z-index: 10000; pointer-events: none;
  opacity: 0; transition: opacity .2s ease;
}
.cursor.is-visible { opacity: 1; }
.cursor-tilt { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.cursor-piece {
  position: absolute; width: 30px; height: 30px; left: -15px; top: -15px; overflow: visible;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .55));
  transition: transform .38s cubic-bezier(.3, 1.6, .45, 1), filter .3s ease;
}
.cursor.is-hover .cursor-piece {
  transform: rotate(90deg) scale(1.55);
  filter: drop-shadow(0 0 10px rgba(215, 255, 0, .75)) drop-shadow(0 3px 5px rgba(0, 0, 0, .55));
}
.cursor.is-down .cursor-piece { transform: scale(.8); transition-duration: .1s; }
.cursor.is-hover.is-down .cursor-piece { transform: rotate(90deg) scale(1.25); }
.cursor-label {
  position: absolute; top: 20px; left: 18px; white-space: nowrap;
  font: 700 11px/1 var(--ar); color: #0a0a0b; background: var(--lime);
  padding: 5px 9px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0, 0, 0, .45);
  opacity: 0; transform: translateY(4px) scale(.9); transform-origin: 0 0;
  transition: opacity .2s ease, transform .25s cubic-bezier(.3, 1.4, .5, 1);
}
.cursor.has-label .cursor-label { opacity: 1; transform: none; }
/* on the light theme the chip flips: dark chip, lime text */
:root[data-theme="light"] .cursor-label { background: #0d0d0e; color: var(--lime); box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }

/* =========================================================
   Inner pages + shared chrome (about / services / work / contact)
   ========================================================= */
:root {
  --tray: #1a1a1c; --tray-edge: #0c0c0d; --tray-piece: #222225;
  --tray-seam: rgba(255, 255, 255, .08); --tray-hole: #060607;
}
:root[data-theme="light"] {
  --tray: #ffffff; --tray-edge: #cfcfc6; --tray-piece: #f3f3ee;
  --tray-seam: rgba(0, 0, 0, .1); --tray-hole: #d6d6ce;
}

/* fixed header on inner pages, frosted once you scroll */
.topbar--page {
  position: fixed; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
.topbar--page.is-scrolled {
  background: rgba(var(--ink-rgb), .78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-color: var(--line);
}
.nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--lime); padding-bottom: 4px; }

.btn-dark { background: #0a0a0b; color: var(--lime); padding: .95em 2.1em; font-size: 16px; }
.btn-dark:hover { background: #1c1c1e; }

/* ---------- page opening ---------- */
.page-hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 4vw;
  padding: 120px clamp(16px, 6vw, 96px) 70px; overflow: hidden;
  background: radial-gradient(50% 55% at 25% 55%, rgba(215, 255, 0, .08), transparent 70%);
}
.page-hero .kicker { text-align: right; }
.page-title { font-weight: 900; font-size: clamp(44px, 6.2vw, 100px); line-height: 1.08; margin: 14px 0 24px; }
.page-title .hl { color: var(--accent-text); }
:root[data-theme="light"] .page-title .hl {
  color: var(--text);
  background: linear-gradient(transparent 58%, var(--lime) 58% 90%, transparent 90%);
}
.lead { color: var(--muted); font-size: clamp(16px, 1.3vw, 20px); line-height: 2; max-width: 46ch; }
.lead b { color: var(--text); font-family: var(--lat); font-weight: 900; letter-spacing: .04em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-actions .btn { font-size: 15px; }

/* the 3D tray */
.tray-scene { position: relative; display: grid; place-items: center; perspective: 1400px; min-height: 420px; }
.tray-scene::after { /* soft floor shadow */
  content: ""; position: absolute; left: 50%; top: 62%; width: 70%; height: 22%; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); filter: blur(10px); z-index: -1;
}
.tray {
  position: relative; width: min(36vw, 430px); aspect-ratio: 1;
  transform: rotateX(54deg) rotateZ(-36deg); transform-style: preserve-3d;
}
.tray > svg, .tray-piece > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tray-piece { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.tray-shadow { filter: blur(6px); }
.tray-face { filter: drop-shadow(0 0 1px rgba(0, 0, 0, .3)); }

/* ---------- why us ---------- */
.reasons { position: relative; height: 260vh; border-top: 1px solid var(--line); }
.reasons-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: minmax(240px, .8fr) auto; align-items: center; gap: 5vw;
  padding: 90px clamp(16px, 6vw, 96px) 40px;
}
.reasons-head .kicker { text-align: right; }
.reasons-sub { margin-top: 18px; color: var(--muted); font-size: clamp(16px, 1.3vw, 19px); line-height: 1.9; max-width: 26ch; }
.reasons-board { position: relative; justify-self: start; transition: filter .5s ease; }
.reasons-board.locked { filter: drop-shadow(0 0 26px rgba(215, 255, 0, .28)); }
.reason { position: absolute; box-sizing: border-box; isolation: isolate; display: flex; flex-direction: column; justify-content: center; }
.reason-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: -1; }
.reason-shape path { fill: var(--ink-2); stroke: rgba(var(--fg-rgb), .14); stroke-width: 1.2; transition: stroke .5s ease; }
:root[data-theme="light"] .reason-shape path { fill: #ffffff; }
.reasons-board.locked .reason-shape path { stroke: rgba(215, 255, 0, .75); }
:root[data-theme="light"] .reasons-board.locked .reason-shape path { stroke: rgba(130, 165, 0, .9); }
.reason-num { font-family: var(--lat); font-weight: 900; font-size: 13px; letter-spacing: .22em; color: var(--accent-text); direction: ltr; text-align: right; }
.reason h3 { font-weight: 800; font-size: clamp(17px, 1.55vw, 24px); margin: 8px 0 8px; }
.reason p { color: var(--muted); font-size: clamp(13px, .98vw, 15px); line-height: 1.85; }

/* ---------- vision ---------- */
.vision { position: relative; height: 220vh; border-top: 1px solid var(--line); }
.vision-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; place-items: center; padding: 90px clamp(16px, 6vw, 96px) 40px;
}
.vision-year {
  position: absolute; font-family: var(--lat); font-weight: 900; line-height: 1; direction: ltr;
  font-size: clamp(150px, 30vw, 470px); color: transparent;
  -webkit-text-stroke: 1.5px rgba(215, 255, 0, .2); pointer-events: none; user-select: none;
}
:root[data-theme="light"] .vision-year { -webkit-text-stroke-color: rgba(120, 160, 0, .28); }
.vision-copy { position: relative; text-align: center; max-width: 920px; }
.vision-copy .kicker { text-align: center; }
:root[data-theme="light"] .vision .section-title::after { margin-inline: auto; }
.vision-text { margin-top: 26px; font-weight: 800; font-size: clamp(22px, 3.1vw, 46px); line-height: 1.65; }
.vision-text .w { opacity: .14; }
.vision-star { position: absolute; fill: var(--lime); filter: drop-shadow(0 0 18px rgba(215, 255, 0, .7)); animation: star-float 5s ease-in-out infinite; }
.vision-star.s1 { width: 86px; top: 16%; right: 12%; }
.vision-star.s2 { width: 52px; bottom: 18%; left: 14%; animation-duration: 4s; }
.vision-star.s3 { width: 30px; top: 30%; left: 24%; fill: var(--tip); animation-duration: 3.4s; }

/* ---------- call to action band ---------- */
.cta-band { padding: 40px clamp(16px, 6vw, 96px) 100px; }
.cta-band-inner {
  position: relative; overflow: hidden; border-radius: 28px;
  background: var(--lime); color: #0a0a0b;
  padding: clamp(36px, 6vw, 76px); display: grid; gap: 14px; justify-items: start;
}
.cta-band h2 { font-weight: 900; font-size: clamp(30px, 4.4vw, 62px); line-height: 1.15; }
.cta-band p { font-size: clamp(16px, 1.3vw, 19px); opacity: .78; }
.cta-band .btn { margin-top: 10px; }

/* ---------- footer (every page) ---------- */
.site-footer { position: relative; background: var(--ink-2); padding: 72px clamp(16px, 6vw, 96px) 26px; }
.footer-edge { /* a row of puzzle tabs along the top edge */
  position: absolute; left: 0; right: 0; top: 0; height: 20px; translate: 0 -100%;
  background: radial-gradient(circle at 50% 100%, var(--ink-2) 11px, transparent 11.5px) 0 0 / 64px 20px repeat-x;
}
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer-col a, .footer-col .placeholder { overflow-wrap: anywhere; } /* the domain can't wrap otherwise and pushed the page wider on phones */
.footer-brand p { margin-top: 18px; color: var(--muted); line-height: 1.9; max-width: 32ch; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer-col h3 { font-family: var(--ar); font-weight: 800; font-size: 14px; color: var(--accent-text); margin-bottom: 4px; }
.footer-col a { color: var(--muted); transition: color .2s ease; }
.footer-col a:hover { color: var(--text); }
.footer-col .placeholder { color: var(--muted); opacity: .7; border-bottom: 1px dashed var(--line); padding-bottom: 2px; }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; font-family: var(--lat); font-weight: 700; font-size: 13px; direction: ltr;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.socials a:hover { border-color: var(--lime); color: var(--accent-text); transform: translateY(-2px); }
.footer-bottom {
  margin-top: 54px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px;
}
.footer-bottom > span:first-child { font-family: var(--lat); direction: ltr; }

/* ---------- placeholder pages (until each page is built) ---------- */
.soon { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 14px; padding: 140px 16px 80px; }
.soon .kicker { text-align: center; }
.soon p { color: var(--muted); }

@media (max-width: 760px) {
  .page-hero { grid-template-columns: 1fr; padding-top: 104px; gap: 20px; }
  .tray-scene { min-height: 320px; }
  .tray { width: min(72vw, 340px); }
  .reasons { height: auto; }
  .reasons-stage { position: relative; height: auto; grid-template-columns: 1fr; padding: 80px 16px 70px; gap: 36px; }
  .reasons-board { justify-self: center; }
  .vision { height: 170vh; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .reasons, .vision { height: auto; }
  .reasons-stage, .vision-stage { position: relative; height: auto; min-height: 100vh; }
  .vision-star { animation: none; }
}

/* =========================================================
   Services page
   ========================================================= */
/* three big pieces in the opening */
.svc-hero-pieces {
  --s: min(12.5vw, 190px);
  position: relative; justify-self: center; width: calc(var(--s) * 3); height: var(--s);
  perspective: 1200px;
}
.svc-hero-piece {
  position: absolute; display: grid; place-content: center; text-align: center; gap: 6px;
  width: calc(var(--s) * (1 + 2 * var(--pad, .28))); height: calc(var(--s) * (1 + 2 * var(--pad, .28)));
  left: calc(var(--c) * var(--s) - var(--s) * var(--pad, .28)); top: calc(var(--s) * var(--pad, .28) * -1);
  transform: rotateX(16deg) rotateY(-12deg); transition: transform .45s cubic-bezier(.2, .7, .2, 1);
  animation: piece-drift 5s ease-in-out infinite; animation-delay: calc(var(--c) * -1.4s);
}
@keyframes piece-drift { 0%, 100% { translate: 0 -5px; } 50% { translate: 0 5px; } }
.svc-hero-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: -1; }
.svc-hero-shape path {
  fill: var(--ink-2); stroke: rgba(215, 255, 0, .45); stroke-width: 1;
  transition: fill .35s ease, stroke .35s ease; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .45));
}
:root[data-theme="light"] .svc-hero-shape path { fill: #fff; stroke: rgba(110, 140, 0, .5); filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .12)); }
.svc-hero-piece .n { font-family: var(--lat); font-weight: 900; font-size: calc(var(--s) * .08); letter-spacing: .2em; color: var(--accent-text); }
.svc-hero-piece .t { font-weight: 900; font-size: calc(var(--s) * .17); color: var(--text); transition: color .35s ease; }
.svc-hero-piece:hover, .svc-hero-piece:focus-visible { transform: rotateX(16deg) rotateY(-12deg) translateZ(40px) translateY(-8px); z-index: 2; outline: none; }
.svc-hero-piece:hover .svc-hero-shape path, .svc-hero-piece:focus-visible .svc-hero-shape path { fill: var(--lime); stroke: #0a0a0b; }
.svc-hero-piece:hover .t, .svc-hero-piece:hover .n,
.svc-hero-piece:focus-visible .t, .svc-hero-piece:focus-visible .n { color: #0a0a0b; }

/* a service group: sticky title on one side, the cards on the other */
.svc-group {
  display: grid; grid-template-columns: minmax(240px, .75fr) 1.6fr; gap: 5vw; align-items: start;
  padding: 110px clamp(16px, 6vw, 96px) 90px; border-top: 1px solid var(--line); scroll-margin-top: 40px;
}
.svc-head { position: sticky; top: 110px; }
.svc-head .kicker { text-align: right; }
.svc-index {
  display: block; font-family: var(--lat); font-weight: 900; line-height: 1; direction: ltr; text-align: right;
  font-size: clamp(60px, 7vw, 110px); color: transparent; -webkit-text-stroke: 1.5px rgba(215, 255, 0, .45); margin-bottom: 14px;
}
:root[data-theme="light"] .svc-index { -webkit-text-stroke-color: rgba(110, 140, 0, .55); }
.svc-intro { margin-top: 16px; color: var(--muted); line-height: 1.9; max-width: 30ch; font-size: clamp(15px, 1.2vw, 18px); }
.svc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.svc-col-title { font-weight: 800; font-size: 15px; color: var(--muted); margin-bottom: 18px; }

/* service cards interlock like a column of puzzle pieces: a notch on top, a tab below */
.svc-list { list-style: none; }
.svc-list li { position: relative; }
.svc {
  --notch: 15px;
  position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 16px;
  width: 100%; text-align: right; font: inherit; color: var(--text); cursor: pointer;
  background: var(--ink-2); border: 0; border-radius: 18px; padding: 26px 24px 28px;
  transition: background-color .3s ease, color .3s ease, transform .3s cubic-bezier(.2, .7, .2, 1);
}
:root[data-theme="light"] .svc { background: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .04); }
.svc-list li + li { margin-top: -1px; }
.svc-list li + li .svc {
  -webkit-mask: radial-gradient(circle var(--notch) at 50% 0, transparent calc(var(--notch) - .5px), #000 var(--notch));
  mask: radial-gradient(circle var(--notch) at 50% 0, transparent calc(var(--notch) - .5px), #000 var(--notch));
}
.svc-list li:not(:last-child) .svc::after { /* the tab that fills the next card's notch */
  content: ""; position: absolute; left: 50%; bottom: calc(var(--notch) * -1 + 1px); translate: -50% 0; z-index: 1;
  width: calc(var(--notch) * 2 - 3px); height: calc(var(--notch) - 1px); border-radius: 0 0 99px 99px;
  background: inherit;
}
.svc-list li:not(:last-child) { z-index: 1; }
.svc-title { font-weight: 800; font-size: clamp(16px, 1.25vw, 19px); grid-column: 1; }
.svc-desc { color: var(--muted); font-size: 14px; line-height: 1.8; grid-column: 1; transition: color .3s ease; }
.svc-add {
  grid-column: 2; grid-row: 1 / span 2; width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid rgba(var(--fg-rgb), .25); position: relative;
  transition: border-color .3s ease, background-color .3s ease, rotate .4s cubic-bezier(.3, 1.6, .5, 1);
}
.svc-add::before, .svc-add::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px;
  background: currentColor; border-radius: 2px; transition: transform .35s ease, width .35s ease;
}
.svc-add::after { transform: rotate(90deg); }
.svc:hover { transform: translateY(-2px); }
.svc:hover .svc-add { border-color: var(--lime); }
.svc:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.svc[aria-pressed="true"] { background: var(--lime); color: #0a0a0b; }
.svc[aria-pressed="true"] .svc-desc { color: rgba(10, 10, 11, .7); }
.svc[aria-pressed="true"] .svc-add { border-color: #0a0a0b; background: #0a0a0b; color: var(--lime); rotate: 360deg; }
.svc[aria-pressed="true"] .svc-add::before { width: 7px; transform: translate(-3px, 3px) rotate(45deg); }
.svc[aria-pressed="true"] .svc-add::after { width: 12px; transform: translate(2px, 1px) rotate(-45deg); }

/* LinkedIn: people / companies switch */
.seg { position: relative; display: inline-flex; margin-top: 26px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(var(--fg-rgb), .03); }
.seg-btn { position: relative; z-index: 1; font: 700 14px var(--ar); color: var(--muted); background: none; border: 0; padding: 10px 22px; border-radius: 999px; cursor: pointer; transition: color .3s ease; }
.seg-btn[aria-selected="true"] { color: #0a0a0b; }
.seg-btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.seg-thumb { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 999px; background: var(--lime); transition: transform .45s cubic-bezier(.3, 1.3, .5, 1), width .45s ease; }
.svc-feature { margin-top: 28px; padding: 28px; border-radius: 18px; border: 1px dashed rgba(215, 255, 0, .45); background: rgba(215, 255, 0, .04); }
:root[data-theme="light"] .svc-feature { border-color: rgba(110, 140, 0, .5); background: rgba(200, 240, 0, .12); }
.svc-feature h3 { font-weight: 800; font-size: clamp(17px, 1.4vw, 21px); margin-bottom: 10px; }
.svc-feature p { color: var(--muted); line-height: 1.95; }

/* your puzzle: the tray at the bottom */
.my-puzzle {
  position: fixed; z-index: 60; left: 50%; bottom: 22px; translate: -50% 0;
  display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 16px;
  border-radius: 999px; background: rgba(var(--ink-rgb), .86); border: 1px solid rgba(215, 255, 0, .35);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 0 30px rgba(215, 255, 0, .12);
}
.my-puzzle[hidden] { display: none; }
.my-puzzle-pieces { display: flex; align-items: center; padding-inline-start: 6px; }
.mini-piece { width: 30px; height: 30px; overflow: visible; margin-inline-start: -9px; }
.mini-piece:first-child { margin-inline-start: 0; }
.mini-piece path, .fly-piece path { fill: var(--lime); stroke: #0a0a0b; stroke-width: 6; stroke-linejoin: round; }
.my-puzzle-pieces .more { font: 700 12px var(--lat); color: var(--accent-text); margin-inline-start: 6px; }
.my-puzzle-text { font-size: 14px; color: var(--muted); white-space: nowrap; }
.my-puzzle-text b { color: var(--text); font-family: var(--lat); }
.my-puzzle-text b:empty { display: none; }
.my-puzzle-send { font-size: 14px; padding: .7em 1.4em; }
.my-puzzle-clear { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.my-puzzle-clear:hover { color: var(--text); border-color: var(--text); }
.fly-piece { position: fixed; z-index: 70; width: 34px; height: 34px; pointer-events: none; }
.fly-piece svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }

@media (max-width: 900px) {
  .svc-group { grid-template-columns: 1fr; gap: 34px; padding-top: 90px; }
  .svc-head { position: static; }
  .svc-cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .svc-hero-pieces { --s: 27vw; margin-top: 30px; }
  .my-puzzle { bottom: 14px; gap: 10px; padding-inline-start: 12px; max-width: calc(100vw - 24px); }
  .my-puzzle-text { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .svc-hero-piece { animation: none; }
}

/* =========================================================
   Work page + project page
   ========================================================= */
.page-hero--compact { min-height: auto; grid-template-columns: 1fr; padding-bottom: 30px; }
.page-hero--compact .page-hero-copy { max-width: 900px; }

.work { padding: 10px clamp(16px, 6vw, 96px) 60px; }
.work-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.chip {
  font: 600 14px var(--ar); color: var(--muted); background: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .25s ease, border-color .25s ease, background-color .25s ease;
}
.chip:hover { color: var(--text); border-color: rgba(var(--fg-rgb), .35); }
.chip:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.chip[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: #0a0a0b; }
.chip-count { font: 700 11px var(--lat); opacity: .65; }

.work-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 26px; }
.work-item.is-hidden { display: none; }
.work-card { display: block; }
.work-cover {
  position: relative; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden;
  background: var(--ink-2); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
}
.work-cover .cover { display: block; width: 100%; height: 100%; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
img.cover { object-fit: cover; } /* uploaded project images fill their frame like the placeholders do */
.work-card:hover .cover, .work-card:focus-visible .cover { transform: scale(1.06); }
.work-card:focus-visible { outline: none; }
.work-card:focus-visible .work-cover { outline: 2px solid var(--lime); outline-offset: 4px; }
.work-go { /* a lime piece with an arrow turns in from the corner on hover */
  position: absolute; left: 14px; bottom: 14px; width: 54px; height: 54px;
  opacity: 0; transform: translate(-10px, 10px) rotate(-60deg) scale(.6);
  transition: opacity .3s ease, transform .5s cubic-bezier(.3, 1.6, .5, 1);
}
.work-go svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }
.work-go path:first-child { fill: var(--lime); stroke: #0a0a0b; stroke-width: 4; }
.work-go .arrow { fill: none; stroke: #0a0a0b; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.work-card:hover .work-go, .work-card:focus-visible .work-go { opacity: 1; transform: none; }
.work-meta { padding: 18px 4px 0; }
.work-client { font: 700 12px var(--lat); letter-spacing: .12em; color: var(--accent-text); }
.work-title { font-weight: 800; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.4; margin: 6px 0 12px; transition: color .25s ease; }
.work-card:hover .work-title { color: var(--accent-text); }
.work-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.work-tags li { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.work-note { margin-top: 40px; color: var(--muted); font-size: 13px; opacity: .8; }

/* one project */
.project { padding-top: 110px; }
.project-hero { padding: 20px clamp(16px, 6vw, 96px) 50px; max-width: 1200px; }
.back-link { display: inline-flex; gap: 8px; color: var(--muted); font-size: 14px; margin-bottom: 30px; transition: color .2s ease; }
.back-link:hover { color: var(--accent-text); }
.project-head { display: flex; align-items: center; gap: 24px; }
.project-logo {
  flex: none; width: clamp(76px, 8vw, 112px); aspect-ratio: 1; border-radius: 22%;
  background: #fff; display: grid; place-items: center;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .5);
}
.project-logo img { width: 80%; height: 80%; object-fit: contain; } /* sized here: % padding would resolve against the whole row */
.project-head .kicker { text-align: right; }
.project .page-title { font-size: clamp(34px, 4.6vw, 72px); margin: 8px 0 0; }
.project-summary { margin-top: 26px; max-width: 60ch; }
.project-summary a { color: var(--accent-text); text-decoration: underline; }
.project-facts { display: flex; flex-wrap: wrap; gap: 18px 56px; margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--line); }
.project-facts dt { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.project-facts dd { font-weight: 700; display: flex; flex-wrap: wrap; gap: 6px; }
.project-facts .project-year { font-family: var(--lat); }
.tag { font-size: 13px; font-weight: 600; border: 1px solid rgba(215, 255, 0, .45); border-radius: 999px; padding: 5px 12px; transition: background-color .2s ease, color .2s ease; }
.tag:hover { background: var(--lime); color: #0a0a0b; }
:root[data-theme="light"] .tag { border-color: rgba(110, 140, 0, .5); }

.project-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 0 clamp(16px, 6vw, 96px); }
.gallery-item { margin: 0; border-radius: 22px; overflow: hidden; background: var(--ink-2); }
.gallery-item.wide { grid-column: 1 / -1; }
.gallery-item .cover { display: block; width: 100%; height: auto; }
.project > .work-note { padding: 0 clamp(16px, 6vw, 96px); margin-top: 18px; }

.project-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 60px clamp(16px, 6vw, 96px) 10px; }
.project-nav-link {
  display: grid; gap: 6px; padding: 26px 28px; border-radius: 20px; border: 1px solid var(--line);
  transition: border-color .25s ease, background-color .25s ease, transform .3s ease;
}
.project-nav-link.next { text-align: left; }
.project-nav-link:hover { border-color: var(--lime); background: rgba(215, 255, 0, .05); transform: translateY(-3px); }
.project-nav-link .dir { font-size: 13px; color: var(--accent-text); font-weight: 700; }
.project-nav-link .name { font-weight: 800; font-size: clamp(16px, 1.4vw, 20px); }
.project-nav-link .who { font: 600 12px var(--lat); color: var(--muted); letter-spacing: .08em; }

@media (max-width: 1000px) { .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .project-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .project-gallery, .project-nav { grid-template-columns: minmax(0, 1fr); }
  .project-nav-link.next { text-align: right; }
}

/* =========================================================
   Contact page
   ========================================================= */
.contact {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px);
  align-items: start; padding: 10px clamp(16px, 6vw, 96px) 90px;
}
.contact-form { position: relative; display: grid; gap: 26px; }
.form-row.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.field { display: grid; gap: 9px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field label, .field legend { font-weight: 700; font-size: 15px; padding: 0; }
.field legend { margin-bottom: 4px; }
.req { color: var(--accent-text); }
.opt { color: var(--muted); font-weight: 500; font-size: 13px; }
.field input, .field textarea {
  width: 100%; font: 500 16px var(--ar); color: var(--text);
  background: rgba(var(--fg-rgb), .04); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
  user-select: text; -webkit-user-select: text;
}
.field input[dir="ltr"] { text-align: right; }
.field input[dir="ltr"]:not(:placeholder-shown) { text-align: left; }
.field textarea { resize: vertical; min-height: 140px; line-height: 1.8; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .7; }
.field input:hover, .field textarea:hover { border-color: rgba(var(--fg-rgb), .3); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--lime); background: rgba(var(--fg-rgb), .06);
  box-shadow: 0 0 0 4px rgba(215, 255, 0, .14);
}
.field.has-error input, .field.has-error textarea { border-color: #ff6b6b; }
.field-error { min-height: 0; font-size: 13px; color: #ff8080; }
.field-error:empty { display: none; }
:root[data-theme="light"] .field-error { color: #c62828; }
:root[data-theme="light"] .field.has-error input, :root[data-theme="light"] .field.has-error textarea { border-color: #d84040; }

/* service pieces */
.pieces-hint { font-size: 13px; color: var(--accent-text); margin-bottom: 4px; }
.pieces-groups { display: grid; gap: 16px; }
.pieces-group { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: start; }
.pieces-group-title { font-size: 13px; color: var(--muted); padding-top: 10px; }
.pieces-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.piece-opt {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 600 13.5px var(--ar); color: var(--muted); background: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px 8px 12px;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.piece-opt:hover { color: var(--text); border-color: rgba(var(--fg-rgb), .35); }
.piece-opt:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.opt-piece { width: 18px; height: 18px; flex: none; overflow: visible; }
.opt-piece path { fill: none; stroke: currentColor; stroke-width: 9; }
.piece-opt[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: #0a0a0b; }
.piece-opt[aria-pressed="true"] .opt-piece path { fill: #0a0a0b; stroke: #0a0a0b; }
.pieces-field.has-error .piece-opt { border-color: rgba(255, 107, 107, .55); }

.form-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; }
.form-submit { border: 0; cursor: pointer; font-family: var(--ar); }
.form-note { font-size: 13px; color: var(--muted); }
.form-error { flex-basis: 100%; font-size: 14px; color: #ff8080; }
.form-error:empty { display: none; }
:root[data-theme="light"] .form-error { color: #c62828; }
.form-submit[disabled] { opacity: .6; cursor: progress; }
/* spam trap: clipped in place rather than pushed off-screen — a far-off box widens the page sideways in RTL on phones */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }

/* after sending */
.form-done {
  position: relative; display: grid; justify-items: center; text-align: center; gap: 14px;
  padding: 50px 24px; border: 1px solid var(--line); border-radius: 28px;
  background: radial-gradient(circle at 50% 30%, rgba(215, 255, 0, .1), transparent 60%);
}
.form-done[hidden] { display: none; }
.done-burst { position: absolute; left: 50%; top: 110px; width: 0; height: 0; pointer-events: none; }
.done-burst .opt-piece { position: absolute; left: -11px; top: -11px; width: 22px; height: 22px; }
.done-burst .opt-piece path { fill: var(--lime); stroke: none; }
.done-piece { width: 120px; height: 120px; overflow: visible; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .35)); }
.done-piece path:first-child { fill: var(--lime); }
.done-piece .tick { fill: none; stroke: #0a0a0b; stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.form-done h2 { font-size: clamp(26px, 3vw, 38px); font-weight: 800; }
.form-done p { max-width: 46ch; color: var(--muted); line-height: 1.9; }
.form-done p b { color: var(--text); }
.done-again { margin-top: 8px; cursor: pointer; font-family: var(--ar); }

/* direct contact card */
.contact-card {
  position: sticky; top: 110px; display: grid; gap: 18px;
  padding: 30px 28px; border-radius: 26px; border: 1px solid var(--line); background: var(--ink-2);
}
.contact-card h2 { font-size: 22px; font-weight: 800; }
.contact-card-sub { color: var(--muted); font-size: 14px; margin-top: -10px; }
.contact-lines { list-style: none; display: grid; gap: 0; }
.contact-lines li { display: grid; gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.cl-label { font-size: 12px; color: var(--muted); }
.contact-lines a { font: 600 15px var(--lat); color: var(--accent-text); }
.placeholder { color: var(--muted); font-style: italic; }
.btn-whatsapp {
  display: inline-flex; justify-content: center; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 999px; padding: 13px 20px; font-weight: 700;
  opacity: .7; cursor: not-allowed;
}
.placeholder-tag { font-size: 11px; font-weight: 600; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 2px 8px; }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--line); font: 700 14px var(--lat); color: var(--muted); opacity: .7; cursor: not-allowed;
}

@media (max-width: 1000px) {
  .contact { grid-template-columns: minmax(0, 1fr); }
  .contact-card { position: static; }
}
@media (max-width: 640px) {
  .form-row.two { grid-template-columns: minmax(0, 1fr); }
  .pieces-group { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .pieces-group-title { padding-top: 0; }
  .form-submit { width: 100%; justify-content: center; }
}

/* =========================================================
   Loading screen (first page of a visit only)
   ========================================================= */
.loader { display: none; }
html.is-loading { overflow: hidden; }
html.is-loading .loader {
  position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center;
  background: var(--ink); transition: opacity .7s ease .25s, visibility 0s linear 1s;
}
.loader-inner { display: grid; justify-items: center; gap: 18px; }
.loader-board { width: clamp(170px, 26vmin, 260px); height: auto; overflow: visible; }
.loader-slots path { fill: none; stroke: rgba(var(--fg-rgb), .14); stroke-width: 1.5; stroke-dasharray: 5 6; }
.loader-piece {
  fill: rgba(var(--fg-rgb), .1); stroke: rgba(215, 255, 0, .8); stroke-width: 2;
  opacity: 0; transform-box: fill-box; transform-origin: center;
  transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(.7);
  transition: transform .6s cubic-bezier(.3, 1.4, .5, 1), opacity .3s ease;
}
.loader-piece.is-in { opacity: 1; transform: none; }
.loader-key {
  opacity: 0; transform-box: fill-box; transform-origin: center;
  transform: translateY(-120px) rotate(-90deg) scale(1.3);
  transition: transform .55s cubic-bezier(.3, 1.5, .5, 1), opacity .2s ease;
}
.loader-key path { fill: var(--lime); }
:root[data-theme="light"] .loader-piece { fill: rgba(var(--fg-rgb), .08); stroke: rgba(110, 140, 0, .9); }
.loader.is-complete .loader-key { opacity: 1; transform: none; }
.loader-brand { font: 900 15px "Agera Gothic", var(--lat); letter-spacing: .28em; direction: ltr; color: var(--text); }
.loader-brand span { font-weight: 400; color: var(--accent-text); }
.loader-count { font: 700 13px var(--lat); color: var(--muted); direction: ltr; min-width: 4ch; text-align: center; }

/* leaving: the puzzle bursts apart and the backdrop fades */
html .loader.is-leaving { display: grid; position: fixed; inset: 0; z-index: 9000; place-items: center; background: var(--ink); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .7s ease .2s, visibility 0s linear 1s; }
.loader.is-leaving .loader-piece, .loader.is-leaving .loader-key {
  transform: translate(calc(var(--dx, 0px) * 6), calc(var(--dy, -40px) * 6)) rotate(calc(var(--rot, 40deg) * 3)) scale(1.4);
  opacity: 0; transition: transform .9s cubic-bezier(.5, 0, .7, .4), opacity .6s ease .3s;
}
.loader.is-leaving .loader-key { transform: scale(2.4); }
.loader.is-leaving .loader-brand, .loader.is-leaving .loader-count { opacity: 0; transition: opacity .25s ease; }
@media (prefers-reduced-motion: reduce) {
  .loader-piece, .loader-key { transform: none !important; transition: opacity .2s ease !important; }
}

/* =========================================================
   Language switch · English (LTR) overrides · 404
   ========================================================= */
.lang-switch {
  min-width: 38px; height: 38px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--text); font: 700 13px var(--lat); letter-spacing: .06em;
  transition: border-color .2s, color .2s;
}
.lang-switch[lang="ar"] { font: 700 15px var(--ar); letter-spacing: 0; }
.lang-switch:hover { border-color: var(--lime); color: var(--accent-text); }
.lang-switch:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* English reads left to right: undo the right-aligned bits of the Arabic layout */
[dir="ltr"] .values-copy .kicker, [dir="ltr"] .partners-head .kicker, [dir="ltr"] .page-hero .kicker,
[dir="ltr"] .reasons-head .kicker, [dir="ltr"] .svc-head .kicker, [dir="ltr"] .project-head .kicker { text-align: left; }
[dir="ltr"] .svc-num, [dir="ltr"] .svc { text-align: left; }
[dir="ltr"] .project-nav-link.next { text-align: right; }
[dir="ltr"] .field input[dir="ltr"] { text-align: left; }
[dir="ltr"] .work-go { left: auto; right: 14px; transform: translate(10px, 10px) rotate(60deg) scale(.6); }
[dir="ltr"] .work-card:hover .work-go, [dir="ltr"] .work-card:focus-visible .work-go { transform: none; }
[dir="ltr"] .work-go svg { transform: scaleX(-1); }
[dir="ltr"] body { letter-spacing: -.005em; }
[lang="en"] .intro-title { font-size: clamp(34px, 5.4vw, 78px); }
/* English words run longer than the Arabic ones the sizes were set for */
[lang="en"] .page-title { font-size: clamp(38px, 5vw, 82px); letter-spacing: -.02em; }
[lang="en"] .svc-hero-piece .t { font-size: calc(var(--s) * .105); }
@media (max-width: 640px) { [dir="ltr"] .project-nav-link.next { text-align: left; } }

/* 404: the page is a piece that went missing */
.lost {
  min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center;
  gap: clamp(30px, 5vw, 80px); padding: 120px clamp(16px, 6vw, 96px) 70px;
}
.lost-board { position: relative; width: min(100%, 420px); justify-self: center; }
.lost-board svg { display: block; width: 100%; height: auto; overflow: visible; }
.lost-board .tile { fill: var(--ink-2); stroke: rgba(215, 255, 0, .5); stroke-width: 1.6; }
.lost-board .hole { fill: rgba(var(--fg-rgb), .03); stroke: rgba(215, 255, 0, .75); stroke-width: 1.6; stroke-dasharray: 6 6; }
:root[data-theme="light"] .lost-board .tile { stroke: rgba(110, 140, 0, .7); }
:root[data-theme="light"] .lost-board .hole { stroke: rgba(110, 140, 0, .9); }
.lost-piece { cursor: pointer; outline: none; }
.lost-piece path { fill: var(--lime); filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .45)); }
.lost-piece text { font: 900 46px var(--lat); fill: #0a0a0b; }
.lost-piece:focus-visible path { stroke: var(--text); stroke-width: 3; }
.lost-copy .kicker { text-align: start; }
.lost-code { font: 900 clamp(64px, 9vw, 120px)/1 var(--lat); letter-spacing: .04em; color: var(--accent-text); direction: ltr; text-align: start; }
.lost-copy .page-title { margin-top: 14px; }
.lost-copy .lead { margin-top: 18px; max-width: 46ch; }
.lost-hint { margin-top: 14px; color: var(--muted); font-size: 14px; }
.lost-links { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 860px) {
  .lost { grid-template-columns: minmax(0, 1fr); text-align: center; padding-top: 110px; }
  .lost-board { width: min(78%, 300px); }
  .lost-code, .lost-copy .kicker { text-align: center; }
  .lost-copy .lead { margin-inline: auto; }
  .lost-links { justify-content: center; }
}

/* ---------- After ---------- */
.after {
  min-height: 60vh; display: grid; place-content: center; gap: 12px; text-align: center;
  color: var(--muted); border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  .nav { display: none; }
  .topbar { padding-top: 14px; }
  .cta { flex-direction: row; gap: 8px; }
  .cta .btn { font-size: 13px; }
}

@media (max-width: 760px) {
  .values-stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: center; gap: 2vh; padding-top: 76px; }
  .values-visual { order: -1; }
  .orbit { width: min(66vw, 38vh); }
  .value-list { min-height: 200px; margin-top: 16px; }
  .section-title { font-size: clamp(40px, 12vw, 64px); }
  .partners-stage { grid-template-columns: 1fr; grid-template-rows: auto auto auto; align-content: center; gap: 3vh; padding-top: 72px; }
  .partners-head, .partners-head .kicker { text-align: center; }
  :root[data-theme="light"] .partners-head .section-title::after { margin-inline: auto; }
  .partners-sub { margin-inline: auto; }
  .partners-frame { justify-self: center; margin-top: 28px; }
  .frame-wire { height: 28px; }
  .frame-nail { bottom: calc(100% + 22px); }
  .partners-frame { transform-origin: 50% -28px; }
  .partners-cta { grid-column: auto; justify-content: center; margin-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {  .hero { height: auto; }
  .stage { position: relative; }
  .piece .inner, .mouse span { animation: none; }
  .intro { display: none; }
  .values, .partners { height: auto; }
  .values-stage, .partners-stage { position: relative; height: auto; min-height: 100vh; }
  .value { position: static; opacity: 1; transform: none; filter: none; margin-bottom: 28px; }
    .star3d, .mini-star, .partners-frame.nudge { animation: none; }
  .partners-cta { opacity: 1; visibility: visible; }
}

/* =========================================================
   Phones: menu, comfortable tap targets, readable small print
   ========================================================= */
.menu-toggle { display: none; }
@media (max-width: 760px) {
  /* the links, language, theme and contact button fold into a full-screen menu */
  .topbar .top-actions { display: none; }
  .menu-toggle {
    display: grid; place-content: center; gap: 6px; flex: none;
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
    background: none; color: var(--text); cursor: pointer; transition: border-color .2s, color .2s, transform .2s;
  }
  .menu-toggle span { display: block; width: 18px; height: 1.8px; border-radius: 2px; background: currentColor; transition: transform .25s ease; }
  .menu-toggle:active { transform: scale(.94); }
  .menu-toggle:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
  .topbar.menu-open .menu-toggle { border-color: var(--lime); color: var(--accent-text); }
  .topbar.menu-open .menu-toggle span:first-child { transform: translateY(3.9px) rotate(45deg); }
  .topbar.menu-open .menu-toggle span:last-child { transform: translateY(-3.9px) rotate(-45deg); }
  /* a backdrop-filter would trap the fixed panel inside the bar */
  .topbar.menu-open { -webkit-backdrop-filter: none; backdrop-filter: none; background: none; border-color: transparent; }
  .topbar.menu-open::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--ink); }
  .topbar.menu-open .nav {
    display: flex; flex-direction: column; gap: 0; position: fixed; inset: 92px 16px auto;
    font-size: 26px; font-weight: 800; color: var(--text);
  }
  .topbar.menu-open .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .topbar.menu-open .nav a[aria-current="page"] { color: var(--accent-text); }
  .topbar.menu-open .top-actions {
    display: flex; gap: 10px; position: fixed; inset: auto 16px max(24px, env(safe-area-inset-bottom));
  }
  .topbar.menu-open .top-actions .lang-switch,
  .topbar.menu-open .top-actions .sound { width: 48px; height: 48px; flex: none; }
  .topbar.menu-open .top-actions .btn-small { flex: 1; min-height: 48px; font-size: 15px; }
  html.menu-lock, html.menu-lock body { overflow: hidden; }

  /* tap targets of at least ~44px */
  .brand { min-height: 44px; }
  .footer-col { gap: 0; }
  .footer-col h3 { margin-bottom: 6px; }
  .footer-col a, .footer-col .placeholder { padding-block: 11px; }
  .footer-col .socials { flex-wrap: wrap; }
  .footer-col .socials a { padding-block: 0; width: 44px; height: 44px; }
  .contact-card a { display: inline-block; padding-block: 12px; }
  .piece-opt { min-height: 44px; }
  .form-submit { min-height: 52px; }
  .seg-btn { min-height: 44px; padding-inline: 16px; white-space: nowrap; }
  .back-link { padding-block: 12px; margin-bottom: 18px; }
  .orbit-label::after { content: ""; position: absolute; inset: -11px -8px; } /* bigger hit area, same look */
  a.tag { display: inline-flex; align-items: center; min-height: 40px; }

  /* footer: site links + socials side by side, the contact details get a full row so the domain stays whole */
  .footer-grid > :nth-child(3) { grid-column: 1 / -1; order: 1; }

  /* small print no smaller than 12px */
  .chip-count, .placeholder-tag { font-size: 12px; }
  .svc-hero-piece .n { font-size: max(12px, calc(var(--s) * .08)); }
  [lang="en"] .svc-hero-piece .t { font-size: max(12px, calc(var(--s) * .105)); }
}
