/* =========================================================
   MACHXEL — AI Software Company
   Design system & global styles
   ========================================================= */

:root {
  /* Palette — light, warm-neutral base with magenta brand accent */
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-2: #f3f3ee;
  --ink: #0e1220;
  --ink-2: #2b3245;
  --muted: #5d6579;
  --line: #e6e5df;
  --line-strong: #d6d5cd;

  --brand: #c10061;        /* magenta */
  --brand-2: #e11d7a;      /* rose   */
  --brand-3: #a3e635;      /* lime   */
  --brand-soft: #fce8f1;
  --cyan-soft: #fdf0f6;
  --lime-soft: #f3fbe3;
  --amber: #f59e0b;

  --grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  --grad-text: linear-gradient(90deg, #c10061 0%, #e11d7a 55%, #16a34a 100%);

  --header-bg: rgba(250, 250, 247, .78);
  --header-bg-scrolled: rgba(250, 250, 247, .92);
  --orb-1: #f9c2d8;
  --orb-2: #fbcfe8;
  --orb-3: #ecfccb;
  --grid-line: rgba(14, 18, 32, .055);
  --overlay-strong: linear-gradient(120deg, rgba(14, 18, 32, .88) 28%, rgba(193, 0, 97, .5) 100%);
  --map-overlay: linear-gradient(180deg, rgba(250, 250, 247, .82) 0%, rgba(250, 250, 247, .72) 100%);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;

  --shadow-sm: 0 1px 2px rgba(14, 18, 32, .05), 0 1px 3px rgba(14, 18, 32, .04);
  --shadow: 0 10px 30px -12px rgba(14, 18, 32, .14), 0 2px 6px rgba(14, 18, 32, .04);
  --shadow-lg: 0 30px 60px -20px rgba(14, 18, 32, .22), 0 8px 20px -10px rgba(193, 0, 97, .12);

  --font-head: "Sora", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);

  --ease: cubic-bezier(.22, 1, .36, 1);

  /* Always-dark surfaces (footer, CTA, inverse buttons) — never flip with theme */
  --inverse: #0e1220;
  --inverse-fg: #ffffff;
  --inverse-muted: rgba(255, 255, 255, .72);
  --inverse-line: rgba(255, 255, 255, .12);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0b0e16;
  --surface: #131722;
  --surface-2: #1a1f2e;
  --ink: #f2f4fa;
  --ink-2: #c8cedd;
  --muted: #8b93a8;
  --line: #252b3b;
  --line-strong: #343b50;

  --brand: #e84a8c;
  --brand-2: #f472b6;
  --brand-3: #a3e635;
  --brand-soft: rgba(193, 0, 97, .18);
  --cyan-soft: rgba(225, 29, 122, .14);
  --lime-soft: rgba(163, 230, 53, .14);
  --amber: #fbbf24;

  --grad: linear-gradient(135deg, #c10061 0%, #e11d7a 100%);
  --grad-text: linear-gradient(90deg, #f472b6 0%, #e84a8c 55%, #86efac 100%);

  --header-bg: rgba(11, 14, 22, .72);
  --header-bg-scrolled: rgba(11, 14, 22, .9);
  --orb-1: rgba(193, 0, 97, .35);
  --orb-2: rgba(225, 29, 122, .28);
  --orb-3: rgba(163, 230, 53, .18);
  --grid-line: rgba(255, 255, 255, .05);
  --overlay-strong: linear-gradient(120deg, rgba(8, 10, 18, .92) 28%, rgba(193, 0, 97, .45) 100%);
  --map-overlay: linear-gradient(180deg, rgba(11, 14, 22, .78) 0%, rgba(11, 14, 22, .68) 100%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .25), 0 1px 3px rgba(0, 0, 0, .2);
  --shadow: 0 12px 32px -14px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .25);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .65), 0 8px 24px -10px rgba(193, 0, 97, .2);

  --inverse: #05070d;
  --inverse-fg: #ffffff;
  --inverse-muted: rgba(242, 244, 250, .75);
  --inverse-line: rgba(255, 255, 255, .14);
  color-scheme: dark;
}

