/* ============================================================
   benmadison.dev - Design system
   ============================================================ */

:root {
  color-scheme: light;

  /* Brand */
  --c-primary: #0a6ff0;
  --c-primary-strong: #0a57c2;
  --c-accent: #19c5e6;
  --c-violet: #6a5cff;

  /* Surfaces & text (light) */
  --c-bg: #ffffff;
  --c-bg-tint: #eef4ff;
  --c-surface: #ffffff;
  --c-surface-2: #f5f8fe;
  --c-text: #34425a;
  --c-muted: #5d6b82;
  --c-heading: #0c1830;
  --c-border: #e4ebf5;
  --c-border-strong: #d2ddec;
  --c-ring: rgba(10, 111, 240, 0.28);
  --c-error: #c62828;

  /* Gradients */
  --grad-brand: linear-gradient(120deg, var(--c-primary), var(--c-accent));
  /* Darker gradient for clipped TEXT so it keeps enough contrast on light backgrounds. */
  --grad-brand-text: linear-gradient(120deg, var(--c-primary-strong), var(--c-primary));
  --grad-brand-violet: linear-gradient(120deg, var(--c-violet), var(--c-primary) 55%, var(--c-accent));
  --grad-surface: linear-gradient(180deg, var(--c-bg-tint), var(--c-bg));

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.9);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(16, 35, 70, 0.06);
  --shadow-sm: 0 2px 8px rgba(16, 35, 70, 0.07);
  --shadow-md: 0 10px 30px -12px rgba(16, 35, 70, 0.20);
  --shadow-lg: 0 24px 60px -20px rgba(16, 35, 70, 0.28);
  --shadow-glow: 0 18px 50px -18px rgba(10, 111, 240, 0.55);

  /* Stars */
  --c-star: #f5b400;

  /* Motion */
  --t-fast: 140ms cubic-bezier(0.33, 1, 0.68, 1);
  --t: 240ms cubic-bezier(0.33, 1, 0.68, 1);
  --t-slow: 480ms cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Easing only (no packed duration) for transitions that set their own duration. */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  /* Mild overshoot for modal open/close. */
  --ease-pop: cubic-bezier(0.34, 1.45, 0.5, 1);

  /* Layout */
  --nav-h: 72px;
  --container: 1140px;
  --pad-section: clamp(2.75rem, 5vw, 4.25rem);

  /* Radius */
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;
}

[data-theme="dark"] {
  color-scheme: dark;

  --c-primary: #4ca0ff;
  --c-primary-strong: #2b86f0;
  --c-accent: #34d6f0;
  --c-violet: #8a7dff;

  --c-bg: #070d1a;
  --c-bg-tint: #0c1426;
  --c-surface: #0f1a30;
  --c-surface-2: #13203a;
  --c-text: #d6e1f2;
  --c-muted: #93a4c0;
  --c-heading: #f2f7ff;
  --c-border: rgba(255, 255, 255, 0.09);
  --c-border-strong: rgba(255, 255, 255, 0.16);
  --c-ring: rgba(76, 160, 255, 0.4);
  --c-error: #ff8a8a;

  --grad-surface: linear-gradient(180deg, #0c1426, #070d1a);

  --glass-bg: rgba(12, 20, 38, 0.66);
  --glass-strong: rgba(12, 20, 38, 0.9);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 14px 36px -14px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 28px 70px -22px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 18px 55px -16px rgba(76, 160, 255, 0.5);
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--t), color var(--t);
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: 'Sora', 'Inter', sans-serif;
  color: var(--c-heading);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
}

a { color: var(--c-primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-primary-strong); }

img { max-width: 100%; height: auto; display: block; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

ul { list-style: none; }

::selection { background: rgba(10, 111, 240, 0.18); color: var(--c-heading); }

/* ============================================================
   Layout primitives
   ============================================================ */
.container {
  width: min(92%, var(--container));
  margin-inline: auto;
}

.section { padding: var(--pad-section) 0; position: relative; }

.section-tint { background: var(--c-surface-2); }

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(1.75rem, 3vw, 2.5rem);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Sora', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-primary);
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  background: var(--c-surface);
  box-shadow: var(--shadow-xs);
  margin-bottom: 0.9rem;
}

/* Small gradient kicker bar before the eyebrow text. */
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-brand);
}

.section-title {
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  margin-bottom: 1rem;
  text-wrap: balance;
}

.section-text {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--c-muted);
  max-width: 620px;
  margin-inline: auto;
}

.text-gradient {
  background: var(--grad-brand-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================================================
   Scroll reveal (only hides when JS is active)
   ============================================================ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--t-slow), transform 0.55s var(--t-slow);
  transition-delay: var(--reveal-delay, 0ms);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.js .card[data-reveal],
.js .price-card[data-reveal],
.js .work-card[data-reveal] {
  transform: translateY(20px) scale(0.965);
}
.js .about-text[data-reveal] { transform: translateX(-22px); }
.js .about-card[data-reveal] { transform: translateX(22px); }
@media (max-width: 879px) {
  .js .about-text[data-reveal],
  .js .about-card[data-reveal] { transform: translateY(16px); }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.6rem;
  font-family: 'Sora', sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  overflow: hidden;
  transition: transform var(--t-fast), box-shadow var(--t), background var(--t), color var(--t), border-color var(--t);
  isolation: isolate;
}

.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  color: #fff;
  background: var(--grad-brand);
  background-size: 160% 160%;
  background-position: 0% 50%;
  box-shadow: var(--shadow-glow);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.38) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  background-position: 100% 50%;
  box-shadow: 0 22px 55px -16px rgba(10, 111, 240, 0.7);
}

