/* Wadeh website styles. Palette and fonts from Phase 7 (revised 3 Dec 2026). */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

/* ---------- Tokens ---------- */
:root {
  --ink: #14213D;        /* Ink Navy: text, dark band */
  --indigo: #4338CA;     /* Clear Indigo: actions, links, key data */
  --paper: #F7F7F5;      /* Paper: page background */
  --mist: #EEF0FB;       /* Mist: tints, callouts */
  --amber: #B45309;      /* Signal Amber: one highlight on light backgrounds */
  --amber-fill: #F59E0B; /* Amber Light: fills on navy only */
  --slate: #475569;      /* Secondary text */
  --rule: #D9DBE3;       /* Hairlines and input borders */
  --white: #FFFFFF;

  --font: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, "Segoe UI", sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "IBM Plex Sans", "Segoe UI", Tahoma, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(64px, 9vw, 120px);
  --radius-panel: 16px;
  --radius-control: 10px;
}

@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "tnum" 0;
}
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.8; }
img, svg { display: block; max-width: 100%; }
a { color: var(--indigo); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.12; }
h2 { font-size: clamp(30px, 4.2vw, 46px); letter-spacing: -0.015em; max-width: 22ch; }
h3 { font-size: 21px; line-height: 1.3; }
html[lang="ar"] h1, html[lang="ar"] h2 { letter-spacing: 0; line-height: 1.3; }
.num { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 4px; }
.band-dark :focus-visible { outline-color: var(--amber-fill); }

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: var(--radius-control);
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }
.section.band-dark, .band-dark + .section { padding-top: var(--section); }
.lede { font-size: 19px; color: var(--slate); max-width: 60ch; }
.lede.intro { margin-top: 16px; }
.note { font-size: 14px; color: var(--slate); }
.fiction { display: inline-block; font-size: 13px; font-weight: 500; color: var(--slate);
  border: 1px solid currentColor; border-radius: 999px; padding: 2px 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px; border-radius: var(--radius-control);
  font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
}
.btn-primary { background: var(--indigo); color: var(--white); }
.btn-primary:hover { background: var(--ink); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.logo { display: block; height: 40px; width: auto; overflow: visible; }
.logo-words { fill: currentColor; }
.logo-line { fill: none; stroke: var(--indigo); stroke-width: 6; stroke-linecap: round; }
.logo-dot { fill: var(--indigo); transform-box: fill-box; transform-origin: center; }
@media (max-width: 420px) { .logo { height: 34px; } }
.site-nav { display: flex; gap: 22px; margin-inline-start: auto; font-size: 15px; font-weight: 500; }
.site-nav a { color: var(--ink); text-decoration: none; padding-block: 8px; }
.site-nav a:hover { color: var(--indigo); text-decoration: underline; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn {
  min-height: 44px; padding: 8px 14px; border-radius: var(--radius-control); cursor: pointer;
  background: transparent; border: 1px solid var(--rule); color: var(--ink); font: inherit; font-size: 15px; font-weight: 500;
}
.lang-btn:hover { border-color: var(--ink); }
.lang-btn[lang="ar"] { font-family: var(--font-ar); }
.header-cta { min-height: 44px; padding: 8px 16px; font-size: 15px; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(48px, 7vw, 96px) var(--section); }
.hero .wrap { display: grid; gap: clamp(40px, 6vw, 72px); align-items: start; }
.hero h1 { font-size: clamp(46px, 7.4vw, 92px); letter-spacing: -0.03em; line-height: 0.98; max-width: 11ch; }
html[lang="ar"] .hero h1 { line-height: 1.2; max-width: 12ch; }
.hero .sub { font-size: clamp(21px, 2.4vw, 26px); font-weight: 500; margin: 22px 0 18px; max-width: 26ch; }
.hero .lede { margin-bottom: 28px; }
.hero-line { width: min(420px, 100%); height: 18px; margin-top: 18px; }

/* Health check */
.check {
  background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius-panel);
  padding: clamp(20px, 3vw, 32px); box-shadow: 0 24px 48px -28px rgba(20, 33, 61, 0.35);
}
.check h2 { font-size: 24px; max-width: none; letter-spacing: 0; }
.check .hint { font-size: 15px; color: var(--slate); margin: 6px 0 20px; }
.check-grid { display: grid; gap: 28px; }
.sliders { display: grid; gap: 16px; }
.field label { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 500; }
.field output { font-weight: 600; color: var(--indigo); font-variant-numeric: tabular-nums; white-space: nowrap; }
input[type="range"] { width: 100%; margin: 8px 0 0; accent-color: var(--indigo); height: 28px; }
.readout { display: grid; gap: 16px; align-content: start; }
.score { display: flex; align-items: center; gap: 16px; }
.ring { width: 104px; height: 104px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--ring-color, var(--indigo)) calc(var(--p, 0) * 1%), var(--mist) 0); transition: --p 0.4s; }
.ring-inner { width: 80px; height: 80px; border-radius: 50%; background: var(--white); display: grid; place-items: center; text-align: center; }
.ring-value { font-size: 28px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-of { font-size: 12px; color: var(--slate); }
.band-label { font-size: 20px; font-weight: 600; line-height: 1.25; }
.band-caption { font-size: 14px; color: var(--slate); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.stats div { background: var(--paper); border-radius: var(--radius-control); padding: 10px 12px; }
.stats dt { font-size: 13px; color: var(--slate); }
.stats dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.3; }
.stats dd.loss { color: var(--amber); }
.be { display: grid; gap: 6px; }
.be-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--slate); }
.be-track { position: relative; height: 12px; background: var(--mist); border-radius: 6px; }
.be-fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 6px; background: var(--indigo); width: 0; transition: width 0.3s; }
.be-mark { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--ink); }
.firstlook { background: var(--mist); border-radius: var(--radius-control); padding: 14px 16px; }
.firstlook strong { display: block; font-size: 14px; color: var(--indigo); }
.firstlook p { margin: 2px 0 0; font-size: 16px; }
.check .disclaimer { font-size: 13px; color: var(--slate); margin: 18px 0 0; border-top: 1px solid var(--rule); padding-top: 12px; }

