/* Noctiluca: Descent. Design & build: Orieb Alzyuot. */
:root {
  --ink: #eefcff;
  --ink-2: rgba(226, 246, 255, .78);
  --ink-3: rgba(214, 238, 250, .6);
  --glow: #7ff3ff;
  --glow-2: #4d6bff;
  --line: rgba(190, 240, 255, .18);
  --bg: #04121f;
  --display: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --pad: clamp(20px, 6vw, 112px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}
[lang="ar"] {
  --display: 'Reem Kufi', 'IBM Plex Sans Arabic', serif;
  --sans: 'IBM Plex Sans Arabic', 'Manrope', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
html.rm { scroll-behavior: auto; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--glow); color: #021018; }
a { color: inherit; }
img, svg { display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; border-radius: 6px; }

.skip { position: fixed; top: 10px; inset-inline-start: 10px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #021018; font-weight: 700; transform: translateY(-160%); transition: transform .2s; text-decoration: none; }
.skip:focus { transform: none; }

/* ---------- loader ---------- */
.loader { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: radial-gradient(120% 80% at 50% 0%, #0c3550 0%, #04121f 60%); transition: opacity .9s var(--ease), visibility .9s; }
.loaded .loader { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-in { display: grid; justify-items: center; gap: 14px; text-align: center; }
.loader-orb { position: relative; width: 64px; height: 64px; }
.loader-orb i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--glow); opacity: 0; animation: sonar 2.4s var(--ease) infinite; }
.loader-orb i:nth-child(2) { animation-delay: .8s; }
.loader-orb i:nth-child(3) { animation-delay: 1.6s; }
.loader-orb::after { content: ''; position: absolute; inset: 26px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 24px 6px rgba(127, 243, 255, .6); }
@keyframes sonar { 0% { transform: scale(.2); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
.loader-t { margin: 8px 0 0; font: 400 26px/1.1 var(--display); font-style: italic; letter-spacing: .01em; }
[lang="ar"] .loader-t { font-style: normal; }
.loader-n { margin: 0; font: 500 12px/1 var(--mono); letter-spacing: .14em; color: var(--ink-3); }
.bar { width: 180px; height: 2px; background: rgba(255, 255, 255, .12); border-radius: 2px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--glow); box-shadow: 0 0 10px var(--glow); transition: width .4s var(--ease); }
[dir="rtl"] .bar span { margin-inline-start: auto; }

/* ---------- layers ---------- */
.sea { position: fixed; inset: 0; z-index: 0; background: linear-gradient(180deg, #1a7f9a 0%, #06324a 45%, #04121f 100%); }
#gl { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; outline: none; }
.scrim { position: fixed; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg, rgba(2, 8, 16, .5) 0%, rgba(2, 8, 16, .22) 38%, rgba(2, 8, 16, 0) 62%); }
[dir="rtl"] .scrim { background: linear-gradient(270deg, rgba(2, 8, 16, .5) 0%, rgba(2, 8, 16, .22) 38%, rgba(2, 8, 16, 0) 62%); }
.grain { position: fixed; inset: -50%; z-index: 3; pointer-events: none; opacity: .07; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1.2s steps(4) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } 100% { transform: translate(0, 0); } }
.css-jelly { display: none; }

/* ---------- custom cursor ---------- */
.cursor { position: fixed; top: 0; left: 0; z-index: 95; pointer-events: none; opacity: 0; transition: opacity .3s; }
.has-cursor .cursor { opacity: 1; }
.c-ring, .c-dot { position: fixed; top: 0; left: 0; border-radius: 50%; will-change: transform; }
.c-ring { width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1.5px solid rgba(190, 250, 255, .7); box-shadow: 0 0 18px rgba(127, 243, 255, .35), inset 0 0 12px rgba(127, 243, 255, .2); transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, border-color .35s; }
.c-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--ink); box-shadow: 0 0 10px var(--glow); }
.cursor.hover .c-ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(127, 243, 255, .12); border-color: var(--glow); }
.cursor.down .c-ring { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor [role="option"] { cursor: none; }
.has-cursor input, .has-cursor textarea { cursor: text; }

/* ---------- header ---------- */
.top { position: fixed; top: 0; inset-inline: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--pad); padding-top: max(18px, env(safe-area-inset-top)); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 15px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ink); }
[lang="ar"] .brand { letter-spacing: 0; font-size: 17px; }
.brand svg { width: 30px; height: 30px; color: var(--glow); filter: drop-shadow(0 0 8px rgba(127, 243, 255, .6)); }
.nav { display: flex; gap: clamp(14px, 2.4vw, 34px); }
.nav a { position: relative; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 6px 0; transition: color .25s; }
.nav a::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: var(--glow); transform: scaleX(0); transform-origin: var(--o, left); transition: transform .35s var(--ease); }
[dir="rtl"] .nav a::after { --o: right; }
.nav a:hover, .nav a[aria-current="true"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); }
.tools { display: flex; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(4, 18, 31, .35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 13px; font-weight: 600; text-decoration: none; color: var(--ink); cursor: pointer; transition: border-color .25s, background .25s; }
.chip:hover { border-color: rgba(127, 243, 255, .6); background: rgba(127, 243, 255, .1); }
.chip.lang { font-family: 'IBM Plex Sans Arabic', var(--sans); font-size: 14px; }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.bars i { width: 2px; height: 3px; background: currentColor; border-radius: 1px; transition: height .3s; }
.sound[aria-pressed="true"] .bars i { animation: eq 1s ease-in-out infinite; }
.sound[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: -.3s; }
.sound[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: -.6s; }
.sound[aria-pressed="true"] .bars i:nth-child(4) { animation-delay: -.15s; }
.sound[aria-pressed="true"] { border-color: rgba(127, 243, 255, .6); color: var(--glow); }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }

