/* ==========================================================================
   Kavitha Digital — style.css — V1
   Core design system. Loaded on every page, before responsive.css.

   Order (keep it — it prevents specificity fights):
    1. Variables            8. Cards
    2. Reset / base         9. Services & content blocks
    3. Typography          10. Sections (stats, process, FAQ, CTA…)
    4. Layout              11. Forms
    5. Navigation          12. Footer & floating buttons
    6. Hero                13. Animations
    7. Buttons             14. Utilities
   Media queries live in responsive.css, not here.
   ========================================================================== */


/* ==========================================================================
   1. VARIABLES — change the brand here; nothing below uses raw hex values.
   ========================================================================== */
:root {
  /* Brand colour */
  --primary:        #2446e0;   /* electric blue — 6.9:1 on white */
  --primary-dark:   #1c36b8;
  --secondary:      #5b3df5;   /* violet — 6.1:1 on white */
  --dark:           #0a0f1f;   /* near-black navy */
  --dark-2:         #121a33;
  --light:          #f5f7fb;   /* off-white section tint */
  --white:          #ffffff;

  /* Text */
  --text:           #1e2638;   /* body copy — 15:1 on white */
  --heading:        #0a0f1f;
  --muted:          #4a5568;   /* secondary copy — 7.5:1 on white */
  --on-dark:        #ffffff;
  --on-dark-muted:  #c7cfe6;   /* 12:1 on --dark */
  --on-dark-accent: #8ea2ff;

  /* Lines and surfaces */
  --border:         #e2e6f0;
  --border-strong:  #cfd6e6;
  --surface:        #ffffff;
  --tint-blue:      #eef1ff;
  --tint-violet:    #f2eeff;

  /* Utility colours */
  --whatsapp:       #128c4a;
  --success:        #0b7a3e;
  --error:          #b42318;

  /* Gradients */
  --gradient:       linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-soft:  linear-gradient(135deg, #eef1ff 0%, #f4efff 100%);
  --gradient-dark:  radial-gradient(120% 140% at 0% 0%, #1b2a6b 0%, var(--dark) 55%);

  /* Typography — Helvetica only.
     Helvetica Neue / Helvetica render on Apple devices. Where Helvetica is not
     installed, the metric-matched Helvetica clones take over (Nimbus Sans on
     Linux, Arial on Windows — Windows itself maps "Helvetica" to Arial).
     No web fonts are downloaded, so text paints instantly with zero layout shift. */
  --font:           "Helvetica Neue", Helvetica, "Nimbus Sans", "Nimbus Sans L", Arial, sans-serif;

  /* Fluid type scale — tuned for Helvetica's wide letterforms.
     Body never drops below 16px (no iOS zoom, comfortable on 320px phones). */
  --fs-xs:    clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);   /* 13–14px labels only */
  --fs-sm:    clamp(0.9375rem, 0.92rem + 0.1vw, 1rem);        /* 15–16px */
  --fs-base:  clamp(1rem, 0.96rem + 0.2vw, 1.125rem);         /* 16–18px body */
  --fs-lead:  clamp(1.0625rem, 0.99rem + 0.4vw, 1.3125rem);   /* 17–21px intro copy */
  --fs-h4:    clamp(1.0625rem, 1.03rem + 0.15vw, 1.1875rem);
  --fs-h3:    clamp(1.1875rem, 1.1rem + 0.45vw, 1.4375rem);
  --fs-h2:    clamp(1.625rem, 1.2rem + 1.9vw, 2.75rem);
  --fs-h1:    clamp(2rem, 1.35rem + 3vw, 3.75rem);
  --fs-display: clamp(2.125rem, 1.3rem + 3.8vw, 4.25rem);

  --lh-body:  1.65;
  --lh-tight: 1.1;
  --lh-snug:  1.3;

  --ls-display: -0.03em;   /* Helvetica headings look best slightly tightened */
  --ls-heading: -0.02em;
  --ls-body:     0.003em;
  --ls-label:    0.08em;

  --measure: 68ch;         /* comfortable line length on every screen */

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-section: clamp(3.5rem, 2.4rem + 5vw, 7rem);
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --gap: clamp(1rem, 0.8rem + 1vw, 1.75rem);

  /* Shape and depth */
  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(10, 15, 31, .05), 0 2px 8px rgba(10, 15, 31, .04);
  --shadow:    0 2px 4px rgba(10, 15, 31, .04), 0 12px 32px -8px rgba(10, 15, 31, .12);
  --shadow-lg: 0 4px 8px rgba(10, 15, 31, .04), 0 24px 56px -12px rgba(20, 35, 110, .22);
  --shadow-glow: 0 12px 32px -10px rgba(36, 70, 224, .6);

  /* Layout */
  --container: 1240px;
  --container-narrow: 820px;
  --header-h: 64px;

  /* Motion */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --dur: 220ms;
}


/* ==========================================================================
   2. RESET / BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--text);
  background: var(--white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

[hidden] { display: none !important; }

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
svg { flex-shrink: 0; }

input, button, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--primary-dark); text-decoration-thickness: 2px; }

ul, ol { padding-left: 1.25em; }
hr { border: 0; border-top: 1px solid var(--border); }

/* Visible focus for every interactive element */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}
.section--dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--on-dark-accent); }

