/* ==========================================================================
   Mandarin Software — "غرفة التحكم" design system
   Hand-written. No framework, no CDN, no runtime dependency.
   Animations are restricted to transform/opacity so they stay on the compositor.
   ========================================================================== */

/* ---------- Fonts (self-hosted, split by unicode-range) ------------------- */

@font-face {
  font-family: 'Plex Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/plex-arabic-arabic-500.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: 'Plex Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/plex-arabic-latin-500.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: 'Plex Arabic';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/plex-arabic-arabic-600.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: 'Plex Arabic';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/plex-arabic-latin-600.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;
}
/* Display face — Almarai 800.
   Chosen on measured metrics, not taste: its painted glyph box is 1.12x the em
   size, so a normal tight heading line-height clears. The previous face (Cairo)
   measured 1.87x, which meant no heading under line-height 2.0 could avoid
   consecutive lines colliding — the bug this replaces. */
@font-face {
  font-family: 'Almarai';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/almarai-800-arabic.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: 'Almarai';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/almarai-800-latin.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;
}

/* ---------- Tokens ------------------------------------------------------- */

:root {
  /* Brand — sampled from the mandarin logo's gradient. */
  --brand: #ff6b1a;
  --brand-hi: #ffb020;
  --brand-lo: #e23c17;
  --cyan: #22d3ee;

  /* Dark is the default surface. */
  --bg: #05070f;
  --bg-2: #080c18;
  --panel: #0d1424;
  --panel-2: #111a2e;
  --line: #1e2a42;
  --line-2: #2c3c5c;

  --ink: #e8edf7;
  --ink-2: #bcc7dc;
  --ink-3: #8b99b4;

  --ok: #34d399;
  --warn: #fbbf24;

  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  --shadow: 0 18px 50px -24px rgb(0 0 0 / 0.85);
  --glow: 0 0 0 1px rgb(255 107 26 / 0.35), 0 0 34px -8px rgb(255 107 26 / 0.5);

  --mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Consolas, monospace;
  --sans: 'Plex Arabic', system-ui, 'Segoe UI', Tahoma, sans-serif;
  --display: 'Almarai', 'Plex Arabic', system-ui, sans-serif;

  /* The honeycomb is the brand's structural motif — the same clip-path is used
     by the backdrop, the navigation, every icon frame and the sector reactor. */
  --hex: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t: 0.32s var(--ease);

  color-scheme: dark;
}

:root[data-theme='light'] {
  --bg: #f6f7fb;
  --bg-2: #eef1f8;
  --panel: #ffffff;
  --panel-2: #f4f6fc;
  --line: #dde3ee;
  --line-2: #c4cddf;

  --ink: #101827;
  --ink-2: #37445c;
  --ink-3: #5d6a84;

  --shadow: 0 18px 44px -28px rgb(16 24 39 / 0.4);
  --glow: 0 0 0 1px rgb(255 107 26 / 0.4), 0 0 26px -10px rgb(255 107 26 / 0.45);

  color-scheme: light;
}

/* ---------- Reset -------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  /* Arabic carries less visual weight than Latin at the same nominal size and
     weight, so the body runs at 500/17px rather than 400/16px. */
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  /* Deliberately NOT antialiased: that setting thins strokes, which is exactly
     the wrong direction for Arabic text that already reads light. */
  text-rendering: optimizeLegibility;
}

/* The ambient "space" backdrop: a fixed grid plus two brand-tinted auroras.
   Fixed + pointer-events:none so it never participates in layout or hit-testing. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgb(255 107 26 / 0.16), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 15%, rgb(34 211 238 / 0.10), transparent 60%),
    var(--bg);
}

/* Honeycomb backdrop.
   The tile is used as a MASK, not as an image, and the colour comes from
   --line so the comb follows the theme. Drawing it as an image meant its one
   hard-coded navy stroke was painted onto the light theme too, which swamped
   the content.
   The fade is a top-to-bottom ramp rather than a radial hotspot, because this
   layer is position:fixed — anything anchored to the viewport centre would
   reappear as the same dense band at every scroll position. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--line);
  opacity: 0.5;

  -webkit-mask-image: url('/img/honeycomb.svg'),
    linear-gradient(180deg, #000 0%, rgb(0 0 0 / 0.45) 45%, rgb(0 0 0 / 0.12) 100%);
  mask-image: url('/img/honeycomb.svg'),
    linear-gradient(180deg, #000 0%, rgb(0 0 0 / 0.45) 45%, rgb(0 0 0 / 0.12) 100%);
  -webkit-mask-size: 58px 100px, 100% 100%;
  mask-size: 58px 100px, 100% 100%;
  -webkit-mask-repeat: repeat, no-repeat;
  mask-repeat: repeat, no-repeat;
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

/* On white the comb has to be barely there: it is texture, not structure. */
:root[data-theme='light'] body::after { opacity: 0.34; }

