/* =========================================================================
   4LEVEL4 — site styles
   Light "white cyberpunk" theme by default, dark theme via [data-theme=dark].
   Scroll-scrubbed video scenes with glass HUD panels on the edges.
   ========================================================================= */
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f7f8fc;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --line: rgba(14, 20, 44, .09);
  --line-2: rgba(14, 20, 44, .17);
  --ink: #0a0e1c;
  --ink-2: #394058;
  --ink-3: #697190;
  --cyan: #00a6cf;
  --cyan-2: #00d3ff;
  --violet: #6a3cff;
  --magenta: #e01886;
  --ok: #0b9e5c;
  --bad: #d43b3b;
  --grad: linear-gradient(100deg, var(--cyan) 0%, var(--violet) 52%, var(--magenta) 100%);
  --glass-bg: rgba(255, 255, 255, .74);
  --glass-line: rgba(255, 255, 255, .7);
  --glass-edge: rgba(14, 20, 44, .1);
  --glass: rgba(255, 255, 255, .84);
  --shadow: 0 1px 2px rgba(10, 14, 28, .05), 0 14px 40px -16px rgba(10, 14, 28, .22);
  --shadow-lg: 0 2px 4px rgba(10, 14, 28, .04), 0 30px 80px -30px rgba(20, 20, 60, .45);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: ui-monospace, 'JetBrains Mono', 'SFMono-Regular', 'Cascadia Code', Consolas, 'Liberation Mono', monospace;
  --hdr: 68px;
  --wrap: 1320px;
  --r: 14px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}

[data-theme='dark'] {
  --bg: #06070d;
  --bg-2: #090b14;
  --surface: #0d1020;
  --surface-2: #151a33;
  --line: rgba(150, 170, 255, .11);
  --line-2: rgba(150, 170, 255, .22);
  --ink: #eef1ff;
  --ink-2: #b6bdd9;
  --ink-3: #7c84a6;
  --cyan: #22dcff;
  --cyan-2: #5ef0ff;
  --violet: #8d6bff;
  --magenta: #ff3db8;
  --ok: #2bd98a;
  --bad: #ff6464;
  --glass-bg: rgba(12, 15, 30, .66);
  --glass-line: rgba(150, 190, 255, .16);
  --glass-edge: rgba(150, 190, 255, .14);
  --glass: rgba(10, 12, 24, .8);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 50px -20px rgba(0, 0, 0, .8);
  --shadow-lg: 0 30px 90px -30px rgba(0, 0, 0, .9);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--cyan); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.muted { color: var(--ink-3); }
.wrap { width: min(var(--wrap), 100% - 56px); margin-inline: auto; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; transition: top .2s; }
.skip:focus { top: 12px; }
.ic { flex: none; }
[hidden] { display: none !important; }

/* Glass card: frosted panel with a thin light edge and a gradient top line */
.glass {
  position: relative; border-radius: var(--r);
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--glass-edge), inset 0 1px 0 var(--glass-line);
}

/* ------------------------------------------------------------ background */
.fx-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.fx-grid {
  position: absolute; inset: -2px;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
  opacity: .7;
}
.fx-glow { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .14; }
.fx-glow.g1 { background: var(--cyan-2); top: -30vmax; left: -15vmax; }
.fx-glow.g2 { background: var(--magenta); top: -25vmax; right: -25vmax; opacity: .08; }

.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; pointer-events: none; }
.scroll-progress i { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--sp, 0)); }

/* ------------------------------------------------------------- typography */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font: 600 11.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan);
}
.eyebrow::before { content: ''; width: 20px; height: 2px; background: var(--grad); }
.h-hero { font-size: clamp(44px, 7vw, 100px); line-height: .98; letter-spacing: -.045em; font-weight: 800; }
.h-hero > span { display: block; min-height: 1em; }
.h2 { font-size: clamp(30px, 3.6vw, 48px); letter-spacing: -.03em; font-weight: 800; }
.h3 { font-size: clamp(22px, 2.4vw, 30px); }
.lead, .sec-lead { font-size: clamp(16.5px, 1.3vw, 19px); color: var(--ink-2); max-width: 62ch; }
.sec-lead { margin-top: 14px; }

.glitch { position: relative; display: inline-block; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; background: inherit; -webkit-background-clip: text; background-clip: text; color: transparent; pointer-events: none; opacity: 0; }
.glitch.typed::before { text-shadow: -2px 0 var(--magenta); animation: glitch-a 7s infinite steps(1); }
.glitch.typed::after { text-shadow: 2px 0 var(--cyan-2); animation: glitch-b 7s infinite steps(1); }
@keyframes glitch-a {
  0%, 92%, 100% { opacity: 0; transform: none; }
  93% { opacity: .9; transform: translate(-3px, 1px); clip-path: inset(10% 0 55% 0); }
  95% { opacity: .9; transform: translate(3px, -1px); clip-path: inset(60% 0 8% 0); }
  97% { opacity: .9; transform: translate(-2px, 0); clip-path: inset(30% 0 40% 0); }
}
@keyframes glitch-b {
  0%, 93%, 100% { opacity: 0; transform: none; }
  94% { opacity: .8; transform: translate(3px, 0); clip-path: inset(50% 0 20% 0); }
  96% { opacity: .8; transform: translate(-3px, 1px); clip-path: inset(5% 0 70% 0); }
}

