/* ==========================================================================
   Design system. Every colour, size and radius is a token in :root.
   One stylesheet for both directions: only logical properties (inline/block).
   Look: hazy steel-blue atmosphere, frosted glass, glossy blue 3D objects,
   very large type, white pill buttons.
   ========================================================================== */

/* ---------- Fonts (self-hosted, OFL; see THIRD-PARTY.md) ---------- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-4.001-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
/* Persian letters only; Latin text on Persian pages falls through to Inter. */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-33.003-400-arabic.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0600-06FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-33.003-700-arabic.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-33.003-800-arabic.woff2") format("woff2");
  font-weight: 800 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFC;
}

/* ---------- Tokens ---------- */
:root {
  /* Atmosphere */
  --bg-0: #081430;
  --bg-1: #0F2350;
  --bg-2: #1B3A72;
  --steel: #3D5F99;
  --haze: #8FB0E0;
  /* Brand */
  --blue: #2F5BEA;
  --blue-deep: #163A9E;
  --blue-hover: #2449C4;
  --blue-light: #6EA8FE;
  --cyan: #5EE6F0;
  /* Text */
  --text: #FFFFFF;
  --text-2: #C3D0EA;
  --text-3: #93A6CC;
  /* Glass */
  --glass: rgb(255 255 255 / 0.08);
  --glass-hi: rgb(255 255 255 / 0.16);
  --glass-border: rgb(255 255 255 / 0.2);
  --glass-edge: inset 0 1px 0 rgb(255 255 255 / 0.28);
  /* Light surfaces (forms, long text) */
  --surface-light: #F5F7FC;
  --surface-card: #FFFFFF;
  --ink: #0D1B3E;
  --ink-2: #44506E;
  --line-light: #DCE2F0;
  --success: #1E9E6A;
  --error: #D6384B;
  --focus: #5EE6F0;

  /* Type */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-fa: "Vazirmatn", "Inter", Tahoma, system-ui, sans-serif;
  --fs-hero: clamp(2.75rem, 1.3rem + 5vw, 6rem);
  --fs-h2: clamp(2rem, 1.3rem + 3vw, 3.75rem);
  --fs-h3: 1.25rem;
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;

  /* Space, shape, depth, motion */
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --container: 80rem;
  --section-y: clamp(3.5rem, 2.5rem + 4.5vw, 6.5rem);
  --radius-sm: 0.875rem;
  --radius: 1.5rem;
  --radius-lg: 2rem;
  --pill: 999px;
  --blur: 20px;
  --shadow: 0 30px 60px -25px rgb(2 8 30 / 0.7);
  --shadow-3d: 0 28px 40px -18px rgb(3 10 40 / 0.75);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-h: 5rem;
  --bar-h: 4rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-block-start: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  min-block-size: 100vh;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* The atmosphere: a fixed layer of soft light, so long pages never show a seam. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(55% 45% at 85% 8%, rgb(143 176 224 / 0.55), transparent 70%),
    radial-gradient(40% 35% at 100% 55%, rgb(61 95 153 / 0.55), transparent 70%),
    radial-gradient(45% 40% at 0% 40%, rgb(27 58 114 / 0.9), transparent 70%),
    radial-gradient(60% 50% at 30% 100%, rgb(47 91 234 / 0.28), transparent 70%),
    linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 45%, var(--bg-1) 75%, var(--bg-0) 100%);
}
[dir="rtl"] body::before { transform: scaleX(-1); }
html[lang="fa"] body { font-family: var(--font-fa); line-height: 1.85; }
img, svg { display: block; max-inline-size: 100%; }
img { block-size: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.1; font-weight: 800; text-wrap: balance; }
html[lang="fa"] :is(h1, h2, h3) { line-height: 1.4; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sr-only {
  position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.svg-defs { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }
.skip-link {
  position: absolute; inset-inline-start: 1rem; inset-block-start: -4rem; z-index: 100;
  padding: 0.75rem 1.25rem; border-radius: var(--pill); background: var(--text); color: var(--ink);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { inset-block-start: 1rem; }
.icon { inline-size: 1.25rem; block-size: 1.25rem; flex: none; }
/* Arrows point the way you read. */
[dir="rtl"] .icon-flip { transform: scaleX(-1); }

/* ---------- Layout ---------- */
.container { inline-size: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
/* overflow-x: clip keeps glows and the leaning hero scene from widening the page (and, unlike
   hidden, does not create a scroll container). */
.section { padding-block: var(--section-y); position: relative; overflow-x: clip; }
/* Sections below the first screen are laid out only when they come near it. Measured 2026-11-03 on
   /fa/tiling/ (throttled phone): worst LCP 1.4 s → 0.8 s, CLS unchanged. "auto" in the size means the
   browser remembers each section's real height once it has been shown. */
.section:not(.hero):not(.page-hero), .site-footer { content-visibility: auto; contain-intrinsic-size: auto 900px; }
/* Pools of light behind sections, so the atmosphere carries down the page. */
.section.lit::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset-block: 10% 5%; inset-inline: 10%; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(95 141 245 / 0.32), rgb(61 95 153 / 0.16) 55%, transparent);
}
.section.lit-end::before { inset-inline: 45% -10%; }
.section.lit-start::before { inset-inline: -10% 45%; }
.section-head { max-inline-size: 48rem; margin-block-end: clamp(2.5rem, 2rem + 2vw, 4.5rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .lead { margin-block-start: 1.25rem; }
/* Long text sits on a light surface: light text on dark glass fails contrast at length. */
.surface-light { background: var(--surface-light); color: var(--ink); }

/* ---------- Type ---------- */
.hero-title { font-size: var(--fs-hero); line-height: 0.98; letter-spacing: -0.045em; font-weight: 800; }
.h2 { font-size: var(--fs-h2); line-height: 1.02; letter-spacing: -0.035em; }
.h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
html[lang="fa"] :is(.hero-title, .h2, .h3) { letter-spacing: 0; }
html[lang="fa"] .hero-title { line-height: 1.3; }
html[lang="fa"] .h2 { line-height: 1.35; }
.lead { font-size: var(--fs-lead); color: var(--text-2); }
.muted { color: var(--text-2); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.625rem; margin-block-end: 1.25rem;
  font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.04em; color: var(--blue-light);
}
html[lang="en"] .eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8125rem; }
.eyebrow::before { content: ""; inline-size: 1.75rem; block-size: 1px; background: currentColor; opacity: 0.7; }
.center .eyebrow::after { content: ""; inline-size: 1.75rem; block-size: 1px; background: currentColor; opacity: 0.7; }
.accent {
  background: linear-gradient(100deg, #FFFFFF 0%, var(--haze) 45%, var(--blue-light) 75%, var(--cyan) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem;
  min-block-size: 3rem; padding-inline: 1.625rem; border: 1px solid transparent; border-radius: var(--pill);
  font: inherit; font-weight: 600; font-size: 0.9375rem; line-height: 1; text-decoration: none;
  white-space: nowrap; cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-white { background: var(--text); color: var(--ink); box-shadow: 0 12px 30px -12px rgb(255 255 255 / 0.45); }
.btn-white:hover { box-shadow: 0 16px 36px -10px rgb(255 255 255 / 0.55); }
.btn-blue { background: var(--blue); color: var(--text); }
.btn-blue:hover { background: var(--blue-hover); }
.btn-glass { background: var(--glass); border-color: var(--glass-border); color: var(--text); }
.btn-glass:hover { background: var(--glass-hi); }
.btn-outline { border-color: rgb(255 255 255 / 0.55); color: var(--text); background: transparent; }
.btn-outline:hover { background: var(--text); color: var(--ink); }
.btn-lg { min-block-size: 3.625rem; padding-inline: 2.125rem; font-size: 1rem; }
.btn-sm { min-block-size: 2.375rem; padding-inline: 1.125rem; font-size: 0.8125rem; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.875rem; }
.round-btn {
  display: grid; place-items: center; inline-size: 2.5rem; block-size: 2.5rem; flex: none;
  border-radius: 50%; background: var(--text); color: var(--ink);
  transition: transform 0.25s var(--ease);
}
.round-btn .icon { inline-size: 1.125rem; block-size: 1.125rem; }
[dir="rtl"] .round-btn .icon { transform: scaleX(-1); }

/* ---------- Glass ---------- */
/* Glass is a translucent gradient with a lit top edge. No backdrop-filter: over the smooth
   background a real blur is barely visible, and on phones each blurred element costs a repaint
   (measured 2026-10-31: first paint of /fa/tiling/ waited ~2.4 s on a throttled phone). */
.glass {
  background: linear-gradient(155deg, rgb(255 255 255 / 0.18), rgb(255 255 255 / 0.06) 55%, rgb(255 255 255 / 0.1));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-edge), var(--shadow);
}
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.875rem 0.5rem 0.5rem;
  border-radius: var(--pill); font-size: 0.8125rem; font-weight: 600; white-space: nowrap;
}
[dir="rtl"] .chip { padding: 0.5rem 0.5rem 0.5rem 0.875rem; }
.chip-icon {
  display: grid; place-items: center; inline-size: 1.75rem; block-size: 1.75rem; border-radius: 50%;
  background: linear-gradient(145deg, var(--blue-light), var(--blue)); color: var(--text);
}
.chip-icon .icon { inline-size: 0.9375rem; block-size: 0.9375rem; }

/* ---------- 3D badge: a glossy blue tile with an icon, drawn in CSS ----------
   Stands in for a service's 3D image until it exists, and is used for small icons. */
.badge3d {
  position: relative; display: grid; place-items: center; inline-size: var(--size, 6rem); aspect-ratio: 1;
  border-radius: 28%; color: var(--text);
  background: linear-gradient(150deg, #A9C8FF 0%, var(--blue-light) 18%, var(--blue) 52%, var(--blue-deep) 100%);
  box-shadow:
    inset 0 2px 1px rgb(255 255 255 / 0.65),
    inset 0 -12px 22px rgb(8 20 60 / 0.45),
    inset 10px 0 18px rgb(255 255 255 / 0.12),
    var(--shadow-3d);
  transform: perspective(700px) rotateX(16deg) rotateY(-14deg) rotateZ(-4deg);
}
[dir="rtl"] .badge3d { transform: perspective(700px) rotateX(16deg) rotateY(14deg) rotateZ(4deg); }
/* Gloss: a soft white sheen across the top-left of the tile. */
.badge3d::before {
  content: ""; position: absolute; inset: 6% 8% 52% 8%; border-radius: 24% 24% 50% 50%;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.45), rgb(255 255 255 / 0));
}
.badge3d .icon {
  position: relative; inline-size: 44%; block-size: 44%; stroke-width: 2.2;
  filter: drop-shadow(0 3px 2px rgb(8 20 60 / 0.45));
}
.badge3d-floor {
  position: absolute; inset-inline: 22%; inset-block-end: 4%; block-size: 10%; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(3 10 40 / 0.55), transparent);
}

/* Slot IDs are shown on the fallbacks before launch, so you can see which image goes where. */
.preview [data-slot]::after {
  content: attr(data-slot);
  position: absolute; inset-inline: 0; inset-block-end: -1.5rem; text-align: center;
  font: 600 0.625rem/1 var(--font); letter-spacing: 0.1em; color: rgb(195 208 234 / 0.6);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 50;
  transition: background-color 0.3s, box-shadow 0.3s, border-color 0.3s;
  border-block-end: 1px solid transparent;
}
/* Transparent over the hero; frosted once the page scrolls (site.js sets .scrolled). */
.site-header.scrolled {
  background: rgb(11 26 64 / 0.72); border-block-end-color: rgb(255 255 255 / 0.1);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%); backdrop-filter: blur(var(--blur)) saturate(140%);
}
.site-header .container {
  position: relative;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; block-size: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.75rem; justify-self: start; text-decoration: none;
  font-weight: 800; font-size: 1.125rem; letter-spacing: -0.02em; line-height: 1.1;
}
.brand-mark {
  inline-size: 2.5rem; block-size: 2.5rem; border-radius: 0.875rem;
  background: linear-gradient(145deg, #A9C8FF, var(--blue-light) 25%, var(--blue) 60%, var(--blue-deep));
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 0.6), inset 0 -6px 10px rgb(8 20 60 / 0.4), 0 10px 20px -8px rgb(3 10 40 / 0.8);
}
/* The links sit together in one glass pill; the current page is a white pill inside it. */
.nav-pill {
  display: flex; align-items: center; gap: 0.125rem; padding: 0.3125rem;
  border: 1px solid var(--glass-border); border-radius: var(--pill);
  background: rgb(255 255 255 / 0.06); box-shadow: var(--glass-edge);
}
.nav-link {
  display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 1.125rem;
  border: 0; border-radius: var(--pill); background: none; font: inherit; font-size: 0.9375rem; font-weight: 500;
  color: var(--text-2); text-decoration: none; cursor: pointer; transition: color 0.2s, background-color 0.2s;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { color: var(--text); background: var(--glass-hi); }
.nav-link[aria-current="page"] { color: var(--ink); background: var(--text); font-weight: 600; }
.nav-link .icon { inline-size: 1rem; block-size: 1rem; transition: transform 0.2s; }
.nav-link[aria-expanded="true"] .icon { transform: rotate(180deg); }
.nav-actions { display: none; }

/* Services panel: the width of the header, under it. Home services, digital services, a quote card. */
.mega {
  position: absolute; inset-block-start: calc(100% - 0.25rem); inset-inline: var(--gutter); margin-inline: auto;
  max-inline-size: 70rem; display: none; grid-template-columns: 2fr 1fr 15rem; gap: 0.75rem; padding: 0.75rem;
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  background: rgb(13 31 72 / 0.98); box-shadow: var(--shadow), var(--glass-edge);
}
.mega.open { display: grid; }
.mega-col { padding: 0.875rem 0.5rem 0.5rem; border-radius: var(--radius); background: rgb(255 255 255 / 0.035); }
.mega-title {
  display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.5rem; padding-inline: 0.625rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3);
}
html[lang="fa"] .mega-title { letter-spacing: 0; font-size: 0.8125rem; }
.mega-title .icon { inline-size: 0.875rem; block-size: 0.875rem; color: var(--cyan); }
.mega-list { display: grid; gap: 0.125rem; margin: 0; padding: 0; list-style: none; }
.mega-col-wide .mega-list { grid-template-columns: 1fr 1fr; }
.mega-item {
  display: flex; align-items: center; gap: 0.875rem; padding: 0.625rem; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; transition: background-color 0.2s;
}
.mega-item:hover, .mega-item[aria-current="page"] { background: var(--glass-hi); }
.mega-item .badge3d {
  --size: 2.625rem; flex: none; border-radius: 30%; transform: none; transition: transform 0.3s var(--ease);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 0.6), inset 0 -4px 8px rgb(8 20 60 / 0.4), 0 10px 16px -10px rgb(3 10 40 / 0.9);
}
.mega-item:hover .badge3d { transform: translateY(-2px) rotate(-5deg); }
[dir="rtl"] .mega-item:hover .badge3d { transform: translateY(-2px) rotate(5deg); }
.mega-text { display: grid; gap: 0.125rem; min-inline-size: 0; }
.mega-name { font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.mega-sum {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;
  font-size: 0.8125rem; line-height: 1.45; color: var(--text-3);
}
.mega-cta {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 0.5rem; padding: 1.5rem;
  border-radius: var(--radius); box-shadow: var(--glass-edge);
  background:
    radial-gradient(120% 80% at 100% 0%, rgb(94 230 240 / 0.35), transparent 60%),
    linear-gradient(150deg, var(--blue-light), var(--blue) 45%, var(--blue-deep));
}
.mega-cta-title { margin: 0; font-size: 1.25rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
.mega-cta p:not(.mega-cta-title) { margin: 0; font-size: 0.875rem; color: rgb(255 255 255 / 0.85); }
.mega-cta .btn { align-self: flex-start; margin-block-start: 0.75rem; padding: 0.625rem 1.125rem; font-size: 0.875rem; }
/* Not quite wide enough for three columns: the quote card becomes a strip under the services. */
@media (min-width: 64rem) and (max-width: 79.99rem) {
  .mega { grid-template-columns: 1.75fr 1fr; }
  .mega-cta { grid-column: 1 / -1; flex-flow: row wrap; align-items: center; gap: 0.25rem 1.25rem; padding: 1rem 1.25rem; }
  .mega-cta .btn { margin: 0; margin-inline-start: auto; }
}
/* On a service page the Services button is marked like the current page. */
.nav-link.here:not([aria-expanded="true"]) { color: var(--ink); background: var(--text); font-weight: 600; }

.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.625rem; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 0.4375rem; block-size: 2.75rem; padding-inline: 0.875rem;
  border: 1px solid var(--glass-border); border-radius: var(--pill); background: var(--glass);
  font-size: 0.875rem; font-weight: 600; color: var(--text); text-decoration: none; transition: background-color 0.2s;
}
.lang-switch:hover { background: var(--glass-hi); }
.lang-switch .icon { inline-size: 1rem; block-size: 1rem; color: var(--text-2); }
html[lang="en"] .lang-switch { font-family: var(--font-fa); }
.menu-toggle { display: none; }
.menu-toggle .i-close, .menu-toggle[aria-expanded="true"] .i-open { display: none; }
.menu-toggle[aria-expanded="true"] .i-close { display: block; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2rem, 1rem + 4vw, 5rem) clamp(3rem, 2rem + 4vw, 6rem); }
.hero-grid { display: grid; gap: clamp(1rem, 0.5rem + 2vw, 2rem); align-items: center; }
.hero .lead { margin-block: 1.75rem 2.25rem; max-inline-size: 32rem; }
.hero-badge { margin-block-end: 1.75rem; padding: 0.375rem 1rem 0.375rem 0.375rem; font-size: 0.8125rem; color: var(--text-2); }
[dir="rtl"] .hero-badge { padding: 0.375rem 0.375rem 0.375rem 1rem; }

