:root {
  --bosque: #1e5b4a;
  --bosque-hondo: #123c31;
  --bosque-claro: #256b57;
  --castano: #9a4f2a;
  --destello: #d9ae3e;
  --crin: #f4f1ea;
  --ink: #17231f;
  --text: #33423d;
  --muted: #56655f;
  --bg: #f4f1ea;
  --bg-alt: #ebe7dc;
  --surface: #ffffff;
  --line: #d9d4c5;
  --gold-ink: #7a5c0e;
  --radius: 16px;
  --shadow: 0 28px 50px -24px rgba(18, 60, 49, 0.55);
  --f-display: 'Alegreya', 'Iowan Old Style', Georgia, serif;
  --f-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

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

h1,
h2,
h3 {
  font-family: var(--f-display);
  color: var(--ink);
  line-height: 1.12;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h2 {
  font-weight: 800;
}

h3 {
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--bosque);
}

:focus-visible {
  outline: 3px solid var(--destello);
  outline-offset: 3px;
}

.site-header :focus-visible,
.hero :focus-visible,
.final-cta :focus-visible,
.trust :focus-visible {
  outline-color: var(--destello);
}

main :focus-visible {
  outline-color: var(--bosque);
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}

.container.narrow {
  max-width: 780px;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  background: var(--destello);
  color: var(--bosque-hondo);
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}

.skip-link:focus {
  top: 8px;
}

/* Medallón: variante invertida sobre verde */
.inv {
  --md-disc: #f4f1ea;
  --md-horse: #1e5b4a;
  --md-ear: #123c31;
  --md-mane: #9a4f2a;
  --md-eye: #f4f1ea;
  --md-blaze: #d9ae3e;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  transition:
    background 0.15s,
    transform 0.15s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-lg {
  padding: 14px 26px;
  font-size: 1.05rem;
}

@media (min-width: 720px) {
  .btn-lg {
    white-space: nowrap;
  }
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.95rem;
}

.btn-gold {
  background: var(--destello);
  color: var(--bosque-hondo);
  box-shadow: 0 10px 24px -10px rgba(217, 174, 62, 0.8);
}

.btn-gold:hover {
  background: #e6bf55;
}

.btn-ghost {
  border-color: rgba(244, 241, 234, 0.6);
  color: var(--crin);
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(244, 241, 234, 0.12);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 60, 49, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(244, 241, 234, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  flex: none;
}

.wordmark {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--crin);
  letter-spacing: -0.01em;
}

.wordmark span {
  font-family: var(--f-body);
  font-weight: 600;
  color: var(--destello);
  letter-spacing: 0;
  margin-left: 0.04em;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--crin);
  border-radius: 2px;
}

.nav {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px 20px;
  background: var(--bosque-hondo);
  border-bottom: 1px solid rgba(244, 241, 234, 0.12);
}

.nav.open {
  display: flex;
}

.nav a:not(.btn) {
  color: var(--crin);
  text-decoration: none;
  font-weight: 500;
  padding: 10px 4px;
}

.nav a:not(.btn):hover {
  color: var(--destello);
}

/* Hero */
.hero {
  position: relative;
  padding: 40px 0 120px;
  background:
    radial-gradient(900px 420px at 85% 10%, rgba(37, 107, 87, 0.7), transparent 70%),
    var(--bosque-hondo);
  color: var(--crin);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 40px;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  color: var(--destello);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  margin-bottom: 0.8em;
}

.hero h1 {
  color: var(--crin);
  font-weight: 800;
  font-size: 3.1rem;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.45em;
}

.h1-line {
  display: block;
  color: var(--destello);
  font-style: italic;
  font-weight: 500;
}

.star {
  display: inline-block;
  vertical-align: top;
  margin-left: 6px;
  fill: var(--destello);
  transform-origin: center;
  animation: twinkle 3.6s ease-in-out 1.2s 2;
}

@keyframes twinkle {
  0%,
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
  45% {
    transform: scale(1.5) rotate(45deg);
    opacity: 0.85;
  }
}

.lead {
  font-size: 1.15rem;
  color: #dfe8e3;
  max-width: 34em;
}

.cta-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 28px 0;
}