/* Typewriter: untyped part keeps its space (no layout jump) */
.tw-ghost { color: transparent !important; -webkit-text-fill-color: transparent; }
.tw-caret { display: inline-block; width: .5em; height: 1em; margin-left: 2px; vertical-align: -.12em; background: var(--cyan); animation: blink 1s steps(1) infinite; -webkit-text-fill-color: initial; }
.glitch .tw-caret { background: var(--magenta); }

/* ---------------------------------------------------------------- buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; isolation: isolate;
  height: 48px; padding: 0 22px; border: 0; border-radius: 10px; font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, color .25s, filter .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }
.btn.sm { height: 38px; padding: 0 15px; font-size: 13.5px; border-radius: 8px; }
.btn-primary { background: var(--ink); color: var(--bg); overflow: hidden; }
.btn-primary::after { content: ''; position: absolute; inset: 0; background: var(--grad); opacity: 0; transition: opacity .3s; z-index: -1; }
.btn-primary:hover { background: transparent; color: #fff; box-shadow: 0 10px 30px -10px rgba(106, 60, 255, .6); }
.btn-primary:hover::after { opacity: 1; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--cyan); color: var(--cyan); }
.btn-mio { background: var(--grad); color: #fff; }
.btn-mio:hover { filter: saturate(1.2) brightness(1.06); box-shadow: 0 10px 30px -10px rgba(224, 24, 134, .6); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ----------------------------------------------------------------- header */
.hdr { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--hdr); transition: background-color .3s, box-shadow .3s; }
.hdr.is-scrolled { background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 1px 0 var(--line); }
.hdr-in { height: 100%; display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.logo img { width: 28px; height: auto; }
.logo-t b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 2px; margin-inline: auto; }
.nav a { position: relative; padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: color .2s; }
.nav a::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: 0 50%; transition: transform .3s var(--ease); }
.nav a:hover, .nav a.on { color: var(--ink); }
.nav a.on::after, .nav a:hover::after { transform: scaleX(1); }
.hdr-act { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; padding: 3px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-2); }
.lang a { padding: 5px 9px; font: 600 12px/1 var(--mono); color: var(--ink-3); border-radius: 7px; transition: background-color .2s, color .2s; }
.lang a.on { background: var(--ink); color: var(--bg); }
.lang a:not(.on):hover { color: var(--ink); }
.theme-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .2s, color .2s; }
.theme-btn:hover { box-shadow: inset 0 0 0 1px var(--cyan); color: var(--cyan); }
.theme-btn span { position: absolute; display: grid; transition: transform .45s var(--ease), opacity .3s; }
.th-moon { opacity: 0; transform: rotate(-90deg) scale(.6); }
[data-theme='dark'] .th-sun { opacity: 0; transform: rotate(90deg) scale(.6); }
[data-theme='dark'] .th-moon { opacity: 1; transform: none; }
.burger { display: none; width: 42px; height: 42px; place-items: center; border: 0; background: transparent; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-2); }
.mnav { position: absolute; inset: var(--hdr) 0 auto 0; background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--line); max-height: calc(100vh - var(--hdr)); overflow: auto; }
.mnav nav { display: grid; gap: 2px; padding: 14px 0 22px; }
.mnav a:not(.btn) { display: flex; gap: 14px; align-items: baseline; padding: 13px 4px; font-size: 18px; font-weight: 600; border-bottom: 1px solid var(--line); }
.mnav a span { font: 600 12px var(--mono); color: var(--cyan); }
.mnav .btn { margin-top: 14px; }

/* Section rail (right edge) */
.rail { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 40; display: none; flex-direction: column; gap: 6px; }
.rail a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; height: 22px; }
.rail b { font: 600 10px var(--mono); color: var(--ink-3); width: 22px; text-align: right; transition: color .2s; }
.rail a::after { content: ''; width: 12px; height: 2px; background: var(--line-2); transition: width .3s var(--ease), background .3s; }
.rail span { order: -1; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--glass); box-shadow: 0 0 0 1px var(--line); opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .2s; pointer-events: none; white-space: nowrap; }
.rail a:hover span { opacity: 1; transform: none; }
.rail a.on b { color: var(--cyan); }
.rail a.on::after { width: 26px; background: var(--grad); }
.rail.on-media b { color: rgba(255, 255, 255, .75); }
.rail.on-media a::after { background: rgba(255, 255, 255, .45); }
.rail.on-media a.on::after { background: var(--cyan-2); }

