/* ==========================================================================
   Zexaapp (زکسا) — main stylesheet
   Design system → tokens → base → components → sections → responsive
   RTL-first. Colours are defined once in :root and reused everywhere.
   ========================================================================== */

/* ── 1. TOKENS ───────────────────────────────────────────────────────── */
:root {
  /* Colour system (do not add colours outside this list) */
  --bg:            #0A0A0F;
  --bg-2:          #0D1B2A;
  --surface:       #112240;
  --text:          #E8EDF2;
  --text-muted:    #8892A4;
  --accent:        #4A9EFF;
  --accent-deep:   #1E6FD9;
  --white:         #FFFFFF;
  --border:        #1E2D42;

  /* Derived tints (same hues, different alpha) */
  --accent-08:     rgba(74, 158, 255, 0.08);
  --accent-15:     rgba(74, 158, 255, 0.15);
  --accent-30:     rgba(74, 158, 255, 0.30);
  --surface-60:    rgba(17, 34, 64, 0.60);
  --surface-80:    rgba(17, 34, 64, 0.80);
  --bg-80:         rgba(10, 10, 15, 0.80);

  /* Typography — ONE Persian family for the whole site (headings + body).
     Mixing two Persian faces made section titles look "off"; Vazirmatn now
     covers everything, with system fallbacks if the CDN is unreachable. */
  --font-display: "Vazirmatn", "IRANSansX", "Tahoma", sans-serif;
  --font-body:    "Vazirmatn", "IRANSansX", "Tahoma", sans-serif;
  --font-mono:    "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  /* Spacing & shape */
  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --container: 1220px;
  --section-y: clamp(64px, 8vw, 120px);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.45s;

  /* Elevation */
  --shadow-sm: 0 4px 18px rgba(0, 0, 0, 0.35);
  --shadow:    0 18px 45px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 12px 40px rgba(30, 111, 217, 0.35);
}

/* ── 2. RESET & BASE ─────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  direction: rtl;
  text-align: right;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.55;
  letter-spacing: 0;
}

p { color: var(--text-muted); }

a { color: inherit; text-decoration: none; transition: color .25s var(--ease); }
a:hover { color: var(--accent); }

img, svg, canvas { display: block; max-width: 100%; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  direction: rtl;
}

ul, ol { list-style: none; }

/* The `hidden` attribute must always win — several overlays below set
   `display: grid`, which would otherwise override the UA stylesheet and
   leave an invisible layer swallowing clicks. */
[hidden] { display: none !important; }

::selection { background: var(--accent-30); color: var(--white); }

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

.mono, [dir="ltr"].mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Latin-script fields (phone, email) read left-to-right. */
input[dir="ltr"], textarea[dir="ltr"] { text-align: left; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -60px; right: 20px; z-index: 200;
  background: var(--accent); color: var(--bg);
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-weight: 700; transition: top .3s var(--ease);
}
.skip-link:focus { top: 16px; color: var(--bg); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-deep); }

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