img, svg, video { max-width: 100%; height: auto; display: block; }

/* Arabic display type.
   Two rules that Latin headings routinely break and Arabic cannot survive:

   1. NEVER negative letter-spacing. Arabic is cursive — the glyphs are joined,
      and tightening the track pulls them into one another until the joins read
      as a single smudge.
   2. Arabic needs far more leading than Latin. Ascenders, descenders and the
      tashkeel above them all live outside the x-height, so a 1.1 line-height
      that looks tight-and-modern in Latin makes consecutive lines collide.

   The tighter Latin treatment is therefore scoped to [dir='ltr'] only. */
h1, h2, h3, h4 {
  margin: 0 0 0.55em;
  font-family: var(--display);
  font-weight: 800;
  /* Never negative: Arabic is cursive and tightening the track welds the
     joins together. */
  letter-spacing: normal;
  line-height: 1.4;
}

h1 { font-size: clamp(2.15rem, 5.6vw, 3.9rem); line-height: 1.3; }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.5rem); line-height: 1.32; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); line-height: 1.45; }
h4 { font-size: 1rem; }

[dir='ltr'] h1, [dir='ltr'] h2 { letter-spacing: -0.02em; line-height: 1.12; }
[dir='ltr'] h3, [dir='ltr'] h4 { line-height: 1.3; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

ul, ol { margin: 0 0 1.1em; padding-inline-start: 1.3em; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: rgb(255 107 26 / 0.3); color: var(--ink); }

/* ---------- Layout primitives -------------------------------------------- */

.wrap {
  width: min(var(--maxw), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.section { padding-block: clamp(3.5rem, 9vw, 7rem); position: relative; }
.section--tight { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.stack > * + * { margin-top: var(--gap, 1rem); }

.grid { display: grid; gap: clamp(1rem, 2.4vw, 1.6rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }

/* ---------- Type helpers ------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.9rem;
}

.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: linear-gradient(to left, var(--brand), transparent);
}

[dir='ltr'] .eyebrow::before { background: linear-gradient(to right, var(--brand), transparent); }

.lead { font-size: clamp(1.06rem, 1.7vw, 1.25rem); font-weight: 600; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.center { text-align: center; }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head.center { margin-inline: auto; }

/* Gradient headline treatment. The gradient drifts slowly so the headline is
   never completely static — the one piece of ambient motion above the fold. */
.grad {
  background: linear-gradient(115deg, var(--brand-hi), var(--brand) 40%, var(--brand-lo) 65%, var(--brand-hi));
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: drift 9s ease-in-out infinite alternate;
}
@keyframes drift { to { background-position: 100% 0; } }

/* Display headings stay alive through the drifting gradient on .grad rather
   than a weight axis: Almarai is a static face, and correct Arabic metrics
   were worth more than an animatable weight. */

/* Staggered entrance for the hero. Runs on load from CSS alone — it must not
   depend on an observer, because content that fails to appear is worse than
   content that appears without ceremony. */
.rise { animation: riseIn 0.75s var(--ease) backwards; }

/* A grid whose children arrive one after another instead of all at once.
   Pure CSS with nth-child delays: no observer, so a card can never end up
   stuck invisible the way the scroll-reveal could. Capped at 12 — beyond that
   the wait stops feeling like choreography and starts feeling like lag. */
.stagger > * { animation: riseIn 0.6s var(--ease) backwards; }
.stagger > *:nth-child(1)  { animation-delay: 0.04s; }
.stagger > *:nth-child(2)  { animation-delay: 0.10s; }
.stagger > *:nth-child(3)  { animation-delay: 0.16s; }
.stagger > *:nth-child(4)  { animation-delay: 0.22s; }
.stagger > *:nth-child(5)  { animation-delay: 0.28s; }
.stagger > *:nth-child(6)  { animation-delay: 0.34s; }
.stagger > *:nth-child(7)  { animation-delay: 0.40s; }
.stagger > *:nth-child(8)  { animation-delay: 0.46s; }
.stagger > *:nth-child(9)  { animation-delay: 0.52s; }
.stagger > *:nth-child(10) { animation-delay: 0.58s; }
.stagger > *:nth-child(11) { animation-delay: 0.64s; }
.stagger > *:nth-child(n+12) { animation-delay: 0.70s; }

/* A staggered child must not also be observer-driven, or it would start
   hidden and wait for a callback that may never come. */
.js-reveal .stagger > .reveal { opacity: 1; transform: none; }
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.16s; }
.rise-3 { animation-delay: 0.27s; }
.rise-4 { animation-delay: 0.38s; }
.rise-5 { animation-delay: 0.5s; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(22px); }
}

/* ---------- Buttons ------------------------------------------------------ */

.btn {
  font-family: var(--display);
  --btn-bg: transparent;
  --btn-ink: var(--ink);
  --btn-line: var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.78rem 1.5rem;
  border: 1px solid var(--btn-line);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t), background var(--t);
  will-change: transform;
}

.btn:hover { transform: translateY(-2px); border-color: var(--brand); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --btn-line: transparent;
  --btn-ink: #14060a;
  background: linear-gradient(115deg, var(--brand-hi), var(--brand) 55%, var(--brand-lo));
  box-shadow: 0 10px 30px -12px rgb(255 107 26 / 0.75);
}
.btn--primary:hover { box-shadow: 0 16px 40px -12px rgb(255 107 26 / 0.9); }

.btn--ghost { --btn-bg: color-mix(in srgb, var(--panel) 70%, transparent); }

.btn--lg { padding: 0.95rem 1.9rem; font-size: 1.02rem; }
.btn--sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn--block { width: 100%; }

.btn .ico { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- Panels & cards ----------------------------------------------- */

.panel {
  position: relative;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

/* HUD corner brackets — the single motif that ties the whole system together. */
.bracket::before,
.bracket::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--brand);
  opacity: 0.65;
  pointer-events: none;
}
.bracket::before {
  inset-block-start: -1px;
  inset-inline-start: -1px;
  border-inline-end: 0;
  border-block-end: 0;
  border-start-start-radius: var(--radius);
}
.bracket::after {
  inset-block-end: -1px;
  inset-inline-end: -1px;
  border-inline-start: 0;
  border-block-start: 0;
  border-end-end-radius: var(--radius);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
  overflow: hidden;
  will-change: transform;
}

/* Sweep of brand light that follows the pointer across a card. */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t);
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 0%),
    rgb(255 107 26 / 0.13),
    transparent 65%
  );
}

