/* ============================================================
   KMCLINIC — hoja de estilos principal
   Paleta tomada del isotipo: verde salvia + dorado
   ============================================================ */

:root {
  --sage-900: #2C3A2D;
  --sage-800: #3E5340;
  --sage-700: #526B54;
  --sage-500: #8FA68E;
  --sage-300: #B9CBB6;
  --sage-100: #E6EDE4;

  --gold-600: #B8912F;
  --gold-500: #C9A227;
  --gold-400: #E0B84C;
  --gold-100: #F6EBCF;

  --cream: #FAF8F4;
  --paper: #FFFFFF;
  --ink: #24302A;
  --ink-soft: #5B6A61;
  --line: rgba(44, 58, 45, .12);

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 10px rgba(44, 58, 45, .06);
  --shadow: 0 14px 40px rgba(44, 58, 45, .10);
  --shadow-lg: 0 30px 70px rgba(44, 58, 45, .16);

  --font-body: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;

  --header-h: 76px;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--sage-800); text-decoration: none; }
a:hover { color: var(--gold-600); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.14;
  color: var(--sage-900);
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1rem; }

.container { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.container.narrow { width: min(100% - 2.5rem, 780px); }

.icon { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--sage-800); color: #fff; padding: .8rem 1.2rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

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

/* ---------------- Header ---------------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 248, 244, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease, background .3s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.header-inner {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--sage-900); }
.brand-logo { height: 54px; width: auto; }
.site-footer .brand-logo { height: 60px; }

.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav ul { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-nav ul a {
  font-size: .93rem; letter-spacing: .02em; color: var(--sage-800); position: relative; padding: .3rem 0;
}
.site-nav ul a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: var(--gold-500); transition: width .25s ease;
}
.site-nav ul a:hover::after, .site-nav ul a.is-current::after { width: 100%; }

.nav-toggle {
  display: none; width: 46px; height: 46px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--paper); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span {
  display: block; width: 20px; height: 1.8px; background: var(--sage-800);
  border-radius: 2px; transition: transform .3s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.8px) rotate(-45deg); }

/* ---------------- Botones ---------------- */

.btn {
  --btn-bg: var(--sage-800);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .95rem 1.7rem; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-body); font-size: .95rem; font-weight: 500; letter-spacing: .03em;
  cursor: pointer; text-align: center;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: .68rem 1.3rem; font-size: .88rem; }

.btn-primary { background: var(--sage-800); color: #fff; box-shadow: 0 10px 26px rgba(62, 83, 64, .28); }
.btn-primary:hover { background: var(--sage-900); color: #fff; box-shadow: 0 16px 34px rgba(62, 83, 64, .34); }

.btn-ghost { background: var(--paper); color: var(--sage-800); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--sage-500); color: var(--sage-900); }

.btn-outline { background: transparent; color: var(--sage-800); border-color: var(--sage-500); }
.btn-outline:hover { background: var(--sage-800); color: #fff; border-color: var(--sage-800); }

.btn-gold { background: linear-gradient(135deg, var(--gold-400), var(--gold-600)); color: #33280A; font-weight: 600; }
.btn-gold:hover { color: #241C05; box-shadow: 0 16px 34px rgba(184, 145, 47, .38); }

.btn-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.42); }
.btn-light:hover { background: #fff; color: var(--sage-900); }

/* ---------------- Hero ---------------- */

.hero { position: relative; overflow: hidden; padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-glow {
  position: absolute; inset: -30% -20% auto auto; width: 780px; height: 780px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(143,166,142,.42), rgba(224,184,76,.18) 45%, transparent 68%);
  filter: blur(10px); pointer-events: none;
}
.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.08fr .92fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}

.eyebrow {
  font-size: .76rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-600); font-weight: 500; margin-bottom: 1rem;
}
.hero h1 { margin-bottom: 1.1rem; }
.hero h1 em { font-style: italic; color: var(--gold-600); }
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 34em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.hero-actions.center { justify-content: center; }

.hero-meta {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.8rem;
  font-size: .92rem; color: var(--ink-soft);
}
.hero-meta .icon { fill: var(--gold-600); }

.hero-visual { display: flex; justify-content: center; }
.hero-card {
  position: relative; display: grid; place-items: center;
  width: min(420px, 100%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #fff, var(--sage-100));
  box-shadow: var(--shadow-lg);
}
.hero-card::after {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  border: 1px solid rgba(184,145,47,.35);
}
.hero-logo { width: 78%; }

/* ---------------- Trust bar ---------------- */

.trust { padding: 1rem 0 clamp(2rem, 5vw, 3.5rem); }
.trust-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.trust-item { background: var(--paper); padding: 1.6rem 1.5rem; }
.trust-num {
  font-family: var(--font-display); font-size: .95rem; color: var(--gold-600); letter-spacing: .1em;
}
.trust-item h2 { font-size: 1.2rem; margin: .35rem 0 .35rem; }
.trust-item p { font-size: .9rem; color: var(--ink-soft); margin: 0; }

/* ---------------- Secciones ---------------- */

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--sage-100); }

.section-head { max-width: 42rem; margin-bottom: 2.5rem; }
.section-sub { color: var(--ink-soft); }