/* ── 3. LOADING SCREEN ───────────────────────────────────────────────── */
.loader {
  position: fixed; inset: 0; z-index: 999;
  display: grid; place-content: center; gap: 22px; justify-items: center;
  background: var(--bg);
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
.loader.is-hidden { opacity: 0; visibility: hidden; }

.loader__mark {
  font-family: var(--font-display);
  font-size: clamp(38px, 8vw, 62px);
  font-weight: 900;
  background: linear-gradient(120deg, var(--white), var(--accent) 55%, var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 2px;
  animation: markPulse 1.6s var(--ease) infinite;
}
@keyframes markPulse { 0%,100% { opacity: 1 } 50% { opacity: .55 } }

.loader__bar {
  width: 190px; height: 3px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.loader__bar span {
  display: block; height: 100%; width: 40%;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  border-radius: inherit;
  animation: barSlide 1.15s var(--ease) infinite;
}
@keyframes barSlide {
  0%   { transform: translateX(140%) }
  100% { transform: translateX(-260%) }
}

/* ── 4. NAVIGATION ───────────────────────────────────────────────────── */
.nav {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 100;
  transition: background .35s var(--ease), border-color .35s var(--ease),
              box-shadow .35s var(--ease), padding .35s var(--ease);
  border-block-end: 1px solid transparent;
  padding-block: 8px;
}
.nav.is-stuck {
  background: var(--bg-80);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-block-end-color: var(--border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}

.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 68px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { display: grid; place-items: center; }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__text b {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 800; color: var(--text);
}
.brand__text i {
  font-style: normal; font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 1.4px;
  color: var(--text-muted); text-transform: uppercase;
}
.brand:hover .brand__text b { color: var(--accent); }

.nav__links { display: flex; align-items: center; gap: 6px; }
/* `:not(.btn)` matters: without it this rule (specificity 0-1-1) beat
   `.btn--primary` (0-1-0) and painted the "درخواست پروژه" CTA label in the
   muted grey, which read as washed-out text on the blue gradient. */
.nav__links > a:not(.btn) {
  position: relative;
  padding: 9px 14px;
  font-size: 15px; font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}
.nav__links > a:not(.btn):hover { color: var(--text); background: var(--accent-08); }
.nav__links > a.is-active { color: var(--text); }
.nav__links > a.is-active::after {
  content: ""; position: absolute; inset-block-end: 2px;
  inset-inline: 14px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
}
.nav__cta { margin-inline-start: 8px; }

.nav__burger {
  display: none; width: 44px; height: 44px;
  background: var(--surface-60); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav__burger span {
  display: block; width: 20px; height: 2px; border-radius: 2px;
  background: var(--text); transition: transform .3s var(--ease), opacity .2s;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── 5. BUTTONS ──────────────────────────────────────────────────────── */
.btn {
  --btn-pad: 12px 22px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: var(--btn-pad);
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700; line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .3s var(--ease),
              background .3s var(--ease), border-color .3s var(--ease), color .3s;
  overflow: hidden;
}
.btn i { font-size: 18px; }
.btn:active { transform: translateY(1px) scale(.99); }

.btn--sm  { --btn-pad: 9px 16px;  font-size: 13.5px; }
.btn--lg  { --btn-pad: 16px 32px; font-size: 16px; }
.btn--block { width: 100%; }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: var(--white);
  box-shadow: 0 8px 24px rgba(30, 111, 217, .28);
}
.btn--primary:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn--ghost {
  background: var(--surface-60);
  border-color: var(--border);
  color: var(--text);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  color: var(--white);
  border-color: var(--accent-30);
  background: var(--surface-80);
  transform: translateY(-2px);
}

.btn--danger {
  background: linear-gradient(135deg, #E2564B, #B23A31);
  color: var(--white);
}
.btn--danger:hover { color: var(--white); transform: translateY(-2px); }

.btn--danger-ghost {
  background: transparent; border-color: var(--border); color: var(--text-muted);
}
.btn--danger-ghost:hover { color: #E2564B; border-color: rgba(226, 86, 75, .45); }

/* Animated gradient border on hover */
.btn--glow::before {
  content: "";
  position: absolute; inset: -2px; z-index: -1;
  border-radius: inherit;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-deep),
              var(--white), var(--accent));
  opacity: 0;
  transition: opacity .35s var(--ease);
  animation: spinBorder 3.5s linear infinite;
}
.btn--glow { z-index: 0; }
.btn--glow:hover::before { opacity: .85; }
@keyframes spinBorder { to { transform: rotate(360deg) } }

.btn__spinner { display: none; }
.btn.is-loading .btn__label { visibility: hidden; }
.btn.is-loading .btn__spinner {
  display: block;
  position: absolute; inset-block-start: 50%; inset-inline-start: 50%;
  width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }

/* ── 6. SHARED BITS ──────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px;
  background: var(--accent-08);
  border: 1px solid var(--accent-30);
  border-radius: var(--radius-pill);
  color: var(--accent);
  font-size: 13.5px; font-weight: 600;
}
.pill i { font-size: 16px; }

.tag {
  display: inline-block;
  padding: 5px 13px;
  background: var(--accent-08);
  border: 1px solid var(--accent-30);
  border-radius: var(--radius-pill);
  color: var(--accent);
  font-size: 12.5px; font-weight: 600;
}
.tag--sm { padding: 3px 10px; font-size: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips li {
  padding: 4px 11px;
  background: rgba(232, 237, 242, .05);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 12.5px;
}
.chips--sm li { font-family: var(--font-mono); font-size: 11.5px; padding: 3px 9px; }

.grad {
  background: linear-gradient(115deg, var(--white) 5%, var(--accent) 45%, var(--accent-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Image container that falls back to a styled gradient tile when the file
   is missing (or no cover was declared). JS adds .is-missing on error. */
.media { position: relative; overflow: hidden; }
.media > img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.media > .placeholder { position: absolute; inset: 0; display: none; }
.media.is-missing > img { display: none; }
.media.is-missing > .placeholder { display: grid; }

.placeholder {
  --accent-local: var(--accent);
  display: grid; place-content: center; gap: 12px; justify-items: center;
  width: 100%; height: 100%; min-height: 190px;
  background:
    radial-gradient(120% 100% at 70% 0%, var(--accent-15), transparent 60%),
    linear-gradient(135deg, var(--surface), var(--bg-2));
  color: var(--text-muted);
  text-align: center; padding: 24px;
}
.placeholder i { font-size: 48px; color: var(--accent); opacity: .75; }
.placeholder span { font-size: 14px; font-weight: 600; color: var(--text); }

.empty {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* Flash messages */
.flash-stack {
  position: fixed; inset-block-start: 88px; inset-inline: 0; z-index: 95;
  display: grid; gap: 10px;
  pointer-events: none;
}
.flash {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-80);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  font-size: 14.5px;
  animation: flashIn .4s var(--ease) both;
}
.flash i { font-size: 20px; }
.flash--success { border-color: rgba(74, 222, 128, .35); color: #86EFAC; }
.flash--error   { border-color: rgba(226, 86, 75, .38);  color: #FCA5A5; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-12px) } }

/* ── 7. SECTIONS ─────────────────────────────────────────────────────── */
.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(36px, 5vw, 60px); }
.section--alt {
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(17, 34, 64, .55), transparent 70%),
    var(--bg-2);
  border-block: 1px solid var(--border);
}

.section__head { max-width: 720px; margin-block-end: 52px; }
.section__head--row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 28px; max-width: none;
}
.section__eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12.5px; letter-spacing: 1.5px;
  color: var(--accent); text-transform: uppercase;
  margin-block-end: 12px;
}
/* Section titles: one family, one weight, one colour — everywhere.
   1.6rem on mobile, 2.4rem from tablet up (see the media query below). */
.section__title,
.page-hero__title,
.cta-strip h2 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1.65;
  letter-spacing: -0.3px;
}
.section__title { margin-block-end: 14px; }
.section__lead { font-size: 16.5px; max-width: 640px; }

.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ── 8. HERO ─────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; align-items: center;
  padding-block: 140px 110px;
  overflow: hidden;
  isolation: isolate;
}
.hero__canvas {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
}
.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(70% 55% at 72% 22%, rgba(30, 111, 217, .22), transparent 62%),
    radial-gradient(60% 60% at 10% 85%, rgba(17, 34, 64, .55), transparent 65%),
    linear-gradient(180deg, transparent 45%, var(--bg) 96%);
}
.hero__inner { max-width: 880px; }