/* ================================================================== STAGE */
/* One fixed full-screen stage holds every section video. Scrolling scrubs the
   active video; at each section boundary the next video is revealed with an
   angled light wipe while the previous one pushes in, blurs and dims, and a
   connector tag ("03 SERVERS ▸ 04 MIORIȚA AI") rides along the wipe edge. */
.stage { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.layer { position: absolute; inset: 0; visibility: hidden; will-change: clip-path, transform, filter; }
.layer.on { visibility: visible; }
.scene-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #e9ecf4; }
.tone-dark .scene-video { background: #05070d; }
/* Videos are shown clean: no wash, haze, dimming or scanlines on top. Text sits in glass panels. */
.layer-shade, .stage > .scanlines { display: none; }

.stage-fx { position: absolute; inset: 0; z-index: 5; opacity: var(--tx, 0); }
.wipe { position: absolute; left: -10%; width: 120%; top: 0; height: 0; transform: translateY(var(--wy, 50vh)) rotate(var(--wa, -8deg)); }
.wipe i { position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--cyan-2) 20%, #fff 50%, var(--magenta) 80%, transparent);
  box-shadow: 0 0 18px 3px rgba(94, 240, 255, .55), 0 0 60px 10px rgba(141, 107, 255, .3); }
.wipe i::before { content: ''; position: absolute; left: 0; right: 0; top: -70px; height: 70px; background: linear-gradient(0deg, rgba(94, 240, 255, .18), transparent); }
.link-tag {
  position: absolute; left: 50%; top: 0; display: inline-flex; align-items: center; gap: 12px; padding: 9px 16px; white-space: nowrap;
  transform: translate(-50%, calc(var(--wy, 50vh) - 50%)); font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: #fff; background: rgba(8, 10, 22, .72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(94, 240, 255, .45), 0 10px 40px -10px rgba(0, 0, 0, .6);
}
.link-tag .lt-from { opacity: .55; }
.link-tag .lt-arrow { color: var(--cyan-2); }
.stage-noise { position: absolute; inset: 0; opacity: calc(var(--tx, 0) * .5); mix-blend-mode: overlay;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .5) 0 1px, transparent 1px 2px), repeating-linear-gradient(90deg, rgba(0, 211, 255, .12) 0 1px, transparent 1px 5px); }

.vsec { position: relative; }

/* ------------------------------------------------------------------- hero */
.hero { height: 190vh; }
.hero-stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; }
.hero-net { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .75; }
.hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: 1.3fr .85fr; gap: 56px; align-items: center; padding-top: var(--hdr);
  opacity: calc(1 - var(--hx, 0)); transform: translateY(calc(var(--hx, 0) * -60px)); }