.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  box-shadow: var(--shadow), 0 0 30px -18px var(--brand);
}
.card:hover::before,
.card:focus-within::before { opacity: 1; }

.card__title { font-family: var(--display); font-weight: 700; font-size: 1.18rem; margin-bottom: 0.5rem; }
.card__body { color: var(--ink-2); font-size: 0.96rem; font-weight: 500; flex: 1; }

.card__media {
  margin: -1.5rem -1.5rem 1.2rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.card:hover .card__media img { transform: scale(1.045); }

/* ---------- Hexagon icon frame ------------------------------------------- */
/* The single shape used for every icon on the site: service cards, stat tiles,
   process steps, contact rows. One class so the motif can never drift. */

.hexico {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 62px;
  flex: none;
  color: var(--accent, var(--brand));
  clip-path: var(--hex);
  transition: transform var(--t);
}
.hexico::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  clip-path: inherit;
  background: color-mix(in srgb, var(--accent, var(--brand)) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent, var(--brand)) 40%, transparent);
  transition: background var(--t), box-shadow var(--t);
}
.hexico .ico { width: 24px; height: 24px; }

.hexico--sm { width: 42px; height: 47px; }
.hexico--sm .ico { width: 18px; height: 18px; }
.hexico--lg { width: 70px; height: 78px; }
.hexico--lg .ico { width: 30px; height: 30px; }

.card:hover .hexico,
.step:hover .hexico { transform: translateY(-2px) scale(1.06); }
.card:hover .hexico::before,
.step:hover .hexico::before {
  background: color-mix(in srgb, var(--accent, var(--brand)) 22%, transparent);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent, var(--brand)) 70%, transparent),
              0 0 22px -8px var(--accent, var(--brand));
}

/* ---------- Tag / chip --------------------------------------------------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--panel-2) 70%, transparent);
  white-space: nowrap;
}
.tag--brand { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.tag--cyan { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 45%, transparent); }
.tag--ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }

.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }

/* ---------- Header ------------------------------------------------------- */