/* Anchored headings clear the sticky header */
[id] { scroll-margin-top: calc(var(--header-h) + 32px); }

::selection { background: #d9e0ff; color: var(--heading); }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -5rem;
  z-index: 1000;
  padding: var(--space-3) var(--space-5);
  background: var(--dark);
  color: var(--white);
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--space-4); color: var(--white); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}


/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  color: var(--heading);
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: var(--ls-display); }
h2 { font-size: var(--fs-h2); line-height: 1.15; letter-spacing: var(--ls-heading); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); letter-spacing: -0.01em; }
h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); }
.h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); letter-spacing: -0.01em; }

p { max-width: var(--measure); text-wrap: pretty; }
strong, b { font-weight: 700; color: var(--heading); }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--primary);
}
.eyebrow__num {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.eyebrow__num::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary); /* fallback */
}

/* Long-form article copy (blog, legal) */
.prose { max-width: 72ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.375rem, 1.15rem + 1vw, 1.875rem); margin-top: 2em; }
.prose h3 { font-size: clamp(1.1875rem, 1.1rem + .4vw, 1.375rem); margin-top: 1.6em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--primary); font-weight: 700; }
.prose a { font-weight: 500; }
.prose blockquote {
  padding: var(--space-5) var(--space-6);
  border-left: 4px solid var(--primary);
  background: var(--tint-blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--fs-lead);
  color: var(--heading);
}


/* ==========================================================================
   4. LAYOUT
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }

.section { position: relative; padding-block: var(--space-section); }
.section--tint { background: linear-gradient(180deg, var(--white) 0, var(--light) 96px, var(--light) 100%); }
.section--tint-flat { background: var(--light); }
.section--dark {
  background: var(--gradient-dark);
  color: var(--on-dark-muted);
}
.section--dark h2, .section--dark h3, .section--dark strong { color: var(--on-dark); }
.section--dark .lead { color: var(--on-dark-muted); }
.section--dark .eyebrow { color: var(--on-dark-accent); }
.section--dark .eyebrow__num { color: var(--on-dark-muted); }
.section--dark a:not(.btn):not(.card__link):not(.chip) { color: var(--on-dark-accent); }
.section--dark a:not(.btn):not(.card__link):not(.chip):hover { color: var(--white); }
.section--tight { padding-block: calc(var(--space-section) * .6); }
.section--flush-top { padding-top: 0; }

.section-head {
  display: grid;
  gap: var(--space-4);
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  max-width: 760px;
}
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head--center p { margin-inline: auto; }
.section-head--split { max-width: none; }

.stack > * + * { margin-top: var(--space-4); }
.stack > .section-head { margin-bottom: var(--space-2); }
.stack-lg > * + * { margin-top: var(--space-6); }

.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: minmax(0, 1fr);
}

.split {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}

.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.contact-layout { display: grid; gap: clamp(2rem, 1rem + 3vw, 3.5rem); grid-template-columns: minmax(0, 1fr); }


/* ==========================================================================
   5. NAVIGATION — floating glass bar, mega menu, mobile panel
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header__bar {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-h);
  padding-inline: var(--gutter);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur) var(--ease);
}
/* The glass layer sits on a pseudo-element: backdrop-filter on the bar itself
   would trap the fixed mobile menu inside the bar. */