/* ---------- Problem ---------- */
.pains { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 28px; }
.pains li { border-top: 2px solid var(--indigo); padding-top: 16px; font-size: 18px; }
.pains strong { display: block; font-size: 21px; line-height: 1.3; margin-bottom: 6px; }
.closer { margin-top: 40px; font-size: clamp(20px, 2.2vw, 24px); font-weight: 500; max-width: 46ch; }

/* ---------- Services ---------- */
.packages { margin-top: 40px; border-top: 1px solid var(--ink); }
.package { display: grid; gap: 10px 32px; padding-block: 28px; border-bottom: 1px solid var(--rule); }
.package h3 { font-size: 24px; }
.package .term { font-size: 14px; color: var(--slate); margin-top: 4px; }
.package p { margin: 0; }
.package .fits { color: var(--slate); }
.package .fits b { color: var(--ink); font-weight: 600; }
.after-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; }
.after-list p { margin: 0; max-width: 60ch; }

/* ---------- Week 13 band ---------- */
.band-dark { background: var(--ink); color: var(--white); }
.band-dark h2 { color: var(--white); }
.band-dark .lede { color: #D3D8E6; }
.band-dark a { color: var(--white); }

/* ---------- Industries ---------- */
.industries { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 32px; }
.industries li { border-top: 2px solid var(--ink); padding-top: 16px; }
.industries h3 { margin-bottom: 8px; }
.industries p { margin: 0; color: var(--slate); }
.industries .door-next { margin-top: 14px; color: var(--ink); }
.industries .door-next b { font-weight: 600; }

/* ---------- Sample work ---------- */
.yearview { margin-top: 40px; display: grid; gap: 28px; align-items: start; }
.yv-panel { background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius-panel); padding: clamp(20px, 3vw, 28px); }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--mist); border-radius: 12px; margin-bottom: 22px; }
.tabs button { flex: 1; min-height: 44px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--indigo); color: var(--white); }
.yv-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 18px; }
.yv-delta { font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.yv-delta.warn { color: var(--amber); }
.yv-rows { display: grid; gap: 14px; }
.yv-row { display: grid; gap: 6px; }
.yv-row .lbl { display: flex; justify-content: space-between; font-size: 14px; color: var(--slate); font-variant-numeric: tabular-nums; }
.yv-track { position: relative; height: 24px; background: var(--paper); border-radius: 6px; }
.yv-fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 6px; transition: width 0.4s; }
.yv-fill.actual { background: var(--indigo); }
.yv-fill.budget { background: #C9CCD8; }
.yv-time { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--amber); }
.yv-legend { font-size: 13px; color: var(--amber); margin-top: 10px; }
.yv-story { font-size: 20px; font-weight: 500; }
.yv-story .fiction { margin-top: 14px; }
.demos { margin-top: 56px; display: grid; gap: 28px; }
.demo { border-top: 1px solid var(--ink); padding-top: 16px; }
.demo h3 { margin-bottom: 6px; }
.demo p { margin: 0 0 10px; color: var(--slate); }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 24px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 48px 1fr; gap: 16px; }
.steps li::before {
  content: counter(step); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--indigo); color: var(--indigo); font-weight: 600; font-size: 18px; background: var(--paper);
}
.steps h3 { font-size: 19px; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--slate); }