.hero__title {
  font-size: clamp(32px, 6vw, 68px);
  line-height: 1.4;
  margin-block: 22px 20px;
  letter-spacing: -0.5px;
}
.typewriter { position: relative; }
.typewriter::after {
  content: "";
  display: inline-block;
  width: 3px; height: .95em;
  margin-inline-start: 6px;
  vertical-align: -0.12em;
  background: var(--accent);
  animation: caret .9s step-end infinite;
}
@keyframes caret { 0%, 100% { opacity: 1 } 50% { opacity: 0 } }

.hero__sub {
  font-size: clamp(15.5px, 1.5vw, 18.5px);
  max-width: 640px;
  margin-block-end: 34px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-block-end: 34px; }

.hero__badges { display: flex; flex-wrap: wrap; gap: 22px; }
.hero__badges li {
  display: flex; align-items: center; gap: 7px;
  color: var(--text-muted); font-size: 14px;
}
.hero__badges i { color: var(--accent); font-size: 17px; }

.scroll-hint {
  position: absolute; inset-block-end: 26px; inset-inline-start: 50%;
  transform: translateX(50%);
  display: grid; justify-items: center; gap: 8px;
  color: var(--text-muted); font-size: 12px;
}
.scroll-hint em { font-style: normal; }
.scroll-hint__mouse {
  width: 24px; height: 38px;
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  display: grid; justify-items: center; padding-block-start: 7px;
}
.scroll-hint__mouse span {
  width: 3px; height: 7px; border-radius: 2px;
  background: var(--accent);
  animation: wheel 1.6s var(--ease) infinite;
}
@keyframes wheel {
  0%   { transform: translateY(0); opacity: 1 }
  70%  { transform: translateY(11px); opacity: 0 }
  100% { transform: translateY(0); opacity: 0 }
}
.scroll-hint:hover { color: var(--accent); }

