/* ==========================================================================
   ERNIX AGENCY — main.css
   Premium dark ecommerce-agency design system
   Fonts: Space Grotesk (display) / Inter (body)
   Mobile-first. All critical layout works without JavaScript.
   ========================================================================== */

:root {
  --bg-main: #070A13;
  --bg-deep: #05070D;
  --bg-surface-1: #0D1220;
  --bg-surface-2: #12192B;
  --bg-surface-3: #18223C;

  --border-subtle: rgba(234, 242, 255, 0.08);
  --border-card: rgba(234, 242, 255, 0.12);
  --border-active: rgba(63, 187, 255, 0.5);

  --blue-primary: #2F6FFF;
  --blue-bright: #5EA2FF;
  --blue-glow: rgba(47, 111, 255, 0.16);
  --cyan-accent: #00F0FF;
  --emerald: #10B981;
  --emerald-soft: rgba(16, 185, 129, 0.14);
  --amber: #FFC94D;
  --amber-soft: rgba(255, 201, 77, 0.12);
  --purple: #8B5CF6;

  --text-main: #F3F7FF;
  --text-muted: #8E9CB8;
  --text-dim: #606F91;

  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;

  --container-max: 1200px;
  --header-h: 64px;
  --t-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --t-normal: 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg-main);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
a { color: var(--blue-bright); text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.015em;
  font-weight: 700;
}
h1 { font-size: clamp(34px, 6.4vw, 64px); }
h2 { font-size: clamp(26px, 4.2vw, 40px); }
h3 { font-size: clamp(19px, 2.4vw, 22px); }

::selection { background: rgba(47, 111, 255, 0.4); }

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

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  background: var(--blue-primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.2;
  text-align: center;
  transition: transform var(--t-fast), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue-primary);
  color: #fff;
  box-shadow: 0 8px 28px rgba(47, 111, 255, 0.35);
}
.btn-primary:hover { background: #3D7AFF; transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-card);
}
.btn-ghost:hover { border-color: var(--border-active); background: rgba(47, 111, 255, 0.08); }
.btn-outline {
  background: rgba(47, 111, 255, 0.08);
  color: var(--blue-bright);
  border-color: rgba(47, 111, 255, 0.35);
}
.btn-outline:hover { background: rgba(47, 111, 255, 0.16); }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 14.5px; }
.btn-lg { min-height: 54px; padding: 15px 32px; font-size: 16.5px; }
.btn[disabled] { opacity: 0.65; cursor: wait; transform: none; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--blue-bright);
  font-weight: 600;
  font-size: 15px;
}
.link-arrow::after { content: "\2192"; transition: transform var(--t-fast); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 10, 19, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-icon { height: 40px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.05em;
  color: var(--text-main);
}
.brand-x { color: var(--blue-bright); }
.brand-tag {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--text-main);
  margin-top: 3px;
  white-space: nowrap;
}
.nav-inline { display: none; align-items: center; gap: 2px; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 10px;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-link:hover { color: var(--text-main); background: rgba(234, 242, 255, 0.05); }
.nav-link.is-current { color: var(--text-main); }

.chev {
  width: 8px; height: 8px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--t-fast);
}
.nav-drop { position: relative; }
.nav-drop > summary { list-style: none; cursor: pointer; }
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop[open] .chev { transform: rotate(-135deg) translateY(-2px); }
.nav-drop-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 320px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.nav-drop-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 500;
}
.nav-drop-menu a:hover { background: var(--bg-surface-3); color: var(--text-main); }
.nav-drop-menu a.is-current { color: var(--blue-bright); }
.nav-cta { margin-left: 10px; }

.nav-mobile { display: block; position: relative; }
.nav-burger {
  list-style: none;
  width: 46px; height: 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--border-card);
  border-radius: 10px;
  cursor: pointer;
}
.nav-burger::-webkit-details-marker { display: none; }
.nav-burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-main);
  border-radius: 2px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}