.btn-primary:hover::after { transform: translateX(120%); }

.btn-secondary {
  color: var(--c-heading);
  background: var(--c-surface);
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  color: var(--c-primary);
  transform: translateY(-2px);
  border-color: var(--c-primary);
  box-shadow: var(--shadow-sm);
}

.btn-full { width: 100%; }

.btn-lg { padding: 1.05rem 1.9rem; font-size: 1.05rem; }

.btn-arrow { transition: transform var(--t); }
.btn:hover .btn-arrow { transform: translateX(5px); }

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: height var(--t), background var(--t), box-shadow var(--t), border-color var(--t);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled:not(.menu-open) {
  height: 62px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom-color: var(--c-border);
  box-shadow: var(--shadow-sm);
}
.navbar.scrolled { height: 62px; }

.nav-container {
  width: min(92%, var(--container));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-heading);
  letter-spacing: -0.02em;
}

.logo-link:hover { color: var(--c-heading); }

.logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.site-title { display: none; }
@media (min-width: 480px) { .site-title { display: inline; } }

.nav-menu { display: none; }

.nav-links { display: flex; }

.nav-links a {
  position: relative;
  display: block;
  padding: 0.5rem 0.95rem;
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--c-text);
  border-radius: var(--r-full);
  transition: color var(--t-fast), background var(--t-fast);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-brand);
  transform: translateX(-50%);
  transition: width var(--t);
}

.nav-links a:hover { color: var(--c-primary); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 18px; }
.nav-links a.active { color: var(--c-primary); }

/* Hamburger */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  transition: background var(--t-fast);
}
.nav-toggle:hover { background: var(--c-surface-2); }

.hamburger, .hamburger::before, .hamburger::after {
  width: 22px; height: 2px;
  background: var(--c-heading);
  border-radius: 2px;
  transition: transform var(--t), background var(--t-fast), opacity var(--t-fast);
}
.hamburger { position: relative; display: block; }
.hamburger::before, .hamburger::after { content: ""; position: absolute; left: 0; }
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.nav-toggle[aria-expanded="true"] .hamburger::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .hamburger::after { transform: translateY(-7px) rotate(-45deg); }

.nav-menu.active {
  display: block;
  position: absolute;
  top: calc(100% + 8px);
  left: 4%;
  right: 4%;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 0.6rem;
  box-shadow: var(--shadow-lg);
  animation: dropIn 0.28s var(--ease-spring) both;
}

.nav-menu.active .nav-links { flex-direction: column; gap: 2px; }
.nav-menu.active .nav-links a { padding: 0.8rem 1rem; border-radius: var(--r-md); }
.nav-menu.active .nav-links a:hover { background: var(--c-surface-2); }
.nav-menu.active .nav-links a::after { display: none; }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .nav-menu { display: block; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 2rem) 0 2rem;
  overflow-x: clip;
  background: var(--grad-surface);
}

.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.42;
  will-change: transform;
}
.hero-blob-1 {
  width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  top: -12%; left: -8%;
  background: radial-gradient(circle at 30% 30%, var(--c-primary), transparent 70%);
  animation: drift1 18s ease-in-out infinite alternate;
}
.hero-blob-2 {
  width: 42vw; height: 42vw; max-width: 560px; max-height: 560px;
  top: 8%; right: -10%;
  background: radial-gradient(circle at 60% 40%, var(--c-accent), transparent 70%);
  animation: drift2 22s ease-in-out infinite alternate;
}
.hero-blob-3 {
  width: 40vw; height: 40vw; max-width: 520px; max-height: 520px;
  bottom: -18%; left: 30%;
  background: radial-gradient(circle at 50% 50%, var(--c-violet), transparent 70%);
  opacity: 0.4;
  animation: drift3 26s ease-in-out infinite alternate;
}
[data-theme="dark"] .hero-blob { opacity: 0.4; }
[data-theme="dark"] .hero-blob-3 { opacity: 0.3; }

/* Paused by HeroMotion when the hero scrolls out of view. */
.hero.motion-paused .hero-blob { animation-play-state: paused; }

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--c-border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--c-border) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
  opacity: 0.5;
}

@keyframes drift1 { to { transform: translate(60px, 40px) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-50px, 50px) scale(1.08); } }
@keyframes drift3 { to { transform: translate(40px, -40px) scale(1.12); } }

.hero-content {
  position: relative;
  z-index: 1;
  width: min(92%, var(--container));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: center;
}

@media (min-width: 940px) {
  .hero-content { grid-template-columns: 1.15fr 0.85fr; }
}

.hero-text { text-align: center; }
@media (min-width: 940px) { .hero-text { text-align: left; } }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-heading);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  padding: 0.45rem 0.95rem;
  box-shadow: var(--shadow-xs);
  margin-bottom: 1.1rem;
}

.hero-badge .dot {
  position: relative;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #16c784;
}
.hero-badge .dot::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: #16c784;
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(2.6); opacity: 0; } }

