/* Escuela de Surf Punta Negra — club de surf retro con los colores del logo. Mobile first. */

@font-face {
  font-family: "Shrikhand";
  src: url("fonts/shrikhand-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Karla";
  src: url("fonts/karla-400-700.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #f7f1e6;     /* papel cálido */
  --paper-2: #efe5d3;
  --ink: #121110;       /* negro de las letras del logo */
  --ink-soft: #4a4540;
  --slate: #445e5f;     /* cerro */
  --sea: #33818d;       /* mar */
  --rust: #b65214;      /* sol oscuro */
  --sun: #e08651;       /* sol claro */
  --line: rgba(18, 17, 16, .14);
  --display: "Shrikhand", "Cooper Black", Georgia, serif;
  --text: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 20px;
  --max: 1080px;
  --radius: 28px;
  /* Ola para los separadores (dibujo simple, usado como máscara) */
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 16' preserveAspectRatio='none'%3E%3Cpath d='M0 8 Q15 0 30 8 T60 8 T90 8 T120 8 V16 H0Z' fill='%23000'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 1.0625rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.02; margin: 0; }
p { margin: 0 0 1em; }
a { color: inherit; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 99px; }
.skip:focus { left: 8px; }

/* Íconos (archivos usados como máscara: toman el color del texto) */
.wa-icon, .ig-icon { display: inline-block; flex-shrink: 0; width: 22px; height: 22px; background-color: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.wa-icon { --icon: url("img/whatsapp.svg"); }
.ig-icon { --icon: url("img/instagram.svg"); }

/* ---------- Barra superior ---------- */
.top {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px;
  padding: 8px var(--gutter); background: rgba(247, 241, 230, .95); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.brand { margin-right: auto; display: block; }
.brand img { width: 52px; height: auto; }
.nav { display: flex; gap: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 99px; font-weight: 700; font-size: .95rem; text-decoration: none; }
.nav a:first-child { background: var(--rust); color: #fff; }
.nav a:hover { background: var(--ink); color: var(--paper); }
.lang { display: flex; padding: 3px; border-radius: 99px; background: var(--paper-2); }
.lang button { font: inherit; font-weight: 700; font-size: .85rem; min-width: 38px; min-height: 34px; border: 0; border-radius: 99px; background: none; color: var(--ink-soft); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--slate); color: #fff; }

/* ---------- Botones y links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 14px 26px; border-radius: 99px;
  background: var(--rust); color: #fff; font-weight: 700; font-size: 1.05rem; text-decoration: none;
  box-shadow: 0 4px 0 var(--ink); transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.btn-small { min-height: 48px; padding: 10px 20px; font-size: .98rem; }
.btn-light { background: var(--paper); color: var(--ink); }
.link { display: inline-block; padding: 6px 0; font-weight: 700; color: var(--rust); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.link:hover { color: var(--ink); }
.kicker { font-weight: 700; font-size: .85rem; letter-spacing: .2em; text-transform: uppercase; color: var(--slate); margin-bottom: 8px; }

/* Ola separadora debajo de una sección */
.wave-bottom { position: relative; }
.wave-bottom::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 18px;
  background: var(--next, var(--paper)); -webkit-mask: var(--wave) center / 120px 100% repeat-x; mask: var(--wave) center / 120px 100% repeat-x;
}

/* ---------- 1. Portada ---------- */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px var(--gutter) 56px; }
.hero-logo { width: min(78%, 330px); margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.3rem, 10.5vw, 4.4rem); color: var(--ink); margin-bottom: 14px; max-width: 12ch; }
.hero-lead { font-size: clamp(1.1rem, 4.4vw, 1.35rem); color: var(--ink-soft); max-width: 30ch; margin-bottom: 26px; }

/* ---------- 2. Clases ---------- */
.lessons { padding: 52px 0 56px; background: var(--paper-2); }
.lessons h2, .prices h2, .place h2 { font-size: clamp(2.6rem, 12vw, 4.4rem); margin-bottom: 12px; }
.lessons h2 { color: var(--rust); }
.lead { font-size: clamp(1.1rem, 4.4vw, 1.35rem); color: var(--ink-soft); max-width: 34ch; margin-bottom: 26px; }

.carousel { position: relative; max-width: 900px; margin: 0 auto; padding-inline: var(--gutter); }
.carousel:focus-visible { outline: none; }
.carousel:focus-visible .carousel-track { outline: 3px solid var(--rust); outline-offset: 3px; }
.carousel-track { list-style: none; margin: 0; padding: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; border-radius: var(--radius); }
.carousel-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 16 / 10; position: relative; overflow: hidden; background: var(--paper); }
.slide img { width: 100%; height: 100%; object-fit: cover; }
/* Espacio vacío: un "sello" con un sol, a propósito */
.slide-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border: 2px solid var(--slate); border-radius: var(--radius); }
.slide-empty::before {
  content: ""; width: 64px; height: 32px; border-radius: 64px 64px 0 0; background: var(--sun);
  box-shadow: 0 6px 0 -2px var(--paper), 0 8px 0 0 var(--sea);
}
.slide-empty span { font-family: var(--display); font-size: 1.3rem; color: var(--slate); }
.carousel-arrow {
  position: absolute; top: calc(50% - 30px); z-index: 2; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; background: var(--ink); color: var(--paper); border: 0;
  transition: background .2s;
}
.carousel-arrow::before { content: ""; width: 10px; height: 10px; border-top: 2.5px solid currentColor; border-right: 2.5px solid currentColor; }
.carousel-arrow.prev { left: calc(var(--gutter) + 10px); }
.carousel-arrow.prev::before { transform: translateX(2px) rotate(-135deg); }
.carousel-arrow.next { right: calc(var(--gutter) + 10px); }
.carousel-arrow.next::before { transform: translateX(-2px) rotate(45deg); }
.carousel-arrow:hover { background: var(--rust); }
.carousel-arrow:focus-visible { outline: 3px solid var(--rust); outline-offset: 2px; }
.carousel-arrow:disabled { opacity: .3; cursor: default; background: var(--ink); }
.carousel-dots { display: flex; justify-content: center; gap: 2px; margin-top: 10px; }
.carousel-dots button { width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.carousel-dots button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--slate); transition: background .2s; }
.carousel-dots button[aria-current="true"]::before { background: var(--rust); border-color: var(--rust); }
.carousel-dots button:focus-visible { outline: 2px solid var(--rust); outline-offset: -4px; border-radius: 50%; }

