/* Echo Tech — site styles. Tokens first, components after. See docs/BRAND.md. */

:root {
  --cobalt: #1d4ed8;
  --sky: #60a5fa;

  --bg: #f6f8fe;
  --bg-2: #eaf0fd;
  --ink: #0a1230;
  --muted: #55608a;
  --line: #d5def5;
  --primary: #1d4ed8;
  --primary-ink: #ffffff;
  --link: #1d4ed8;
  --ring: #60a5fa;
  --focus: #1d4ed8;

  --font: "Readex Pro", "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 1200px;
  --radius: 10px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #060a18;
  --bg-2: #0c1330;
  --ink: #eaf0ff;
  --muted: #93a0c8;
  --line: #1b2650;
  --primary: #2f5fe6;
  --primary-ink: #ffffff;
  --link: #7db4fb;
  --ring: #60a5fa;
  --focus: #7db4fb;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
::selection { background: var(--cobalt); color: #fff; }
html { scrollbar-color: color-mix(in srgb, var(--cobalt) 55%, var(--line)) var(--bg); caret-color: var(--cobalt); accent-color: var(--cobalt); }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-block-start: 5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
[lang="ar"] body { line-height: 1.95; }
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: 0.25em; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0; max-width: 62ch; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; }
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3 { letter-spacing: 0; line-height: 1.3; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; inset-inline-start: 1rem; inset-block-start: -4rem; z-index: 100;
  background: var(--primary); color: var(--primary-ink); padding: 0.6rem 1rem; border-radius: var(--radius);
  text-decoration: none; transition: inset-block-start 0.2s;
}
.skip:focus { inset-block-start: 1rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
section { padding-block: clamp(4.5rem, 10vw, 8rem); }

/* ---------- Spinner (reusable) ---------- */
.spinner { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -0.2em; color: inherit; }
.spinner svg { width: 100%; height: 100%; overflow: visible; }
.spinner .track { stroke: currentColor; opacity: 0.2; }
.spinner .arc { stroke: currentColor; transform-origin: 50% 50%; animation: spin 0.9s linear infinite; }
.spinner .core { fill: currentColor; transform-origin: 50% 50%; animation: pulse 1.4s var(--ease) infinite; }
.spinner--lg { width: 3rem; height: 3rem; color: var(--cobalt); }
[data-theme="dark"] .spinner--lg { color: var(--sky); }

/* ---------- Boot loader (first visit per session) ---------- */
.boot {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: var(--bg); transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot__stack { display: grid; justify-items: center; gap: 1.5rem; }
.boot__mark { width: 120px; height: 120px; }
.boot__logo { width: 100%; height: 100%; overflow: visible; }
.boot__logo .d { fill: var(--cobalt); transform-box: fill-box; transform-origin: center; animation: pop 0.7s var(--ease) both; }
[data-theme="dark"] .boot__logo .d { fill: #3b6bf0; }
.boot__logo .r { fill: none; stroke: var(--ring); stroke-width: 2.4; transform-box: fill-box; transform-origin: center; animation: trail 1.6s var(--ease) infinite; }
.boot__logo .r2 { animation-delay: 0.25s; }
.boot__label { color: var(--muted); font-size: 0.9rem; display: inline-flex; gap: 0.6rem; align-items: center; }
html:not(.js) .boot { display: none; }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; inset-block-start: 0; inset-inline: 0; height: 3px; z-index: 60;
  background: linear-gradient(to right, var(--cobalt), var(--sky)); transform-origin: left center;
  transform: scaleX(0);
}
[dir="rtl"] .progress { transform-origin: right center; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; z-index: 55; inset-block-end: 1.25rem; inset-inline-end: 1.25rem; display: grid; place-items: center;
  width: 3rem; height: 3rem; padding: 0; border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
  background: var(--cobalt); color: #fff; box-shadow: 0 10px 24px -10px rgba(10, 18, 48, 0.55);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity 0.25s, transform 0.3s var(--ease), visibility 0.25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-2px); }
.to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header ---------- */
.header {
  position: sticky; inset-block-start: 0; z-index: 50;
  background: var(--bg);
  border-block-end: 1px solid transparent; transition: border-color 0.3s;
}
.header.is-scrolled { border-block-end-color: var(--line); }
/* On the home page the header sits on the dark hero until the page scrolls. */
[data-theme="dark"] .header--stage:not(.is-scrolled) {
  --bg: #050a1c; --bg-2: #0b1433; --ink: #eaf0ff; --muted: #a6b4dc; --line: #1d2a5a; --link: #8cbcfc; --ring: #60a5fa; --focus: #8cbcfc; --primary: #2f5fe6;
  background: var(--bg); color: var(--ink);
}
.header__row { display: flex; align-items: center; gap: 1.25rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand svg { width: 38px; height: 38px; }
.brand__name { font-weight: 600; letter-spacing: 0.22em; font-size: 0.95rem; white-space: nowrap; }
@media (max-width: 480px) { .brand__name { letter-spacing: 0.1em; } }
[lang="ar"] .brand__name { letter-spacing: 0.04em; font-size: 1.05rem; }
.brand .d { fill: var(--cobalt); }
[data-theme="dark"] .brand .d { fill: #3b6bf0; }
.brand .r { fill: none; stroke: var(--ring); stroke-width: 1.8; }
.brand:hover .r1 { animation: nudge 1s var(--ease); }
.brand:hover .r2 { animation: nudge 1s var(--ease) 0.08s; }

.nav { margin-inline-start: auto; display: flex; align-items: center; gap: 0.25rem; }
.nav a.nav__link {
  color: var(--ink); text-decoration: none; padding: 0.5rem 0.85rem; border-radius: 999px;
  font-size: 0.95rem; transition: background 0.2s;
}
.nav a.nav__link:hover { background: var(--bg-2); }
.nav .btn { padding: 0.55rem 1.15rem; font-size: 0.95rem; margin-inline-start: 0.5rem; }
.tools { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn, .lang {
  display: inline-grid; place-items: center; min-width: 2.5rem; height: 2.5rem; padding-inline: 0.7rem;
  border: 1px solid var(--line); border-radius: 999px; background: transparent;
  color: var(--ink); cursor: pointer; text-decoration: none; font-size: 0.9rem; transition: border-color 0.2s, background 0.2s;
}
.icon-btn:hover, .lang:hover { border-color: var(--muted); background: var(--bg-2); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .sun { display: none; }
[data-theme="dark"] .theme-btn .sun { display: block; }
[data-theme="dark"] .theme-btn .moon { display: none; }
.menu-btn { display: none; }

@media (max-width: 880px) {
  .menu-btn { display: inline-grid; }
  .nav {
    position: fixed; inset: 4.25rem 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); padding: 1rem var(--gutter) 1.5rem; border-block-end: 1px solid var(--line);
    transform: translateY(-1rem); opacity: 0; visibility: hidden; pointer-events: none; transition: all 0.25s var(--ease);
    margin: 0;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
  .nav a.nav__link { padding: 0.9rem 0; border-radius: 0; border-block-end: 1px solid var(--line); font-size: 1.05rem; }
  .nav .btn { margin-block-start: 1rem; margin-inline-start: 0; padding: 0.85rem 1.5rem; font-size: 1rem; justify-content: center; }
  .tools { margin-inline-start: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  background: var(--primary); color: var(--primary-ink); font-weight: 500; text-decoration: none; cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 22px -8px var(--cobalt); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--muted); box-shadow: none; }
.btn[disabled] { opacity: 0.75; cursor: progress; transform: none; box-shadow: none; }
.btn .ripple {
  position: absolute; border-radius: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  background: currentColor; opacity: 0.35; transform: scale(0); animation: ripple 0.7s ease-out forwards; pointer-events: none;
}
.btn .spinner { display: none; }
.btn[aria-busy="true"] .spinner { display: inline-block; }

/* ---------- Stage: the theme decides. Light mode is light everywhere, dark mode is dark everywhere. ---------- */
[data-theme="dark"] .stage {
  --bg: #050a1c; --bg-2: #0b1433; --ink: #eaf0ff; --muted: #a6b4dc; --line: #1d2a5a;
  --link: #8cbcfc; --ring: #60a5fa; --focus: #8cbcfc; --primary: #2f5fe6;
}
.stage { background-color: var(--bg); color: var(--ink); }
.stage .btn--ghost:hover { background: var(--bg-2); }
[data-theme="dark"] .stage .field .err, [data-theme="dark"] .stage .form__status.bad { color: #ff9b95; }
[data-theme="dark"] .stage .field.is-bad input, [data-theme="dark"] .stage .field.is-bad select, [data-theme="dark"] .stage .field.is-bad textarea { border-color: #ff9b95; }
[data-theme="dark"] .stage .form__status.ok { color: #6ee7a0; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(1rem, 3vw, 2.5rem) clamp(3rem, 7vw, 6rem); isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ring) 30%, transparent) 1px, transparent 0);
  background-size: 30px 30px;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 92%); mask-image: linear-gradient(to bottom, #000 30%, transparent 92%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.hero__content { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2rem, 3vw + 0.9rem, 3.9rem); font-weight: 700; max-width: 14ch; line-height: 1.06; }
[lang="ar"] .hero h1 { max-width: 14ch; line-height: 1.3; font-size: clamp(1.9rem, 2.8vw + 0.9rem, 3.5rem); }
.hero__sub { margin-block-start: 1.75rem; font-size: clamp(1.05rem, 1.1vw + 0.7rem, 1.3rem); color: var(--muted); max-width: 44ch; }
.hero__actions { margin-block-start: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Signal map: the one memorable element. A pulse leaves the core and visits each service. */
.signal { position: relative; z-index: 1; width: min(100%, 560px); justify-self: center; align-self: start; aspect-ratio: 1; }
.signal svg { width: 100%; height: 100%; overflow: visible; }
.sig-orbit { fill: none; stroke: var(--line); stroke-width: 1.2; }
.sig-orbit--out { stroke-dasharray: 2 9; stroke-linecap: round; }
.sig-spoke { stroke: color-mix(in srgb, var(--ring) 38%, transparent); stroke-width: 1.2; stroke-dasharray: 3 7; }
.sig-core { fill: #2f5fe6; transform-box: fill-box; transform-origin: center; animation: pop 0.9s var(--ease) 0.2s both, breathe 6s ease-in-out 1.2s infinite; }
.sig-echo { fill: none; stroke: var(--ring); stroke-width: 1.6; vector-effect: non-scaling-stroke; opacity: 0; transform-box: fill-box; transform-origin: center; animation: sig-echo 6s linear infinite; }
.sig-echo:nth-of-type(2) { animation-delay: -2s; }
.sig-echo:nth-of-type(3) { animation-delay: -4s; }
.sig-dot { fill: #bcd8ff; opacity: 0; --x: 0px; --y: 0px; animation: sig-travel 10s linear infinite; }
.sig-node { cursor: pointer; }
.sig-disc { fill: var(--bg-2); stroke: var(--ring); stroke-width: 1.6; transition: fill 0.25s; }
.sig-icon { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.sig-flash { fill: none; stroke: var(--ring); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; animation: sig-flash 10s linear infinite; }
.sig-node:hover .sig-disc, .sig-node.is-on .sig-disc { fill: var(--cobalt); }

.tap-ring {
  position: absolute; z-index: 1; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  border: 1.5px solid var(--ring); pointer-events: none; animation: tap 1.6s ease-out forwards;
}
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__content { text-align: center; }
  .hero h1, [lang="ar"] .hero h1, .hero__sub { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .signal { width: min(100%, 420px); }
}

/* Hero load sequence (single orchestrated moment) */
.hero__content > * { animation: rise 0.9s var(--ease) both; }
.hero__content > :nth-child(2) { animation-delay: 0.12s; }
.hero__content > :nth-child(3) { animation-delay: 0.24s; }

/* ---------- Section heads ---------- */
.head { display: grid; gap: 1rem; margin-block-end: clamp(2.5rem, 5vw, 4rem); }
.head h2 { font-size: clamp(2rem, 3.6vw + 0.5rem, 3.6rem); font-weight: 700; max-width: 18ch; }
.head p { color: var(--muted); }

/* ---------- Services (picker) ---------- */
.picker { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.picker__list { display: grid; gap: 0.25rem; }
.picker__list[hidden] { display: none; }
.tab { position: relative; display: flex; align-items: center; gap: 1rem; min-height: 56px; padding: 0.9rem 1rem; padding-inline-start: 1.4rem; text-align: start; background: none; border: 0; border-radius: 12px; color: var(--muted); font: inherit; font-size: 1.15rem; font-weight: 500; cursor: pointer; transition: color 0.2s, background-color 0.2s; }
.tab svg { width: 26px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: color 0.2s; }
.tab::before { content: ""; position: absolute; inset-inline-start: 0; inset-block: 14px; width: 3px; border-radius: 3px; background: var(--ring); transform: scaleY(0); transition: transform 0.35s var(--ease); }
.tab:hover { color: var(--ink); background: var(--bg-2); }
.tab[aria-selected="true"] { color: var(--ink); background: var(--bg-2); }
.tab[aria-selected="true"] svg { color: var(--link); }
.tab[aria-selected="true"]::before { transform: scaleY(1); }
.panel { position: relative; padding: clamp(1.5rem, 3vw, 3rem); border: 1px solid var(--line); border-radius: 28px; background: var(--bg-2); animation: swap 0.45s var(--ease); }
.panel__icon { width: clamp(56px, 7vw, 88px); height: clamp(56px, 7vw, 88px); margin-block-end: 1.5rem; fill: none; stroke: var(--link); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.panel[hidden] { display: none; }
.panel + .panel { margin-block-start: 3.5rem; }
.picker.is-ready .panel + .panel { margin-block-start: 0; }
.panel h3 { font-size: clamp(1.8rem, 2vw + 1rem, 2.6rem); }
.panel__summary { margin-block: 0.75rem 2rem; color: var(--muted); font-size: 1.15rem; max-width: 38rem; }
.panel .btn { margin-block-start: 2.25rem; }
.svc__points { display: grid; gap: 0.7rem; align-content: start; max-width: 38rem; }
.svc__points li { position: relative; padding-inline-start: 1.25rem; }
.svc__points li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: 0.78em; width: 6px; height: 6px; border-radius: 50%; background: var(--ring); }
@media (max-width: 860px) {
  .picker { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* ---------- Sub pages ---------- */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0; color: var(--muted); font-size: 0.95rem; }
.crumbs li { display: flex; align-items: center; }
.crumbs li + li::before { content: "/"; color: var(--muted); opacity: 0.6; pointer-events: none; }
/* A slash leans toward the reading direction; mirror it in RTL so the trail reads right to left. */
[dir="rtl"] .crumbs li + li::before { content: "\005C"; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 0.7rem; }
.crumbs li:first-child a { padding-inline-start: 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); }
.crumbs li[aria-current] { min-height: 44px; }
.crumbs li[aria-current]::before { margin-inline-end: 0.7rem; }
.phero { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 6vw, 5rem); }
.phero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ring) 30%, transparent) 1px, transparent 0); background-size: 30px 30px;
  -webkit-mask-image: linear-gradient(to bottom, #000 20%, transparent 100%); mask-image: linear-gradient(to bottom, #000 20%, transparent 100%);
}
.phero h1 { font-weight: 700; }
.phero h1 { font-size: clamp(2.2rem, 4.5vw + 0.5rem, 4.2rem); margin-block-start: 1.75rem; }
.phero__title { display: flex; align-items: center; gap: 1.25rem; margin-block-start: 1.75rem; }
.phero__title h1 { margin-block-start: 0; }
.phero__icon { flex: none; box-sizing: content-box; width: clamp(32px, 4vw, 48px); height: clamp(32px, 4vw, 48px); padding: clamp(14px, 1.6vw, 20px); border: 1.5px solid var(--ring); border-radius: 50%; background: var(--bg-2); fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.phero__lead { margin-block-start: 1.5rem; max-width: 42rem; font-size: clamp(1.1rem, 0.6vw + 1rem, 1.35rem); color: var(--muted); }
.phero .hero__actions { margin-block-start: 2.25rem; }
.items { display: grid; }
.item { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 0.75rem 3rem; padding-block: 1.75rem; border-block-start: 1px solid var(--line); }
.item:last-child { border-block-end: 1px solid var(--line); }
.item h3 { font-size: 1.3rem; }
.item p { color: var(--muted); max-width: 40rem; }
.needs { background: var(--bg-2); }
.others__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0.25rem 2rem; }
.others__list a, .nav__menu a { display: flex; align-items: flex-start; gap: 0.9rem; padding: 0.9rem 0.75rem; border-radius: 12px; color: var(--ink); text-decoration: none; transition: background-color 0.2s; }
.others__list a:hover, .nav__menu a:hover { background: var(--bg-2); }
.others__list svg, .nav__menu svg { flex: none; width: 24px; height: 24px; margin-block-start: 0.15rem; fill: none; stroke: var(--link); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.others__list span, .nav__menu span { display: grid; gap: 0.15rem; }
.others__list small, .nav__menu small { color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.panel__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block-start: 2.25rem; }
.panel .panel__actions .btn { margin-block-start: 0; }
.case__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 760px) { .item { grid-template-columns: 1fr; } }

/* Services dropdown */
.nav__group { position: relative; display: flex; align-items: center; }
.nav__menu { position: absolute; inset-block-start: 100%; inset-inline-start: -0.75rem; z-index: 60; width: 24rem; display: grid; padding: 0.5rem; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 48px -24px rgba(10, 18, 48, 0.35); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0.2s; }
.nav__group:hover .nav__menu, .nav__group:focus-within .nav__menu { opacity: 1; visibility: visible; transform: none; }
.nav__menu::before { content: ""; position: absolute; inset-inline: 0; inset-block-end: 100%; height: 0.75rem; }
@media (max-width: 880px) {
  /* Top-level links are the main rows; the services sit under their parent, indented and lighter. */
  .nav a.nav__link { font-weight: 500; }
  .nav__group { display: block; border-block-end: 1px solid var(--line); padding-block-end: 0.6rem; }
  .nav .nav__group a.nav__link { border-block-end: 0; padding-block-end: 0.5rem; }
  .nav__menu { position: static; width: auto; margin-inline-start: 0.25rem; padding: 0 0 0 0; padding-inline-start: 0.9rem; border: 0; border-inline-start: 1px solid var(--line); border-radius: 0; box-shadow: none; opacity: 1; visibility: inherit; transform: none; background: none; }
  .nav__menu a { padding: 0.5rem 0.25rem; min-height: 44px; align-items: center; color: var(--muted); }
  .nav__menu a:hover { color: var(--ink); }
  .nav__menu strong { font-weight: 400; font-size: 0.98rem; }
  .nav__menu svg { width: 20px; height: 20px; margin-block-start: 0; }
  .nav__menu small { display: none; }
  .nav__menu::before { display: none; }
}

/* Work page */
.work--page { padding-block-start: 2rem; }
.project { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); justify-items: start; align-content: start; gap: 1.25rem 3rem; padding-block: 2.5rem; border-block-start: 1px solid var(--line); }
.project > * { grid-column: 2; }
.project > .project__head { grid-column: 1; grid-row: 1 / span 4; }
@media (max-width: 760px) { .project { grid-template-columns: 1fr; } .project > *, .project > .project__head { grid-column: 1; grid-row: auto; } }
.project__head { display: flex; align-items: center; gap: 1.1rem; }
.project__head h3 { font-size: clamp(1.7rem, 2vw + 1rem, 2.4rem); }
.project__kind { color: var(--muted); }
.project__text { max-width: 40rem; }
.project__meta p { color: var(--muted); font-size: 0.95rem; }
.project__meta .case__list { margin-block: 0.5rem 0; }
.project--slot { opacity: 0.95; }
.project--slot .client__logo { border-style: dashed; }

/* CTA band */
.band { background: var(--cobalt); color: var(--primary-ink); padding-block: clamp(2.5rem, 5vw, 4rem); }
.band__row { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; }
.band h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.4rem); }
.band p { margin-block-start: 0.5rem; opacity: 0.9; max-width: 34rem; }
.band__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.band .btn { background: var(--primary-ink); color: var(--primary); border-color: var(--primary-ink); }
.band .btn--ghost { background: transparent; color: var(--primary-ink); border-color: color-mix(in srgb, var(--primary-ink) 55%, transparent); }
.band .btn:focus-visible { outline-color: var(--primary-ink); }

/* ---------- Work ---------- */
.work { padding-block: clamp(4rem, 8vw, 7rem); }
.work .head h2 { font-size: clamp(2.2rem, 4vw + 0.5rem, 4rem); }
.clients { margin-block-end: clamp(2.5rem, 5vw, 4rem); }
.clients__toggle { display: block; margin-inline-start: auto; margin-block-end: 0.75rem; min-height: 44px; padding: 0 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--muted); font: inherit; font-size: 0.9rem; cursor: pointer; transition: color 0.2s, border-color 0.2s; }
.clients__toggle:hover { color: var(--ink); border-color: var(--ring); }
.clients__toggle[hidden] { display: none; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent); }
.marquee { cursor: grab; touch-action: pan-y; }
.clients.is-dragging .marquee { cursor: grabbing; user-select: none; }
.marquee img { -webkit-user-drag: none; }
.marquee__track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.marquee__set { display: flex; flex: none; }
.clients:hover .marquee__track, .clients:focus-within .marquee__track, .clients.is-paused .marquee__track, .clients.is-dragging .marquee__track, .clients.is-offscreen .marquee__track { animation-play-state: paused; }
.client { flex: none; }
.client a { display: grid; justify-items: center; align-content: start; gap: 0.35rem; width: 19rem; min-height: 17rem; padding: 2.25rem 1.75rem; text-align: center; color: var(--ink); text-decoration: none; transition: background-color 0.2s; }
.client a:hover { background: var(--bg-2); }
.client__logo { display: grid; place-items: center; flex: none; width: 84px; height: 84px; margin-block-end: 0.9rem; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: #fff; color: var(--cobalt); font-weight: 700; font-size: 1.5rem; }
.client__logo img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.client__logo img.client__photo { object-fit: cover; object-position: center top; padding: 0; }
.client__mark { width: 48px; height: 48px; color: var(--ring); }
.client__mark .d { fill: var(--ring); } .client__mark .r { fill: none; stroke: var(--ring); stroke-width: 3; }
.client--slot .client__logo { border-style: dashed; }
.client__text { display: grid; justify-items: center; gap: 0.5rem; }
.client strong { font-size: 1.3rem; font-weight: 600; }
.client small { color: var(--muted); font-size: 0.9rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.case { display: grid; justify-items: start; max-width: 44rem; }
.case__kind { color: var(--muted); }
.case h3 { font-size: clamp(1.8rem, 2vw + 1rem, 2.6rem); margin-block: 0.4rem 1rem; }
.case__list { display: flex; flex-wrap: wrap; gap: 0.5rem 0; margin-block: 1.5rem 2rem; }
.case__list li { padding-inline-end: 1.25rem; margin-inline-end: 1.25rem; border-inline-end: 1px solid var(--line); font-weight: 500; }
.case__list li:last-child { border-inline-end: 0; margin-inline-end: 0; }
@media (max-width: 600px) { .client a { width: 16.5rem; min-height: 15.5rem; padding: 1.75rem 1.25rem; } }
.quotes { margin-block-start: 4rem; display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.quote p { font-size: 1.25rem; line-height: 1.6; }
.quote footer { margin-block-start: 1rem; color: var(--muted); font-size: 0.95rem; }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem; position: relative; counter-reset: s; }
.steps::before { content: ""; position: absolute; inset-inline: 0; inset-block-start: 14px; height: 1px; background: var(--line); }
.step { position: relative; padding-block-start: 3rem; }
.step::before {
  content: ""; position: absolute; inset-inline-start: 0; inset-block-start: 0; width: 29px; height: 29px; border-radius: 50%;
  border: 2px solid var(--ring); background: var(--bg); box-shadow: 0 0 0 6px var(--bg);
}
.step::after {
  content: ""; position: absolute; inset-inline-start: 7px; inset-block-start: 7px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--cobalt); transition: transform 0.5s var(--ease);
}
[data-theme="dark"] .step::after { background: var(--sky); }
.rv-ready .step:not(.is-in)::after { transform: scale(0); }
.rv-ready .step::after { transition-delay: calc(var(--rv-delay, 0s) + 0.2s); }
.step h3 { font-size: 1.2rem; margin-block-end: 0.4rem; }
.step p { color: var(--muted); font-size: 0.97rem; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps::before { inset-inline: auto; inset-inline-start: 14px; inset-block: 0; width: 1px; height: auto; }
  .step { padding-block: 0 2rem; padding-inline-start: 3.25rem; }
}

/* ---------- Principles ---------- */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
.principles > div { padding-block-start: 1.5rem; border-block-start: 2px solid var(--cobalt); }
.principle__icon { width: 44px; height: 44px; padding: 10px; margin-block-end: 0.9rem; border-radius: 14px; background: var(--ring-bg, rgb(29 78 216 / 0.1)); color: var(--cobalt); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; box-sizing: border-box; }
[data-theme="dark"] .principle__icon { color: var(--sky); background: rgb(96 165 250 / 0.14); }
.principles h3 { font-size: 1.35rem; margin-block-end: 0.6rem; }
.principles p { color: var(--muted); }
@media (max-width: 860px) { .principles { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- FAQ ---------- */
.faq-list { max-width: none; }
.faq-list details { border-block-start: 1px solid var(--line); }
.faq-list details:last-child { border-block-end: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding-block: 1.4rem; font-weight: 500; font-size: 1.15rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 12px; height: 12px; border-inline-end: 2px solid var(--muted); border-block-end: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform 0.3s var(--ease);
}
.faq-list details[open] summary::after { transform: rotate(-135deg); }
.faq-list details p { padding-block-end: 1.5rem; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { padding-block-end: clamp(4rem, 8vw, 6rem); }
.contact h2 { font-size: clamp(2rem, 3.6vw + 0.5rem, 3.6rem); font-weight: 700; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); }
.direct { margin-block-start: 2rem; display: grid; gap: 1rem; }
.direct a { color: var(--ink); font-weight: 500; font-size: 1.1rem; overflow-wrap: anywhere; }
.direct small { display: block; color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.form { display: grid; gap: 1.25rem; }
.form .row { display: grid; gap: 1.25rem; grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.92rem; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.8rem 1rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 35%, transparent); }
.field .err { color: #c2332f; font-size: 0.85rem; min-height: 1.1em; }
[data-theme="dark"] .field .err { color: #ff8a85; }
.field.is-bad input, .field.is-bad select, .field.is-bad textarea { border-color: #c2332f; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { min-height: 1.5rem; font-size: 0.97rem; }
.form__status.ok { color: #14803c; }
[data-theme="dark"] .form__status.ok { color: #6ee7a0; }
.form__status.bad { color: #c2332f; }
[data-theme="dark"] .form__status.bad { color: #ff8a85; }
.cf-turnstile { min-height: 65px; }
@media (max-width: 860px) { .contact__grid { grid-template-columns: 1fr; } .form .row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { padding-block: clamp(3rem, 6vw, 4.5rem) 1.75rem; border-block-start: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 2.5rem 3rem; align-items: start; }
.footer .brand { color: var(--ink); }
.footer .brand svg { margin-inline-start: -8px; }
.footer__about p { margin: 0.75rem 0 0; max-width: 28ch; line-height: 1.6; }
.footer__h { margin: 0 0 1rem; color: var(--ink); font-size: 1rem; font-weight: 600; }
.footer ul { display: grid; gap: 0.65rem; margin: 0; padding: 0; list-style: none; }
.footer a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer__social { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-block-start: 1.5rem; }
.footer__social a { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
.footer__social a:hover { color: #fff; background: var(--primary); border-color: var(--primary); text-decoration: none; }
.footer__social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.footer .footer__cta { display: inline-flex; margin-block-start: 1.25rem; color: #fff; }
.footer .footer__cta:hover { color: #fff; text-decoration: none; }
.footer__copy { max-width: none; margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; padding-block-start: 1.5rem; border-block-start: 1px solid var(--line); font-size: 0.85rem; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer__about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Theme switch reveal (View Transitions) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Keyframes ---------- */
@keyframes sig-echo { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(8.4); opacity: 0; } }
@keyframes sig-travel { 0% { transform: translate(0, 0); opacity: 0; } 3% { opacity: 1; } 16% { transform: translate(var(--x), var(--y)); opacity: 1; } 18%, 100% { transform: translate(var(--x), var(--y)); opacity: 0; } }
@keyframes sig-flash { 0% { transform: scale(1); opacity: 0; } 3% { opacity: 0.95; } 14%, 100% { transform: scale(1.7); opacity: 0; } }
@keyframes trail { 0% { transform: translateX(-9px); opacity: 0; } 45% { transform: none; opacity: 0.9; } 100% { transform: translateX(6px); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(0.7); opacity: 0.6; } 50% { transform: scale(1); opacity: 1; } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes emit { 0% { transform: scale(0.1); opacity: 0; } 6% { opacity: 0.85; } 100% { transform: scale(1); opacity: 0; } }
@keyframes emit-small { 0% { transform: scale(0.9); opacity: 0; } 15% { opacity: 0.9; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes ripple { to { transform: scale(26); opacity: 0; } }
@keyframes tap { from { transform: scale(1); opacity: 0.9; } to { transform: scale(26); opacity: 0; } }
@keyframes swap { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 40% { transform: translateX(3px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .sig-dot, .sig-flash { display: none; }
  .sig-echo { animation: none !important; opacity: 0.35; transform: scale(3); }
  .sig-echo:nth-of-type(2) { transform: scale(5); opacity: 0.22; } .sig-echo:nth-of-type(3) { transform: scale(7); opacity: 0.12; }
  .marquee__track { animation: none !important; }
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .marquee__set--copy, .clients__toggle { display: none !important; }
  .spinner .arc { animation-duration: 2.5s !important; animation-iteration-count: infinite !important; }
  .progress { display: none; }
  [data-tilt] { transform: none !important; }
  .flow__step.is-active .flow__ico { animation: none !important; }
}

.hero--full { min-height: 100svh; }

/* ---------- Showcase: interactive concept demos ---------- */
.sc { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; margin-block-start: clamp(2rem, 5vw, 3.5rem); }
.sc-tabs { display: grid; gap: 0.25rem; }
.sc-tab {
  display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: center; text-align: start; width: 100%;
  min-height: 44px; padding: 1rem 1.1rem; border: 1px solid transparent; border-radius: var(--radius); background: transparent;
  color: var(--muted); font: inherit; cursor: pointer; transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.3s var(--ease);
}
.sc-tab svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sc-tab strong { display: block; font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.sc-tab small { display: block; font-size: 0.875rem; line-height: 1.45; }
.sc-tab:hover { background: var(--bg-2); }
.sc-tab[aria-selected="true"] { background: var(--bg-2); border-color: var(--line); color: var(--cobalt); transform: translateX(0.35rem); }
[dir="rtl"] .sc-tab[aria-selected="true"] { transform: translateX(-0.35rem); }
[data-theme="dark"] .sc-tab[aria-selected="true"] { color: var(--sky); }
.sc-stage { min-width: 0; }
.sc-panel { animation: swap 0.45s var(--ease) both; }
.sc-panel[hidden] { display: none; }
.sc-hint { margin-block-start: 1rem; color: var(--muted); font-size: 0.95rem; text-align: center; max-width: none; }
.sc-cta { margin-block-start: clamp(2rem, 5vw, 3rem); text-align: center; max-width: none; }

/* Device frames follow the theme like everything else; only the dark theme swaps in the stage palette. */
[data-theme="dark"] .dev { --bg: #050a1c; --bg-2: #0b1433; --ink: #eaf0ff; --muted: #a6b4dc; --line: #1d2a5a; --link: #8cbcfc; }
.dev {
  background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(10, 18, 48, 0.6), 0 0 0 1px rgba(96, 165, 250, 0.06);
  transition: transform 0.4s var(--ease); will-change: transform;
}
.dev p { max-width: none; }
.dev__bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.7rem 1rem; border-block-end: 1px solid var(--line); background: var(--bg-2); }
.dev__bar i { width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--line); }
.dev__url { margin-inline-start: 0.75rem; font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dev__badge { margin-inline-start: auto; font-size: 0.75rem; color: var(--bg); background: var(--sky); border-radius: 999px; padding: 0.15rem 0.65rem; white-space: nowrap; font-weight: 500; }
.dash, .crm, .flow { padding: clamp(1rem, 2.5vw, 1.6rem); }
.dash__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-block-end: 1.1rem; }
.dash__top h3 { font-size: 1.15rem; }
.seg { display: inline-flex; padding: 0.2rem; border: 1px solid var(--line); border-radius: 999px; }
.seg__btn { min-height: 44px; padding: 0 1rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 0.875rem; cursor: pointer; transition: background 0.25s, color 0.25s; }
.seg__btn[aria-pressed="true"] { background: var(--cobalt); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.kpi { padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); display: grid; gap: 0.15rem; }
.kpi small { color: var(--muted); font-size: 0.8rem; }
.kpi b { font-size: clamp(1.25rem, 2.6vw, 1.75rem); font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; font-size: 0.8rem; color: #6ee7b7; }
.chart { margin-block-start: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; }
.chart__title { color: var(--muted); font-size: 0.8rem; margin-block-end: 0.75rem; }
.chart__bars { display: flex; align-items: flex-end; gap: 0.5rem; height: 9rem; }
.bar { flex: 1; height: 100%; border-radius: 6px 6px 2px 2px; background: linear-gradient(to top, var(--cobalt), var(--sky)); transform-origin: bottom; transform: scaleY(0.05); transition: transform 0.7s var(--ease); }
.chart__bars .bar:nth-child(n+11) { display: none; }
.feed { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.1rem; }
.feed li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.75rem; align-items: center; padding: 0.6rem 0; border-block-start: 1px solid var(--line); font-size: 0.9rem; }
.feed__dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--sky); }
.feed small { color: var(--muted); }
.flow__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.flow__step { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 0.9rem; align-items: center; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 12px; opacity: 0.55; transition: opacity 0.4s, border-color 0.4s, background 0.4s; }
.flow__step b { display: block; font-weight: 600; }
.flow__step small { display: block; color: var(--muted); font-size: 0.85rem; }
.flow__ico { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 50%; background: var(--bg-2); color: var(--sky); transition: background 0.4s, color 0.4s; }
.flow__ico svg, .flow__tick svg, .phone__ico svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.flow__tick { width: 1.5rem; height: 1.5rem; display: grid; place-items: center; color: #6ee7b7; transform: scale(0); transition: transform 0.4s var(--ease); }
.flow__step.is-active { opacity: 1; border-color: var(--sky); background: var(--bg-2); }
.flow__step.is-active .flow__ico { background: var(--cobalt); color: #fff; animation: pulse 1s var(--ease) infinite; }
.flow__step.is-done { opacity: 1; }
.flow__step.is-done .flow__tick { transform: scale(1); }
.flow:not([data-js]) .flow__step { opacity: 1; }
.flow__foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-block-start: 1.1rem; }
.flow__foot .btn svg { width: 1.1rem; height: 1.1rem; fill: currentColor; stroke: none; }
.flow__foot .btn { gap: 0.5rem; }
.flow__log { color: var(--muted); font-size: 0.9rem; min-height: 1.4em; }
.dev--phone { width: min(19rem, 100%); margin-inline: auto; border-radius: 36px; padding: 0.6rem; background: var(--bg-2); }
.phone { position: relative; display: grid; grid-template-rows: 1fr auto; min-height: 31rem; background: var(--bg); border-radius: 28px; overflow: hidden; }
.phone__notch { position: absolute; inset-block-start: 0.6rem; inset-inline: 0; margin-inline: auto; width: 5rem; height: 1.3rem; border-radius: 999px; background: var(--bg-2); }
.dev__badge--phone { position: absolute; inset-block-start: 2.4rem; inset-inline-end: 1rem; margin: 0; z-index: 1; }
.phone__screen { padding: 4.5rem 1.1rem 1rem; display: grid; align-content: start; gap: 0.75rem; animation: swap 0.35s var(--ease) both; }
.phone__screen[hidden] { display: none; }
.phone__hello { font-size: 1.35rem; font-weight: 600; }
.phone__card { display: grid; gap: 0.2rem; padding: 1rem; border-radius: 16px; background: linear-gradient(135deg, var(--cobalt), #2f5fe6); color: #fff; }
.phone__card small { opacity: 0.85; }
.phone__card b { font-size: 1.15rem; font-weight: 600; }
.phone__row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.phone__ico { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: var(--bg); color: var(--sky); margin-inline-end: 0.5rem; }
.phone__screen[data-screen="0"] .phone__row { justify-content: flex-start; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.slot { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); color: var(--ink); font: inherit; font-size: 0.9rem; cursor: pointer; transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease); }
.slot[aria-pressed="true"] { background: var(--cobalt); border-color: var(--sky); transform: scale(1.04); }
.phone__cta { justify-content: center; width: 100%; }
.phone__cta.is-booked { background: #047857; }
.sw { position: relative; width: 3rem; height: 1.75rem; border: 0; border-radius: 999px; background: var(--line); cursor: pointer; transition: background 0.3s; flex: none; }
.sw::after { content: ""; position: absolute; inset-block-start: 0.2rem; inset-inline-start: 0.2rem; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: #fff; transition: transform 0.3s var(--ease); }
.sw[aria-checked="true"] { background: var(--cobalt); }
.sw[aria-checked="true"]::after { transform: translateX(1.25rem); }
[dir="rtl"] .sw[aria-checked="true"]::after { transform: translateX(-1.25rem); }
.phone__nav { display: grid; grid-template-columns: repeat(3, 1fr); border-block-start: 1px solid var(--line); background: var(--bg-2); }
.phone__nav button { min-height: 48px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 0.85rem; cursor: pointer; transition: color 0.25s; }
.phone__nav button[aria-selected="true"] { color: var(--sky); font-weight: 600; }
.crm__count { color: var(--muted); font-size: 0.9rem; }
.crm__count b { color: var(--ink); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.crm__rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.crm__row { display: grid; grid-template-columns: 1fr auto 6.5rem; gap: 0.75rem; align-items: center; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 12px; transition: background 0.4s, border-color 0.4s; }
.crm__row b { display: block; font-weight: 600; }
.crm__row small { color: var(--muted); font-size: 0.85rem; }
.chip { font-size: 0.8rem; padding: 0.2rem 0.7rem; border-radius: 999px; background: rgba(251, 191, 36, 0.15); color: #fcd34d; white-space: nowrap; transition: background 0.4s, color 0.4s; }
.crm__row[data-status="confirmed"] .chip { background: rgba(110, 231, 183, 0.15); color: #6ee7b7; }
.crm__row.is-flash { background: var(--bg-2); border-color: #6ee7b7; }
.crm__btn { justify-self: end; min-height: 44px; padding-inline: 1rem; font-size: 0.875rem; }
@media (max-width: 960px) {
  .sc { grid-template-columns: minmax(0, 1fr); }
  .sc-tab { scroll-snap-align: start; }
  .sc-tab[aria-selected="true"], [dir="rtl"] .sc-tab[aria-selected="true"] { transform: none; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr; }
  .kpi { grid-template-columns: 1fr auto auto; align-items: center; gap: 0.75rem; }
  .crm__row { grid-template-columns: 1fr auto; }
  .crm__btn { grid-column: 1 / -1; justify-self: stretch; }
  .dev__badge { display: none; }
}

/* ---------- Motion system ---------- */
.rv-ready [data-rv]:not(.is-in) { opacity: 0; transform: translateY(1.25rem); }
.rv-ready [data-rv] { transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.rv-ready [data-rv].is-in { transition-delay: var(--rv-delay, 0s); }
[data-tilt] { transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); }

/* ---------- About: story and health check ---------- */
.story__text { max-width: 62ch; display: grid; gap: 1.25rem; margin-block-start: 1.5rem; }
.story__text p { font-size: clamp(1.05rem, 0.6vw + 0.95rem, 1.25rem); line-height: 1.8; }
.check__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); margin-block-start: clamp(1.75rem, 4vw, 3rem); align-items: start; }
.check__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.check__item { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start; min-height: 44px; padding: 0.9rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color 0.25s, background 0.25s; }
.check__item:hover { border-color: var(--muted); }
.check__item:has(input:checked) { border-color: var(--cobalt); background: var(--bg-2); }
.check__item input { width: 1.25rem; height: 1.25rem; margin-block-start: 0.15rem; }
.check__result { position: sticky; inset-block-start: 6rem; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); display: grid; gap: 0.9rem; }
.check__score { font-size: 0.95rem; color: var(--muted); }
.check__score b { font-size: 2.25rem; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.check__meter { height: 0.5rem; border-radius: 999px; background: var(--line); overflow: hidden; }
.check__meter span { display: block; height: 100%; background: linear-gradient(to right, var(--cobalt), var(--sky)); transform-origin: left center; transform: scaleX(0); transition: transform 0.6s var(--ease); }
[dir="rtl"] .check__meter span { transform-origin: right center; }
.check__help ul { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.check__help a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; }
.check__help a:hover { border-color: var(--cobalt); }
.check__result .btn { justify-self: start; }
@media (max-width: 860px) { .check__grid { grid-template-columns: minmax(0, 1fr); } .check__result { position: static; } }

/* ---------- Services mesh ---------- */
.mesh__box { margin-block-start: clamp(1.5rem, 4vw, 3rem); display: grid; gap: 1.5rem; }
.mesh__svg { width: 100%; height: auto; max-height: 34rem; overflow: visible; }
.mesh__edge { stroke: var(--line); stroke-width: 1.4; fill: none; transition: stroke 0.3s, stroke-width 0.3s, opacity 0.3s; }
.mesh__edge.is-on { stroke: var(--cobalt); stroke-width: 2.2; }
[data-theme="dark"] .mesh__edge.is-on { stroke: var(--sky); }
.mesh__edge.is-dim { opacity: 0.35; }
.mesh__dot { fill: var(--cobalt); opacity: 0; }
.mesh__dot.is-back { fill: var(--sky); }
.mesh__flash { fill: none; stroke: var(--cobalt); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; pointer-events: none; }
[data-theme="dark"] .mesh__flash { stroke: var(--sky); }
.mesh__echo { fill: none; stroke: var(--cobalt); stroke-width: 1.4; vector-effect: non-scaling-stroke; opacity: 0; transform-box: fill-box; transform-origin: center; animation: sig-echo 6s linear infinite; pointer-events: none; }
.mesh__echo:nth-of-type(2) { animation-delay: -2s; } .mesh__echo:nth-of-type(3) { animation-delay: -4s; }
[data-theme="dark"] .mesh__echo { stroke: var(--sky); }
[data-theme="dark"] .mesh__dot { fill: var(--sky); }
.mesh__node { cursor: pointer; }
.mesh__disc { fill: var(--bg); stroke: var(--cobalt); stroke-width: 1.6; transition: fill 0.3s, stroke-width 0.3s; }
.mesh__icon { fill: none; stroke: var(--cobalt); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: stroke 0.3s; }
[data-theme="dark"] .mesh__disc, [data-theme="dark"] .mesh__icon { stroke: var(--sky); }
.mesh__label { fill: var(--ink); font-size: 15px; font-weight: 500; pointer-events: none; }
.mesh__node.is-link .mesh__disc { stroke-width: 3; }
.mesh__node.is-sel .mesh__disc { fill: var(--cobalt); stroke-width: 3; }
.mesh__node.is-sel .mesh__icon { stroke: #fff; }
.mesh__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.mesh__chip { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 1rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 0.9rem; cursor: pointer; transition: background 0.25s, border-color 0.25s, color 0.25s; }
.mesh__chip svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mesh__chip:hover { border-color: var(--muted); }
.mesh__chip[aria-pressed="true"] { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.mesh__info { min-height: 9rem; padding: clamp(1.1rem, 3vw, 1.75rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); animation: swap 0.4s var(--ease) both; }
.mesh__hint { color: var(--muted); max-width: none; }
.mesh__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; }
.mesh__head h3 { font-size: 1.25rem; }
.mesh__with { margin-block: 1rem 0.5rem; color: var(--muted); font-size: 0.9rem; max-width: none; }
.mesh__info ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.75rem 1.5rem; }
.mesh__info li { display: grid; gap: 0.15rem; padding-block-start: 0.75rem; border-block-start: 1px solid var(--line); }
.mesh__info li span { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 720px) { .mesh__svg { display: none; } }
@media (prefers-reduced-motion: reduce) { .mesh__dot, .mesh__flash, .mesh__echo { display: none; } }
.connect { padding-block: 0 clamp(3rem, 6vw, 5rem); }
.picker__more { margin-block-start: clamp(1.5rem, 3vw, 2.5rem); max-width: none; }
.phero + .mesh { padding-block-start: clamp(2rem, 4vw, 3rem); }

/* Compact services menu on desktop: two columns, names only. Descriptions live on the service pages. */
@media (min-width: 881px) {
  .nav__menu { width: 35rem; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.15rem; padding: 0.5rem; border-radius: 16px; }
  .nav__menu a { align-items: center; gap: 0.7rem; padding: 0.6rem 0.75rem; min-height: 44px; border-radius: 10px; }
  .nav__menu svg { width: 20px; height: 20px; margin-block-start: 0; }
  .nav__menu strong { font-weight: 500; font-size: 0.95rem; line-height: 1.3; }
  .nav__menu small { display: none; }
}

/* Mesh layout: diagram with the service buttons beside it, details underneath. Business systems is the hub. */
.mesh__label { paint-order: stroke; stroke: var(--bg); stroke-width: 6px; stroke-linejoin: round; }
.mesh__node--hub .mesh__disc { stroke-width: 2.4; }
.mesh__node--hub .mesh__label { font-weight: 600; }
@media (min-width: 721px) {
  .mesh__box { grid-template-columns: minmax(0, 1fr) 17rem; grid-template-areas: "svg chips" "info info"; align-items: center; column-gap: clamp(1rem, 3vw, 2.5rem); }
  .mesh__svg { grid-area: svg; }
  .mesh__chips { grid-area: chips; flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: center; }
  .mesh__chip { justify-content: flex-start; width: 100%; }
  .mesh__info { grid-area: info; }
}

/* 44px touch targets for the header controls on touch screens */
@media (max-width: 880px) { .icon-btn, .lang { min-width: 44px; min-height: 44px; } }

/* Mesh details: icon cards for each connected service */
.mesh__head { align-items: center; }
.mesh__title { display: flex; align-items: center; gap: 0.9rem; }
.mesh__ico { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--cobalt); color: var(--cobalt); }
[data-theme="dark"] .mesh__ico { border-color: var(--sky); color: var(--sky); }
.mesh__ico svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mesh__title .mesh__ico { background: var(--cobalt); color: #fff; width: 3.25rem; height: 3.25rem; border-color: var(--cobalt); }
.mesh__info ul { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0.75rem; }
.mesh__info li { padding-block-start: 0; border-block-start: 0; }
.mesh__card { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start; height: 100%; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); text-decoration: none; transition: transform 0.3s var(--ease), border-color 0.25s, box-shadow 0.3s; }
.mesh__card:hover { transform: translateY(-3px); border-color: var(--cobalt); box-shadow: 0 14px 28px -18px rgba(29, 78, 216, 0.55); text-decoration: none; }
[data-theme="dark"] .mesh__card:hover { border-color: var(--sky); }
.mesh__body { display: grid; gap: 0.25rem; }
.mesh__card strong { font-weight: 600; }
.mesh__card .mesh__body span { color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .mesh__card:hover { transform: none; } }

/* Service lists (service pages and /services/): icon cards that match the mesh details */
.others__list { gap: 0.75rem; }
.others__list a { align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; height: 100%; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); transition: transform 0.3s var(--ease), border-color 0.25s, box-shadow 0.3s; }
.others__list a:hover { background: var(--bg); transform: translateY(-3px); border-color: var(--cobalt); box-shadow: 0 14px 28px -18px rgba(29, 78, 216, 0.55); text-decoration: none; }
[data-theme="dark"] .others__list a:hover { border-color: var(--sky); }
.others__list svg { box-sizing: content-box; width: 1.4rem; height: 1.4rem; margin: 0; padding: 0.7rem; border: 1.5px solid var(--cobalt); border-radius: 50%; background: var(--bg-2); transition: background 0.25s, stroke 0.25s; }
[data-theme="dark"] .others__list svg { border-color: var(--sky); }
.others__list a:hover svg { background: var(--cobalt); stroke: #fff; }
.others__list strong { font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .others__list a:hover { transform: none; } }

/* Mesh buttons as service cards: icon circle, name, and the one-line summary for the selected one */
.mesh__chip { display: grid; grid-template-columns: auto 1fr; gap: 0.85rem; align-items: center; text-align: start; width: 100%; padding: 0.6rem 0.9rem; border-radius: 14px; background: var(--bg); transition: transform 0.3s var(--ease), border-color 0.25s, background 0.25s, box-shadow 0.3s; }
.mesh__chip svg { box-sizing: content-box; width: 1.2rem; height: 1.2rem; padding: 0.55rem; border: 1.5px solid var(--cobalt); border-radius: 50%; background: var(--bg-2); transition: background 0.25s, stroke 0.25s; }
[data-theme="dark"] .mesh__chip svg { border-color: var(--sky); }
.mesh__chip-text { display: grid; gap: 0.15rem; }
.mesh__chip strong { font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.mesh__chip small { display: none; font-size: 0.82rem; line-height: 1.45; color: var(--muted); }
.mesh__chip:hover { transform: translateX(0.25rem); border-color: var(--cobalt); }
[dir="rtl"] .mesh__chip:hover { transform: translateX(-0.25rem); }
.mesh__chip[aria-pressed="true"] { background: var(--cobalt); border-color: var(--cobalt); color: #fff; box-shadow: 0 14px 28px -18px rgba(29, 78, 216, 0.7); }
.mesh__chip[aria-pressed="true"] svg { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.6); stroke: #fff; }
.mesh__chip[aria-pressed="true"] small { display: block; color: rgba(255, 255, 255, 0.85); }
@media (min-width: 721px) { .mesh__box { grid-template-columns: minmax(0, 1fr) 21rem; } .mesh__chips { gap: 0.4rem; } }
@media (max-width: 720px) { .mesh__chips { flex-direction: column; flex-wrap: nowrap; align-items: stretch; } .mesh__chip small { display: block; } .mesh__chip:hover, [dir="rtl"] .mesh__chip:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { .mesh__chip:hover { transform: none; } }

/* ---------- Phones and tablets (≤860px) ----------
   Everything stacks vertically so the visitor reads the full detail without swiping sideways.
   Services open and close inside one section (an accordion), so the section stays short. */
@media (max-width: 860px) {
  main > section { padding-block: 1.25rem 1.5rem; }
  .head { margin-block-end: 1.25rem; }
  .head h2 { font-size: clamp(1.7rem, 6vw, 2.2rem); }
  .head p { font-size: 1rem; }
  .footer__grid > *, .mesh__box > *, .picker > *, .sc > * { min-width: 0; }

  .sc { grid-template-columns: 1fr; gap: 1rem; margin-block-start: 1rem; }
  .sc-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .sc-tab { padding: 0.5rem 0.75rem; min-height: 52px; }
  .sc-tab small { display: none; }
  .sc-tab[aria-selected="true"], [dir="rtl"] .sc-tab[aria-selected="true"] { transform: none; }

  /* Services: one service per slide with arrow buttons at the middle of both sides. */
  .picker { gap: 0.75rem; }
  .picker__list, .picker__list[hidden] { display: none; }
  .picker__stage { position: relative; }
  .picker__panels { display: flex; gap: 0.75rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab; }
  .picker__panels::-webkit-scrollbar { display: none; }
  .picker__panels.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
  .picker.is-ready .panel, .picker.is-ready .panel[hidden] { display: block; flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; animation: none; padding: 1.25rem 3rem; border-radius: 22px; }
  .picker__arrow { position: absolute; inset-block-start: 50%; translate: 0 -50%; z-index: 2; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 2px 8px rgb(0 0 0 / 0.12); }
  .picker__arrow--prev { inset-inline-start: 0.25rem; }
  .picker__arrow--next { inset-inline-end: 0.25rem; }
  .picker__arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .picker__arrow--next svg { transform: scaleX(-1); }
  [dir="rtl"] .picker__arrow--prev svg { transform: scaleX(-1); }
  [dir="rtl"] .picker__arrow--next svg { transform: none; }
  .picker__arrow:disabled { opacity: 0.35; cursor: default; }
  .picker__count { margin: 0; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
  .panel__icon { width: 44px; height: 44px; margin-block-end: 0.6rem; }
  .panel h3 { font-size: 1.4rem; }
  .panel__summary { margin-block: 0.3rem 0.8rem; font-size: 1rem; }
  .svc__points { gap: 0.4rem; font-size: 0.96rem; }
  .panel .btn { margin-block-start: 0.9rem; }
  .panel__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .picker__more { margin-block-start: 0.25rem; }

  /* One screen per section: trim secondary text and spacing so each section fits a phone screen. */
  #services .head p, .showcase .head p, .sc-hint { display: none; }
  .form { gap: 0.6rem; }
  .form .row { gap: 0.6rem; }
  .field { gap: 0.25rem; }
  .field .err { min-height: 0; }
  .field textarea { min-height: 5rem; }
  .contact__grid { gap: 1.25rem; }

  /* Clients: a plain vertical list on small screens instead of a sliding strip. */
  .marquee { overflow: visible; -webkit-mask-image: none; mask-image: none; cursor: auto; }
  [dir="rtl"] .marquee { direction: rtl; }
  .marquee__track { display: block; width: auto; animation: none; transform: none; }
  .marquee__set { flex-direction: column; }
  .marquee__set--copy, .client--rep, .clients__toggle { display: none; }
  .client a { display: flex; align-items: center; gap: 1rem; width: auto; min-height: 0; padding: 1rem 0; text-align: start; border-block-end: 1px solid var(--line); border-radius: 0; }
  .client a .client__logo { margin: 0; flex: none; width: 64px; height: 64px; }
  .client a .client__text { display: grid; justify-items: start; text-align: start; }

  /* Footer lists: two columns of 44px links instead of long columns of small ones. */
  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .footer ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
  .footer ul a { display: flex; align-items: center; min-height: 44px; }
  .footer__h { margin-block-end: 0.4rem; }
}

/* ---------- Section-by-section scrolling (all sizes) ----------
   Scrolling never runs free: each wheel flick or swipe lands on the next section, with a smooth glide.
   A section taller than the screen (a long form, say) still scrolls inside itself before it snaps on. */
html { scroll-padding-block-start: 4.25rem; scroll-snap-type: y mandatory; scroll-behavior: smooth; }
main > section { scroll-snap-align: start; }
main > section { min-height: calc(100svh - 4.25rem); display: flex; flex-direction: column; justify-content: center; }
main > section > .wrap { width: min(100% - 2 * var(--gutter), var(--max)); }
.footer { scroll-snap-align: end; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; scroll-snap-type: y proximity; } }

/* ---------- Active and hovered navigation ----------
   The page you are on, the section in view and the link under your finger each get the brand blue,
   so the current place is clear at a glance in both themes. */
.nav a.nav__link:hover, .nav a.nav__link:focus-visible { color: var(--link); }
.nav a.nav__link[aria-current] { color: var(--link); background: var(--bg-2); font-weight: 600; }
.nav__menu a:hover strong, .nav__menu a[aria-current] strong { color: var(--link); }
.nav__menu a[aria-current] { background: var(--bg-2); box-shadow: inset 3px 0 0 var(--ring); }
[dir="rtl"] .nav__menu a[aria-current] { box-shadow: inset -3px 0 0 var(--ring); }
.nav__menu a[aria-current] svg { color: var(--link); }
.footer a[aria-current] { color: var(--link); }
@media (max-width: 880px) {
  .nav a.nav__link[aria-current] { background: none; box-shadow: inset 3px 0 0 var(--ring); padding-inline-start: 0.75rem; }
  [dir="rtl"] .nav a.nav__link[aria-current] { box-shadow: inset -3px 0 0 var(--ring); }
}
.nav a.nav__link { white-space: nowrap; }

/* Phones and tablets scroll by touch: snap only when a swipe ends near a section edge, so a tall section can never trap the page. */
@media (max-width: 860px), (pointer: coarse) {
  html { scroll-snap-type: y proximity; }
}

/* 44px touch targets for the brand and direct-contact links. */
.brand { min-height: 44px; }
.contact a[href^="mailto:"], .contact a[href*="wa.me"] { display: inline-flex; align-items: center; min-height: 44px; }

.picker__stage .picker__arrow, .picker__count { display: none; }
@media (max-width: 860px) { .picker__stage .picker__arrow { display: inline-flex; } .picker__count { display: block; } }

@media (max-width: 860px) {
  .panel__actions .btn { flex: 1 1 100%; justify-content: center; text-align: center; border-radius: 16px; padding-block: 0.8rem; line-height: 1.3; }
}
@media (max-width: 860px) { .principles > div { display: grid; grid-template-columns: 44px 1fr; column-gap: 1rem; align-items: start; } .principle__icon { grid-row: span 2; margin: 0; } .principles h3 { margin-block-end: 0.3rem; } }

/* One screen per section on phones: trim the heaviest blocks (later rules win; all inside the 860px query). */
@media (max-width: 860px) {
  .hero__sub { font-size: 1rem; }
  .signal { max-height: 38svh; }
  .signal svg { max-height: 38svh; }
  .contact .head p { display: none; }
  .contact__grid { gap: 0.75rem; }
  .form { gap: 0.45rem; }
  .form .row { gap: 0.45rem; }
  .field { gap: 0.2rem; }
  .field input, .field select { min-height: 44px; padding-block: 0.4rem; }
  .field textarea { min-height: 3.5rem; }
  .field .err { min-height: 0; }
  .form .btn { min-height: 48px; padding-block: 0.6rem; }
  .sc-panel .dev__bar, .sc-panel .feed { display: none; }
  .sc-panel { max-height: none; }
}

.nav__toggle { display: none; }
@media (max-width: 880px) {
  .nav__group { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; padding-block-end: 0; }
  .nav .nav__group a.nav__link { padding-block-end: 0.5rem; }
  .nav__toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 12px; }
  .nav__toggle:hover { color: var(--ink); background: var(--bg-2); }
  .nav__toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s var(--ease); }
  .nav__group.is-open .nav__toggle svg { transform: rotate(180deg); }
  .nav__menu { grid-column: 1 / -1; margin-block-end: 0.6rem; }
  /* display:none, not just hidden, so a folded list can never sit invisibly over other links. */
  .nav__group:not(.is-open) .nav__menu { display: none; }
}
@media (prefers-reduced-motion: reduce) { .nav__toggle svg { transition: none; } }

/* Concept demos: denser layouts so each fits one phone screen (loaded last on purpose). */
@media (max-width: 860px) {
  .dash, .crm, .flow { padding: 0.8rem; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
  .kpi { display: grid; grid-template-columns: 1fr; gap: 0.05rem; padding: 0.55rem 0.6rem; }
  .kpi b { font-size: 1.15rem; }
  .chart__bars { height: 5.5rem; gap: 0.3rem; }
  .crm__rows { gap: 0.4rem; }
  .crm__row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.5rem; padding: 0.5rem 0.65rem; }
  .crm__btn { grid-column: auto; justify-self: end; min-height: 44px; padding-inline: 0.7rem; }
  .crm__row small { display: block; }
  .sc-cta { margin-block-start: 0.75rem; }
}

@media (max-width: 860px) {
  .flow__step { min-height: 0; padding-block: 0.4rem; }
  .flow__step small { display: none; }
  .flow__ico { width: 32px; height: 32px; }
  .flow__steps { gap: 0.3rem; }
  .flow__foot .btn { min-height: 44px; padding-block: 0.5rem; }
  .phone__hello { display: none; }
  .phone__row:last-of-type { display: none; }
  .sc-tab { min-height: 44px; padding-block: 0.3rem; }
  .form .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc__points li:nth-child(n+3) { display: none; }
  .picker.is-ready .panel, .picker.is-ready .panel[hidden] { padding-block: 0.9rem; }
  .picker__more { margin-block-start: 0; }
}

/* Short intro bands (page titles, closing call-to-action) size to their content so the next section shows right below. */
main > section.phero, main > section.band { min-height: 0; justify-content: flex-start; }
main > section.phero { padding-block: clamp(1.5rem, 5svh, 3rem) clamp(1.25rem, 4svh, 2.5rem); }
@media (max-width: 860px) { main > section.phero, main > section.band { padding-block: 1.25rem; } }

@media (max-width: 860px) {
  .others__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .others__list a { padding: 0.6rem 0.7rem; gap: 0.6rem; min-height: 56px; }
  .others__list small { display: none; }
  .others__list svg { width: 22px; height: 22px; margin-block-start: 0; }
  .check__grid { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; margin-block-start: 0.75rem; }
  .check__list { gap: 0.35rem; }
  .check__item { padding: 0.5rem 0.75rem; gap: 0.6rem; font-size: 0.95rem; }
  .check__result { position: static; padding: 0.8rem; gap: 0.5rem; }
}

@media (max-width: 860px) {
  .check .head p { display: none; }
  .check__item { min-height: 44px; padding-block: 0.35rem; }
  .dev--phone { width: min(16rem, 100%); }
  .phone__card { padding: 0.6rem; }
  .crm__row { padding-block: 0.35rem; }
}

@media (max-width: 860px) {
  .phone { min-height: 0; }
  .phone__screen { padding: 2.2rem 0.9rem 0.7rem; gap: 0.5rem; }
  .dev--phone { padding: 0.4rem; border-radius: 30px; }
  .phone__row { padding-block: 0.55rem; }
}

/* Clients: one per slide on small screens, prev/next buttons at the middle of both sides. */
.slide-arrow, .slide-count { display: none; }
.project__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; max-width: none; }
.work--project .project { border-block-end: 0; }
@media (max-width: 860px) {
  .clients { position: relative; }
  .marquee { overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab; touch-action: pan-x pan-y; }
  .marquee::-webkit-scrollbar { display: none; }
  .clients.is-dragging .marquee { scroll-snap-type: none; }
  .marquee__track { display: block; }
  .marquee__set { display: flex; flex-direction: row; gap: 0.75rem; }
  .client { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
  .client a { display: grid; justify-items: center; gap: 0.35rem; min-height: 0; padding: 1.5rem 3.25rem; text-align: center; border: 1px solid var(--line); border-radius: 22px; }
  .client a .client__logo { margin: 0 0 0.6rem; width: 84px; height: 84px; }
  .client a .client__text { justify-items: center; text-align: center; }
  .slide-arrow { display: inline-flex; position: absolute; inset-block-start: 50%; translate: 0 -50%; z-index: 2; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 2px 8px rgb(0 0 0 / 0.12); }
  .slide-arrow--prev { inset-inline-start: 0.25rem; }
  .slide-arrow--next { inset-inline-end: 0.25rem; }
  .slide-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .slide-arrow--next svg { transform: scaleX(-1); }
  [dir="rtl"] .slide-arrow--prev svg { transform: scaleX(-1); }
  [dir="rtl"] .slide-arrow--next svg { transform: none; }
  .slide-arrow:disabled { opacity: 0.35; cursor: default; }
  .slide-count { display: block; margin: 0.6rem 0 0; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
}

/* Sections size to their content (never beyond one screen); only the home hero claims a full screen. */
main > section:not(.hero) { min-height: 0; padding-block: clamp(2.5rem, 7svh, 4.5rem); }
@media (max-width: 860px) { main > section:not(.hero) { padding-block: 1.25rem 1.5rem; } }

/* Desktop: keep the two heaviest sections inside one screen. */
@media (min-width: 861px) {
  #services .head p, .showcase .head p { display: none; }
  #services .head, .showcase .head { margin-block-end: 1rem; }
  .picker .panel__icon { display: none; }
  .svc__points { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem 1.5rem; }
  .sc { margin-block-start: 1rem; }
  .sc-tab { padding-block: 0.6rem; }
  .sc-tab small { display: none; }
  .sc-panel .feed { display: none; }
  .chart__bars { height: 7rem; }
  .sc-hint { display: none; }
}

@media (min-width: 861px) {
  main > section:not(.hero) { padding-block: clamp(1.5rem, 4svh, 2.5rem); }
  .flow__step { min-height: 0; padding-block: 0.4rem; }
  .flow__step small { display: none; }
  .flow__ico { width: 32px; height: 32px; }
  .flow__steps { gap: 0.3rem; }
  .phone { min-height: 0; }
  .phone__screen { padding: 2.2rem 0.9rem 0.7rem; gap: 0.5rem; }
  .phone__hello { display: none; }
  .crm__row { padding-block: 0.4rem; }
  .crm__rows { gap: 0.4rem; }
  .kpi { padding-block: 0.6rem; }
  .chart__bars { height: 5.5rem; }
}

/* Desktop, short windows: trim headings and paddings so whole sections show at once. */
@media (min-width: 861px) {
  main > section:not(.hero) { padding-block: clamp(1rem, 3svh, 2rem); }
  .head { margin-block-end: 0.75rem; }
  .head h2 { font-size: clamp(1.9rem, 4.2svh + 0.6rem, 2.6rem); }
  .picker .panel { padding: 1.25rem 1.75rem; }
  .picker .tab { padding-block: 0.55rem; }
  .check .head p { display: none; }
  .check__item { padding-block: 0.5rem; }
  .check__grid { margin-block-start: 0.75rem; }
  .mesh__chip small { display: none; }
  .mesh__chip { min-height: 40px; }
  .mesh__svg { max-height: 20rem; }
  .mesh__box { margin-block-start: 0.5rem; gap: 0.75rem; }
  .mesh__info { min-height: 0; padding: 1rem 1.25rem; }
  .mesh .head p { display: none; }
  .phero + .mesh { padding-block-start: 1rem; }
}

@media (min-width: 861px) {
  .mesh .mesh__box { grid-template-columns: minmax(0, 1fr) 24rem; }
  .mesh .mesh__chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
  .mesh .mesh__chip { min-height: 44px; padding-block: 0; }
  .mesh .mesh__chip-text small { display: none; }
  .mesh .mesh__svg { max-height: 17rem; }
  .mesh__info ul { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem 1.25rem; }
  .mesh__info li span { font-size: 0.85rem; line-height: 1.4; }
  .mesh__with { margin-block: 0.5rem 0.25rem; }
}

@media (min-width: 861px) {
  .mesh__with { display: none; }
  .mesh__info li { padding: 0.5rem 0.7rem; }
  .mesh__info li span span, .mesh__info li > span > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .mesh__info .mesh__head { margin-block-end: 0.5rem; }
}

@media (min-width: 861px) {
  .mesh__card { padding: 0.6rem 0.8rem; gap: 0.6rem; }
  .mesh__card .mesh__body span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.85rem; line-height: 1.4; }
  .mesh__card svg { width: 28px; height: 28px; }
}

/* Section heading with its call to action on the opposite side (stacked under the title on small screens). */
.head--action { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 2rem; }
.head--action > h2, .head--action > p:not(.head__action) { grid-column: 1; }
.head--action > .head__action { grid-column: 2; grid-row: 1 / span 2; align-self: center; justify-self: end; }
@media (max-width: 860px) {
  .head--action { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
  .head--action > .head__action { grid-column: 1; grid-row: auto; justify-self: start; min-height: 44px; padding-block: 0.55rem; }
}

/* With the details panel gone the diagram can use the room. */
@media (min-width: 861px) { .mesh .mesh__svg { max-height: min(32rem, 62svh); } }

@media (max-width: 860px) {
  .mesh .mesh__chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
  .mesh .mesh__chip { min-height: 52px; padding-block: 0.3rem; }
  .mesh .mesh__chip small { display: none; }
}

.client a[aria-current="true"] { background: var(--bg-2); }
.project[hidden] { display: none; }

/* The strip's repeated copy exists only for the desktop loop; it must never show in the small-screen carousel. */
@media (max-width: 860px) { .marquee .marquee__set--copy, .marquee .client--rep { display: none; } }

/* Services diagram on small screens: one service per slide with arrows at the middle of both sides. */
.mesh__slider { display: none; }
@media (max-width: 860px) {
  .mesh .mesh__chips { display: none; }
  .mesh__slider { display: block; position: relative; }
  .mesh__slides { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.75rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
  .mesh__slides::-webkit-scrollbar { display: none; }
  .mesh__slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; display: grid; justify-items: center; align-content: center; gap: 0.5rem; padding: 1.5rem 3.5rem; text-align: center; border: 1px solid var(--line); border-radius: 22px; background: var(--bg-2); }
  .mesh__slide-ico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--cobalt); color: var(--cobalt); }
  [data-theme="dark"] .mesh__slide-ico { border-color: var(--sky); color: var(--sky); }
  .mesh__slide-ico svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .mesh__slide h3 { font-size: 1.4rem; }
  .mesh__slide p { color: var(--muted); max-width: none; }
  .mesh__slide .btn { margin-block-start: 0.5rem; }
}

/* Desktop: service buttons back to one readable column with their one-line descriptions. */
@media (min-width: 861px) {
  .mesh .mesh__box { grid-template-columns: minmax(0, 1fr) 22rem; }
  .mesh .mesh__chips { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 0.4rem; }
  .mesh .mesh__chip { min-height: 44px; padding-block: 0.45rem; }
  .mesh .mesh__chip small { display: block; font-size: 0.82rem; line-height: 1.35; }
  .mesh .mesh__chip-text small { display: block; }
}
@media (min-width: 861px) { .mesh .mesh__box { column-gap: 3rem; } .mesh .mesh__svg { margin-inline-end: 1rem; } }

/* Desktop: service buttons show only the name; the one-line description floats above as a speech bubble. */
@media (min-width: 861px) {
  .mesh .mesh__chip { position: relative; min-height: 48px; padding-block: 0; }
  .mesh .mesh__chip-text small {
    display: block; position: absolute; inset-inline: 0.25rem; inset-block-end: calc(100% + 12px); z-index: 6;
    padding: 0.65rem 0.9rem; border-radius: 14px; background: var(--ink); color: var(--bg);
    font-size: 0.85rem; line-height: 1.45; font-weight: 400; text-align: start; pointer-events: none;
    box-shadow: 0 14px 28px -14px rgba(10, 18, 48, 0.55);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0.2s;
  }
  .mesh .mesh__chip-text small::after {
    content: ""; position: absolute; inset-inline-start: 2rem; inset-block-end: -5px; width: 10px; height: 10px;
    background: var(--ink); transform: rotate(45deg);
  }
  .mesh .mesh__chip:hover .mesh__chip-text small, .mesh .mesh__chip:focus-visible .mesh__chip-text small { opacity: 1; visibility: visible; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .mesh .mesh__chip-text small { transition: none; } }

/* The description bubble now floats above the diagram node, not above the side buttons. */
@media (min-width: 861px) {
  .mesh .mesh__chip-text small { display: none; }
  .mesh .mesh__box { position: relative; }
  .mesh__tip {
    position: absolute; z-index: 6; width: max-content; max-width: 16rem; padding: 0.65rem 0.9rem; border-radius: 14px;
    background: var(--ink); color: var(--bg); font-size: 0.85rem; line-height: 1.45; text-align: start; pointer-events: none;
    box-shadow: 0 14px 28px -14px rgba(10, 18, 48, 0.55);
    transform: translate(-50%, calc(-100% - 14px) ) translateY(6px); opacity: 0; visibility: hidden;
    transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0.2s;
  }
  .mesh__tip.is-on { opacity: 1; visibility: visible; transform: translate(-50%, calc(-100% - 14px)); }
  .mesh__tip::after { content: ""; position: absolute; inset-inline-start: var(--tip-arrow, 50%); inset-block-end: -5px; width: 10px; height: 10px; margin-inline-start: -5px; background: var(--ink); transform: rotate(45deg); }
}
@media (prefers-reduced-motion: reduce) { .mesh__tip { transition: none; } }
@media (max-width: 860px) { .mesh__tip { display: none; } }