.site-header__bar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  transition: background-color var(--dur) var(--ease);
}
.site-header.is-scrolled .site-header__bar { box-shadow: var(--shadow); }
.site-header.is-scrolled .site-header__bar::before { background: rgba(255, 255, 255, .97); }
body.nav-open .site-header__bar::before { background: var(--white); }

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--heading);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  min-height: 44px;
}
.logo:hover { color: var(--heading); text-decoration: none; }
.logo__mark { width: 36px; height: 36px; border-radius: 10px; }
.logo__text span { color: var(--primary); }

/* Toggle (mobile) */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: 48px;
  min-height: 48px;
  padding: 0 var(--space-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--heading);
  font-weight: 700;
  font-size: var(--fs-sm);
}
.nav-toggle__icon { position: relative; width: 20px; height: 14px; }
.nav-toggle__icon span {
  position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle__icon span:nth-child(1) { top: 0; }
.nav-toggle__icon span:nth-child(2) { top: 6px; }
.nav-toggle__icon span:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Menu — mobile-first: full-height panel below the bar */
.site-nav {
  position: fixed;
  left: 0; right: 0;
  top: var(--header-h);
  bottom: 0;
  z-index: 99;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-4) var(--gutter) calc(var(--space-8) + env(safe-area-inset-bottom));
  background: var(--white);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
}
.site-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s;
}
/* Without JavaScript the menu is simply shown as a list */
html:not(.js) .site-header { position: relative; }
html:not(.js) .site-nav { position: static; opacity: 1; visibility: visible; transform: none; }
html:not(.js) .nav-toggle { display: none; }
html:not(.js) .site-header__bar { flex-wrap: wrap; }
html:not(.js) .site-nav { flex-basis: 100%; padding-inline: 0; }

.nav-list { list-style: none; padding: 0; margin: 0; }
.nav-item { position: relative; border-bottom: 1px solid var(--border); }
.nav-item__row { display: flex; align-items: center; justify-content: space-between; }

.nav-link {
  display: flex;
  align-items: center;
  flex: 1;
  min-height: 52px;
  padding: var(--space-2) 0;
  color: var(--heading);
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
}
.nav-link:hover { color: var(--primary); text-decoration: none; }
.nav-link[aria-current="page"],
.nav-item.is-current > .nav-item__row .nav-link { color: var(--primary); }

.sub-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: var(--heading);
}
.sub-toggle:hover { background: var(--light); }
.sub-toggle svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.submenu { display: none; padding: 0 0 var(--space-4); }
.nav-item.is-open > .submenu { display: block; }
html:not(.js) .submenu { display: block; }

.submenu__group + .submenu__group { margin-top: var(--space-4); }
.submenu__title {
  margin-bottom: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--muted);
}
.submenu__list { list-style: none; padding: 0; display: grid; gap: 2px; }
.submenu__link {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  border-radius: 12px;
  color: var(--heading);
  text-decoration: none;
  line-height: 1.35;
}
.submenu__link:hover { background: var(--light); color: var(--primary); text-decoration: none; }
.submenu__link[aria-current="page"] { background: var(--tint-blue); color: var(--primary); }
.submenu__icon {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--tint-blue); color: var(--primary);
}
.submenu__icon svg { width: 18px; height: 18px; }
.submenu__label { display: block; font-weight: 700; font-size: var(--fs-sm); }
.submenu__desc { display: none; font-size: 0.875rem; color: var(--muted); }
.submenu__all {
  display: inline-flex; align-items: center; gap: var(--space-2);
  margin-top: var(--space-3); padding: 10px var(--space-3);
  font-weight: 700; font-size: var(--fs-sm); text-decoration: none;
}
.submenu__all svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.submenu__all:hover svg { transform: translateX(3px); }
.submenu__promo { display: none; }
.submenu__all--light { color: var(--white); }
.submenu__all--light:hover { color: var(--on-dark-accent); }

.nav-cta { display: grid; gap: var(--space-3); margin-top: var(--space-5); }
.site-header .header-cta { display: none; }   /* shown from 1360px in responsive.css */

