/* ============================================================
   APEX — "The Ascent"  (reinvented design, per design.md)
   ============================================================ */

:root {
  /* Ground */
  --obsidian: #06070c;
  --obsidian-2: #0a0c12;
  --slate: #12141c;
  --slate-2: #181b24;

  /* Working accent */
  --ion: #4ea8ff;
  --ion-bright: #7cc4ff;
  --ion-dim: #2a5c8f;

  /* Brand blue — sampled from the Apex logo (deep royal → sky) */
  --brand-deep: #1268ce;
  --brand: #2d80d9;
  --brand-light: #65acf2;

  /* Text */
  --snow: #f5f7fc;
  --ash: #9aa3b5;
  --ash-dim: #5b6473;

  /* Lines & materials */
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-2: rgba(255, 255, 255, 0.14);
  --glass: rgba(12, 14, 20, 0.6);

  /* Type */
  --font-display: "Clash Display", system-ui, sans-serif;
  --font-body: "Satoshi", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem; --space-8: 4rem;
  --space-9: 6rem; --space-10: 8rem; --space-11: 12rem;

  --rail-w: 84px;
  --wrap: min(1180px, 92%);
  --nav-h: 4.5rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  padding-left: var(--rail-w);
  background-color: var(--obsidian);
  background-image:
    radial-gradient(120% 70% at 78% -6%, rgba(45, 128, 217, 0.16), transparent 55%),
    radial-gradient(90% 60% at 50% 108%, rgba(18, 104, 206, 0.13), transparent 60%);
  background-attachment: fixed;
  color: var(--snow);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, figure, blockquote, ul, ol { margin: 0; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img, canvas { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--ion); outline-offset: 3px; border-radius: 2px; }

.wrap { width: var(--wrap); margin-inline: auto; }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--font-mono); font-weight: 500; font-size: 0.75rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--ion); line-height: 1;
}
.eyebrow__sep { color: var(--ash-dim); margin: 0 0.3em; }
.eyebrow__alt { color: var(--ash-dim); }
.meta { font-family: var(--font-mono); font-weight: 400; font-size: 0.8125rem; letter-spacing: 0.02em; color: var(--ash-dim); }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.4rem); line-height: 1.5; }
.ash { color: var(--ash); }

.section-head { margin-bottom: var(--space-8); }
.section-head .eyebrow { display: block; margin-bottom: var(--space-4); }
.section-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -0.02em; line-height: 1.04; max-width: 18ch;
}

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-body); font-weight: 500; font-size: 0.95rem;
  padding: 0.8rem 1.4rem; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.1s ease-out, background-color 0.25s var(--ease-out),
              box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out), color 0.25s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--snow); color: var(--obsidian); }
.btn--primary:hover { box-shadow: 0 0 0 1px var(--ion-bright), 0 10px 34px -10px rgba(78, 168, 255, 0.7); }
.btn--ghost { background: transparent; color: var(--snow); border-color: var(--hairline-2); }
.btn--ghost:hover { border-color: var(--ion); color: var(--ion-bright); }
.inline-link { color: var(--ion); font-weight: 500; display: inline-flex; align-items: center; gap: var(--space-2); transition: gap 0.25s var(--ease-out), color 0.25s var(--ease-out); }
.inline-link:hover { gap: var(--space-3); color: var(--ion-bright); }

/* ============================================================
   ASCENT RAIL — the signature
   ============================================================ */