.cta-row.center {
  align-items: center;
}

.hero-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  color: #dfe8e3;
  font-size: 0.95rem;
}

.hero-points li::before {
  content: '✦ ';
  color: var(--destello);
}

.hero-visual {
  position: relative;
  min-width: 0;
}

.hero-medallion {
  position: absolute;
  z-index: 2;
  top: -44px;
  left: -10px;
  width: 92px;
  height: 92px;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.35));
}

.hills {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 90px;
  display: block;
}

/* Marcos */
.browser-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero .browser-frame {
  border-color: rgba(244, 241, 234, 0.2);
  transform: rotate(-1deg);
}

.browser-bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  background: #e8efec;
  border-bottom: 1px solid var(--line);
}

.browser-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b9c8c1;
}

.browser-bar i:first-child {
  background: var(--destello);
}

.browser-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #e3eee9;
}

.phone-frame {
  background: var(--bosque-hondo);
  padding: 8px;
  border-radius: 30px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 220px;
}

.phone-frame img {
  border-radius: 22px;
  width: 100%;
  background: #e3eee9;
}

/* Secciones */
section {
  padding: 56px 0;
}

.hero {
  padding: 40px 0 120px;
}

.section-title {
  font-size: 2rem;
  text-align: center;
  letter-spacing: -0.01em;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 32px;
}

.section-title.left,
.section-sub.left {
  text-align: left;
  margin-left: 0;
}

/* Por qué Epona */
.story {
  padding: 24px 0 8px;
}

.story-inner {
  display: grid;
  gap: 20px;
  max-width: 860px;
  align-items: start;
}

.story-mark {
  --md-disc: #1e5b4a;
  --md-horse: #f4f1ea;
  --md-ear: #d8d2c4;
  --md-mane: #d9ae3e;
  --md-eye: #1e5b4a;
  --md-blaze: #d9ae3e;
  width: 84px;
  height: 84px;
}

.story h2 {
  font-size: 2rem;
  font-style: italic;
  font-weight: 500;
  color: var(--castano);
}

.story p {
  font-size: 1.12rem;
  margin-bottom: 0.7em;
}

/* Dolores */
.pains {
  background: transparent;
}

.pain-grid {
  list-style: none;
  padding: 0;
  margin: 28px 0;
  display: grid;
  gap: 16px;
}

.pain-grid li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--castano);
  border-radius: var(--radius);
  padding: 20px;
}

.pain-grid h3 {
  font-size: 1.2rem;
  margin: 8px 0 4px;
}

.pain-grid p {
  margin: 0;
  color: var(--muted);
}

.pain-icon {
  font-size: 1.6rem;
}

.pain-answer {
  text-align: center;
  font-family: var(--f-display);
  font-size: 1.7rem;
  color: var(--ink);
  margin: 0;
}

.pain-answer strong {
  color: var(--bosque);
}

/* Funciones */
.features {
  background: var(--surface);
}

.feature-row {
  display: grid;
  gap: 24px;
  align-items: center;
  margin-top: 56px;
}

.feature-media {
  margin: 0;
  min-width: 0;
}

.feature-text {
  min-width: 0;
}

.feature-text h3 {
  font-size: 1.8rem;
}

.group-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.group-clinica {
  background: #dcebe5;
  color: var(--bosque-hondo);
}

.group-comercial {
  background: #f1e1d6;
  color: #7a3a1c;
}

.group-gestion {
  background: #f6ebc8;
  color: #6b4f08;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
}