/* ---------- About ---------- */
.about .wrap { display: grid; gap: 32px; }
.about-text { font-size: 18px; max-width: 64ch; }
.dont { border-inline-start: 3px solid var(--indigo); padding-inline-start: 16px; color: var(--slate); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 40px; margin-top: 32px; }
form { display: grid; gap: 16px; }
.f label { display: block; font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.f .opt { color: var(--slate); font-weight: 400; }
.f input, .f textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--white);
  border: 1px solid #9AA1B4; border-radius: var(--radius-control); padding: 12px 14px; min-height: 48px;
}
.f textarea { min-height: 110px; resize: vertical; }
.f input:focus, .f textarea:focus { outline: 3px solid var(--indigo); outline-offset: 1px; border-color: var(--indigo); }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 14px; color: var(--slate); align-items: start; }
.consent input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--indigo); }
.form-status { min-height: 1.5em; font-size: 15px; font-weight: 500; margin: 0; }
.form-status.ok { color: var(--indigo); }
.form-status.err { color: var(--amber); }
.direct { display: grid; gap: 16px; align-content: start; }
.direct .btn { justify-content: flex-start; }
.direct p { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding-block: 28px 96px; font-size: 14px; color: var(--slate); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer a { color: var(--slate); }

/* ---------- Mobile action bar ---------- */
.mobile-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: flex; gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--rule);
}
.mobile-bar .btn { flex: 1; min-height: 48px; padding-inline: 10px; font-size: 15px; }

/* ---------- Simple pages (privacy, 404) ---------- */
.page { padding-block: clamp(48px, 7vw, 96px); }
.page h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.02em; margin-bottom: 24px; max-width: 20ch; }
.page h2 { font-size: 24px; margin: 36px 0 10px; max-width: none; letter-spacing: 0; }
.page .prose { max-width: 68ch; }
.page ul { padding-inline-start: 22px; }

/* ---------- Layout breakpoints ---------- */
@media (max-width: 899px) {
  .site-nav { display: none; }
  .header-cta { display: none; }
  .header-actions { margin-inline-start: auto; }
}
@media (min-width: 600px) {
  .pains { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .industries { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .demos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 760px) {
  .check-grid { grid-template-columns: 1fr 1fr; }
  .package { grid-template-columns: 1.1fr 1.6fr 1.3fr; align-items: start; }
  .contact-grid { grid-template-columns: 1.4fr 1fr; }
}
@media (min-width: 900px) {
  .mobile-bar { display: none; }
  .site-footer { padding-bottom: 28px; }
  .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; position: relative; }
  .steps::before { content: ""; position: absolute; top: 23px; inset-inline: 24px; border-top: 2px solid var(--rule); }
  .steps li { grid-template-columns: 1fr; position: relative; }
  .yearview { grid-template-columns: 1.4fr 1fr; }
  .about .wrap { grid-template-columns: 1fr 1.6fr; }
}
@media (min-width: 1100px) {
  .hero .wrap { grid-template-columns: 5fr 7fr; row-gap: 40px; }
  .hero-head { grid-column: 1 / -1; }
  .hero h1 { max-width: none; }
  .hero-copy .sub { margin-top: 0; }
}

/* ---------- Motion (added 3 Dec 2026) ----------
   One orchestrated moment on load: the headline comes into focus ("made clear"), the rising line draws,
   and the health check demonstrates itself. Further down, motion only explains the numbers:
   the door rules draw, the steps light up in order.
   Everything sits behind .motion (set in <head> only when the visitor allows motion) and, for
   scroll reveals, .js-ready (set by script.js), so content is always visible without them. */
.hero h1 .h1-a, .hero h1 .h1-b { display: block; }
.hero-line-wrap { position: relative; width: min(420px, 100%); margin-top: 18px; }
.hero-line-wrap .hero-line { width: 100%; margin-top: 0; }
html[dir="rtl"] .hero-line { transform: scaleX(-1); }
.hero-dot { position: absolute; top: -3px; inset-inline-end: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--indigo); }