.ascent {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail-w); z-index: 90;
  pointer-events: none;
  border-right: 1px solid var(--hairline);
  background: linear-gradient(180deg, rgba(10, 12, 18, 0.4), transparent 30%, transparent 70%, rgba(10, 12, 18, 0.4));
}
.ascent__line { position: absolute; left: 50%; transform: translateX(-50%); top: 16%; bottom: 22%; width: 2px; }
.ascent__track { position: absolute; inset: 0; background: var(--hairline-2); border-radius: 2px; }
.ascent__trail {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0;
  background: linear-gradient(to top, var(--brand-deep), var(--brand-light));
  border-radius: 2px; box-shadow: 0 0 12px rgba(101, 172, 242, 0.55);
}
.ascent__climber {
  position: absolute; left: 50%; bottom: 0; width: 12px; height: 12px;
  margin-left: -6px; margin-bottom: -6px; border-radius: 50%;
  background: radial-gradient(circle, #eaf4ff 0%, var(--brand-light) 55%, rgba(101, 172, 242, 0) 78%);
  box-shadow: 0 0 18px 4px rgba(101, 172, 242, 0.8);
}
.ascent__ticks { position: absolute; left: 0; right: 0; top: 16%; bottom: 22%; }
.ascent__tick { position: absolute; left: 50%; pointer-events: auto; cursor: pointer; }
.ascent__tick-dot {
  position: absolute; left: 0; transform: translate(-50%, 50%);
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--obsidian); border: 1.5px solid var(--ash-dim);
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.ascent__tick-label {
  position: absolute; left: 12px; bottom: 0; transform: translateY(50%);
  writing-mode: vertical-rl; text-orientation: mixed;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ash-dim); white-space: nowrap; transition: color 0.3s var(--ease-out);
}
.ascent__tick.is-active .ascent__tick-dot { background: var(--brand-light); border-color: var(--brand-light); box-shadow: 0 0 12px 2px rgba(101, 172, 242, 0.8); }
.ascent__tick.is-active .ascent__tick-label { color: var(--snow); }
.ascent__alt { position: absolute; bottom: 5%; left: 0; right: 0; text-align: center; }
.ascent__alt-val { display: block; font-family: var(--font-mono); font-size: 0.85rem; color: var(--brand-light); letter-spacing: 0.04em; }
.ascent__alt-unit { font-family: var(--font-mono); font-size: 0.65rem; color: var(--ash-dim); letter-spacing: 0.2em; text-transform: uppercase; }

/* mobile top progress */
.progress-top { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 120; background: linear-gradient(90deg, var(--brand-deep), var(--brand-light)); box-shadow: 0 0 10px rgba(101, 172, 242, 0.7); display: none; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: var(--rail-w); right: 0; z-index: 100; height: var(--nav-h);
  background: var(--glass); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--hairline); transition: transform 0.4s var(--ease-out);
}
.nav--hidden { transform: translateY(-100%); }
.nav__inner { width: var(--wrap); margin: 0 auto; height: 100%; display: flex; align-items: center; gap: var(--space-6); }
.nav__brand { display: inline-flex; align-items: center; }
.nav__logo { height: 26px; width: auto; display: block; }
.nav__links { display: flex; gap: var(--space-5); margin-left: auto; }
.nav__links a { font-size: 0.95rem; color: var(--ash); transition: color 0.2s var(--ease-out); }
.nav__links a:hover { color: var(--snow); }
.nav__cta { margin-left: var(--space-5); padding: 0.6rem 1.15rem; }
.nav__menu { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; flex-direction: column; justify-content: center; gap: 5px; }
.nav__menu span { display: block; height: 1.5px; width: 22px; background: var(--snow); }

/* ============================================================
   01 · HERO
   ============================================================ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: var(--nav-h) 0 var(--space-9); overflow: hidden; }
.apex-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero__wrap { position: relative; z-index: 2; width: var(--wrap); margin-inline: auto; }
.hero .eyebrow { margin-bottom: var(--space-5); }
.hero__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.75rem, 8.5vw, 8rem); letter-spacing: -0.03em; line-height: 0.95;
  max-width: 15ch; margin-bottom: var(--space-6);
}
.hero__lead { max-width: 44ch; color: var(--ash); margin-bottom: var(--space-7); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.hero__scroll { position: absolute; bottom: var(--space-6); left: 50%; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); color: var(--ash-dim); }
.hero__scroll-label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; }
.hero__scroll-line { width: 1px; height: 42px; background: linear-gradient(var(--ion), transparent); }

/* word-pop mechanic */
.reveal-words .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; }
.reveal-words .word__inner { display: inline-block; }

/* ============================================================
   02 · TRUST
   ============================================================ */
.trust { padding: var(--space-8) 0; border-bottom: 1px solid var(--hairline); }
.trust__grid { display: grid; grid-template-columns: 200px 1fr; gap: var(--space-6); align-items: center; }
.trust__grid .eyebrow { color: var(--ash-dim); }
.trust__logos { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(1.2rem, 4vw, 3rem); }
.trust__logos li { font-family: var(--font-display); font-weight: 500; font-size: clamp(1rem, 1.8vw, 1.5rem); color: var(--ash-dim); opacity: 0.72; transition: color 0.3s var(--ease-out), opacity 0.3s var(--ease-out); }
.trust__logos li:hover { color: var(--snow); opacity: 1; }