/* ---------- depth meter ---------- */
.meter { position: fixed; z-index: 15; inset-inline-end: calc(var(--pad) * .5); top: 50%; transform: translateY(-50%); display: grid; justify-items: end; gap: 18px; font-family: var(--mono); }
.m-read { display: grid; justify-items: end; gap: 2px; text-align: end; }
.m-depth { display: inline-flex; align-items: baseline; gap: 4px; font-size: 26px; font-weight: 500; letter-spacing: -.02em; color: var(--ink); text-shadow: 0 0 18px rgba(127, 243, 255, .45); font-variant-numeric: tabular-nums; direction: ltr; }
.m-depth small { font-size: 12px; color: var(--ink-3); }
.m-zone { font: 400 18px/1.1 var(--display); font-style: italic; color: var(--glow); }
[lang="ar"] .m-zone { font-style: normal; font-size: 16px; }
.m-extra { font-size: 10.5px; letter-spacing: .08em; color: var(--ink-3); font-variant-numeric: tabular-nums; direction: ltr; }
.m-rail { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; position: relative; }
.m-rail a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 5px 0; text-decoration: none; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); transition: color .3s; }
[lang="ar"] .m-rail a { letter-spacing: 0; font-family: var(--sans); font-size: 12px; }
.m-rail a span { opacity: 0; transform: translateX(calc(var(--d, 1) * 6px)); transition: opacity .3s, transform .3s var(--ease); }
[dir="rtl"] .m-rail a span { --d: -1; }
.m-rail a em { font-style: normal; display: none; }
.m-rail a::after { content: ''; width: 14px; height: 1px; background: currentColor; transition: width .35s var(--ease), background .3s; }
.m-rail a:hover span, .m-rail a:focus-visible span, .m-rail a.on span { opacity: 1; transform: none; }
.m-rail a.on { color: var(--ink); }
.m-rail a.on::after { width: 34px; background: var(--glow); box-shadow: 0 0 8px var(--glow); }
.m-rail a:hover { color: var(--ink); }
.m-track { position: absolute; inset-inline-end: -14px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.m-fill { position: absolute; inset-inline: 0; top: 0; height: 100%; background: var(--glow); transform-origin: top; transform: scaleY(0); box-shadow: 0 0 8px var(--glow); }

/* ---------- zones ---------- */
main { position: relative; z-index: 10; }
.zone { position: relative; min-height: 135vh; display: flex; align-items: center; padding: 120px var(--pad); }
.z0 { min-height: 100vh; min-height: 100svh; }
.z4 { min-height: 110vh; }
.panel { width: min(560px, 100%); }
.panel.wide { width: min(980px, 100%); }
.kicker { margin: 0 0 18px; display: flex; align-items: center; gap: 10px; font: 500 12px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--glow); text-shadow: 0 0 14px rgba(127, 243, 255, .4); }
[lang="ar"] .kicker { letter-spacing: 0; font-family: var(--sans); font-size: 14px; font-weight: 600; }
.kicker .zn { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border: 1px solid currentColor; border-radius: 999px; font-size: 10.5px; font-family: var(--mono); }
h1, h2 { margin: 0; font-family: var(--display); font-weight: 400; letter-spacing: -.015em; text-wrap: balance; text-shadow: 0 2px 30px rgba(0, 8, 20, .45); }
h1 { font-size: clamp(54px, 8.4vw, 132px); line-height: .92; }
h2 { font-size: clamp(44px, 6.2vw, 96px); line-height: .96; }
[lang="ar"] h1 { font-size: clamp(46px, 7vw, 108px); line-height: 1.12; letter-spacing: 0; font-weight: 500; }
[lang="ar"] h2 { font-size: clamp(38px, 5.2vw, 80px); line-height: 1.15; letter-spacing: 0; font-weight: 500; }
h1 em, h2 em { font-style: italic; color: var(--glow); text-shadow: 0 0 34px rgba(127, 243, 255, .55), 0 0 2px rgba(127, 243, 255, .5); }
[lang="ar"] h1 em, [lang="ar"] h2 em { font-style: normal; }
h1 span { display: inline; }
.lead { margin: 26px 0 0; max-width: 46ch; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.65; color: var(--ink-2); text-shadow: 0 1px 14px rgba(0, 8, 20, .6); }
[lang="ar"] .lead { line-height: 1.9; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent; font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; transition: transform .3s var(--ease), background .3s, border-color .3s, box-shadow .3s, color .3s; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
[dir="rtl"] .btn svg[viewBox] path[d^="M5 12"] { transform: scaleX(-1); transform-origin: center; }
.btn.primary { background: var(--ink); color: #03121d; box-shadow: 0 0 0 0 rgba(127, 243, 255, .5), 0 10px 40px -10px rgba(127, 243, 255, .6); }
.btn.primary:hover { background: var(--glow); box-shadow: 0 0 0 6px rgba(127, 243, 255, .16), 0 10px 50px -6px rgba(127, 243, 255, .8); }
.btn.primary:hover svg { transform: translateY(2px); }
.btn.ghost { border-color: rgba(220, 248, 255, .35); color: var(--ink); background: rgba(4, 18, 31, .25); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn.ghost:hover { border-color: var(--glow); background: rgba(127, 243, 255, .1); }
.btn.big { min-height: 60px; padding: 0 32px; font-size: 17px; }
.hint { position: absolute; bottom: 34px; inset-inline-start: var(--pad); display: flex; align-items: center; gap: 12px; margin: 0; font: 500 11px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
[lang="ar"] .hint { letter-spacing: 0; font: 500 13px/1 var(--sans); }
.hint-line { position: relative; width: 1px; height: 46px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.hint-line::after { content: ''; position: absolute; inset-inline: 0; top: -40%; height: 40%; background: var(--glow); animation: drip 2s var(--ease) infinite; }
@keyframes drip { to { top: 100%; } }

/* services */
.svc, .steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 0; }
.svc li, .steps li { display: grid; grid-template-columns: 52px 1fr; gap: 14px; padding: 20px 0; border-top: 1px solid var(--line); }
.svc li:last-child, .steps li:last-child { border-bottom: 1px solid var(--line); }
.n { font: 500 12px/1.9 var(--mono); color: var(--glow); letter-spacing: .1em; }
.svc h3, .steps h3 { margin: 0 0 4px; font: 400 28px/1.1 var(--display); letter-spacing: -.01em; }
[lang="ar"] .svc h3, [lang="ar"] .steps h3 { font-size: 24px; font-weight: 500; line-height: 1.35; }
.svc p, .steps p { margin: 0; color: var(--ink-2); font-size: 15px; }
.svc li { transition: padding .4s var(--ease), background .4s; }
.svc li:hover { padding-inline-start: 10px; background: linear-gradient(90deg, rgba(127, 243, 255, .07), transparent); }
[dir="rtl"] .svc li:hover { background: linear-gradient(270deg, rgba(127, 243, 255, .07), transparent); }

/* work */
.work { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.case { position: relative; padding: 14px 14px 22px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(20, 16, 50, .5), rgba(6, 4, 20, .55)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .5s var(--ease), border-color .4s, box-shadow .4s; }
.case:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--a) 60%, transparent); box-shadow: 0 30px 60px -30px var(--a); }
.case-art { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, var(--b) 40%, #06041a), #06041a 70%); }
.case-art i { position: absolute; border-radius: 50%; filter: blur(1px); }
.case-art i:nth-child(1) { width: 58%; aspect-ratio: 1; left: 21%; top: 16%; background: radial-gradient(circle at 40% 35%, #fff 0, var(--a) 18%, color-mix(in srgb, var(--a) 30%, transparent) 46%, transparent 70%); animation: bob 7s ease-in-out infinite; }
.case-art i:nth-child(2) { width: 120%; height: 120%; left: -10%; top: 46%; border: 1px solid color-mix(in srgb, var(--a) 50%, transparent); border-radius: 50%; }
.case-art i:nth-child(3) { width: 90%; height: 90%; left: 5%; top: 62%; border: 1px solid color-mix(in srgb, var(--b) 60%, transparent); border-radius: 50%; }
.case:nth-child(2) .case-art i:nth-child(1) { left: 34%; top: 10%; width: 46%; animation-delay: -2s; }
.case:nth-child(3) .case-art i:nth-child(1) { left: 12%; top: 24%; width: 40%; animation-delay: -4s; }
@keyframes bob { 50% { transform: translateY(-8%); } }
.case-meta { display: flex; justify-content: space-between; gap: 8px; margin: 16px 4px 8px; font: 500 10.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
[lang="ar"] .case-meta { letter-spacing: 0; font: 500 12.5px/1.4 var(--sans); }
.case h3 { margin: 0 4px 6px; font: 400 30px/1.05 var(--display); }
[lang="ar"] .case h3 { font-size: 25px; font-weight: 500; line-height: 1.3; }
.case p { margin: 0 4px; font-size: 14.5px; color: var(--ink-2); }
.note { margin: 22px 0 0; font-size: 12.5px; color: var(--ink-3); }

/* footer */
.foot { position: relative; z-index: 10; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 26px var(--pad) max(28px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); background: linear-gradient(180deg, rgba(10, 2, 1, 0), rgba(10, 2, 1, .7)); }
.foot a { color: var(--ink); text-decoration-color: rgba(255, 179, 71, .6); text-underline-offset: 3px; }
.foot a:hover { color: #ffb347; }

/* reveal */
.js .rv { opacity: 0; transform: translateY(26px); filter: blur(6px); transition: opacity 1s var(--ease), transform 1.1s var(--ease), filter 1s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .rv.in { opacity: 1; transform: none; filter: none; }
.rm .rv, .no-io .rv { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }

/* ---------- dialog + custom listbox ---------- */
.modal { width: min(520px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 1px solid rgba(255, 179, 71, .3); border-radius: 24px; background: linear-gradient(180deg, #1a0a06, #0b0403); color: var(--ink); box-shadow: 0 40px 120px -20px rgba(255, 140, 50, .35); overflow: visible; }
.modal::backdrop { background: rgba(2, 4, 10, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal[open] { animation: pop .45s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.dlg { padding: 26px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.dlg-head h2 { font-size: 38px; text-shadow: none; }
[lang="ar"] .dlg-head h2 { font-size: 30px; }
.x { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.x svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.x:hover { border-color: #ffb347; color: #ffb347; }
.dlg-body { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label, .lab { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea, .lb-btn { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255, 220, 190, .18); background: rgba(255, 240, 225, .04); color: var(--ink); font: 400 15px/1.4 var(--sans); transition: border-color .25s, background .25s; }
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field textarea:focus { outline: none; border-color: #ffb347; background: rgba(255, 179, 71, .06); }
.lb { position: relative; }
.lb-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: start; cursor: pointer; }
.lb-btn svg { width: 18px; height: 18px; flex: none; stroke: currentColor; stroke-width: 2; fill: none; transition: transform .3s var(--ease); }
.lb-btn[aria-expanded="true"] { border-color: #ffb347; }
.lb-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.lb-btn.empty span { color: var(--ink-3); }
.lb-list { position: absolute; z-index: 5; top: calc(100% + 6px); inset-inline: 0; margin: 0; padding: 6px; list-style: none; border-radius: 14px; border: 1px solid rgba(255, 179, 71, .3); background: #1d0d08; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7); animation: pop .25s var(--ease); }
.lb-list:focus { outline: none; }
.lb-list [role="option"] { position: relative; padding: 11px 12px 11px 36px; border-radius: 9px; cursor: pointer; font-size: 15px; }
[dir="rtl"] .lb-list [role="option"] { padding: 11px 36px 11px 12px; }
.lb-list [role="option"].act { background: rgba(255, 179, 71, .14); }
.lb-list [role="option"][aria-selected="true"]::before { content: ''; position: absolute; inset-inline-start: 14px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #ffb347; box-shadow: 0 0 10px #ffb347; }
.err { margin: 0; min-height: 1em; font-size: 13px; color: #ffb3a1; }
.err:empty { display: none; }
.dlg-foot { display: flex; justify-content: flex-end; }
.dlg .btn.primary { background: #ffcf8a; }
.dlg .btn.primary:hover { background: #ffb347; box-shadow: 0 0 0 6px rgba(255, 179, 71, .16), 0 10px 50px -6px rgba(255, 179, 71, .7); }
.dlg-done { display: grid; gap: 18px; justify-items: start; }
.done-t { margin: 0; font: 400 24px/1.3 var(--display); }
.done-t:focus { outline: none; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .work { grid-template-columns: 1fr; gap: 14px; }
  .case { display: grid; grid-template-columns: 110px 1fr; grid-template-rows: auto auto 1fr; column-gap: 14px; padding: 12px; }
  .case-art { grid-row: 1 / 4; aspect-ratio: 1; }
  .case-meta { margin: 2px 0 4px; flex-direction: column; gap: 2px; }
  .case h3 { margin: 0 0 4px; font-size: 24px; }
  .case p { margin: 0; font-size: 13.5px; }
}
@media (max-width: 760px) {
  :root { --pad: 20px; }
  .top { padding-block: 14px; }
  .brand span { font-size: 13px; }
  .chip { height: 36px; padding: 0 12px; }
  .sound .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .meter { top: auto; bottom: max(14px, env(safe-area-inset-bottom)); transform: none; inset-inline-end: 14px; gap: 0; }
  .m-rail, .m-track { display: none; }
  .m-read { padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(2, 10, 20, .45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .m-depth { font-size: 18px; }
  .m-zone { font-size: 14px; }
  .m-extra { display: none; }
  .scrim { background: linear-gradient(180deg, rgba(2, 8, 16, 0) 22%, rgba(2, 8, 16, .45) 52%, rgba(2, 8, 16, .6) 100%); }
  [dir="rtl"] .scrim { background: linear-gradient(180deg, rgba(2, 8, 16, 0) 22%, rgba(2, 8, 16, .45) 52%, rgba(2, 8, 16, .6) 100%); }
  .zone { align-items: flex-end; min-height: 120vh; padding: 46vh 20px 90px; }
  .z0 { min-height: 100svh; padding-top: 40vh; padding-bottom: 96px; }
  .z2 { padding-top: 36vh; }
  h1 { font-size: clamp(46px, 13vw, 64px); }
  [lang="ar"] h1 { font-size: clamp(38px, 11vw, 54px); }
  h2 { font-size: clamp(40px, 11.5vw, 56px); }
  [lang="ar"] h2 { font-size: clamp(34px, 9.6vw, 46px); }
  .lead { margin-top: 18px; font-size: 15.5px; }
  .cta { margin-top: 26px; }
  .btn { min-height: 48px; padding: 0 20px; font-size: 14.5px; }
  .btn.big { min-height: 54px; padding: 0 24px; font-size: 15.5px; }
  .hint { display: none; }
  .svc, .steps { margin-top: 26px; }
  .svc li, .steps li { grid-template-columns: 38px 1fr; padding: 14px 0; }
  .svc h3, .steps h3 { font-size: 23px; }
  .svc p, .steps p { font-size: 14px; }
  .foot { padding-bottom: 86px; }
}

/* ---------- reduced motion ---------- */
.rm .grain, .rm .hint-line::after, .rm .case-art i { animation: none; }
.rm .loader-orb i { animation-duration: 6s; }

/* ---------- no WebGL fallback ---------- */
.no-gl #gl { display: none; }
.no-gl body { position: relative; }
.no-gl .sea { position: absolute; inset: 0; background: linear-gradient(180deg, #1a7f9a 0%, #06324a 14%, #04203c 28%, #0a0a2e 45%, #05040f 64%, #030108 80%, #1a0602 96%, #2a0a03 100%); }
.no-gl .css-jelly { display: block; position: fixed; z-index: 1; top: 14vh; inset-inline-end: 12vw; width: min(260px, 30vw); filter: drop-shadow(0 0 30px rgba(127, 243, 255, .5)); animation: float 7s ease-in-out infinite; }
.rm.no-gl .css-jelly { animation: none; }
@keyframes float { 50% { transform: translateY(-18px); } }
@media (max-width: 760px) { .no-gl .css-jelly { inset-inline-end: 50%; transform: translateX(50%); top: 10vh; width: 150px; animation: none; } [dir="rtl"] .no-gl .css-jelly { transform: translateX(-50%); } }

/* header legibility over scrolled content */
.top::before { content: ''; position: absolute; inset: 0 0 -44px; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(2, 8, 16, .92) 0%, rgba(2, 8, 16, .75) 55%, rgba(2, 8, 16, 0) 100%); opacity: 0; transition: opacity .4s; }
.scrolled .top::before { opacity: 1; }
