/* YourDreams AI OS: site styles
   1. Tokens and base       5. Home sections        9. Animations
   2. Layout and type       6. Solution sections   10. Responsive
   3. Header and buttons    7. Forms and contact   11. Reduced motion
   4. Hero                  8. Other pages
*/

/* 1. Tokens and base ------------------------------------------------------ */
:root {
  --bg: #060a0b;
  --surface: #0c1413;
  --surface-2: #101b19;
  --line: #1c2a25;
  --line-strong: #2a3b34;
  --fg: #e3e6e5;
  --muted: #aeb9b4;
  --dim: #869690;
  --accent: #32be7a;
  --accent-soft: #0f2a1e;
  --accent-ink: #04110b;
  --warn: #e3a64a;
  --display: 'Exo 2', 'Trebuchet MS', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 14px;
  --max: 1180px;
  color-scheme: dark;
}
html[lang="ar"] { --display: 'Cairo', 'Exo 2', sans-serif; --body: 'Cairo', 'Inter', system-ui, sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; color: var(--fg); text-wrap: balance; }
h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Links inside running text are underlined so they don't rely on colour alone */
.form-hint a, .legal p a, .legal li a, .legal dd a, .muted a { text-decoration: underline; text-underline-offset: 2px; }

/* 2. Layout and type ------------------------------------------------------ */
.wrap { max-width: var(--max); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.wrap.narrow { max-width: 820px; }
section { padding: 88px 0; }
section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.eyebrow { font: 600 13px/1 var(--display); letter-spacing: .3em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 15px; }
.lead { font-size: 19px; color: var(--muted); max-width: 64ch; margin-top: 16px; }
.head { margin-bottom: 44px; }
.muted { color: var(--muted); }
.note { margin-top: 18px; color: var(--muted); }
.more { margin-top: 18px; }
.more a { font-weight: 600; }
.ext { font-size: .9em; }
.push-end { margin-inline-start: auto; }
.sub-title { margin: 48px 0 24px; font-size: clamp(24px, 3vw, 32px); }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
section.alt .card { background: var(--bg); }
.card p { color: var(--muted); font-size: 16px; }
.card.hl { background: var(--accent-soft); border-color: var(--accent); }
.card.hl p { color: #c7d0cc; }
.card .num { font: 800 15px var(--display); color: var(--accent); }
.card h3.accent { color: var(--accent); }
.card h2.card-title { font-size: 20px; font-weight: 700; }

.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ticks li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; color: #c7d0cc; }
.ticks li::before { content: "✓"; color: var(--accent-ink); background: var(--accent); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 800; margin-top: 2px; }
.ticks b { color: var(--fg); }
.bullets { margin: 18px 0 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 8px; color: #c7d0cc; }
.badge { display: inline-block; font: 700 12px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); background: var(--warn); border-radius: 6px; padding: 4px 10px; margin-inline-start: 10px; vertical-align: middle; }
.pill { align-self: flex-start; font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 5px 12px; text-transform: uppercase; }
html[lang="ar"] .pill { letter-spacing: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 8px; }
.toc a { font-size: 14px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px; }
.toc a:hover { color: var(--fg); border-color: var(--accent); text-decoration: none; }

/* 3. Header and buttons --------------------------------------------------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(6, 10, 11, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; max-width: 1340px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); font: 700 17px var(--display); letter-spacing: .04em; white-space: nowrap; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.nav { display: flex; gap: 22px; margin-inline-start: auto; }
.nav a { color: var(--muted); font-size: 15px; }
.nav a:hover { color: var(--fg); text-decoration: none; }
.nav-app { display: none; }
.lang { display: flex; gap: 4px; flex-wrap: nowrap; }
.lang a { font: 600 13px var(--body); color: var(--muted); border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 9px; min-height: 34px; display: inline-flex; align-items: center; }
.lang a:hover { color: var(--fg); text-decoration: none; border-color: var(--accent); }
.lang a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.site-header .btn, .lang a { white-space: nowrap; }
.menu-btn { display: none; background: none; border: 1px solid var(--line-strong); color: var(--fg); border-radius: 8px; padding: 8px 10px; cursor: pointer; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 15px var(--body); padding: 13px 22px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; min-height: 46px; text-align: center; }
.btn:hover { text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #3ad187; }
.btn.ghost { border-color: var(--line-strong); color: var(--fg); background: transparent; }
.btn.ghost:hover { border-color: var(--accent); }
.btn.small { padding: 9px 14px; min-height: 38px; font-size: 14px; }
button[disabled] { opacity: .6; cursor: progress; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.cta-row.start { justify-content: flex-start; margin-top: 24px; }

/* Floating WhatsApp (desktop) and action bar (mobile) */
.wa-float { position: fixed; z-index: 30; inset-inline-end: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #06301a; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.wa-float:hover { background: #3be07a; text-decoration: none; }
.mobile-cta { display: none; }

/* Language suggestion */
.lang-hint { position: fixed; z-index: 45; inset-inline-end: max(16px, env(safe-area-inset-right, 0px)); top: calc(80px + env(safe-area-inset-top, 0px)); max-width: 340px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--accent); border-radius: 12px; padding: 10px 12px 10px 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); font-size: 15px; }
.lang-hint a { font-weight: 700; }
.lang-hint button { background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 6px 8px; min-width: 36px; min-height: 36px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--dim); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--muted); }

