/* ==========================================================================
   StylingCV — Homepage flagship layer
   Stacked WebGL canvas hero, oversized display type, scroll transitions.
   Loaded after site.css on index.html / ar/index.html only.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero — layered: ambient gradient < GL canvas < veil < parallax rings < content
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100dvh;
  padding-top: 9rem;
  background: var(--bg-0);
}

.hero-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(95% 65% at 72% 6%, rgba(201, 162, 39, 0.15), transparent 58%),
    radial-gradient(70% 55% at 12% 90%, rgba(176, 106, 44, 0.13), transparent 62%),
    linear-gradient(165deg, #1c130a 0%, #100b07 48%, #0a0705 100%);
}

.hero-gl-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

html.no-gl .hero-gl-canvas { display: none; }

.hero-veil {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 36%;
  z-index: 2;
  background: linear-gradient(to bottom, transparent, rgba(10, 7, 5, 0.85) 72%, var(--bg-0));
  pointer-events: none;
}

/* Parallax rings — replace the legacy ::before/::after decoration on the homepage */
.hero::before,
.hero::after { content: none; }

.hero-ring {
  position: absolute;
  border: 1px solid rgba(227, 192, 120, 0.15);
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
}

.hero-ring-a {
  width: 640px;
  height: 640px;
  top: -190px;
  inset-inline-end: -170px;
  box-shadow: 0 0 90px -30px rgba(201, 162, 39, 0.18), inset 0 0 90px -40px rgba(201, 162, 39, 0.12);
}

.hero-ring-b {
  width: 420px;
  height: 420px;
  bottom: -110px;
  inset-inline-start: -130px;
  border-style: dashed;
  border-color: rgba(227, 192, 120, 0.1);
}

.hero-content { z-index: 3; }

/* Oversized cinematic display type */
.hero h1 {
  font-size: clamp(2.9rem, 6.4vw, 5.1rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 840px;
  margin-bottom: 1.75rem;
  text-shadow: 0 2px 40px rgba(10, 7, 5, 0.6);
}

.hero p {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  max-width: 640px;
  color: rgba(243, 234, 220, 0.78);
  text-shadow: 0 1px 24px rgba(10, 7, 5, 0.55);
}

.hero-badge {
  letter-spacing: 0.02em;
  animation: badge-breathe 6s ease-in-out infinite;
}

@keyframes badge-breathe {
  0%, 100% { box-shadow: 0 0 24px -6px rgba(201, 162, 39, 0.25), inset 0 1px 0 rgba(255, 240, 205, 0.12); }
  50% { box-shadow: 0 0 38px -6px rgba(201, 162, 39, 0.42), inset 0 1px 0 rgba(255, 240, 205, 0.16); }
}

.hero .cta-button { padding: 0.95rem 2.2rem; font-size: 1.02rem; }

.hero .text-link { align-self: center; }

.hero-stats { margin-top: 3.5rem; }

.hero-stats .stat-number { font-size: clamp(2rem, 3.4vw, 2.9rem); }

.hero-stats .stat { text-align: start; }

/* --------------------------------------------------------------------------
   Features — blends out of the hero via shared bg; cards get extra depth
   -------------------------------------------------------------------------- */
.features {
  background: linear-gradient(var(--bg-0), #0d0906 32%, var(--bg-0));
  padding-top: clamp(5rem, 9vw, 8rem);
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 192, 120, 0.22), transparent);
}

.features .section-header h2 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); }

.features .feature-card:nth-child(odd) { background: linear-gradient(200deg, rgba(33, 24, 13, 0.75), rgba(14, 10, 6, 0.9)); }

/* --------------------------------------------------------------------------
   Footer lead-in glow
   -------------------------------------------------------------------------- */
footer { position: relative; }

footer::before {
  content: '';
  position: absolute;
  top: -1px;
  inset-inline: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 192, 120, 0.35), transparent);
}

/* --------------------------------------------------------------------------
   How It Works — serpentine light journey
   -------------------------------------------------------------------------- */
.how-it-works {
  background:
    radial-gradient(52% 30% at 50% 26%, rgba(201, 162, 39, 0.055), transparent 72%),
    radial-gradient(46% 26% at 50% 78%, rgba(176, 106, 44, 0.05), transparent 72%),
    var(--bg-0);
}

