/* =============================================================
   MExEDS — Red Mexicana de Especialistas en Síndrome de Ehlers-Danlos
   1. Tokens
   ============================================================= */
:root {
  /* Brand palette (from official MExEDS color file) */
  --navy:        #1c3f60;
  --navy-deep:   #142c44;
  --navy-soft:   #2c5178;
  --purple:      #9848b4;
  --purple-deep: #7c3893;
  --blue-light:  #b1d4e0;
  --charcoal:    #2e2e2e;
  --gray:        #cbcbcb;

  --bg:          #f2f9f8;
  --paper:       #ffffff;
  --paper-2:     #eaf2f1;

  --ink:         #202a30;
  --ink-soft:    #45525a;
  --ink-mute:    #6e7b82;
  --cream:       #f2f9f8;

  --line:        rgba(28,63,96,0.14);
  --line-soft:   rgba(28,63,96,0.08);

  --accent:      var(--purple);
  --accent-2:    var(--blue-light);

  --serif: "Fraunces", "Iowan Old Style", "Georgia", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-h: 84px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;

  color-scheme: light;
}

@property --mesh-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.01em; font-family: var(--serif); font-weight: 500; color: var(--navy-deep); }

::selection { background: var(--purple); color: #fff; }

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

/* View transitions between pages */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
::view-transition-old(root) { animation-name: fadeOutUp; }
::view-transition-new(root) { animation-name: fadeInUp; }
@keyframes fadeOutUp { to { opacity: 0; transform: translateY(-10px); } }
@keyframes fadeInUp  { from { opacity: 0; transform: translateY(10px); } }

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .7rem 1.1rem; background: var(--navy); color: #fff;
  z-index: 9999; border-radius: 8px; font-weight: 600; font-size: .9rem;
  transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}
@media (min-width: 720px) { .container { padding-inline: 2.5rem; } }
@media (min-width: 1280px) { .container { padding-inline: 3rem; } }

.section { padding-block: clamp(3.5rem, 7vw, 7rem); position: relative; }
.section-tight { padding-block: clamp(2.5rem, 5vw, 4.5rem); }

.kicker {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--sans); font-size: .78rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--purple);
  margin-bottom: 1rem;
}
.kicker::before {
  content: ""; width: 22px; height: 1.5px; background: var(--purple); display: inline-block;
}

.eyebrow-line { color: var(--ink-mute); }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 60ch;
  line-height: 1.65;
}

em, i { font-style: italic; color: var(--purple); }
h1 em, h2 em, h3 em { font-style: italic; color: var(--purple); }

.text-center { text-align: center; margin-inline: auto; }

.divider {
  border: 0; height: 1px; background: var(--line); width: 100%;
}

/* =============================================================
   4. Typography
   ============================================================= */
h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
h4 { font-size: 1.1rem; font-family: var(--sans); font-weight: 600; color: var(--navy-deep); }

.section-head { max-width: 46rem; margin-bottom: clamp(2.2rem, 4vw, 3.5rem); }
.section-head.centered { margin-inline: auto; text-align: center; }
.section-head.centered .kicker { justify-content: center; }
.section-head.centered .kicker::before { display: none; }

/* =============================================================
   5. Components
   ============================================================= */

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .95rem 1.7rem;
  border-radius: 999px;
  font-weight: 600; font-size: .95rem;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(28,63,96,0.08), 0 1px 3px rgba(28,63,96,0.06);
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background-color .3s, color .3s, border-color .3s;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); transition-duration: .12s; }

.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-deep); box-shadow: 0 22px 44px rgba(152,72,180,0.28), 0 8px 18px rgba(28,63,96,0.14); }

.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); box-shadow: 0 22px 44px rgba(28,63,96,0.28); }

.btn-ghost {
  background: transparent; color: var(--navy-deep);
  border: 1.5px solid var(--line);
  box-shadow: none;
}
.btn-ghost:hover { border-color: var(--navy); background: rgba(28,63,96,0.05); box-shadow: none; }

.btn-light { background: #fff; color: var(--navy-deep); }
.btn-light:hover { background: var(--paper-2); }

.btn-sm { padding: .7rem 1.3rem; font-size: .85rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }

/* Animated underline (nav links, inline links) */
.link-underline {
  position: relative; padding-bottom: .2rem;
}
.link-underline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }

/* --- Cards --- */
.card {
  background: var(--paper);
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  box-shadow: 0 1px 2px rgba(20,44,68,0.04);
}

.has-tilt {
  --rx: 0deg; --ry: 0deg;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .55s var(--ease-soft), box-shadow .45s var(--ease-soft);
}
.has-tilt:hover {
  transition-duration: .15s;
  box-shadow: 0 40px 70px -30px rgba(28,63,96,0.28), 0 14px 30px -12px rgba(152,72,180,0.18);
}

/* --- Badge / recognition chip --- */
.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--navy); color: #fff;
  padding: .55rem 1rem .55rem .6rem;
  border-radius: 999px; font-size: .8rem; font-weight: 500;
}
.badge .badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-light); flex: none; }

.badge-float {
  background: var(--paper); color: var(--navy-deep);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  box-shadow: 0 30px 60px -20px rgba(20,44,68,0.35);
  display: flex; align-items: center; gap: .9rem;
  max-width: 320px;
}
.badge-float .badge-icon {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
}
.badge-float .badge-icon img { width: 52px; height: 52px; object-fit: contain; }
.badge-float strong { display: block; font-size: .88rem; font-weight: 700; color: var(--navy-deep); line-height: 1.3; }
.badge-float span { display: block; font-size: .78rem; color: var(--ink-mute); margin-top: .15rem; }

/* --- Skip nav visual pill tag --- */
.tag {
  display: inline-block; font-size: .74rem; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--purple-deep); background: rgba(152,72,180,0.1);
  padding: .35rem .75rem; border-radius: 999px;
}
.tag-navy { color: var(--navy-deep); background: rgba(28,63,96,0.08); }

/* =============================================================
   6. Navigation
   ============================================================= */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 200;
  height: var(--nav-h);
  display: flex; align-items: center;
  color: #fff;
  background: rgba(20,44,68,0.88);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  transition: background-color .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.nav-inner {
  width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
@media (min-width: 720px) { .nav-inner { padding-inline: 2.5rem; } }
@media (min-width: 1280px) { .nav-inner { padding-inline: 3rem; } }

.nav.is-scrolled {
  background: rgba(20,44,68,0.97);
  box-shadow: 0 8px 30px rgba(10,20,32,0.22);
}

.nav-logo { display: flex; align-items: center; gap: .6rem; flex: none; }
.nav-logo img { height: 44px; width: auto; object-fit: contain; }

.nav-links {
  display: none; align-items: center; gap: 2.1rem;
  font-size: .93rem; font-weight: 500; color: rgba(242,249,248,0.82);
}
@media (min-width: 960px) { .nav-links { display: flex; } }
.nav-links a:hover { color: #fff; }
.nav-links a.is-active { color: var(--blue-light); }

.nav-actions { display: flex; align-items: center; gap: .8rem; }
.nav-actions .btn { display: none; }
@media (min-width: 720px) { .nav-actions .btn { display: inline-flex; } }

.nav-burger {
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 50%; border: 1px solid rgba(242,249,248,0.28);
  flex: none;
}
@media (min-width: 960px) { .nav-burger { display: none; } }
.nav-burger .bar { width: 18px; height: 1.5px; background: #fff; position: relative; }
.nav-burger .bar::before, .nav-burger .bar::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 1.5px; background: #fff;
  transition: transform .3s var(--ease-out);
}
.nav-burger .bar::before { top: -6px; }
.nav-burger .bar::after { top: 6px; }

.nav-mobile {
  position: fixed; inset: 0; z-index: 250;
  background: var(--navy);
  display: flex; flex-direction: column; justify-content: center;
  padding: 2rem 1.75rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease-soft);
}
.nav-mobile[data-open="true"] { clip-path: inset(0 0 0 0); }
.nav-mobile a {
  font-family: var(--serif); font-size: 2rem; color: #f2f9f8;
  padding: .55rem 0; border-bottom: 1px solid rgba(242,249,248,0.12);
}
.nav-mobile .nav-mobile-cta { margin-top: 1.6rem; }
.nav-mobile-close {
  position: absolute; top: 1.9rem; right: 1.6rem;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(242,249,248,0.25); color: #fff;
  display: grid; place-items: center; font-size: 1.3rem;
}

/* =============================================================
   7. Hero (Home)
   ============================================================= */
.hero {
  padding-top: calc(var(--nav-h) + clamp(2rem, 5vw, 4rem));
  padding-bottom: clamp(3rem, 7vw, 6rem);
  position: relative;
  overflow: clip;
}
.hero::before {
  content: "";
  position: absolute; inset: -10% -10% auto -10%; height: 70%;
  background: radial-gradient(60% 60% at 30% 20%, rgba(177,212,224,0.5), transparent 70%),
              radial-gradient(50% 50% at 85% 10%, rgba(152,72,180,0.12), transparent 70%);
  z-index: -1;
  pointer-events: none;
}
.hero-grid {
  display: grid; gap: 2.6rem;
  align-items: center;
}
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.02fr 0.98fr; gap: 3.5rem; } }