.progress { position: absolute; inset-inline: 0; bottom: -1px; height: 2px; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--indigo); transform: scaleX(0); transform-origin: left; }
html[dir="rtl"] .progress span { transform-origin: right; }

.btn { transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 22px -12px rgba(67, 56, 202, 0.75); }
.package { position: relative; }
.package::before { content: ""; position: absolute; inset-block: -1px; inset-inline-start: -16px; width: 3px; background: var(--indigo);
  transform: scaleY(0); transform-origin: top; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.package:hover::before, .package:focus-within::before { transform: none; }

@keyframes w-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes w-focus { 0% { opacity: 0; filter: blur(18px); letter-spacing: 0.06em; } 55% { opacity: 1; } 100% { opacity: 1; filter: blur(0); letter-spacing: -0.03em; } }
@keyframes w-focus-ar { 0% { opacity: 0; filter: blur(18px); } 55% { opacity: 1; } 100% { opacity: 1; filter: blur(0); } }
@keyframes w-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes w-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes w-pop { 0% { transform: scale(0); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes w-ping { 0% { box-shadow: 0 0 0 0 rgba(67, 56, 202, 0.45); } 100% { box-shadow: 0 0 0 16px rgba(67, 56, 202, 0); } }
@keyframes w-ping-amber { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.75); } 100% { box-shadow: 0 0 0 12px rgba(245, 158, 11, 0); } }

/* Load sequence */
.motion .logo-line { stroke-dasharray: 1; animation: w-draw .9s cubic-bezier(.6,0,.2,1) .2s both; }
.motion .logo-dot { animation: w-pop .4s cubic-bezier(.3,1.5,.5,1) 1s both; }
.motion .hero h1 .h1-a { animation: w-rise .8s cubic-bezier(.2,.7,.2,1) .1s both; }
.motion .hero h1 .h1-b { animation: w-focus 1.4s cubic-bezier(.2,.7,.2,1) .5s both; }
html[lang="ar"].motion .hero h1 .h1-b { animation-name: w-focus-ar; }
.motion .hero-line path { stroke-dasharray: 1; animation: w-draw 1s cubic-bezier(.6,0,.2,1) 1.3s both; }
.motion .hero-dot { animation: w-pop .45s cubic-bezier(.3,1.5,.5,1) 2.2s both, w-ping 1.8s ease-out 2.7s 3; }
.motion .hero-copy > * { animation: w-rise .7s cubic-bezier(.2,.7,.2,1) both; }
.motion .hero-copy > :nth-child(1) { animation-delay: .9s; }
.motion .hero-copy > :nth-child(2) { animation-delay: 1.02s; }
.motion .hero-copy > :nth-child(3) { animation-delay: 1.14s; }
.motion .check { animation: w-rise .9s cubic-bezier(.2,.7,.2,1) 1.25s both; }

/* Scroll reveals */
.motion.js-ready .doors li { border-top-color: transparent; position: relative; }
.motion.js-ready .doors li::before { content: ""; position: absolute; top: -2px; inset-inline: 0; height: 2px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform 1s cubic-bezier(.6,0,.2,1); }
html.motion.js-ready[dir="rtl"] .doors li::before { transform-origin: right; }
.motion.js-ready .doors li:nth-child(2)::before { transition-delay: .18s; }
.motion.js-ready .doors li:nth-child(3)::before { transition-delay: .36s; }
.motion.js-ready .doors.in li::before { transform: none; }


.motion.js-ready .steps::before { transform: scaleX(0); transform-origin: left; transition: transform 1.5s cubic-bezier(.6,0,.2,1) .1s; }
html.motion.js-ready[dir="rtl"] .steps::before { transform-origin: right; }
.motion.js-ready .steps.in::before { transform: none; }
.motion.js-ready .steps li::before { transform: scale(.3); opacity: 0; transition: transform .5s cubic-bezier(.3,1.5,.5,1), opacity .3s, background-color .4s, color .4s; }
.motion.js-ready .steps li:nth-child(2)::before { transition-delay: .3s; }
.motion.js-ready .steps li:nth-child(3)::before { transition-delay: .6s; }
.motion.js-ready .steps li:nth-child(4)::before { transition-delay: .9s; }
.motion.js-ready .steps li:nth-child(5)::before { transition-delay: 1.2s; }
.motion.js-ready .steps.in li::before { transform: none; opacity: 1; }
.steps li:first-child::before { background: var(--indigo); color: var(--white); }

.contact-grid.booking { grid-template-columns: 1fr; }
.contact-grid.booking .direct { max-width: 420px; }
@media (min-width: 900px) { .demos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .mobile-bar, .check, .tabs { display: none; }
}


/* ==========================================================================
   Home page, version 4 (5 Dec 2026): shorter, with one idea carried through,
   messy numbers becoming clear. Motion sits behind .motion as before.
   ========================================================================== */
body[data-page="home"] { --section: clamp(52px, 7vw, 92px); }

/* ---------- Stage ---------- */
.stage { position: relative; isolation: isolate; overflow: hidden; background: var(--ink); color: var(--white);
  padding-block: clamp(40px, 6vw, 84px) clamp(48px, 6vw, 88px); }
.stage::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(520px circle at var(--sx, 72%) var(--sy, 28%), rgba(67, 56, 202, .55), transparent 62%); }
.stage .wrap { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
.stage h1 { font-size: clamp(46px, 8.2vw, 88px); line-height: 1.02; letter-spacing: -0.02em; color: var(--white); max-width: 11ch; }
html[lang="ar"] .stage h1 { line-height: 1.25; letter-spacing: 0; }
.stage h1 .h1-a, .stage h1 .h1-b { display: block; }
.stage h1 .h1-b { color: var(--amber-fill); }
.stage .sub { font-size: clamp(18px, 2vw, 22px); line-height: 1.5; color: #D3D8E6; max-width: 34ch; margin: 22px 0 28px; }
.stage .btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, .55); }
.stage .btn-ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.stage :focus-visible { outline-color: var(--amber-fill); }