/* The stage holds the 3D scene: the hero image when it exists, otherwise a drawn podium. */
.stage { position: relative; inline-size: 100%; aspect-ratio: 3 / 2; }
.stage::before {
  content: ""; position: absolute; inset: 10% 5% 0; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(143 176 224 / 0.55), rgb(110 168 254 / 0.15) 60%, transparent);
}
.stage > img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: contain; }
.podium { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; }
.chip-float { position: absolute; z-index: 2; box-shadow: var(--glass-edge), 0 18px 30px -15px rgb(2 8 30 / 0.7); }
.chip-float:nth-of-type(1) { inset-block-start: 2%; inset-inline-start: 0; }
.chip-float:nth-of-type(2) { inset-block-end: 4%; inset-inline-end: 4%; }
.chip-float:nth-of-type(3) { inset-block-end: 6%; inset-inline-start: 8%; }

/* Clouds float in front of and behind the scene. */
.cloud { position: absolute; z-index: 1; inline-size: var(--w, 18%); aspect-ratio: 1.7; pointer-events: none; }
.cloud img, .cloud svg { inline-size: 100%; block-size: 100%; object-fit: contain; }
.cloud-1 { --w: 20%; inset-block-start: 2%; inset-inline-end: 4%; }
.cloud-2 { --w: 14%; inset-block-start: 26%; inset-inline-start: 2%; }
.cloud-3 { --w: 11%; inset-block-start: -4%; inset-inline-start: 46%; }

