/* Amr Janbai — premium builder experience */
:root {
  --bg: #0a0a0b;
  --bg-elev: #111113;
  --text: #f4f1ea;
  --muted: #9b968c;
  --accent: #d4af6a;
  --line: rgba(244, 241, 234, 0.1);
  --glow: rgba(212, 175, 106, 0.18);
  --font: "Instrument Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --serif: "Instrument Serif", "IBM Plex Sans Arabic", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1120px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro, .reveal, .btn-magnetic { animation: none !important; transition: none !important; }
}

body.builder {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(212, 175, 106, 0.07), transparent 55%),
    radial-gradient(700px 400px at 0% 40%, rgba(255, 255, 255, 0.03), transparent 50%),
    var(--bg);
  overflow-x: hidden;
}

html[dir="rtl"] body.builder {
  font-family: "IBM Plex Sans Arabic", var(--font);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }

/* Intro */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  pointer-events: none;
}

.intro.is-done {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}

.intro-word {
  position: absolute;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 8vw, 5rem);
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(12px);
}

.intro-word.is-on {
  opacity: 1;
  transform: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.intro-word.is-off {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

body.is-intro-locked { overflow: hidden; }

/* Canvas + ambient */
.google-globe {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.1s ease;
  filter: saturate(0.55) contrast(1.05) brightness(0.42);
}

.google-globe.is-live {
  opacity: 0.16;
}

.google-globe.is-failed {
  display: none;
}

html.has-google-globe .google-globe::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 48% 42% at 78% 52%, transparent 0%, rgba(10, 10, 11, 0.35) 38%, rgba(10, 10, 11, 0.92) 72%),
    linear-gradient(105deg, rgba(10, 10, 11, 0.97) 0%, rgba(10, 10, 11, 0.72) 38%, rgba(10, 10, 11, 0.88) 100%),
    radial-gradient(circle at 20% 15%, rgba(var(--sky-tint, 40, 50, 80), 0.28), transparent 45%);
  pointer-events: none;
  z-index: 1;
}

.sky-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
  background:
    radial-gradient(ellipse 70% 55% at 50% -10%, rgba(var(--sky-accent, 212, 175, 106), calc(var(--sky-glow, 0.35) * 0.45)), transparent 55%),
    radial-gradient(ellipse 50% 40% at 85% 70%, rgba(var(--sky-tint, 30, 40, 80), 0.35), transparent 60%),
    linear-gradient(180deg, rgba(10, 10, 11, 0.15), rgba(10, 10, 11, 0.55));
  mix-blend-mode: screen;
}

.sky-atmosphere.is-on {
  opacity: 1;
}

.living-scape {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.living-scape.is-live {
  opacity: 0.92;
}

.living-scape.is-static,
.living-scape.is-failed {
  opacity: 0;
}

html.has-living-scape .starfield-canvas.is-live {
  opacity: 0.55;
}

html.has-living-scape[data-sky-phase="day"] .starfield-canvas.is-live {
  opacity: 0.28;
}

.starfield-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
  mix-blend-mode: screen;
}

.starfield-canvas.is-live {
  opacity: 1;
}

html[data-sky-phase="day"] .starfield-canvas.is-live { opacity: 0.72; }
html[data-sky-phase="dawn"] .starfield-canvas.is-live,
html[data-sky-phase="dusk"] .starfield-canvas.is-live { opacity: 0.88; }
html[data-sky-phase="night"] .starfield-canvas.is-live { opacity: 1; }