.hdr {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background var(--t), border-color var(--t), backdrop-filter var(--t);
}
.hdr[data-stuck='1'] {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}

.hdr__in {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 104px;
}

@media (max-width: 940px) {
  .hdr__in { min-height: 78px; }
}

.brand { display: flex; align-items: center; gap: 0.7rem; flex: none; }
.brand img { height: 46px; width: auto; }
.ftr .brand img { height: 56px; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--display); font-weight: 800; font-size: 1.06rem; }
.brand__sub {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Honeycomb navigation ---------- */
/* Each destination is a hexagon carrying its own icon, and alternate cells are
   nudged down so the row reads as a comb rather than a list of buttons. */

.nav {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-inline-start: auto;
  padding-block: 6px;
}

.navhex {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 74px;
  height: 82px;
  flex: none;
  color: var(--ink-2);
  clip-path: var(--hex);
  transition: transform var(--t), color var(--t);
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}

/* Alternate cells sit lower — this offset is what makes it a honeycomb. */
.navhex:nth-child(even) { transform: translateY(9px); }

.navhex::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  clip-path: inherit;
  background: color-mix(in srgb, var(--panel-2) 88%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background var(--t), box-shadow var(--t);
}

:root[data-theme='light'] .navhex::before {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-2);
}

/* Icon frames need a solid fill on white too, otherwise the comb reads through
   the tint and the icon loses its silhouette. */
:root[data-theme='light'] .hexico::before {
  background: color-mix(in srgb, var(--accent, var(--brand)) 10%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent, var(--brand)) 34%, transparent);
}
:root[data-theme='light'] .hex::before {
  background: #fff;
}
:root[data-theme='light'] .step::before {
  background: color-mix(in srgb, var(--brand) 12%, #fff);
}

.navhex__ico { width: 21px; height: 21px; transition: transform var(--t); }
.navhex__txt {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.navhex:hover,
.navhex:focus-visible { color: var(--ink); transform: translateY(-3px); }
.navhex:nth-child(even):hover,
.navhex:nth-child(even):focus-visible { transform: translateY(6px); }
.navhex:hover::before,
.navhex:focus-visible::before {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--brand) 60%, transparent),
              0 0 26px -10px var(--brand);
}
.navhex:hover .navhex__ico { transform: scale(1.14); }

.navhex[aria-current='page'] { color: var(--brand); }
.navhex[aria-current='page']::before {
  background: rgb(255 107 26 / 0.11);
  box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 30px -12px var(--brand);
}

/* Below the full honeycomb row, fall back to a compact text row. */
@media (max-width: 1180px) and (min-width: 941px) {
  .navhex { width: 62px; height: 70px; }
  .navhex__txt { font-size: 0.64rem; }
  .navhex__ico { width: 18px; height: 18px; }
}

.hdr__tools { display: flex; align-items: center; gap: 0.5rem; flex: none; }

.iconbtn {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  color: var(--ink-2);
  cursor: pointer;
  transition: color var(--t), border-color var(--t), transform var(--t);
}
.iconbtn:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-1px); }
.iconbtn .ico { width: 19px; height: 19px; }

.langbtn {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  width: auto;
  padding-inline: 0.8rem;
}

.burger { display: none; }

/* Mobile nav: a sheet that slides from the top, driven by a checkbox-free
   [data-open] attribute so it works with a single line of JS. */
/* On mobile the comb becomes a honeycomb grid inside a sheet — same motif,
   thumb-sized cells. */
@media (max-width: 940px) {
  .burger { display: inline-grid; }
  .nav {
    position: fixed;
    inset: 78px 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 1.2rem var(--gutter) 1.8rem;
    background: color-mix(in srgb, var(--bg) 97%, transparent);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t), transform var(--t), visibility var(--t);
    max-height: calc(100dvh - 78px);
    overflow-y: auto;
  }
  .nav[data-open='1'] { opacity: 1; transform: none; visibility: visible; }

  .navhex { width: 100%; height: 96px; gap: 5px; }
  .navhex:nth-child(even) { transform: none; }
  .navhex:nth-child(even):hover { transform: translateY(-3px); }
  .navhex__ico { width: 24px; height: 24px; }
  .navhex__txt { font-size: 0.8rem; }
}

/* ---------- Hero: the live console --------------------------------------- */

.hero { position: relative; padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 7vw, 5rem); }

.hero__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 1000px) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; }
}

.hero h1 { margin-bottom: 0.5em; }
.hero h1 .grad { display: block; }