/* ============================================================
   03 · MANIFESTO
   ============================================================ */
.manifesto { padding: clamp(6rem, 13vw, 11rem) 0; }
.manifesto__grid { display: grid; grid-template-columns: 200px 1fr; gap: var(--space-6); align-items: start; }
.manifesto__marker { display: flex; flex-direction: column; gap: var(--space-3); padding-top: 0.6rem; }
.manifesto__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 4.6vw, 3.6rem); letter-spacing: -0.02em; line-height: 1.05; max-width: 20ch; margin-bottom: var(--space-5); }
.manifesto__sub { color: var(--ash); font-size: clamp(1.05rem, 1.6vw, 1.35rem); }

/* ============================================================
   04 · SELECTED WORK — editorial list
   ============================================================ */
.work { padding: clamp(4rem, 8vw, 7rem) 0; }
.work__list { width: var(--wrap); margin: 0 auto; border-top: 1px solid var(--hairline-2); }
.work__row {
  position: relative; display: grid;
  grid-template-columns: 3rem minmax(0, 1.1fr) minmax(0, 1fr) auto 1.5rem;
  align-items: center; gap: var(--space-5);
  padding: clamp(1.3rem, 2.6vw, 2.3rem) 0; border-bottom: 1px solid var(--hairline);
  transition: padding-inline-start 0.4s var(--ease-out);
  cursor: pointer;
}
.work__row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--brand-light); transform: scaleY(0); transform-origin: top; transition: transform 0.4s var(--ease-out); }
.work__stretch { position: absolute; inset: 0; z-index: 2; border-radius: 4px; }
.work__row:has(.work__stretch) { cursor: pointer; }
.work__row:hover, .work__row:focus-visible { padding-left: var(--space-5); outline: none; }
.work__row:hover::before, .work__row:focus-visible::before { transform: scaleY(1); }
.work__index { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ash-dim); }
.work__name { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.55rem, 4vw, 3.1rem); letter-spacing: -0.02em; line-height: 1; transition: color 0.3s var(--ease-out); }
.work__row:hover .work__name, .work__row:focus-visible .work__name { color: var(--brand-light); }
.work__desc { color: var(--ash); font-size: 0.98rem; }
.work__tag { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ion); justify-self: start; border: 1px solid var(--hairline-2); border-radius: 999px; padding: 0.28rem 0.65rem; }
.work__year { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ash-dim); }
.work__go { font-size: 1.3rem; color: var(--ash-dim); justify-self: end; transition: color 0.3s var(--ease-out), transform 0.3s var(--ease-out); }
.work__row:hover .work__go, .work__row:focus-visible .work__go { color: var(--ion); transform: translateX(5px); }
.work__prompt { margin-top: var(--space-8); text-align: center; color: var(--ash); font-size: 1.1rem; }
.work__prompt a { color: var(--ion); font-weight: 500; }
.work__prompt a:hover { color: var(--ion-bright); }

/* ============================================================
   05 · WHAT WE DO
   ============================================================ */
.services { padding: clamp(6rem, 12vw, 11rem) 0; }
.services__feature { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: end; padding-bottom: var(--space-7); }
.services__feature-title { position: relative; width: max-content; font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 6vw, 5rem); letter-spacing: -0.02em; padding-bottom: var(--space-4); }
.services__feature-title::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: linear-gradient(90deg, var(--brand-deep), var(--brand-light) 65%, transparent); border-radius: 2px; }
.services__feature-body { display: flex; flex-direction: column; gap: var(--space-4); align-items: flex-start; }
.services__row { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hairline); }
.services__item { padding: var(--space-6) var(--space-5) var(--space-5) 0; border-right: 1px solid var(--hairline); }
.services__item:last-child { border-right: 0; }
.services__item .eyebrow { display: block; margin-bottom: var(--space-4); color: var(--ash-dim); transition: color 0.3s var(--ease-out); }
.services__item-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.2rem, 2vw, 1.6rem); letter-spacing: -0.01em; margin-bottom: var(--space-3); transition: color 0.3s var(--ease-out); }
.services__item:hover .eyebrow { color: var(--ion); }
.services__item:hover .services__item-title { color: var(--ion-bright); }