.hero h1 {
  font-size: clamp(2.6rem, 6.8vw, 4.6rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.hero-tagline {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--c-muted);
  max-width: 540px;
  margin: 0 auto 1.5rem;
}
@media (min-width: 940px) { .hero-tagline { margin-inline: 0; } }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
}
@media (min-width: 940px) { .hero-cta { justify-content: flex-start; } }

.hero-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--c-border);
  font-size: 0.9rem;
  color: var(--c-muted);
}
@media (min-width: 940px) { .hero-trust { justify-content: space-between; } }
.hero-trust li { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero-trust svg { color: var(--c-primary); flex-shrink: 0; }

/* Hero portrait */
.hero-figure {
  position: relative;
  width: min(360px, 80vw);
  margin-inline: auto;
}

.hero-figure::before {
  content: "";
  position: absolute;
  inset: -14%;
  background: var(--grad-brand-violet);
  filter: blur(36px);
  opacity: 0.35;
  border-radius: 50%;
  z-index: 0;
}

.hero-image-wrapper {
  position: relative;
  z-index: 1;
  aspect-ratio: 400 / 507;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  box-shadow: var(--shadow-lg);
}

/* Two stacked theme images crossfade on theme change (no reload flash) */
.hero-image { position: absolute; inset: 0; display: block; transition: opacity 0.45s var(--ease-out); }
.hero-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
[data-theme="light"] .hero-image-dark { opacity: 0; }
[data-theme="dark"] .hero-image-light { opacity: 0; }

.hero-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-heading);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  padding: 0.5rem 0.9rem;
  box-shadow: var(--shadow-md);
}
.hero-chip svg { color: var(--c-primary); }
.hero-chip-1 { bottom: 12%; left: -8%; }
.hero-chip-2 { top: 12%; right: -6%; }

@media (max-width: 939px) {
  .hero-chip-1 { left: -2%; }
  .hero-chip-2 { right: -2%; }
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.hero-scroll .mouse {
  width: 22px; height: 36px;
  border: 2px solid var(--c-border-strong);
  border-radius: var(--r-full);
  position: relative;
}
.hero-scroll .mouse::after {
  content: "";
  position: absolute;
  left: 50%; top: 7px;
  width: 4px; height: 7px;
  border-radius: 2px;
  background: var(--c-primary);
  transform: translateX(-50%);
  animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translate(-50%, -4px); } 40% { opacity: 1; } 80%, 100% { opacity: 0; transform: translate(-50%, 10px); } }
@media (max-width: 939px) { .hero-scroll { display: none; } }

/* Hero entrance (CSS only, safe without JS) */
[data-hero] { animation: heroIn 0.6s var(--ease-out) both; }
[data-hero="1"] { animation-delay: 0.05s; }
[data-hero="2"] { animation-delay: 0.15s; }
[data-hero="3"] { animation-delay: 0.25s; }
[data-hero="4"] { animation-delay: 0.35s; }
[data-hero="5"] { animation-delay: 0.2s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ============================================================
   Stats strip
   ============================================================ */
.stats { padding: clamp(1.75rem, 3vw, 2.25rem) 0 0; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 760px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat {
  background: var(--c-surface);
  padding: 1.3rem 1rem;
  text-align: center;
}

.stat-num {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.55rem, 3.2vw, 2.1rem);
  font-weight: 700;
  line-height: 1;
  background: var(--grad-brand-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.stat-label { margin-top: 0.4rem; font-size: 0.85rem; color: var(--c-muted); }

/* ============================================================
   About
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
@media (min-width: 880px) { .about-grid { grid-template-columns: 1fr 1fr; } }

.about-text p { font-size: 1.08rem; color: var(--c-muted); margin-bottom: 1.1rem; }
.about-text p strong { color: var(--c-heading); font-weight: 600; }

.about-list { display: grid; gap: 0.8rem; margin-top: 1.35rem; }
.about-list li { display: flex; align-items: flex-start; gap: 0.75rem; color: var(--c-text); }
.about-check {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.about-check svg { width: 14px; height: 14px; }

.about-card {
  position: relative;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  border-radius: var(--r-xl);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.about-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--grad-brand);
}
.about-card h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.about-card .about-quote { font-size: 1.1rem; color: var(--c-text); line-height: 1.7; }
.about-card .about-sign { margin-top: 1.25rem; font-weight: 600; color: var(--c-heading); }
.about-card .about-role { font-size: 0.9rem; color: var(--c-muted); font-weight: 400; }

/* ============================================================
   Card grids (services / features)
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 1.1rem;
}

.card {
  position: relative;
  padding: 1.5rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--t);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.card:hover::before { opacity: 1; }

.card-icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  margin-bottom: 1.1rem;
  color: var(--c-primary);
  background: linear-gradient(135deg, rgba(10, 111, 240, 0.14), rgba(25, 197, 230, 0.14));
  transition: transform var(--t);
}
.card:hover .card-icon { transform: scale(1.06); }
.card-icon svg { width: 26px; height: 26px; }

.card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.card p { color: var(--c-muted); font-size: 0.98rem; }

/* ============================================================
   Process / how it works
   ============================================================ */
.process {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  counter-reset: step;
}
@media (min-width: 680px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .process { grid-template-columns: repeat(4, 1fr); } }

.step {
  position: relative;
  padding: 1.6rem 1.5rem;
  text-align: center;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t), box-shadow var(--t);
}
.step:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.step-num {
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 14px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  background: var(--grad-brand);
  box-shadow: var(--shadow-glow);
  margin-bottom: 1.1rem;
}
.step h3 { font-size: 1.15rem; margin-bottom: 0.45rem; }
.step p { color: var(--c-muted); font-size: 0.96rem; }

/* Continuous connector line threading the four step numbers on desktop */
@media (min-width: 1000px) {
  .process[data-process] { position: relative; }
  .process[data-process]::before {
    content: "";
    position: absolute;
    top: calc(1.6rem + 23px);
    left: 12%;
    right: 12%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--c-border-strong) 0 8px, transparent 8px 16px);
    z-index: 0;
  }
  .step { z-index: 1; }
}

