/* GREEN TEC Engineering Consultancy — "digital twin" dark theme */

@font-face {
  font-family: "Jost";
  src: url("/assets/fonts/jost-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Kufi Arabic";
  src: url("/assets/fonts/noto-kufi-arabic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  --bg: #060b07;
  --bg-2: #09110a;
  --bg-3: #040805;
  --surface: rgba(16, 28, 18, 0.62);
  --surface-solid: #0d170f;
  --surface-hi: rgba(26, 44, 29, 0.7);
  --ink: #eef3ea;
  --ink-soft: #a5b39e;
  --ink-mute: #6f7e69;
  --lime: #a7f25c;
  --lime-soft: rgba(167, 242, 92, 0.14);
  --mint: #5fe0a8;
  --sun: #ffb648;
  --error: #ff7a66;
  --line: rgba(190, 255, 200, 0.09);
  --line-strong: rgba(190, 255, 200, 0.2);
  --glass: rgba(9, 17, 10, 0.66);
  --bg-rgb: 6, 11, 7;
  --card-rgb: 9, 17, 10;
  --fill-rgb: 255, 255, 255;
  --lime-rgb: 167, 242, 92;
  --svg-rgb: 240, 238, 231;
  --lime-hi: #c3ff7e;
  --on-lime: #071006;
  --bg-hover: #0c170e;
  --accent-grad: linear-gradient(100deg, #e4ffb8 0%, #a7f25c 38%, #5fe0a8 100%);
  --num-grad: linear-gradient(180deg, #ffffff 30%, #9fb59a);
  --logo-filter: brightness(0) invert(1);
  --font: "Jost", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1360px;
  --nav-h: 76px;
  --bar-h: 0px;
  --radius: 16px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --scrim-to: right;
  --glow-x: 66%;
  --grid-img:
    linear-gradient(rgba(var(--lime-rgb), 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--lime-rgb), 0.05) 1px, transparent 1px),
    linear-gradient(rgba(var(--lime-rgb), 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--lime-rgb), 0.022) 1px, transparent 1px);
  --grid-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  color-scheme: dark;
}
html[dir="rtl"] { --scrim-to: left; --glow-x: 34%; }
html[lang="ar"] { --font: "Noto Kufi Arabic", "Jost", ui-sans-serif, system-ui, sans-serif; }

/* ---------- day mode ---------- */
:root[data-theme="light"] {
  --bg: #f3f5ef;
  --bg-2: #eaefe5;
  --bg-3: #e1e8da;
  --bg-rgb: 243, 245, 239;
  --card-rgb: 255, 255, 255;
  --fill-rgb: 25, 50, 25;
  --lime-rgb: 61, 140, 28;
  --svg-rgb: 25, 45, 25;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-solid: #ffffff;
  --surface-hi: rgba(255, 255, 255, 0.95);
  --bg-hover: #f9fbf6;
  --ink: #0f1a0f;
  --ink-soft: #45543f;
  --ink-mute: #75846e;
  --lime: #3d8c1c;
  --lime-hi: #4aa324;
  --lime-soft: rgba(61, 140, 28, 0.1);
  --on-lime: #ffffff;
  --mint: #0f8a66;
  --sun: #d27c0b;
  --line: rgba(20, 50, 20, 0.12);
  --line-strong: rgba(20, 50, 20, 0.24);
  --glass: rgba(255, 255, 255, 0.76);
  --accent-grad: linear-gradient(100deg, #2c7410 0%, #3d8c1c 42%, #0f8a66 100%);
  --num-grad: linear-gradient(180deg, #0f1a0f 30%, #5d6e57);
  --logo-filter: none;
  color-scheme: light;
}
/* service colours that are near-white get darkened on light backgrounds */
:root[data-theme="light"] .step-n, :root[data-theme="light"] .step-more { color: color-mix(in srgb, var(--c) 40%, var(--ink)); border-color: color-mix(in srgb, var(--c) 45%, var(--line-strong)); }
:root[data-theme="light"] .sw { border-color: color-mix(in srgb, var(--c) 55%, #1b2a1b); }
:root[data-theme="light"] .layer-link[aria-current="true"] .sw, :root[data-theme="light"] .step-card h3 .sw, :root[data-theme="light"] .marquee i, :root[data-theme="light"] .anno i { background: color-mix(in srgb, var(--c) 70%, #1b2a1b); }
:root[data-theme="light"] .anno span { border-color: color-mix(in srgb, var(--c) 50%, var(--line-strong)); }
.logo-l { display: none !important; }
:root[data-theme="light"] .logo-l { display: block !important; }
:root[data-theme="light"] .logo-d { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
html[lang="ar"] body { font-size: 1.04rem; line-height: 1.9; }
::selection { background: var(--lime); color: var(--bg); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; inset-inline-start: 12px; top: -80px; z-index: 50;
  background: var(--lime); color: var(--bg); padding: 10px 16px; border-radius: 6px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* scroll progress */
.progress { position: fixed; inset-inline: 0; top: 0; height: 2px; z-index: 40; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; transform: scaleX(var(--p, 0)); transform-origin: var(--scrim-to) center; background: linear-gradient(90deg, var(--mint), var(--lime)); box-shadow: 0 0 10px rgba(var(--lime-rgb), 0.7); }
html[dir="ltr"] .progress span { transform-origin: left center; }
html[dir="rtl"] .progress span { transform-origin: right center; }

/* cursor spotlight (desktop) */
.spotlight { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity 400ms ease;
  background: radial-gradient(520px circle at var(--mx, -999px) var(--my, -999px), rgba(var(--lime-rgb), 0.06), transparent 65%); }
.spotlight.is-on { opacity: 1; }

/* eyebrow labels */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 22px;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--lime);
}
html[lang="ar"] .eyebrow { font-family: var(--font); letter-spacing: 0; font-size: 0.9rem; }
.eyebrow span { font-family: var(--mono); padding: 3px 7px; border: 1px solid rgba(var(--lime-rgb), 0.4); border-radius: 4px; letter-spacing: 0.08em; }
.eyebrow::after { content: ""; width: 42px; height: 1px; background: linear-gradient(90deg, var(--lime), transparent); }
html[dir="rtl"] .eyebrow::after { background: linear-gradient(270deg, var(--lime), transparent); }

/* crop-mark frames, as on a technical drawing */
.step-card, .sun-panel, .titleblock, .enquiry, .st-visual, .layer-panel { position: relative; }
.step-card::after, .sun-panel::after, .titleblock::after, .enquiry::after, .st-visual::after {
  content: ""; position: absolute; inset: -1px; pointer-events: none; border-radius: inherit; opacity: 0.85;
  --cm: var(--c, var(--lime));
  background:
    linear-gradient(var(--cm), var(--cm)) top left / 16px 1.5px no-repeat,
    linear-gradient(var(--cm), var(--cm)) top left / 1.5px 16px no-repeat,
    linear-gradient(var(--cm), var(--cm)) top right / 16px 1.5px no-repeat,
    linear-gradient(var(--cm), var(--cm)) top right / 1.5px 16px no-repeat,
    linear-gradient(var(--cm), var(--cm)) bottom left / 16px 1.5px no-repeat,
    linear-gradient(var(--cm), var(--cm)) bottom left / 1.5px 16px no-repeat,
    linear-gradient(var(--cm), var(--cm)) bottom right / 16px 1.5px no-repeat,
    linear-gradient(var(--cm), var(--cm)) bottom right / 1.5px 16px no-repeat;
}

/* ---------- 3D stage ---------- */
/* The canvas keeps the large-viewport height, so it does not resize (and the model does not jump)
   when a phone's address bar slides in and out during scrolling. */
.stage {
  position: fixed; top: 0; left: 0; z-index: 0;
  display: block; width: 100%; height: 100vh; height: 100lvh;
  background-color: var(--bg);
  background-image:
    radial-gradient(55% 55% at var(--glow-x) 46%, rgba(110, 200, 90, 0.17) 0%, rgba(110, 200, 90, 0) 70%),
    radial-gradient(120% 90% at 50% 120%, rgba(95, 224, 168, 0.08) 0%, rgba(95, 224, 168, 0) 60%),
    var(--grid-img);
  background-size: 100% 100%, 100% 100%, var(--grid-size);
  opacity: 0; transition: opacity 1.2s ease;
  touch-action: pan-y; cursor: grab;
}
.stage.is-ready { opacity: 1; }
.stage.is-dragging { cursor: grabbing; }
.stage-fallback { display: none; }
.no-webgl .stage { display: none; }
.no-webgl .stage-fallback {
  display: block; position: fixed; inset: 0; z-index: 0;
  background: var(--bg) url("/assets/img/model-poster.jpg") 70% 60% / cover no-repeat;
}
main, .footer { position: relative; z-index: 1; }

/* technical callouts pinned to the model */
.annos { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none; overflow: hidden; transition: opacity 300ms ease; }
.annos.is-off { opacity: 0; }
.anno-group { position: absolute; inset: 0; opacity: 0; transition: opacity 350ms ease; }
.anno-group.is-on { opacity: 1; transition: opacity 600ms ease 650ms; }
.anno { position: absolute; left: 0; top: 0; will-change: transform; }
.anno i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px rgba(var(--bg-rgb), 0.6), 0 0 12px var(--c); }
.anno i::after { content: ""; position: absolute; left: 3.5px; bottom: 8px; width: 1px; height: 26px; background: linear-gradient(to top, var(--c), transparent); opacity: 0.8; }
.anno span {
  position: absolute; left: -10px; bottom: 34px; white-space: nowrap;
  padding: 5px 10px; border-radius: 6px;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--ink);
  background: rgba(var(--bg-rgb), 0.78); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
html[lang="ar"] .anno span { font-family: var(--font); letter-spacing: 0; font-size: 0.8rem; }
.anno.flip span { left: auto; right: -10px; }

/* ---------- navigation ---------- */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  height: var(--nav-h); padding: 0 var(--gutter);
  transition: background-color 260ms ease, box-shadow 260ms ease;
  background: linear-gradient(to bottom, rgba(var(--bg-rgb), 0.8), rgba(var(--bg-rgb), 0));
}
.nav.is-solid { background: rgba(var(--bg-rgb), 0.72); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); box-shadow: 0 1px 0 var(--line); }
.brand { display: block; position: relative; z-index: 2; }
.brand img { height: 30px; width: auto; }
.nav-links { margin-inline-start: auto; display: flex; align-items: center; gap: 26px; }
.nav-links a { font-size: 0.95rem; text-decoration: none; color: var(--ink-soft); transition: color 160ms ease; }
.nav-links a:hover, .nav-links > a.is-active { color: var(--ink); }
.nav-links > a:not(.btn):not(.lang) { position: relative; padding-block: 6px; }
.nav-links > a:not(.btn):not(.lang)::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1.5px; background: var(--lime); box-shadow: 0 0 8px var(--lime);
  transform: scaleX(0); transition: transform 300ms var(--ease);
}
.nav-links > a:not(.btn):not(.lang):hover::after, .nav-links > a.is-active::after { transform: scaleX(1); }
.menu-contact { display: none; }
.lang {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 13px;
  font-size: 0.92rem; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 999px;
  transition: border-color 160ms ease, color 160ms ease;
}
.nav-links .lang { color: var(--ink); }
.lang:hover { border-color: var(--lime); color: var(--lime); }
html[lang="en"] .lang { font-family: "Noto Kufi Arabic", sans-serif; font-size: 0.88rem; }
html[lang="ar"] .lang { font-family: "Jost", sans-serif; }
.lang-mobile, .menu-btn, .theme-mobile { display: none; }
.theme-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  color: var(--ink); background: rgba(var(--fill-rgb), 0.03);
  border: 1px solid var(--line-strong); border-radius: 50%; cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, transform 300ms var(--ease);
}
.theme-btn:hover { border-color: var(--lime); color: var(--lime); transform: rotate(-20deg); }
.theme-btn .ico { width: 17px; height: 17px; }
.theme-btn .i-moon { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-moon { display: block; }
.theme-btn.theme-mobile { display: none; }
html { transition: background-color 300ms ease; }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  font: inherit; font-size: 1rem; font-weight: 500; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent; border-radius: 999px;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 220ms ease, transform 180ms ease;
}
.btn:active { transform: scale(0.98); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 0.93rem; }
.btn-light, .btn-dark {
  background: var(--lime); color: var(--on-lime) !important;
  box-shadow: 0 0 0 1px rgba(var(--lime-rgb), 0.5), 0 12px 34px -12px rgba(var(--lime-rgb), 0.75);
}
.btn-light:hover, .btn-dark:hover { background: var(--lime-hi); box-shadow: 0 0 0 1px rgba(195, 255, 126, 0.7), 0 16px 44px -12px rgba(var(--lime-rgb), 0.95); }
.btn-line, .btn-line-dark { border-color: var(--line-strong); color: var(--ink); background: rgba(var(--fill-rgb), 0.02); }
.btn-line:hover, .btn-line-dark:hover { border-color: var(--lime); color: var(--lime); background: var(--lime-soft); }
html[dir="rtl"] .ico-arrow { transform: scaleX(-1); }

.chip {
  font: inherit; font-size: 0.82rem; line-height: 1; color: var(--sun);
  background: transparent; border: 1px solid rgba(255, 182, 72, 0.45); border-radius: 999px;
  padding: 8px 14px; cursor: pointer; white-space: nowrap;
  font-family: var(--mono); letter-spacing: 0.04em;
}
html[lang="ar"] .chip { font-family: var(--font); letter-spacing: 0; }
.chip:hover, .chip[aria-pressed="true"] { background: rgba(255, 182, 72, 0.12); }

/* radio chips (sun check, enquiry) */
.chip-opt { position: relative; display: block; cursor: pointer; }
.chip-opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip-opt > span {
  display: flex; align-items: center; justify-content: center; gap: 2px; min-height: 42px; padding: 6px 14px;
  font-size: 0.92rem; line-height: 1.25; text-align: center; color: var(--ink-soft);
  background: rgba(var(--fill-rgb), 0.02);
  border: 1px solid var(--line-strong); border-radius: 999px;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.chip-opt:hover > span { border-color: rgba(var(--lime-rgb), 0.6); color: var(--ink); }
.chip-opt input:checked + span { background: var(--lime); border-color: var(--lime); color: var(--on-lime); font-weight: 500; box-shadow: 0 0 22px -6px rgba(var(--lime-rgb), 0.8); }
.chip-opt input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }
.chip-tall > span { flex-direction: column; align-items: flex-start; text-align: start; border-radius: 12px; padding: 9px 14px; }
.chip-tall small { font-size: 0.75rem; opacity: 0.75; font-weight: 400; font-family: var(--mono); }
html[lang="ar"] .chip-tall small { font-family: var(--font); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 40px;
  padding: 140px var(--gutter) 64px;
  pointer-events: none;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to var(--scrim-to), rgba(var(--bg-rgb), 0.92) 0%, rgba(var(--bg-rgb), 0.6) 30%, rgba(var(--bg-rgb), 0) 54%),
    linear-gradient(to top, rgba(var(--bg-rgb), 0.85) 0%, rgba(var(--bg-rgb), 0) 30%);
}
.hud {
  position: absolute; top: calc(var(--nav-h) + 14px); z-index: 2;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute);
  pointer-events: none;
}
html[lang="ar"] .hud { letter-spacing: 0.02em; }
.hud b { color: var(--ink); font-weight: 500; }
.hud-top { inset-inline-start: var(--gutter); }
.hud-model { inset-inline-end: var(--gutter); color: var(--ink-soft); }
.hud-sep { width: 1px; height: 12px; background: var(--line-strong); }
.hud-dot, .hud-live { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); animation: pulse 2.4s ease-in-out infinite; }
.hud-live { background: #ff5d4a; box-shadow: 0 0 10px #ff5d4a; margin-inline-end: 2px; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.hero-copy { pointer-events: auto; max-width: min(46rem, 48vw); }
.eyebrow-hero { color: var(--ink-soft); margin-bottom: 26px; }
.eyebrow-hero::after { display: none; }
.eyebrow-hero::before { content: ""; width: 26px; height: 1.5px; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.hero h1 {
  font-size: clamp(3rem, 6.2vw, 6.4rem);
  line-height: 0.98; letter-spacing: -0.04em; font-weight: 500;
  margin-bottom: 0.38em; text-wrap: balance;
}
html[lang="ar"] .hero h1 { font-size: clamp(2.5rem, 5vw, 5rem); line-height: 1.3; letter-spacing: 0; font-weight: 700; }
.accent {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 28px rgba(var(--lime-rgb), 0.25));
}
.lede { font-size: 1.16rem; line-height: 1.6; color: var(--ink-soft); max-width: 34rem; }
html[lang="ar"] .lede { font-size: 1.08rem; line-height: 1.95; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-copy > * { animation: rise 1s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: 100ms; }
.hero-copy > :nth-child(3) { animation-delay: 200ms; }
.hero-copy > :nth-child(4) { animation-delay: 300ms; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-mute); text-decoration: none;
  pointer-events: auto;
}
html[lang="ar"] .scroll-cue { letter-spacing: 0; font-family: var(--font); }
.scroll-cue span { position: relative; width: 1px; height: 38px; background: var(--line-strong); overflow: hidden; }
.scroll-cue span::after { content: ""; position: absolute; inset-inline: 0; top: -40%; height: 40%; background: var(--lime); animation: drip 2s var(--ease) infinite; }
@keyframes drip { to { top: 100%; } }

.sun-panel {
  pointer-events: auto; width: 320px;
  background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px 14px;
  animation: rise 1s 360ms var(--ease) both;
  --c: var(--sun);
}
.sun-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sun-title { font-size: 0.78rem; font-weight: 500; font-family: var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
html[lang="ar"] .sun-title { font-family: var(--font); letter-spacing: 0; font-size: 0.95rem; }
.sun-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 30px; margin: 8px 0 10px; background: transparent; cursor: pointer; }
.sun-range::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, #2b3e4d, var(--sun) 50%, #2b3e4d); }
.sun-range::-moz-range-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, #2b3e4d, var(--sun) 50%, #2b3e4d); }
.sun-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8.5px; border-radius: 50%; background: var(--sun); border: 4px solid var(--bg); box-shadow: 0 0 0 1px var(--sun), 0 0 18px rgba(255, 182, 72, 0.8); }
.sun-range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--sun); border: 4px solid var(--bg); box-shadow: 0 0 0 1px var(--sun); }
.sun-read { display: grid; grid-template-columns: 0.8fr 1fr 1.25fr; gap: 10px; margin: 0 0 10px; }
.sun-read dt { font-size: 0.72rem; color: var(--ink-mute); line-height: 1.3; }
.sun-read dd { margin: 0; font-size: 1.05rem; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.sun-note { margin: 0; font-size: 0.8rem; line-height: 1.45; color: var(--ink-mute); }
html[lang="ar"] .sun-note, html[lang="ar"] .sun-read dt { line-height: 1.7; }

/* ---------- marquee ---------- */
.marquee {
  position: relative; z-index: 1; overflow: hidden;
  background: var(--bg-2); border-block: 1px solid var(--line);
  padding: 20px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; gap: 56px; animation: marquee 48s linear infinite; }
html[dir="rtl"] .marquee-track { animation-name: marquee-rtl; }
.marquee span { display: inline-flex; align-items: center; gap: 14px; white-space: nowrap; font-size: 1.15rem; color: var(--ink-soft); }
.marquee i { width: 9px; height: 9px; border-radius: 2px; background: var(--c); box-shadow: 0 0 12px var(--c); }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }

/* ---------- section base ---------- */
.sec {
  position: relative; z-index: 1;
  background-color: var(--bg);
  background-image: var(--grid-img);
  background-size: var(--grid-size);
  background-position: center top;
}
.practice, .contact, .process, .suntool { padding: clamp(96px, 12vw, 170px) 0; }
.practice h2, .contact h2, .layers-intro h2, .section-head h2 {
  font-size: clamp(2.3rem, 4.4vw, 4.2rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 500;
  margin-bottom: 0.5em; text-wrap: balance;
}
html[lang="ar"] .practice h2, html[lang="ar"] .contact h2, html[lang="ar"] .layers-intro h2, html[lang="ar"] .section-head h2 { line-height: 1.35; letter-spacing: 0; font-weight: 700; }
.section-head { max-width: 50rem; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head p:not(.eyebrow) { font-size: 1.15rem; margin: 0; color: var(--ink-soft); }

/* scroll reveal (only once the script is running) */
.ready .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.ready .reveal.is-in { opacity: 1; transform: none; }

/* ---------- practice ---------- */
.practice-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(40px, 7vw, 110px); align-items: start; }
.practice-copy p:not(.eyebrow) { font-size: 1.16rem; max-width: 34em; color: var(--ink); }
.practice-copy p:not(.eyebrow) + p { color: var(--ink-soft); }

.titleblock { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 4px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tb-logo { width: 100%; max-width: 380px; padding: 30px 30px 26px; filter: var(--logo-filter); opacity: 0.92; }
.titleblock dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line-strong); }
.tb-cell { background: var(--surface-solid); padding: 12px 16px 14px; }
.tb-wide { grid-column: 1 / -1; }
.tb-cell dt { font-size: 0.7rem; color: var(--lime); margin-bottom: 4px; font-family: var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
html[lang="ar"] .tb-cell dt { font-family: var(--font); letter-spacing: 0; font-size: 0.8rem; }
.tb-cell dd { margin: 0; font-size: 0.98rem; line-height: 1.45; color: var(--ink); }
html[lang="ar"] .tb-cell dd { line-height: 1.8; font-size: 0.95rem; }

.facts {
  list-style: none; margin: clamp(64px, 8vw, 110px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.fact { position: relative; display: grid; gap: 10px; align-content: start; padding: 30px 28px 32px; background: var(--bg-2); transition: background-color 250ms ease; }
.fact:hover { background: var(--bg-hover); }
.fact::before { content: ""; position: absolute; top: 0; inset-inline-start: 28px; width: 34px; height: 2px; background: var(--lime); box-shadow: 0 0 12px var(--lime); }
.fact:nth-child(2) { --i: 1; } .fact:nth-child(3) { --i: 2; } .fact:nth-child(4) { --i: 3; }
.fact-n {
  font-size: clamp(3rem, 5.4vw, 4.8rem); line-height: 1; font-weight: 500; letter-spacing: -0.04em;
  font-family: "Jost", sans-serif; font-variant-numeric: tabular-nums; text-align: start;
  background: var(--num-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fact-n span { -webkit-text-fill-color: var(--lime); color: var(--lime); }
.fact-l { font-size: 0.95rem; color: var(--ink-soft); line-height: 1.45; max-width: 16em; }
html[lang="ar"] .fact-l { line-height: 1.75; }

/* ---------- layers ---------- */
.layers { position: relative; padding: clamp(110px, 13vw, 180px) 0 14vh; pointer-events: none; }
.layers::before {
  content: ""; position: sticky; top: 0; z-index: -1; display: block;
  height: 100vh; margin-top: calc(-1 * clamp(110px, 13vw, 180px)); margin-bottom: calc(-100vh + clamp(110px, 13vw, 180px));
  pointer-events: none;
  background: linear-gradient(to var(--scrim-to), rgba(var(--bg-rgb), 0.92) 0%, rgba(var(--bg-rgb), 0.55) 30%, rgba(var(--bg-rgb), 0) 52%);
}
.layers-intro, .layer-panel, .step-card { pointer-events: auto; }
.layers-intro h2, .layers-intro p:not(.eyebrow) { max-width: 33rem; }
.layers-intro p:not(.eyebrow) { font-size: 1.12rem; color: var(--ink-soft); }
.layers-body { display: grid; grid-template-columns: 260px minmax(0, 420px) minmax(0, 1fr); gap: 28px; margin-top: 10vh; }
.layer-panel {
  position: sticky; top: 100px; align-self: start;
  background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 8px 8px;
}
.panel-title { margin: 0 10px 4px; font-size: 0.72rem; font-family: var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--lime); }
html[lang="ar"] .panel-title { font-family: var(--font); letter-spacing: 0; font-size: 0.85rem; }
.group-name { margin: 14px 10px 4px; font-size: 0.72rem; color: var(--ink-mute); font-family: var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
html[lang="ar"] .group-name { font-family: var(--font); letter-spacing: 0; font-size: 0.8rem; }
.layer-panel ul { list-style: none; margin: 0; padding: 0; }
.layer-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  font-size: 0.92rem; line-height: 1.3; text-decoration: none; color: var(--ink-soft);
  transition: background-color 160ms ease, color 160ms ease;
}
.layer-link:hover { color: var(--ink); background: rgba(var(--fill-rgb), 0.04); }
.layer-link[aria-current="true"] { color: var(--ink); background: rgba(var(--lime-rgb), 0.08); box-shadow: inset 2px 0 0 var(--c); }
html[dir="rtl"] .layer-link[aria-current="true"] { box-shadow: inset -2px 0 0 var(--c); }
.sw { flex: none; width: 10px; height: 10px; border: 1.5px solid var(--c); border-radius: 2px; transition: background-color 200ms ease, box-shadow 200ms ease; }
.layer-link[aria-current="true"] .sw { background: var(--c); box-shadow: 0 0 10px var(--c); }

.layer-step { min-height: 82vh; display: flex; align-items: center; }
.step-card {
  width: 100%;
  background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 6px; padding: 26px 28px 22px;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}
.step-n { margin: 0 0 12px; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em; color: var(--c); text-align: start; }
.step-card h3 { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; font-size: 1.6rem; line-height: 1.2; font-weight: 500; letter-spacing: -0.015em; }
.step-card h3 .sw { width: 11px; height: 11px; background: var(--c); border: 0; box-shadow: 0 0 12px var(--c); }
html[lang="ar"] .step-card h3 { font-size: 1.4rem; line-height: 1.6; font-weight: 600; }
.step-card p { color: var(--ink-soft); margin: 0; }
.step-more { display: none; }
.step-card ul { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.step-card li { position: relative; padding: 9px 0 9px 18px; border-bottom: 1px solid var(--line); font-size: 0.95rem; line-height: 1.45; color: var(--ink); }
html[dir="rtl"] .step-card li { padding: 9px 18px 9px 0; }
.step-card li::before { content: ""; position: absolute; inset-inline-start: 0; top: 1.05em; width: 8px; height: 1px; background: var(--c); }
html[lang="ar"] .step-card li { line-height: 1.75; }

/* ---------- process (scroll timeline) ---------- */
.psteps { position: relative; list-style: none; margin: 0 auto; padding: 0; max-width: 1080px; display: grid; gap: 22px; }
.prail { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--line-strong); border-radius: 2px; }
.prail span { display: block; width: 100%; height: 100%; transform: scaleY(var(--p, 0)); transform-origin: top; background: linear-gradient(var(--mint), var(--lime)); box-shadow: 0 0 14px var(--lime); border-radius: 2px; }
.pstep {
  position: relative; width: calc(50% - 46px);
  padding: 26px 28px 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color 300ms ease, background-color 300ms ease, transform 300ms var(--ease);
}
.pstep:nth-child(even) { justify-self: start; }
.pstep:nth-child(odd) { justify-self: end; }
.pstep::before {
  content: ""; position: absolute; top: 30px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-strong); transition: all 300ms ease;
}
.pstep:nth-child(even)::before { inset-inline-end: -54px; }
.pstep:nth-child(odd)::before { inset-inline-start: -54px; }
.pstep.is-lit { border-color: rgba(var(--lime-rgb), 0.35); background: var(--surface-hi); }
.pstep.is-lit::before { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 16px var(--lime); }
html[dir="rtl"] .pstep-n { text-align: right; }
.pstep-n { display: block; margin-bottom: 18px; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.14em; color: var(--lime); }
.pstep h3 { font-size: 1.35rem; line-height: 1.3; font-weight: 500; margin-bottom: 10px; }
html[lang="ar"] .pstep h3 { font-weight: 600; line-height: 1.6; font-size: 1.2rem; }
.pstep p { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--ink-soft); }
html[lang="ar"] .pstep p { line-height: 1.85; }

/* ---------- sun check ---------- */
.suntool { background-color: var(--bg-2); }
.st-grid { display: grid; grid-template-columns: minmax(0, 290px) minmax(0, 1fr) minmax(0, 330px); gap: clamp(24px, 3.2vw, 48px); align-items: start; }
.st-controls { display: grid; gap: 22px; }
.st-controls .field { margin: 0; }
.st-controls label, .st-set legend { font-size: 0.72rem; font-weight: 500; font-family: var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); }
html[lang="ar"] .st-controls label, html[lang="ar"] .st-set legend { font-family: var(--font); letter-spacing: 0; font-size: 0.9rem; }
.st-set { border: 0; margin: 0; padding: 0; min-width: 0; }
.st-set legend { padding: 0; margin-bottom: 10px; }
.st-dirs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.st-dirs .chip-opt > span { padding-inline: 4px; font-size: 0.86rem; font-family: var(--mono); }
.st-seasons { display: grid; gap: 6px; }
.st-time { display: flex; align-items: center; gap: 12px; }
.st-time .sun-range, .st-controls .field .sun-range { margin: 0; flex: 1; min-height: 0; padding: 0; background: transparent; border: 0; border-radius: 0; }
.st-controls .field .sun-range:focus { outline: none; }
.st-controls .field .sun-range:focus-visible { outline: 2px solid var(--sun); outline-offset: 4px; }
#st-time-out { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--sun); margin-inline-start: 6px; letter-spacing: 0; }
.st-controls .field select {
  width: 100%; min-height: 48px; padding: 10px 40px 10px 14px; margin-top: 8px;
  font: inherit; font-size: 1rem; color: var(--ink); text-transform: none; letter-spacing: 0;
  background: rgba(var(--fill-rgb), 0.03) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a7f25c' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 15px center;
  border: 1px solid var(--line-strong); border-radius: 12px; -webkit-appearance: none; appearance: none;
}
html[dir="rtl"] .st-controls .field select { padding: 10px 14px 10px 40px; background-position: left 15px center; }
.st-controls .field select option { color: #0b1209; }
.st-visual { padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: radial-gradient(60% 60% at 50% 50%, rgba(var(--lime-rgb), 0.06), transparent 70%), rgba(var(--bg-rgb), 0.5); }
.st-visual svg { display: block; width: 100%; max-width: 560px; height: auto; margin-inline: auto; overflow: visible; touch-action: pan-y; }
.st-results h3 { font-size: 0.72rem; font-weight: 500; margin: 0 0 16px; font-family: var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); }
html[lang="ar"] .st-results h3 { font-family: var(--font); letter-spacing: 0; font-size: 0.95rem; }
.st-bars { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 14px; }
.st-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name val" "track track"; gap: 6px 12px; align-items: baseline; font-size: 0.92rem; }
.st-bar > span:first-child { grid-area: name; }
.st-bar .st-track { grid-area: track; }
.st-bar .st-val { grid-area: val; }
.st-bar b { font-weight: 500; }
.st-bar .st-dir { color: var(--ink-mute); font-family: var(--mono); font-size: 0.82rem; }
.st-track { height: 6px; background: rgba(var(--fill-rgb), 0.05); border-radius: 99px; overflow: hidden; }
.st-fill { display: block; height: 100%; border-radius: 99px; transition: width 500ms var(--ease), background-color 500ms ease; box-shadow: 0 0 12px currentColor; }
.st-val { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-mute); font-size: 0.78rem; text-align: end; }
.st-val b { color: var(--ink); font-size: 0.95rem; }
.st-reco { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.st-reco li { position: relative; padding-inline-start: 20px; font-size: 0.96rem; line-height: 1.55; color: var(--ink-soft); }
html[lang="ar"] .st-reco li { line-height: 1.85; }
.st-reco li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.st-reco li b { color: var(--ink); font-weight: 500; }
.st-note { font-size: 0.8rem; line-height: 1.5; color: var(--ink-mute); margin-bottom: 22px; }
.st-svg-label { font-family: var(--font); font-size: 11px; fill: var(--ink-soft); }
.st-svg-hour { font-family: var(--mono); font-size: 9px; fill: var(--sun); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 7vw, 110px); align-items: start; }
.contact-intro { font-size: 1.14rem; max-width: 30em; color: var(--ink-soft); }
.offices { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 40px 0 22px; padding-top: 26px; border-top: 1px solid var(--line-strong); }
.office h3 { margin-bottom: 6px; font-size: 1.1rem; font-weight: 500; }
.office p { margin: 0 0 4px; font-size: 0.98rem; color: var(--ink-soft); }
.k { color: var(--ink-mute); font-size: 0.72rem; margin-inline-end: 8px; font-family: var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
html[lang="ar"] .k { font-family: var(--font); letter-spacing: 0; font-size: 0.85rem; }
.office a, .wa-line a { text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line-strong); transition: border-color 160ms ease, color 160ms ease; }
.office a:hover, .wa-line a:hover { border-bottom-color: var(--lime); color: var(--lime); }
.wa-line { font-size: 1rem; }