/* Layout mount points (filled by js/layout.js) */
[data-layout="header"] { min-height: 64px; display: block; }
[data-layout="footer"] { min-height: 200px; display: block; }
[data-layout="chrome"] { display: contents; }
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color .35s var(--ease), color .35s var(--ease);
  opacity: 1;
  /* Reserve space for fixed header so content never jumps under it */
  padding-top: var(--header-h, 64px);
}
/* Boot / page transitions — first load only hides content behind boot */
html.is-booting body { visibility: visible; }
html.is-booting body > *:not(#mx-boot) {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Staggered section cascade (top → bottom) */
.cascade {
  opacity: 0;
  transform: translateY(22px);
  will-change: opacity, transform;
}
body.cascade-on .cascade {
  opacity: 1;
  transform: none;
  transition: opacity .55s var(--ease), transform .55s var(--ease);
  transition-delay: calc(var(--cascade-i, 0) * .07s);
}
html.reduce-motion .cascade,
html.reduce-motion body.cascade-on .cascade {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5 { font-family: var(--font-head); color: var(--ink); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }
::selection { background: var(--brand); color: #fff; }

:focus-visible { outline: 3px solid rgba(193, 0, 97, .45); outline-offset: 3px; border-radius: 6px; }

/* ---------- Typography scale ---------- */
.display   { font-size: clamp(2.6rem, 6.2vw, 4.6rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.02; }
.h1        { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 700; letter-spacing: -.03em; }
.h2        { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 700; letter-spacing: -.03em; }
.h3        { font-size: clamp(1.25rem, 2vw, 1.5rem); }
.lead      { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted); line-height: 1.6; }
.small     { font-size: .875rem; }
.muted     { color: var(--muted); }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px var(--brand-soft); }

/* ---------- Layout ---------- */
.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.container--narrow { --container: 860px; }
.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: calc(var(--section) * .6); }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head .lead { margin-bottom: 0; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--inverse); --btn-fg: var(--inverse-fg);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem; letter-spacing: -.01em;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid transparent; overflow: hidden; isolation: isolate;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s, border-color .3s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(0); }
.btn--primary { --btn-bg: var(--brand); }
.btn--primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--grad); opacity: 0; transition: opacity .35s;
}
.btn--primary:hover::after { opacity: 1; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface); border-color: var(--ink); box-shadow: var(--shadow-sm); }
.btn--white { --btn-bg: #fff; --btn-fg: var(--ink); }
.btn--lg { padding: 18px 30px; font-size: 1.02rem; }
.btn--sm { padding: 10px 18px; font-size: .85rem; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none !important; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 600; color: var(--ink); }
.link-arrow svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }
.link-arrow:hover { color: var(--brand); }

/* ---------- Header (fixed — stays visible while scrolling) ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 14px 0;
  transition: padding .3s, background .3s, box-shadow .3s, border-color .3s;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
}
.header.is-scrolled { padding: 8px 0; border-color: var(--line); background: var(--header-bg-scrolled); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.theme-toggle {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--ink); display: grid; place-items: center;
  transition: background .25s, border-color .25s, color .25s;
  flex: none;
}
.theme-toggle:hover { background: var(--surface-2); border-color: var(--line-strong); }
.theme-toggle svg { width: 17px; height: 17px; stroke-width: 1.75; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.32rem; letter-spacing: -.03em; color: var(--ink); }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px -6px rgba(193, 0, 97, .6); }
.logo-mark svg { width: 20px; height: 20px; }
.logo span em { font-style: normal; color: var(--brand); }
/* Image logo: dark-text version on light surfaces, white version on dark surfaces */
.logo-img { display: block; height: 44px; width: auto; }
.logo-img--light { display: none; }
[data-theme="dark"] .logo-img--dark { display: none; }
[data-theme="dark"] .logo-img--light { display: block; }
.footer .logo-img--dark { display: none; }
.footer .logo-img--light { display: block; }
[data-theme="dark"] .footer .logo-img--dark { display: block; }
[data-theme="dark"] .footer .logo-img--light { display: none; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  position: relative; padding: 9px 14px; border-radius: 999px;
  font-family: var(--font-head); font-size: .9rem; font-weight: 500; color: var(--ink-2);
  transition: color .25s, background .25s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a.active { color: var(--brand); background: var(--brand-soft); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-links .btn { display: none; }

@media (max-width: 900px) {
  .nav-cta .btn { display: none; }
  .nav-links { display: none; }
  .header { padding: 10px 0; }
  .header.is-scrolled { padding: 8px 0; }
  .logo { font-size: 1.15rem; }
  .logo-mark { width: 30px; height: 30px; border-radius: 8px; }
  .logo-mark svg { width: 17px; height: 17px; }
  .theme-toggle { width: 34px; height: 34px; border-radius: 9px; }
}

/* ---------- Mobile bottom nav (fixed to viewport) ---------- */
.mobile-nav {
  display: none;
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 1000;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px -18px rgba(14, 18, 32, .35), 0 4px 12px rgba(14, 18, 32, .08);
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  /* Avoid transform/filter here — they break position:fixed on some mobile browsers */
}
[data-theme="dark"] .mobile-nav {
  background: var(--surface);
  box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .55), 0 4px 12px rgba(0, 0, 0, .25);
}
.mobile-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 52px; padding: 6px 4px; border-radius: 16px;
  color: var(--muted); font-family: var(--font-head); font-size: .68rem; font-weight: 600;
  letter-spacing: -.01em; transition: color .25s, background .25s, transform .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav a svg {
  width: 20px; height: 20px; stroke-width: 1.7;
  transition: transform .25s var(--ease), color .25s;
}
.mobile-nav a:hover { color: var(--ink); background: var(--surface-2); }
.mobile-nav a.active {
  color: var(--brand);
  background: var(--brand-soft);
}
.mobile-nav a.active svg { transform: translateY(-1px); }

@media (max-width: 900px) {
  .mobile-nav {
    display: grid;
    left: 10px; right: 10px; bottom: 10px;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    border-radius: 18px;
  }
  .mobile-nav a {
    min-height: 46px; gap: 2px; padding: 4px 2px; border-radius: 14px;
    font-size: .62rem;
  }
  .mobile-nav a svg { width: 18px; height: 18px; }
  /* Dark strip under the floating nav matches the site footer */
  html { background: var(--inverse); }
  body {
    padding-bottom: 0;
    background: var(--bg);
  }
  main { padding-bottom: 8px; }
  .to-top { right: 16px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .footer {
    margin-bottom: 0;
    padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 900px) {
  body[data-page="contact"] main {
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(56px, 8vw, 96px) 0 clamp(64px, 8vw, 112px); overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 100%);
}
.orb {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .45; z-index: -1; pointer-events: none;
  will-change: transform;
  animation: drift 18s ease-in-out infinite alternate;
}
.orb--1 { width: 480px; height: 480px; background: var(--orb-1); top: -160px; right: -120px; }
.orb--2 { width: 380px; height: 380px; background: var(--orb-2); bottom: -180px; left: -140px; animation-delay: -6s; }
.orb--3 { width: 280px; height: 280px; background: var(--orb-3); top: 40%; left: 40%; animation-delay: -3s; opacity: .4; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(28px, -22px, 0) scale(1.05); } }

.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: .82rem; font-weight: 500; color: var(--ink-2); margin-bottom: 26px;
}
.hero-pill .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--lime-soft); display: grid; place-items: center; position: relative; }
.hero-pill .dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #65a30d; }
.hero-pill .dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; border: 2px solid #65a30d; opacity: 0; animation: ping 2.2s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