/* ── 9. (بخش STATS حذف شد — نوار شمارنده‌ها از صفحه اصلی برداشته شده) ── */

/* ── 10. CARDS ───────────────────────────────────────────────────────── */
.card {
  position: relative;
  padding: 28px 26px;
  background: linear-gradient(160deg, var(--surface-60), rgba(13, 27, 42, .55));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .4s var(--ease),
              box-shadow .4s var(--ease);
}
.card::after {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  background: radial-gradient(320px 200px at var(--mx, 50%) var(--my, 0%),
              var(--accent-15), transparent 70%);
  opacity: 0; transition: opacity .4s var(--ease);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-30);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .45), 0 0 0 1px var(--accent-15);
}
.card:hover::after { opacity: 1; }

.card__icon {
  display: grid; place-items: center;
  width: 54px; height: 54px;
  margin-block-end: 18px;
  border-radius: 15px;
  background: linear-gradient(140deg, var(--accent-15), transparent);
  border: 1px solid var(--accent-30);
  color: var(--accent);
  font-size: 27px;
  transition: transform .4s var(--ease);
}
.card:hover .card__icon { transform: scale(1.06) rotate(-4deg); }
.card__icon--plain { background: var(--accent-08); }

.card__title { font-size: 19px; margin-block-end: 10px; }
.card__text { font-size: 14.8px; line-height: 1.95; margin-block-end: 16px; }

.card__link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-block-start: 16px;
  color: var(--accent); font-size: 14px; font-weight: 600;
}
.card__link i { transition: transform .3s var(--ease); }
.card__link:hover i { transform: translateX(-4px); }

/* Featured (wide) cards — two per row, forced to identical height so the
   home-page showcase never looks ragged when one project has a longer
   summary than the other. */
.featured__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 24px;
  align-items: stretch;
}
.wide-card {
  display: flex; flex-direction: column;
  height: 100%;
  background: linear-gradient(160deg, var(--surface-60), rgba(13, 27, 42, .5));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .4s var(--ease),
              box-shadow .4s var(--ease);
}
.wide-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-30);
  box-shadow: 0 24px 55px rgba(0, 0, 0, .45);
}
/* 16/10 matches the real aspect ratio of every file in
   static/images/portfolio/, so covers are never cropped. */