/* ---------- Divider row between hero and services ---------- */
.divider {
  display: flex; align-items: center; gap: 1rem; color: var(--text-3);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
}
html[lang="fa"] .divider { letter-spacing: 0; font-size: 0.875rem; }
.divider::before, .divider::after { content: ""; flex: 1; block-size: 1px; background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.25), transparent); }
.divider span { display: inline-flex; align-items: center; gap: 0.625rem; padding: 0.5rem 1rem; }
.divider .dot { inline-size: 0.375rem; block-size: 0.375rem; border-radius: 50%; background: var(--blue-light); box-shadow: 0 0 10px var(--blue-light); }

/* ---------- Service cards ---------- */
.card-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.service-card {
  position: relative; display: flex; flex-direction: column; min-block-size: clamp(19rem, 15rem + 8vw, 23rem); padding: 1.25rem;
  text-decoration: none; overflow: hidden;
  transition: transform 0.35s var(--ease), background-color 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.service-card:hover { transform: translateY(-6px); border-color: rgb(255 255 255 / 0.4); }
.service-card:hover .round-btn { transform: rotate(45deg); }
[dir="rtl"] .service-card:hover .round-btn { transform: rotate(-45deg); }
/* A soft light pooled under the object. */
.service-card::before {
  content: ""; position: absolute; inset: 22% 15% auto; block-size: 45%; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgb(110 168 254 / 0.35), transparent);
}
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.card-kind { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--text-2); }
.card-kind .icon { inline-size: 1rem; block-size: 1rem; color: var(--blue-light); }
.card-art {
  position: relative; flex: 1; display: grid; place-items: center; min-block-size: 10rem; margin-block: 0.5rem;
}
.card-art img { inline-size: 78%; transition: transform 0.5s var(--ease); }
.service-card:hover .card-art img, .service-card:hover .badge3d { transform: translateY(-6px) scale(1.04); }
.card-art .badge3d { --size: min(46%, 8.5rem); transition: transform 0.5s var(--ease); }
.preview .card-art[data-slot]::after { inset-block: 0 auto; }
.service-card .h3 { font-size: 1.375rem; }
.card-text { margin-block-start: 0.375rem; color: var(--text-2); font-size: 0.9375rem; line-height: 1.5; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block-start: 1.25rem; }
/* The invitation card: lighter glass that closes the grid. */
.service-card.invite { background: linear-gradient(155deg, rgb(255 255 255 / 0.3), rgb(255 255 255 / 0.12)); }
.invite .card-art .badge3d { --size: min(40%, 7.5rem); }