.status-pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 12px; margin-bottom: 26px; font-size: 13px; font-weight: 500; color: var(--ink-2); background: var(--glass); border-radius: 999px; box-shadow: 0 0 0 1px var(--line-2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.status-pill .mono { font-size: 11px; font-weight: 700; color: var(--ink); }
.status-pill .sep { width: 1px; height: 14px; background: var(--line-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(11, 158, 92, .55); } 80%, 100% { box-shadow: 0 0 0 9px rgba(11, 158, 92, 0); } }
.hero .lead { margin-top: 26px; }
.kpis { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 18px 40px; margin: 46px 0 0; }
.kpis div { position: relative; padding-left: 14px; display: flex; flex-direction: column-reverse; }
.kpis div::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; background: var(--grad); }
.kpis dt { font-size: 12.5px; color: var(--ink-3); }
.kpis dd { margin: 0 0 2px; font: 700 28px/1.1 var(--font); letter-spacing: -.02em; }
.console { overflow: hidden; }
.console::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); }
.console-top { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; }
.dots i:nth-child(1) { background: #ff5f57; } .dots i:nth-child(2) { background: #febc2e; } .dots i:nth-child(3) { background: #28c840; }
.console-rows { padding: 8px; }
.con-row { display: grid; grid-template-columns: 40px 1fr auto 22px; align-items: center; gap: 14px; padding: 13px 12px; border-radius: 10px; transition: background-color .2s, transform .25s var(--ease); }
.con-row:hover { background: color-mix(in srgb, var(--surface-2) 80%, transparent); transform: translateX(4px); }
.con-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--cyan); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.con-tx b { display: block; font-size: 15px; }
.con-tx small { color: var(--ink-3); font-size: 13px; }
.con-st { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; color: var(--ok); }
.con-st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.6s infinite; }
.con-no { font-size: 11px; color: var(--ink-3); text-align: right; }
@keyframes blink { 50% { opacity: .25; } }
.console-foot { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.console-foot b { color: var(--ink); }
.caret { display: inline-block; width: 8px; height: 15px; background: var(--cyan); animation: blink 1s steps(1) infinite; }
.scroll-cue { position: absolute; z-index: 1; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .14em; opacity: calc(1 - var(--hx, 0) * 3); }
.scroll-cue i { width: 22px; height: 36px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line-2); position: relative; }
.scroll-cue i::after { content: ''; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--cyan); animation: wheel 1.8s infinite var(--ease); }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ----------------------------------------------------------------- ticker */
.ticker { position: relative; overflow: hidden; border-block: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: 15px 0; }
.ticker-in { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.ticker span { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; font: 600 12.5px var(--mono); letter-spacing: .12em; color: var(--ink-2); white-space: nowrap; }
.ticker span::after { content: ''; width: 6px; height: 6px; background: var(--grad); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ================================================== SCROLL SCENES (video) */
.scene { position: relative; height: calc(var(--n) * 90vh + 70vh); --e: 0; }
.scene-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hud { position: absolute; inset: calc(var(--hdr) + 14px) 18px 16px; pointer-events: none; font: 600 10.5px var(--mono); letter-spacing: .14em; color: rgba(255, 255, 255, .8); opacity: var(--ui, 0); }
.tone-light .hud { color: rgba(10, 14, 28, .62); }
[data-theme='dark'] .tone-light .hud { color: rgba(10, 14, 28, .62); }
/* Videos are unfiltered, so edge labels get a soft halo to stay readable on any frame. */
.hud > span { text-shadow: 0 0 6px rgba(0, 0, 0, .55), 0 1px 2px rgba(0, 0, 0, .5); }
.tone-light .hud > span { text-shadow: 0 0 6px rgba(255, 255, 255, .8), 0 1px 2px rgba(255, 255, 255, .7); }
.hud > span { position: absolute; display: inline-flex; align-items: center; gap: 8px; }
.hud-tl { left: 0; top: 0; } .hud-tr { right: 0; top: 0; } .hud-bl { left: 0; bottom: 0; } .hud-br { right: 0; bottom: 0; }
.hud::before, .hud::after { content: ''; position: absolute; width: 22px; height: 22px; border: 1.5px solid currentColor; opacity: .7; }
.hud::before { left: -8px; top: 18px; border-right: 0; border-bottom: 0; }
.hud::after { right: -8px; bottom: 18px; border-left: 0; border-top: 0; }
.rec { width: 7px; height: 7px; border-radius: 50%; background: #ff3b3b; animation: blink 1.2s steps(1) infinite; }

.scene-ui {
  position: absolute; inset: calc(var(--hdr) + 46px) 0 74px; left: 0; right: 0; z-index: 2;
  display: grid; grid-template-columns: 280px 1fr minmax(380px, 460px); gap: 28px; align-items: center;
  opacity: var(--ui, 0); transform: translateY(calc((1 - var(--ui, 0)) * 30px));
}
.scene-side { grid-column: 1; display: flex; flex-direction: column; gap: 14px; align-self: stretch; justify-content: center; min-height: 0; }
.scene-panels { grid-column: 3; position: relative; align-self: center; display: grid; }

/* Left menu (like a product console) */
.scene-menu { padding: 14px 10px 10px; }
.scene-menu-h { padding: 2px 10px 10px; margin-bottom: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.scene-menu button {
  position: relative; width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 10px; border: 0; border-radius: 8px; background: transparent;
  text-align: left; font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2); transition: background-color .25s, color .25s;
}
.scene-menu button b { font-size: 10.5px; color: var(--ink-3); width: 18px; }
.scene-menu button span { flex: 1; }
.scene-menu button .ic { opacity: .45; transition: transform .25s, opacity .25s; }
.scene-menu button:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); color: var(--ink); }
.scene-menu button.on { background: color-mix(in srgb, var(--cyan) 13%, transparent); color: var(--ink); }
.scene-menu button.on::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2.5px; border-radius: 2px; background: var(--grad); }
.scene-menu button.on b { color: var(--cyan); }
.scene-menu button.on .ic { opacity: 1; transform: translateX(2px); color: var(--cyan); }
.scene-menu button.done b { color: var(--cyan); }