body.nav-open { overflow: hidden; }


/* ==========================================================================
   6. HERO — home hero and inner-page hero
   ========================================================================== */
.hero,
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--white);
}
/* Soft brand glow + faint Swiss grid (Helvetica nod) */
.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40rem 28rem at 88% 8%, rgba(91, 61, 245, .12), transparent 70%),
    radial-gradient(44rem 30rem at 6% 0%, rgba(36, 70, 224, .12), transparent 70%),
    linear-gradient(180deg, #fbfcff 0%, var(--white) 100%);
}
.hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(36, 70, 224, .06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(36, 70, 224, .06) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
}

.hero { padding-block: clamp(2.5rem, 1.5rem + 5vw, 6rem) clamp(1.5rem, 1rem + 2vw, 3rem); }
.hero__grid {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}
.hero__content > * + * { margin-top: var(--space-5); }
.hero h1 { font-size: var(--fs-display); letter-spacing: var(--ls-display); line-height: 1.05; }
.hero__lead { font-size: var(--fs-lead); color: var(--muted); max-width: 60ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.trust-list {
  display: grid;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
  margin-top: var(--space-6) !important;
  font-size: var(--fs-sm);
  color: var(--text);
}
.trust-list li { display: flex; align-items: center; gap: var(--space-2); }
.trust-list svg { width: 20px; height: 20px; color: var(--success); }

.hero__visual { position: relative; }
.hero__visual img,
.page-hero__visual img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background: var(--light);
}
.hero__badge {
  position: absolute;
  left: clamp(-1rem, -2vw, -0.5rem);
  bottom: clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: 15rem;
  padding: var(--space-3) var(--space-4);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--heading);
}
.hero__badge svg { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--tint-blue); color: var(--primary); }

/* Inner page hero */
.page-hero { padding-block: clamp(1.5rem, 1rem + 2vw, 2.5rem) clamp(1.5rem, 1rem + 2vw, 3rem); }
.page-hero__grid {
  display: grid;
  gap: clamp(2rem, 1rem + 3vw, 3.5rem);
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
  margin-top: clamp(1.25rem, 1rem + 1.5vw, 2.5rem);
}
.page-hero__content > * + * { margin-top: var(--space-5); }
.page-hero .lead { max-width: 62ch; }
.page-hero--simple .page-hero__content { max-width: 820px; }


/* ==========================================================================
   Breadcrumb
   ========================================================================== */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before {
  content: "";
  width: 7px; height: 7px;
  border-right: 1.5px solid var(--border-strong);
  border-top: 1.5px solid var(--border-strong);
  transform: rotate(45deg);
  margin-right: 4px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; padding-block: 8px; }
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--heading); font-weight: 700; }


/* ==========================================================================
   7. BUTTONS
   ========================================================================== */