/* 4. Hero ----------------------------------------------------------------- */
.hero { position: relative; padding: 96px 0 0; overflow: clip; }
.hero .wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.hero .emblem { width: 112px; height: 112px; border-radius: 22px; box-shadow: 0 0 60px rgba(50, 190, 122, .35); }
.hero .lead { margin-inline: auto; text-align: center; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip { font-size: 14px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px; background: rgba(12, 20, 19, .7); }
.trust { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; }
.trust li { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 8px; padding: 5px 10px; background: rgba(6, 10, 11, .6); }
.trust li:first-child { color: var(--accent); border-color: var(--accent); }

/* Skyline: slow camera move, light sweep, rising sparks (canvas) */
.skyline-wrap { position: relative; height: 300px; margin-top: -40px; overflow: clip; contain: paint;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%, #000 72%, transparent), linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, #000 40%, #000 72%, transparent), linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  mask-composite: intersect; }
.skyline-wrap .skyline { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; opacity: .85; transform-origin: 50% 100%; animation: cityDrift 30s ease-in-out infinite alternate; }
.sweep { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(90, 255, 175, .22) 48%, rgba(190, 255, 225, .3) 50%, rgba(90, 255, 175, .22) 52%, transparent 62%); background-size: 260% 100%; mix-blend-mode: screen; animation: dataSweep 8s ease-in-out infinite; }
.sparks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: -60px; position: relative; z-index: 2; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; }
.stat b { display: block; font: 800 40px/1.1 var(--display); color: var(--accent); }
.stat span { color: var(--muted); font-size: 15px; }

/* 5. Home sections -------------------------------------------------------- */
/* How it works: a progress bar runs over the 5 steps */
.steps { list-style: none; margin: 0; padding: 22px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; counter-reset: s; position: relative; }
.steps::before, .steps::after { content: ""; position: absolute; top: 0; inset-inline: 0; height: 3px; border-radius: 3px; }
.steps::before { background: var(--line-strong); }
.steps::after { background: var(--accent); box-shadow: 0 0 12px rgba(50, 190, 122, .7); transform-origin: left center; animation: stepsFill 7.5s linear infinite; }
html[dir="rtl"] .steps::after { transform-origin: right center; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 6px; animation: stepCard 7.5s ease-in-out infinite; animation-delay: calc(var(--i) * 1.2s + .3s); }
.steps li::before { content: counter(s); display: inline-block; align-self: flex-start; font: 800 30px/1 var(--display); color: var(--accent); margin-bottom: 6px; transform-origin: left center; animation: stepNum 7.5s ease-in-out infinite; animation-delay: calc(var(--i) * 1.2s + .3s); }
html[dir="rtl"] .steps li::before { transform-origin: right center; }
.steps li:last-child { background: var(--accent-soft); border-color: var(--accent); animation-name: stepCardLast; }
.steps p { color: var(--muted); font-size: 15px; }
.steps li:nth-child(1) { --i: 0; } .steps li:nth-child(2) { --i: 1; } .steps li:nth-child(3) { --i: 2; }
.steps li:nth-child(4) { --i: 3; } .steps li:nth-child(5) { --i: 4; }