.hero h1 { margin-bottom: 22px; }
.hero .lead { max-width: 560px; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 40px; }

.rotator {
  display: inline-grid;
  vertical-align: bottom;
  text-align: left;
  position: relative;
  overflow: hidden;
  min-height: 1.15em;
  min-width: min(100%, 15ch);
}
.rotator > span {
  grid-area: 1 / 1;
  white-space: nowrap;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.rotator > span:not(.is-active) {
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  z-index: 0;
}
.rotator > span.is-active {
  opacity: 1;
  transform: none;
  z-index: 1;
}
/* Typewriter caret */
.rotator__text { transition: none; }
.rotator__text::after {
  content: "";
  display: inline-block;
  width: .08em;
  height: .9em;
  margin-left: .06em;
  vertical-align: -0.08em;
  border-radius: 2px;
  background: var(--brand, #c10061);
  animation: caret-blink 1s steps(2, start) infinite;
}
@keyframes caret-blink { to { visibility: hidden; } }

.hero-proof { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatars { display: flex; }
.avatars img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); margin-left: -10px; }
.avatars img:first-child { margin-left: 0; }
.stars { color: var(--amber); letter-spacing: 1px; font-size: .95rem; }
.hero-proof p { margin: 0; font-size: .9rem; color: var(--muted); }
.hero-proof strong { color: var(--ink); }

/* Hero visual — floating console composition */
.hero-visual {
  position: relative;
  min-height: 540px;
  isolation: isolate;
}
@media (max-width: 980px) {
  .hero-visual { min-height: 480px; max-width: 520px; margin-inline: auto; width: 100%; }
}
@media (max-width: 560px) {
  .hero-visual { min-height: auto; padding-bottom: 8px; }
}
.hero-visual canvas {
  position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px);
  pointer-events: none; opacity: .55; z-index: 0;
}
.visual-main {
  position: relative; z-index: 1;
  width: min(78%, 360px); margin: 8% auto 0;
  aspect-ratio: 4 / 4.5; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .35);
  transform: rotate(-1.5deg);
}
@media (max-width: 560px) {
  .visual-main { width: 86%; margin-top: 0; transform: none; }
}
.visual-main img { width: 100%; height: 100%; object-fit: cover; }
.visual-main::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(14, 18, 32, .72) 100%);
}
.visual-main .caption {
  position: absolute; left: 18px; right: 18px; bottom: 16px; color: #fff;
  font-family: var(--font-head); font-size: .88rem; z-index: 1; text-shadow: 0 1px 8px rgba(0,0,0,.35);
}
.visual-main .caption small {
  display: block; opacity: .85; font-family: var(--font-body); font-weight: 400; font-size: .76rem; margin-top: 2px;
}