.btn {
  --btn-bg: var(--white);
  --btn-fg: var(--heading);
  --btn-border: var(--border-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 50px;
  padding: 0.8125rem 1.5rem;
  border: 1.5px solid var(--btn-border);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn svg { width: 20px; height: 20px; }
.btn:hover { color: var(--btn-fg); text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --btn-fg: var(--white);
  --btn-border: transparent;
  background: var(--gradient);
  background-size: 160% 160%;
  background-position: 0% 50%;
  box-shadow: 0 6px 18px -8px rgba(36, 70, 224, .55);
}
.btn--primary:hover {
  background-position: 100% 50%;
  box-shadow: var(--shadow-glow);
}
.btn--ghost:hover { --btn-border: var(--primary); --btn-fg: var(--primary); box-shadow: var(--shadow-sm); }
.btn--dark { --btn-bg: var(--dark); --btn-fg: var(--white); --btn-border: var(--dark); }
.btn--dark:hover { --btn-bg: var(--dark-2); box-shadow: var(--shadow); }
.btn--light { --btn-bg: var(--white); --btn-fg: var(--dark); --btn-border: var(--white); }
.btn--light:hover { box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); }
.btn--outline-light { --btn-bg: transparent; --btn-fg: var(--white); --btn-border: rgba(255, 255, 255, .45); }
.btn--outline-light:hover { --btn-border: var(--white); background: rgba(255, 255, 255, .08); }
.btn--whatsapp { --btn-bg: var(--whatsapp); --btn-fg: var(--white); --btn-border: var(--whatsapp); }
.btn--whatsapp:hover { box-shadow: 0 12px 28px -10px rgba(18, 140, 74, .7); }
.btn--sm { min-height: 44px; padding: 0.625rem 1.125rem; font-size: 0.9375rem; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  text-decoration: none;
}
.link-arrow svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover svg { transform: translateX(4px); }
.link-arrow--light { color: var(--white); }
.link-arrow--light:hover { color: var(--on-dark-accent); }


/* ==========================================================================
   8. CARDS — shared base + reusable variants
   ========================================================================== */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: clamp(1.25rem, 1rem + 1vw, 1.875rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card--hover:hover,
.card--link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #c9d2f5;
}
.card h3 { font-size: var(--fs-h3); }
.card p { color: var(--muted); }

/* Whole card clickable via its heading link */
.card__link { color: var(--heading); text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card__link:hover { color: var(--primary); text-decoration: none; }
.card__link:focus-visible { outline: none; }
.card--link:has(.card__link:focus-visible) { outline: 3px solid var(--primary); outline-offset: 3px; }
.card__more { margin-top: auto; padding-top: var(--space-2); color: var(--primary); }
/* Links inside a clickable card stay clickable above the card overlay */
.card--link p a { position: relative; z-index: 1; }

/* Glass card for dark sections */
.card--glass {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.card--glass p { color: var(--on-dark-muted); }
.card--glass .card__link { color: var(--white); }
.card--glass .card__link:hover { color: var(--on-dark-accent); }
.card--glass.card--link:hover { border-color: rgba(142, 162, 255, .5); background: rgba(255, 255, 255, .08); }

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--gradient-soft);
  color: var(--primary);
  border: 1px solid #e3e6fb;
  flex: none;
}
.icon-box svg { width: 26px; height: 26px; }
.icon-box--solid { background: var(--gradient); color: var(--white); border: 0; }

/* Media card (blog, portfolio) */
.card--media { padding: 0; overflow: hidden; }
.card__media { position: relative; overflow: hidden; background: var(--light); aspect-ratio: 16 / 10; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card--media:hover .card__media img { transform: scale(1.04); }
.card__body { display: flex; flex-direction: column; gap: var(--space-3); flex: 1; padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); }
.card__meta { display: flex; flex-wrap: wrap; gap: var(--space-3); font-size: var(--fs-sm); color: var(--muted); }

.tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--tint-blue);
  color: var(--primary-dark);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.tag--violet { background: var(--tint-violet); color: #4a2fd6; }
.tag--muted { background: var(--light); color: var(--muted); border: 1px dashed var(--border-strong); }

/* Testimonial card (with placeholder variant) */
.testimonial blockquote { font-size: var(--fs-lead); line-height: 1.55; color: var(--heading); }
.testimonial__who { display: flex; align-items: center; gap: var(--space-3); margin-top: auto; padding-top: var(--space-4); }
.testimonial__avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gradient-soft); color: var(--primary); font-weight: 700;
}
.testimonial__name { font-weight: 700; color: var(--heading); }
.testimonial__role { font-size: var(--fs-sm); color: var(--muted); }
.testimonial--placeholder {
  border: 1.5px dashed var(--border-strong);
  background: repeating-linear-gradient(135deg, var(--white) 0 12px, #fafbfe 12px 24px);
  box-shadow: none;
}
.testimonial--placeholder .quote-mark { color: var(--border-strong); }
.quote-mark { width: 36px; height: 36px; color: var(--primary); opacity: .9; }

/* Contact card */
.contact-card { gap: var(--space-4); }
.contact-card h2, .contact-card h3 { font-size: var(--fs-h4); letter-spacing: -0.01em; }
.contact-card p { margin-top: 4px; }
.contact-card a:not(.btn) { font-weight: 700; }

/* Location card */
.location-card .tag { margin-bottom: var(--space-2); }


/* ==========================================================================
   9. SERVICES & CONTENT BLOCKS
   ========================================================================== */
.service-card h3 { margin-top: var(--space-2); }

/* Feature (icon + text, no card chrome) */
.feature { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); align-items: start; }
.feature h3 { font-size: var(--fs-h4); margin-bottom: 6px; }
.feature p { color: var(--muted); }
.feature .icon-box { width: 46px; height: 46px; border-radius: 12px; }
.feature .icon-box svg { width: 22px; height: 22px; }