html[data-sky-signal="AI"] .sky-signal { color: rgba(212, 175, 106, 0.82); }
html[data-sky-signal="FINTECH"] .sky-signal { color: rgba(120, 190, 170, 0.85); }
html[data-sky-signal="SECURITY"] .sky-signal { color: rgba(220, 140, 120, 0.85); }
html[data-sky-signal="WEB3"] .sky-signal { color: rgba(170, 140, 220, 0.85); }
html[data-sky-signal="CLOUD"] .sky-signal { color: rgba(140, 170, 220, 0.85); }
html[data-sky-signal="AUTOMATION"] .sky-signal { color: rgba(190, 170, 120, 0.85); }
html[data-sky-signal="HEALTHTECH"] .sky-signal { color: rgba(140, 200, 170, 0.85); }
html[data-sky-signal="STARTUPS"] .sky-signal { color: rgba(230, 180, 120, 0.85); }

.sky-signal {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: auto;
  top: 5.2rem;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.38);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease, color 0.8s ease;
  text-align: center;
  max-width: min(92vw, 36rem);
}

.sky-signal-main {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sky-signal-sub {
  display: block;
  font-size: 0.54rem;
  letter-spacing: 0.12em;
  text-transform: none;
  color: rgba(244, 241, 234, 0.28);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sky-signal.is-on {
  opacity: 1;
}

html[dir="rtl"] .sky-signal {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

/* Human presence — friend at the door */
.sky-presence {
  position: fixed;
  left: 1.35rem;
  bottom: 1.35rem;
  z-index: 3;
  width: min(22rem, calc(100vw - 2.5rem));
  padding: 0.95rem 1.05rem 1.05rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  background: linear-gradient(160deg, rgba(18, 18, 20, 0.72), rgba(12, 12, 14, 0.55));
  border: 1px solid rgba(244, 241, 234, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 2px;
}

.sky-presence.is-on {
  opacity: 1;
  transform: translateY(0);
}

.sky-presence-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  margin-bottom: 0.55rem;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(212, 175, 106, 0.75);
}

.sky-presence-weather {
  color: rgba(244, 241, 234, 0.4);
  letter-spacing: 0.08em;
}

.sky-presence-line {
  margin: 0;
  font-family: "Instrument Serif", "IBM Plex Sans Arabic", Georgia, serif;
  font-size: clamp(0.98rem, 1.5vw, 1.15rem);
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: rgba(244, 241, 234, 0.88);
  text-transform: none;
}

.sky-presence-aside {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(244, 241, 234, 0.45);
}

html[dir="rtl"] .sky-presence {
  left: auto;
  right: 1.35rem;
}

html[dir="rtl"] .sky-presence-line {
  font-family: "IBM Plex Sans Arabic", "Instrument Serif", sans-serif;
}

.sky-presence[data-mood="sleepy"] .sky-presence-mood,
.sky-presence[data-mood="night_owl"] .sky-presence-mood {
  color: rgba(160, 170, 210, 0.85);
}

.sky-presence[data-mood="hungry"] .sky-presence-mood {
  color: rgba(210, 160, 120, 0.85);
}

.sky-presence[data-mood="tired"] .sky-presence-mood {
  color: rgba(190, 150, 140, 0.85);
}

.sky-presence[data-mood="fresh"] .sky-presence-mood {
  color: rgba(150, 190, 170, 0.85);
}

@media (max-width: 720px) {
  .sky-signal {
    top: 4.5rem;
    letter-spacing: 0.1em;
    font-size: 0.55rem;
  }
  .sky-signal-sub {
    letter-spacing: 0.06em;
    font-size: 0.5rem;
  }
  .sky-presence {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    width: auto;
    padding: 0.8rem 0.85rem 0.9rem;
  }
  html[dir="rtl"] .sky-presence {
    left: 0.75rem;
    right: 0.75rem;
  }
  .sky-presence-line {
    font-size: 0.95rem;
  }
}

.celestial-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.celestial-canvas.is-live,
.celestial-canvas.is-static {
  opacity: 0.92;
}

.celestial-canvas.is-static {
  background:
    radial-gradient(ellipse 55% 50% at 78% 42%, rgba(80, 120, 180, 0.22), transparent 55%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.04), transparent 40%);
}

html.has-google-globe .celestial-canvas {
  opacity: 0 !important;
  visibility: hidden;
}

.system-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.22;
}

.ambient {
  position: fixed;
  width: 42vw;
  height: 42vw;
  max-width: 520px;
  max-height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 160, 220, 0.12), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;
}