/* ---------- Process ---------- */
.steps { position: relative; display: grid; gap: 1.25rem; padding: 0; margin: 0; list-style: none; counter-reset: step; }
.step { position: relative; padding: 1.75rem; counter-increment: step; }
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block; margin-block-end: 1.5rem;
  font-size: 3.5rem; font-weight: 800; line-height: 1; letter-spacing: -0.05em;
  background: linear-gradient(180deg, #FFFFFF, rgb(143 176 224 / 0.25));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[lang="fa"] .step::before { content: counter(step, persian); letter-spacing: 0; }
.step .h3 { margin-block-end: 0.625rem; }
.step p { color: var(--text-2); }

/* ---------- Features ---------- */
.feature-grid { display: grid; gap: 1.25rem; }
.feature { padding: 2rem; }
.feature .badge3d { --size: 4rem; margin-block-end: 1.75rem; }
.feature .h3 { margin-block-end: 0.625rem; }
.feature p { color: var(--text-2); }

/* ---------- Talk to us: avatars, speech bubbles, white contact card ---------- */
.talk-grid { display: grid; gap: 2.5rem; align-items: center; }
.people { display: grid; gap: 2rem; }
.person { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1.25rem; }
.person:nth-child(even) { grid-template-columns: 1fr auto; }
.person:nth-child(even) .avatar { order: 2; }
.avatar {
  position: relative; inline-size: clamp(7.5rem, 6rem + 6vw, 11rem); aspect-ratio: 1;
}
/* The blue disc behind each character, as in the reference. */
.avatar::before {
  content: ""; position: absolute; inset: 8% 4% 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--blue-light), var(--blue) 55%, var(--blue-deep));
  box-shadow: inset 0 2px 2px rgb(255 255 255 / 0.4), var(--shadow-3d);
}
.avatar img { position: relative; inline-size: 100%; border-radius: 0 0 50% 50%; }
.avatar .icon {
  position: absolute; inset: 0; margin: auto; inline-size: 42%; block-size: 42%;
  color: rgb(255 255 255 / 0.9); stroke-width: 1.6;
}
.bubble {
  position: relative; padding: 1.25rem 1.5rem; border-radius: var(--radius);
  background: var(--surface-card); color: var(--ink); box-shadow: var(--shadow);
}
/* The bubble's tail points at its character. */
.bubble::before {
  content: ""; position: absolute; inset-block-end: 1.25rem; inset-inline-start: -0.625rem;
  inline-size: 1.25rem; block-size: 1.25rem; background: inherit; border-radius: 0.25rem; rotate: 45deg;
}
.person:nth-child(even) .bubble::before { inset-inline-start: auto; inset-inline-end: -0.625rem; }
.bubble .h3 { font-size: 1.0625rem; margin-block-end: 0.375rem; }
.bubble p { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.55; }
.contact-card {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); border-radius: var(--radius-lg);
  background: var(--surface-card); color: var(--ink); box-shadow: var(--shadow);
}
.contact-card .h3 { font-size: 1.5rem; margin-block-end: 1.5rem; }
.contact-rows { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.contact-rows a {
  display: flex; align-items: center; gap: 0.875rem; min-block-size: 3.5rem; padding-inline: 1.25rem 0.5rem;
  border: 1px solid var(--line-light); border-radius: var(--pill); background: var(--surface-light);
  color: var(--ink); font-weight: 600; text-decoration: none; transition: border-color 0.2s, background-color 0.2s;
}
[dir="rtl"] .contact-rows a { padding-inline: 1.25rem 0.5rem; }
.contact-rows a:hover { border-color: var(--blue); background: var(--surface-card); }
.contact-rows .icon { color: var(--blue); }
.contact-rows .round-btn { margin-inline-start: auto; inline-size: 2.5rem; block-size: 2.5rem; background: var(--ink); color: var(--text); }
.contact-rows .primary { background: var(--blue); border-color: var(--blue); color: var(--text); }
.contact-rows .primary .icon { color: var(--text); }
.contact-rows .primary .round-btn { background: var(--text); color: var(--ink); }
.contact-rows .round-btn .icon { color: inherit; }
.contact-rows .primary:hover { background: var(--blue-hover); }

/* ---------- Service pages ---------- */
.page-hero { padding-block-start: clamp(1rem, 0.5rem + 2vw, 2.5rem); }
.hero-title-sm { font-size: clamp(2.5rem, 1.5rem + 3.2vw, 4.25rem); }
.breadcrumb ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; margin: 0 0 clamp(1.5rem, 1rem + 2vw, 3rem); padding: 0;
  list-style: none; font-size: var(--fs-small); color: var(--text-3);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 0.25rem; }
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--text); }
.breadcrumb .sep { inline-size: 0.875rem; block-size: 0.875rem; rotate: -90deg; opacity: 0.6; }
[dir="rtl"] .breadcrumb .sep { rotate: 90deg; }
.price-note {
  display: inline-flex; align-items: center; gap: 0.75rem; margin-block: -0.75rem 2rem; padding: 0.5rem 1rem;
  border: 1px solid var(--glass-border); border-radius: var(--pill); background: var(--glass); font-weight: 700;
}
.price-note span { font-weight: 500; color: var(--text-2); }

