/* ============================================================
   CVS responsive refactor — layered ON TOP of styles.css.
   Goal: every section fills the viewport (min-height:100vh),
   content vertically centered and ALWAYS fits (fluid type),
   never clipped (min-height, so it can grow on small screens).
   styles.css / app.js stay untouched; !important beats the
   JS-set inline hero font-size.
   ============================================================ */
/* Arabic webfont — only fetched when [lang="ar"] uses the family (RTL block below). */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

html { scroll-padding-top: var(--header-h, 64px); }
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video, table { max-width: 100%; }
*, *::before, *::after { box-sizing: border-box; }

/* ---- tame the JS-forced hero headline ---- */
h1.display {
  font-size: clamp(30px, 4.4vw, 58px) !important;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 18ch;
  text-wrap: balance;
}

/* ---- full-height, vertically-centered sections ---- */
.hero,
section.block,
.final {
  min-height: 100vh;
  min-height: 100svh;            /* mobile dynamic viewport */
  display: grid;
  align-content: center;
  box-sizing: border-box;
}
.hero {
  padding: max(var(--header-h, 64px), 92px) 0 clamp(40px, 6vh, 80px);
}
section.block,
.final {
  padding-block: clamp(56px, 7vh, 96px);
}
.hero > .container,
section.block > .container,
.final > .container { width: 100%; }

/* ---- fluid headings / copy so blocks fit one screen ---- */
.section-head h2 { font-size: clamp(23px, 3vw, 40px); line-height: 1.12; }
.section-head p,
.hero-copy .lede { font-size: clamp(15px, 1.5vw, 18px); line-height: 1.6; }

/* ---- hero visual: animation foreground + big faded giraffe backdrop ---- */
.hero-visual { min-height: clamp(360px, 62vh, 760px); }
/* old floating answer shards removed in favour of the SVG animation */
.hero-visual .shard { display: none !important; }
/* giraffe: bigger + more transparent, sits behind the animation */
.giraffe {
  z-index: 1 !important;
  width: min(150%, 820px) !important;
  max-height: none !important;
  opacity: 0.16 !important;
  filter: drop-shadow(0 0 50px rgba(10,186,181,0.25)) !important;
}
.giraffe-glow { width: 760px; height: 760px; opacity: 0.7; }
/* self-animating document→chat SVG — bare, no backing panel.
   Sized to the viewport (vw), brightened via filter (the SVG's internal
   panels are low-opacity; brightness/contrast lift them without a block). */
.hero-anim {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 3; height: auto; display: block; opacity: 1;
  width: min(100%, 56vw);           /* scales with screen, not fixed px */
  max-height: 84vh;
  filter: brightness(1.15) saturate(1.15);
}
@media (max-width: 980px)  { .hero-anim { width: min(100%, 80vw); } }
@media (max-width: 980px)  { .hero-anim { width: 100%; } .giraffe { opacity: 0.12 !important; } }

/* keep the trust-metric strip compact under the hero */
.hero .trust { margin-top: clamp(20px, 3vh, 40px); }

/* infographic frames shouldn't blow past the fold */
.ig-frame .cvs-figure__img { max-height: 70vh; width: 100%; object-fit: contain; }

/* ---- short viewports: relax to natural height, don't cram ---- */
@media (max-height: 720px) {
  .hero, section.block, .final { min-height: auto; }
  .hero { min-height: 100svh; padding-top: max(var(--header-h, 64px), 84px); }
  section.block, .final { padding-block: clamp(48px, 8vh, 72px); }
}