/* Charts */
.metrics { display: grid; gap: 12px; }
.chart { margin: 0; padding: 14px 16px 10px; }
.chart figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.chart figcaption b { font-size: 13px; color: var(--ink); }
.chart svg { width: 100%; height: 78px; overflow: visible; }
.chart .grid line { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.chart .line { fill: none; stroke: var(--cyan); stroke-width: 2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--cyan) 60%, transparent)); }
.chart .area { fill: url(#chartFill); opacity: .9; }
.chart .dot { fill: var(--cyan); stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.chart-x { display: flex; justify-content: space-between; margin-top: 6px; font-size: 9.5px; color: var(--ink-3); }
.demo { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); text-align: right; opacity: .8; }
.tone-dark .demo { color: rgba(255, 255, 255, .55); }

/* Stats (company) */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; overflow: hidden; }
.stat-grid div { display: flex; flex-direction: column-reverse; padding: 16px 18px; background: color-mix(in srgb, var(--surface) 30%, transparent); }
.stat-grid dd { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.stat-grid dt { font-size: 11.5px; color: var(--ink-3); }

/* Panels (right edge) — one per chapter, swapped by scroll */
.panel {
  grid-area: 1 / 1; padding: 26px 28px 26px; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateX(40px) scale(.98); filter: blur(4px);
  transition: opacity .5s var(--ease), transform .6s var(--ease), filter .5s var(--ease), visibility 0s .6s;
}
.panel::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: 0 50%; transition: transform .8s var(--ease) .1s; }
.panel.on { opacity: 1; visibility: visible; transform: none; filter: none; transition: opacity .5s var(--ease), transform .6s var(--ease), filter .5s var(--ease), visibility 0s; }
.panel.on::before { transform: scaleX(1); }
.panel.past { transform: translateX(-30px) scale(.98); }
.panel-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.panel-k { color: var(--cyan); }
.panel-h { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.1; letter-spacing: -.025em; font-weight: 800; text-transform: none; }
.panel .eyebrow { margin-bottom: 10px; }
.panel-d { margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.specs { display: grid; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.specs li { position: relative; padding-left: 16px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.specs li::before { content: ''; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 1px; background: var(--grad); transform: rotate(45deg); }
.specs b { color: var(--ink); font-weight: 700; }
.specs a { color: var(--cyan); font-weight: 600; }
.panel-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.panel-act .btn { flex: 1 1 auto; }
.pt-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.pt-list li { padding: 6px 10px; font-size: 12.5px; font-weight: 600; border-radius: 6px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); box-shadow: inset 0 0 0 1px var(--line); }

/* Progress bar: one segment per chapter */
.scene-bar { position: absolute; z-index: 3; left: 50%; bottom: 40px; transform: translateX(-50%); width: min(var(--wrap), 100% - 56px); display: flex; gap: 6px; opacity: var(--ui, 0); }
.scene-bar i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.tone-light .scene-bar i { background: rgba(10, 14, 28, .14); }
.scene-bar b { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan-2), var(--violet)); transform-origin: 0 50%; transform: scaleX(var(--f, 0)); }

/* Miorița chat card in the side column */
.mio-chat { padding: 14px; }
.chat-top { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.chat-top b { display: block; font-size: 13px; } .chat-top em { font-style: normal; color: var(--cyan); }
.chat-top small { color: var(--ok); font-size: 11.5px; }
.msg { padding: 9px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.5; }
.msg.u { margin-left: 12%; background: var(--ink); color: var(--bg); border-bottom-right-radius: 3px; }
.msg.b { margin-top: 8px; background: color-mix(in srgb, var(--surface-2) 80%, transparent); border-bottom-left-radius: 3px; }
.msg pre { margin: 8px 0 0; padding: 9px 10px; background: #0a0d1a; color: #cfe0ff; border-radius: 7px; font: 10.5px/1.6 var(--mono); overflow-x: auto; }
.msg pre i { color: #7d8bb8; font-style: normal; }

/* ------------------------------------------------------------- sections */
.sec { position: relative; padding: clamp(100px, 12vw, 150px) 0; }
.sec-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.head-card { padding: 28px 32px 30px; }

/* --------------------------------------------------------------- projects */
#projects { min-height: 100vh; }
.pj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 24px; }
.pj { display: flex; flex-direction: column; transition: transform .4s var(--ease), box-shadow .4s; }
.pj:hover { transform: translateY(-6px); }
.pj.is-featured { box-shadow: var(--shadow-lg), inset 0 0 0 1.5px color-mix(in srgb, var(--cyan) 55%, transparent); }
.pj-shot { display: block; margin: 12px 12px 0; border-radius: 10px; overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.pj-chrome { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.pj-chrome .dots i { width: 8px; height: 8px; }
.pj-url { display: inline-flex; align-items: center; gap: 6px; flex: 1; min-width: 0; padding: 4px 10px; font-size: 11.5px; color: var(--ink-3); background: var(--surface-2); border-radius: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pj-img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.pj-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 1.6s var(--ease); }
.pj:hover .pj-img img { transform: scale(1.04); }
.pj-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; background: repeating-linear-gradient(45deg, var(--surface-2) 0 12px, var(--bg-2) 12px 24px); }
.pj-body { display: flex; flex-direction: column; flex: 1; padding: 20px 24px 24px; }
.pj-head { display: flex; align-items: center; gap: 10px; }
.pj-fav { width: 20px; height: 20px; border-radius: 4px; object-fit: contain; }
.pj-domain { font-size: 12px; color: var(--ink-3); }
.pj-cat { margin-left: auto; padding: 4px 9px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-2); }
.pj h3 { margin-top: 12px; font-size: 21px; }
.pj-desc { margin-top: 8px; color: var(--ink-2); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pj-specs li { font-size: 13px; }
.pj-specs span { overflow-wrap: anywhere; }
.pj-specs .ok, .pj-specs .bad { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.pj-specs .ok { color: var(--ok); } .pj-specs .bad { color: var(--bad); }
.pj-specs .ok i, .pj-specs .bad i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pj-specs .ok i { box-shadow: 0 0 8px currentColor; }
.pj-foot { margin-top: auto; padding-top: 22px; }
.pj-empty { display: flex; align-items: center; gap: 18px; padding: 30px; color: var(--ink-2); max-width: 760px; }
.pj-empty .ic { color: var(--cyan); }

/* ---------------------------------------------------------------- contact */
#contact { min-height: 100vh; display: flex; align-items: center; }
.ct { display: grid; grid-template-columns: minmax(300px, 440px) 1fr minmax(380px, 560px); gap: 28px; align-items: start; }
.ct > .head-card { grid-column: 1; }
.ct > .form { grid-column: 3; }
.ct .h2 { font-size: clamp(28px, 2.8vw, 40px); }
.form { display: grid; gap: 16px; padding: clamp(22px, 2.6vw, 32px); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row2.end { align-items: end; }
.fld { display: grid; gap: 7px; }
.fld > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.fld input, .fld select, .fld textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 15px; color: var(--ink); background: color-mix(in srgb, var(--bg-2) 85%, transparent); border: 0; border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .2s, background-color .2s; appearance: none; -webkit-appearance: none;
}
.fld select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.fld textarea { resize: vertical; min-height: 120px; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--cyan), 0 0 0 4px rgba(0, 166, 207, .14); }
.fld .invalid { box-shadow: inset 0 0 0 2px var(--bad); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fld-x { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; opacity: 0; pointer-events: none; }
.cap-row { display: flex; align-items: center; gap: 10px; }
.cap-img { display: block; width: 216px; max-width: 100%; height: auto; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line), 0 0 0 1px var(--line); user-select: none; -webkit-user-drag: none; }
.cap-new { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line-2); cursor: pointer; transition: color .2s, box-shadow .2s, transform .4s var(--ease); }
.cap-new:hover { color: var(--cyan); box-shadow: inset 0 0 0 1.5px var(--cyan); }
.cap-new.spin { transform: rotate(-360deg); }
.cap-fld input { text-transform: uppercase; letter-spacing: .3em; font-family: var(--mono); }
.cap-fld input::placeholder { text-transform: none; letter-spacing: normal; font-family: inherit; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border-radius: 10px; font-size: 14.5px; }
.alert.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 35%, transparent); }
.alert.err { color: var(--bad); background: color-mix(in srgb, var(--bad) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 35%, transparent); }
.form .btn[disabled] { opacity: .65; pointer-events: none; }
.fine { font-size: 12.5px; color: var(--ink-3); }

/* ------------------------------------------------------------------ legal */
.legal { padding: 90px 0 70px; background: var(--bg); }
.legal .h3 { margin-bottom: 26px; }
.legal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding-top: 26px; border-top: 1px solid var(--line); }
.legal h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-family: var(--mono); color: var(--ink-3); margin-bottom: 10px; }
.legal p { font-size: 14.5px; color: var(--ink-2); }
.legal a { color: var(--cyan); }