/* ---------- Clarity switch ---------- */
.clarity { position: relative; border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, .06); padding: clamp(16px, 2.4vw, 24px); }
.cl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.cl-cap { margin: 0; font-size: 15px; font-weight: 500; color: #D3D8E6; display: grid; }
.cl-cap > span { grid-area: 1 / 1; transition: opacity .4s; }
.clarity.is-clear .cl-cap-messy, .clarity:not(.is-clear) .cl-cap-clear { opacity: 0; visibility: hidden; }
.cl-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px; cursor: pointer;
  background: transparent; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; color: var(--white); font: inherit; font-size: 15px; font-weight: 500; }
.cl-switch:hover { border-color: var(--white); }
.cl-side { opacity: .55; transition: opacity .3s; }
.cl-switch[aria-checked="false"] .cl-side:first-child, .cl-switch[aria-checked="true"] .cl-side:last-child { opacity: 1; }
.cl-track { position: relative; width: 44px; height: 24px; border-radius: 999px; background: rgba(255, 255, 255, .25); transition: background-color .3s; }
.cl-thumb { position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); transition: inset-inline-start .35s cubic-bezier(.3, 1.4, .5, 1); }
.cl-switch[aria-checked="true"] .cl-track { background: var(--amber-fill); }
.cl-switch[aria-checked="true"] .cl-thumb { inset-inline-start: 23px; background: var(--ink); }

.cl-field { position: relative; margin-top: 18px; }
.cl-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cl-tile { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--radius-control); background: rgba(255, 255, 255, .08);
  transition: background-color .6s; }