/* ============================================================
   Demos (collapsible)
   ============================================================ */
.demos { margin-top: clamp(2.5rem, 4vw, 3.5rem); text-align: center; }
.demos-header h3 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: 0.6rem; }
.demos-note { max-width: 600px; margin: 0 auto 1.5rem; color: var(--c-muted); font-size: 0.98rem; }

.demos-toggle { margin: 0 auto; }
.demos-toggle .chev { transition: transform var(--t); }
.demos-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* Soft double-flash to draw the eye, then ~4s of calm (theme-aware via --c-ring).
   The 0-spread --c-ring layers in the rest frames keep the ring's hue constant as it fades. */
@keyframes demoNudge {
  0%, 8%, 17%, 100% {
    box-shadow: var(--shadow-xs), 0 0 0 0 var(--c-ring), 0 0 0 0 var(--c-ring);
  }
  4%, 13% {
    border-color: var(--c-primary);
    box-shadow: var(--shadow-xs), 0 0 0 3px var(--c-ring), 0 0 22px 4px var(--c-ring);
  }
}
.demos-toggle { animation: demoNudge 5s ease-in-out infinite; }
/* Stop nudging on hover/focus, or once the demos are open. */
.demos-toggle:hover,
.demos-toggle:focus-visible,
.demos-toggle[aria-expanded="true"] { animation: none; }

.demos-wrapper {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.55s var(--ease-out), opacity 0.4s ease, margin 0.4s ease;
}
.demos-wrapper.active { max-height: 2600px; opacity: 1; margin-top: 1.75rem; }

.feature-tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 600px) { .feature-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .feature-tiles { grid-template-columns: repeat(3, 1fr); } }

.feature-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.6rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.feature-tile:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--c-primary); }

.feature-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  color: var(--c-primary);
  background: linear-gradient(135deg, rgba(10, 111, 240, 0.12), rgba(106, 92, 255, 0.12));
  margin-bottom: 0.6rem;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-tile h4 { font-family: 'Sora', sans-serif; font-size: 1.12rem; font-weight: 600; color: var(--c-heading); }
.feature-tile p { color: var(--c-muted); font-size: 0.92rem; }
.feature-tile .feature-go {
  margin-top: auto;
  padding-top: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap var(--t);
}
.feature-tile:hover .feature-go { gap: 0.6rem; }

/* ============================================================
   Pricing
   ============================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  align-items: center;
  max-width: 380px;
  margin-inline: auto;
}
@media (min-width: 620px) {
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 680px; }
}
@media (min-width: 1200px) {
  .pricing-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; }
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.7rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t), box-shadow var(--t);
}
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.price-card.featured {
  border-color: transparent;
  background:
    linear-gradient(var(--c-surface), var(--c-surface)) padding-box,
    var(--grad-brand) border-box;
  border: 2px solid transparent;
  box-shadow: var(--shadow-lg);
}

.price-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-primary);
  background: rgba(10, 111, 240, 0.1);
  border-radius: var(--r-full);
  padding: 0.3rem 0.8rem;
  margin-bottom: 1.1rem;
}
.price-card.featured .price-tag { color: #fff; background: var(--grad-brand); }

.price-card h3 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.price-amount { font-family: 'Sora', sans-serif; font-size: 2.3rem; font-weight: 700; color: var(--c-heading); line-height: 1; margin-bottom: 0.9rem; white-space: nowrap; }
.price-amount .per { font-size: 1rem; font-weight: 500; color: var(--c-muted); }
/* Reserve two lines so the service cards stay the same height when one detail
   is shorter (e.g. "Priced to the project."). */
.price-detail { color: var(--c-muted); font-size: 0.94rem; min-height: 3.1rem; }
.price-includes {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  width: fit-content;
  margin: 1rem auto 0;
  text-align: left;
}
.price-includes li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--c-text);
  font-size: 0.93rem;
}
.price-includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--c-primary);
  border-bottom: 2px solid var(--c-primary);
  transform: rotate(-45deg);
}
.pricing-foot { text-align: center; margin-top: 1.75rem; max-width: 640px; margin-inline: auto; color: var(--c-muted); }
/* Darker link in light theme for AA contrast on the tinted section; keep the
   lighter primary in dark theme where it already clears 4.5:1. */
.pricing-foot a { font-weight: 600; color: var(--c-primary-strong); }
[data-theme="dark"] .pricing-foot a { color: var(--c-primary); }