.nav-mobile[open] .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-mobile[open] .nav-burger span:nth-child(2) { opacity: 0; }
.nav-mobile[open] .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile-panel {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  width: 100%;
  background: var(--bg-surface-1);
  border-bottom: 1px solid var(--border-card);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
  padding: 10px 20px 28px;
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  z-index: 3;
}
/* Dim + block the page behind the open mobile menu; tap it to close */
.nav-scrim { display: none; }
.nav-mobile[open] .nav-scrim {
  display: block;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  background: rgba(4, 7, 15, 0.7);
  z-index: 2;
}
.nav-mobile-group {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 18px 0 8px;
}
.nav-mobile-group:first-child { margin-top: 4px; }
.nav-mobile-services, .nav-mobile-main { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.nav-mobile-main { grid-template-columns: 1fr 1fr; }
.nav-mobile-services a, .nav-mobile-main a {
  display: block;
  padding: 10px 10px;
  border-radius: 9px;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 500;
}
.nav-mobile-services a:hover, .nav-mobile-main a:hover { background: var(--bg-surface-2); }
.nav-mobile-services a[aria-current], .nav-mobile-main a[aria-current] { color: var(--blue-bright); }
.nav-mobile-cta { width: 100%; margin-top: 20px; }

@media (min-width: 960px) {
  :root { --header-h: 72px; }
  .brand img { height: 40px; }
  .nav-inline { display: flex; }
  .nav-mobile { display: none; }
}

/* ---------- Hero (homepage) ---------- */
.hero {
  position: relative;
  padding: clamp(64px, 9vw, 110px) 0 clamp(48px, 7vw, 80px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(94, 162, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 162, 255, 0.06) 1px, transparent 1px),
    radial-gradient(720px 420px at 78% -10%, rgba(47, 111, 255, 0.22), transparent 62%),
    radial-gradient(520px 320px at 8% 8%, rgba(139, 92, 246, 0.12), transparent 60%);
  background-size: 46px 46px, 46px 46px, auto, auto;
  -webkit-mask-image: radial-gradient(130% 120% at 50% 42%, #000 50%, transparent 100%);
  mask-image: radial-gradient(130% 120% at 50% 42%, #000 50%, transparent 100%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  top: 46%;
  left: 50%;
  width: clamp(380px, 50vw, 820px);
  aspect-ratio: 508 / 273;
  transform: translate(-50%, -50%);
  background: url(../images/hero-ex.png) center / contain no-repeat;
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
}
@media (max-width: 640px) {
  .hero::after { width: 96vw; opacity: 0.12; }
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(47, 111, 255, 0.4);
  background: var(--blue-glow);
  color: var(--blue-bright);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 26px;
}
.hero-badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan-accent);
  box-shadow: 0 0 10px var(--cyan-accent);
}
.hero-title { max-width: 19ch; }
.hero-lead {
  margin-top: 22px;
  max-width: 62ch;
  font-size: clamp(16.5px, 2.2vw, 19px);
  color: var(--text-muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-note {
  margin-top: 22px;
  font-size: 14px;
  color: var(--text-dim);
}
.hero-note strong { color: var(--text-muted); font-weight: 600; }

/* Animated services ticker */
.marquee {
  overflow: hidden;
  border-block: 1px solid rgba(94, 162, 255, 0.30);
  background: linear-gradient(90deg, #0b307f 0%, #1a5be0 50%, #0b307f 100%);
  padding: 15px 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 38s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-half {
  display: flex;
  align-items: center;
  gap: 44px;
  padding-right: 44px;
  flex-shrink: 0;
}
.marquee-half span {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  white-space: nowrap;
}
.marquee-half i {
  font-style: normal;
  color: #bcd3ff;
  font-size: 11px;
}
@keyframes marquee-scroll { to { transform: translateX(-50%); } }

/* Real-results proof strip (no invented stats) */
.proof-strip {
  margin-top: clamp(44px, 6vw, 72px);
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.proof-item { padding: 20px 8px 4px 0; }
.proof-value {
  font-family: var(--font-display);
  font-size: clamp(21px, 3vw, 27px);
  font-weight: 700;
  color: var(--text-main);
}
.proof-value em { font-style: normal; color: var(--blue-bright); }
.proof-label { font-size: 13.5px; color: var(--text-muted); margin-top: 4px; }
.proof-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
@media (min-width: 900px) { .proof-strip { grid-template-columns: repeat(4, 1fr); } .proof-item { padding-inline: 22px; } .proof-item + .proof-item { border-left: 1px solid var(--border-subtle); } .proof-item:first-child { padding-left: 0; } }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-tight { padding: clamp(40px, 6vw, 64px) 0; }
.section-alt { background: var(--bg-surface-1); border-block: 1px solid var(--border-subtle); }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 52px); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-bright);
  margin-bottom: 14px;
}
.section-head h2 { margin-bottom: 16px; }
.section-head p { color: var(--text-muted); font-size: 16.5px; }
.section-foot { margin-top: clamp(28px, 4vw, 44px); }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: linear-gradient(180deg, rgba(24, 34, 60, 0.35), rgba(13, 18, 32, 0.6));
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
}

/* Service cards */
.svc-card {
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform var(--t-normal), border-color var(--t-normal), background var(--t-normal);
}
.svc-card:hover { transform: translateY(-4px); border-color: var(--border-active); background: linear-gradient(180deg, rgba(24, 34, 60, 0.55), rgba(13, 18, 32, 0.7)); }
.svc-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-glow);
  border: 1px solid rgba(47, 111, 255, 0.3);
  color: var(--blue-bright);
}
.svc-icon svg { width: 22px; height: 22px; }
.svc-card h3 { margin-top: 4px; }
.svc-card p { color: var(--text-muted); font-size: 15px; flex: 1; }
.svc-card .link-arrow { margin-top: 4px; }