/* ============================================================
   06 · TESTIMONIAL
   ============================================================ */
.quotes { padding: clamp(4rem, 10vw, 9rem) 0; }
.quotes .eyebrow { display: block; margin-bottom: var(--space-6); }
.quote { max-width: 1000px; }
.quote__text { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem, 4vw, 3.4rem); letter-spacing: -0.015em; line-height: 1.12; margin-bottom: var(--space-6); max-width: 22ch; }
.quote__by { display: flex; flex-direction: column; gap: var(--space-1); }
.quote__name { font-weight: 500; }

/* ============================================================
   07 · PROCESS — the climb
   ============================================================ */
.process { padding: clamp(4rem, 8vw, 7rem) 0; }
.process__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.process__step { padding-top: var(--space-5); border-top: 1px solid var(--hairline-2); }
.process__alt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand-light); display: block; margin-bottom: var(--space-5); }
.process__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 2.2vw, 1.8rem); margin-bottom: var(--space-3); }

/* ============================================================
   08 · CONTACT / SUMMIT
   ============================================================ */
.contact { position: relative; padding: clamp(6rem, 13vw, 12rem) 0; overflow: hidden; }
.contact__inner { position: relative; z-index: 2; }
.contact .eyebrow { display: block; }
.contact__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 5.5vw, 4.5rem); letter-spacing: -0.02em; line-height: 1.02; max-width: 16ch; margin: var(--space-4) 0 var(--space-8); }
.contact__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-8); align-items: start; }
.form { display: flex; flex-direction: column; gap: var(--space-5); }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); }
.field input, .field textarea { font-family: var(--font-body); font-size: 1rem; color: var(--snow); background: var(--slate); border: 1px solid var(--hairline-2); border-radius: 12px; padding: 0.85rem 1rem; resize: vertical; transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.25s var(--ease-out); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ion); box-shadow: 0 0 0 3px rgba(78, 168, 255, 0.18); background: var(--slate-2); }
.field--invalid input, .field--invalid textarea { border-color: #ff6b6b; }
.field__error { font-family: var(--font-mono); font-size: 0.75rem; color: #ff8b8b; min-height: 1em; }
.form__submit { margin-top: var(--space-2); align-self: flex-start; }
.form__note { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ion-bright); min-height: 1.2em; }
.contact__call { background: var(--slate); border: 1px solid var(--hairline); border-radius: 18px; padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; }
.contact__call-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin-bottom: var(--space-3); }
.contact__call .btn { margin-bottom: var(--space-3); }
.contact__direct a { color: var(--ion); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--hairline); padding: var(--space-8) 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); }
.footer__brand { display: inline-flex; align-items: center; }
.footer__logo { height: 30px; width: auto; display: block; opacity: 0.92; }
.footer__tag { margin-right: auto; }
.footer__links { display: flex; gap: var(--space-5); }
.footer__links a { color: var(--ash); transition: color 0.2s var(--ease-out); }
.footer__links a:hover { color: var(--ion); }
.footer__copy { width: 100%; padding-top: var(--space-4); border-top: 1px solid var(--hairline); }

/* ============================================================
   Reveal states (JS-driven; safe default = visible)
   ============================================================ */