.hero__sub {
  font-size: clamp(1.08rem, 1.95vw, 1.32rem);
  font-weight: 600;
  color: var(--ink-2);
  max-width: 52ch;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.hero__trust .trust-item { display: flex; align-items: center; gap: 0.7rem; }
.hero__trust .trust-item > span:last-child { display: flex; flex-direction: column; }
.hero__trust b { font-family: var(--display); font-weight: 800; font-size: 1.75rem; color: var(--ink); line-height: 1.2; }
.hero__trust span { font-size: 0.8rem; color: var(--ink-3); }

/* The console panel itself */
.console {
  position: relative;
  padding: 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--panel-2) 92%, transparent), color-mix(in srgb, var(--panel) 96%, transparent));
  box-shadow: var(--shadow), 0 0 60px -30px var(--brand);
  overflow: hidden;
}

/* Slow sweep of light across the console, like a refresh scan. */
.console::after {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: -40%;
  width: 40%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.05), transparent);
  animation: sweep 7s linear infinite;
}
@keyframes sweep { to { transform: translateX(350%); } }
[dir='rtl'] .console::after { animation-name: sweep-rtl; }
@keyframes sweep-rtl { to { transform: translateX(-350%); } }

.console__bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-bottom: 0.9rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.console__dots { display: flex; gap: 0.35rem; }
.console__dots i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--line-2);
}
.console__dots i:first-child { background: color-mix(in srgb, var(--brand) 70%, transparent); }

.console__title {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.console__live {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ok);
}
.console__live i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.72); }
}

.console__kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}

.kpi {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg-2) 60%, transparent);
}
.kpi__label {
  font-size: 0.72rem;
  color: var(--ink-3);
  margin-bottom: 0.3rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi__val {
  font-family: var(--display);
  font-size: clamp(1.25rem, 3.2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  direction: ltr;
  unicode-bidi: isolate;
}
.kpi__val span { font-size: 0.6em; color: var(--brand); margin-inline-start: 0.15em; }

/* Pure-CSS sparkline built from flexed bars — no chart library, no canvas. */
.spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 46px;
  margin-top: 0.9rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg-2) 60%, transparent);
}
.spark i {
  flex: 1;
  min-width: 0;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--brand) 30%, transparent), var(--brand));
  transform-origin: bottom;
  animation: rise 0.7s var(--ease) backwards;
}
@keyframes rise { from { transform: scaleY(0.05); opacity: 0; } }

/* ---------- Hex Reactor -------------------------------------------------- */
/* The sector selector. Hexagons via clip-path, laid out on a CSS grid with
   alternating row offsets. Idle: a staggered glow travels across the cells.
   Interaction: click/tap/Enter opens the sector's panel below the grid. */

.reactor { position: relative; }

.reactor__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(0.5rem, 1.2vw, 0.85rem);
  max-width: 940px;
  margin-inline: auto;
}

/* Offset every other cell so the reactor packs like a real comb. */
@media (min-width: 720px) {
  .reactor__grid .hex:nth-child(even) { transform: translateY(14px); }
  .reactor__grid .hex:nth-child(even):hover,
  .reactor__grid .hex:nth-child(even):focus-visible { transform: translateY(10px) scale(1.03); }
  .reactor__grid .hex:nth-child(even)[aria-expanded='true'] { transform: translateY(10px) scale(1.04); }
}

.hex {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  aspect-ratio: 1 / 1.06;
  padding: 1rem 0.7rem;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: center;
  color: var(--ink-2);
  background: none;
  clip-path: var(--hex);
  transition: transform var(--t), color var(--t);
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}

/* The cell face. A separate layer so the border and fill can be animated
   without re-running the clip-path. */
.hex::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(160deg,
      color-mix(in srgb, var(--panel-2) 94%, transparent),
      color-mix(in srgb, var(--panel) 96%, transparent));
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: inherit;
  transition: box-shadow var(--t), background var(--t);
}

/* Idle traveling glow. --i is set per cell in markup to stagger the wave. */
.hex::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  clip-path: inherit;
  background: radial-gradient(circle at 50% 40%, var(--accent, var(--brand)), transparent 62%);
  opacity: 0;
  animation: hexbreathe 5.5s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.42s);
}
@keyframes hexbreathe {
  0%, 72%, 100% { opacity: 0; }
  20% { opacity: 0.17; }
}