/* ============================================================
   Portfolio
   ============================================================ */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
}

.work-card {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  color: var(--c-text);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.work-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--c-primary); color: var(--c-text); }

.work-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--c-surface-2), var(--c-bg-tint));
  border-bottom: 1px solid var(--c-border);
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.work-logo {
  width: min(60%, 190px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s var(--ease-out);
}
.work-card:hover .work-logo { transform: scale(1.04); }
.work-logo picture { display: contents; }
.work-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Hover caption over a brand-tinted scrim */
.work-view {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 0.96rem;
  color: #fff;
  background: linear-gradient(0deg, rgba(10, 111, 240, 0.85), rgba(10, 111, 240, 0.6));
  opacity: 0;
  transition: opacity var(--t);
}
.work-card:hover .work-view { opacity: 1; }
.work-view-arrow { transition: transform var(--t); }
.work-card:hover .work-view-arrow { transform: translateX(4px); }

.work-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  background: var(--grad-brand-violet);
}

.work-tag {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--c-heading);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  padding: 0.3rem 0.75rem;
}

.work-body { padding: 1.25rem 1.4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.work-body h3 { font-size: 1.12rem; margin-bottom: 0.1rem; }
.work-domain { font-size: 0.82rem; color: var(--c-muted); }
.work-link { font-size: 0.92rem; font-weight: 600; color: var(--c-primary); display: inline-flex; align-items: center; gap: 0.35rem; transition: gap var(--t); }
.work-card:hover .work-link { gap: 0.6rem; }

/* ============================================================
   Contact
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}
@media (min-width: 880px) { .contact-grid { grid-template-columns: 0.85fr 1.15fr; } }

.contact-aside h3 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: 0.9rem; }
.contact-aside p { color: var(--c-muted); margin-bottom: 1.5rem; }

.contact-methods { display: grid; gap: 0.9rem; }
.contact-method {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-fast), border-color var(--t), box-shadow var(--t);
  color: var(--c-text);
}
.contact-method:hover { transform: translateX(3px); border-color: var(--c-primary); box-shadow: var(--shadow-sm); color: var(--c-text); }
.contact-method .cm-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  color: var(--c-primary);
  background: linear-gradient(135deg, rgba(10, 111, 240, 0.14), rgba(25, 197, 230, 0.14));
}
.contact-method .cm-label { font-size: 0.8rem; color: var(--c-muted); }
.contact-method .cm-value { font-weight: 600; color: var(--c-heading); word-break: break-word; }

.contact-panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-md);
  max-width: 560px;
  width: 100%;
}
@media (min-width: 880px) { .contact-panel { justify-self: end; } }

.contact-form-wrapper { overflow: hidden; }

.form-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } }

.form-group { margin-bottom: 1.15rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--c-heading); margin-bottom: 0.45rem; }

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--c-text);
  background: var(--c-bg);
  border: 1.5px solid var(--c-border-strong);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--c-muted); opacity: 0.8; }
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px var(--c-ring);
}
.form-group textarea { resize: vertical; min-height: 130px; }

.field-error-message { display: block; color: var(--c-error); font-size: 0.85rem; margin-top: 0.35rem; font-weight: 500; }
.form-group input[aria-invalid="true"], .form-group textarea[aria-invalid="true"] { border-color: var(--c-error); }
.form-group input[aria-invalid="true"]:focus, .form-group textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.18); }

.form-error { color: var(--c-error); font-size: 0.92rem; font-weight: 500; margin-bottom: 0.85rem; }

.btn-submit { width: 100%; margin-top: 0.4rem; }

/* Turnstile host (both contact forms); min-height reserves the widget height to avoid layout shift. */
.cf-turnstile-host { margin: 0.1rem 0 1.15rem; min-height: 65px; display: flex; justify-content: center; }
.demo-contact-form .cf-turnstile-host { margin-bottom: 1rem; }
/* Fixed 300px iframe; scale down on narrow phones so it doesn't overflow. */
@media (max-width: 389px) {
  .cf-turnstile-host { transform: scale(0.8); transform-origin: center top; min-height: 52px; }
}

.form-success { display: none; text-align: center; padding: 2.5rem 1.5rem; }
.form-success.active { display: block; animation: popIn 0.4s var(--ease-spring) both; }
@keyframes popIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }

.success-icon {
  display: grid; place-items: center;
  width: 64px; height: 64px;
  margin: 0 auto 1rem;
  font-size: 1.7rem;
  color: #fff;
  background: linear-gradient(135deg, #16c784, #0a9d68);
  border-radius: 50%;
  box-shadow: 0 16px 40px -14px rgba(22, 199, 132, 0.7);
}
.form-success h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.form-success p { color: var(--c-muted); margin-bottom: 1.5rem; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--c-surface-2);
  border-top: 1px solid var(--c-border);
  padding: clamp(2.5rem, 4vw, 3.5rem) 0 2rem;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}