/* Problem → solution blocks */
.problem { border-left: 3px solid var(--secondary); padding: var(--space-2) 0 var(--space-2) var(--space-5); }
.problem h3 { font-size: var(--fs-h4); margin-bottom: 6px; }
.problem p { color: var(--muted); }

/* Checklist */
.checklist { list-style: none; padding: 0; display: grid; gap: var(--space-4); }
.checklist li { display: grid; grid-template-columns: 28px 1fr; gap: var(--space-3); align-items: start; }
.checklist li > svg {
  width: 28px; height: 28px; padding: 5px;
  border-radius: 50%;
  background: #e6f4ec;
  color: var(--success);
}
.checklist strong { display: block; margin-bottom: 2px; }
.checklist span { color: var(--muted); }
.section--dark .checklist span { color: var(--on-dark-muted); }
.section--dark .checklist li > svg { background: rgba(142, 162, 255, .16); color: var(--on-dark-accent); }

/* Chips (areas, categories) */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--heading);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
}
.chip svg { width: 16px; height: 16px; color: var(--primary); }
a.chip { border-color: #c9d2f5; background: var(--tint-blue); color: var(--primary-dark); font-weight: 700; }
a.chip:hover { background: var(--primary); border-color: var(--primary); color: var(--white); text-decoration: none; }
a.chip:hover svg { color: var(--white); }
button.chip { cursor: pointer; }
button.chip[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: var(--white); }

/* Industries */
.industries { list-style: none; padding: 0; }
.industry {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-weight: 700;
  color: var(--heading);
  line-height: 1.35;
}
.industry svg { width: 24px; height: 24px; color: var(--primary); }

/* Split media */
.media-frame img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* Callout / note */
.note {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius);
  background: var(--tint-blue);
  border: 1px solid #dbe1fb;
  color: var(--heading);
}
.note svg { width: 24px; height: 24px; color: var(--primary); margin-top: 2px; }

/* Owner / profile card */
.profile {
  display: grid;
  gap: var(--space-5);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-radius: var(--radius-lg);
  background: var(--gradient-dark);
  color: var(--on-dark-muted);
}
.profile__monogram {
  display: inline-flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; border-radius: 20px;
  background: var(--gradient); color: var(--white);
  font-size: 2rem; font-weight: 700;
}
.profile h3 { color: var(--white); }
.profile dl { display: grid; gap: var(--space-3); }
.profile dt { font-size: var(--fs-xs); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--on-dark-accent); font-weight: 700; }
.profile dd { margin: 0; color: var(--white); }
.profile a:not(.btn) { color: var(--white); }
.profile p { color: var(--on-dark-muted); }
.profile .btn { justify-self: start; }
.profile h2 { color: var(--white); }


/* ==========================================================================
   10. SECTIONS — stats, process, FAQ, CTA band, portfolio
   ========================================================================== */

/* Statistics */
.stats { display: grid; gap: var(--gap); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { padding: var(--space-5) 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.section:not(.section--dark) .stat { border-top-color: var(--border); }
.stat__value {
  display: block;
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.section:not(.section--dark) .stat__value { color: var(--heading); }
.stat__label { display: block; margin-top: var(--space-3); font-size: var(--fs-sm); line-height: 1.45; }

/* Process steps */
.process { list-style: none; padding: 0; display: grid; gap: var(--space-5); counter-reset: step; }
.process__step {
  position: relative;
  padding: 0 0 0 calc(56px + var(--space-4));
  min-height: 56px;
}
.process__step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0;
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--primary);
  font-weight: 700;
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
}
.process__step::after {
  content: "";
  position: absolute;
  left: 27px; top: 64px; bottom: calc(-1 * var(--space-5) + 8px);
  width: 2px;
  background: linear-gradient(var(--border-strong), transparent);
}
.process__step:last-child::after { display: none; }
.process--3 { --steps: 3; }
.process--4 { --steps: 4; }
.process--5 { --steps: 5; }
.process__step h3 { font-size: var(--fs-h4); margin-bottom: 6px; padding-top: 4px; }
.process__step p { color: var(--muted); }

/* FAQ accordion — native <details>, works without JavaScript */
.faq { display: grid; gap: var(--space-3); max-width: 900px; }
.faq--center { margin-inline: auto; }
.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.faq__item[open] { border-color: #c9d2f5; box-shadow: var(--shadow); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 56px;
  padding: var(--space-4) var(--space-5);
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: var(--fs-h4);
  line-height: 1.4;
  color: var(--heading);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--primary); }