.hex:hover,
.hex:focus-visible { transform: translateY(-4px) scale(1.03); color: var(--ink); }
.hex:hover::before,
.hex:focus-visible::before {
  box-shadow: inset 0 0 0 1.5px var(--accent, var(--brand)),
              0 0 40px -12px var(--accent, var(--brand));
}

.hex[aria-expanded='true'] {
  transform: translateY(-4px) scale(1.04);
  color: var(--ink);
}
.hex[aria-expanded='true']::before {
  box-shadow: inset 0 0 0 2px var(--accent, var(--brand)),
              0 0 46px -10px var(--accent, var(--brand));
}
.hex[aria-expanded='true']::after { opacity: 0.2; animation: none; }

/* When one cell is open, the rest recede. */
.reactor__grid[data-active] .hex:not([aria-expanded='true']) { opacity: 0.42; }
.reactor__grid[data-active] .hex:not([aria-expanded='true']):hover { opacity: 0.85; }

.hex__ico {
  width: 30px; height: 30px;
  color: var(--accent, var(--brand));
  transition: transform var(--t);
}
.hex:hover .hex__ico { transform: scale(1.12); }

.hex__name { font-family: var(--display); font-weight: 700; font-size: 0.95rem; line-height: 1.25; }
.hex__count {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-3);
}

/* The expanded sector panel */
.reactor__panel {
  margin-top: clamp(1.2rem, 3vw, 2rem);
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: var(--shadow);
}
.reactor__panel[hidden] { display: none; }

.reactor__panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  padding-bottom: 1rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}
.reactor__panel-head h3 { margin: 0; }
.reactor__panel-head .ico { width: 26px; height: 26px; color: var(--accent, var(--brand)); }

.reactor__links { display: grid; gap: 0.55rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

.rlink {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--panel-2) 55%, transparent);
  transition: border-color var(--t), transform var(--t), background var(--t);
}
.rlink:hover {
  border-color: var(--accent, var(--brand));
  transform: translateX(var(--slide, -3px));
  background: color-mix(in srgb, var(--panel-2) 85%, transparent);
}
[dir='ltr'] .rlink:hover { --slide: 3px; }

.rlink__t { font-weight: 600; font-size: 0.93rem; flex: 1; min-width: 0; }
.rlink__m { font-family: var(--mono); font-size: 0.76rem; color: var(--brand); white-space: nowrap; }
.rlink .ico { width: 17px; height: 17px; color: var(--ink-3); flex: none; }

/* ---------- Process steps ------------------------------------------------ */

.steps { counter-reset: step; display: grid; gap: 1rem; }
@media (min-width: 780px) { .steps { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } }

.step {
  position: relative;
  padding: 1.4rem 1.2rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  counter-increment: step;
  transition: border-color var(--t), transform var(--t);
}
.step:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); transform: translateY(-3px); }

.step::before {
  content: counter(step, decimal-leading-zero);
  display: grid;
  place-items: center;
  width: 46px;
  height: 51px;
  margin-bottom: 0.9rem;
  clip-path: var(--hex);
  background: rgb(255 107 26 / 0.13);
  box-shadow: inset 0 0 0 1px rgb(255 107 26 / 0.4);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand);
  direction: ltr;
  transition: background var(--t), box-shadow var(--t), transform var(--t);
}
.step:hover::before {
  background: rgb(255 107 26 / 0.22);
  box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 22px -8px var(--brand);
  transform: translateY(-2px) scale(1.05);
}
.step h3 { font-size: 1.03rem; margin-bottom: 0.35rem; }
.step p { font-size: 0.9rem; color: var(--ink-2); margin: 0; }

/* ---------- Price display ------------------------------------------------ */

.price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--mono);
  direction: ltr;
  unicode-bidi: isolate;
}
.price b { font-family: var(--display); font-size: 1.5rem; font-weight: 800; color: var(--ink); line-height: 1; }
.price span { font-size: 0.78rem; color: var(--ink-3); }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

/* ---------- Forms -------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }

.field > label { font-size: 0.88rem; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 0.78rem; color: var(--ink-3); }

.input, .select, .textarea {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg-2) 70%, transparent);
  color: var(--ink);
  font: inherit;
  font-size: 0.96rem;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(255 107 26 / 0.16);
  background: color-mix(in srgb, var(--bg-2) 92%, transparent);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.textarea { min-height: 130px; resize: vertical; line-height: 1.7; }

.select {
  appearance: none;
  padding-inline-end: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f7f9c' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 17px;
  background-position: left 0.9rem center;
}
[dir='ltr'] .select { background-position: right 0.9rem center; }

/* Card-style radio group used for budget / timeline pickers. */
.choices { display: grid; gap: 0.55rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }

.choice { position: relative; }
.choice input {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  margin: 0;
  cursor: pointer;
}
.choice span {
  display: block;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg-2) 55%, transparent);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  color: var(--ink-2);
  transition: all var(--t);
  pointer-events: none;
}
.choice input:hover + span { border-color: var(--line-2); color: var(--ink); }
.choice input:checked + span {
  border-color: var(--brand);
  color: var(--brand);
  background: rgb(255 107 26 / 0.09);
}
.choice input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Honeypot: off-screen, never displayed, never announced. */
.hp {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.err { color: #fca5a5; font-size: 0.84rem; }
:root[data-theme='light'] .err { color: #b91c1c; }

.alert {
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line-2);
  border-inline-start-width: 3px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  margin-bottom: 1.2rem;
}
.alert--ok { border-inline-start-color: var(--ok); color: var(--ok); background: rgb(52 211 153 / 0.07); }
.alert--bad { border-inline-start-color: #f87171; color: #fca5a5; background: rgb(248 113 113 / 0.07); }
:root[data-theme='light'] .alert--bad { color: #b91c1c; }

/* ---------- Booking funnel ----------------------------------------------- */

.funnel { max-width: 780px; margin-inline: auto; }

.funnel__steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  counter-reset: fstep;
}
.funnel__step {
  flex: 1;
  padding-top: 0.7rem;
  border-top: 2px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-3);
  counter-increment: fstep;
  transition: color var(--t), border-color var(--t);
}
.funnel__step::before {
  content: counter(fstep) '. ';
  font-family: var(--mono);
}
.funnel__step[data-on='1'] { color: var(--brand); border-top-color: var(--brand); }

.fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 2rem;
}
.fieldset > legend {
  padding: 0;
  margin-bottom: 1.1rem;
  font-size: 1.1rem;
  font-weight: 700;
}

/* ---------- Tracking timeline -------------------------------------------- */

.timeline { list-style: none; padding: 0; margin: 0; }

.tl {
  position: relative;
  padding-inline-start: 2.1rem;
  padding-bottom: 1.6rem;
}
.tl:last-child { padding-bottom: 0; }

.tl::before {
  content: '';
  position: absolute;
  inset-inline-start: 7px;
  top: 1.5rem;
  bottom: -0.2rem;
  width: 2px;
  background: var(--line);
}
.tl:last-child::before { display: none; }

.tl::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.45rem;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  background: var(--bg);
}
.tl[data-done='1']::after { border-color: var(--ok); background: var(--ok); }
.tl[data-now='1']::after {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 0 0 4px rgb(255 107 26 / 0.2);
}
.tl[data-done='1']::before { background: var(--ok); }

.tl b { display: block; font-size: 1rem; }
.tl time { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-3); direction: ltr; }

.codebox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 1.4rem;
  border: 1px dashed var(--brand);
  border-radius: var(--radius);
  background: rgb(255 107 26 / 0.06);
  margin-block: 1.6rem;
}
.codebox strong {
  font-family: var(--mono);
  font-size: clamp(1.4rem, 5vw, 2.1rem);
  letter-spacing: 0.1em;
  color: var(--brand);
  direction: ltr;
}

/* ---------- Filters ------------------------------------------------------ */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filters a {
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: all var(--t);
}
.filters a:hover { border-color: var(--line-2); color: var(--ink); }
.filters a[aria-current='true'] {
  border-color: var(--brand);
  color: var(--brand);
  background: rgb(255 107 26 / 0.09);
}

/* ---------- Case study --------------------------------------------------- */

.cs-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); }

.cs-metrics {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  margin-block: 2rem;
}
.cs-metric {
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--panel) 60%, transparent);
  text-align: center;
}
.cs-metric b {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  color: var(--brand);
  line-height: 1.15;
  direction: ltr;
}
.cs-metric span { font-size: 0.82rem; color: var(--ink-2); }

.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.prose h3 { margin-top: 1.8em; }
.prose > :first-child { margin-top: 0; }
.prose ul li, .prose ol li { margin-bottom: 0.5em; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--radius-sm); border: 1px solid var(--line); margin-block: 1.5em; }
.prose strong { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin-block: 1.5em; font-size: 0.92rem; }
.prose th, .prose td { padding: 0.6rem 0.8rem; border: 1px solid var(--line); text-align: start; }
.prose th { background: color-mix(in srgb, var(--panel-2) 70%, transparent); font-weight: 700; }