/* The service object stands on the empty podium. */
.stage-object {
  position: absolute; z-index: 2; inset-inline: 0; inset-block-start: 8%; margin-inline: auto;
  display: grid; place-items: center; inline-size: 44%; aspect-ratio: 1;
}
.stage-object img { inline-size: 100%; }
.stage-object .badge3d { --size: 72%; border-radius: 26%; }
.preview .stage-object[data-slot]::after { inset-block-end: -0.5rem; }

.sub-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.sub-card {
  display: flex; flex-direction: column; gap: 0.5rem; padding: 1.5rem; min-block-size: 15rem; text-decoration: none;
  transition: transform 0.35s var(--ease), border-color 0.35s;
}
.sub-card:hover { transform: translateY(-6px); border-color: rgb(255 255 255 / 0.4); }
.sub-card:hover .round-btn { transform: rotate(45deg); }
[dir="rtl"] .sub-card:hover .round-btn { transform: rotate(-45deg); }
.sub-card .card-top { margin-block-end: auto; padding-block-end: 1.5rem; }
.sub-card .badge3d { --size: 3.5rem; }

/* Long text on a light sheet (BRIEF: long text on dark glass fails contrast). */
.sheet {
  max-inline-size: 60rem; margin-inline: auto;
  padding: clamp(1.75rem, 1rem + 4vw, 4.5rem); border-radius: var(--radius-lg);
  background: var(--surface-light); color: var(--ink); box-shadow: var(--shadow);
}
.prose { font-size: 1.0625rem; line-height: 1.75; }
html[lang="fa"] .prose { line-height: 2; }
.prose > * { max-inline-size: 46rem; }
.prose > * + * { margin-block-start: 1.1em; }
.prose h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); line-height: 1.2; letter-spacing: -0.02em; margin-block-start: 1.8em; }
.prose h2:first-child { margin-block-start: 0; }
.prose h3 { font-size: 1.25rem; line-height: 1.3; margin-block-start: 1.6em; }
html[lang="fa"] .prose :is(h2, h3) { letter-spacing: 0; line-height: 1.5; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-inline-start: 1.25rem; }
.prose li + li { margin-block-start: 0.4em; }
.prose li::marker { color: var(--blue); }
.sub-layout { display: grid; gap: 1.5rem; align-items: start; }
.sub-layout .sheet { max-inline-size: none; }
.side-links { padding: 1.5rem; }
.side-links ul { display: grid; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.side-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-weight: 500;
}
.side-links a:hover { background: var(--glass-hi); }
.side-links .icon { inline-size: 1rem; block-size: 1rem; opacity: 0.7; }

.faq-layout { display: grid; gap: 2rem; align-items: start; }
.faq-list { display: grid; gap: 0.875rem; }
.faq { padding: 0; border-radius: var(--radius); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem;
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .h3 { font-size: 1.0625rem; }
.faq-toggle {
  display: grid; place-items: center; flex: none; inline-size: 2.25rem; block-size: 2.25rem; border-radius: 50%;
  background: var(--glass-hi); transition: transform 0.25s var(--ease), background-color 0.25s;
}
.faq-toggle .icon { inline-size: 1.125rem; block-size: 1.125rem; }
.faq[open] .faq-toggle { transform: rotate(180deg); background: var(--text); color: var(--ink); }
.faq p { padding: 0 1.5rem 1.5rem; color: var(--text-2); }

.areas { display: grid; gap: 2rem; padding: clamp(1.75rem, 1rem + 3vw, 3.5rem); border-radius: var(--radius-lg); }
.areas .h2 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem); }
.areas-note { margin-block-start: 1rem; }
.area-list { display: flex; flex-wrap: wrap; gap: 0.625rem; align-content: start; margin: 0; padding: 0; list-style: none; }