.wide-card__media {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 10;
  border-block-end: 1px solid var(--border);
  background: var(--bg-2);
}
.wide-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease);
}
.wide-card:hover .wide-card__media img { transform: scale(1.05); }
.wide-card__body {
  padding: 24px 26px 26px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 11px;
  flex: 1;
}
.wide-card__body h3 {
  font-size: 20px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Clamped to exactly two lines so both cards reserve the same block. */
.wide-card__body p {
  font-size: 14.6px; line-height: 1.85;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(2 * 1.85em);
}
.wide-card__body .btn { margin-block-start: auto; }

/* ── 11. PROCESS ─────────────────────────────────────────────────────── */
.process {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.process__line {
  position: absolute; inset-block-start: 34px; inset-inline: 12%;
  height: 2px; background: var(--border); border-radius: 2px;
  overflow: hidden;
}
.process__line i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  transition: width 1.4s var(--ease);
}
.process__line.is-drawn i { width: 100%; }

.process__step {
  position: relative;
  text-align: center;
  padding: 0 12px;
}
.process__num {
  position: relative; z-index: 2;
  width: 68px; height: 68px; margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  font-family: var(--font-display);
  font-size: 25px; font-weight: 900;
  color: var(--accent);
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease),
              transform .4s var(--ease);
}
.process__step:hover .process__num {
  border-color: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-08);
  transform: translateY(-4px);
}
.process__icon { font-size: 26px; color: var(--accent); margin-block-end: 8px; }
.process__step h3 { font-size: 17.5px; margin-block-end: 8px; }
.process__step p { font-size: 14.2px; }

/* ── 12. REQUEST SECTION & FORMS ─────────────────────────────────────── */
.section--request {
  position: relative;
  background:
    radial-gradient(80% 60% at 80% 10%, rgba(30, 111, 217, .16), transparent 60%),
    var(--bg);
}
.request__wrap {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 44px;
  align-items: start;
}
.request__points { display: grid; gap: 12px; margin-block: 26px; }
.request__points li {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-muted); font-size: 14.5px;
}
.request__points i { color: var(--accent); font-size: 20px; }