.footer-brand { max-width: 320px; }
.footer-brand .logo-link { margin-bottom: 0.9rem; }
.footer-brand p { color: var(--c-muted); font-size: 0.96rem; }
.footer-location {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.7rem;
  font-size: 0.88rem;
  color: var(--c-muted);
}
.footer-location svg { color: var(--c-primary); flex-shrink: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 2.5rem; }
.footer-col h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--c-muted); margin-bottom: 0.9rem; font-weight: 600; }
.footer-col a { display: block; color: var(--c-text); font-size: 0.95rem; padding: 0.25rem 0; transition: color var(--t-fast); }
.footer-col a:hover { color: var(--c-primary); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.75rem;
  border-top: 1px solid var(--c-border);
  color: var(--c-muted);
  font-size: 0.9rem;
}
.back-to-top { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; color: var(--c-primary-strong); }
[data-theme="dark"] .back-to-top { color: var(--c-primary); }
.back-to-top:hover { gap: 0.7rem; }

/* ============================================================
   Theme toggle (floating)
   ============================================================ */
.theme-toggle {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--c-border);
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  z-index: 900;
  transition: transform var(--t), box-shadow var(--t);
}
.theme-toggle:hover { transform: scale(1.08); box-shadow: var(--shadow-glow); }
.theme-toggle:active { transform: scale(0.96); }

/* Theme icon set (sun/moon) shared by the floating, nav, and demo toggles.
   Show the icon for the theme you would switch TO. */
.theme-icons { display: inline-flex; }
.theme-icons svg { width: 22px; height: 22px; display: block; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
.theme-toggle .theme-icons svg { width: 22px; height: 22px; }
@media (max-width: 859px) { .theme-toggle { display: none; } }

/* ============================================================
   Modals
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(7, 13, 26, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  z-index: 1500;
  /* visibility delayed on close so fade-out completes; snaps on open for focus. */
  transition: opacity var(--t), visibility 0s linear var(--t);
}
.modal-overlay.active { opacity: 1; visibility: visible; transition: opacity var(--t), visibility 0s linear 0s; }

.modal {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  z-index: 1600;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--t), visibility 0s linear var(--t);
}
.modal.active { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity var(--t), visibility 0s linear 0s; }

.modal-content {
  position: relative;
  width: 100%; max-width: 520px;
  max-height: 90svh; overflow-y: auto;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.34s var(--ease-pop), opacity 0.22s ease;
}
.modal.active .modal-content { transform: scale(1); opacity: 1; }

.modal-close {
  position: absolute; top: 0.85rem; right: 0.85rem;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 0;
  color: var(--c-muted);
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: 50%;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.modal-close svg { width: 16px; height: 16px; display: block; }
.modal-close:hover { background: var(--c-surface-2); color: var(--c-heading); border-color: var(--c-border-strong); }

.modal-header { text-align: center; margin-bottom: 1.5rem; }
.modal-icon { font-size: 2.6rem; display: block; margin-bottom: 0.6rem; }
.modal-title { font-size: 1.5rem; margin-bottom: 0.4rem; }
.modal-subtitle { color: var(--c-muted); font-size: 0.95rem; }
.modal-text { color: var(--c-text); margin-bottom: 1rem; line-height: 1.7; }
.modal-note { font-size: 0.85rem; color: var(--c-muted); text-align: center; margin-top: 1rem; }

.modal-demo-note {
  display: flex; align-items: center; gap: 0.5rem; justify-content: center;
  text-align: center; font-size: 0.85rem; color: var(--c-muted);
  background: var(--c-surface-2);
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--r-md);
  padding: 0.6rem 0.85rem;
  margin-bottom: 1.25rem;
}

/* Carousel */
.carousel { position: relative; padding: 0.5rem 0; }
.carousel-track { position: relative; min-height: 250px; overflow: hidden; }
#carousel-modal:not(.active) .carousel-track { pointer-events: none; }

.review-slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 1rem;
  opacity: 0; visibility: hidden;
  transform: translateX(40px);
  transition: transform 0.5s var(--ease-out), opacity 0.4s var(--ease-out), visibility 0s linear 0.5s;
  pointer-events: none;
}
.review-slide.active,
.review-slide.enter-right,
.review-slide.enter-left,
.review-slide.exit-left,
.review-slide.exit-right {
  visibility: visible;
  transition: transform 0.5s var(--ease-out), opacity 0.4s var(--ease-out), visibility 0s;
}
.review-slide.active { opacity: 1; transform: translateX(0); }
.review-slide.enter-right { opacity: 0; transform: translateX(60%); }
.review-slide.enter-left  { opacity: 0; transform: translateX(-60%); }
.review-slide.exit-left   { opacity: 0; transform: translateX(-60%); }
.review-slide.exit-right  { opacity: 0; transform: translateX(60%); }
.review-slide.no-anim     { transition: none !important; }

.review-stars { display: flex; gap: 4px; margin-bottom: 1rem; }
.star { width: 26px; height: 26px; }
.star svg { width: 100%; height: 100%; }
.star-filled { fill: var(--c-star); }
.star-empty { fill: none; stroke: var(--c-star); stroke-width: 1.5; }

.review-text { font-size: 1.05rem; line-height: 1.7; color: var(--c-text); margin-bottom: 1rem; font-style: italic; }
.review-author { font-size: 0.92rem; font-weight: 600; color: var(--c-muted); }