/* Why lists */
.why-list li {
  position: relative;
  padding: 10px 0 10px 34px;
  color: var(--text-muted);
  font-size: 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.why-list li:last-child { border-bottom: none; }
.why-list li::before {
  content: "\2713";
  position: absolute;
  left: 0; top: 9px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--emerald-soft);
  color: var(--emerald);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.why-list li strong { color: var(--text-main); }

/* Process steps */
.steps .step { padding: 26px 24px; }
.step-num {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--blue-bright);
  margin-bottom: 14px;
}
.step h3 { margin-bottom: 10px; }
.step p { color: var(--text-muted); font-size: 15px; }
.step-meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-dim);
}
.step-meta strong { color: var(--text-muted); font-weight: 600; }

/* Case study cards */
.case-card { overflow: hidden; display: flex; flex-direction: column; transition: transform var(--t-normal), border-color var(--t-normal); }
.case-card:hover { transform: translateY(-4px); border-color: var(--border-active); }
.case-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-surface-2); }
.case-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--t-normal); }
.case-card:hover .case-media img { transform: scale(1.035); }
.case-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.case-cat { font-size: 12.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue-bright); }
.case-body h3 { font-size: 21px; }
.case-body > p { color: var(--text-muted); font-size: 15px; flex: 1; }
.case-stats { display: flex; flex-wrap: wrap; gap: 10px 22px; padding-top: 14px; border-top: 1px solid var(--border-subtle); }
.case-stat b { display: block; font-family: var(--font-display); font-size: 17px; color: var(--text-main); }
.case-stat span { font-size: 12.5px; color: var(--text-dim); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  background: rgba(234, 242, 255, 0.03);
  font-size: 13px;
  color: var(--text-muted);
}
.chip a { color: inherit; }
.chip a:hover { color: var(--blue-bright); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: clamp(44px, 7vw, 72px) 0 clamp(30px, 4vw, 44px); position: relative; }
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(640px 300px at 85% -20%, rgba(47, 111, 255, 0.18), transparent 62%);
  pointer-events: none;
}
.page-hero .container { position: relative; }
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--blue-bright); }
.crumbs [aria-current] { color: var(--text-muted); }
.page-hero h1 { max-width: 24ch; }
.page-hero-lead { margin-top: 18px; max-width: 66ch; color: var(--text-muted); font-size: clamp(16px, 2vw, 18px); }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.page-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

/* ---------- Service page layout ---------- */
.svc-layout { display: grid; gap: 40px; padding-bottom: clamp(56px, 8vw, 96px); }
.svc-main { max-width: 820px; }
.svc-main h2 { margin: 44px 0 16px; font-size: clamp(23px, 3vw, 30px); }
.svc-main h2:first-child { margin-top: 0; }
.svc-main p { color: var(--text-muted); margin-bottom: 16px; font-size: 16px; }
.svc-main ul.plain { display: grid; gap: 10px; margin: 6px 0 18px; }
.svc-main ul.plain li {
  position: relative;
  padding-left: 28px;
  color: var(--text-muted);
}
.svc-main ul.plain li::before {
  content: "";
  position: absolute;
  left: 4px; top: 9px;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--blue-primary);
  transform: rotate(45deg);
}
.svc-aside { display: grid; gap: 20px; align-content: start; }
.aside-box { padding: 24px; }
.aside-box h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.aside-box ul { display: grid; gap: 4px; }
.aside-box a {
  display: block;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 14.5px;
}
.aside-box a:hover { background: var(--bg-surface-3); color: var(--text-main); }
@media (min-width: 1080px) {
  .svc-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; }
  .svc-aside { position: sticky; top: 96px; }
}