.hero-title { margin-bottom: 1.3rem; }
.hero-sub { margin-bottom: 1.9rem; }

.hero-trust {
  display: flex; align-items: center; gap: .7rem;
  margin-top: 2.1rem; padding-top: 1.7rem; border-top: 1px solid var(--line);
  font-size: .85rem; color: var(--ink-mute);
}
.hero-trust strong { color: var(--navy-deep); }

.hero-figure { position: relative; }
.hero-figure-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3.1;
  position: relative;
  box-shadow: 0 50px 90px -40px rgba(20,44,68,0.4);
}
.hero-figure-frame img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 25%;
}
.hero-badge-float {
  position: absolute; left: -1rem; bottom: -1.4rem;
  z-index: 3;
}
@media (min-width: 540px) { .hero-badge-float { left: -1.8rem; bottom: -1.8rem; } }

/* =============================================================
   8. Page hero (interior pages)
   ============================================================= */
.page-hero {
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 6vw, 4.5rem));
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  position: relative;
  overflow: clip;
}
.page-hero::before {
  content: "";
  position: absolute; inset: -20% -10% auto -10%; height: 60%;
  background: radial-gradient(55% 60% at 80% 10%, rgba(177,212,224,0.55), transparent 70%),
              radial-gradient(40% 45% at 10% 0%, rgba(152,72,180,0.1), transparent 70%);
  z-index: -1; pointer-events: none;
}
.page-hero-content { max-width: 44rem; }

/* =============================================================
   9. Pillars / feature grid
   ============================================================= */
.pillars {
  display: grid; gap: 1.4rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .pillars { grid-template-columns: repeat(3, 1fr); } }

.pillar {
  padding: 2.1rem 1.8rem;
  background: var(--paper);
}
.pillar .pillar-num {
  font-family: var(--serif); font-style: italic; font-size: 1rem;
  color: var(--purple); margin-bottom: 1rem; display: block;
}
.pillar h3 { margin-bottom: .8rem; font-size: 1.2rem; }
.pillar p { color: var(--ink-soft); font-size: .95rem; }

/* =============================================================
   10. Recognition strip
   ============================================================= */
.recognition {
  background: var(--navy);
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: clamp(2.2rem, 5vw, 3.6rem);
  position: relative; overflow: clip;
  isolation: isolate;
}
.recognition::before {
  content: "";
  position: absolute; inset: -20%; z-index: -1;
  background: radial-gradient(45% 60% at 85% 20%, rgba(152,72,180,.5), transparent 65%),
              radial-gradient(40% 50% at 10% 90%, rgba(177,212,224,.28), transparent 65%);
  filter: blur(10px);
}
.recognition-grid {
  display: grid; gap: 2rem; align-items: center;
}
@media (min-width: 860px) { .recognition-grid { grid-template-columns: auto 1fr; gap: 3rem; } }
.recognition-mark {
  width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
}
.recognition-mark img { width: 92px; height: 92px; object-fit: contain; }
.recognition h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: .7rem; }
.recognition p { color: rgba(242,249,248,0.78); max-width: 56ch; font-size: 1rem; }
.recognition .tag { background: rgba(242,249,248,0.14); color: #fff; margin-top: 1.1rem; }

/* =============================================================
   11. Condition cards
   ============================================================= */
.conditions-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .conditions-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .conditions-grid { grid-template-columns: repeat(3, 1fr); } }

