/* =========================================================================
   Clafitness — estilos
   Mobile-first · temas claro/oscuro · WCAG AA · sin dependencias
   ========================================================================= */

@font-face {
  font-family: "Racing Sans One";
  src: url("/assets/fonts/racing-sans-one-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

/* ---------- Tokens ---------- */
:root {
  --font-display: "Racing Sans One", "Arial Narrow", Impact, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --bg: #fbfbfa;
  --surface: #ffffff;
  --surface-2: #f3f4f5;
  --text: #1b252f;
  --muted: #56606b;
  --border: #e3e6e9;
  --accent: #0a6699;          /* texto y enlaces: 6:1 sobre blanco */
  --accent-soft: #e1f3fe;
  --accent-soft-text: #0a5a87;
  --brand-blue: #2b69b1;
  --highlight: #ffde01;
  --cta-bg: #1b252f;
  --cta-text: #ffffff;
  --cta-hover: #2c3a48;
  --danger: #b42318;
  --danger-soft: #fdebec;
  --success: #2f6b3a;
  --success-soft: #edf3ec;
  --focus: #0a6699;
  --shadow-hover: 0 2px 10px rgb(27 37 47 / 0.05);

  --radius: 12px;
  --radius-sm: 6px;
  --container: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(64px, 10vw, 128px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f151b;
    --surface: #151e27;
    --surface-2: #1b2631;
    --text: #ecf1f5;
    --muted: #a2aeb9;
    --border: #26323e;
    --accent: #38b6ff;
    --accent-soft: rgb(56 182 255 / 0.12);
    --accent-soft-text: #8dd3ff;
    --cta-bg: #38b6ff;
    --cta-text: #0b1218;
    --cta-hover: #6ac8ff;
    --danger: #ff8a80;
    --danger-soft: rgb(255 138 128 / 0.12);
    --success: #8fd19e;
    --success-soft: rgb(143 209 158 / 0.12);
    --focus: #38b6ff;
    --shadow-hover: 0 2px 12px rgb(0 0 0 / 0.25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f151b;
  --surface: #151e27;
  --surface-2: #1b2631;
  --text: #ecf1f5;
  --muted: #a2aeb9;
  --border: #26323e;
  --accent: #38b6ff;
  --accent-soft: rgb(56 182 255 / 0.12);
  --accent-soft-text: #8dd3ff;
  --cta-bg: #38b6ff;
  --cta-text: #0b1218;
  --cta-hover: #6ac8ff;
  --danger: #ff8a80;
  --danger-soft: rgb(255 138 128 / 0.12);
  --success: #8fd19e;
  --success-soft: rgb(143 209 158 / 0.12);
  --focus: #38b6ff;
  --shadow-hover: 0 2px 12px rgb(0 0 0 / 0.25);
  color-scheme: dark;
}

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

/* El atributo hidden siempre gana sobre cualquier display de un componente. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

h1, h2, h3, h4 { margin: 0; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

::selection { background: var(--highlight); color: #1b252f; }

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

.skip-link {
  position: absolute;
  left: 16px; top: -48px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--cta-bg);
  color: var(--cta-text);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.muted { color: var(--muted); }

.icon {
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- Tipografía ---------- */
.display, h1, .h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

h1 { font-size: clamp(2.6rem, 9vw, 5.25rem); }
h2, .h2 { font-size: clamp(2rem, 5.5vw, 3.25rem); }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead {
  max-width: 60ch;
  color: var(--muted);
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
}

.mark {
  background: linear-gradient(transparent 62%, color-mix(in srgb, var(--highlight) 70%, transparent) 62%);
  padding-inline: 2px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 0.9375rem; }

.btn-primary { background: var(--cta-bg); color: var(--cta-text); }
.btn-primary:hover { background: var(--cta-hover); }

.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--text); }

.btn[disabled], .btn[aria-busy="true"] { opacity: 0.6; cursor: progress; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
}
.brand img { width: 40px; height: auto; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  line-height: 1;
}
.brand-name strong { font-weight: 400; color: var(--brand-blue); }
:root[data-theme="dark"] .brand-name strong { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-name strong { color: var(--accent); } }

.nav-toggle, .theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.nav-toggle:hover, .theme-toggle:hover { border-color: var(--text); }

.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.site-nav { order: 3; }

.nav-list {
  position: absolute;
  inset: 68px 0 auto 0;
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px var(--gutter) 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  list-style: none;
}
.nav-list.is-open { display: flex; animation: menu-in 0.25s var(--ease); }
.nav-list a:not(.btn) {
  display: block;
  padding: 12px 4px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.nav-list a[aria-current="page"]:not(.btn) { color: var(--accent); }
.nav-cta { margin-top: 12px; }
.nav-cta .btn { width: 100%; }

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 900px) {
  .site-nav { order: 0; }
  .nav-toggle { display: none; }
  .nav-list {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: none;
    border: 0;
  }
  .nav-list a:not(.btn) {
    padding: 8px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    font-weight: 550;
    transition: color 0.2s ease;
  }
  .nav-list a:not(.btn):hover { color: var(--accent); }
  .nav-list a[aria-current="page"]:not(.btn) { color: var(--accent); }
  .nav-cta { margin: 0 0 0 8px; }
  .nav-cta .btn { width: auto; }
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--section); }
.section-alt { background: var(--surface-2); }
.section + .section:not(.section-alt) { padding-top: 0; }
.section-alt + .section { padding-top: var(--section); }

.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { margin-top: 16px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 96px) var(--section); }