/* ---------- Case study pages ---------- */
.cs-hero { display: grid; gap: 36px; padding-bottom: clamp(40px, 6vw, 64px); }
.cs-hero-media img { border-radius: var(--radius-lg); border: 1px solid var(--border-card); width: 100%; }
.cs-hero-media .video-frame { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-card); background: #000; }
.cs-hero-media video { width: 100%; display: block; }
.cs-results { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { padding: 24px 20px; text-align: center; }
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 36px);
  color: var(--text-main);
}
.stat b em { font-style: normal; color: var(--blue-bright); }
.stat span { font-size: 13.5px; color: var(--text-muted); }
.cs-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; padding: 24px; }
.cs-meta dt { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 5px; }
.cs-meta dd { font-size: 15px; color: var(--text-main); }
@media (min-width: 720px) {
  .cs-hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; }
  .cs-results { grid-template-columns: repeat(3, 1fr); }
  .cs-meta { grid-template-columns: repeat(4, 1fr); }
}

.shot { margin: 28px 0; }
.shot img { border-radius: var(--radius-md); border: 1px solid var(--border-card); width: 100%; }
.shot figcaption { margin-top: 12px; font-size: 13.5px; color: var(--text-dim); }

.cs-section { padding: clamp(36px, 5vw, 56px) 0; border-top: 1px solid var(--border-subtle); }
.cs-section h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 18px; }
.cs-section p { color: var(--text-muted); margin-bottom: 14px; max-width: 74ch; }
.cs-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- Testimonials ---------- */
.testi { padding: 28px 26px; display: flex; flex-direction: column; gap: 16px; }
.stars { color: var(--amber); font-size: 15px; letter-spacing: 2px; }
.testi-quote { color: var(--text-main); font-size: 15.5px; flex: 1; }
.testi-who { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--blue-glow);
  border: 1px solid rgba(47, 111, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--blue-bright);
  flex-shrink: 0;
}
.testi-name { font-weight: 600; font-size: 15px; }
.testi-role { font-size: 13px; color: var(--text-muted); }
.testi-verified { font-size: 12.5px; color: var(--emerald); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; display: grid; gap: 12px; }
.faq-item { border-radius: var(--radius-md); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 22px;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--blue-bright);
  transition: transform var(--t-fast);
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-a { padding: 0 22px 20px; color: var(--text-muted); font-size: 15.5px; max-width: 70ch; }
.faq-a p + p { margin-top: 10px; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(47, 111, 255, 0.35);
  background:
    radial-gradient(600px 300px at 85% 0%, rgba(47, 111, 255, 0.3), transparent 60%),
    linear-gradient(180deg, var(--bg-surface-2), var(--bg-surface-1));
  padding: clamp(40px, 6vw, 64px) clamp(24px, 5vw, 56px);
  text-align: center;
}
.cta-band h2 { max-width: 22ch; margin-inline: auto; }
.cta-band p { color: var(--text-muted); max-width: 56ch; margin: 16px auto 0; font-size: 16.5px; }
.cta-band .hero-actions { justify-content: center; margin-top: 30px; }
.cta-band .hero-note { margin-top: 18px; }

/* ---------- Blog ---------- */
.post-grid { display: grid; gap: 20px; }
@media (min-width: 720px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card { padding: 28px 26px; display: flex; flex-direction: column; gap: 12px; transition: transform var(--t-normal), border-color var(--t-normal); }
.post-card:hover { transform: translateY(-4px); border-color: var(--border-active); }
.post-cat {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-bright);
  background: var(--blue-glow);
  padding: 5px 12px;
  border-radius: 999px;
}
.post-card h3 { font-size: 20px; line-height: 1.25; }
.post-card h3 a { color: var(--text-main); }
.post-card h3 a:hover { color: var(--blue-bright); }
.post-card p { color: var(--text-muted); font-size: 15px; flex: 1; }

/* Article prose */
.prose { max-width: 780px; }
.prose > p { color: var(--text-muted); margin: 18px 0; font-size: 16.5px; }
.prose h2 { font-size: clamp(23px, 3vw, 29px); margin: 44px 0 14px; }
.prose h3 { font-size: 20px; margin: 32px 0 10px; }
.prose ul, .prose ol { margin: 16px 0 16px 24px; display: grid; gap: 9px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { color: var(--text-muted); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text-main); }
.prose blockquote {
  margin: 26px 0;
  padding: 18px 24px;
  border-left: 3px solid var(--blue-primary);
  background: var(--blue-glow);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-main);
  font-size: 16.5px;
}
.prose table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--border-card); padding: 11px 14px; text-align: left; }
.prose th { background: var(--bg-surface-2); font-family: var(--font-display); }
.prose td { color: var(--text-muted); }
.prose .tip {
  display: block;
  margin: 26px 0;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: var(--emerald-soft);
  color: var(--text-main);
  font-size: 15.5px;
}
.prose .tip strong { color: var(--emerald); }