.cl-lab { font-size: 13px; color: #D3D8E6; transition: opacity .5s calc(var(--i) * 80ms + .35s); }
.cl-move { display: block; transition: transform .95s cubic-bezier(.2, .8, .2, 1) calc(var(--i) * 80ms), filter .7s calc(var(--i) * 80ms), opacity .7s; }
.cl-val { display: inline-block; font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cl-first { margin-top: 12px; padding: 14px 16px; border-radius: var(--radius-control); background: var(--white); color: var(--ink);
  transition: opacity .6s .55s, transform .6s cubic-bezier(.2, .8, .2, 1) .55s; }
.cl-first strong { font-size: 13px; font-weight: 600; color: var(--indigo); }
.cl-first p { margin: 2px 0 0; font-size: 16px; }
.cl-noises { position: absolute; inset: 0; pointer-events: none; }
.cl-noise { position: absolute; left: var(--x); top: var(--y); font-size: 15px; font-weight: 500; color: #D3D8E6; white-space: nowrap;
  opacity: 0; transform: scale(.6); transition: opacity .45s, transform .6s; }
.cl-line { display: block; width: 100%; height: 14px; margin-top: 16px; overflow: visible; }
html[dir="rtl"] .cl-line { transform: scaleX(-1); }
.cl-line path { fill: none; stroke: var(--amber-fill); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1s cubic-bezier(.6, 0, .2, 1) .5s; }
.cl-note { margin: 10px 0 0; font-size: 13px; color: #D3D8E6; }
.cl-note a { color: var(--white); }

/* messy state */
.clarity:not(.is-clear) .cl-tile { background: transparent; }
.clarity:not(.is-clear) .cl-lab { opacity: 0; transition-delay: 0s; }
.clarity:not(.is-clear) .cl-move { transform: translate(calc(var(--mx, 0px) * var(--flip, 1)), var(--my, 0)) rotate(var(--mr, 0deg)); filter: blur(2.5px); opacity: .8; }
.clarity:not(.is-clear) .cl-first { opacity: 0; transform: translateY(14px); transition-delay: 0s; }
.clarity:not(.is-clear) .cl-noise { opacity: .7; transform: rotate(calc((var(--i) - 3) * 5deg)); filter: blur(1.5px); transition-delay: calc(var(--i) * 40ms); }
.clarity:not(.is-clear) .cl-line path { stroke-dashoffset: 1; transition-delay: 0s; transition-duration: .3s; }
@keyframes cl-drift { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(7px, -9px); } 66% { transform: translate(-8px, 6px); } }
.motion .clarity:not(.is-clear) .cl-val { animation: cl-drift 5s ease-in-out infinite; animation-delay: calc(var(--i) * -1.3s); }

/* ---------- Ticker ---------- */
.ticker { overflow: hidden; background: var(--mist); border-bottom: 1px solid var(--rule); }
.ticker-track { display: flex; width: max-content; }
.ticker-set { display: flex; flex: none; align-items: center; }
.ticker-set span { display: inline-flex; align-items: center; padding: 14px 0; font-size: 17px; font-weight: 500; white-space: nowrap; }
.ticker-set span::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--indigo); margin-inline: 22px; }
@keyframes tk { to { transform: translateX(-50%); } }
@keyframes tk-rtl { to { transform: translateX(50%); } }
.motion .ticker-track { animation: tk 46s linear infinite; }
.motion[dir="rtl"] .ticker-track { animation-name: tk-rtl; }
.motion .ticker:hover .ticker-track { animation-play-state: paused; }
html:not(.motion) .ticker-track { width: auto; }
html:not(.motion) .ticker-set { flex-wrap: wrap; padding-inline: var(--gutter); }
html:not(.motion) .ticker-set[aria-hidden] { display: none; }

/* ---------- Doors ---------- */
.door-box { margin-top: 32px; background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius-panel); overflow: hidden; }
.door-tabs { display: grid; gap: 0; }
.door-tabs button { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 14px 18px; cursor: pointer; text-align: start;
  background: var(--paper); border: 0; border-bottom: 1px solid var(--rule); color: var(--ink); font: inherit; font-size: 18px; font-weight: 600; line-height: 1.25;
  transition: background-color .25s, color .25s; }