.hours {
  margin-top: 28px; padding: 22px; border-radius: var(--radius); background: var(--paper); border: 2px solid var(--ink);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
}
.hours h3 { font-size: 1.6rem; color: var(--slate); margin-bottom: 4px; }
.hours p { margin: 0; color: var(--ink-soft); }

/* ---------- 3. Precios ---------- */
.prices { padding: 56px 0 64px; background: var(--slate); color: var(--paper); --next: var(--paper); }
.prices h2 { color: var(--paper); }
.price-list { margin: 10px 0 28px; max-width: 640px; }
.price-list div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 16px 0; border-top: 1.5px solid rgba(247, 241, 230, .45); border-bottom: 1.5px solid rgba(247, 241, 230, .45); }
.price-list dt { font-family: var(--display); font-size: 1.4rem; }
.price-list dd { margin: 0; font-weight: 700; color: #ffd2b3; }
.prices .btn { box-shadow: 0 4px 0 var(--ink); }

/* ---------- 4. Reseñas ---------- */
.reviews { padding: 60px 0; }
.score { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.score-num { font-size: clamp(5rem, 24vw, 8rem); color: var(--rust); line-height: .9; }
.score-label { font-family: var(--text); font-weight: 700; font-size: 1.05rem; line-height: 1.3; max-width: 11ch; color: var(--ink); }
.reviews-title { color: var(--ink-soft); margin-bottom: 8px; }
.highlights { list-style: none; padding: 0; margin: 0 0 18px; }
.highlights li { position: relative; padding: 10px 0 10px 34px; font-weight: 700; font-size: 1.12rem; border-top: 1px solid var(--line); }
.highlights li::before { content: ""; position: absolute; left: 0; top: 50%; width: 20px; height: 10px; margin-top: -6px; border-radius: 20px 20px 0 0; background: var(--sun); }

/* ---------- 5. Lugar ---------- */
.place { padding: 56px 0 44px; background: var(--paper-2); }
.place h2 { color: var(--sea); }
.address { font-family: var(--display); font-size: clamp(1.4rem, 5.5vw, 1.9rem); margin-bottom: 8px; }
.contact-line { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 20px; }
.contact-line a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; text-decoration: none; word-break: break-word; }
.contact-line a:hover { color: var(--rust); }
.contact-line .wa-icon, .contact-line .ig-icon { color: var(--sea); }
.map { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; border: 2px solid var(--ink); background: var(--paper); margin-bottom: 12px; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

.footer { background: var(--ink); color: rgba(247, 241, 230, .8); padding: 22px var(--gutter) 160px; font-size: .9rem; }
.footer p { margin: 0; padding-right: 72px; }
.footer a { color: var(--sun); white-space: nowrap; }
.footer-ig { display: inline-flex; vertical-align: middle; margin-left: 8px; padding: 8px; }
.footer-ig .ig-icon { width: 20px; height: 20px; }

/* ---------- Flotantes ---------- */
.wa-float, .ig-float { position: fixed; z-index: 60; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 6px 18px rgba(18, 17, 16, .3); transition: transform .2s; }
.wa-float { right: 16px; bottom: 16px; width: 60px; height: 60px; background: #1fa855; }
.wa-float .wa-icon { width: 32px; height: 32px; }
.ig-float { right: 20px; bottom: 88px; width: 52px; height: 52px; background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.ig-float .ig-icon { width: 26px; height: 26px; }
.wa-float:hover, .ig-float:hover { transform: scale(1.06); }

a:focus-visible, button:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }
.prices a:focus-visible, .footer a:focus-visible { outline-color: var(--paper); }

/* Aparecer al bajar: solo cuando el JS marcó el elemento (sin JS, todo visible) */
.reveal-pending { opacity: 0; transform: translateY(18px); transition: opacity .45s ease-out, transform .45s ease-out; transition-delay: var(--d, 0s); }
.reveal-pending.is-visible { opacity: 1; transform: none; }

/* =================== Tablet y escritorio =================== */
@media (min-width: 760px) {
  :root { --gutter: 40px; }
  .brand img { width: 60px; }
  .nav { gap: 8px; }
  .hero { padding: 48px var(--gutter) 80px; }
  .hero-logo { width: 360px; }
  .lessons, .prices, .reviews { padding: 88px 0; }
  .hours { padding: 26px 32px; margin-top: 36px; }
  .reviews-grid { display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center; }
  .score { flex-direction: column; align-items: flex-start; margin: 0; }
  .place { padding-top: 88px; }
  .map { aspect-ratio: 16 / 6; }
  .footer { padding-bottom: 24px; }
  .footer p { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carousel-track { scroll-behavior: auto; }
  * { transition: none !important; }
  .reveal-pending { opacity: 1; transform: none; }
}