.request__contact { display: grid; gap: 12px; }
.request__contact a {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 18px;
  background: var(--surface-60);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.request__contact a:hover { border-color: var(--accent-30); transform: translateX(-4px); }
.request__contact i { font-size: 23px; color: var(--accent); }
.request__contact span { display: grid; }
.request__contact em {
  font-style: normal; font-size: 12px; color: var(--text-muted);
}
.request__contact b { font-family: var(--font-mono); font-size: 14.5px; color: var(--text); }

.request__card {
  position: relative;
  padding: 34px;
  background: linear-gradient(155deg, var(--surface-60), rgba(13, 27, 42, .7));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-block-end: 18px; }
.field label {
  display: block; margin-block-end: 8px;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.field label b { color: var(--accent); }
.field .opt { color: var(--text-muted); font-weight: 400; font-size: 12.5px; }

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 13px 16px;
  background: rgba(10, 10, 15, .55);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14.5px; font-family: var(--font-body);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease),
              background .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.9; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(136, 146, 164, .65); }

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-15);
  background: rgba(10, 10, 15, .8);
}
.field.has-error input,
.field.has-error textarea,
.field.has-error select { border-color: #E2564B; }

.field__error {
  display: none;
  margin-block-start: 6px;
  color: #FCA5A5; font-size: 12.5px;
}
.field.has-error .field__error { display: block; }
.field__hint {
  display: block; margin-block-start: 6px;
  color: var(--text-muted); font-size: 12px;
}

.select { position: relative; }
.select select {
  appearance: none; -webkit-appearance: none;
  padding-inline-start: 40px;
  cursor: pointer;
}
.select select option { background: var(--bg-2); color: var(--text); }
.select i {
  position: absolute; inset-block-start: 50%; inset-inline-start: 14px;
  transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none; font-size: 17px;
}

.hp { position: absolute; inset-inline-start: -9999px; opacity: 0; height: 0; }

.form__note {
  margin-block-start: 14px;
  font-size: 12.5px; text-align: center; color: var(--text-muted);
}

.form-success { text-align: center; padding: 30px 10px; }
.form-success__icon { font-size: 68px; color: #4ADE80; margin-block-end: 10px; }
.form-success h3 { font-size: 22px; margin-block-end: 10px; }
.form-success p { margin-block-end: 20px; }

/* ── 13. CTA STRIP ───────────────────────────────────────────────────── */
.cta-strip {
  padding-block: clamp(48px, 6vw, 80px);
  background:
    radial-gradient(70% 120% at 80% 50%, rgba(30, 111, 217, .22), transparent 65%),
    var(--bg-2);
  border-block: 1px solid var(--border);
}
.cta-strip__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
}
.cta-strip h2 { font-size: clamp(22px, 2.8vw, 32px); margin-block-end: 8px; }
.cta-strip p { font-size: 15.5px; }

/* ── 14. ERROR PAGES ─────────────────────────────────────────────────── */
.error-page {
  position: relative; min-height: 82vh;
  display: grid; place-items: center;
  padding-block: 140px 90px;
  overflow: hidden;
}
.error-page__glow {
  position: absolute; inset-block-start: -10%; inset-inline-start: 50%;
  transform: translateX(-50%);
  width: 760px; height: 520px;
  background: radial-gradient(circle, rgba(30, 111, 217, .22), transparent 65%);
  filter: blur(20px);
}
.error-page__inner { position: relative; text-align: center; max-width: 620px; }
.error-code {
  font-family: var(--font-display);
  font-size: clamp(84px, 17vw, 168px); font-weight: 900; line-height: 1;
  background: linear-gradient(120deg, var(--white), var(--accent) 60%, var(--accent-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-block-end: 8px;
}
.error-page h1 { font-size: clamp(22px, 3vw, 32px); margin-block-end: 14px; }
.error-page p { margin-block-end: 30px; }
.error-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── 15. FOOTER ──────────────────────────────────────────────────────── */
.footer {
  position: relative;
  background: var(--bg-2);
  border-block-start: 1px solid var(--border);
  overflow: hidden;
}
.footer__glow {
  position: absolute; inset-block-start: -160px; inset-inline-end: -80px;
  width: 520px; height: 380px;
  background: radial-gradient(circle, rgba(30, 111, 217, .18), transparent 65%);
}
.footer__grid {
  position: relative;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-block: 60px 44px;
}
.footer__col--brand .brand { margin-block-end: 16px; }
.footer__tagline { font-size: 14.5px; max-width: 330px; margin-block-end: 20px; }

.footer__socials { display: flex; gap: 10px; }
.footer__socials a {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--surface-60);
  border: 1px solid var(--border);
  color: var(--text-muted); font-size: 20px;
  transition: transform .3s var(--ease), color .3s, border-color .3s, box-shadow .3s;
}
.footer__socials a:hover {
  color: var(--accent);
  border-color: var(--accent-30);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(30, 111, 217, .25);
}

.footer__col h4 {
  font-size: 15.5px; margin-block-end: 16px; color: var(--text);
}
.footer__col ul { display: grid; gap: 10px; }
.footer__col ul a, .footer__col ul span { color: var(--text-muted); font-size: 14.2px; }
.footer__col ul a:hover { color: var(--accent); }
.footer__contact li { display: flex; align-items: center; gap: 9px; }
.footer__contact i { color: var(--accent); font-size: 18px; flex-shrink: 0; }

.footer__bottom { border-block-start: 1px solid var(--border); }
.footer__bottom-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding-block: 20px;
}
.footer__bottom p { font-size: 13.2px; }

/* ── 16. TO-TOP BUTTON ───────────────────────────────────────────────── */
.to-top {
  position: fixed; inset-block-end: 24px; inset-inline-start: 24px; z-index: 90;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-80);
  border: 1px solid var(--border);
  color: var(--text); font-size: 19px;
  cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: all .35s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--accent-30); color: var(--accent); }