.carousel-nav { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1rem; }
.carousel-btn {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  font-size: 1.2rem; color: var(--c-heading);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: 50%;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.carousel-btn:hover { background: var(--c-primary); color: #fff; transform: scale(1.1); border-color: transparent; }
.carousel-dots { display: flex; gap: 8px; align-items: center; }
.carousel-dot {
  width: 9px; height: 9px;
  background: transparent;
  border: 2px solid var(--c-border-strong);
  border-radius: var(--r-full);
  position: relative;
  overflow: hidden;
  transition: width 0.45s var(--ease-spring), border-color var(--t-fast);
}
.carousel-dot:hover { border-color: var(--c-muted); }
.carousel-dot.active {
  width: 28px;
  border-color: var(--c-primary);
}
/* Fill sweeps left-to-right inside the outline over the autoplay duration */
.carousel-dot.active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-primary);
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left;
  animation: dotFill var(--dot-fill-duration, 4000ms) linear forwards;
}
@keyframes dotFill { to { transform: scaleX(1); } }

/* Departure: fill frozen at departure progress, fades as the dot spring-collapses */
.carousel-dot.dot-leaving::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-primary);
  border-radius: inherit;
  transform: scaleX(var(--fill-progress, 1));
  transform-origin: left;
  animation: dotLeaveFade 0.45s ease-in forwards;
}
@keyframes dotLeaveFade { 70% { opacity: 1; } to { opacity: 0; } }

/* Demo contact form */
.demo-contact-form .form-group { margin-bottom: 1rem; }
.demo-success { display: none; text-align: center; padding: 2rem; }
.demo-success.active { display: block; animation: popIn 0.4s var(--ease-spring) both; }
.demo-success p { margin-bottom: 1.5rem; color: var(--c-muted); }

/* Theme demo */
.theme-status {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 1rem; background: var(--c-surface-2); border-radius: var(--r-md); margin-bottom: 1.5rem;
}
.theme-status-label { color: var(--c-muted); }
.theme-status-value { font-weight: 600; color: var(--c-heading); }
.theme-demo-toggle {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  width: 100%; padding: 1rem 1.5rem;
  background: var(--grad-brand); color: #fff;
  border-radius: var(--r-full); font-family: 'Sora', sans-serif; font-size: 1rem; font-weight: 600;
  box-shadow: var(--shadow-glow);
  transition: transform var(--t-fast), box-shadow var(--t);
}
.theme-demo-toggle:hover { transform: translateY(-2px); }
.theme-demo-toggle .theme-icons svg { width: 20px; height: 20px; }