.section-cta { margin-top: 2.6rem; text-align: center; }
.note { font-size: .88rem; color: var(--ink-soft); margin-top: .9rem; }

/* Filtros */
.filters { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 2rem; }
.chip {
  padding: .55rem 1.15rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); color: var(--sage-800); cursor: pointer;
  font-family: var(--font-body); font-size: .88rem; letter-spacing: .02em;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.chip:hover { border-color: var(--sage-500); }
.chip.is-active { background: var(--sage-800); border-color: var(--sage-800); color: #fff; }

/* Tarjetas de servicio */
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem;
}
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.6rem; box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--sage-300); }
.card h3 { font-size: 1.18rem; margin-bottom: .45rem; }
.card p { font-size: .92rem; color: var(--ink-soft); margin: 0; }
.card[hidden] { display: none; }

/* Destacados */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.feature {
  background: var(--paper); border-radius: var(--radius); padding: 1.9rem 1.7rem;
  border-top: 3px solid var(--gold-500); box-shadow: var(--shadow-sm);
}
.feature-tag {
  display: inline-block; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-600); margin-bottom: .6rem;
}
.feature p { font-size: .95rem; color: var(--ink-soft); }
.feature-note { font-size: .82rem !important; color: var(--sage-700) !important; margin-bottom: 0 !important; }

/* Split (nosotras / ubicación) */
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split-reverse .split-copy { order: 2; }
.split-reverse .split-media { order: 1; }

.media-frame {
  position: relative; display: grid; place-items: center; padding: 2.5rem;
  background: linear-gradient(150deg, var(--sage-100), #fff);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.media-frame img { width: min(320px, 80%); }

.ticks { list-style: none; margin: 1.4rem 0 2rem; padding: 0; display: grid; gap: .7rem; }
.ticks li { position: relative; padding-left: 1.9rem; color: var(--ink-soft); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 1.1rem; height: .6rem;
  border-left: 2px solid var(--gold-500); border-bottom: 2px solid var(--gold-500);
  transform: rotate(-45deg);
}

.address { font-size: 1.08rem; line-height: 1.9; color: var(--ink-soft); }

.map-frame {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line); background: var(--paper);
}
.map-frame iframe { display: block; width: 100%; height: 380px; border: 0; }

/* FAQ */
.faq { display: grid; gap: .8rem; }
.faq details {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1.1rem 1.35rem; box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer; font-weight: 500; color: var(--sage-900); list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.4rem; line-height: 1; color: var(--gold-600); transition: transform .25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: .9rem 0 0; font-size: .95rem; color: var(--ink-soft); }

/* CTA final */
.cta-final {
  background: linear-gradient(140deg, var(--sage-800), var(--sage-900));
  color: #fff; padding: clamp(3.5rem, 7vw, 5.5rem) 0; text-align: center;
}
.cta-inner { max-width: 46rem; margin-inline: auto; }
.cta-final h2 { color: #fff; }
.cta-final p { color: rgba(255,255,255,.82); }

/* ---------------- Footer ---------------- */

.site-footer { background: var(--sage-900); color: rgba(255,255,255,.76); padding: 3.5rem 0 1.8rem; font-size: .93rem; }
.site-footer .brand { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2rem; }
.footer-tagline { margin-top: 1rem; max-width: 22rem; color: rgba(255,255,255,.6); }
.site-footer h3 { color: #fff; font-size: 1.05rem; font-family: var(--font-body); font-weight: 500; letter-spacing: .04em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.site-footer a { color: rgba(255,255,255,.76); }
.site-footer a:hover { color: var(--gold-400); }
.footer-bottom {
  margin-top: 2.8rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.14);
  display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between;
  font-size: .84rem; color: rgba(255,255,255,.55);
}
.footer-bottom p { margin: 0; }

/* ---------------- WhatsApp flotante ---------------- */

.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.25rem; border-radius: 999px;
  background: #25D366; color: #08331A; font-weight: 500; font-size: .95rem;
  box-shadow: 0 14px 30px rgba(37, 211, 102, .38);
  transition: transform .2s ease, box-shadow .25s ease;
}
.wa-float:hover { transform: translateY(-3px); color: #08331A; box-shadow: 0 18px 38px rgba(37, 211, 102, .46); }
.wa-float svg { width: 24px; height: 24px; fill: currentColor; }

/* ---------------- Animación de entrada ---------------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy .lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-card { width: min(300px, 70%); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .split-reverse { grid-template-columns: 1fr; }
  .split-reverse .split-copy, .split-reverse .split-media { order: initial; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem 1.6rem; box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .site-nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav ul li { border-bottom: 1px solid var(--line); }
  .site-nav ul a { display: block; padding: .95rem .2rem; font-size: 1rem; }
  .nav-cta { margin-top: 1.2rem; }
  .wa-float span { display: none; }
  .wa-float { padding: .95rem; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: 1.75rem; }
  .hero-card { width: min(200px, 52%); }
  .hero-inner { gap: 1.75rem; }
  .hero-actions { margin-top: 1.5rem; }
  .trust-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .nav-cta { width: auto; }
  .hero-actions .btn { width: 100%; }
  .map-frame iframe { height: 300px; }
}

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