/* ── 17. SCROLL REVEAL ───────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

/* Page transition */
body { animation: pageIn .5s var(--ease) both; }
@keyframes pageIn { from { opacity: 0 } }
/* Never fade fully to black — a stalled navigation would look like a crash. */
body.is-leaving { opacity: .28; transition: opacity .22s var(--ease); }

/* ── 18. RESPONSIVE ──────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .section__title,
  .page-hero__title,
  .cta-strip h2 { font-size: 2.4rem; }
}

@media (min-width: 1200px) {
  .page-hero__title { font-size: 2.9rem; }
}

@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 940px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .request__wrap { grid-template-columns: 1fr; gap: 32px; }
  .featured__list { grid-template-columns: 1fr; }
  .process { grid-template-columns: repeat(2, 1fr); gap: 34px 18px; }
  .process__line { display: none; }
  .section__head--row { flex-direction: column; align-items: flex-start; }

  .nav__burger { display: flex; }
  .nav__links {
    position: fixed; inset-block-start: 76px; inset-inline: 16px;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 14px;
    background: var(--bg-80);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-12px);
    transition: all .32s var(--ease);
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links > a { padding: 12px 14px; }
  .nav__cta { margin: 6px 0 0; }
}

@media (max-width: 680px) {
  body { font-size: 15.4px; }
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .request__card { padding: 24px 20px; }
  .footer__grid { grid-template-columns: 1fr; gap: 30px; padding-block: 44px 32px; }
  .hero { padding-block: 120px 90px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .cta-strip__inner { flex-direction: column; align-items: flex-start; }
  .scroll-hint { display: none; }
  .flash-stack { inset-block-start: 80px; }
}

@media (max-width: 420px) {
  .process { grid-template-columns: 1fr; }
}

/* ── 18b. SCROLL EFFECTS ─────────────────────────────────────────────── */

/* Reading-progress bar pinned under the top nav. Driven by scaleX from
   animations.js so it never triggers layout. */
.scroll-progress {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 200;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent), #7FC0FF);
  transform: scaleX(0); transform-origin: right center;
  will-change: transform;
  box-shadow: 0 0 14px rgba(74, 158, 255, .5);
}
html[dir="ltr"] .scroll-progress { transform-origin: left center; }

/* Cards that receive the JS tilt need a 3D context and a snappier
   settle-back when the pointer leaves. */
.p-card, .wide-card, .card--service, .card--why {
  transform-style: preserve-3d;
  will-change: transform;
}
.p-card__media img, .wide-card__media img { will-change: transform; }

/* Reveal variants — direction comes from the markup, timing from --d. */
.reveal--right { transform: translateX(40px); }
.reveal--left  { transform: translateX(-40px); }
.reveal--right.is-in, .reveal--left.is-in { transform: none; }

/* Section headings get a thin animated underline as they enter. */
.section__eyebrow { position: relative; }

/* ── 19. ACCESSIBILITY: REDUCED MOTION ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .typewriter::after { display: none; }
  .hero__canvas { display: none; }
  body { animation: none; }
  /* the JS guards these too, but belt-and-braces for the CSS side */
  .scroll-progress { display: none; }
  .p-card, .wide-card, .card--service, .card--why { transform: none !important; }
  .p-card__media img, .wide-card__media img { transform: none !important; }
}

/* ── 20. PRINT ───────────────────────────────────────────────────────── */
@media print {
  .nav, .footer, .to-top, .loader, .hero__canvas, .scroll-hint,
  .scroll-progress { display: none !important; }
  body { background: #fff; color: #000; }
}