.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal-words .word__inner { transform: translateY(110%); opacity: 0; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .trust__grid, .manifesto__grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .manifesto__marker { flex-direction: row; gap: var(--space-4); align-items: baseline; }
  .services__feature { grid-template-columns: 1fr; gap: var(--space-4); align-items: start; }
  .contact__grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .work__row { grid-template-columns: 2.4rem minmax(0, 1fr) auto 1.2rem; }
  .work__desc { display: none; }
}
@media (max-width: 768px) {
  :root { --rail-w: 0px; --nav-h: 4rem; }
  body { padding-left: 0; }
  .ascent { display: none; }
  .progress-top { display: block; }
  .nav { left: 0; }
  .nav__links { display: none; }
  .nav__brand { margin-right: auto; }
  .nav__cta { display: inline-flex; margin-left: 0; padding: 0.5rem 0.9rem; font-size: 0.85rem; }
  .nav__menu { display: flex; margin-left: var(--space-3); }
  .nav__logo { height: 22px; }
  .nav--open .nav__links { display: flex; position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0; background: var(--obsidian-2); border-bottom: 1px solid var(--hairline); padding: var(--space-3) 0; }
  .nav--open .nav__links a { padding: var(--space-4) 0; text-align: center; }
  .services__row { grid-template-columns: 1fr; }
  .services__item { border-right: 0; border-bottom: 1px solid var(--hairline); padding-right: 0; }
  .services__item:last-child { border-bottom: 0; }
  .process__list { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
}
@media (max-width: 460px) {
  .process__list { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .work__row { grid-template-columns: 1.8rem minmax(0, 1fr) 1.2rem; }
  .work__tag, .work__year { display: none; }
}

/* ============================================================
   Reduced motion / transparency / contrast
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .js .reveal-words .word__inner { opacity: 1; transform: none; }
  .btn, .work__row, .nav { transition: none; }
  .hero__scroll-line { display: none; }
  .ascent__climber { box-shadow: 0 0 10px 2px rgba(101, 172, 242, 0.6); }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--obsidian-2); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --ash: #c2c9d6; --ash-dim: #8a93a4; }
  .nav { background: var(--obsidian); border-bottom-color: var(--hairline-2); }
  .contact__call, .work__list { border-color: var(--hairline-2); }
}

/* ============================================================
   Language toggle · stretched project links · color scheme
   ============================================================ */
:root { color-scheme: dark; }
.lang-toggle {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em;
  color: var(--ash); background: none; border: 1px solid var(--hairline-2);
  border-radius: 999px; padding: 0.4rem 0.75rem; cursor: pointer;
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.lang-toggle:hover { color: var(--snow); border-color: var(--ion); }

.work__stretch { position: absolute; inset: 0; z-index: 2; }
.work__stretch:focus-visible { outline: 2px solid var(--ion); outline-offset: -4px; border-radius: 10px; }
.work__row:focus-within { padding-inline-start: var(--space-5); }
.work__row:focus-within::before { transform: scaleY(1); }
.work__row:focus-within .work__name { color: var(--brand-light); }
.work__row:focus-within .work__go { color: var(--ion); }

.field select {
  font-family: var(--font-body); font-size: 1rem; color: var(--snow);
  background: var(--slate); border: 1px solid var(--hairline-2); border-radius: 12px;
  padding: 0.85rem 1rem; width: 100%;
}
.field select:focus { outline: none; border-color: var(--ion); box-shadow: 0 0 0 3px rgba(78, 168, 255, 0.18); }

/* ============================================================
   Booking modal
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: var(--space-5); }
.modal[hidden] { display: none; }
.modal__scrim { position: absolute; inset: 0; background: rgba(3, 4, 8, 0.74); backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.24s var(--ease-out); }
.modal.open .modal__scrim { opacity: 1; }
.modal__panel {
  position: relative; z-index: 1; width: min(560px, 100%); max-height: 90vh; overflow: auto;
  background: var(--obsidian-2); border: 1px solid var(--hairline-2); border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  transform: translateY(16px) scale(0.98); opacity: 0;
  transition: transform 0.28s var(--ease-out), opacity 0.28s var(--ease-out);
}
.modal.open .modal__panel { transform: none; opacity: 1; }
.modal__close { position: absolute; top: var(--space-4); inset-inline-end: var(--space-4); width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--hairline-2); background: transparent; color: var(--ash); font-size: 1.2rem; line-height: 1; cursor: pointer; transition: color 0.2s, border-color 0.2s; }
.modal__close:hover { color: var(--snow); border-color: var(--ion); }
.modal__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.01em; margin-bottom: var(--space-3); }
.modal__lead { margin-bottom: var(--space-6); }
.bk-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-bottom: var(--space-4); }
#bookForm .field { margin-bottom: var(--space-4); }
.bk-actions { display: flex; gap: var(--space-3); margin-top: var(--space-5); flex-wrap: wrap; }
@media (max-width: 560px) { .bk-row { grid-template-columns: 1fr; } }

/* ============================================================
   Hebrew / RTL
   ============================================================ */
html[dir="rtl"] {
  --font-display: "Heebo", system-ui, sans-serif;
  --font-body: "Heebo", system-ui, sans-serif;
  --font-mono: "Heebo", system-ui, sans-serif;
}
html[dir="rtl"] .hero__title, html[dir="rtl"] .section-title, html[dir="rtl"] .manifesto__title,
html[dir="rtl"] .contact__title, html[dir="rtl"] .work__name, html[dir="rtl"] .quote__text,
html[dir="rtl"] .services__feature-title, html[dir="rtl"] .process__title, html[dir="rtl"] .modal__title,
html[dir="rtl"] .display { font-weight: 800; letter-spacing: normal; }
html[dir="rtl"] .eyebrow, html[dir="rtl"] .process__alt, html[dir="rtl"] .field label,
html[dir="rtl"] .ascent__tick-label, html[dir="rtl"] .lang-toggle {
  text-transform: none; letter-spacing: 0.02em;
}
html[dir="rtl"] body { padding-left: 0; padding-right: var(--rail-w); }
html[dir="rtl"] .ascent { left: auto; right: 0; border-right: none; border-left: 1px solid var(--hairline); }
html[dir="rtl"] .ascent__tick-label { left: auto; right: 12px; }
html[dir="rtl"] .nav { left: 0; right: var(--rail-w); }
html[dir="rtl"] .nav__links { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .nav__cta { margin-left: 0; margin-right: var(--space-5); }
html[dir="rtl"] .footer__tag { margin-right: 0; margin-left: auto; }
html[dir="rtl"] .work__row::before { left: auto; right: 0; }
html[dir="rtl"] .work__go { transform: scaleX(-1); }
html[dir="rtl"] .work__row:hover .work__go, html[dir="rtl"] .work__row:focus-within .work__go { transform: scaleX(-1) translateX(5px); }
html[dir="rtl"] .services__item { padding: var(--space-6) 0 var(--space-5) var(--space-5); border-right: none; border-left: 1px solid var(--hairline); }
html[dir="rtl"] .services__item:last-child { border-left: 0; }
@media (max-width: 768px) {
  html[dir="rtl"] body { padding-right: 0; }
  html[dir="rtl"] .nav { right: 0; }
  html[dir="rtl"] .nav__brand { margin-right: 0; margin-left: auto; }
  html[dir="rtl"] .nav__cta { margin-right: 0; }
}

/* ============================================================
   PROJECT PAGES
   ============================================================ */
body.pp { padding-left: 0; }
html[dir="rtl"] body.pp { padding-right: 0; }
.pp-nav { position: sticky; top: 0; z-index: 100; height: var(--nav-h); background: var(--glass); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border-bottom: 1px solid var(--hairline); }
.pp-nav__inner { width: var(--wrap); margin: 0 auto; height: 100%; display: flex; align-items: center; gap: var(--space-5); }
.pp-nav__back { margin-inline-start: auto; color: var(--ash); font-size: 0.92rem; transition: color 0.2s var(--ease-out); }
.pp-nav__back:hover { color: var(--snow); }
.pp-hero { width: var(--wrap); margin: 0 auto; padding: clamp(5rem, 13vw, 9rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.pp-hero__type { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-5); }
.pp-hero__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.75rem, 10vw, 7.5rem); letter-spacing: -0.03em; line-height: 0.95; margin-bottom: var(--space-5); }
.pp-hero__tagline { font-size: clamp(1.2rem, 2.4vw, 1.9rem); color: var(--ash); max-width: 26ch; margin-bottom: var(--space-7); }
.pp-hero__actions { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.pp-section { width: var(--wrap); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--hairline); display: grid; grid-template-columns: 220px 1fr; gap: var(--space-6); align-items: start; }
.pp-section__body p { font-size: clamp(1.1rem, 1.8vw, 1.45rem); line-height: 1.55; color: var(--snow); max-width: 46ch; }
.pp-caps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 var(--space-6); width: 100%; }
.pp-section__body > p + .pp-caps { margin-top: var(--space-5); }
.pp-cap { display: flex; gap: var(--space-3); align-items: baseline; padding: var(--space-4) 0; border-top: 1px solid var(--hairline); color: var(--snow); }
.pp-cap__dot { color: var(--brand-light); font-family: var(--font-mono); font-size: 0.8rem; }
.pp-owner__quote { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 3.6vw, 3rem); letter-spacing: -0.015em; line-height: 1.14; max-width: 24ch; margin-bottom: var(--space-5); }
.pp-cta { width: var(--wrap); margin: 0 auto clamp(4rem, 8vw, 7rem); padding: clamp(3rem, 6vw, 5rem); text-align: center; border: 1px solid var(--hairline-2); border-radius: 24px; background: radial-gradient(120% 150% at 50% 0%, rgba(45, 128, 217, 0.16), transparent 62%); }
.pp-cta__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 4vw, 3rem); letter-spacing: -0.02em; margin-bottom: var(--space-5); }
html[dir="rtl"] .pp-hero__title, html[dir="rtl"] .pp-owner__quote, html[dir="rtl"] .pp-cta__title { font-weight: 800; letter-spacing: normal; }
@media (max-width: 768px) {
  .pp-section { grid-template-columns: 1fr; gap: var(--space-4); }
  .pp-caps { grid-template-columns: 1fr; }
}