.b-nav,
main,
.b-footer { position: relative; z-index: 1; }

/* Nav */
.b-nav {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
  z-index: 20;
}

.b-nav.is-scrolled { border-bottom-color: var(--line); }

.b-brand {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  font-weight: 600;
}

.b-nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.b-nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.b-nav-links a:hover,
.b-langs a.is-active { color: var(--text); }

.b-nav-cta {
  color: var(--accent) !important;
}

.b-langs {
  display: flex;
  gap: 0.65rem;
}

.b-langs a {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Sections */
.section {
  padding: clamp(4.5rem, 10vw, 7.5rem) 1.5rem;
  max-width: calc(var(--max) + 3rem);
  margin: 0 auto;
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-head h2,
.philosophy-inner h2,
.challenge-copy h2,
.finale-inner h2,
.tech .section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.accent { color: var(--accent); display: block; }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Hero */
.hero {
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 5rem 1.5rem 4rem;
  max-width: calc(var(--max) + 3rem);
  margin: 0 auto;
}

.hero-inner {
  max-width: 920px;
  position: relative;
  z-index: 1;
}

@media (min-width: 960px) {
  .hero-inner {
    max-width: 58%;
  }
}

.hero-label {
  margin: 0 0 1.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0 0 1.4rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero-line { display: block; }
.hero-line--accent { color: var(--accent); font-style: italic; }

.hero-support {
  margin: 0 0 1.25rem;
  max-width: 32rem;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.6;
  font-weight: 400;
}

.hero-caps {
  margin: 0 0 2.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.45);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
}

/* Execution proof — personal impress */
.proof {
  padding: 2rem 1.5rem 5rem;
  max-width: calc(var(--max) + 3rem);
  margin: 0 auto;
}

.proof-stage {
  position: relative;
  max-width: 920px;
  padding: 2.2rem 0 0;
}

.proof-kicker {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.proof-title {
  margin: 0 0 1.1rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.85rem, 4.6vw, 3.1rem);
  line-height: 1.08;
}

.proof-title span { display: block; }
.proof-title .accent {
  color: var(--accent);
  font-style: italic;
}

.proof-body {
  margin: 0 0 2.2rem;
  max-width: 40rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(244, 241, 234, 0.72);
}

.proof-rail {
  --proof-progress: 0.25;
  list-style: none;
  margin: 0 0 2.4rem;
  padding: 0;
  position: relative;
  display: grid;
  gap: 0.85rem;
}

.proof-rail::before {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: rgba(244, 241, 234, 0.12);
}

.proof-rail::after {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 0.4rem;
  width: 1px;
  height: calc(var(--proof-progress) * 100%);
  background: linear-gradient(180deg, var(--accent), rgba(212, 175, 106, 0.2));
  transition: height 0.55s ease;
}

html[dir="rtl"] .proof-rail::before,
html[dir="rtl"] .proof-rail::after {
  left: auto;
  right: 1.05rem;
}

.proof-step {
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  gap: 0.85rem;
  align-items: start;
  opacity: 0.35;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.proof-step.is-on {
  opacity: 0.78;
  transform: none;
}

.proof-step.is-active {
  opacity: 1;
}

.proof-step-index {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: rgba(244, 241, 234, 0.35);
  padding-top: 0.35rem;
  text-align: center;
}

.proof-step.is-active .proof-step-index {
  color: var(--accent);
}

.proof-step-copy {
  padding: 0.55rem 0.9rem 0.65rem;
  border: 1px solid rgba(244, 241, 234, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.proof-step.is-active .proof-step-copy {
  border-color: rgba(212, 175, 106, 0.35);
  background: linear-gradient(120deg, rgba(212, 175, 106, 0.08), rgba(255, 255, 255, 0.02));
}

.proof-step-copy strong {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.proof-step-copy span {
  display: block;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(244, 241, 234, 0.7);
}

.proof-sign {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(244, 241, 234, 0.1);
}

.proof-stamp {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  color: rgba(244, 241, 234, 0.92);
}

.proof-cred {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: rgba(244, 241, 234, 0.45);
}

.proof-cta {
  margin-top: 0.5rem;
}

@media (min-width: 900px) {
  .proof-rail {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
  }
  .proof-rail::before,
  .proof-rail::after {
    left: 0;
    right: 0;
    top: 1.15rem;
    bottom: auto;
    width: auto;
    height: 1px;
  }
  .proof-rail::after {
    width: calc(var(--proof-progress) * 100%);
    height: 1px;
    transition: width 0.55s ease;
  }
  html[dir="rtl"] .proof-rail::before,
  html[dir="rtl"] .proof-rail::after {
    right: 0;
    left: auto;
  }
  .proof-step {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
  .proof-step-index {
    text-align: start;
  }
}

/* Buttons */
.btn-primary,
.btn-ghost,
.btn-xl {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  cursor: pointer;
  background: transparent;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  padding: 0.95rem 1.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.25s ease, transform 0.25s var(--ease);
}

.btn-primary:hover { background: var(--accent); }

.btn-ghost {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.btn-ghost:hover { color: var(--text); }

.btn-xl { padding: 1.1rem 1.6rem; font-size: 0.84rem; }

.btn-magnetic { will-change: transform; }

/* Problems */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (min-width: 800px) {
  .problem-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1100px) {
  .problem-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.problem-card {
  text-align: start;
  background: var(--bg);
  border: 0;
  padding: 1.6rem 1.4rem 1.7rem;
  cursor: pointer;
  transition: background 0.35s ease;
  min-height: 11rem;
}

.problem-card:hover,
.problem-card:focus-visible {
  background: #121214;
  outline: none;
}

.problem-card h3 {
  margin: 0 0 0.7rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.25;
}

.problem-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.problem-reveal {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.45s var(--ease), opacity 0.35s ease, margin 0.35s ease;
  margin-top: 0;
}

.problem-card:hover .problem-reveal,
.problem-card:focus-visible .problem-reveal {
  max-height: 120px;
  opacity: 1;
  margin-top: 1rem;
}

.problem-reveal span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.problem-reveal p {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Philosophy */
.philosophy {
  max-width: none;
  padding-inline: 0;
  border-block: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(212, 175, 106, 0.04), transparent);
}

.philosophy-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 7.5rem) 1.5rem;
}

.philosophy-inner p {
  margin: 1.5rem 0 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

/* Process */
.process-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

@media (min-width: 900px) {
  .process-flow {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
  }
}

.process-step {
  position: relative;
  flex: 1;
  padding: 1rem 0 1.4rem 1.6rem;
  opacity: 0.35;
  transition: opacity 0.5s ease;
}

@media (min-width: 900px) {
  .process-step {
    padding: 0.4rem 0.6rem 0;
    text-align: center;
  }
}

.process-step.is-on { opacity: 1; }

.process-node {
  position: absolute;
  left: 0;
  top: 1.25rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--muted);
  background: transparent;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

@media (min-width: 900px) {
  .process-node {
    position: relative;
    left: auto;
    top: auto;
    display: block;
    margin: 0 auto 1rem;
  }
  .process-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 4px;
    left: calc(50% + 10px);
    right: calc(-50% + 10px);
    height: 1px;
    background: var(--line);
  }
  .process-step.is-on:not(:last-child)::after {
    background: linear-gradient(90deg, var(--accent), rgba(212, 175, 106, 0.15));
  }
}

.process-step.is-on .process-node {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--glow);
}

.process-label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.4;
}

html[dir="rtl"] .process-step { padding-left: 0; padding-right: 1.6rem; }
html[dir="rtl"] .process-node { left: auto; right: 0; }

/* Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 700px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; }
}

.metric {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.metric-value {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 1;
  color: var(--text);
  margin-bottom: 0.7rem;
}

.metric-value--text {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--accent);
  letter-spacing: 0.04em;
}

.metric p {
  margin: 0;
  color: var(--muted);
  max-width: 22rem;
  line-height: 1.5;
}

/* Cases */
.cases { display: grid; gap: 2.5rem; }

.case {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 900px) {
  .case {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 2.5rem;
    align-items: start;
  }
}

.case-visual {
  aspect-ratio: auto;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  padding: 0;
}

.case-diagram-title {
  margin: 0;
  padding: 0.7rem 0.9rem 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(212, 175, 106, 0.85);
  border-bottom: 1px solid var(--line);
}

.case-math {
  display: block;
  width: 100%;
  height: auto;
}

.case-svg {
  width: 100%;
  height: auto;
  color: var(--accent);
  opacity: 0.95;
}

.case-block { margin-bottom: 1.1rem; }
.case-block span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.case-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

/* Tech */
.tech-grid {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.tech-item {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.tech-item h3 {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  font-weight: 600;
}

.tech-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .tech-item { grid-template-columns: 1fr; gap: 0.35rem; }
}

/* Challenge */
.challenge {
  max-width: none;
  padding-inline: 0;
  background:
    radial-gradient(700px 360px at 50% 0%, rgba(212, 175, 106, 0.1), transparent 60%),
    #0d0d0f;
  border-block: 1px solid var(--line);
}

.challenge-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 7.5rem) 1.5rem;
}

.challenge-copy p {
  margin: 1rem 0 2rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.challenge-one-liner {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  margin-bottom: 1.5rem;
  outline: none;
}

.challenge-one-liner:focus {
  border-bottom-color: var(--accent);
}

.challenge-one-liner::placeholder { color: rgba(244, 241, 234, 0.28); }

.challenge-fields {
  margin-top: 1.75rem;
  display: grid;
  gap: 1rem;
}

.challenge-fields.is-open { animation: rise 0.5s var(--ease); }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.challenge-selected {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.challenge-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 700px) {
  .challenge-grid { grid-template-columns: 1fr 1fr; }
  .challenge-grid .full { grid-column: 1 / -1; }
}

.challenge-grid label,
.privacy-line {
  display: grid;
  gap: 0.4rem;
}

.challenge-grid span,
.privacy-line span {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.challenge-grid input[type="text"],
.challenge-grid input[type="email"] {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  padding: 0.9rem 0.85rem;
  outline: none;
}

.challenge-grid input:focus { border-color: rgba(212, 175, 106, 0.55); }

.privacy-line {
  grid-template-columns: auto 1fr;
  align-items: start;
  margin: 0.5rem 0 0.25rem;
}

.form-alert {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  color: var(--muted);
}

.form-alert.success { border-color: rgba(212, 175, 106, 0.45); color: var(--accent); }
.form-alert.error { border-color: rgba(220, 80, 80, 0.45); color: #f0a0a0; }

/* Finale */
.finale-inner {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.finale-quote {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
}

.finale-inner h2 { margin-bottom: 2rem; }

/* Footer */
.b-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2.5rem 1.5rem 3rem;
  border-top: 1px solid var(--line);
  max-width: calc(var(--max) + 3rem);
  margin: 0 auto;
  color: var(--muted);
}

.b-footer-brand strong {
  display: block;
  color: var(--text);
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  margin-bottom: 0.55rem;
}

.b-footer-brand p { margin: 0.2rem 0; font-size: 0.9rem; }

.b-footer-links {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.b-footer-links a {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.b-footer-links a:hover { color: var(--accent); }

@media (max-width: 760px) {
  .b-nav-links a:not(.b-nav-cta) { display: none; }
  .hero { min-height: 92svh; padding-top: 4rem; }
}