/* Any wide block inside prose scrolls on its own — the page body never does. */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Accordion (FAQ / policies) ----------------------------------- */

.acc {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--panel) 60%, transparent);
  margin-bottom: 0.7rem;
  overflow: hidden;
  transition: border-color var(--t);
}
.acc[open] { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }

.acc summary {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  transition: color var(--t);
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { color: var(--brand); }
.acc summary::after {
  content: '';
  margin-inline-start: auto;
  width: 10px; height: 10px;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--t);
  flex: none;
  opacity: 0.6;
}
.acc[open] summary::after { transform: rotate(-135deg); }
.acc__body { padding: 0 1.2rem 1.2rem; color: var(--ink-2); font-size: 0.95rem; }

/* ---------- Footer ------------------------------------------------------- */

.ftr {
  margin-top: clamp(3rem, 8vw, 6rem);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 60%, transparent);
}

.ftr__grid {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.ftr h4 {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1rem;
}
.ftr ul { list-style: none; padding: 0; margin: 0; }
.ftr li { margin-bottom: 0.55rem; }
.ftr a { color: var(--ink-2); font-size: 0.93rem; transition: color var(--t); }
.ftr a:hover { color: var(--brand); }

.ftr__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-3);
}

.social { display: flex; gap: 0.5rem; }
.social a {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-2);
  transition: all var(--t);
}
.social a:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-2px); }
.social .ico { width: 18px; height: 18px; }

/* Floating WhatsApp CTA — the primary conversion path on mobile. */
.wa-float {
  position: fixed;
  inset-block-end: 1.1rem;
  inset-inline-end: 1.1rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  background: #25d366;
  color: #06301a;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 14px 34px -12px rgb(37 211 102 / 0.7);
  transition: transform var(--t), box-shadow var(--t);
}
.wa-float:hover { transform: translateY(-3px) scale(1.02); }
.wa-float .ico { width: 20px; height: 20px; }
@media (max-width: 560px) { .wa-float span { display: none; } .wa-float { padding: 0.85rem; } }

/* ---------- Scroll reveal ------------------------------------------------ */
/* Applied only after JS confirms IntersectionObserver support, so a no-JS
   visitor sees fully-rendered content instead of a blank page. */

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.js-reveal .reveal[data-in='1'] { opacity: 1; transform: none; }

/* ---------- Utilities ---------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  inset-block-start: -100%;
  inset-inline-start: 1rem;
  z-index: 100;
  padding: 0.7rem 1.2rem;
  border-radius: 0 0 8px 8px;
  background: var(--brand);
  color: #14060a;
  font-weight: 700;
}
.skip:focus { inset-block-start: 0; }

.ico { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico--fill { fill: currentColor; stroke: none; }

.empty {
  padding: clamp(2.5rem, 6vw, 4rem);
  text-align: center;
  color: var(--ink-3);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
}

/* ---------- Motion & print ----------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    /* The delay matters as much as the duration here: the entrance animations
       fill backwards, so a staggered child holds its `from` state — opacity 0 —
       for the whole delay. Without this, reduced-motion visitors wait out the
       stagger looking at blank space. */
    animation-delay: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js-reveal .reveal { opacity: 1; transform: none; }
}

@media print {
  body::before, body::after, .hdr, .ftr, .wa-float { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- Case study screenshots --------------------------------------- */
/* The strongest proof on the site: real screens from a delivered system.
   Each one links to its full size so the interface can actually be read. */

.shotgrid {
  display: grid;
  gap: clamp(0.9rem, 2vw, 1.4rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  margin-top: 1.8rem;
}

.shotfig { margin: 0; }

/* Every tile is the same shape regardless of what was captured. Screens vary
   wildly — a wide dashboard next to a portrait certificate card — and left to
   their natural height they tear the grid into ragged rows with dead space
   beside the tall ones.

   Cropping is anchored to the top because that is where a screen carries its
   meaning: the title, the toolbar, the first rows of the table. The bottom of a
   long list adds nothing the top has not already said. The uncropped image is
   always one click away. */
.shotfig a {
  aspect-ratio: 16 / 10;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-2);
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
  will-change: transform;
}
.shotfig a:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  box-shadow: var(--shadow), 0 0 30px -18px var(--brand);
}

.shotfig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.shotfig figcaption {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.6;
}