/* Demo mock-up and video */
.mock { margin: 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(50, 190, 122, .12); }
.mock-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.mock-url { font-size: 13px; color: var(--dim); }
.mock-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.bubble { padding: 12px 14px; border-radius: 12px; font-size: 15px; max-width: 88%; }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.bubble.ai { align-self: flex-start; background: var(--bg); border: 1px solid var(--line-strong); }
.trace { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #c7d0cc; }
.agents { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.agents span { font-size: 13px; font-weight: 600; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 10px; }
.local { font-size: 13px; color: var(--accent); }
.mock-input { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 18px 14px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--dim); font-size: 14px; }
.send { color: var(--accent); }
.mock figcaption { font-size: 12px; color: var(--dim); text-align: center; padding: 0 0 12px; }
.video-wrap { margin-top: 48px; display: flex; flex-direction: column; gap: 12px; }
.video-title { font-size: 20px; }
.demo-video { width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 16px; border: 1px solid var(--line-strong); background: #000; }
.video-note { font-size: 13px; color: var(--dim); }

/* Comparison table */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 16px; }
.compare th, .compare td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: center; }
.compare thead th { font: 600 14px var(--display); color: var(--muted); background: var(--surface); }
.compare thead th.us { color: var(--accent-ink); background: var(--accent); }
.compare tbody th { text-align: start; font-weight: 600; color: var(--fg); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare td:last-child { background: rgba(50, 190, 122, .07); }
.compare .yes { color: var(--accent); font-weight: 700; }
.compare .yes::before { content: "✓ "; }
.compare .no { color: #ef8a8a; }
.compare .no::before { content: "✕ "; }
.compare .part { color: var(--warn); }
.compare .part::before { content: "◐ "; }

/* ROI calculator */
.roi { display: grid; gap: 14px; margin-top: 24px; max-width: 520px; }
.roi-out { display: flex; flex-direction: column; gap: 12px; }
.roi-out .btn { align-self: flex-start; }
.roi-card { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 18px 22px; }
.roi-card span { color: var(--muted); }
.roi-card b { font: 800 30px var(--display); color: var(--fg); font-variant-numeric: tabular-nums; }
.roi-card.hl { border-color: var(--accent); background: var(--accent-soft); }
.roi-card.hl b { color: var(--accent); font-size: 36px; }

/* Offers */
.plan ul { margin: 6px 0 0; padding-inline-start: 18px; color: #c7d0cc; font-size: 15px; display: flex; flex-direction: column; gap: 4px; }
.plan .tag { align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 6px; padding: 3px 8px; }
.market b { color: var(--accent); font: 700 18px var(--display); }

/* Events */
.event { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 32px; align-items: center; }
.poster { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line-strong); }
.event-info { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.event-name { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; }
.facts-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; color: #c7d0cc; }
.facts-list li { display: flex; gap: 10px; align-items: center; }
.ico { color: var(--accent); width: 18px; text-align: center; }
.next-events { margin-top: 24px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.next-events p { flex: 1 1 360px; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 10px; max-width: 900px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 800; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details[open] { border-color: var(--accent); }
.faq details p { padding: 0 22px 18px; color: #c7d0cc; }

/* 6. Solution sections ---------------------------------------------------- */
.page-hero { padding: 72px 0 40px; }
.page-hero h1 { max-width: 20ch; }
.page-hero .toc { margin-top: 28px; }
.cta-band { padding: 72px 0; text-align: center; background: radial-gradient(ellipse at 50% 0%, rgba(50, 190, 122, .16), transparent 70%); border-top: 1px solid var(--line); }
.cta-band h2 { max-width: 24ch; margin: 0 auto 24px; }

/* Architecture: animated processing flow (cycle 7s; each step lights 0.8s after the previous one) */
.arch { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.zone { border: 2px solid var(--accent); border-radius: 18px; padding: 22px; background: var(--surface); display: flex; flex-direction: column; gap: 16px; }
.zone-label { font: 700 13px var(--display); letter-spacing: .2em; color: var(--accent); }
.zone-label::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-inline-end: 10px; vertical-align: middle; animation: livePulse 1.6s ease-in-out infinite; }
html[lang="ar"] .zone-label { letter-spacing: 0; font-size: 15px; }
.flow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px; }
.node { position: relative; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px 10px; text-align: center; }
.node b { display: block; font: 700 16px var(--display); }
.node span { font-size: 14px; color: var(--muted); }
.node.key { background: var(--accent-soft); border-color: var(--accent); }
.flow .node, .sub .node { animation: stepLight 7s ease-in-out infinite; animation-delay: calc(var(--i) * .8s); }
.flow .node.key, .sub .node.key { animation-name: stepLightKey; }
.flow .node:not(:last-child)::after { content: "→"; position: absolute; inset-inline-end: -19px; top: 50%; transform: translateY(-50%); color: var(--accent); font-weight: 700; font-size: 20px; animation: arrowPush 7s ease-in-out infinite; animation-delay: calc(var(--i) * .8s + .45s); }
html[dir="rtl"] .flow .node:not(:last-child)::after { content: "←"; animation-name: arrowPushRtl; }
.flow .node:nth-child(1) { --i: 0; } .flow .node:nth-child(2) { --i: 1; } .flow .node:nth-child(3) { --i: 2; }
.flow .node:nth-child(4) { --i: 3; } .flow .node:nth-child(5) { --i: 4; } .flow .node:nth-child(6) { --i: 5; }
.sub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sub .node:nth-child(1) { --i: 3; } .sub .node:nth-child(2) { --i: 4; }
.audit { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 12px 16px; color: #c7d0cc; font-size: 15px; text-align: center; animation: auditFlash 7s ease-in-out infinite; animation-delay: 4.6s; }
.side { display: flex; flex-direction: column; gap: 14px; }
.cloud { border: 2px dashed var(--dim); border-radius: 16px; padding: 18px; text-align: center; color: var(--muted); }
.cloud b { display: block; font: 700 16px var(--display); color: var(--muted); }
.deploy { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.deploy b { font: 700 16px var(--display); }
.deploy ul { margin: 8px 0 0; padding-inline-start: 18px; color: #c7d0cc; font-size: 15px; }

/* Governance chain: arrows sit between the boxes; steps light in sequence (cycle 7s, 0.6s per step) */
.chain { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 30px; align-items: center; }
.chain li { position: relative; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 14px; font-weight: 600; font-size: 15px; animation: chainStep 7s ease-in-out infinite; animation-delay: calc(var(--i) * .6s); }
.chain li:last-child { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); animation-name: chainStepLast; }
.chain li + li::before { content: "→"; color: var(--accent); position: absolute; inset-inline-start: -22px; top: 50%; transform: translateY(-50%); margin: 0; font-weight: 800; animation: chainArrow 7s ease-in-out infinite; animation-delay: calc(var(--i) * .6s - .3s); }
html[dir="rtl"] .chain li + li::before { content: "←"; }
.chain li:nth-child(1) { --i: 0; } .chain li:nth-child(2) { --i: 1; } .chain li:nth-child(3) { --i: 2; } .chain li:nth-child(4) { --i: 3; }
.chain li:nth-child(5) { --i: 4; } .chain li:nth-child(6) { --i: 5; } .chain li:nth-child(7) { --i: 6; } .chain li:nth-child(8) { --i: 7; }
/* The cards below light with the step they explain: Classify, Rights, then human approval just before Action */
.chain + .grid .card { animation: govCard 7s ease-in-out infinite; animation-delay: var(--d); }
.chain + .grid .card:nth-child(1) { --d: .6s; }
.chain + .grid .card:nth-child(2) { --d: 3.2s; }
.chain + .grid .card:nth-child(3) { --d: 1.8s; }

/* Sovereign telephony */
.phone-flow { display: flex; flex-direction: column; gap: 10px; }
.phone-flow .op { border: 2px dashed var(--line-strong); border-radius: 12px; padding: 14px; text-align: center; color: var(--muted); }
.phone-flow .arrow { text-align: center; color: var(--accent); font-weight: 800; }
.phone-flow .srv { border: 2px solid var(--accent); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.phone-flow .srv > p { padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line-strong); font-weight: 600; }
.phone-flow .srv > p.key { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* 7. Forms and contact ---------------------------------------------------- */
.contact-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; }
.contact-lines { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 10px; }
.contact-lines li { color: #c7d0cc; }
form { display: grid; gap: 12px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
input, textarea, select { font: 16px var(--body); color: var(--fg); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 12px; width: 100%; }
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: none; }
.form-hint { font-size: 13px; color: var(--dim); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
#contact-form { position: relative; }
.form-status { font-size: 15px; min-height: 1.4em; }
.form-status.ok { color: var(--accent); font-weight: 600; }
.form-status.err { color: #ef8a8a; }
.form-status a { color: inherit; text-decoration: underline; }

/* 8. Other pages ---------------------------------------------------------- */
/* Pilot programme */
.pilot-hero { padding: 72px 0 56px; }
.pilot-hero .lead { max-width: 70ch; }
.pilot-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pilot-form { margin-top: 24px; }

/* Legal and security pages */
.legal { padding: 64px 0; }
.legal .wrap { max-width: 860px; }
.legal h1 { font-size: clamp(30px, 5vw, 44px); margin-bottom: 24px; }
.legal h2 { font-size: 24px; margin: 36px 0 12px; }
.legal p, .legal li { color: #c7d0cc; max-width: 75ch; }
.legal p + p { margin-top: 10px; }
.legal .muted { margin-bottom: 8px; }
.legal ul { margin: 10px 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 6px; }
.legal a { overflow-wrap: anywhere; }
.summary { margin-top: 20px; padding: 16px 20px; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); color: var(--fg) !important; }
.facts { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); margin: 14px 0 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts dt, .facts dd { margin: 0; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 14px; background: var(--surface); }
.facts dd { color: var(--fg); }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }
.legal-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; border: 1px solid var(--line); }
.legal-table th, .legal-table td { text-align: start; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: #c7d0cc; }
.legal-table th { font: 600 13px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
.legal-table td:first-child { color: var(--fg); font-weight: 600; width: 34%; }

/* 404 */
.notfound { min-height: 90vh; display: flex; align-items: center; padding: 48px 0; }
.notfound .wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.notfound img { border-radius: 18px; }
.notfound .code { font: 800 72px var(--display); color: var(--accent); line-height: 1; }
.nf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 16px; width: 100%; }
.nf-grid section { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.nf-grid h1, .nf-grid h2 { font-size: 20px; }
.nf-grid p { color: var(--muted); font-size: 15px; }

/* 9. Animations ----------------------------------------------------------- */
/* They run only while their block is on screen (site.js adds .in-view); without JS they simply run */
.js [data-anim]:not(.in-view) *, .js [data-anim]:not(.in-view) *::before, .js [data-anim]:not(.in-view) *::after { animation-play-state: paused !important; }

@keyframes cityDrift { from { transform: scale(1.04) translateX(-1.2%); } to { transform: scale(1.14) translateX(1.2%); } }
@keyframes dataSweep { 0% { background-position: 130% 0; opacity: 0; } 12% { opacity: 1; } 55% { opacity: 1; } 70%, 100% { background-position: -30% 0; opacity: 0; } }

@keyframes stepsFill { 0% { transform: scaleX(0); opacity: 1; } 80% { transform: scaleX(1); opacity: 1; } 94% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes stepCard {
  0%, 22%, 100% { transform: none; border-color: var(--line); box-shadow: none; }
  5%, 15% { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 12px 30px rgba(50, 190, 122, .18), 0 0 0 1px var(--accent); }
}
@keyframes stepCardLast {
  0%, 30%, 100% { transform: none; box-shadow: none; }
  5%, 24% { transform: translateY(-6px); box-shadow: 0 14px 36px rgba(50, 190, 122, .3), 0 0 0 1px var(--accent); }
}
@keyframes stepNum { 0%, 22%, 100% { transform: none; text-shadow: none; } 5%, 15% { transform: scale(1.25); text-shadow: 0 0 14px rgba(50, 190, 122, .8); } }

@keyframes livePulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(50, 190, 122, .6); } 50% { opacity: .5; box-shadow: 0 0 0 6px rgba(50, 190, 122, 0); } }
@keyframes stepLight {
  0%, 16%, 100% { border-color: var(--line-strong); box-shadow: none; }
  4%, 11% { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 26px rgba(50, 190, 122, .35); }
}
@keyframes stepLightKey {
  0%, 16%, 100% { box-shadow: none; }
  4%, 11% { box-shadow: 0 0 0 1px var(--accent), 0 0 30px rgba(50, 190, 122, .5); }
}
@keyframes arrowPush {
  0%, 14%, 100% { opacity: .35; transform: translate(0, -50%); text-shadow: none; }
  6% { opacity: 1; transform: translate(6px, -50%); text-shadow: 0 0 10px var(--accent); }
}
@keyframes arrowPushRtl {
  0%, 14%, 100% { opacity: .35; transform: translate(0, -50%); text-shadow: none; }
  6% { opacity: 1; transform: translate(-6px, -50%); text-shadow: 0 0 10px var(--accent); }
}
@keyframes arrowPushDown {
  0%, 14%, 100% { opacity: .35; transform: translate(-50%, 0); text-shadow: none; }
  6% { opacity: 1; transform: translate(-50%, 6px); text-shadow: 0 0 10px var(--accent); }
}
@keyframes auditFlash {
  0%, 12%, 100% { border-color: var(--line-strong); color: #c7d0cc; background: transparent; }
  4%, 9% { border-color: var(--accent); color: var(--fg); background: rgba(50, 190, 122, .08); }
}

@keyframes chainArrow { 0%, 12%, 100% { opacity: .35; text-shadow: none; } 5% { opacity: 1; text-shadow: 0 0 10px var(--accent); } }
@keyframes chainStep {
  0%, 14%, 100% { border-color: var(--line-strong); color: var(--fg); transform: none; box-shadow: none; }
  4%, 10% { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); box-shadow: 0 0 0 1px var(--accent), 0 8px 22px rgba(50, 190, 122, .25); }
}
@keyframes chainStepLast {
  0%, 26%, 100% { transform: none; box-shadow: none; }
  4%, 20% { transform: translateY(-3px) scale(1.06); box-shadow: 0 0 0 4px rgba(50, 190, 122, .25), 0 8px 26px rgba(50, 190, 122, .45); }
}
@keyframes govCard {
  0%, 18%, 100% { border-color: var(--line); box-shadow: none; }
  4%, 13% { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 10px 28px rgba(50, 190, 122, .18); }
}

/* 10. Responsive ---------------------------------------------------------- */
/* The full header menu needs ~1240px; below that it folds into the menu button */
@media (min-width: 1241px) {
  .nav { gap: 18px; }
  .nav a { font-size: 14.5px; }
}
@media (max-width: 1240px) {
  .nav { display: none; position: absolute; top: 68px; inset-inline: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px max(20px, env(safe-area-inset-right, 0px)) 16px max(20px, env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-app { display: block; color: var(--accent) !important; font-weight: 700; }
  .menu-btn { display: inline-block; }
  .lang { margin-inline-start: auto; }
}
@media (max-width: 1000px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 0; }
  .steps::before, .steps::after { display: none; }
  .steps li:last-child { grid-column: span 2; }
  .pilot-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pilot-steps li:last-child { grid-column: auto; }
  .arch { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flow .node:nth-child(3)::after { display: none; }
  .side { flex-direction: row; }
  .side > * { flex: 1; }
}
@media (max-width: 1000px) and (min-width: 561px) {
  .flow .node:nth-child(3)::after { animation: none; }
}
@media (max-width: 900px) {
  .nf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .menu-btn { margin-inline-start: auto; }
  .header-cta { display: none; }
  .g3, .g2, .split, .contact-box, .event { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .poster { max-width: 380px; margin: 0 auto; }
  .wa-float { display: none; }
  .mobile-cta { display: flex; gap: 10px; position: fixed; z-index: 40; inset-inline: 0; bottom: 0; padding: 10px max(14px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px)); background: rgba(6, 10, 11, .94); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  .mobile-cta .btn { flex: 1; min-height: 46px; }
  body { padding-bottom: 72px; }
}
@media (max-width: 560px) {
  section { padding: 64px 0; }
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .site-header .wrap { gap: 10px; }
  .brand span { display: none; }
  .lang a { padding: 5px 7px; min-height: 32px; }
  .skyline-wrap { height: 200px; }
  .g4, .steps, .pilot-steps, .row2, .sub { grid-template-columns: minmax(0, 1fr); }
  .steps li:last-child { grid-column: auto; }
  .flow { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .flow .node:nth-child(3)::after { display: block; }
  .flow .node:not(:last-child)::after, html[dir="rtl"] .flow .node:not(:last-child)::after { content: "↓"; inset-inline-end: auto; left: 50%; top: auto; bottom: -24px; transform: translateX(-50%); animation-name: arrowPushDown; }
  .side { flex-direction: column; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dt { border-bottom: 0; padding-bottom: 2px; }
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table td { display: block; width: 100%; }
  .legal-table thead { display: none; }
  .legal-table td:first-child { width: 100%; border-bottom: 0; padding-bottom: 0; }
}
@media (max-width: 520px) {
  .nf-grid { grid-template-columns: minmax(0, 1fr); }
}

/* 11. Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skyline-wrap .skyline, .sweep, .steps li, .steps li::before, .steps::after,
  .flow .node, .sub .node, .audit, .zone-label::before, .flow .node:not(:last-child)::after,
  .chain li, .chain li + li::before, .chain + .grid .card { animation: none !important; }
  .sweep, .sparks { display: none; }
  .steps::after { transform: none; }
  .flow .node:not(:last-child)::after, .chain li + li::before { opacity: 1; }
}