.enquiry {
  background: var(--surface); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line-strong); border-radius: 6px;
  padding: clamp(22px, 3vw, 40px);
  box-shadow: 0 40px 100px -50px rgba(var(--lime-rgb), 0.25);
}
.field { display: grid; gap: 7px; margin: 0 0 18px; min-width: 0; }
fieldset.field { border: 0; padding: 0; }
.field label, .field > legend { font-size: 0.72rem; font-weight: 500; padding: 0; font-family: var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); }
html[lang="ar"] .field label, html[lang="ar"] .field > legend { font-family: var(--font); letter-spacing: 0; font-size: 0.9rem; }
.field > legend { margin-bottom: 10px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 15px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: rgba(var(--fill-rgb), 0.03); border: 1px solid var(--line-strong); border-radius: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-mute); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--lime); outline: none; box-shadow: 0 0 0 4px rgba(var(--lime-rgb), 0.14); background: rgba(var(--lime-rgb), 0.03); }
.field textarea { min-height: 100px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .chip-opt > span { min-height: 40px; font-size: 0.9rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.form-note { margin: 16px 0 0; font-size: 0.82rem; line-height: 1.5; color: var(--ink-mute); }
.form-error { margin: 4px 0 14px; font-size: 0.95rem; color: var(--error); }

.wz-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.wz-step:focus { outline: none; }
.wz-title { padding: 0; margin-bottom: 20px; font-size: 1.5rem; line-height: 1.25; font-weight: 500; letter-spacing: -0.015em; }
html[lang="ar"] .wz-title { line-height: 1.6; font-weight: 600; font-size: 1.3rem; }
.wz-step + .wz-step { margin-top: 30px; }
.wz-head, .wz-nav { display: none; }
.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.type-card {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 66px; padding: 12px 14px;
  font-size: 0.96rem; line-height: 1.3; cursor: pointer; color: var(--ink);
  background: rgba(var(--fill-rgb), 0.025); border: 1px solid var(--line-strong); border-radius: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.type-card:hover { border-color: rgba(var(--lime-rgb), 0.55); background: rgba(var(--lime-rgb), 0.04); }
.type-card input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.type-card:has(input:checked) { border-color: var(--lime); background: rgba(var(--lime-rgb), 0.1); box-shadow: 0 0 0 1px var(--lime), 0 0 30px -8px rgba(var(--lime-rgb), 0.6); }
.type-card:has(input:focus-visible) { outline: 2px solid var(--lime); outline-offset: 2px; }
.type-ico { width: 30px; height: 30px; flex: none; fill: none; stroke: var(--lime); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

.ready .wz-step { display: none; }
.ready .wz-step.is-current { display: block; animation: stepIn 420ms var(--ease) both; }
.ready .wz-step + .wz-step { margin-top: 0; }
.ready .wz-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.ready .wz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.ready .wz-nav [hidden] { display: none; }
.ready .wz-nav #wz-next { margin-inline-start: auto; }
.wz-count { margin: 0; font-size: 0.72rem; color: var(--lime); white-space: nowrap; font-family: var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
html[lang="ar"] .wz-count { font-family: var(--font); letter-spacing: 0; font-size: 0.85rem; }
.wz-bar { flex: 1; height: 2px; background: var(--line-strong); border-radius: 2px; overflow: hidden; }
.wz-bar span { display: block; height: 100%; width: 33%; background: var(--lime); box-shadow: 0 0 10px var(--lime); border-radius: 2px; transition: width 450ms var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 24px)); } to { opacity: 1; transform: none; } }

/* ---------- footer ---------- */
.footer { background: var(--bg-3); border-top: 1px solid var(--line); padding: 80px 0 36px; overflow: hidden; }
.footer::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(50% 80% at 50% 0%, rgba(var(--lime-rgb), 0.07), transparent 70%); }
.footer-top { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; padding-bottom: 56px; border-bottom: 1px solid var(--line); }
.footer-logo { width: min(300px, 70vw); }
.footer-logo img { width: 100%; height: auto; }
.footer-nav, .footer-contact { display: grid; gap: 10px; }
.footer-nav a, .footer-contact a { color: var(--ink-soft); text-decoration: none; font-size: 1rem; transition: color 160ms ease; width: fit-content; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--lime); }
.footer-bottom { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-top: 26px; font-size: 0.85rem; color: var(--ink-mute); }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--ink-soft); text-underline-offset: 4px; }
.footer-coords { font-family: var(--mono); letter-spacing: 0.1em; }

