/* ===== Tokens ===== */
:root {
  /* Brand colors taken from the Smile Group logo */
  --blue: #4570ab;
  --blue-deep: #345a8f;
  --blue-ink: #13254a;
  --green: #05ae9b;
  --green-text: #04786b;
  --green-soft: #d6f3ef;
  --sky: #eef3ff;
  --bg: #fbfcff;
  --surface: #ffffff;
  --ink: #101a3a;
  --muted: #5b6585;
  --line: #e3e8f5;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 20px 50px -20px rgba(20, 42, 122, .28);
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --header-h: 76px;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0; letter-spacing: -.02em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); font-weight: 700; text-wrap: balance; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0; }
.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.kicker {
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-text); margin-bottom: 14px;
}
.kicker-light { color: #6fe3d5; }
.body-lg { font-size: 1.125rem; color: var(--muted); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; border-radius: 999px; border: 0;
  font: 600 .95rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s, box-shadow .2s, color .2s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn-lg { padding: 17px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 24px -10px rgba(69, 112, 171, .75); }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--blue); }
.btn-dark { background: var(--blue-ink); color: #fff; }
.btn-dark:hover { background: var(--blue); }
.btn-light { background: #fff; color: var(--blue-deep); }
.btn-light:hover { background: var(--green-soft); }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(251, 252, 255, .82);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand img { width: 116px; height: auto; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--blue); }
.menu-toggle { display: none; }

/* ===== Hero ===== */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(60px, 7vw, 100px); position: relative; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 60vw; height: 60vw; z-index: -1;
  background: radial-gradient(closest-side, rgba(5, 174, 155, .14), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: 999px; background: var(--green-soft); color: var(--green-text);
  font-size: .85rem; font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(5, 174, 155, .25); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(5, 174, 155, 0); } }
.hero h1 {
  font-size: clamp(3.4rem, 8.5vw, 7rem); font-weight: 800; letter-spacing: -.045em; line-height: .92;
  margin: 24px 0; color: var(--blue-ink);
}
.hero h1 em { font-style: normal; color: var(--blue); position: relative; white-space: nowrap; }
.hero h1 em::after {
  content: ""; position: absolute; left: 2%; right: 4%; bottom: .02em; height: .14em; z-index: -1;
  background: var(--green); opacity: .55; border-radius: 999px;
}
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted); max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-trust { list-style: none; padding: 0; margin: 44px 0 0; display: flex; gap: clamp(20px, 4vw, 48px); }
.hero-trust li { display: flex; flex-direction: column; }
.hero-trust strong { font-family: var(--font-display); font-size: 2rem; color: var(--blue-ink); line-height: 1; }
.hero-trust span { font-size: .85rem; color: var(--muted); margin-top: 6px; }