/* ---------- Forms ---------- */
.form-card { padding: clamp(26px, 4vw, 40px); }
.form-grid { display: grid; gap: 0 20px; }
@media (min-width: 720px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 18px; }
.field-full { grid-column: 1 / -1; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}
.field label .req { color: var(--blue-bright); }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 13px 16px;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom */
  color: var(--text-main);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(47, 111, 255, 0.18);
}
.field textarea { min-height: 150px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 12px;
  font-size: 15px;
}
.form-status[hidden] { display: none; }
.form-status.is-success { background: var(--emerald-soft); border: 1px solid rgba(16, 185, 129, 0.4); color: var(--text-main); }
.form-status.is-warn { background: var(--amber-soft); border: 1px solid rgba(255, 201, 77, 0.4); color: var(--text-main); }
.form-note { margin-top: 14px; font-size: 13.5px; color: var(--text-dim); }
/* Post-submit confirmation card (lives OUTSIDE the form so it can never be hidden with it) */
.form-success-card {
  text-align: center;
  padding: 40px 28px;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-lg);
  background: var(--emerald-soft);
}
.form-success-card[hidden] { display: none; }
.fsc-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.5);
}
.form-success-card h3 { font-size: 20px; margin-bottom: 8px; }
.form-success-card p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 46ch;
  margin: 0 auto 22px;
}

/* Contact layout */
.contact-grid { display: grid; gap: 32px; }
.contact-info h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 16px; }
.contact-info > p { color: var(--text-muted); margin-bottom: 24px; max-width: 52ch; }
.contact-channel {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.contact-channel .svc-icon { flex-shrink: 0; width: 42px; height: 42px; }
.contact-channel h3 { font-size: 16px; margin-bottom: 4px; }
.contact-channel p { font-size: 14px; color: var(--text-muted); }
.contact-channel a.plain { color: var(--blue-bright); font-weight: 600; font-size: 15px; }
@media (min-width: 1000px) {
  .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
}

/* ---------- Team (about) ---------- */
.team-card { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.team-card img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-card); }
.team-card h3 { font-size: 19px; }
.team-role { font-size: 13.5px; color: var(--blue-bright); font-weight: 600; margin-top: -8px; }
.team-card p { color: var(--text-muted); font-size: 15px; flex: 1; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-deep); border-top: 1px solid var(--border-subtle); margin-top: clamp(56px, 8vw, 96px); }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  padding: clamp(48px, 6vw, 72px) 0 40px;
}
.footer-brand .brand-icon { height: 40px; }
.footer-tag { color: var(--text-muted); font-size: 14.5px; margin-top: 16px; max-width: 34ch; }
.footer-loc { color: var(--text-dim); font-size: 13.5px; margin-top: 14px; line-height: 1.7; }
.footer-email { display: inline-block; margin-top: 12px; font-weight: 600; font-size: 15px; }
.footer-h {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { color: var(--text-muted); font-size: 14.5px; }
.footer-col a:hover { color: var(--text-main); }
.footer-cta { margin-top: 22px; width: 100%; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  padding: 22px 0;
  border-top: 1px solid var(--border-subtle);
  font-size: 13.5px;
  color: var(--text-dim);
}
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 40px; }
}

/* ---------- Reveal motion ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--t-normal), transform 0.55s var(--t-normal);
}
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal[data-d="1"] { transition-delay: 0.08s; }
html.js .reveal[data-d="2"] { transition-delay: 0.16s; }
html.js .reveal[data-d="3"] { transition-delay: 0.24s; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: clamp(80px, 14vw, 160px) 0; }
.error-code {
  font-family: var(--font-display);
  font-size: clamp(70px, 14vw, 120px);
  font-weight: 700;
  color: var(--blue-primary);
  line-height: 1;
}
.error-page p { color: var(--text-muted); max-width: 46ch; margin: 18px auto 30px; }
.error-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none; }
  html.js .reveal { opacity: 1; transform: none; }
}

/* ---------- Project calculator ---------- */
.calc { display: grid; gap: 24px; }
@media (min-width: 900px) {
  .calc { grid-template-columns: 1.55fr 1fr; gap: 30px; align-items: start; }
}
.calc-main { display: flex; flex-direction: column; gap: 28px; }
.calc-step-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--text-main);
  margin-bottom: 14px;
}
.calc-stage-desc { color: var(--text-dim); font-size: 13.5px; margin-top: 12px; min-height: 18px; }
.calc-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.calc-chip {
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-card);
  background: rgba(234, 242, 255, 0.03);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.calc-chip:hover { border-color: var(--border-active); color: var(--text-main); transform: translateY(-1px); }