.condition-card {
  padding: 1.7rem 1.6rem;
  background: var(--paper);
  border-left: 3px solid var(--blue-light);
}
.condition-card h3 { font-size: 1.02rem; font-family: var(--sans); font-weight: 600; color: var(--navy-deep); margin-bottom: .6rem; }
.condition-card p { font-size: .89rem; color: var(--ink-soft); }

/* =============================================================
   12. Team cards & profiles
   ============================================================= */
.team-grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 720px) { .team-grid { grid-template-columns: repeat(4, 1fr); gap: 1.4rem; } }

.team-carousel {
  display: flex;
  gap: 1.3rem;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x proximity;
  padding: .5rem .2rem 1.6rem;
  margin: -.5rem -.2rem -1.6rem;
  scrollbar-width: thin;
  scrollbar-color: var(--purple) transparent;
}
.team-carousel::-webkit-scrollbar { height: 6px; }
.team-carousel::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.team-carousel::-webkit-scrollbar-thumb:hover { background: var(--purple); }
.team-carousel .team-card {
  flex: 0 0 auto;
  width: 210px;
  scroll-snap-align: start;
}
@media (min-width: 540px) { .team-carousel .team-card { width: 235px; } }

.team-card { overflow: hidden; }
.team-card-photo {
  aspect-ratio: 3 / 3.85;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.team-card-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform .8s var(--ease-soft);
}
.team-card:hover .team-card-photo img { transform: scale(1.06); }
.team-card-body { padding: 1.1rem 1.2rem 1.3rem; }
.team-card-body h3 { font-size: 1.02rem; margin-bottom: .3rem; }
.team-card-body p { font-size: .82rem; color: var(--purple-deep); font-weight: 600; }

/* Full profile rows (equipo.html) */
.profile {
  display: grid; gap: 2rem;
  padding-block: clamp(2.4rem, 5vw, 3.6rem);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 860px) { .profile { grid-template-columns: 300px 1fr; gap: 3.2rem; align-items: start; } }
.profile:last-child { border-bottom: 0; }

.profile-photo {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 3.85;
  box-shadow: 0 30px 60px -30px rgba(20,44,68,0.35);
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

@media (min-width: 860px) {
  .profile-alt { grid-template-columns: 1fr 300px; }
  .profile-alt .profile-photo { order: 2; }
  .profile-alt .profile-body { order: 1; }
}

.profile-body .tag { margin-bottom: 1rem; }
.profile-body h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin-bottom: .3rem; }
.profile-role { font-size: 1rem; color: var(--purple-deep); font-weight: 600; margin-bottom: 1.2rem; }
.profile-body p { color: var(--ink-soft); margin-bottom: 1rem; font-size: .98rem; }
.profile-body p:last-child { margin-bottom: 0; }

/* =============================================================
   13. How we work / steps
   ============================================================= */
.steps {
  display: grid; gap: 2.2rem;
  grid-template-columns: 1fr;
  counter-reset: step;
}
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 1.8rem; } }

.step { position: relative; padding-left: 3.6rem; }
.step-num {
  position: absolute; left: 0; top: 0;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--purple); color: #fff;
  font-family: var(--serif); font-style: italic; font-size: 1.15rem;
  display: grid; place-items: center;
}
.step h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.step p { color: var(--ink-soft); font-size: .93rem; }

/* =============================================================
   14. Stats
   ============================================================= */
.stats {
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }

.stat { text-align: center; padding: 1.6rem 1rem; }
.stat-num {
  font-family: var(--serif); font-weight: 500; font-style: italic;
  font-size: clamp(2.2rem, 4vw, 3.2rem); color: var(--purple);
  display: block; line-height: 1;
}
.stat-label { font-size: .86rem; color: rgba(242,249,248,0.75); margin-top: .6rem; }

.stats-panel {
  background: var(--navy-deep);
  border-radius: var(--radius-lg);
  padding: clamp(2.2rem, 5vw, 3.4rem);
}
.stats-panel .stat-num { color: var(--blue-light); }