.faq__item summary:focus-visible { outline-offset: -3px; border-radius: var(--radius); }
.faq__icon {
  position: relative;
  flex: 0 0 28px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--tint-blue);
}
.faq__icon::before, .faq__icon::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 12px; height: 2px;
  margin: -1px 0 0 -6px;
  border-radius: 2px;
  background: var(--primary);
  transition: transform var(--dur) var(--ease);
}
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon::after { transform: rotate(0deg); }
.faq__answer { padding: 0 var(--space-5) var(--space-5); color: var(--text); }
.faq__answer > * + * { margin-top: var(--space-3); }
.faq-group + .faq-group { margin-top: var(--space-7); }
.faq-group h2 { font-size: clamp(1.375rem, 1.2rem + .8vw, 1.75rem); margin-bottom: var(--space-5); }

/* CTA band */
.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2rem, 1.25rem + 4vw, 4.5rem);
  border-radius: clamp(20px, 2vw, 32px);
  background: var(--gradient-dark);
  color: var(--on-dark-muted);
}
.cta-band::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 36rem; height: 36rem;
  right: -10rem; top: -18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 61, 245, .55), transparent 65%);
}
.cta-band::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 30rem; height: 30rem;
  left: -12rem; bottom: -18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(36, 70, 224, .5), transparent 65%);
}
.cta-band__grid { display: grid; gap: var(--space-6); align-items: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { margin-top: var(--space-4); font-size: var(--fs-lead); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.cta-band__contact { margin-top: var(--space-5); font-size: var(--fs-sm); }
.cta-band__contact a { color: var(--white); font-weight: 700; }

/* Portfolio */
.portfolio-card .card__media { aspect-ratio: 4 / 3; }

/* Blog layout */
.post-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); color: var(--muted); font-size: var(--fs-sm); }
.post-cover img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.post-layout { display: grid; gap: clamp(2rem, 1rem + 4vw, 4rem); grid-template-columns: minmax(0, 1fr); }
.post-aside { display: grid; gap: var(--space-5); align-content: start; }
.aside-card h2 { font-size: var(--fs-h4); }
.aside-card ul { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.aside-card a { font-weight: 700; }

.filter-bar { margin-bottom: var(--space-6); }

/* 404 */
.error-code {
  font-size: clamp(5rem, 3rem + 12vw, 11rem);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -0.05em;
}


/* ==========================================================================
   11. FORMS
   ========================================================================== */
.form { display: grid; gap: var(--space-5); }
.form__row { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr); }
.field { display: grid; gap: var(--space-2); }
.field label, .field .label { font-weight: 700; color: var(--heading); font-size: var(--fs-sm); }
.field .optional { font-weight: 400; color: var(--muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  background: var(--white);
  font-size: max(16px, 1rem);  /* prevents iOS zoom on focus */
  line-height: 1.5;
  color: var(--heading);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field textarea { min-height: 140px; resize: vertical; }
.field select {
  appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234a5568' 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 1rem center;
}
.field input::placeholder, .field textarea::placeholder { color: #7a8599; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #9aa6c2; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(36, 70, 224, .16);
}
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--error); }
.field__error { display: none; font-size: var(--fs-sm); color: var(--error); font-weight: 500; }
.field.is-invalid .field__error { display: block; }
.field__hint { font-size: var(--fs-sm); color: var(--muted); }

.checkbox { display: grid; grid-template-columns: 24px 1fr; gap: var(--space-3); align-items: start; font-size: var(--fs-sm); color: var(--text); }
.checkbox input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--primary); }