.hero-media { position: relative; aspect-ratio: 1 / 1.02; }
.hero-photo { margin: 0; position: absolute; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo.main { inset: 0 0 18% 12%; border-radius: 28px 28px 28px 120px; }
.hero-photo.side { width: 44%; aspect-ratio: 1; left: 0; bottom: 0; border: 6px solid var(--bg); }
.hero-photo.side img { object-position: 70% center; }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 12px;
  background: var(--surface); padding: 14px 18px 14px 14px; border-radius: 18px; box-shadow: var(--shadow);
  font-size: .82rem; line-height: 1.35;
}
.float-card strong { display: block; font-size: .95rem; color: var(--blue-ink); }
.float-card span { color: var(--muted); }
.card-network { top: 8%; left: -4%; animation: bob 6s ease-in-out infinite; }
.card-rating { right: -2%; bottom: 6%; animation: bob 6s ease-in-out -3s infinite; }
.pin, .smile-badge {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px;
}
.pin { background: var(--blue); }
.pin svg { width: 22px; fill: #fff; }
.smile-badge { background: var(--green-soft); color: var(--green); font-size: 1.5rem; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* ===== Marquee ===== */
.marquee { background: var(--blue); color: #fff; overflow: hidden; padding: 18px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee span {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; padding: 0 28px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 56px;
}
.marquee span::after { content: "✦"; color: var(--green); font-size: .9rem; margin-left: 28px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== Sections ===== */
.section { padding: clamp(72px, 10vw, 130px) 0; }
.section-tint { background: var(--sky); }
.section-dark { background: var(--blue-ink); color: #fff; }
.section-head { max-width: 680px; margin-bottom: 56px; }

/* Split / Atención */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.split-media { position: relative; }
.split-media img { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; border-radius: var(--radius); }
.quote-chip {
  position: absolute; right: -20px; bottom: 32px; background: var(--green); color: #fff;
  padding: 18px 22px; border-radius: 18px; box-shadow: var(--shadow); max-width: 230px; line-height: 1.3;
}
.quote-chip strong { display: block; font-family: var(--font-display); font-size: 1.3rem; }
.split-copy h2 { margin-bottom: 20px; }
.feature-list { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 26px; }
.feature-list li { display: flex; gap: 18px; }
.f-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--sky); display: grid; place-items: center; flex: none; }
.f-icon svg { width: 24px; fill: var(--blue); }
.feature-list h3 { font-size: 1.1rem; margin-bottom: 4px; font-family: var(--font-body); letter-spacing: 0; }
.feature-list p { color: var(--muted); }

/* Especialidades */
.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.spec-card {
  background: var(--surface); border-radius: var(--radius); padding: 28px; min-height: 220px;
  display: flex; flex-direction: column; border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.spec-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.spec-num { font-family: var(--font-display); font-weight: 700; color: var(--green); font-size: .95rem; margin-bottom: auto; padding-bottom: 32px; }
.spec-card h3 { margin-bottom: 10px; color: var(--blue-ink); }
.spec-card p { color: var(--muted); font-size: .93rem; }
.spec-cta { background: var(--blue); color: #fff; text-decoration: none; border-color: var(--blue); justify-content: flex-end; position: relative; }
.spec-cta h3 { color: #fff; padding-right: 56px; }
.spec-cta p { color: rgba(255, 255, 255, .78); }
.spec-cta .arrow {
  position: absolute; top: 24px; right: 24px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--green); display: grid; place-items: center; font-size: 1.3rem; transition: transform .3s var(--ease);
}
.spec-cta:hover .arrow { transform: rotate(-45deg); }

/* Sedes */
.sedes-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; margin-bottom: 40px; }
.sedes-head .body-lg { color: rgba(255, 255, 255, .7); }
.big-num {
  display: block; font-size: clamp(6rem, 14vw, 11rem); line-height: .8; letter-spacing: -.06em;
  color: var(--green); margin-bottom: 12px;
}
.zone-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.zone-tabs button {
  font: 600 .9rem var(--font-body); color: rgba(255, 255, 255, .8); cursor: pointer;
  padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); background: transparent;
  transition: background-color .2s, color .2s, border-color .2s;
}
.zone-tabs button:hover { border-color: rgba(255, 255, 255, .5); }
.zone-tabs button[aria-selected="true"] { background: #fff; color: var(--blue-ink); border-color: #fff; }
.sede-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.sede {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius-sm);
  padding: 24px; display: flex; flex-direction: column; gap: 8px;
  transition: background-color .25s, transform .35s var(--ease), opacity .3s;
}
.sede:hover { background: rgba(255, 255, 255, .1); transform: translateY(-3px); }
.sede.is-hidden { display: none; }
.zone-tag { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #6fe3d5; }
.sede h3 { font-size: 1.45rem; }
.sede p { color: rgba(255, 255, 255, .68); font-size: .93rem; flex: 1; }
.sede a { color: #fff; font-weight: 600; font-size: .9rem; text-decoration: none; margin-top: 8px; }
.sede a:hover { color: #6fe3d5; }
.sede-more { background: var(--green); border-color: var(--green); text-decoration: none; color: var(--blue-ink); }
.sede-more:hover { background: #0bc2ad; }
.sede-more p { color: rgba(12, 26, 77, .8); }
.more-link { font-weight: 700; font-size: .9rem; }

/* Galería */
.gallery { display: grid; grid-template-columns: 1.2fr 1fr 1fr; grid-template-rows: 280px 280px; gap: 16px; }
.g-item { margin: 0; overflow: hidden; border-radius: var(--radius); }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.g-item:hover img { transform: scale(1.04); }
.g-tall { grid-row: span 2; }
.g-wide { grid-column: span 2; }

/* Duo cards */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.duo-card { border-radius: var(--radius); padding: clamp(32px, 4vw, 52px); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.duo-card h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.duo-card p:not(.kicker) { margin-bottom: 14px; }
.duo-card .kicker { margin-bottom: 0; }
.duo-green { background: var(--green-soft); color: var(--blue-ink); }
.duo-green .kicker { color: var(--green-text); }
.duo-blue { background: var(--blue); color: #fff; }
.duo-blue p:not(.kicker) { color: rgba(255, 255, 255, .82); }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-copy h2 { margin-bottom: 18px; }
.contact-list { list-style: none; padding: 0; margin: 40px 0 0; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-list span { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.contact-list a { color: var(--blue); font-weight: 600; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.socials { display: flex; gap: 18px; }
.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { font-size: .85rem; font-weight: 600; }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--bg); width: 100%;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 15px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(69, 112, 171, .15); }
.field [aria-invalid="true"] { border-color: #d64545; }
.form-error { color: #b42f2f; font-size: .9rem; font-weight: 500; }
.form-success { color: var(--green-text); font-weight: 600; }

/* Footer */
.site-footer { background: var(--blue-ink); color: rgba(255, 255, 255, .7); padding: 56px 0 40px; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: center; }
.footer-brand img { width: 150px; height: auto; margin-bottom: 16px; }
.footer-nav { display: flex; gap: 24px; justify-content: flex-end; flex-wrap: wrap; }
.footer-nav a { text-decoration: none; color: #fff; font-weight: 500; }
.footer-nav a:hover { color: #6fe3d5; }
.copy { grid-column: 1 / -1; font-size: .85rem; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .12); }

/* WhatsApp float */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center; box-shadow: 0 12px 28px -8px rgba(37, 211, 102, .7);
  transition: transform .25s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; fill: #fff; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { gap: 20px; }
}

@media (max-width: 880px) {
  .header-cta { display: none; }
  .menu-toggle {
    display: grid; gap: 6px; place-content: center; margin-left: auto;
    width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  }
  .menu-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); transition: transform .3s var(--ease); }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0; margin: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 20px 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s var(--ease), visibility .25s;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; color: var(--ink); }

  .hero-grid, .split, .contact, .sedes-head, .duo { grid-template-columns: 1fr; }
  .hero-media { max-width: 560px; width: 100%; margin-inline: auto; }
  .card-network { left: 0; }
  .card-rating { right: 0; }
  .quote-chip { right: 16px; }
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 200px 200px; }
  .g-tall { grid-row: span 1; grid-column: span 2; }
  .g-wide { grid-column: span 2; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .container { width: calc(100% - 32px); }
  .spec-grid { grid-template-columns: 1fr; }
  .spec-card { min-height: 0; }
  .field-row { grid-template-columns: 1fr; }
  .hero-trust strong { font-size: 1.6rem; }
  .float-card { font-size: .75rem; padding: 10px 14px 10px 10px; }
  .float-card strong { font-size: .85rem; }
  .pin, .smile-badge { width: 34px; height: 34px; }
  .contact-list li { grid-template-columns: 1fr; gap: 4px; }
  .gallery { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: 220px; }
  .g-tall, .g-wide { grid-column: auto; }
}

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