/* =============================================================
   15. Services
   ============================================================= */
.services-grid {
  display: grid; gap: 1.4rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }

.service-card {
  padding: 2.1rem 2rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.service-card .service-num {
  font-family: var(--serif); font-style: italic; color: var(--blue-light);
  font-size: 1rem; -webkit-text-stroke: 0;
}
.service-card h3 { font-size: 1.25rem; }
.service-card p { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.service-card .btn { align-self: flex-start; margin-top: .3rem; }

/* =============================================================
   16. Testimonials & case studies
   ============================================================= */
.testimonials-grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) { .testimonials-grid { grid-template-columns: repeat(2, 1fr); } }

.testimonial-card {
  padding: 2.2rem 2rem;
  position: relative;
}
.testimonial-quote-mark {
  font-family: var(--serif); font-style: italic; font-size: 3.2rem;
  color: var(--blue-light); line-height: 1; display: block; margin-bottom: .6rem;
}
.testimonial-card blockquote {
  font-family: var(--serif); font-size: 1.15rem; font-style: italic;
  color: var(--navy-deep); line-height: 1.5; margin-bottom: 1.3rem;
}
.testimonial-meta { display: flex; align-items: center; gap: .7rem; }
.testimonial-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue-light); color: var(--navy-deep);
  display: grid; place-items: center; font-weight: 700; font-size: .95rem; flex: none;
}
.testimonial-meta strong { display: block; font-size: .92rem; color: var(--navy-deep); }
.testimonial-meta span { font-size: .8rem; color: var(--ink-mute); }

.case-grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .case-grid { grid-template-columns: repeat(2, 1fr); } }

.case-card { padding: 2.1rem 2rem; }
.case-card .tag { margin-bottom: 1.1rem; }
.case-card h3 { font-size: 1.35rem; margin-bottom: .8rem; }
.case-card p { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1rem; }
.case-card .case-note {
  font-size: .78rem; color: var(--ink-mute); font-style: italic;
  border-top: 1px solid var(--line); padding-top: .9rem; margin-top: .3rem;
}

/* =============================================================
   17. CTA final
   ============================================================= */
.cta-final {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-radius: var(--radius-lg);
  padding: clamp(2.6rem, 6vw, 4.4rem);
  text-align: center;
  position: relative; overflow: clip; isolation: isolate;
}
.cta-final::before {
  content: "";
  position: absolute; inset: -30%; z-index: -1;
  background: radial-gradient(40% 55% at 20% 20%, rgba(152,72,180,.45), transparent 65%),
              radial-gradient(40% 55% at 85% 85%, rgba(177,212,224,.25), transparent 65%);
}
.cta-final h2 { color: #fff; max-width: 32rem; margin-inline: auto; margin-bottom: 1rem; }
.cta-final p { color: rgba(242,249,248,0.75); max-width: 40rem; margin-inline: auto; margin-bottom: 2rem; }
.cta-final .btn-row { justify-content: center; }

/* =============================================================
   18. Forms
   ============================================================= */
.form-panel {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}
.field { position: relative; margin-bottom: 1.3rem; }
.field label {
  display: block; font-size: .78rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--navy-deep); margin-bottom: .5rem;
}
.field input, .field select, .field textarea {
  width: 100%; padding: .9rem 1rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: .96rem;
  transition: border-color .25s var(--ease-out), background-color .25s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--purple); background: #fff;
}
.field textarea { min-height: 130px; resize: vertical; }
.field-row { display: grid; gap: 1.3rem; }
@media (min-width: 640px) { .field-row.two { grid-template-columns: 1fr 1fr; } }

/* Option cards (radio selector) */
.option-cards { display: flex; flex-direction: column; gap: .7rem; }
.field .option-card {
  display: flex; align-items: flex-start; gap: .8rem;
  padding: .95rem 1.1rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  text-transform: none; letter-spacing: normal; font-weight: 400;
  transition: border-color .25s var(--ease-out), background-color .25s var(--ease-out);
}
.option-card:hover { border-color: var(--purple); }
.option-card input[type="radio"] {
  flex: none; margin-top: .2rem;
  width: 17px; height: 17px;
  accent-color: var(--purple);
}
.option-card span { font-size: .92rem; color: var(--ink-soft); line-height: 1.45; }
.option-card.is-selected {
  border-color: var(--purple);
  background: rgba(152,72,180,0.06);
}
.option-card.is-selected span { color: var(--navy-deep); }