/* ----------------------------------------------------------------- footer */
.ftr { border-top: 1px solid var(--line); background: var(--bg-2); padding: 64px 0 26px; }
.ftr-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.ftr-brand p { margin-top: 16px; color: var(--ink-3); max-width: 34ch; }
.badge-mio { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 8px 14px; font: 600 13px var(--mono); border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line-2); }
.badge-mio:hover { box-shadow: inset 0 0 0 1px var(--cyan); color: var(--cyan); }
.ftr h4 { font: 700 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; }
.ftr h4:not(:first-child) { margin-top: 28px; }
.ftr ul { display: grid; gap: 10px; font-size: 15px; color: var(--ink-2); }
.ftr ul a:hover { color: var(--cyan); }
.ftr-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 52px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-3); }

/* ---------------------------------------------------------------- reveal */
.js .rv { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js .rv.in { opacity: 1; transform: none; }
.hero .rv:nth-child(3) { --d: 2; } .hero .rv:nth-child(4) { --d: 3; } .hero .rv:nth-child(5) { --d: 4; }
.hero .console.rv { --d: 2; }

/* No-JS fallback: show every chapter as a normal block */
html:not(.js) .scene { height: auto; }
html:not(.js) .scene-pin { position: relative; height: auto; overflow: visible; padding: 120px 0 60px; background: var(--bg-2); }
html:not(.js) .stage, html:not(.js) .scene-bar, html:not(.js) .scene-side { display: none; }
html:not(.js) .scene-ui { position: relative; inset: auto; opacity: 1; transform: none; display: block; }
html:not(.js) .scene-panels { display: grid; gap: 16px; }
html:not(.js) .panel { grid-area: auto; opacity: 1; visibility: visible; transform: none; filter: none; }
html:not(.js) .hero { height: auto; }

/* ------------------------------------------------------------ responsive */
@media (min-width: 1440px) { .rail { display: flex; } }
@media (max-width: 1240px) {
  .nav { display: none; }
  .burger { display: grid; }
  .hdr-act { margin-left: auto; }
  .scene-ui { grid-template-columns: 250px 1fr minmax(360px, 420px); gap: 20px; }
  .ct { grid-template-columns: 1fr 1fr; }
  .ct > .form { grid-column: 2; }
}
@media (max-width: 1080px) {
  .hero-in { grid-template-columns: 1fr; gap: 32px; }
  .console { display: none; }
  .kpis { grid-template-columns: repeat(2, auto); }
  .scene-ui { grid-template-columns: 1fr minmax(340px, 420px); }
  .scene-side { display: none; }
  .scene-panels { grid-column: 2; }
  .legal-grid { grid-template-columns: repeat(2, 1fr); }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hide-md { display: none; }
  .ct { grid-template-columns: 1fr; }
  .ct > .form, .ct > .head-card { grid-column: 1; }
}
@media (max-width: 760px) {
  .scene { height: calc(var(--n) * 80vh + 60vh); }
  .scene-ui { inset: auto 0 62px; display: block; }
  .scene-panels { width: auto; }
  .panel { padding: 20px 20px 18px; max-height: calc(100svh - var(--hdr) - 110px); overflow: auto; }
  .panel-h { font-size: 23px; }
  .panel-d, .specs li { font-size: 14px; }
  .specs { gap: 6px; margin-top: 14px; padding-top: 12px; }
  .panel-act { margin-top: 16px; }
  .scene-bar { bottom: 28px; width: calc(100% - 32px); }
  .hud { inset: calc(var(--hdr) + 10px) 14px 10px; font-size: 9.5px; }
  .layer.tone-dark .layer-shade { background: linear-gradient(180deg, rgba(4, 6, 14, .45) 0%, transparent 30%, rgba(4, 6, 14, .6) 100%); }
  .layer-hero .layer-shade { background: linear-gradient(180deg, rgba(247, 248, 252, .9) 0%, rgba(247, 248, 252, .6) 60%, rgba(247, 248, 252, .3) 100%) !important; }
  .link-tag { font-size: 10px; padding: 7px 12px; gap: 8px; }
  .hud .hud-bl, .hud .hud-br { display: none; }
}
@media (max-width: 640px) {
  :root { --hdr: 62px; }
  .wrap { width: calc(100% - 32px); }
  .lang a { padding: 5px 7px; }
  .theme-btn, .burger { width: 38px; height: 38px; }
  .logo-t { font-size: 17px; }
  .hero { height: 160vh; }
  .kpis { gap: 18px 28px; margin-top: 36px; }
  .kpis dd { font-size: 24px; }
  .row2, .legal-grid { grid-template-columns: 1fr; }
  .ftr-grid { grid-template-columns: 1fr; }
  .scroll-cue { display: none; }
  .head-card { padding: 22px 20px; }
}
@media (max-width: 380px) { .lang { display: none; } }

/* --------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ================================================== PROJECTS GALLERY */
/* Pinned section; each project is a tall glass pane, like the panes in the video.
   JS sets --o (offset from the centre pane, in panes) for every pane. */
.gallery { position: relative; height: calc(var(--n) * 75vh + 85vh); }
.gal-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.gal-head { position: absolute; left: 0; right: 0; top: calc(var(--hdr) + 22px); z-index: 3; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; pointer-events: none; }
.gal-head > * { pointer-events: auto; }
.gal-intro { max-width: 560px; padding: 20px 24px 22px; }
.gal-intro .panel-top { margin-bottom: 10px; }
.gal-h { font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -.025em; font-weight: 800; }
.gal-lead { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.gal-count { display: flex; align-items: baseline; gap: 8px; padding: 14px 18px; }
.gal-count b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gal-count span { font-size: 13px; color: var(--ink-3); }

.gal-stage { position: absolute; inset: calc(var(--hdr) + 190px) 0 60px; perspective: 1600px; perspective-origin: 50% 30%; }
.pane {
  --w: min(390px, 30vw);
  --a: clamp(-1.6, var(--o), 1.6);
  position: absolute; left: 50%; top: 0; width: var(--w); transform-style: preserve-3d;
  transform:
    translate(-50%, 0)
    translateX(calc(var(--o) * var(--w) * 1.08))
    translateZ(calc(min(var(--ab, 0), 1.4) * -240px))
    rotateY(calc(var(--a) * -26deg));
  opacity: clamp(0, calc(1.9 - var(--ab, 0) * .55), 1);
  will-change: transform, opacity;
}
.pane-glass {
  position: relative; padding: 12px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .34));
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 30px 80px -30px rgba(40, 30, 120, .45), inset 0 0 0 1px rgba(255, 255, 255, .75), inset 0 0 0 2px rgba(0, 211, 255, .18);
  transition: box-shadow .4s var(--ease);
}
/* Glass edge glint + light sweep, stronger on the centre pane */
.pane-glass::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .55) 45%, transparent 52%); background-size: 260% 100%;
  background-position: calc(100% + var(--o) * 80%) 0; mix-blend-mode: soft-light; }
