/* Club Maniacs · Puebla de la Calzada
   Paleta tomada del logo. Tipografía: Fraunces (titulares, eco de la serifa del logo) + Manrope (texto). */

:root {
  --navy: #16224e;
  --navy-ink: #0e1830;
  --green: #5fb73f;
  --green-ink: #3b7a25;      /* verde para texto sobre claro: 5,2:1 */
  --purple: #5a2290;
  --paper: #f7f8fb;
  --white: #ffffff;
  --well: #f1f1f1;           /* mismo gris que el fondo de las fotos de producto */
  --line: #e3e6ee;
  --text: #232a3d;
  --muted: #555c75;          /* 6,2:1 sobre --paper */
  --on-navy: #c9d0ec;        /* 10:1 sobre --navy */

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --header-h: 72px;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --step-3: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --step-4: clamp(2.5rem, 1.6rem + 3.8vw, 4.25rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-padding-top: calc(var(--header-h) + 64px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--green); color: var(--navy-ink); }

h1, h2, h3 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  color: var(--navy);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); letter-spacing: -0.025em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.25; }

p { margin: 0; text-wrap: pretty; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

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

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--white);
  padding: 12px 18px; border-radius: var(--radius-s); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }

.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;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 26px;
  font: 700 1rem/1.2 "Manrope", system-ui, sans-serif;
  border-radius: var(--radius-pill); border: 2px solid transparent;
  text-decoration: none; text-align: center; cursor: pointer; user-select: none;
  touch-action: manipulation;
  transition: transform 140ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 20px; height: 20px; flex: none; }

.btn-solid { background: var(--green); color: var(--navy-ink); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ink   { background: var(--navy); color: var(--white); }
.btn-block { width: 100%; }

@media (hover: hover) and (pointer: fine) {
  .btn-solid:hover { background: #6cc84a; }
  .btn-ghost:hover { background: var(--navy); color: var(--white); }
  .btn-ink:hover   { background: var(--navy-ink); }
}

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: var(--header-h);
}
.brand { display: block; flex: none; }
.brand img { width: auto; height: 46px; }

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a {
  position: relative; padding: 8px 0;
  font-weight: 600; font-size: 0.97rem; color: var(--muted); text-decoration: none;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  background: var(--green); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform 200ms var(--ease-out);
}
.main-nav a[aria-current="page"] { color: var(--navy); }
.main-nav a[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .main-nav a:hover { color: var(--navy); }
  .main-nav a:hover::after { transform: scaleX(1); }
}
.header-cta { flex: none; }

.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0;
  background: transparent; border: 1.5px solid var(--line); border-radius: 12px;
  color: var(--navy); cursor: pointer; touch-action: manipulation;
  transition: transform 140ms var(--ease-out);
}
.nav-toggle:active { transform: scale(0.94); }
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .brand img { height: 38px; }
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 24px 20px;
    background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -18px rgba(14, 24, 48, 0.25);
    opacity: 0; transform: translateY(-6px); visibility: hidden;
    transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s linear 220ms;
  }
  .main-nav[data-open="true"] {
    opacity: 1; transform: none; visibility: visible;
    transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s;
  }
  .main-nav a { padding: 14px 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
  .main-nav a::after { display: none; }
  .main-nav a[aria-current="page"] { color: var(--green-ink); }
  .main-nav .btn { margin-top: 16px; border-bottom: 0; }
}
.main-nav .nav-cta-mobile { display: none; }
.main-nav a.btn { color: var(--navy-ink); padding: 12px 26px; font-size: 1rem; border-bottom: 0; }
.main-nav a.btn::after { display: none; }
@media (max-width: 900px) { .main-nav .nav-cta-mobile { display: inline-flex; } }