.float-card {
  position: absolute; z-index: 2;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 14px 16px;
  animation: floaty 7s ease-in-out infinite;
  will-change: transform;
}
.float-card--a { right: 0; top: 4%; width: min(200px, 42%); animation-delay: -1s; }
.float-card--b { right: 0; bottom: 18%; width: min(220px, 48%); animation-delay: -3s; }
.float-card--c { left: 0; bottom: 0; width: min(190px, 44%); animation-delay: -5s; }
@media (max-width: 980px) {
  .float-card--a { top: 4%; right: 2%; }
  .float-card--b { bottom: 8%; }
  .float-card--c { left: 2%; bottom: 0; }
}
@media (max-width: 560px) {
  .hero-visual {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
  }
  .hero-visual canvas { display: none; }
  .visual-main {
    position: relative; width: 100%; margin: 0; order: 1;
  }
  .float-card {
    position: relative; inset: auto; width: 100%; animation: none;
    order: 2;
  }
  .float-card--a, .float-card--b, .float-card--c { right: auto; left: auto; top: auto; bottom: auto; }
}
@keyframes floaty {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -8px, 0); }
}
.float-card .label { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.float-card .value { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: var(--ink); line-height: 1; }
.float-card .value small { font-size: .8rem; color: #16a34a; font-weight: 600; margin-left: 6px; }
.bar { height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 4px; animation: grow 2.4s var(--ease) forwards; }
@keyframes grow { to { width: var(--w, 70%); } }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip { font-size: .7rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.chip.cyan { background: var(--cyan-soft); color: #9d174d; }
.chip.lime { background: var(--lime-soft); color: #4d7c0f; }
.pulse-line { display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-top: 8px; }
.pulse-line i { flex: 1; background: var(--grad); border-radius: 2px; opacity: .85; animation: pulse 1.6s ease-in-out infinite; }
.pulse-line i:nth-child(odd) { animation-delay: -.4s; }
.pulse-line i:nth-child(3n) { animation-delay: -.9s; }
@keyframes pulse { 0%, 100% { height: 30%; } 50% { height: 100%; } }

/* ---------- Marquee ---------- */
.marquee-wrap { border-block: 1px solid var(--line); background: var(--surface); padding: 22px 0; overflow: hidden; }
.marquee-wrap .muted { text-align: center; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin-bottom: 14px; }
.marquee { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee ul { display: flex; gap: 14px; padding-right: 14px; flex-shrink: 0; animation: marquee 34s linear infinite; }
.marquee:hover ul { animation-play-state: paused; }
.marquee li { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--ink-2); white-space: nowrap; background: var(--bg); }
.marquee li svg { width: 18px; height: 18px; color: var(--brand); }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Cards / Bento ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 34px);
  position: relative; overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.card h3 { margin-bottom: 10px; font-size: 1.2rem; }
.card p { color: var(--muted); margin-bottom: 0; }
.card .icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 22px;
  background: var(--brand-soft); color: var(--brand); transition: transform .45s var(--ease), background .3s, color .3s;
}
.card .icon svg { width: 24px; height: 24px; }
.card:hover .icon { background: var(--grad); color: #fff; transform: rotate(-6deg) scale(1.05); }
.card .card-num { position: absolute; top: 22px; right: 26px; font-family: var(--font-head); font-size: .8rem; font-weight: 600; color: var(--line-strong); }
.card ul.list { margin-top: 18px; display: grid; gap: 8px; }
.card ul.list li { display: flex; gap: 10px; font-size: .92rem; color: var(--ink-2); }
.card ul.list li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--lime-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234d7c0f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/10px no-repeat; }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.bento > * { grid-column: span 2; }
.bento .span-3 { grid-column: span 3; }
.bento .span-4 { grid-column: span 4; }
.bento .span-6 { grid-column: span 6; }
@media (max-width: 980px) { .bento > *, .bento .span-3, .bento .span-4 { grid-column: span 3; } }
@media (max-width: 640px) { .bento > *, .bento .span-3, .bento .span-4, .bento .span-6 { grid-column: span 6; } }

.card--feature { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; background: var(--inverse); color: var(--inverse-fg); border-color: var(--inverse); }
.card--feature h3, .card--feature p { color: inherit; }
.card--feature p { color: var(--inverse-muted); }
.card--feature .icon { background: rgba(255, 255, 255, .1); color: var(--inverse-fg); }
.card--feature .visual { border-radius: 14px; overflow: hidden; aspect-ratio: 4/3; }
.card--feature .visual img { width: 100%; height: 100%; object-fit: cover; }
.card--feature::before { content: ""; position: absolute; inset: auto -80px -120px auto; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(193, 0, 97, .55), transparent 70%); pointer-events: none; }
@media (max-width: 640px) { .card--feature { grid-template-columns: 1fr; } }

.card--gradient { background: linear-gradient(145deg, #fce8f1 0%, #fdf0f6 100%); border-color: transparent; }
.card--wide { display: grid; grid-template-columns: auto 1fr; column-gap: 28px; row-gap: 0; align-items: start; }
.card--wide .icon { grid-row: 1 / span 2; margin-bottom: 0; width: 64px; height: 64px; border-radius: 18px; }
.card--wide h3 { grid-column: 2; margin-bottom: 8px; }
.card--wide p { grid-column: 2; }
.card--wide .card-num { position: absolute; }
.card--wide .btn { grid-column: 2; justify-self: start; margin-top: 18px; }
@media (max-width: 760px) {
  .card--wide { grid-template-columns: 1fr; }
  .card--wide .icon { grid-row: auto; margin-bottom: 18px; }
  .card--wide h3, .card--wide p, .card--wide .btn { grid-column: 1; }
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stats--compact { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } .stats--compact { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .stats, .stats--compact { grid-template-columns: 1fr; } }
.stat { padding: 30px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.stat .num { font-family: var(--font-head); font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 700; color: var(--ink); letter-spacing: -.04em; line-height: 1; }
.stat .num b { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.stat p { margin: 10px 0 0; color: var(--muted); font-size: .92rem; }
.stats--inset .stat { background: var(--bg); box-shadow: var(--shadow-sm); }

/* ---------- Split section ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.split .lead { margin-bottom: 26px; }
.split-media { position: relative; }
.split-media img { width: 100%; aspect-ratio: 4/3.4; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.split-media .badge-float { position: absolute; left: -18px; bottom: 30px; }
@media (max-width: 640px) { .split-media .badge-float { left: 12px; } }
/* Reversed split: text on the left, media on the right (desktop only) */
@media (min-width: 901px) {
  .split--reverse > .split-media { order: 2; }
  .split--reverse > .split-media .badge-float { left: auto; right: -18px; }
}
.split-media--stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.split-media--stack img {
  aspect-ratio: 1;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  object-fit: cover;
  transform: none;
}
.split-media--stack img:nth-child(2),
.split-media--stack img:nth-child(3) {
  transform: none;
}
@media (max-width: 640px) {
  .split-media--stack { gap: 10px; }
}

.check-list { display: grid; gap: 14px; margin: 26px 0 30px; }
.check-list li { display: flex; gap: 14px; align-items: flex-start; }
.check-list .tick { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-top: 2px; }
.check-list .tick svg { width: 14px; height: 14px; }
.check-list strong { display: block; color: var(--ink); font-family: var(--font-head); font-weight: 600; font-size: .98rem; margin-bottom: 2px; }
.check-list span { color: var(--muted); font-size: .92rem; }

/* ---------- Process timeline ---------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; counter-reset: step; }
@media (max-width: 980px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } }
.step { position: relative; padding: 30px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); counter-increment: step; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.step::before { content: "0" counter(step); display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--inverse); color: var(--inverse-fg); font-family: var(--font-head); font-weight: 700; font-size: .95rem; margin-bottom: 20px; }
.step:nth-child(2)::before { background: var(--brand); }
.step:nth-child(3)::before { background: var(--brand-2); }
.step:nth-child(4)::before { background: #16a34a; }
.step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .93rem; margin: 0; }
.step .dur { position: absolute; top: 26px; right: 24px; font-size: .74rem; font-weight: 600; color: var(--muted); background: var(--surface-2); padding: 4px 10px; border-radius: 999px; }

/* ---------- Work / case studies ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 980px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .work-grid { grid-template-columns: 1fr; } }
.work-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.work-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.work-card .thumb { position: relative; aspect-ratio: 16/11; overflow: hidden; }
.work-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.work-card:hover .thumb img { transform: scale(1.06); }
.work-card .thumb .tag { position: absolute; top: 14px; left: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); font-size: .74rem; font-weight: 600; color: var(--ink); }
.work-card .body { padding: 24px; }
.work-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.work-card p { color: var(--muted); font-size: .93rem; margin-bottom: 16px; }
.work-card .results { display: flex; gap: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.work-card .results div { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1.1rem; }
.work-card .results div small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .72rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }
.work-card.large { grid-column: span 2; }
.work-card.large .thumb { aspect-ratio: 16/8; }
@media (max-width: 640px) { .work-card.large { grid-column: span 1; } .work-card.large .thumb { aspect-ratio: 16/11; } }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 40px; }
.filter-bar button { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-family: var(--font-head); font-size: .86rem; font-weight: 600; color: var(--ink-2); transition: all .25s; }
.filter-bar button:hover { border-color: var(--ink); }
.filter-bar button.is-active { background: var(--inverse); color: var(--inverse-fg); border-color: var(--inverse); }
.work-card.is-hidden { display: none; }

/* ---------- Testimonials ---------- */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 980px) { .testimonials { grid-template-columns: 1fr; } }
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; gap: 20px; position: relative; }
.quote::before { content: "“"; position: absolute; top: 12px; right: 24px; font-family: Georgia, serif; font-size: 5rem; line-height: 1; color: var(--brand-soft); }
.quote .stars { font-size: .85rem; }
.quote p { margin: 0; font-size: 1.02rem; color: var(--ink-2); line-height: 1.6; }
.quote .who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.quote .who img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.quote .who strong { display: block; font-family: var(--font-head); font-size: .95rem; color: var(--ink); }
.quote .who span { font-size: .82rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 24px; transition: border-color .3s, box-shadow .3s; }
.faq details[open] { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: transform .3s var(--ease), background .3s, color .3s; }
.faq summary .plus svg { width: 14px; height: 14px; }
.faq details[open] summary .plus { transform: rotate(45deg); background: var(--inverse); color: var(--inverse-fg); border-color: var(--inverse); }
.faq .answer { padding: 0 0 22px; color: var(--muted); max-width: 720px; }
.faq .answer p:last-child { margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; border-radius: var(--radius-xl); overflow: hidden;
  padding: clamp(48px, 7vw, 96px) clamp(24px, 6vw, 80px);
  color: var(--inverse-fg); background: var(--inverse); isolation: isolate;
}
.cta-band img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2; opacity: .78;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--overlay-strong);
}
.cta-band h2 { color: #fff; max-width: 640px; text-shadow: 0 1px 12px rgba(0,0,0,.25); }
.cta-band p { color: rgba(255, 255, 255, .86); max-width: 560px; font-size: 1.1rem; }
.cta-band .row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; padding: clamp(36px, 6vw, 88px) 0 clamp(28px, 4vw, 64px); overflow: hidden; }
.page-hero .lead { max-width: 680px; }
.breadcrumb { display: flex; gap: 8px; font-size: .84rem; color: var(--muted); margin-bottom: 20px; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span::before { content: "/"; margin-right: 8px; color: var(--line-strong); }

/* ---------- Team ---------- */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 980px) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .team { grid-template-columns: 1fr; } }
.member { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.member:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.member img { width: 100%; aspect-ratio: 1/1.05; object-fit: cover; filter: saturate(.9); transition: filter .4s; }
.member:hover img { filter: saturate(1.1); }
.member .body { padding: 18px 20px 20px; }
.member strong { display: block; font-family: var(--font-head); color: var(--ink); }
.member span { font-size: .84rem; color: var(--muted); }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .values { grid-template-columns: 1fr; } }
.value-card { padding: 28px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid transparent; transition: background .3s, border-color .3s; }
.value-card:hover { background: var(--surface); border-color: var(--line); }
.value-card .n { font-family: var(--font-head); font-weight: 700; color: var(--brand); font-size: .85rem; letter-spacing: .1em; margin-bottom: 12px; }
.value-card h3 { font-size: 1.1rem; }
.value-card p { color: var(--muted); margin: 0; font-size: .94rem; }

/* ---------- Services detail ---------- */
.service-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--line); }
.service-row:first-of-type { border-top: 0; }
.service-row:nth-child(even) .service-media { order: -1; }
@media (max-width: 900px) { .service-row { grid-template-columns: 1fr; } .service-row:nth-child(even) .service-media { order: 0; } }
.service-media { position: relative; }
.service-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.service-media .badge-float { position: absolute; right: -14px; bottom: -14px; }
.badge-float { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; }
.badge-float .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; }
.badge-float .ic svg { width: 20px; height: 20px; }
.badge-float strong { display: block; font-family: var(--font-head); font-size: .95rem; color: var(--ink); }
.badge-float span { font-size: .78rem; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 28px; }
.tags li { font-size: .8rem; font-weight: 600; padding: 7px 13px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }

/* Pricing / engagement */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; position: relative; }
.plan.is-featured { border-color: var(--brand); box-shadow: 0 30px 60px -30px rgba(193, 0, 97, .45); }
.plan .ribbon { position: absolute; top: -13px; left: 28px; background: var(--grad); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.plan h3 { font-size: 1.25rem; margin-bottom: 4px; }
.plan .sub { color: var(--muted); font-size: .9rem; margin-bottom: 20px; }
.plan .price { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--ink); letter-spacing: -.03em; margin-bottom: 20px; }
.plan .price small { font-size: .85rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { display: grid; gap: 10px; margin-bottom: 28px; }
.plan li { display: flex; gap: 10px; font-size: .93rem; color: var(--ink-2); }
.plan li svg { width: 18px; height: 18px; color: var(--brand); flex: none; margin-top: 3px; }
.plan .btn { margin-top: auto; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info { display: grid; gap: 14px; margin-top: 30px; }
.info-card { display: flex; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.info-card:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.info-card .ic { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.info-card .ic svg { width: 22px; height: 22px; }
.info-card strong { display: block; font-family: var(--font-head); color: var(--ink); font-size: .95rem; margin-bottom: 2px; }
.info-card a, .info-card span { color: var(--muted); font-size: .92rem; }
.info-card a:hover { color: var(--brand); }

.form-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); }
.form-card h3 { margin-bottom: 6px; }
.form-card > p { color: var(--muted); margin-bottom: 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .84rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; font-family: var(--font-head); }
.field label i { color: var(--brand); font-style: normal; }
.field input, .field textarea, .field select {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg);
  transition: border-color .25s, box-shadow .25s, background .25s; appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6579' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 42px; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand); background: var(--surface);
  box-shadow: 0 0 0 4px rgba(193, 0, 97, .12);
}
.field input.is-invalid, .field textarea.is-invalid, .field select.is-invalid { border-color: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, .1); }
.field .err { display: none; font-size: .78rem; color: #dc2626; margin-top: 6px; }
.field.has-error .err { display: block; }
.budget-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.budget-chips label { cursor: pointer; }
.budget-chips input { position: absolute; opacity: 0; pointer-events: none; }
.budget-chips span { display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: .85rem; font-weight: 600; color: var(--ink-2); background: var(--bg); transition: all .25s; }
.budget-chips input:checked + span { background: var(--inverse); color: var(--inverse-fg); border-color: var(--inverse); }
.budget-chips input:focus-visible + span { outline: 3px solid rgba(193, 0, 97, .45); outline-offset: 2px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.form-foot .small { color: var(--muted); }
.hp {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  left: 0 !important;
  top: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.form-msg { display: none; margin-top: 18px; padding: 16px 18px; border-radius: 12px; font-size: .93rem; font-weight: 500; align-items: flex-start; gap: 12px; }
.form-msg.is-visible { display: flex; }
.form-msg.success { background: var(--lime-soft); color: #3f6212; border: 1px solid #d9f99d; }
.form-msg.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.form-msg svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }

.map-strip {
  margin-top: clamp(40px, 6vw, 72px); border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface-2); position: relative;
  min-height: 280px; display: grid; place-items: center; isolation: isolate;
}
.map-strip img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .7; z-index: 0;
}
.map-strip::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: var(--map-overlay);
}
.map-strip .inner {
  position: relative; z-index: 2; text-align: center;
  padding: clamp(36px, 5vw, 56px) clamp(20px, 4vw, 40px); max-width: 760px;
}
.map-strip .inner h3 { margin-bottom: 8px; color: var(--ink); }
.map-strip .inner p {
  margin: 0; color: var(--ink-2); line-height: 1.7;
  font-size: clamp(.9rem, 2.2vw, 1rem);
}
.map-strip--compact {
  margin-top: clamp(28px, 5vw, 48px);
  min-height: 200px;
}
.map-strip--compact .inner {
  padding: clamp(28px, 4vw, 40px) clamp(16px, 3vw, 28px);
}
@media (max-width: 640px) {
  .map-strip--compact { min-height: 0; }
  .map-strip--compact .inner p {
    font-size: .85rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

.footer--compact { margin-top: clamp(32px, 6vw, 56px); }
@media (max-width: 640px) {
  .footer--compact {
    margin-top: 28px;
    padding-top: 32px;
    /* Keep the tall bottom pad so the dark footer fills under the mobile nav */
    padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  }
  .footer--compact .footer-grid { gap: 18px 14px; }
  .footer--compact .footer-grid > :last-child { display: none; }
  .footer--compact .footer-bottom { margin-top: 22px; padding-top: 14px; }
}

/* ---------- Footer ---------- */
.footer { margin-top: var(--section); background: var(--inverse); color: var(--inverse-muted); padding: clamp(56px, 7vw, 88px) 0 32px; position: relative; overflow: hidden; }
.footer::before { content: ""; position: absolute; top: -200px; left: 50%; transform: translateX(-50%); width: 900px; height: 500px; border-radius: 50%; background: radial-gradient(circle, rgba(193, 0, 97, .35), transparent 65%); pointer-events: none; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; position: relative; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 640px) {
  .footer {
    margin-top: clamp(36px, 8vw, 56px);
    padding-top: 40px;
    padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 22px 16px;
  }
  .footer-grid > :first-child,
  .footer-grid > :last-child { grid-column: 1 / -1; }
  .footer p { font-size: .88rem; max-width: none; margin-bottom: 0; }
  .footer h4 { margin-bottom: 12px; }
  .footer ul { gap: 8px; }
  .footer .social { margin-top: 14px; }
  .footer-bottom { margin-top: 28px; padding-top: 18px; gap: 8px; }
  .newsletter { margin-top: 4px; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer .logo { color: var(--inverse-fg); }
.footer .logo span em { color: #f472b6; }
.footer p { font-size: .93rem; max-width: 340px; color: var(--inverse-muted); }
.footer h4 { color: var(--inverse-fg); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 18px; }
.footer ul { display: grid; gap: 10px; }
.footer ul a { font-size: .93rem; color: var(--inverse-muted); transition: color .25s; }
.footer ul a:hover { color: var(--inverse-fg); }
.footer .social { display: flex; gap: 10px; margin-top: 22px; }
.footer .social a { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--inverse-line); display: grid; place-items: center; color: var(--inverse-fg); transition: background .25s, border-color .25s, transform .25s; }
.footer .social a:hover { background: var(--brand); border-color: var(--brand); transform: translateY(-2px); }
.footer .social svg { width: 18px; height: 18px; }
.newsletter { display: flex; gap: 8px; margin-top: 8px; }
.newsletter input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--inverse-line); background: rgba(255, 255, 255, .06); color: var(--inverse-fg); }
.newsletter input::placeholder { color: rgba(255, 255, 255, .4); }
.newsletter button { padding: 12px 16px; border-radius: 10px; background: #fff; color: #0e1220; font-weight: 600; font-family: var(--font-head); font-size: .85rem; }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--inverse-line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .84rem; position: relative; color: var(--inverse-muted); }
.footer-bottom a { color: var(--inverse-muted); }
.footer-bottom a:hover { color: var(--inverse-fg); }

/* Dark mode: light footer + dark text */
[data-theme="dark"] .footer {
  background: #eef0f6;
  color: #3b4254;
}
[data-theme="dark"] .footer::before {
  background: radial-gradient(circle, rgba(193, 0, 97, .22), transparent 65%);
}
[data-theme="dark"] .footer .logo { color: #0e1220; }
[data-theme="dark"] .footer .logo span em { color: #c10061; }
[data-theme="dark"] .footer p,
[data-theme="dark"] .footer ul a,
[data-theme="dark"] .footer-bottom,
[data-theme="dark"] .footer-bottom a { color: #5d6579; }
[data-theme="dark"] .footer h4 { color: #0e1220; }
[data-theme="dark"] .footer ul a:hover,
[data-theme="dark"] .footer-bottom a:hover { color: #0e1220; }
[data-theme="dark"] .footer .social a {
  color: #0e1220;
  border-color: rgba(14, 18, 32, .14);
}
[data-theme="dark"] .footer .social a:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}
[data-theme="dark"] .newsletter input {
  background: #fff;
  border-color: rgba(14, 18, 32, .14);
  color: #0e1220;
}
[data-theme="dark"] .newsletter input::placeholder { color: #8b93a8; }
[data-theme="dark"] .newsletter button {
  background: #0e1220;
  color: #fff;
}
[data-theme="dark"] .footer-bottom {
  border-top-color: rgba(14, 18, 32, .12);
}
@media (max-width: 900px) {
  [data-theme="dark"] html { background: #eef0f6; }
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #0e1220;
  color: #fff;
  border: 1px solid transparent;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease), background .25s, color .25s, border-color .25s;
  z-index: 999;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-2px); }
.to-top svg { width: 18px; height: 18px; }

/* Dark page → light button so it stays visible */
[data-theme="dark"] .to-top {
  background: #f2f4fa;
  color: #0e1220;
}

/* Over dark footer (light theme) → light button */
.to-top.is-over-footer {
  background: #fff;
  color: #0e1220;
  border-color: rgba(14, 18, 32, .12);
}

/* Over light footer (dark theme) → dark button */
[data-theme="dark"] .to-top.is-over-footer {
  background: #0e1220;
  color: #fff;
  border-color: rgba(255, 255, 255, .14);
}

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .06s; }
.reveal[data-delay="2"] { transition-delay: .12s; }
.reveal[data-delay="3"] { transition-delay: .18s; }
.reveal[data-delay="4"] { transition-delay: .24s; }
.reveal[data-delay="5"] { transition-delay: .3s; }

/* Above-the-fold hero text must paint immediately (LCP) */
.hero .reveal,
.page-hero .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .cascade { opacity: 1 !important; transform: none !important; }
}

/* ---------- Dark mode component tweaks ---------- */
[data-theme="dark"] .btn--ghost:hover { background: var(--surface-2); }
[data-theme="dark"] .btn--white { --btn-bg: #fff; --btn-fg: #0e1220; }
[data-theme="dark"] .card--gradient { background: linear-gradient(145deg, rgba(193, 0, 97, .18) 0%, rgba(225, 29, 122, .14) 100%); }
[data-theme="dark"] .card--feature { background: var(--inverse); border-color: var(--line); }
[data-theme="dark"] .work-card .thumb .tag { background: rgba(19, 23, 34, .92); color: var(--ink); }
[data-theme="dark"] .quote::before { color: rgba(232, 74, 140, .18); }
[data-theme="dark"] .form-msg.success { background: rgba(163, 230, 53, .12); color: #d9f99d; border-color: rgba(163, 230, 53, .28); }
[data-theme="dark"] .form-msg.error { background: rgba(239, 68, 68, .12); color: #fecaca; border-color: rgba(239, 68, 68, .28); }
[data-theme="dark"] .filter-bar button.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
[data-theme="dark"] .faq details[open] summary .plus,
[data-theme="dark"] .step::before { color: #fff; }
[data-theme="dark"] .budget-chips input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
[data-theme="dark"] .hero-visual canvas { opacity: .4; }
[data-theme="dark"] .visual-main { border-color: rgba(255, 255, 255, .12); }
[data-theme="dark"] .float-card {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}
[data-theme="dark"] .cta-band h2 { color: #fff; }

/* ---------- Extra responsive polish ---------- */
@media (max-width: 640px) {
  .display { font-size: clamp(2.1rem, 9vw, 2.8rem); }
  .hero-actions .btn { width: 100%; }
  .hero-pill { font-size: .78rem; max-width: 100%; white-space: normal; text-align: left; }
  .rotator { min-width: 0; max-width: 100%; }
  .rotator > span { white-space: normal; }
  .stats.stats--compact { grid-template-columns: 1fr; }
  .badge-float { max-width: calc(100% - 24px); }
  .split-media .badge-float { left: 12px; right: 12px; bottom: 16px; }
  .service-media .badge-float { right: 12px; bottom: 12px; left: auto; }
  .map-strip .inner p { word-spacing: normal; }
}

@media (max-width: 420px) {
  .float-card .value { font-size: 1.25rem; }
  .chip { font-size: .65rem; }
}

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-lg { margin-top: clamp(40px, 5vw, 64px); }
.text-center { text-align: center; }
.row-center { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); }
.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; }

/* ---------- Status / error / restricted pages ---------- */
.status-page {
  min-height: calc(100vh - var(--header-h, 64px));
  display: grid;
  place-items: center;
  padding: clamp(48px, 8vw, 96px) var(--gutter);
  position: relative;
  overflow: clip;
}
.status-page .orb { opacity: .55; }
.status-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  text-align: center;
  padding: clamp(32px, 5vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.status-code {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(3.5rem, 12vw, 5.5rem);
  line-height: 1;
  letter-spacing: -.04em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 12px;
}
.status-card h1 {
  font-size: clamp(1.45rem, 3.5vw, 1.85rem);
  margin-bottom: 10px;
}
.status-card p {
  color: var(--muted);
  margin: 0 auto 28px;
  max-width: 38ch;
}
.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.status-meta {
  margin-top: 22px;
  font-size: .8rem;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.status-page--solo {
  min-height: 100vh;
  padding-top: clamp(48px, 8vw, 96px);
}
.status-page--solo .status-card {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
}

/* Offline banner */
.mx-net {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(120%);
  z-index: 10000;
  max-width: min(520px, calc(100% - 32px));
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  font-size: .88rem;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.mx-net.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mx-net strong { color: var(--brand); font-weight: 600; }
@media (max-width: 720px) {
  .mx-net { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}

/* In-app status overlay (bad link / slow / error) */
.mx-status {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s var(--ease), visibility .28s;
}
.mx-status.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mx-status__card {
  width: min(440px, 100%);
  text-align: center;
  padding: clamp(28px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}
.mx-status__code {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.8rem, 10vw, 4rem);
  line-height: 1;
  letter-spacing: -.04em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
}
.mx-status__card h2 {
  font-size: 1.35rem;
  margin: 0 0 8px;
}
.mx-status__card p {
  color: var(--muted);
  margin: 0 0 22px;
}
.mx-status__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