.pane-glass::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  box-shadow: inset 1px 0 0 rgba(94, 240, 255, .9), inset -1px 0 0 rgba(255, 61, 184, .5); opacity: .7; }
.pane.is-center .pane-glass { box-shadow: 0 40px 100px -30px rgba(40, 30, 120, .55), inset 0 0 0 1px rgba(255, 255, 255, .85), 0 0 0 1px rgba(0, 211, 255, .55), 0 0 40px -6px rgba(0, 211, 255, .45); }
.pane.is-featured .pane-glass { box-shadow: 0 30px 80px -30px rgba(40, 30, 120, .45), inset 0 0 0 1px rgba(255, 255, 255, .75), 0 0 0 1.5px rgba(224, 24, 134, .45); }
[data-theme='dark'] .pane-glass { background: linear-gradient(135deg, rgba(20, 26, 52, .72), rgba(10, 12, 24, .55)); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(150, 190, 255, .2); }
.pane-shot { display: block; border-radius: 11px; overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.pane-body { position: relative; z-index: 3; padding: 16px 8px 6px; }
.pane-no { font-size: 11px; font-weight: 700; color: var(--cyan); }
.pane h3 { margin-top: 10px; font-size: 20px; letter-spacing: -.02em; }
.pane .pj-desc { margin-top: 6px; font-size: 13.5px; -webkit-line-clamp: 2; }
.pane-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 11.5px; }
.pane-meta li { display: grid; gap: 2px; min-width: 0; }
.pane-meta li.wide { grid-column: 1 / -1; }
.pane-meta span { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.pane-meta b { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.pane-meta b.ok { color: var(--ok); } .pane-meta b.bad { color: var(--bad); }
.pane-meta b i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pane-meta b.ok i { box-shadow: 0 0 8px currentColor; }
.pane-go { margin-top: 14px; width: 100%; }
.pane:not(.is-center) .pane-go { pointer-events: none; }
.pane-reflect { position: absolute; left: 6%; right: 6%; top: 100%; height: 60px; margin-top: 8px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(0, 211, 255, .16), transparent); filter: blur(10px); opacity: .8; }
.pane.is-empty { --o: 0; }
.pane.is-empty .pane-glass { display: flex; align-items: center; gap: 16px; padding: 30px; color: var(--ink-2); }
.pane.is-empty .ic { color: var(--cyan); }

.gal-dots { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.gal-dots i { width: 26px; height: 3px; border-radius: 2px; background: rgba(10, 14, 28, .16); overflow: hidden; position: relative; }
[data-theme='dark'] .gal-dots i { background: rgba(255, 255, 255, .2); }
.gal-dots i::after { content: ''; position: absolute; inset: 0; background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--f, 0)); }