/* ---- mobile: content-first, natural height (never clipped) ---- */
@media (max-width: 980px) {
  section.block, .final { min-height: auto; }
  .hero { min-height: auto; padding-top: max(var(--header-h, 64px), 80px); }
  h1.display { font-size: clamp(28px, 8.5vw, 40px) !important; max-width: 100%; }
  .section-head h2 { font-size: clamp(22px, 6.5vw, 30px); }
  /* stack hero, visual first */
  .hero-grid, .loop-wrap, .evidence, .case-grid, .sub-sec { grid-template-columns: 1fr !important; }
  .nav-links { display: none; }            /* avoid the jammed nav on small screens */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* hide empty footer links (template has more slots than some locales fill) */
footer ul a:empty { display: none; }
footer ul li:has(> a:empty) { display: none; }

/* ============================================================
   Pricing — deployment-first (Cloud / Self-Hosted / Air-Gapped).
   Model-coded accents so the SaaS-vs-license split reads instantly.
   ============================================================ */
.dep-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px); align-items: stretch; margin-top: clamp(24px, 4vh, 40px);
}
.dep-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-panel, #0d0f13);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px; padding: 26px 22px 22px; overflow: hidden;
}
.dep-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent, #0abab5); }
.dep-cloud { --accent: #0abab5; }
.dep-self  { --accent: #f5b94a; }
.dep-air   { --accent: #8b7cf6; }
.dep-self  { border-color: rgba(245, 185, 74, 0.3); }

.dep-badge {
  display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 600;
  letter-spacing: .02em; padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.dep-name { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; font-size: 21px; font-weight: 700; color: #fff; }
.dep-name svg { width: 20px; height: 20px; color: var(--accent); }

.dep-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dep-price-main { font-size: clamp(19px, 2vw, 23px); font-weight: 700; color: #fff; line-height: 1.2; }
.dep-price-cap { font-size: 12px; color: rgba(255, 255, 255, 0.45); }
.dep-price-sub { margin-top: 4px; font-size: 13.5px; color: rgba(255, 255, 255, 0.6); }

.dep-llm {
  display: flex; gap: 8px; align-items: flex-start; margin: 14px 0;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 13px; color: rgba(255, 255, 255, 0.78); line-height: 1.45;
}
.dep-llm svg { width: 15px; height: 15px; color: var(--accent); flex: none; margin-top: 1px; }

.dep-feats { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 9px; }
.dep-feats li { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; color: rgba(255, 255, 255, 0.85); line-height: 1.4; }
.dep-feats svg { width: 15px; height: 15px; color: var(--accent); flex: none; margin-top: 2px; }

.dep-who { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: rgba(255, 255, 255, 0.5); margin-bottom: 18px; }
.dep-who svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.dep-card .btn { margin-top: auto; width: 100%; justify-content: center; }

/* agent add-ons strip */
.addons {
  margin-top: clamp(20px, 3vh, 32px); padding: 20px 22px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.025); border: 1px dashed rgba(255, 255, 255, 0.16);
}
.addons-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.addons-head svg { width: 22px; height: 22px; color: var(--tiffany, #0abab5); flex: none; }
.addons-head b { display: block; color: #fff; font-size: 16px; }
.addons-head span { display: block; font-size: 13px; color: rgba(255, 255, 255, 0.5); }
.addons-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.addon-chip { padding: 12px 14px; border-radius: 11px; background: var(--bg-panel, #0d0f13); border: 1px solid rgba(255, 255, 255, 0.1); }
.addon-chip b { display: block; color: var(--tiffany, #0abab5); font-size: 14px; margin-bottom: 3px; }
.addon-chip span { font-size: 12.5px; color: rgba(255, 255, 255, 0.6); line-height: 1.4; }

/* pricing cards MUST be one column on mobile — was collapsing only ≤920px,
   so a ~980px (desktop-mode) render still showed 3 cramped columns. */
@media (max-width: 980px) {
  .dep-grid { grid-template-columns: 1fr !important; }
  .addons-grid { grid-template-columns: repeat(2, 1fr); }
  #pricing.block { min-height: auto; }
  /* readable single-column cards */
  .dep-card { padding: 24px 22px; }
  .dep-name { font-size: 22px; }
  .dep-feats li { font-size: 15px; }
}
@media (max-width: 560px) { .addons-grid { grid-template-columns: 1fr; } }
/* pricing has a lot of content — let it breathe rather than cram into 100vh */
#pricing.block { min-height: auto; padding-block: clamp(56px, 7vh, 96px); }

/* ============================================================
   Document-style pages (body.doc): pricing overview + per-plan pages.
   These are dense content pages — DON'T apply the home page's full-height
   (100vh) section treatment, or small blocks scatter across empty screens.
   ============================================================ */
body.doc .hero,
body.doc section.block,
body.doc header.block,
body.doc .final { min-height: auto !important; }
body.doc section.block { display: block; align-content: initial; padding-block: clamp(40px, 5.5vh, 68px); }
body.doc .subhero { padding: clamp(24px, 4vw, 44px) 0 clamp(8px, 2vh, 20px); }
body.doc .final { display: grid; align-content: center; padding-block: clamp(48px, 7vh, 84px); }
body.doc .section-head { margin-bottom: clamp(18px, 3vh, 28px); }
.pricing-link { color: var(--tiffany, #0abab5); text-decoration: none; font-weight: 600; font-size: 15px; }
.pricing-link:hover { text-decoration: underline; }

/* ---- dedicated /pricing/ page: comparison table ---- */
.cmp-wrap { margin-top: clamp(20px, 3vh, 32px); overflow-x: auto; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.1); }
.cmp-table { width: 100%; border-collapse: collapse; min-width: 620px; background: var(--bg-panel, #0d0f13); }
.cmp-table th, .cmp-table td { padding: 13px 16px; text-align: center; font-size: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.cmp-table thead th { color: #fff; font-size: 15px; font-weight: 700; background: rgba(255, 255, 255, 0.03); }
.cmp-table tbody th { text-align: left; color: rgba(255, 255, 255, 0.72); font-weight: 500; }
.cmp-table td { color: rgba(255, 255, 255, 0.88); }
.cmp-table td b { color: #fff; font-size: 16px; }
.cmp-table tr:last-child th, .cmp-table tr:last-child td { border-bottom: 0; }
.cmp-feat { background: color-mix(in srgb, var(--tiffany, #0abab5) 8%, transparent); }
.cmp-table thead .cmp-feat { background: color-mix(in srgb, var(--tiffany, #0abab5) 16%, transparent); color: var(--tiffany, #0abab5); }
.cmp-y { width: 17px; height: 17px; color: var(--tiffany, #0abab5); }
.cmp-n { color: rgba(255, 255, 255, 0.28); }

/* ---- dedicated /pricing/ page: FAQ accordion ---- */
.pfaq { margin-top: clamp(20px, 3vh, 28px); display: grid; gap: 10px; max-width: 820px; }
.pfaq-item { background: var(--bg-panel, #0d0f13); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; overflow: hidden; }
.pfaq-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 15px 18px; font-size: 15.5px; font-weight: 600; color: #fff;
}
.pfaq-item summary::-webkit-details-marker { display: none; }
.pfaq-item summary svg { width: 18px; height: 18px; color: var(--tiffany, #0abab5); transition: transform 0.2s; flex: none; }
.pfaq-item[open] summary svg { transform: rotate(180deg); }
.pfaq-a { padding: 0 18px 16px; font-size: 14.5px; line-height: 1.6; color: rgba(255, 255, 255, 0.68); }

/* ---- card "details" link + per-plan detail pages ---- */
.dep-cta { margin-top: auto; display: grid; gap: 8px; justify-items: center; }
.dep-cta .btn { width: 100%; justify-content: center; }
.dep-details { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--accent, #0abab5); text-decoration: none; }
.dep-details:hover { text-decoration: underline; }
.dep-details svg { width: 14px; height: 14px; }

.plan-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; margin-top: 8px; }
.plan-hero-price {
  background: var(--bg-panel, #0d0f13); border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 3px solid var(--accent, #0abab5); border-radius: 16px; padding: 24px 22px;
  display: flex; flex-direction: column; align-items: flex-start;
}
.php-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255, 255, 255, 0.45); }
.php-main { font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; color: #fff; margin-top: 6px; line-height: 1.2; }
.php-sub { font-size: 14px; color: rgba(255, 255, 255, 0.62); margin-top: 4px; }

.plan-feats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 26px; max-width: 920px; }
.plan-feats li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: rgba(255, 255, 255, 0.85); line-height: 1.45; }
.plan-feats svg { width: 17px; height: 17px; color: var(--tiffany, #0abab5); flex: none; margin-top: 2px; }

.lic-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2vw, 22px); max-width: 720px; margin-top: clamp(16px, 2vh, 24px); }
.lic-grid.one { grid-template-columns: 1fr; max-width: 380px; }
.lic-card { background: var(--bg-panel, #0d0f13); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 14px; padding: 20px; }
.lic-name { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--tiffany, #0abab5); font-weight: 700; }
.lic-price { font-size: clamp(18px, 2vw, 22px); font-weight: 700; color: #fff; margin-top: 8px; }
.lic-price span { font-size: 12px; font-weight: 400; color: rgba(255, 255, 255, 0.45); }
.lic-sub { font-size: 14px; color: rgba(255, 255, 255, 0.66); margin-top: 4px; }
.lic-meta { font-size: 12.5px; color: rgba(255, 255, 255, 0.45); margin-top: 10px; }

.cross-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(14px, 1.6vw, 20px); max-width: 660px; margin: 0 auto; }
.cross-card {
  display: flex; flex-direction: column; gap: 7px; padding: 20px 22px; border-radius: 14px;
  background: var(--bg-panel, #0d0f13); border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--accent, #0abab5); text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.cross-card:hover { border-color: var(--accent, #0abab5); transform: translateY(-2px); box-shadow: 0 14px 32px -18px rgba(0, 0, 0, 0.7); }
.cross-card-top { display: flex; justify-content: space-between; align-items: center; }
.cross-name { color: #fff; font-weight: 700; font-size: 17px; }
.cross-card-top svg { width: 18px; height: 18px; color: var(--accent, #0abab5); }
.cross-price { color: #fff; font-size: 15px; font-weight: 600; }
.cross-tag { color: rgba(255, 255, 255, 0.5); font-size: 13px; }
@media (max-width: 560px) { .cross-grid { grid-template-columns: 1fr; } }

@media (max-width: 980px) {
  .plan-hero { grid-template-columns: 1fr; }
  .plan-feats { grid-template-columns: 1fr; }
  .lic-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PHASE 0 — fixed-nav clearance for sub / pricing / plan headers.
   The nav is position:fixed (--header-h); the document-page headers
   only had their own top padding → breadcrumbs slid UNDER the bar.
   ============================================================ */
.subhero,
body.doc .subhero {
  padding-top: calc(var(--header-h, 56px) + clamp(18px, 3.5vw, 40px)) !important;
}
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ============================================================
   PHASE 1 — mobile navigation: neon burger + fullscreen menu
   ============================================================ */
.nav-burger { display: none; }
.nav-overlay { display: none; }

@media (max-width: 980px) {
  /* roomier header bar — sized in vw so it's the SAME physical height whether
     the browser renders true-mobile width OR desktop-mode (~980px) zoom. */
  :root { --header-h: clamp(72px, 21vw, 210px); }
  .nav { height: var(--header-h) !important; }
  .brand img { height: clamp(40px, 11.8vw, 118px) !important; }  /* was 22px — barely visible */

  /* collapse the desktop nav down to brand + burger */
  .nav-links { display: none !important; }
  .nav .nav-actions .btn,
  .nav .nav-actions .lang,
  .nav .nav-actions .region-switch,
  .nav .nav-actions .lang-switch { display: none !important; }
  .nav .nav-actions { margin-left: auto; gap: 0; }
  .brand .sub { display: none; }

  .nav-burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: clamp(52px, 15.8vw, 158px); height: clamp(52px, 15.8vw, 158px); flex: none; margin-left: 8px;
    background: rgba(10, 186, 181, 0.1);
    border: 1.5px solid var(--tiffany-45, rgba(10, 186, 181, 0.45));
    border-radius: clamp(13px, 3.8vw, 38px); cursor: pointer; -webkit-tap-highlight-color: transparent;
    box-shadow: 0 0 16px -4px rgba(10, 186, 181, 0.5);
    transition: box-shadow .28s var(--ease, ease), background .28s, border-color .28s;
  }
  /* burger lines: bigger & thicker (fill the button), in vw */
  .nav-burger-box { width: clamp(32px, 10.6vw, 106px); height: clamp(22px, 7vw, 70px); }
  .nav-burger-bar { height: clamp(4px, 1.3vw, 13px); }
  .nav-burger-bar:nth-child(2) { top: 44%; }
  .nav-burger-bar:nth-child(3) { top: 88%; }
  .nav-open .nav-burger-bar:nth-child(1) { top: 44%; }
  .nav-open .nav-burger-bar:nth-child(3) { top: 44%; }
  .nav-burger:hover, .nav-burger:focus-visible {
    background: rgba(10, 186, 181, 0.18);
    border-color: var(--tiffany, #0abab5);
    box-shadow: 0 0 26px -2px rgba(10, 186, 181, 0.7);
    outline: none;
  }
}

.nav-burger-box { position: relative; width: 32px; height: 23px; }
.nav-burger-bar {
  position: absolute; left: 0; width: 100%; height: 3.5px; border-radius: 3px;
  background: var(--tiffany, #0abab5);
  box-shadow: 0 0 10px rgba(10, 186, 181, 0.85);
  transition: transform .38s cubic-bezier(.2, .9, .2, 1.25), top .38s cubic-bezier(.2, .9, .2, 1.25), opacity .2s, width .3s;
}
.nav-burger-bar:nth-child(1) { top: 0; }
.nav-burger-bar:nth-child(2) { top: 10px; }
.nav-burger-bar:nth-child(3) { top: 20px; }
.nav-open .nav-burger-bar:nth-child(1) { top: 10px; transform: rotate(45deg); }
.nav-open .nav-burger-bar:nth-child(2) { opacity: 0; transform: scaleX(.15); }
.nav-open .nav-burger-bar:nth-child(3) { top: 10px; transform: rotate(-45deg); }
.nav-open .nav-burger {
  background: rgba(10, 186, 181, 0.2);
  border-color: var(--tiffany, #0abab5);
  box-shadow: 0 0 30px -2px rgba(10, 186, 181, 0.8);
}

/* fullscreen overlay */
.nav-overlay {
  position: fixed; inset: 0; z-index: 64;
  display: flex; flex-direction: column; justify-content: center;
  padding: max(var(--header-h, 56px), 72px) clamp(22px, 7vw, 48px) 44px;
  background:
    radial-gradient(120% 80% at 85% -10%, rgba(10, 186, 181, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(9, 9, 11, 0.97), rgba(8, 12, 13, 0.99));
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  /* drawer: the empty panel slides DOWN from the top first */
  opacity: 0; visibility: hidden; transform: translateY(-100%);
  transition: transform .5s cubic-bezier(.22, .9, .3, 1), opacity .3s ease, visibility .5s;
}
.nav-overlay.in { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-overlay[hidden] { display: none; }
@media (min-width: 981px) { .nav-overlay { display: none !important; } }

/* keep the burger (→ X) ABOVE the overlay so it's visible and closes the menu */
.nav-open .nav { z-index: 70; background: transparent !important; border-color: transparent !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

.nav-ov-inner { width: 100%; max-width: 540px; margin: 0 auto; display: flex; flex-direction: column; }
.nav-ov-link {
  display: flex; align-items: center; justify-content: flex-start; gap: clamp(10px, 2.5vw, 20px);
  padding: clamp(11px, 2vh, 17px) 2px clamp(11px, 2vh, 17px) clamp(20px, 5vw, 50px);
  font-size: clamp(25px, 7.2vw, 38px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1;
  color: #fff; text-decoration: none; white-space: nowrap;   /* all on one line, left-aligned */
  border-bottom: none; position: relative;
  overflow: hidden;                              /* clip the cascade-from-top */
  /* neon tube outline */
  -webkit-text-stroke: 1px rgba(10, 186, 181, 0.85);
  text-shadow: 0 0 14px rgba(10, 186, 181, 0.45), 0 0 3px rgba(10, 186, 181, 0.6);
  transition: color .2s, text-shadow .25s, -webkit-text-stroke-color .25s;
}
.nav-ov-link span { display: inline-block; }
/* rounded left "bortik" like an active menu item — no outline, just the pill bar */
.nav-ov-link::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: clamp(4px, 1.2vw, 12px); height: 56%;
  border-radius: 999px; background: var(--tiffany, #0abab5);
  box-shadow: 0 0 12px rgba(10, 186, 181, 0.55);
}
.nav-ov-link i, .nav-ov-link svg { display: none !important; }   /* keep one clean line */     /* so yPercent slide works */
.nav-ov-link:hover, .nav-ov-link:focus-visible {
  -webkit-text-stroke-color: var(--tiffany, #0abab5);
  text-shadow: 0 0 24px rgba(10, 186, 181, 0.85), 0 0 4px rgba(10, 186, 181, 0.8);
}
.nav-ov-link i, .nav-ov-link svg { width: 18px; height: 18px; color: var(--tiffany, #0abab5); opacity: 0; transform: translateX(-10px); transition: .25s; }
.nav-ov-link:hover, .nav-ov-link:focus-visible { color: var(--tiffany, #0abab5); outline: none; }
.nav-ov-link:hover::before, .nav-ov-link:focus-visible::before { height: 70%; box-shadow: 0 0 18px rgba(10, 186, 181, 0.8); }
.nav-ov-actions { display: grid; gap: 12px; margin-top: clamp(22px, 4vh, 34px); }
.nav-ov-actions .btn { width: 100%; justify-content: center; height: 56px; font-size: 16px; }
.nav-ov-foot { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: clamp(20px, 3.5vh, 30px); flex-wrap: wrap; }
.nav-ov-foot .lang { transform: scale(1.05); }
.nav-ov-foot .region-switch > summary { height: 44px; }

/* ============================================================
   PHASE 4 — mobile layout & legibility
   ============================================================ */
@media (max-width: 980px) {
  body { font-size: 16px; }
  .container, .container-wide { padding-inline: 18px; }

  /* ---- type scale (mobile-first legibility) ---- */
  h1.display { font-size: clamp(31px, 9vw, 42px) !important; line-height: 1.08; }
  .section-head h2 { font-size: clamp(25px, 7vw, 32px) !important; line-height: 1.14; }
  .eyebrow { font-size: 12px; }
  .section-head p, .hero-copy .lede, .sub-body p { font-size: 16px !important; line-height: 1.62; }
  .pain p, .cell p, .diff p, .ev-item p, .dcard li span,
  .loop-steps .tx span, .cpanel li { font-size: 15.5px !important; line-height: 1.6; }
  .pain h3, .diff h3, .cell h3, .ev-item h4 { font-size: 17px !important; }
  .loop-steps .tx b { font-size: 16px; }

  /* ---- everything dense → single column with real breathing room ---- */
  .impact, .cards-2, .diffs, .deploy, .ev-list, .badges,
  .features-grid, .agents-grid, .case-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  .contrast { grid-template-columns: 1fr !important; gap: 14px; }
  .contrast .vs { writing-mode: horizontal-tb !important; justify-self: center; align-self: center; margin: 2px 0; }
  .evidence { grid-template-columns: 1fr !important; gap: 22px; }
  .answer-mock { width: 100%; }
  /* cards get more inner padding so text isn't cramped */
  .pain, .diff, .cell, .dcard, .ev-item, .cpanel { padding: 20px !important; }

  /* ---- trust metrics: 2×2, not 4-in-a-row (was unreadably tiny) ---- */
  .metrics { grid-template-columns: 1fr 1fr !important; gap: 22px 16px !important; }
  .metric .v { font-size: clamp(30px, 9vw, 40px) !important; }
  .metric .l { font-size: 13px !important; }

  /* ---- compliance badges: readable chips ---- */
  .badges { display: flex !important; flex-wrap: wrap; gap: 9px; }
  .badge { font-size: 13.5px !important; padding: 9px 13px !important; }

  /* ---- logo strip wraps cleanly ---- */
  .logos { gap: 14px 18px !important; }
  .logos span { font-size: 14px !important; }

  /* ---- generous section rhythm ---- */
  section.block, .final { padding-block: clamp(48px, 9vh, 72px) !important; }
}

/* ============================================================
   HERO (mobile) — the meta line was 12px @ 30% opacity (invisible).
   Promote to readable accent chips; make CTAs full-width tap targets.
   ============================================================ */
.hero-meta svg { width: 14px; height: 14px; }
.hero-meta { color: var(--fg-3); }

@media (max-width: 980px) {
  .hero { padding-top: max(var(--header-h, 66px), 88px) !important; }
  .hero-copy .lede { margin-top: 18px; }
  .hero-actions { margin-top: 26px; gap: 12px; }
  .hero-actions .btn { width: 100%; justify-content: center; height: 56px; font-size: 16px; }

  /* the three guarantees — were 12px @ 30% opacity (invisible). Now a clear
     stacked list of full-width rows. `> span` targets ONLY the outer wrapper
     (the inner text <span> must not get its own box). */
  .hero-meta { flex-direction: column !important; align-items: stretch !important; gap: 10px !important; margin-top: 24px !important; }
  .hero-meta > span {
    display: flex !important; align-items: center; gap: 11px;
    font-size: 15px !important; color: #fff !important; font-weight: 500;
    padding: 13px 15px; border-radius: 12px;
    background: rgba(10, 186, 181, 0.09);
    border: 1px solid var(--tiffany-30, rgba(10, 186, 181, 0.35));
  }
  .hero-meta > span svg { width: 19px !important; height: 19px !important; color: var(--tiffany, #0abab5) !important; flex: none; }

  /* keep the hero visual from eating the fold on phones */
  .hero-visual { min-height: clamp(300px, 52vh, 460px) !important; }
}

/* ---- THE MISSING LOOP: near full-width wheel on mobile ---- */
@media (max-width: 980px) {
  /* tighter vertical rhythm around the wheel */
  #loop { padding-block: clamp(26px, 6vw, 56px) !important; }
  #loop .loop-wrap { gap: clamp(10px, 3vw, 22px); }
  /* break the wheel OUT of the container padding → true full width.
     (styles.css capped .loop-stage at max-width:460px — killed here.) */
  #loop .loop-stage {
    max-width: none !important; width: 100vw !important; aspect-ratio: auto !important;
    margin-left: calc(50% - 50vw) !important; margin-right: calc(50% - 50vw) !important;
    display: flex; justify-content: center; overflow: visible;
  }
  #loop #loopSvg, #loop .loop-stage svg {
    width: 100vw !important; max-width: 100vw !important; height: auto !important;
  }
  /* compact, scannable steps under the wheel */
  #loop .loop-steps li { padding: 9px 0; }
  #loop .loop-steps li .tx span { font-size: 14.5px; }
}
@media (max-width: 980px) {
  /* wheel first, then the steps read like a checklist beneath it */
  #loop .loop-wrap { display: flex; flex-direction: column; }
  #loop .loop-stage { order: -1; }
}

/* ---- "Подробнее →" deep-dive links on home sections ---- */
.more-link {
  display: inline-flex; align-items: center; gap: 7px; margin-top: clamp(18px, 2.6vh, 28px);
  padding: 11px 18px; border-radius: 999px;
  background: rgba(10, 186, 181, 0.07); border: 1px solid var(--tiffany-30, rgba(10, 186, 181, 0.3));
  color: var(--tiffany, #0abab5); font-weight: 600; font-size: 14.5px; text-decoration: none;
  transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.more-link:hover { background: rgba(10, 186, 181, 0.14); border-color: var(--tiffany, #0abab5); transform: translateX(3px); box-shadow: 0 0 22px -6px rgba(10, 186, 181, 0.6); }
.more-link i, .more-link svg { width: 16px; height: 16px; transition: transform .2s; }
.more-link:hover i, .more-link:hover svg { transform: translateX(3px); }
.more-wrap { display: flex; justify-content: center; }

/* agent-ecosystem block (sits AFTER the pinned loop) — fit content, never a
   100vh void on regions whose extras PNG isn't generated yet */
#agents-eco.block { min-height: auto !important; padding-block: clamp(40px, 6vh, 80px); display: block; align-content: initial; }
#agents-eco .more-wrap { margin-top: clamp(18px, 2.6vh, 28px); }

/* extra home infographic figure (cost-of-ignorance / before-after) */
.home-fig { margin-top: clamp(22px, 3.4vh, 36px); }
.home-fig img { width: 100%; height: auto; display: block; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.08); }

/* ---- GSAP pin safety: don't let pinned section overflow be clipped ---- */
#loop { overflow: visible; }

/* ============================================================
   MOBILE TYPOGRAPHY OVERHAUL (≤980px)
   Everything sized in vw → readable at the SAME physical size whether
   the browser renders at true device width OR in desktop-mode (~980px).
   High max-caps so desktop-mode (wide viewport) is NOT shrunk; min keeps
   tiny phones sane. This wins over earlier px sizing (later + !important).
   ============================================================ */
@media (max-width: 980px) {
  /* master lever — scales every rem-based size in styles.css */
  html { font-size: clamp(16px, 4.5vw, 45px); }

  /* headings */
  h1.display { font-size: clamp(32px, 9.2vw, 92px) !important; line-height: 1.07; letter-spacing: -0.02em; }
  .section-head h2, h2 { font-size: clamp(26px, 7.2vw, 72px) !important; line-height: 1.12; }
  h3 { font-size: clamp(18px, 5.2vw, 52px) !important; }
  .eyebrow, .trust .kicker, .logo-strip .kicker { font-size: clamp(12px, 3.4vw, 34px) !important; letter-spacing: .06em; }

  /* body / lede / paragraphs */
  body, p, li, span, a, .lede { line-height: 1.6; }
  .section-head p, .hero-copy .lede, .loop-copy .lede, .sub-body p { font-size: clamp(17px, 4.8vw, 48px) !important; }

  /* cards (problem / impact / solution / evidence / contrast) */
  .pain h3, .diff h3, .cell h3, .ev-item h4, .cpanel h3 { font-size: clamp(18px, 5.2vw, 52px) !important; }
  .pain p, .diff p, .cell p, .ev-item p, .cpanel li, .loop-steps .tx span { font-size: clamp(16px, 4.6vw, 46px) !important; }
  .loop-steps .tx b { font-size: clamp(17px, 4.9vw, 49px) !important; }
  .pain, .diff, .cell, .dcard, .ev-item, .cpanel { padding: clamp(20px, 5.5vw, 55px) !important; }

  /* pricing cards */
  .dep-card { padding: clamp(22px, 6vw, 60px) !important; }
  .dep-badge { font-size: clamp(13px, 3.6vw, 36px) !important; padding: clamp(5px,1.4vw,14px) clamp(11px,3vw,30px) !important; }
  .dep-name { font-size: clamp(21px, 5.8vw, 58px) !important; }
  .dep-name svg { width: clamp(20px,5.4vw,54px) !important; height: clamp(20px,5.4vw,54px) !important; }
  .dep-price-main { font-size: clamp(22px, 6vw, 60px) !important; }
  .dep-price-sub, .dep-price-cap { font-size: clamp(14px, 4vw, 40px) !important; }
  .dep-llm, .dep-feats li, .dep-who { font-size: clamp(15px, 4.4vw, 44px) !important; line-height: 1.5; }
  .dep-feats svg, .dep-llm svg, .dep-who svg { width: clamp(16px,4.4vw,44px) !important; height: clamp(16px,4.4vw,44px) !important; }
  .addons-head b { font-size: clamp(17px, 4.8vw, 48px) !important; }
  .addons-head span { font-size: clamp(14px, 3.9vw, 39px) !important; }
  .addon-chip b { font-size: clamp(15px, 4.3vw, 43px) !important; }
  .addon-chip span { font-size: clamp(13px, 3.7vw, 37px) !important; }

  /* metrics */
  .metric .v { font-size: clamp(36px, 11vw, 110px) !important; }
  .metric .l { font-size: clamp(14px, 4vw, 40px) !important; }
  .logos span { font-size: clamp(15px, 4.2vw, 42px) !important; }

  /* badges */
  .badge { font-size: clamp(14px, 4vw, 40px) !important; padding: clamp(9px,2.4vw,24px) clamp(13px,3.4vw,34px) !important; }
  .badge svg { width: clamp(16px,4.2vw,42px) !important; height: clamp(16px,4.2vw,42px) !important; }

  /* hero meta chips */
  .hero-meta > span { font-size: clamp(16px, 4.7vw, 47px) !important; padding: clamp(12px,3.4vw,34px) clamp(14px,3.8vw,38px) !important; }
  .hero-meta > span svg { width: clamp(18px,5vw,50px) !important; height: clamp(18px,5vw,50px) !important; }

  /* buttons — scale font AND height so text never clips */
  .btn, .btn-wow, .btn-cancel, .btn-default, .btn-help, .more-link, .pricing-link {
    font-size: clamp(16px, 4.5vw, 45px) !important;
    min-height: clamp(52px, 14vw, 140px) !important;
    height: auto !important;
    padding-top: clamp(12px,3.4vw,34px) !important; padding-bottom: clamp(12px,3.4vw,34px) !important;
  }
  .more-link svg, .more-link i, .btn svg, .btn i { width: clamp(16px,4.4vw,44px) !important; height: clamp(16px,4.4vw,44px) !important; }

  /* mobile menu overlay links bigger */
  .nav-ov-link { font-size: clamp(20px, 6.2vw, 56px) !important; }
  .nav-ov-actions .btn { min-height: clamp(56px,15vw,150px) !important; }

  /* steps numerals */
  .loop-steps .n { width: clamp(28px,7vw,70px) !important; height: clamp(28px,7vw,70px) !important; font-size: clamp(13px,3.6vw,36px) !important; }
}

/* ============================================================
   MOBILE HERO REORDER + SIZE TUNING (≤980px) — appended last (wins)
   Order: eyebrow → H1 → lede → buttons → animation → guarantees.
   (styles.css forced .hero-visual{order:-1}, pushing the heading below
    the giraffe.) display:contents lets hero-copy's children + the visual
    share one flex order.
   ============================================================ */
@media (max-width: 980px) {
  .hero { padding-top: max(var(--header-h, 66px), 84px) !important; }
  .hero-grid { display: flex !important; flex-direction: column; gap: clamp(18px, 4.5vw, 34px); }
  .hero-copy { display: contents; }
  .hero-copy .eyebrow { order: 1; margin-bottom: clamp(14px, 3.5vw, 22px) !important; }
  .hero-copy h1.display { order: 2; margin: 0 !important; }
  .hero-copy .lede { order: 3; margin-top: 0 !important; }
  .hero-actions { order: 4; margin-top: clamp(8px, 2vw, 16px) !important; }
  .hero-visual { order: 5 !important; min-height: clamp(320px, 72vw, 540px) !important; margin-top: clamp(6px, 2vw, 16px); }
  .hero-meta { order: 6; }

  /* heading: compact, uniform line spacing, sits right at the top */
  h1.display { font-size: clamp(30px, 7.8vw, 56px) !important; line-height: 1.1 !important; letter-spacing: -0.02em; }
  /* subheadline: was way too large */
  .hero-copy .lede { font-size: clamp(15px, 3.9vw, 23px) !important; line-height: 1.5 !important; }

  /* "Подробнее →" on pricing cards was still tiny */
  .dep-details { font-size: clamp(15px, 4.4vw, 24px) !important; padding: clamp(6px,1.6vw,12px) 0 !important; gap: 7px; }
  .dep-details svg { width: clamp(16px, 4.4vw, 22px) !important; height: clamp(16px, 4.4vw, 22px) !important; }
}

/* ============================================================
   MOBILE CARD ICONS (≤980px) — were tiny & top-left. Enlarge and
   centre them; centre the card content for a clean mobile card.
   ============================================================ */
@media (max-width: 980px) {
  /* column cards: problem / impact / solution / deployment */
  .pain, .diff, .impact .cell, .dcard { text-align: center; }
  .pain .ico, .diff .ico, .impact .cell .ico, .dcard .ico {
    width: clamp(58px, 15vw, 150px) !important;
    height: clamp(58px, 15vw, 150px) !important;
    border-radius: clamp(14px, 3.6vw, 36px) !important;
    margin-left: auto !important; margin-right: auto !important;
    margin-bottom: clamp(14px, 3.6vw, 36px) !important;
  }
  .pain .ico svg, .diff .ico svg, .impact .cell .ico svg, .dcard .ico svg {
    width: clamp(28px, 7.4vw, 74px) !important;
    height: clamp(28px, 7.4vw, 74px) !important;
  }
  .diff .stat { justify-content: center; }
  .dcard ul, .dep-feats { text-align: left; }

  /* evidence rows → stacked & centred with a big icon on top */
  .ev-item { flex-direction: column !important; align-items: center !important; text-align: center; gap: clamp(12px,3vw,26px) !important; }
  .ev-item .ico {
    width: clamp(58px, 15vw, 150px) !important;
    height: clamp(58px, 15vw, 150px) !important;
    border-radius: clamp(14px, 3.6vw, 36px) !important;
  }
  .ev-item .ico svg { width: clamp(28px, 7.4vw, 74px) !important; height: clamp(28px, 7.4vw, 74px) !important; }
}

/* ============================================================
   ARABIC (ar-mena) — font + RTL. Scoped to [lang="ar"] / [dir="rtl"]
   so it NEVER touches the other 18 LTR locales. The home <html> now
   carries dir="rtl"; sub/pricing/plan pages already emit dir.
   ============================================================ */
/* swap the base font token → every var(--font-family-base) user gets Arabic */
[lang="ar"] { --font-family-base: 'IBM Plex Sans Arabic', 'Exo 2', system-ui, -apple-system, 'Segoe UI', sans-serif; }
[lang="ar"] body,
[lang="ar"] button, [lang="ar"] input, [lang="ar"] textarea, [lang="ar"] select {
  font-family: 'IBM Plex Sans Arabic', 'Exo 2', system-ui, sans-serif;
}
/* keep code/citation/flow strings monospace + LTR (they hold Latin tokens) */
[lang="ar"] .ig-flow, [lang="ar"] .ig-dims, [lang="ar"] .answer-mock .cite,
[lang="ar"] code, [lang="ar"] .lic-meta { direction: ltr; unicode-bidi: isolate; }

/* numbers, prices, brand tokens stay LTR within RTL text */
[dir="rtl"] .dep-price, [dir="rtl"] .php-main, [dir="rtl"] .lic-price,
[dir="rtl"] .cross-price, [dir="rtl"] .metric .v { direction: ltr; }
[dir="rtl"] .dep-price { justify-content: flex-end; }

/* sub-page bullet list: flip padding + the square marker to the right edge */
[dir="rtl"] .sub-body ul { padding: 0; }
[dir="rtl"] .sub-body li { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .sub-body li::before { left: auto; right: 2px; }

/* comparison table: row-label column reads from the right */
[dir="rtl"] .cmp-table tbody th { text-align: right; }

/* cross-link cards: accent rail moves to the right edge */
[dir="rtl"] .cross-card { border-left: 0; border-right: 3px solid var(--accent, #0abab5); }

/* deployment / plan feature lists keep their checkmark on the right */
[dir="rtl"] .dcard ul, [dir="rtl"] .dep-feats, [dir="rtl"] .plan-feats { text-align: right; }

/* mobile fullscreen menu: pill bar + indent flip to the right */
[dir="rtl"] .nav-ov-link {
  padding-left: 2px; padding-right: clamp(20px, 5vw, 50px);
  justify-content: flex-end; text-align: right;
}
[dir="rtl"] .nav-ov-link::before { left: auto; right: 0; }
[dir="rtl"] .nav-ov-foot, [dir="rtl"] .nav-ov-actions { text-align: right; }

/* breadcrumbs + section eyebrows: start from the right */
[dir="rtl"] .crumbs, [dir="rtl"] .eyebrow { justify-content: flex-start; }

/* "more →" / arrow links: nudge left on hover instead of right */
[dir="rtl"] .more-link:hover { transform: translateX(-3px); }
/* flip inline arrow glyphs (lucide arrow-right) so they point with the text */
[dir="rtl"] .more-link svg, [dir="rtl"] .dep-details svg,
[dir="rtl"] .cross-card-top svg, [dir="rtl"] .pricing-link + svg { transform: scaleX(-1); }