.door-tabs button:hover { background: var(--mist); }
.door-tabs button[aria-selected="true"] { background: var(--ink); color: var(--white); }
.door-tabs svg { flex: none; width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s cubic-bezier(.3, 1.5, .5, 1); }
.door-tabs button[aria-selected="true"] svg { stroke: var(--amber-fill); transform: scale(1.15) rotate(-6deg); }
.door-tabs :focus-visible { outline-offset: -4px; }
.door-tabs button[aria-selected="true"]:focus-visible { outline-color: var(--amber-fill); }
.door-panel { display: grid; gap: 20px 40px; padding: clamp(20px, 3.4vw, 40px); }
.door-q { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; letter-spacing: -0.01em; max-width: 18ch; }
html[lang="ar"] .door-q { line-height: 1.4; letter-spacing: 0; }
.door-get ul { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; font-size: 18px; }
.door-get li { position: relative; padding-inline-start: 30px; }
.door-get li::before { content: ""; position: absolute; inset-inline-start: 0; top: .32em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--indigo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.door-start { margin: 0 0 20px; color: var(--slate); }
.door-start b { color: var(--ink); font-weight: 600; }
@keyframes door-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.motion .door-panel.swap .door-q { animation: door-in .45s cubic-bezier(.2, .8, .2, 1) both; }
.motion .door-panel.swap .door-get li { animation: door-in .45s cubic-bezier(.2, .8, .2, 1) calc(var(--i) * 90ms + 120ms) both; }
.motion .door-panel.swap .door-start, .motion .door-panel.swap .btn-row { animation: door-in .45s cubic-bezier(.2, .8, .2, 1) .42s both; }
.door-fee { margin: 20px 0 0; color: var(--slate); max-width: 70ch; }
.monthly { margin-top: 36px; display: grid; gap: 16px; align-items: start; }
.monthly-q { margin: 0; font-size: 21px; font-weight: 600; line-height: 1.3; }
.monthly-card { border-top: 2px solid var(--ink); padding-top: 12px; }
.monthly-card h3 { font-size: 19px; }
.monthly-card p { margin: 4px 0 0; color: var(--slate); }

/* ---------- Try it ---------- */
.try { background: var(--mist); }
.try .check { box-shadow: 0 24px 48px -32px rgba(20, 33, 61, .45); }
.check-send { margin-top: 20px; }

/* ---------- Flip cards ---------- */
.flips { margin-top: 32px; display: grid; gap: 20px; perspective: 1400px; }
.flip { display: grid; min-height: 280px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer;
  transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3, .9, .3, 1); border-radius: var(--radius-panel); }
.flip-face { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: var(--radius-panel);
  backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-front { background: var(--white); border: 1px solid var(--rule); transition: border-color .25s, box-shadow .25s; }
.flip:hover .flip-front { border-color: var(--indigo); box-shadow: 0 18px 36px -24px rgba(67, 56, 202, .6); }
.flip-back { background: var(--indigo); color: var(--white); transform: rotateY(180deg); }
.flip[aria-pressed="true"] { transform: rotateY(180deg); }
html[dir="rtl"] .flip[aria-pressed="true"] { transform: rotateY(-180deg); }
html[dir="rtl"] .flip-back { transform: rotateY(-180deg); }
.flip-name { display: grid; font-size: 15px; color: var(--slate); }
.flip-name b { font-size: 17px; font-weight: 600; color: var(--ink); }
.flip-q { font-size: clamp(22px, 2.3vw, 27px); font-weight: 600; line-height: 1.25; }
html[lang="ar"] .flip-q { line-height: 1.5; }
.flip-svc { font-size: 15px; font-weight: 600; }
.flip-a { font-size: 19px; line-height: 1.45; }
.flip-back .fiction { color: #E0E3F8; }
.flip-cue { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--indigo); }
.flip-back .flip-cue { color: var(--white); }
.flip-cue::before { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 2px solid currentColor;
  background: radial-gradient(circle, currentColor 0 4px, transparent 5px); }
.flip:focus-visible { outline-offset: 4px; }
html:not(.motion) .flip { transition: none; }

/* ---------- How it works: rail ---------- */
.rail { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 10px; }
.rail-step { border: 1px solid var(--rule); border-radius: var(--radius-control); background: var(--white); transition: border-color .3s, box-shadow .3s; }
.rail-head { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 10px 16px; cursor: pointer; text-align: start;
  background: transparent; border: 0; color: var(--ink); font: inherit; font-size: 19px; font-weight: 600; line-height: 1.3; }
.rail-num { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink); font-size: 16px; font-variant-numeric: tabular-nums;
  transition: background-color .3s, color .3s, border-color .3s, transform .35s cubic-bezier(.3, 1.5, .5, 1); }