.gal-intro .gal-h { font-size: clamp(22px, 2vw, 28px); }
@media (max-height: 960px) and (min-width: 901px) {
  .pane .pj-desc { display: none; }
  .gal-lead { display: none; }
  .gal-stage { inset: calc(var(--hdr) + 150px) 0 50px; }
}
@media (max-width: 900px) {
  .gal-stage { inset: calc(var(--hdr) + 150px) 0 60px; perspective: 1000px; }
  .pane { --w: min(400px, 72vw); }
  .gal-count { display: none; }
}
@media (max-width: 640px) {
  .gal-intro { padding: 16px 18px; }
  .gal-lead { display: none; }
  .gal-stage { inset: calc(var(--hdr) + 112px) 0 54px; }
  .pane { --w: 80vw; }
  .pane .pj-desc { display: none; }
  .pane-meta { gap: 6px 10px; }
  .gal-dots { bottom: 24px; }
}
html:not(.js) .gallery { height: auto; }
html:not(.js) .gal-pin { position: relative; height: auto; overflow: visible; padding: 120px 0 60px; }
html:not(.js) .gal-head, html:not(.js) .gal-stage { position: relative; inset: auto; }
html:not(.js) .pane { position: relative; left: auto; top: auto; transform: none; opacity: 1; margin: 0 auto 30px; }