.mini-grid { display: grid; gap: 0.875rem; margin: 2rem 0 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.mini-card {
  display: flex; align-items: center; gap: 0.875rem; padding: 0.75rem 1rem; border-radius: var(--radius);
  font-weight: 600; text-decoration: none; transition: transform 0.25s var(--ease), border-color 0.25s;
}
.mini-card:hover { transform: translateY(-3px); border-color: rgb(255 255 255 / 0.4); }
.mini-card .badge3d { --size: 2.75rem; transform: none; }
.mini-card .badge3d::before { display: none; }
.mini-card > .icon { margin-inline-start: auto; inline-size: 1rem; block-size: 1rem; opacity: 0.7; }

/* ---------- Blog ---------- */
.narrow-hero { max-inline-size: 56rem; }
.filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block-start: 2rem; }
.filter .chip { text-decoration: none; color: var(--text-2); }
.filter .chip[aria-current="page"] { background: var(--text); color: var(--ink); }
.filter .chip:not(:has(.chip-icon)) { padding-inline: 1rem; }
.blog-list { padding-block-start: 0; }
.post-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); margin-block-start: 2rem; }
.blog-list .post-grid { margin-block-start: 0; }
.post-card {
  display: flex; flex-direction: column; gap: 0.75rem; padding: 1.5rem; min-block-size: 16rem; text-decoration: none;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.post-card:hover { transform: translateY(-5px); border-color: rgb(255 255 255 / 0.4); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.8125rem; color: var(--text-3); }
.post-category { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-2); font-weight: 600; }
.post-category .badge3d { --size: 1.75rem; transform: none; border-radius: 30%; }
.post-category .badge3d::before { display: none; }
.post-card .h3 { font-size: 1.25rem; }
.post-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block-start: auto; padding-block-start: 0.75rem;
  font-size: 0.8125rem; color: var(--text-3);
}
.post-foot .more { display: inline-flex; align-items: center; gap: 0.375rem; font-weight: 700; color: var(--blue-light); }
.post-foot .more .icon { inline-size: 1rem; block-size: 1rem; }
.post-byline { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block-start: 1.5rem; color: var(--text-3); font-size: 0.9375rem; }
.post-tags { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-block-start: 2.5rem; padding-block-start: 1.5rem; border-block-start: 1px solid var(--line-light); color: var(--ink-2); }
.post-tags a { color: var(--blue); text-decoration: none; }
.prose a { color: var(--blue); text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-block-start: 2.5rem; color: var(--text-2); }
.empty-note { text-align: center; color: var(--ink-2); }