/* Before / after */
.ba-stage {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--c-border); user-select: none;
  --ba-pos: 50%;
}
.ba-panel { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 0.75rem; color: #fff; font-family: 'Sora', sans-serif; font-weight: 600; overflow: hidden; }
.ba-panel span { white-space: nowrap; }
.ba-after { background: var(--grad-brand); justify-content: flex-end; }
/* Reveal and divider travel the full 0-100% so each side can be hidden entirely. */
.ba-before { background: linear-gradient(135deg, #475569, #94a3b8); width: 100%; clip-path: inset(0 calc(100% - var(--ba-pos)) 0 0); }
.ba-divider { position: absolute; top: 0; bottom: 0; left: var(--ba-pos); width: 2px; background: #fff; transform: translateX(-1px); pointer-events: none; }
/* Handle clamped so it stays fully visible at 0% and 100%. */
.ba-stage::after {
  content: "\21C6";
  position: absolute; top: 50%;
  left: clamp(17px, var(--ba-pos), calc(100% - 17px));
  transform: translate(-50%, -50%);
  width: 34px; height: 34px; display: grid; place-items: center;
  background: #fff; color: var(--c-primary); border-radius: 50%; box-shadow: var(--shadow-md);
  pointer-events: none; z-index: 2;
}
.ba-control-label { display: block; margin: 1rem 0 0.25rem; font-size: 0.8rem; color: var(--c-muted); }
.ba-range { width: 100%; accent-color: var(--c-primary); }

/* FAQ */
.faq-item { border: 1px solid var(--c-border); border-radius: var(--r-md); margin-bottom: 0.75rem; overflow: hidden; transition: border-color var(--t); }
.faq-item:has(.faq-trigger[aria-expanded="true"]) { border-color: var(--c-primary); }
.faq-q { margin: 0; font-size: 1rem; }
.faq-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem; text-align: left; font-family: 'Sora', sans-serif; font-size: 1rem; font-weight: 600;
  color: var(--c-heading); background: var(--c-surface); transition: background var(--t-fast);
}
.faq-trigger:hover { background: var(--c-surface-2); }
.faq-chevron { display: inline-flex; transition: transform var(--t); color: var(--c-primary); }
.faq-chevron svg { width: 18px; height: 18px; display: block; }
.faq-trigger[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); }
/* Smooth height open/close via animatable grid rows (0fr -> 1fr) */
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.32s var(--ease-out); }
.faq-a-inner { overflow: hidden; }
.faq-a.open { grid-template-rows: 1fr; }
.faq-a-inner p { padding: 0 1rem 1rem; margin: 0; color: var(--c-muted); }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.gallery-thumb {
  aspect-ratio: 1 / 1; border-radius: var(--r-md); color: #fff;
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.2rem;
  display: grid; place-items: center; transition: transform var(--t-fast), box-shadow var(--t);
}
.gallery-thumb:hover { transform: scale(1.05); box-shadow: var(--shadow-md); }
.gallery-c1 { background: linear-gradient(135deg, #0a6ff0, #19c5e6); }
.gallery-c2 { background: linear-gradient(135deg, #6a5cff, #b78cff); }
.gallery-c3 { background: linear-gradient(135deg, #0a9d68, #34d399); }
.gallery-c4 { background: linear-gradient(135deg, #ea580c, #fbbf24); }
.gallery-c5 { background: linear-gradient(135deg, #db2777, #fb7185); }
.gallery-c6 { background: linear-gradient(135deg, #0891b2, #67e8f9); }
.gallery-viewer { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.gallery-stage {
  flex: 1; aspect-ratio: 16 / 10; border-radius: var(--r-md);
  color: #fff; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 2rem;
  display: grid; place-items: center; overflow: hidden;
}
.gallery-stage.slide-next { animation: gallerySlideNext 0.42s var(--ease-out); }
.gallery-stage.slide-prev { animation: gallerySlidePrev 0.42s var(--ease-out); }
@keyframes gallerySlideNext { from { opacity: 0; transform: translateX(45px); } to { opacity: 1; transform: none; } }
@keyframes gallerySlidePrev { from { opacity: 0; transform: translateX(-45px); } to { opacity: 1; transform: none; } }
.gallery-thumb.active { outline: 3px solid var(--c-primary); outline-offset: 2px; }
.gallery-nav {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%;
  background: var(--c-surface-2); border: 1px solid var(--c-border); color: var(--c-heading); font-size: 1.2rem;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.gallery-nav:hover { background: var(--c-primary); color: #fff; transform: scale(1.08); border-color: transparent; }

/* ============================================================
   Accessibility helpers
   ============================================================ */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--c-primary); color: #fff; padding: 0.75rem 1rem;
  border-radius: var(--r-md); font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }
main:focus { outline: none; }

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

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero-blob, .hero-badge .dot::after, .hero-scroll .mouse::after { animation: none !important; }
}

/* ============================================================
   Responsive tweaks
   ============================================================ */
@media (max-width: 540px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .modal-content { padding: 1.5rem; }
  .footer-top { flex-direction: column; }
}

.modal-icon svg { width: 44px; height: 44px; color: var(--c-primary); }
.success-icon svg { width: 30px; height: 30px; }

/* Tiles stagger-drop in as the shelf opens; backwards fill keeps each one
   hidden until its turn without locking the hover transform. */
.demos-wrapper.active .feature-tile { animation: tileDrop 0.5s var(--ease-out) backwards; }
.demos-wrapper.active .feature-tile:nth-child(1) { animation-delay: 0.06s; }
.demos-wrapper.active .feature-tile:nth-child(2) { animation-delay: 0.13s; }
.demos-wrapper.active .feature-tile:nth-child(3) { animation-delay: 0.20s; }
.demos-wrapper.active .feature-tile:nth-child(4) { animation-delay: 0.27s; }
.demos-wrapper.active .feature-tile:nth-child(5) { animation-delay: 0.34s; }
.demos-wrapper.active .feature-tile:nth-child(6) { animation-delay: 0.41s; }
@keyframes tileDrop { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* Once open, let a tile's hover-lift overflow the wrapper instead of clipping. */
.demos-wrapper.is-open { overflow: visible; }

/* Theme toggle inside the mobile hamburger menu */
.nav-theme-toggle { display: none; }
@media (max-width: 859px) {
  .nav-menu.active .nav-theme-toggle {
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    width: 100%; margin-top: 0.4rem; padding: 0.85rem 1rem;
    font-family: 'Sora', sans-serif; font-weight: 600; font-size: 0.96rem;
    color: #fff; background: var(--grad-brand); border: none; border-radius: var(--r-md);
    box-shadow: var(--shadow-glow);
  }
}
.nav-theme-toggle .theme-icons svg { width: 18px; height: 18px; }

/* Drop the navbar's own backdrop blur while the menu is open so the menu panel
   blurs the page behind it (not the navbar) at any scroll position. */
.nav-menu.active { background: var(--glass-strong); }
.navbar.menu-open {
  background: var(--c-bg);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  border-bottom-color: var(--c-border);
}

@media (max-width: 879px) {
  .about-text { text-align: center; }
  .about-list { width: fit-content; margin-inline: auto; text-align: left; }
  .contact-aside { text-align: center; }
  .contact-aside .eyebrow { align-self: center; }
  .contact-methods { text-align: left; }
}

/* Footer: centered on small screens */
@media (max-width: 600px) {
  .footer-top { flex-direction: column; align-items: center; text-align: center; }
  .footer-brand { max-width: none; }
  .footer-brand .logo-link { justify-content: center; }
  .footer-brand p { margin-inline: auto; max-width: 36ch; }
  .footer-nav { justify-content: center; gap: 2.5rem; width: 100%; }
  .footer-col { text-align: center; }
  .footer-bottom { flex-direction: column-reverse; text-align: center; gap: 0.85rem; }
}

/* ============================================================
   Centered card content (mobile + desktop): about card, service cards,
   demo tiles, pricing cards.
   ============================================================ */
.about-card { text-align: center; }
.card { text-align: center; }
.card-icon { margin-inline: auto; }
.feature-tile { text-align: center; align-items: center; }
.price-card { text-align: center; align-items: center; }
.price-card .price-tag { align-self: center; }