.journey {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  aspect-ratio: 400 / 440;
}

.journey-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.jp,
.jhot,
.jwarm { fill: none; stroke-linecap: round; }

.jp-aura { stroke: #8a5a1e; stroke-width: 12; opacity: 0.22; }
.jp-mid { stroke: #d9902f; stroke-width: 5; opacity: 0.4; }
.jp-soft { stroke: #f7c877; stroke-width: 2; opacity: 0.75; }
.jp-core { stroke: #ffefd2; stroke-width: 1.1; opacity: 0.95; }

.jhot-aura { stroke: #c87f22; stroke-width: 16; --seg-o: 0.5; opacity: var(--seg-o); }
.jhot-mid { stroke: #ffbe5c; stroke-width: 7; --seg-o: 0.75; opacity: var(--seg-o); }
.jhot-core { stroke: #fff3dc; stroke-width: 2.6; --seg-o: 1; opacity: var(--seg-o); }

.jwarm-aura { stroke: #d9902f; stroke-width: 10; --seg-o: 0.4; opacity: var(--seg-o); }
.jwarm-mid { stroke: #ffc973; stroke-width: 4; --seg-o: 0.65; opacity: var(--seg-o); }

.jdot { fill: #ffb960; --seg-o: 0.4; opacity: var(--seg-o); }
.jdot-core { fill: #ffe1b0; --seg-o: 1; }

.journey-step {
  position: absolute;
  left: var(--x);
  top: var(--y);
}

.journey-step span {
  position: absolute;
  top: 0;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(243, 234, 220, 0.88);
  text-shadow: 0 1px 14px rgba(10, 7, 5, 0.85);
}

.journey-step--left span { right: 1.15rem; text-align: right; }
.journey-step--right span { left: 1.15rem; }

/* --------------------------------------------------------------------------
   Agent Ecosystem — radial hub and spokes
   -------------------------------------------------------------------------- */
.ecosystem-header { margin-top: clamp(4.5rem, 8vw, 7rem); }

.ecosystem {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
  aspect-ratio: 1;
}

.eco-spokes { position: absolute; inset: 0; width: 100%; height: 100%; }

.eco-spokes line { stroke: rgba(201, 162, 39, 0.3); stroke-width: 0.25; }

.eco-spokes circle { fill: #e3c078; --seg-o: 0.8; opacity: var(--seg-o); }

.eco-aura {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(227, 192, 120, 0.16), transparent);
  pointer-events: none;
}

.eco-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 32%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4%;
  font-weight: 700;
  font-size: clamp(0.8rem, 2.4vw, 1.05rem);
  line-height: 1.35;
  color: var(--text);
  background: radial-gradient(circle at 50% 35%, #251a0f, #120d07 75%);
  border: 1px solid rgba(227, 192, 120, 0.28);
  box-shadow: 0 0 70px rgba(201, 162, 39, 0.22), inset 0 1px 0 rgba(255, 240, 205, 0.07);
}

.eco-hub::before,
.eco-hub::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(227, 192, 120, 0.18);
  pointer-events: none;
}

.eco-hub::before { width: 122%; }
.eco-hub::after { width: 146%; border-color: rgba(227, 192, 120, 0.1); }

.eco-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  z-index: 2;
}

.eco-chip {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e3c078;
  background: linear-gradient(160deg, #2a1f12, #150f08);
  border: 1px solid rgba(227, 192, 120, 0.3);
  box-shadow: 0 0 18px rgba(201, 162, 39, 0.14), inset 0 1px 0 rgba(255, 240, 205, 0.07);
}

.eco-chip svg { width: 21px; height: 21px; }

.eco-label {
  position: absolute;
  width: max-content;
  max-width: 76px;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: rgba(201, 183, 149, 0.88);
  text-shadow: 0 1px 10px rgba(10, 7, 5, 0.8);
}

.eco-node--top .eco-label { bottom: calc(100% + 0.55rem); left: 50%; transform: translateX(-50%); text-align: center; }
.eco-node--bottom .eco-label { top: calc(100% + 0.55rem); left: 50%; transform: translateX(-50%); text-align: center; }
.eco-node--left .eco-label { right: calc(100% + 0.55rem); top: 50%; transform: translateY(-50%); text-align: right; }
.eco-node--right .eco-label { left: calc(100% + 0.55rem); top: 50%; transform: translateY(-50%); }

/* --------------------------------------------------------------------------
   Product Demo — timeline panel, keyword signals, resume preview
   -------------------------------------------------------------------------- */
.product-demo { background: var(--bg-0); }

.demo-panel {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding-inline-start: clamp(2.6rem, 6vw, 4rem);
}

.demo-rail {
  position: absolute;
  inset-inline-start: clamp(0.9rem, 2.4vw, 1.5rem);
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(to bottom, rgba(227, 192, 120, 0.55), rgba(227, 192, 120, 0.12) 70%, transparent);
}

.demo-block { position: relative; margin-bottom: clamp(1.9rem, 3.5vw, 2.6rem); }
.demo-block:last-child { margin-bottom: 0; }

/* dot on the rail, one per block */
.demo-block::before {
  content: '';
  position: absolute;
  inset-inline-start: calc(-1 * (clamp(2.6rem, 6vw, 4rem) - clamp(0.9rem, 2.4vw, 1.5rem)) - 5px);
  top: 0.3rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffd9a0;
  box-shadow: 0 0 12px 3px rgba(255, 185, 96, 0.5);
}

.demo-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(227, 192, 120, 0.75);
  margin-bottom: 0.65rem;
}

.demo-role {
  max-width: 430px;
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.95rem 1.3rem;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 240, 205, 0.06);
}

.demo-note { color: var(--muted); font-size: 0.92rem; max-width: 560px; margin: 0.9rem 0 0; }

.demo-pills { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.demo-pill {
  border: 1px solid var(--line-strong);
  background: rgba(29, 21, 12, 0.6);
  color: var(--text);
  border-radius: 999px;
  padding: 0.38rem 0.95rem;
  font-size: 0.83rem;
  font-weight: 500;
}

.demo-template { position: relative; margin-top: 0.5rem; }

.demo-content-card {
  width: 60%;
  background: linear-gradient(165deg, rgba(33, 24, 13, 0.8), rgba(14, 10, 6, 0.92));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.6rem 1.7rem;
}

.demo-content-card h4 { font-size: 0.95rem; color: var(--text); margin-bottom: 0.9rem; }

.demo-content-card ul { list-style: none; }

.demo-content-card li {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.55rem;
}

.demo-content-card li:last-child { margin-bottom: 0; }

.demo-content-card li::before { content: '✓'; color: var(--gold-2); font-weight: 700; }

.demo-resume {
  position: absolute;
  inset-inline-end: 0;
  top: -1.8rem;
  width: 38%;
  filter: drop-shadow(0 24px 44px rgba(0, 0, 0, 0.6));
}

/* --------------------------------------------------------------------------
   Resume document mockup — pure CSS skeleton, scales to any size
   -------------------------------------------------------------------------- */
.resume-doc {
  background: #f4f1ea;
  border-radius: 4px;
  padding: 9% 10%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rd-bar {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: #cfc9bc;
  margin-bottom: 5px;
  width: 100%;
}

.rd-bar:last-child { margin-bottom: 0; }

.rd-name { height: 7px; background: #2e2a23; width: 52%; margin-bottom: 4px; }
.rd-contact { width: 38%; height: 3px; }
.rd-title { background: #a9883d; width: 34%; height: 4.5px; margin-bottom: 6px; }

.rd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8%; }

.w95 { width: 95%; }
.w90 { width: 90%; }
.w85 { width: 85%; }
.w80 { width: 80%; }
.w75 { width: 75%; }
.w70 { width: 70%; }
.w60 { width: 60%; }

/* thumbnail variants */
.resume-doc--mini { aspect-ratio: 0.72; gap: 7px; padding: 8% 9%; }

.resume-doc--sidebar { position: relative; padding-inline-start: 34%; }
.resume-doc--sidebar::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 26%;
  background: #e4ded0;
  border-radius: 4px 0 0 4px;
}
.rtl .resume-doc--sidebar::before { border-radius: 0 4px 4px 0; }

.resume-doc--band .rd-name { width: 100%; height: 12px; }
.resume-doc--gold .rd-name { background: #b98a2e; width: 62%; height: 9px; }
.resume-doc--center .rd-name,
.resume-doc--center .rd-contact { margin-inline: auto; }

/* --------------------------------------------------------------------------
   Template carousel
   -------------------------------------------------------------------------- */
.tpl-carousel {
  position: relative;
  max-width: 1080px;
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
}

.tpl-track {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0.25rem 1.25rem;
}

.tpl-card {
  flex: 0 0 clamp(150px, 22vw, 190px);
  scroll-snap-align: start;
  background: linear-gradient(170deg, rgba(33, 24, 13, 0.75), rgba(14, 10, 6, 0.9));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.8rem 0.8rem 1rem;
  text-align: center;
  transition: border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.tpl-card:hover { border-color: var(--line-strong); transform: translateY(-4px); }

.tpl-card.is-featured {
  border-color: rgba(227, 192, 120, 0.55);
  box-shadow: 0 0 34px -8px rgba(201, 162, 39, 0.35);
}

.tpl-thumb { margin-bottom: 0.8rem; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.5)); }

.tpl-name { font-weight: 600; font-size: 0.92rem; color: var(--text); margin-bottom: 0.65rem; }

.tpl-use {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1d150c;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  border-radius: 999px;
  padding: 0.42rem 0.95rem;
  text-decoration: none;
  transition: filter 0.3s, transform 0.3s var(--ease-out);
}

.tpl-use:hover { filter: brightness(1.07); transform: translateY(-1px); }

.tpl-nav {
  position: absolute;
  top: 38%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(23, 16, 8, 0.85);
  border: 1px solid var(--line-strong);
  color: var(--gold-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: border-color 0.3s, background 0.3s;
}

.tpl-nav:hover { border-color: var(--gold-2); background: rgba(33, 24, 13, 0.95); }

.tpl-nav svg { width: 18px; height: 18px; }

.rtl .tpl-nav svg { transform: scaleX(-1); }

.tpl-prev { inset-inline-start: -0.5rem; }
.tpl-next { inset-inline-end: -0.5rem; }

/* --------------------------------------------------------------------------
   ATS Optimization — scanning beam over the resume
   -------------------------------------------------------------------------- */
.ats-section { background: linear-gradient(var(--bg-0), #0d0906 45%, var(--bg-0)); }

.ats-panel {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.ats-visual {
  position: relative;
  background: linear-gradient(165deg, rgba(33, 24, 13, 0.7), rgba(14, 10, 6, 0.9));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
}

.ats-visual .resume-doc { transform: rotate(-2.5deg); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55); }

.scan-beam {
  position: absolute;
  inset-inline: 6%;
  top: 38%;
  height: 3px;
  z-index: 2;
}

.scan-beam::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, #ffd98f 15%, #fff6e0 50%, #ffd98f 85%, transparent);
  box-shadow: 0 0 16px 4px rgba(255, 190, 92, 0.55), 0 0 48px 14px rgba(201, 162, 39, 0.28);
}

.beam-dot {
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffe1b0;
  box-shadow: 0 0 12px 4px rgba(255, 185, 96, 0.65);
  transform: translateY(-50%);
}

.beam-dot--start { inset-inline-start: -3px; }
.beam-dot--end { inset-inline-end: -3px; }

.ats-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  margin-bottom: 1rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.rtl .ats-copy h3 { font-family: 'Tajawal', serif; letter-spacing: 0; }

.ats-copy p { color: var(--muted); font-size: 1rem; margin-bottom: 1.6rem; max-width: 44ch; }

/* --------------------------------------------------------------------------
   How It Works / Ecosystem entrance motion — skipped for reduced motion,
   and everything stays fully visible without JS
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  /* The journey line is drawn by scroll position — site.js writes
     stroke-dashoffset per frame. These are only the pre-first-frame hidden
     states; without JS everything stays fully visible. */
  html.js .jp,
  html.js .jhot,
  html.js .jwarm { stroke-dasharray: 1000; stroke-dashoffset: 1000; }

  html.js .jdot-g { opacity: 0; transition: opacity 0.35s ease; }
  html.js .jdot-g.is-on { opacity: 1; }

  html.js .journey-step span {
    opacity: 0;
    transform: translateY(calc(-50% + 10px));
    transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  }

  html.js .journey-step.is-on span { opacity: 1; transform: translateY(-50%); }

  @keyframes seg-in { to { opacity: var(--seg-o, 1); } }

  html.js .eco-hub,
  html.js .eco-node,
  html.js .eco-spokes line,
  html.js .eco-spokes circle { opacity: 0; }

  html.js .ecosystem.is-visible .eco-hub { animation: hub-in 0.7s var(--ease-out) forwards; }

  @keyframes hub-in {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  }

  html.js .ecosystem.is-visible .eco-node {
    animation: eco-pop 0.55s var(--ease-out) forwards;
    animation-delay: calc(0.35s + var(--i, 0) * 0.08s);
  }

  @keyframes eco-pop {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  }

  html.js .ecosystem.is-visible .eco-spokes line { animation: seg-in 0.9s ease 0.15s forwards; }
  html.js .ecosystem.is-visible .eco-spokes circle { animation: seg-in 0.8s ease 0.45s forwards; }

  .eco-aura { animation: eco-breathe 5s ease-in-out infinite; }

  @keyframes eco-breathe {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
  }

  /* Demo rail grows once the first block reveals */
  html.js .demo-rail {
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 1.5s var(--ease-out);
  }

  html.js .demo-panel:has(.demo-block.is-visible) .demo-rail { transform: scaleY(1); }

  /* Scanning beam sweeps the resume */
  .scan-beam { animation: beam-sweep 5.5s ease-in-out infinite; }

  @keyframes beam-sweep {
    0%, 100% { top: 14%; }
    50% { top: 82%; }
  }
}

/* --------------------------------------------------------------------------
   Global / Multilingual — dotted world map with glowing regions
   -------------------------------------------------------------------------- */
.global-section { background: var(--bg-0); overflow: hidden; }

.global-section .section-header { margin-bottom: clamp(2rem, 4vw, 3rem); }

.global-map-wrap { max-width: 1060px; margin: 0 auto; }

.global-map { display: block; width: 100%; height: auto; overflow: visible; }

.map-dots {
  fill: none;
  stroke: rgba(179, 161, 137, 0.42);
  stroke-width: 1;
  stroke-linecap: round;
}

/* screen blend lights the dots themselves near each hotspot */
.map-glows circle {
  fill: url(#map-glow);
  mix-blend-mode: screen;
}

/* --------------------------------------------------------------------------
   Final CTA — floating resume over a golden horizon, starlit
   -------------------------------------------------------------------------- */
.cta-final {
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(58% 34% at 50% 26%, rgba(201, 162, 39, 0.07), transparent 70%),
    var(--bg-0);
}

.cta-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.star { fill: #f3eadc; opacity: var(--o, 0.5); }
.star--gold { fill: var(--gold-2); }

.cta-stage {
  position: relative;
  max-width: 560px;
  margin: 0 auto clamp(2.75rem, 5vw, 4rem);
  padding-bottom: clamp(2.25rem, 4.5vw, 3.25rem);
}

.cta-doc-wrap {
  position: relative;
  z-index: 2;
  width: fit-content;
  margin: 0 auto;
  perspective: 1000px;
}

/* warm halo behind the floating document */
.cta-doc-wrap::before {
  content: '';
  position: absolute;
  inset: -28% -42%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(227, 192, 120, 0.2), rgba(201, 162, 39, 0.07) 55%, transparent);
  filter: blur(6px);
}

.cta-doc {
  width: clamp(190px, 30vw, 260px);
  border-radius: 6px;
  transform: rotateX(9deg) rotate(-6deg);
  box-shadow: 0 44px 80px -20px rgba(0, 0, 0, 0.7), 0 0 64px rgba(201, 162, 39, 0.16);
}

/* horizon glow line under the document */
.cta-horizon {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(120%, 620px);
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 217, 143, 0.85) 50%, transparent);
  box-shadow: 0 0 18px 4px rgba(255, 190, 92, 0.45), 0 0 60px 16px rgba(201, 162, 39, 0.25);
}

/* light pool beneath the line */
.cta-horizon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 72%;
  height: 90px;
  background: radial-gradient(50% 100% at 50% 0%, rgba(201, 162, 39, 0.15), transparent 75%);
}

.cta-copy { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }

.cta-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: 1.75rem;
  text-wrap: balance;
}

.rtl .cta-copy h2 { font-family: 'Tajawal', serif; letter-spacing: 0; }

.cta-copy .cta-button { padding: 0.95rem 2.3rem; font-size: 1.03rem; }

.cta-note { margin-top: 1.05rem; color: var(--muted-2); font-size: 0.93rem; }

/* --------------------------------------------------------------------------
   FAQ — bordered accordion (native details/summary, works without JS)
   -------------------------------------------------------------------------- */
.faq-section { background: var(--bg-0); }

.faq-heading {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  letter-spacing: -0.01em;
  max-width: 780px;
  margin: 0 auto clamp(2rem, 4vw, 3rem);
}

.rtl .faq-heading { font-family: 'Tajawal', serif; letter-spacing: 0; }

.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.35s var(--ease-out), background 0.35s var(--ease-out);
}

.faq-item:hover { border-color: var(--line-strong); }

.faq-item[open] {
  border-color: var(--line-strong);
  background: var(--surface-strong);
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.4rem;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  font-size: 1.01rem;
  color: var(--text);
  transition: color 0.3s;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary:hover { color: var(--gold-soft); }

.faq-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.35s var(--ease-out), color 0.3s;
}

.faq-item[open] .faq-chevron { transform: rotate(180deg); color: var(--gold-2); }

.faq-answer {
  padding: 0 1.4rem 1.3rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 62ch;
}

/* --------------------------------------------------------------------------
   Global map / CTA / FAQ motion — reduced-motion users get static states
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .map-glows circle { animation: map-pulse 5.5s ease-in-out infinite; }
  .map-glows circle:nth-child(2n) { animation-delay: -1.8s; }
  .map-glows circle:nth-child(3n) { animation-delay: -3.4s; }

  @keyframes map-pulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
  }

  .cta-doc { animation: cta-float 7s ease-in-out infinite; }

  @keyframes cta-float {
    0%, 100% { transform: rotateX(9deg) rotate(-6deg) translateY(0); }
    50% { transform: rotateX(9deg) rotate(-6deg) translateY(-13px); }
  }

  .star { animation: star-twinkle 5s ease-in-out infinite; animation-delay: var(--d, 0s); }

  @keyframes star-twinkle {
    0%, 100% { opacity: calc(var(--o, 0.5) * 0.3); }
    50% { opacity: var(--o, 0.5); }
  }

  .faq-item[open] .faq-answer { animation: faq-in 0.35s var(--ease-out); }

  @keyframes faq-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
  }
}

/* --------------------------------------------------------------------------
   Responsive + reduced motion
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .hero { padding-top: 7.5rem; }

  .hero h1 { font-size: clamp(2.35rem, 9vw, 3rem); }

  .hero-ring-a { width: 420px; height: 420px; top: -140px; inset-inline-end: -160px; }

  .hero-ring-b { width: 300px; height: 300px; }

  /* Keep the journey labels and ecosystem side labels inside the viewport */
  .journey-step span { font-size: 0.74rem; }

  .ecosystem { margin-inline: 3rem; }

  .eco-chip { width: 38px; height: 38px; border-radius: 11px; }

  .eco-chip svg { width: 18px; height: 18px; }

  .eco-label { font-size: 0.6rem; max-width: 58px; }

  /* Product demo + ATS stack on small screens */
  .demo-content-card { width: 100%; }

  .demo-resume {
    position: relative;
    inset-inline-end: auto;
    top: auto;
    width: min(230px, 68%);
    margin: -2.2rem auto 0;
  }

  .ats-panel { grid-template-columns: 1fr; }

  .ats-visual { width: 100%; max-width: 420px; margin-inline: auto; }

  /* New sections on small screens */
  .cta-doc { width: clamp(175px, 52vw, 230px); }

  .cta-stage { padding-bottom: 2rem; }

  .faq-item summary { padding: 1rem 1.15rem; font-size: 0.95rem; }

  .faq-answer { padding: 0 1.15rem 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-badge { animation: none; }
}