.rail-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .45s cubic-bezier(.2, .8, .2, 1); }
.rail-body p { margin: 0; overflow: hidden; padding-inline: 66px 16px; color: var(--slate); }
.rail-body p::after { content: ""; display: block; height: 16px; }
.rail.live .rail-step:not(.on) .rail-body { grid-template-rows: 0fr; }
.rail.live .rail-step.on { border-color: var(--indigo); box-shadow: 0 16px 32px -26px rgba(67, 56, 202, .7); }
.rail.live .rail-step.on .rail-num { background: var(--indigo); border-color: var(--indigo); color: var(--white); transform: scale(1.08); }
html:not(.motion) .rail-body { transition: none; }

/* ---------- About and contact ---------- */
.meet .wrap { display: grid; gap: 40px; align-items: start; }
.meet-about { background: var(--ink); color: var(--white); border-radius: var(--radius-panel); padding: clamp(22px, 3vw, 36px); }
.meet-about h2 { color: var(--white); font-size: clamp(24px, 2.6vw, 30px); }
.meet-about p { margin: 14px 0 0; color: #E6E9F2; }
.meet-about .dont { color: #D3D8E6; font-size: 15px; }
.meet-form .contact-grid { grid-template-columns: 1fr; }

/* ---------- Reveals on the new blocks ---------- */
.motion.js-ready .door-box, .motion.js-ready .flip, .motion.js-ready .rail { opacity: 0; translate: 0 26px; transition: opacity .7s, translate .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.3, .9, .3, 1); transition-delay: calc(var(--i, 0) * 110ms); }
.motion.js-ready .door-box.in, .motion.js-ready .flip.in, .motion.js-ready .rail.in { opacity: 1; translate: none; }
.motion.js-ready .flip.in { transition-delay: 0s; }

/* ---------- Load sequence ---------- */
.motion .stage h1 .h1-a { animation: w-rise .7s cubic-bezier(.2, .7, .2, 1) .05s both; }
.motion .stage h1 .h1-b { animation: w-focus 1.3s cubic-bezier(.2, .7, .2, 1) .35s both; }
.motion .stage .sub { animation: w-rise .7s cubic-bezier(.2, .7, .2, 1) .7s both; }
.motion .stage .btn-row { animation: w-rise .7s cubic-bezier(.2, .7, .2, 1) .85s both; }
.motion .clarity { animation: w-rise .8s cubic-bezier(.2, .7, .2, 1) .5s both; }
.motion .try .check { animation: none; }

/* ---------- Wider screens ---------- */
@media (min-width: 700px) {
  .door-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .door-tabs button { border-bottom: 0; border-inline-end: 1px solid var(--rule); min-height: 76px; }
  .door-tabs button:last-child { border-inline-end: 0; }
  .door-panel { grid-template-columns: 1fr 1.25fr; }
  .monthly { grid-template-columns: 1fr 1fr 1fr; gap: 28px; }
  .flips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flip { min-height: 340px; }
}
@media (min-width: 980px) {
  .stage .wrap { grid-template-columns: 1fr 1.05fr; }
  .meet .wrap { grid-template-columns: 1fr 1.5fr; }
  .meet-about { position: sticky; top: 96px; }
  .rail { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: start; position: relative; }
  .rail-head { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; font-size: 18px; min-height: 124px; }
  .rail-body p { padding-inline: 16px; }
}
@media (max-width: 420px) {
  .cl-tile { padding: 12px; }
  .cl-switch { font-size: 14px; }
}
.flip-face .fiction { align-self: flex-start; }
html[dir="rtl"] .clarity { --flip: -1; }
.cl-val { font-size: clamp(19px, 5vw, 30px); }
html[lang="ar"] .cl-val { font-size: clamp(16px, 4.3vw, 27px); }
.door-start { margin-bottom: 8px; }
.door-tool { margin: 0 0 20px; font-size: 15px; }
.door-tool a { color: var(--indigo); font-weight: 500; }