.error-code {
  font-size: clamp(4rem, 3rem + 6vw, 7rem); font-weight: 800; line-height: 1; letter-spacing: -0.05em;
  background: linear-gradient(180deg, var(--blue), #9CC2FF); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Reviews ---------- */
.review-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.review { margin: 0; padding: 1.75rem; display: grid; gap: 1rem; align-content: start; }
.stars { color: #FFC24B; letter-spacing: 0.15em; }
.stars span { color: rgb(255 255 255 / 0.2); }
.review blockquote { margin: 0; color: var(--text); font-size: 1.0625rem; }
.review figcaption { font-size: 0.875rem; color: var(--text-2); }
.review figcaption a { color: var(--blue-light); }

/* ---------- Forms (on the light sheet) ---------- */
.form-section { padding-block-start: 0; }
.form-layout { display: grid; gap: 1.5rem; align-items: start; }
.form { max-inline-size: none; margin: 0; }
.form fieldset { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.form fieldset + fieldset { margin-block-start: 2.25rem; padding-block-start: 2rem; border-block-start: 1px solid var(--line-light); }
/* Floating the legend takes it out of the fieldset border, so the divider line stays above it. */
.form legend { float: inline-start; inline-size: 100%; padding: 0; margin-block-end: 1.25rem; font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.form legend + * { clear: both; }
.form-grid { display: grid; gap: 1.125rem 1rem; }
.field { display: grid; gap: 0.375rem; align-content: start; }
.field label, .choice legend { font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.choice legend { margin-block-end: 0.5rem; }
.optional { font-weight: 400; color: var(--ink-2); font-size: 0.8125rem; }
.form :is(input[type="text"], input[type="tel"], input[type="email"], input[type="url"], input[type="date"], select, textarea) {
  inline-size: 100%; min-block-size: 3rem; padding: 0.75rem 1rem;
  border: 1px solid #C9D2E6; border-radius: var(--radius-sm); background: var(--surface-card);
  font: inherit; font-size: 1rem; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s;
}
.form textarea { resize: vertical; min-block-size: 8rem; line-height: 1.6; }
.form :is(input, select, textarea):focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgb(47 91 234 / 0.18); }
.form [dir="ltr"] { text-align: start; }
html[dir="rtl"] .form [dir="ltr"] { text-align: end; }
.form input[type="file"] {
  inline-size: 100%; padding: 1rem; border: 1.5px dashed #AFC0E3; border-radius: var(--radius-sm);
  background: #EEF3FE; font: inherit; font-size: 0.9375rem; color: var(--ink-2); cursor: pointer;
}
.form input[type="file"]::file-selector-button {
  margin-inline-end: 0.875rem; padding: 0.5rem 1rem; border: 0; border-radius: var(--pill);
  background: var(--blue); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}
.help { font-size: 0.8125rem; color: var(--ink-2); }
.form-grid > .help { margin-block-start: -0.5rem; }
.error { font-size: 0.875rem; font-weight: 600; color: var(--error); }
.has-error :is(input, select, textarea) { border-color: var(--error); }
.form-alert {
  margin-block-end: 1.75rem; padding: 0.875rem 1.125rem; border-radius: var(--radius-sm);
  background: #FDECEE; color: #9E1C2C; font-weight: 600;
}
.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inline-size: 1px; block-size: 1px; }
.pill span {
  display: inline-flex; align-items: center; min-block-size: 2.75rem; padding-inline: 1.25rem;
  border: 1px solid #C9D2E6; border-radius: var(--pill); background: var(--surface-card);
  font-weight: 600; color: var(--ink-2); transition: all 0.15s;
}
.pill input:checked + span { border-color: var(--blue); background: var(--blue); color: var(--text); }
.pill input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.check { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.9375rem; color: var(--ink); cursor: pointer; }
.check input { flex: none; inline-size: 1.25rem; block-size: 1.25rem; margin-block-start: 0.15rem; accent-color: var(--blue); }
.consent { margin-block-start: 2rem; color: var(--ink-2); }
.privacy-note { margin-block: 1rem 1.75rem; font-size: 0.875rem; color: var(--ink-2); }
.privacy-note a { color: var(--blue); }
.form-submit { inline-size: 100%; }
/* The honeypot: off-screen rather than display:none, which some bots skip. */
.hp { position: absolute; inset-inline-start: -10000px; inline-size: 1px; block-size: 1px; overflow: hidden; }
.form-aside { display: grid; gap: 1rem; }
.form-aside .btn { inline-size: 100%; }
.next-steps { padding: 1.75rem; }
.next-steps ol { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; counter-reset: next; }
.next-steps li { position: relative; padding-inline-start: 2.75rem; color: var(--text-2); counter-increment: next; }
.next-steps li::before {
  content: counter(next); position: absolute; inset-inline-start: 0; inset-block-start: -0.1rem;
  display: grid; place-items: center; inline-size: 2rem; block-size: 2rem; border-radius: 50%;
  background: var(--text); color: var(--ink); font-weight: 800; font-size: 0.875rem;
}
html[lang="fa"] .next-steps li::before { content: counter(next, persian); }

.thanks-card { max-inline-size: 42rem; text-align: center; }
/* On a light sheet the highlight must start dark enough to read (the default starts at white). */
.sheet .accent { background-image: linear-gradient(100deg, var(--blue) 0%, #3E7BF5 55%, #1597B0 100%); }
.thanks-card .badge3d { --size: 5rem; margin: 0 auto 2rem; }
.thanks-card .lead { margin-block: 1.25rem; color: var(--ink-2); }
.thanks-card .muted { color: var(--ink-2); }
.thanks-card .btn-row { justify-content: center; margin-block-start: 2rem; }
.reference {
  display: inline-flex; align-items: center; gap: 0.75rem; margin-block-end: 1rem; padding: 0.625rem 1.25rem;
  border-radius: var(--pill); background: #E6EDFD; color: var(--ink-2);
}
.reference strong { color: var(--ink); font-size: 1.125rem; letter-spacing: 0.06em; }
.btn-outline-ink { border-color: #C9D2E6; color: var(--ink); background: var(--surface-card); }
.btn-outline-ink:hover { border-color: var(--blue); }

/* ---------- Footer ---------- */
.site-footer { position: relative; padding-block: 4.5rem 2rem; font-size: 0.9375rem; background: rgb(8 20 48 / 0.6); border-block-start: 1px solid rgb(255 255 255 / 0.1); }
.footer-grid { display: grid; gap: 2.5rem; }
.footer-tagline { margin-block-start: 1rem; max-inline-size: 22rem; }
.footer-title { margin-block-end: 1rem; font-size: var(--fs-small); font-weight: 700; color: var(--text); }
.footer-list + .footer-title { margin-block-start: 1.75rem; }
.footer-list { display: grid; gap: 0.625rem; padding: 0; margin: 0; list-style: none; }
.footer-list a, .footer-list span { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-2); text-decoration: none; }
.footer-list a:hover { color: var(--text); }
.footer-list .icon { inline-size: 1rem; block-size: 1rem; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; justify-content: space-between;
  margin-block-start: 3rem; padding-block-start: 1.5rem; border-block-start: 1px solid rgb(255 255 255 / 0.1);
  color: var(--text-3); font-size: var(--fs-small);
}
.footer-bottom nav { display: flex; gap: 1.25rem; }
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { color: var(--text); }

/* ---------- Contact shortcuts ---------- */
.wa-float {
  position: fixed; inset-block-end: 1.5rem; inset-inline-end: 1.5rem; z-index: 40;
  display: grid; place-items: center; inline-size: 3.5rem; block-size: 3.5rem; border-radius: 50%;
  background: #25D366; color: #FFFFFF; box-shadow: var(--shadow); transition: transform 0.2s var(--ease);
}
.wa-float:hover { transform: scale(1.06); }
.wa-float .icon { inline-size: 1.75rem; block-size: 1.75rem; }
.action-bar { display: none; }

/* ---------- Responsive ---------- */
@media (min-width: 40rem) {
  .chip-float { display: inline-flex; }
}
@media (max-width: 39.99rem) {
  .chip-float { display: none; }
}
@media (min-width: 48rem) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .field-wide { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); }
}
@media (min-width: 64rem) {
  .hero-grid { grid-template-columns: 0.95fr 1.05fr; }
  /* The scene leans out past the column edge, as in the reference. */
  .stage { inline-size: 108%; margin-inline-start: -2%; }
  .card-grid { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .talk-grid { grid-template-columns: 1.15fr 0.85fr; gap: 4rem; }
  .sub-layout { grid-template-columns: 1fr 18rem; }
  .form-layout { grid-template-columns: 1fr 20rem; }
  .form-aside { position: sticky; inset-block-start: calc(var(--header-h) + 1.5rem); }
  .sub-grid, .mini-grid { grid-template-columns: repeat(3, 1fr); }
  .side-links { position: sticky; inset-block-start: calc(var(--header-h) + 1.5rem); }
  .faq-layout { grid-template-columns: 0.8fr 1.2fr; gap: 4rem; }
  .areas { grid-template-columns: 0.8fr 1.2fr; align-items: center; }
}
@media (max-width: 63.99rem) {
  .site-header .container { grid-template-columns: 1fr auto; gap: 0.5rem; }
  .menu-toggle {
    display: inline-grid; place-items: center; inline-size: 2.75rem; block-size: 2.75rem;
    border: 1px solid var(--glass-border); border-radius: 50%; background: var(--glass); color: var(--text); cursor: pointer;
  }
  .menu-toggle[aria-expanded="true"] { background: var(--text); color: var(--ink); }
  .header-actions { gap: 0.5rem; }
  /* The quote button lives in the bottom bar and in the menu on small screens. */
  .header-actions .btn-quote { display: none; }
  /* backdrop-filter would make the header the containing block of the fixed menu sheet and trap
     it inside the header's height, so small screens get a solid header instead. */
  .site-header, .site-header.scrolled { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgb(11 26 64 / 0.97); }
  /* The menu: a full-screen sheet. Links first, then the services as tiles, then the contact buttons. */
  .nav {
    position: fixed; inset: var(--header-h) 0 0; z-index: 49; display: none;
    flex-direction: column; gap: 1.75rem; margin: 0;
    padding: 1rem var(--gutter) calc(var(--bar-h) + 2rem); overflow-y: auto; overscroll-behavior: contain;
    background:
      radial-gradient(90% 40% at 100% 0%, rgb(143 176 224 / 0.22), transparent 70%),
      linear-gradient(180deg, var(--bg-1), var(--bg-0));
  }
  .nav.open { display: flex; }
  html.menu-open { overflow: hidden; }
  .nav-pill { flex-direction: column; align-items: stretch; gap: 0.25rem; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
  .nav-link { justify-content: space-between; padding: 0.875rem 1rem; border-radius: var(--radius-sm); font-size: 1.375rem; font-weight: 700; color: var(--text); }
  .nav-link[aria-current="page"] { color: var(--text); background: var(--glass-hi); }
  .nav-group { order: 1; margin-block-start: 1rem; }
  .nav-group > .nav-link { display: none; }
  .mega, .mega.open {
    position: static; display: grid; grid-template-columns: 1fr; gap: 1.25rem; max-inline-size: none;
    padding: 0; border: 0; background: none; box-shadow: none;
  }
  .mega-col { padding: 0; background: none; }
  .mega-list, .mega-col-wide .mega-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 0.5rem; }
  .mega-item { padding: 0.75rem; border: 1px solid rgb(255 255 255 / 0.1); background: rgb(255 255 255 / 0.05); }
  .mega-cta { display: none; }
  .nav-actions { display: grid; gap: 0.625rem; }
  .nav-actions .btn { justify-content: center; }
  .stage { max-inline-size: 40rem; margin-inline: auto; }
  /* Space for the bottom bar so it never covers the footer. */
  body.has-bar { padding-block-end: var(--bar-h); }
  .action-bar {
    position: fixed; inset: auto 0 0; z-index: 45; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    block-size: var(--bar-h); border-block-start: 1px solid var(--glass-border);
    background: rgb(11 26 64 / 0.96);
  }
  .action-bar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem;
    font-size: 0.75rem; font-weight: 600; color: var(--text); text-decoration: none;
  }
  .action-bar a.primary { background: var(--blue); }
  .wa-float { display: none; }
}
@media (max-width: 30rem) {
  .person, .person:nth-child(even) { grid-template-columns: 1fr; justify-items: start; }
  .person:nth-child(even) .avatar { order: 0; }
  .bubble::before { inset-block-end: auto; inset-block-start: -0.625rem; inset-inline-start: 2.5rem; }
  .person:nth-child(even) .bubble::before { inset-inline-end: auto; inset-inline-start: 2.5rem; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.9s var(--ease) both; }
  .float { animation: float 7s ease-in-out infinite; }
  .float-slow { animation: float 10s ease-in-out infinite reverse; }
  .chip-float { animation: float 8s ease-in-out infinite; }
  .chip-float:nth-of-type(2) { animation-delay: -3s; }
  .chip-float:nth-of-type(3) { animation-delay: -5s; }
  .mega.open, .nav.open { animation: drop 0.25s var(--ease) both; }
}
@keyframes drop { from { opacity: 0; translate: 0 -8px; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes float { 50% { translate: 0 -12px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Uploaded photos, portfolio, before/after (step 6) ---------- */
.stage-photo { position: relative; }
.stage-photo img { inline-size: 100%; block-size: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.project-card { display: flex; flex-direction: column; gap: 0.75rem; padding: 0.75rem 0.75rem 1.5rem; text-decoration: none; transition: transform 0.3s var(--ease), border-color 0.3s; }
.project-card:hover { transform: translateY(-5px); border-color: rgb(255 255 255 / 0.4); }
.project-card > :not(.project-cover) { padding-inline: 0.75rem; }
.project-cover { display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border-radius: calc(var(--radius) - 0.5rem); background: var(--glass); }
.project-cover img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.project-cover .badge3d { --size: 5rem; }
.center-link { display: flex; justify-content: center; margin-block-start: 2rem; }

.ba-list { display: grid; gap: 2rem; max-inline-size: 64rem; }
.ba { margin: 0; }
.ba figcaption, .gallery figcaption { margin-block-start: 0.75rem; color: var(--text-2); font-size: 0.9375rem; text-align: center; }
/* Physical left/right on purpose: "before" is on the left in both languages, like the photos. */
.ba-frame { position: relative; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow); direction: ltr; --pos: 50%; }
.ba-frame img { display: block; inline-size: 100%; block-size: auto; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-before img { block-size: 100%; object-fit: cover; }
.ba-handle { position: absolute; inset-block: 0; left: var(--pos); inline-size: 3px; margin-left: -1.5px; background: #FFFFFF; box-shadow: 0 0 12px rgb(0 0 0 / 0.4); pointer-events: none; }
.ba-handle::after {
  content: "‹ ›"; position: absolute; top: 50%; left: 50%; translate: -50% -50%; display: grid; place-items: center;
  inline-size: 2.75rem; block-size: 2.75rem; border-radius: 50%; background: #FFFFFF; color: var(--ink); font-weight: 800; letter-spacing: 0.1em;
}
.ba-range { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba-range:focus-visible + * , .ba-frame:focus-within .ba-handle::after { outline: 3px solid var(--focus); }
.ba-tag {
  position: absolute; top: 1rem; padding: 0.25rem 0.75rem; border-radius: var(--pill); background: rgb(8 20 48 / 0.7);
  color: #FFFFFF; font-size: 0.8125rem; font-weight: 700; pointer-events: none;
}
.ba-tag-before { left: 1rem; }
.ba-tag-after { right: 1rem; }
.gallery { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.gallery figure { margin: 0; }
.gallery img { inline-size: 100%; block-size: auto; border-radius: var(--radius); }
.brand-logo { block-size: 2.5rem; inline-size: auto; }
.post-cover { margin-block-end: 2rem; }
.post-cover img { inline-size: 100%; block-size: auto; border-radius: var(--radius-lg); }
.avatar img.media { border-radius: 50%; aspect-ratio: 1; object-fit: cover; }