/* Conditional field block — smooth expand/collapse */
.conditional-fields {
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .5s var(--ease-soft), opacity .35s var(--ease-out), margin-top .5s var(--ease-soft);
}
.conditional-fields.is-open {
  max-height: 640px; opacity: 1; margin-top: 1.3rem;
}

.form-note { font-size: .82rem; color: var(--ink-mute); margin-top: .6rem; }

.cta-form { transition: opacity .5s var(--ease-out), transform .5s var(--ease-soft); position: relative; }
.cta-form.is-sent { opacity: 0; transform: translateY(-10px); pointer-events: none; position: absolute; inset: 0; }
.cta-form-label { display: inline-flex; align-items: center; gap: .5rem; }
.cta-form.is-sending .cta-form-label { opacity: .55; }
.cta-form-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
  display: none; animation: spin .8s linear infinite;
}
.cta-form.is-sending .cta-form-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-success {
  display: none; text-align: center; padding: 2.5rem 1rem;
}
.form-success.is-visible { display: block; }
.form-success .check-circle {
  width: 64px; height: 64px; border-radius: 50%; background: var(--purple);
  display: grid; place-items: center; margin: 0 auto 1.2rem;
}
.form-success h3 { margin-bottom: .6rem; }
.form-success p { color: var(--ink-soft); }

/* Contact info list */
.contact-info { display: flex; flex-direction: column; gap: 1.4rem; }
.contact-info-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-info-icon {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(152,72,180,0.1); color: var(--purple);
  display: grid; place-items: center;
}
.contact-info-item strong { display: block; color: var(--navy-deep); margin-bottom: .2rem; font-size: .95rem; }
.contact-info-item span, .contact-info-item a { color: var(--ink-soft); font-size: .92rem; }
.contact-info-item a:hover { color: var(--purple); }

/* =============================================================
   19. Footer
   ============================================================= */
.footer {
  background: var(--navy-deep);
  color: rgba(242,249,248,0.75);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.footer-grid {
  display: grid; gap: 2.6rem;
  grid-template-columns: 1fr;
  padding-bottom: 2.6rem;
  border-bottom: 1px solid rgba(242,249,248,0.12);
  margin-bottom: 1.6rem;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; } }

.footer-brand img { height: 60px; width: auto; object-fit: contain; margin-bottom: 1rem; }
.footer-brand p { max-width: 34ch; font-size: .9rem; line-height: 1.6; }

.footer-col h4 { color: #fff; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: .65rem; }
.footer-col a { font-size: .9rem; }
.footer-col a:hover { color: var(--blue-light); }

.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: .8rem; color: rgba(242,249,248,0.5);
}
.footer-bottom a { color: rgba(242,249,248,0.65); }
.footer-bottom a:hover { color: var(--blue-light); }

/* =============================================================
   19.5 Legal / long-form content (privacidad.html)
   ============================================================= */
.prose { max-width: 68ch; }
.prose h2 {
  font-size: 1.4rem; margin-top: 2.4rem; margin-bottom: .9rem;
}
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-soft); margin-bottom: 1rem; }
.prose ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1rem; }
.prose li { color: var(--ink-soft); margin-bottom: .45rem; }
.prose .prose-updated { color: var(--ink-mute); font-size: .88rem; margin-bottom: 2.2rem; }

/* =============================================================
   20. Reveal / scroll effects
   ============================================================= */
[data-reveal] {
  opacity: 0; transform: translateY(32px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

.stagger-1 { transition-delay: .06s; }
.stagger-2 { transition-delay: .12s; }
.stagger-3 { transition-delay: .18s; }
.stagger-4 { transition-delay: .24s; }

/* =============================================================
   21. Responsive helpers
   ============================================================= */
@media (max-width: 719px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================================
   22. Reduced motion — only intrusive effects gated
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .recognition::before,
  .cta-final::before { animation: none; }
}