.calc-chip.is-active {
  border-color: var(--blue-primary);
  background: rgba(47, 111, 255, 0.14);
  color: #fff;
  box-shadow: 0 6px 20px rgba(47, 111, 255, 0.25);
}
.calc-output {
  background: linear-gradient(180deg, rgba(24, 34, 60, 0.5), rgba(13, 18, 32, 0.72));
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.calc-output-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); }
.calc-price { font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); font-weight: 700; color: #fff; line-height: 1.1; }
.calc-time { color: var(--blue-bright); font-weight: 600; font-size: 15px; }
.calc-includes { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.calc-includes li { position: relative; padding-left: 24px; color: var(--text-muted); font-size: 14px; line-height: 1.4; }
.calc-includes li::before { content: "✓"; position: absolute; left: 0; color: var(--blue-bright); font-weight: 700; }
.calc-cta { width: 100%; }
.calc-fine { color: var(--text-dim); font-size: 12.5px; line-height: 1.5; }

/* Footer social icons */
.footer-col .social-link { display: inline-flex; align-items: center; }
.footer-col .social-link svg { display: block; }
.footer-col .social-link:hover { color: var(--blue-bright); }

/* Hero decorative ring accents */
.hero-decor { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.hero-decor::before {
  content: ""; position: absolute; top: -150px; right: -110px;
  width: 380px; height: 380px; border-radius: 50%;
  border: 1px solid rgba(94, 162, 255, 0.22);
}
.hero-decor::after {
  content: ""; position: absolute; bottom: -120px; left: 2%;
  width: 220px; height: 220px; border-radius: 50%;
  border: 1px solid rgba(94, 162, 255, 0.14);
}
@media (max-width: 640px) {
  .hero-decor::before { width: 260px; height: 260px; top: -120px; right: -90px; }
}

/* =====================================================
   Mobile fit layer — made to feel native on ANY phone
   (320px screens → large phones, portrait + landscape)
   ===================================================== */

/* 1) Browser never auto-zooms our text on rotate / system font changes */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* 2) Horizontal overflow, killed at the source:
      flex/grid children may shrink; page never scrolls sideways */
*,
*::before,
*::after { min-width: 0; }
body { overflow-x: clip; }

/* 3) Images / video never wider than the screen */
img, video, iframe { max-width: 100%; }

/* 4) Long words, numbers and URLs wrap instead of bursting the layout */
h1, h2, h3, h4, p, li, a, dt, dd, figcaption { overflow-wrap: break-word; }

/* 5) No ugly tap flash on touch screens */
a, button, summary, .calc-chip { -webkit-tap-highlight-color: transparent; }

/* 6) In-page anchors land below the sticky header, not under it */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* 7) Small phones (≤ 480px): tighter spacing, full-width thumb-friendly CTAs */
@media (max-width: 480px) {
  .hero { padding: 52px 0 40px; }
  .hero-badge { font-size: 12px; padding: 6px 12px; margin-bottom: 20px; letter-spacing: 0.04em; }
  .hero-actions { gap: 10px; margin-top: 26px; }
  .hero-actions .btn { width: 100%; }
  .section { padding: 48px 0; }
  .section-tight { padding: 36px 0; }
  .proof-item { padding: 14px 6px 0 0; }
  .marquee-half { gap: 30px; padding-right: 30px; }
  .marquee-half span { font-size: 13px; }
  .calc-chip { padding: 12px 14px; }
  .btn { padding: 12px 18px; }
  .nav-mobile-services a, .nav-mobile-main a { font-size: 14.5px; }
}

/* 8) Very narrow screens (≤ 360px): hide the tagline so the brand never crowds */
@media (max-width: 360px) {
  .brand-tag { display: none; }
  .hero-title { max-width: 100%; }
  .hero-badge { font-size: 11px; }
}