/* ---------- Bloques generales ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-tight { padding-block: clamp(40px, 6vw, 72px); }
.lead { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem); color: var(--muted); max-width: 60ch; }
.page-intro { padding-block: clamp(48px, 7vw, 88px) clamp(24px, 4vw, 40px); }
.page-intro h1 { max-width: 16ch; }
.page-intro .lead { margin-top: 18px; }

/* ---------- Inicio: hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px);
  align-items: center; padding-block: clamp(40px, 6vw, 88px);
}
.hero h1 { max-width: 13ch; }
.hero .lead { margin-top: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-place { margin-top: 26px; font-size: var(--step--1); color: var(--muted); }
.hero-media { position: relative; }
.hero-media img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 40%;
  border-radius: 28px;
  box-shadow: 0 30px 60px -30px rgba(14, 24, 48, 0.45);
}
.hero-media::before {
  content: ""; position: absolute; inset: auto -14px -14px auto; width: 46%; height: 46%;
  border: 3px solid var(--purple); border-radius: 28px; z-index: -1;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-media img { animation: heroIn 700ms var(--ease-out) both; }
  @keyframes heroIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } }
}

/* Valores del club: una fila de frases, sin tarjetas */
.values {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(40px, 6vw, 64px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.value h3 { display: flex; align-items: center; gap: 12px; }
.value h3::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--dot, var(--green)); flex: none; }
.value:nth-child(2) { --dot: var(--purple); }
.value:nth-child(3) { --dot: var(--navy); }
.value p { margin-top: 10px; color: var(--muted); max-width: 34ch; }

/* Instalaciones */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; }
.split h2 { max-width: 14ch; }
.split p { margin-top: 18px; color: var(--muted); max-width: 52ch; }

/* Destacados de la tienda en inicio */
.shop-teaser-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.shop-teaser-head p { margin-top: 12px; color: var(--muted); max-width: 48ch; }

/* Torneo */
.event {
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
  background: var(--navy); color: var(--on-navy);
  border-radius: 28px; padding: clamp(32px, 5vw, 56px);
}
.event h2 { color: var(--white); }
.event .event-name { font-weight: 700; color: var(--green); margin-bottom: 10px; }
.event p:last-child { margin-top: 14px; max-width: 56ch; }

/* CTA final */
.cta-final { text-align: center; }
.cta-final h2 { margin-inline: auto; }
.cta-final p { margin: 14px auto 30px; color: var(--muted); }

/* ---------- Clases ---------- */
.classes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.class-item {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 30px 28px; display: flex; flex-direction: column;
}
.class-item .level { font-weight: 700; color: var(--green-ink); font-size: var(--step--1); }
.class-item h3 { margin-top: 6px; }
.class-item p { margin-top: 12px; color: var(--muted); }
.class-item dl { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 0.95rem; }
.class-item dt { font-weight: 700; color: var(--navy); display: inline; }
.class-item dd { margin: 0; display: inline; color: var(--muted); }
.class-item .row { display: block; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: var(--white); font-weight: 800; margin-bottom: 16px;
}
.steps p { margin-top: 8px; color: var(--muted); }

/* ---------- Tienda ---------- */
.shop-notes { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 22px; font-size: 0.95rem; color: var(--muted); }
.shop-notes span { display: inline-flex; align-items: center; gap: 8px; }
.shop-notes svg { width: 18px; height: 18px; color: var(--green-ink); flex: none; }