.hero-grid {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero h1 { margin-bottom: 20px; }
.hero h1 .accent { color: var(--accent); }

.hero-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.hero-badge {
  position: absolute;
  left: 16px; bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.3;
}
.hero-badge strong { display: block; font-size: 0.9375rem; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  list-style: none;
  color: var(--muted);
  font-size: 0.9375rem;
}
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts .icon { width: 18px; height: 18px; color: var(--accent); }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}

/* ---------- Tarjetas y grillas ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(24px, 3.5vw, 36px);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
}
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover, .card.is-interactive:hover { box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--text) 25%, var(--border)); }

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

/* Método / premios */
.split {
  display: grid;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.reverse > :first-child { order: 2; }
}
.split-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-media.cutout { background: radial-gradient(circle at 50% 60%, var(--accent-soft), transparent 70%), var(--surface-2); padding: 24px 24px 0; }
.split-media.cutout img { object-fit: contain; }

blockquote.pull {
  margin: 24px 0 0;
  padding-left: 20px;
  border-left: 3px solid var(--highlight);
  color: var(--muted);
  font-size: 1.125rem;
}

/* Clases (IndoorHome / IndoorGym) */
.class-card { padding: 0; overflow: hidden; }
.class-card .class-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.class-card .class-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.class-card:hover .class-media img { transform: scale(1.03); }
.class-card .class-body { padding: 24px 28px 28px; }
.class-card h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.75rem; text-transform: uppercase; letter-spacing: 0.02em; }
.class-card p { margin-top: 8px; color: var(--muted); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; color: var(--accent); font-weight: 650; }
.link-arrow .icon { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
a:hover .link-arrow .icon, .link-arrow:hover .icon { transform: translateX(3px); }

/* Planes */
.plans { align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan-name { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.plan-duration { margin-top: 4px; color: var(--muted); font-size: 0.9375rem; }
.plan-price {
  margin: 18px 0 6px;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 2.75rem);
  line-height: 1;
}
.plan-price small { font-family: var(--font-body); font-size: 0.9375rem; color: var(--muted); }
.plan-features { flex: 1; margin: 20px 0 28px; list-style: none; display: grid; gap: 10px; }
.plan-features li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 0.975rem; }
.plan-features .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--accent); }
.plan-features .plus { font-weight: 650; }
.plan .btn { width: 100%; }
.plan-featured { border-color: var(--text); }
.plan-tag {
  align-self: flex-start;
  margin-bottom: 14px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: var(--accent-soft);
  color: var(--accent-soft-text);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.plans-note { margin-top: 24px; color: var(--muted); font-size: 0.9375rem; text-align: center; }

/* Banda "Ve más allá de tus límites" */
.band {
  display: grid;
  gap: 32px;
  align-items: end;
  overflow: hidden;
  border-radius: var(--radius);
  background: #1b252f;
  color: #ecf1f5;
  padding: clamp(32px, 5vw, 56px) clamp(24px, 5vw, 56px) 0;
}
.band .eyebrow { color: #8dd3ff; }
.band p { color: #c3ccd4; margin-top: 16px; max-width: 46ch; }
.band .btn-primary { background: #38b6ff; color: #0b1218; }
.band .btn-primary:hover { background: #6ac8ff; }
.band-copy { padding-bottom: clamp(32px, 5vw, 56px); }
.band-media img { width: min(100%, 340px); margin-inline: auto; filter: grayscale(1) contrast(1.05); }
@media (min-width: 800px) { .band { grid-template-columns: 1.2fr 0.8fr; } }

/* Testimonios */
.testimonial { display: flex; flex-direction: column; gap: 20px; }
.testimonial blockquote { margin: 0; font-size: 1rem; }
.testimonial blockquote::before { content: "\201C"; display: block; height: 28px; font-family: Georgia, serif; font-size: 3rem; line-height: 1; color: var(--accent); }
.testimonial figcaption { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }
.avatar {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-soft-text);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.testimonial cite { font-style: normal; font-weight: 650; display: block; }
.testimonial .role { color: var(--muted); font-size: 0.875rem; }

.read-more {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.clamp.is-expanded { -webkit-line-clamp: unset; display: block; }

/* Pilares del método */
.pillar .pillar-icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 20px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-soft-text);
}
.pillar p { margin-top: 10px; color: var(--muted); }

.mantra {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6vw, 3.5rem);
  text-transform: uppercase;
  line-height: 1.1;
}
.mantra span:nth-child(even) { color: var(--accent); }

/* Llamado final */
.cta-final { text-align: center; }
.cta-final .btn-row { justify-content: center; }

/* Página interior: encabezado */
.page-hero { padding-block: clamp(40px, 7vw, 88px) clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--border); }
.page-hero .lead { margin-top: 16px; }

/* Sobre mí */
.about-photo {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: radial-gradient(circle at 50% 65%, var(--accent-soft), transparent 70%), var(--surface-2);
  padding: 32px 32px 0;
  overflow: hidden;
}
.about-photo img { margin-inline: auto; filter: grayscale(1); }
.about-copy p + p { margin-top: 16px; }
.about-copy .role { margin: 6px 0 24px; font-family: var(--font-display); font-size: 1.5rem; text-transform: uppercase; color: var(--accent); }
.checklist { margin-top: 28px; list-style: none; display: grid; gap: 12px; }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; }
.checklist .icon { color: var(--accent); margin-top: 2px; }

/* ---------- Formularios ---------- */
.form-layout {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (min-width: 960px) { .form-layout { grid-template-columns: 1fr 340px; } }

.form-aside { display: grid; gap: 16px; }
@media (min-width: 960px) { .form-aside { position: sticky; top: 96px; } }

.form { display: grid; gap: 28px; }
.fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 20px; }
.fieldset legend {
  float: left;
  width: 100%;
  margin-bottom: 4px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 1.0625rem;
}
.fieldset legend + * { clear: both; }
.form-row { display: grid; gap: 20px; }
@media (min-width: 640px) { .form-row.cols-2 { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: 8px; }
.field > label, .group-label { font-weight: 600; font-size: 0.975rem; }
.req { color: var(--danger); margin-left: 2px; }
.hint { color: var(--muted); font-size: 0.875rem; }

.input, .textarea, .select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem; /* evita el zoom automático en iOS */
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.textarea { min-height: 120px; resize: vertical; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.input:hover, .textarea:hover, .select:hover { border-color: color-mix(in srgb, var(--text) 35%, var(--border)); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent);
}
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }

.field.has-error .input, .field.has-error .textarea, .field.has-error .select { border-color: var(--danger); }
.error-text { display: none; color: var(--danger); font-size: 0.875rem; font-weight: 600; }
.field.has-error .error-text, .choice-group.has-error .error-text { display: block; }

/* Opciones tipo tarjeta (radio) */
.choice-group { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.choice-group legend { padding: 0; margin-bottom: 10px; font-weight: 600; font-size: 0.975rem; }
.choices { display: grid; gap: 10px; }
@media (min-width: 640px) { .choices.cols-2 { grid-template-columns: 1fr 1fr; } }
.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.choice:hover { border-color: color-mix(in srgb, var(--text) 35%, var(--border)); }
.choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Escala 1–10 */
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
@media (min-width: 560px) { .scale { grid-template-columns: repeat(10, 1fr); } }
.scale label {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.scale input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.scale label:hover { border-color: color-mix(in srgb, var(--text) 35%, var(--border)); }
.scale label:has(input:checked) { background: var(--cta-bg); border-color: var(--cta-bg); color: var(--cta-text); }
.scale label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.scale-legend { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.8125rem; }

.consent { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; font-size: 0.9375rem; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status {
  display: none;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.form-status.is-error { display: block; background: var(--danger-soft); color: var(--danger); }
.form-status.is-success { display: block; background: var(--success-soft); color: var(--success); }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form-actions .hint { flex: 1 1 220px; }

.contact-card { display: grid; gap: 6px; }
.contact-card h2 { font-family: var(--font-body); text-transform: none; font-size: 1.0625rem; font-weight: 700; }
.contact-card .btn { margin-top: 10px; }

/* Página de gracias */
.thanks { max-width: 640px; margin-inline: auto; text-align: center; }
.thanks .check {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
}
.thanks .check .icon { width: 32px; height: 32px; }

/* Texto legal */
.prose { max-width: 70ch; }
.prose h2 { font-family: var(--font-body); text-transform: none; font-size: 1.25rem; font-weight: 700; margin: 40px 0 12px; }
.prose p, .prose ul { margin-top: 12px; color: var(--muted); }
.prose ul { padding-left: 20px; }

/* ---------- Pie ---------- */
.site-footer {
  margin-top: 0;
  padding-top: clamp(48px, 7vw, 72px);
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-grid { display: grid; gap: 36px; padding-bottom: 40px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer-brand p { margin-top: 14px; max-width: 34ch; font-size: 0.9375rem; }
.footer-title { margin-bottom: 14px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.footer-list { list-style: none; display: grid; gap: 10px; }
.footer-list a { color: var(--text); text-decoration: none; }
.footer-list a:hover { color: var(--accent); text-decoration: underline; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 20px 96px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}
.footer-bottom a { color: var(--muted); }
.designed-by { display: inline-flex; align-items: center; gap: 10px; }
.ag-logo { width: 47px; height: auto; filter: invert(1); opacity: 0.85; }
:root[data-theme="dark"] .ag-logo { filter: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ag-logo { filter: none; } }
@media (min-width: 760px) { .footer-bottom { padding-bottom: 24px; } }

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 18px 0 16px;
  border-radius: 9999px;
  background: #1f8f4e;           /* verde con contraste AA para texto blanco */
  color: #ffffff;
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.18);
  transition: transform 0.2s var(--ease), background-color 0.2s ease;
}
.wa-float:hover { background: #187a42; transform: translateY(-2px); }
.wa-float .icon { width: 24px; height: 24px; }
@media (max-width: 480px) { .wa-float-label { display: none; } .wa-float { padding: 0; width: 52px; justify-content: center; } }

/* ---------- Movimiento ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); animation: reveal-fallback 0.01s 3s forwards; }
@keyframes reveal-fallback { to { opacity: 1; transform: none; } }
.js .reveal.is-visible { opacity: 1; transform: none; }

@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; transition-delay: 0s !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Impresión ---------- */
@media print {
  .site-header, .wa-float, .site-footer, .btn-row { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- Utilidades (la CSP no permite atributos style en el HTML) ---------- */
.d1 { --i: 1; }
.d2 { --i: 2; }
.d3 { --i: 3; }
.mt-16 { margin-top: 16px; }
.pt-section { padding-top: var(--section) !important; }
.lead.centered { margin: 16px auto 0; }
.center-text { display: block; text-align: center; }

.plan-price small { white-space: nowrap; }
figure { margin: 0; }
.page-hero + .section { padding-top: clamp(32px, 5vw, 56px) !important; }