/* ============================================================
   IMMERSIVE MODE (WebGL hero, custom cursor, no rail)
   ============================================================ */
body.immersive { padding-left: 0; }
html[dir="rtl"] body.immersive { padding-right: 0; }
.immersive .nav { left: 0; right: 0; }
html[dir="rtl"] .immersive .nav { left: 0; right: 0; }

/* custom cursor (fine pointers only) */
.cursor { position: fixed; top: 0; left: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 1.5px solid var(--brand-light); pointer-events: none; z-index: 300; mix-blend-mode: screen; transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), background-color 0.25s var(--ease-out), margin 0.25s var(--ease-out); }
.cursor::after { content: ""; position: absolute; top: 50%; left: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: var(--brand-light); }
.cursor--on { width: 56px; height: 56px; margin: -28px 0 0 -28px; background: rgba(101, 172, 242, 0.12); }
.cursor--down { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
@media (pointer: fine) { .immersive, .immersive a, .immersive button, .immersive [data-cursor] { cursor: none; } }
@media (pointer: coarse) { .cursor { display: none; } }

/* hero scene */
.immersive .hero { position: relative; min-height: 100svh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; padding: var(--nav-h) 0; }
.scene { position: fixed; inset: 0; z-index: -1; background: radial-gradient(60% 55% at 50% 32%, rgba(45, 128, 217, 0.10), rgba(18, 104, 206, 0.03) 45%, transparent 72%); }
.scene canvas { width: 100%; height: 100%; display: block; }
.scene::after { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(125% 100% at 50% 38%, transparent 52%, rgba(6, 7, 12, 0.55) 100%); }
.scene--fallback { background: radial-gradient(58% 58% at 50% 45%, rgba(101, 172, 242, 0.28), rgba(45, 128, 217, 0.08) 46%, transparent 72%); }

.immersive .hero__wrap { position: relative; z-index: 2; width: min(1000px, 92%); margin-inline: auto; text-align: center; }
.immersive .hero__title { max-width: 16ch; margin-inline: auto; }
.immersive .hero__lead { margin: var(--space-6) auto var(--space-7); }
.immersive .hero__actions { justify-content: center; }

.hero__scrollcue { position: absolute; bottom: var(--space-6); left: 50%; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); color: var(--ash-dim); }
.hero__scrollcue-label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; }
.hero__scrollcue-line { width: 1px; height: 42px; background: linear-gradient(var(--ion), transparent); }
html[dir="rtl"] .hero__scrollcue-label { text-transform: none; letter-spacing: 0.02em; }

/* WhatsApp button + contact card tweaks */
.btn--whatsapp { background: #25d366; color: #04310f; font-weight: 600; }
.btn--whatsapp:hover { box-shadow: 0 10px 34px -10px rgba(37, 211, 102, 0.7); }
.contact__call-q { margin-top: var(--space-4); }
.immersive .contact { position: relative; overflow: hidden; }
.immersive .contact::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 90% at 50% 120%, rgba(45, 128, 217, 0.16), transparent 60%); }
.immersive .contact__inner { position: relative; z-index: 2; }