.check-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 6px;
  width: 16px;
  height: 16px;
  background: var(--destello);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.badge {
  display: inline-block;
  background: #f6ebc8;
  color: #6b4f08;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Confianza */
.trust {
  background: var(--bosque);
  padding: 44px 0;
  text-align: center;
}

.trust-star {
  fill: var(--destello);
  margin: 0 auto 8px;
}

.trust h2,
.trust p {
  color: var(--crin);
}

.trust h2 {
  font-size: 1.9rem;
}

.trust p {
  max-width: 640px;
  margin: 0 auto;
}

/* Móvil */
.mobile {
  background: var(--bg);
}

.mobile-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.phones {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.phones .phone-frame:nth-child(2) {
  margin-top: 36px;
}

/* Pasos */
.steps {
  background: var(--bg-alt);
}

.step-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.step-grid li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--surface);
}

.step-grid h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.step-grid p {
  margin: 0;
  color: var(--muted);
}

.step-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bosque);
  color: var(--destello);
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 10px;
}

/* FAQ */
details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 18px;
  margin-bottom: 12px;
  background: var(--surface);
}

details[open] {
  border-color: var(--bosque);
}

summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  padding: 16px 0;
  list-style-position: outside;
}

details p {
  margin: 0 0 16px;
}

/* CTA final */
.final-cta {
  position: relative;
  background:
    radial-gradient(700px 320px at 15% 100%, rgba(37, 107, 87, 0.7), transparent 70%),
    var(--bosque-hondo);
  text-align: center;
  padding: 130px 0 80px;
}

.hills-top {
  top: -1px;
  bottom: auto;
}

.cta-mark {
  margin: 0 auto 16px;
}

.final-cta h2,
.final-cta p {
  color: var(--crin);
}

.final-cta h2 {
  font-size: 2.3rem;
  font-weight: 800;
}

.final-cta p {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.final-cta a:not(.btn) {
  color: var(--destello);
  font-weight: 600;
}

.contact-email {
  margin-top: 8px;
}

/* Footer */
.site-footer {
  padding: 32px 0;
  background: #0d2c24;
  color: #b9cfc6;
}

.site-footer .wordmark {
  font-size: 1.5rem;
}

.footer-inner p {
  margin: 8px 0 0;
}

.site-footer a:not(.logo) {
  color: var(--destello);
}

.footer-inner .copy {
  font-size: 0.9rem;
}

/* WhatsApp flotante */
.wa-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0f7a6d;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

[hidden] {
  display: none !important;
}

@media (min-width: 720px) {
  .cta-row {
    flex-direction: row;
  }

  .cta-row.center {
    justify-content: center;
  }

  .pain-grid,
  .step-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: 4.2rem;
  }

  .story-inner {
    grid-template-columns: auto 1fr;
    gap: 32px;
  }

  .story-mark {
    width: 110px;
    height: 110px;
  }
}

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

  .nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 24px;
    padding: 0;
    border: 0;
    background: none;
  }

  .nav a:not(.btn) {
    padding: 0;
  }

  .hero {
    padding: 72px 0 150px;
  }

  .hills {
    height: 120px;
  }

  .hero-grid {
    grid-template-columns: 1fr 1.15fr;
    align-items: center;
    gap: 48px;
  }

  .hero h1 {
    font-size: 5.2rem;
  }

  .hero-medallion {
    width: 128px;
    height: 128px;
    top: -70px;
    left: -50px;
  }

  section {
    padding: 88px 0;
  }

  .hero {
    padding: 72px 0 150px;
  }

  .story {
    padding: 40px 0 16px;
  }

  .final-cta {
    padding: 170px 0 96px;
  }

  .pain-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .pain-grid li {
    grid-column: span 2;
  }

  .pain-grid li:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .pain-grid li:nth-child(5) {
    grid-column: 4 / span 2;
  }

  .feature-row {
    grid-template-columns: 1fr 1.25fr;
    gap: 56px;
    margin-top: 88px;
  }

  .feature-row.reverse .feature-media {
    order: -1;
  }

  .feature-row.reverse {
    grid-template-columns: 1.25fr 1fr;
  }

  .mobile-grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }

  .phone-frame {
    max-width: 260px;
  }

  .step-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
  }

  .footer-inner p {
    margin: 0;
  }

  .footer-inner .copy {
    margin-left: auto;
  }

  .wa-float {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }

  .star {
    animation: none;
  }
}