.form-status { min-height: 1.5em; font-weight: 700; font-size: var(--fs-sm); color: var(--success); }
.form-status[data-state="error"] { color: var(--error); }
.form-card {
  padding: clamp(1.25rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}


/* ==========================================================================
   12. FOOTER & FLOATING BUTTONS
   ========================================================================== */
.site-footer {
  padding-top: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  padding-bottom: calc(var(--space-7) + 72px); /* room for floating buttons on phones */
  background: var(--dark);
  color: var(--on-dark-muted);
  font-size: var(--fs-sm);
}
.site-footer a:not(.btn) { color: var(--on-dark-muted); text-decoration: none; }
.site-footer a:not(.btn):hover { color: var(--white); text-decoration: underline; }
.footer__grid { display: grid; gap: var(--space-7) var(--space-6); grid-template-columns: minmax(0, 1fr); }
.footer__brand .logo { color: var(--white); }
.footer__brand .logo__text span { color: var(--on-dark-accent); }
.footer__brand p { margin-top: var(--space-4); max-width: 40ch; line-height: 1.6; }
.footer__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.footer__actions .btn { min-height: 46px; }
.footer__title {
  margin-bottom: var(--space-4);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--white);
}
.footer__list { list-style: none; padding: 0; display: grid; gap: 2px; }
.footer__list a { display: inline-block; padding-block: 7px; line-height: 1.4; }
.footer__sub { margin-top: var(--space-4); margin-bottom: var(--space-1); font-size: var(--fs-xs); color: var(--on-dark-accent); font-weight: 700; letter-spacing: .04em; }
.footer__contact { display: grid; gap: var(--space-4); font-style: normal; }
.footer__contact div { display: grid; grid-template-columns: 20px 1fr; gap: var(--space-3); line-height: 1.5; }
.footer__contact svg { width: 20px; height: 20px; color: var(--on-dark-accent); margin-top: 2px; }
.footer__contact strong { color: var(--white); display: block; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, .12);
}

/* Floating WhatsApp + Call */
.fab-stack {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 90;
  display: grid;
  gap: 10px;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.fab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: var(--white);
  box-shadow: 0 10px 24px -8px rgba(10, 15, 31, .45);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.fab svg { width: 26px; height: 26px; }
.fab:hover { color: var(--white); transform: translateY(-2px) scale(1.04); }
.fab--whatsapp { background: var(--whatsapp); }
.fab--call { background: var(--gradient); }
.fab__label {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--dark);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(6px, -50%);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.fab:hover .fab__label,
.fab:focus-visible .fab__label { opacity: 1; transform: translate(0, -50%); }
body.nav-open .fab-stack,
body.nav-open .to-top { opacity: 0; pointer-events: none; }

/* Back to top */
.to-top {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--heading);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
}
.to-top svg { width: 20px; height: 20px; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:hover { color: var(--primary); }


/* ==========================================================================
   13. ANIMATIONS — light, IntersectionObserver-driven, motion-safe only
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* Only hidden once main.js has confirmed the observer is running */
  .reveal-ready [data-reveal]:not(.is-visible) {
    opacity: 0;
    transform: translateY(18px);
  }
  .reveal-ready [data-reveal="fade"]:not(.is-visible) { transform: none; }
  .reveal-ready [data-reveal="scale"]:not(.is-visible) { transform: scale(.97); }
  .reveal-ready [data-reveal="left"]:not(.is-visible) { transform: translateX(-18px); }
  .reveal-ready [data-reveal] {
    transition: opacity .6s var(--ease), transform .6s var(--ease);
    transition-delay: var(--delay, 0ms);
  }

  /* Slow gradient drift on the hero glow */
  .hero::before { animation: glowDrift 18s ease-in-out infinite alternate; }

  /* FAQ answer slides in */
  .faq__item[open] .faq__answer { animation: fadeUp .28s var(--ease); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
@keyframes glowDrift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-2%, 2%, 0); }
}

/* Respect reduced motion everywhere */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ==========================================================================
   14. UTILITIES
   ========================================================================== */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mt-0 { margin-top: 0 !important; }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }
.mx-auto { margin-inline: auto; }
.nowrap { white-space: nowrap; }
.max-measure { max-width: var(--measure); }