.quickbar { display: none; }

/* ---------- medium screens ---------- */
@media (max-width: 1239px) and (min-width: 960px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 0.9rem; }
  .st-grid { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
  .st-results { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 56px; align-items: start; }
  .st-results > h3:first-of-type { grid-area: 1 / 1; }
  .st-bars { grid-area: 2 / 1 / span 3; }
  .st-results > h3:nth-of-type(2) { grid-area: 1 / 2; }
  .st-reco { grid-area: 2 / 2; }
  .st-note { grid-area: 3 / 2; }
  #st-cta { grid-area: 4 / 2; justify-self: start; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- smaller screens ---------- */
@media (max-width: 959px) {
  :root { --nav-h: 60px; --bar-h: calc(66px + env(safe-area-inset-bottom, 0px)); --grid-size: 64px 64px, 64px 64px, 16px 16px, 16px 16px; }
  html { scroll-padding-top: calc(var(--nav-h) + 4px); }
  .nav { gap: 10px; }
  .brand img { height: 26px; }

  /* full-screen menu */
  .nav-links {
    position: fixed; inset: 0; z-index: 1;
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    margin: 0; padding: calc(var(--nav-h) + 22px) var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
    background-color: var(--bg); background-image: radial-gradient(80% 50% at 50% 0%, rgba(var(--lime-rgb), 0.09), transparent 70%), var(--grid-img); background-size: 100% 100%, var(--grid-size);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 300ms var(--ease), transform 300ms var(--ease), visibility 0s linear 300ms;
    overflow-y: auto;
  }
  .nav.is-open { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  .nav.is-open .nav-links { opacity: 1; visibility: visible; transform: none; transition: opacity 300ms var(--ease), transform 300ms var(--ease); }
  .nav-links > a:not(.btn):not(.lang) { padding: 16px 0; font-size: 1.8rem; line-height: 1.2; color: var(--ink); border-bottom: 1px solid var(--line); letter-spacing: -0.02em; }
  html[lang="ar"] .nav-links > a:not(.btn):not(.lang) { font-size: 1.5rem; line-height: 1.5; letter-spacing: 0; }
  .nav-links > a:not(.btn):not(.lang)::after { display: none; }
  .nav-links > a.is-active { color: var(--lime); }
  .nav.is-open .nav-links > a { animation: rise 500ms var(--ease) both; }
  .nav.is-open .nav-links > a:nth-child(2) { animation-delay: 40ms; }
  .nav.is-open .nav-links > a:nth-child(3) { animation-delay: 80ms; }
  .nav.is-open .nav-links > a:nth-child(4) { animation-delay: 120ms; }
  .nav.is-open .nav-links > a:nth-child(5) { animation-delay: 160ms; }
  .nav-links .lang { display: none; }
  .nav-links .btn { margin-top: 28px; min-height: 56px; font-size: 1.05rem; }
  .menu-contact { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: auto; padding-top: 28px; font-size: 1rem; color: var(--ink-soft); }
  .menu-contact a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink-soft); }
  .lang-mobile { display: inline-flex; margin-inline-start: auto; position: relative; z-index: 2; }
  .nav-links .theme-btn { display: none; }
  .theme-btn.theme-mobile { display: inline-grid; position: relative; z-index: 2; width: 38px; height: 38px; margin-inline-start: auto; }
  .lang-mobile { margin-inline-start: 0; }
  .menu-btn {
    position: relative; z-index: 2;
    display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 0 14px;
    font: inherit; font-size: 0.93rem; color: var(--ink);
    background: rgba(var(--fill-rgb), 0.03); border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer;
  }
  .burger { position: relative; width: 16px; height: 10px; }
  .burger i { position: absolute; inset-inline: 0; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform 300ms var(--ease), top 300ms var(--ease); }
  .burger i:first-child { top: 1px; }
  .burger i:last-child { top: 7.5px; }
  .nav.is-open .burger i:first-child { top: 4.25px; transform: rotate(45deg); }
  .nav.is-open .burger i:last-child { top: 4.25px; transform: rotate(-45deg); }

  /* hero: model on top, copy below at full width */
  .hero { grid-template-columns: minmax(0, 1fr); align-content: end; gap: 22px; padding: 46svh var(--gutter) 34px; }
  .hero::before { background: linear-gradient(to top, rgba(var(--bg-rgb), 0.98) 0%, rgba(var(--bg-rgb), 0.88) 44%, rgba(var(--bg-rgb), 0) 70%); }
  .hud { font-size: 0.62rem; gap: 8px; letter-spacing: 0.06em; top: calc(var(--nav-h) + 10px); }
  .hud-top > :nth-child(n + 3) { display: none; }
  .hud-model, .scroll-cue { display: none; }
  .hero-copy { max-width: none; }
  .eyebrow-hero { margin-bottom: 16px; font-size: 0.66rem; letter-spacing: 0.1em; }
  html[lang="ar"] .eyebrow-hero { font-size: 0.82rem; }
  .hero h1 { font-size: clamp(2.6rem, 11.5vw, 3.9rem); }
  html[lang="ar"] .hero h1 { font-size: clamp(2.2rem, 9.6vw, 3.3rem); }
  .lede { font-size: 1.03rem; }
  .sun-panel { width: 100%; }
  .marquee { padding: 16px 0; }
  .marquee span { font-size: 1rem; }

  .practice-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { padding: 24px 18px 26px; }
  .fact::before { inset-inline-start: 18px; }

  /* services: one screen, model on top, swipeable cards below */
  .layers { padding: 84px 0 0; }
  .layers::before { display: none; }
  .layers-intro { position: relative; padding-bottom: 36px; }
  .layers-intro::before { content: ""; position: absolute; inset: -84px 0 -10px; z-index: -1; background: linear-gradient(to bottom, var(--bg) 58%, rgba(var(--bg-rgb), 0)); }
  .layers-intro p:not(.eyebrow) { font-size: 1.03rem; }
  .layers-body {
    position: relative; margin-top: 0; padding-inline: 0; gap: 0;
    display: flex; flex-direction: column; justify-content: space-between;
    min-height: 100svh; padding-bottom: calc(var(--bar-h) + 14px);
  }
  .layers-body::after {
    content: ""; position: absolute; inset: auto 0 0; height: 62%; z-index: -1; pointer-events: none;
    background: linear-gradient(to top, rgba(var(--bg-rgb), 0.97) 0%, rgba(var(--bg-rgb), 0.78) 55%, rgba(var(--bg-rgb), 0) 100%);
  }
  .layer-panel {
    position: sticky; top: var(--nav-h); z-index: 5; align-self: stretch; min-width: 0;
    display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
    padding: 10px var(--gutter);
    border-radius: 0; border-inline: 0; background: rgba(var(--bg-rgb), 0.82);
  }
  .layer-panel::-webkit-scrollbar { display: none; }
  .panel-title, .group-name { display: none; }
  .layer-group, .layer-panel ul { display: contents; }
  .layer-panel li { flex: none; }
  .layer-link { white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-size: 0.86rem; }
  .layer-link[aria-current="true"], html[dir="rtl"] .layer-link[aria-current="true"] { box-shadow: none; border-color: var(--c); }
  .layer-steps {
    pointer-events: auto; min-width: 0;
    display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .layer-steps::-webkit-scrollbar { display: none; }
  .layer-step { flex: 0 0 min(86%, 440px); min-height: 0; display: flex; align-items: stretch; scroll-snap-align: center; }
  /* A closed card must not be a scroll container, or it swallows the sideways swipe meant for the row of cards. */
  .step-card { display: flex; flex-direction: column; max-height: 46svh; overflow: hidden; padding: 16px 18px 14px; background: rgba(var(--card-rgb), 0.9); }
  .step-card.is-open { overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; }
  .step-card::after { inset: 0; }
  .layer-step { scroll-snap-stop: always; }
  .step-card:not(.is-open) p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .step-card:not(.is-open) ul { display: none; }
  .step-more {
    display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 10px; padding: 6px 12px;
    font: inherit; font-size: 0.8rem; color: var(--c); background: transparent;
    border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); border-radius: 999px; cursor: pointer;
  }
  .step-more .ico { width: 14px; height: 14px; transition: transform 250ms ease; }
  .step-card.is-open .step-more .ico { transform: rotate(180deg); }
  .step-n { margin-bottom: 6px; font-size: 0.68rem; }
  .anno span { font-size: 0.62rem; padding: 4px 8px; bottom: 30px; white-space: normal; width: max-content; max-width: 44vw; line-height: 1.35; }
  html[lang="ar"] .anno span { font-size: 0.72rem; }
  .anno i::after { height: 22px; }
  .step-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
  html[lang="ar"] .step-card h3 { font-size: 1.15rem; }
  .step-card p { font-size: 0.93rem; line-height: 1.5; }
  html[lang="ar"] .step-card p { line-height: 1.8; }
  .step-card ul { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; border-top: 0; }
  .step-card li, html[dir="rtl"] .step-card li { padding: 4px 11px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.78rem; line-height: 1.4; }
  .step-card li::before { display: none; }
  html[lang="ar"] .step-card li { line-height: 1.6; }

  .prail { left: auto; inset-inline-start: 19px; margin: 0; }
  .pstep, .pstep:nth-child(even), .pstep:nth-child(odd) { width: auto; justify-self: stretch; margin-inline-start: 50px; padding: 22px 22px 24px; }
  .pstep:nth-child(even)::before, .pstep:nth-child(odd)::before { inset-inline-start: -38px; inset-inline-end: auto; top: 26px; }

  .st-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .st-visual { order: -1; padding: 10px; }
  .st-visual svg { max-width: 440px; }

  .offices { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .footer { padding-bottom: calc(36px + var(--bar-h)); }
  .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-logo { grid-column: 1 / -1; width: min(240px, 64vw); }

  .quickbar {
    display: grid; grid-template-columns: 1fr 1fr 1.55fr; gap: 8px;
    position: fixed; inset-inline: 0; bottom: 0; z-index: 25;
    padding: 9px 10px calc(9px + env(safe-area-inset-bottom, 0px));
    background: rgba(var(--bg-rgb), 0.86); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
    border-top: 1px solid var(--line);
    transform: translateY(110%); transition: transform 380ms var(--ease);
  }
  .quickbar.is-on { transform: none; }
  .qb-item {
    display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; padding: 0 8px;
    font-size: 0.9rem; text-decoration: none; white-space: nowrap; color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(var(--fill-rgb), 0.03);
  }
  .qb-primary { background: var(--lime); color: var(--on-lime); border-color: transparent; font-weight: 500; box-shadow: 0 0 24px -6px rgba(var(--lime-rgb), 0.7); }
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .form-actions .btn { width: 100%; }
  .actions .btn { flex: 1 1 auto; }
  .type-grid { grid-template-columns: minmax(0, 1fr); }
  .type-card { min-height: 56px; }
  .fact-n { font-size: 2.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-delay: 0ms !important; }
  .ready .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