.family-nav {
  position: sticky; top: var(--header-h); z-index: 40;
  background: rgba(247, 248, 251, 0.94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.family-nav ul {
  list-style: none; margin: 0; padding: 12px 0; display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.family-nav ul::-webkit-scrollbar { display: none; }
.family-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; white-space: nowrap;
  border-radius: var(--radius-pill); border: 1.5px solid var(--line); background: var(--white);
  font-weight: 600; font-size: 0.93rem; color: var(--navy); text-decoration: none;
  touch-action: manipulation; transition: border-color 160ms ease, background-color 160ms ease, transform 140ms var(--ease-out);
}
.family-nav a:active { transform: scale(0.97); }
.family-nav a[aria-current="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
@media (hover: hover) and (pointer: fine) { .family-nav a:hover { border-color: var(--navy); } }

.family { padding-top: clamp(48px, 6vw, 72px); }
.family > header { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.family > header p { color: var(--muted); }
.family-group + .family-group { margin-top: 40px; }
.family-group h3 { font-family: "Manrope", system-ui, sans-serif; font-size: 1rem; font-weight: 800; color: var(--muted); margin-bottom: 16px; letter-spacing: 0; }

.products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.products-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .products-4 { grid-template-columns: repeat(2, 1fr); } }
.product {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden;
}
.product-media { background: var(--well); aspect-ratio: 3 / 4; overflow: hidden; }
.product-media img, .product-media svg { width: 100%; height: 100%; object-fit: contain; }
.product-media img { transition: transform 420ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .product:hover .product-media img { transform: scale(1.035); }
}
.product-body { display: flex; flex-direction: column; flex: 1; padding: 18px 18px 20px; }
.product-brand { font-size: var(--step--1); font-weight: 700; color: var(--purple); }
.product h4 { margin: 2px 0 0; font: 700 1.08rem/1.3 "Manrope", system-ui, sans-serif; color: var(--navy); }
.product-spec { margin-top: 8px; font-size: 0.92rem; color: var(--muted); }
.product-price { margin-top: auto; padding-top: 16px; display: flex; align-items: baseline; gap: 8px; }
.product-price .label { font-size: var(--step--1); font-weight: 700; color: var(--muted); }
.product-price .amount { font: 600 1.6rem/1 "Fraunces", Georgia, serif; color: var(--navy); font-variant-numeric: tabular-nums lining-nums; }
.product .btn { margin-top: 14px; min-height: 44px; padding: 10px 16px; font-size: 0.93rem; }

.shop-foot { margin-top: clamp(48px, 6vw, 72px); padding: 28px; border-radius: var(--radius-m); background: var(--white); border: 1px solid var(--line); color: var(--muted); }
.shop-foot p + p { margin-top: 10px; }
.shop-foot strong { color: var(--navy); }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 20px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list svg { width: 24px; height: 24px; flex: none; margin-top: 2px; }
.contact-list .k { font-size: var(--step--1); font-weight: 700; color: var(--muted); }
.contact-list .v { font-weight: 700; color: var(--navy); }
.contact-list a.v { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .contact-list a.v:hover { text-decoration: underline; } }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); padding: clamp(24px, 4vw, 36px); }
.panel .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.map-panel {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; min-height: 320px;
  border-radius: var(--radius-m); overflow: hidden; position: relative; color: var(--white);
  padding: clamp(24px, 4vw, 36px);
  background: linear-gradient(180deg, rgba(14,24,48,0) 30%, rgba(14,24,48,0.85) 100%), url("../assets/img/club-pistas-720.webp") center / cover;
}
.map-panel h3 { color: var(--white); }
.map-panel p { color: #e4e8f6; }
.map-panel .btn { align-self: flex-start; }

.form { display: grid; gap: 18px; margin-top: 22px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 0.95rem; color: var(--navy); }
.field input, .field textarea {
  width: 100%; font: 500 16px/1.5 "Manrope", system-ui, sans-serif; color: var(--text);
  padding: 13px 15px; border: 1.5px solid #cdd2df; border-radius: 12px; background: var(--white);
  caret-color: var(--green-ink); transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field input::placeholder, .field textarea::placeholder { color: #6b7189; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(95, 183, 63, 0.35); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.field .error { font-size: 0.9rem; font-weight: 600; color: #b3261e; }
.field .error:empty { display: none; }
.form .btn { justify-self: start; }
@media (max-width: 520px) { .form .btn { justify-self: stretch; } }
.form-note { font-size: 0.9rem; color: var(--muted); }

/* ---------- Pie ---------- */
.site-footer { background: var(--navy); color: var(--on-navy); margin-top: clamp(56px, 8vw, 96px); padding-block: 56px 28px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.footer-logo { display: inline-block; background: var(--white); border-radius: 14px; padding: 10px 14px; }
.footer-logo img { height: 40px; width: auto; }
.site-footer .tagline { margin-top: 16px; }
.site-footer h2 { font: 800 0.95rem/1.3 "Manrope", system-ui, sans-serif; color: var(--white); letter-spacing: 0; margin-bottom: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .footer-links a:hover { color: var(--white); text-decoration: underline; } }
.footer-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.14); font-size: 0.88rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero, .split, .contact-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 520px; }
  .hero-media::before { inset: auto -8px -8px auto; }
  .values, .classes, .steps { grid-template-columns: 1fr; }
  .event { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 520px) {
  .wrap { width: calc(100% - 32px); }
  .products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-body { padding: 14px 12px 16px; }
  .product h4 { font-size: 0.98rem; }
  .product-spec { font-size: 0.85rem; }
  .product-price .amount { font-size: 1.35rem; }
  .product .btn { padding: 10px 8px; font-size: 0.85rem; }
  .product .btn svg { display: none; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
