/* Las variables viven en tokens.css (se carga antes en el HTML). */

/* ===== Base ===== */
* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--surface);
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  color: var(--petrol);
}

h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: 700;
}

h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.small {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

.eyebrow {
  display: block;
  font-size: var(--fs-eyebrow);
  line-height: var(--lh-eyebrow);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brasa);
  margin-bottom: var(--space-1);
}

/* ===== Botones (un solo principal por pantalla: brasa) ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn:focus-visible,
.main-nav a:focus-visible,
.nav-toggle:focus-visible {
  outline: 3px solid var(--brasa-bright);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--brasa);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--brasa-dark);
}

.btn-secondary {
  background: var(--petrol);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--petrol-dark);
}

.btn-light {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
  z-index: 100;
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 22px;
  color: var(--petrol);
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--petrol);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  letter-spacing: 0.02em;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Avatar (encabezado y pie): solo el isotipo (pescado, fuego y olas) al 75 % del círculo, sobre turquesa oscuro */
.site-header .brand-logo,
.brand-footer .brand-logo {
  width: var(--avatar-size);
  height: var(--avatar-size);
  background: var(--turquesa-oscuro);
}

.site-header .brand-logo img,
.brand-footer .brand-logo img {
  width: 75%;
  height: auto;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.main-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  border-bottom: 2px solid transparent;
}

.main-nav a:not(.btn):hover {
  border-bottom-color: var(--brasa-bright);
}

.main-nav .btn {
  min-height: 44px;
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--petrol);
  cursor: pointer;
  flex-shrink: 0;
}

/* ===== Nota "Foto referencial" ===== */
.photo-note {
  position: absolute;
  left: var(--space-1);
  bottom: var(--space-1);
  z-index: 2;
  padding: 2px var(--space-1);
  border-radius: var(--radius-sm);
  background: rgba(31, 42, 46, 0.72);
  color: var(--white);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  pointer-events: none;
}

/* ===== Hero ===== */
.hero {
  min-height: 92vh;
  margin-top: var(--header-height);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--petrol-dark);
}

/* Carrusel de fondo: las fotos se apilan y se hace fundido entre ellas */
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  isolation: isolate;
  overflow: hidden;
  background: var(--petrol-dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.is-leaving {
  z-index: 1;
  opacity: 1;
  transition: none;
}

.hero-slide.is-active {
  z-index: 2;
  opacity: 1;
}

/* Solo con ?carrusel=1 (vista previa): mantiene el fundido aunque el sistema pida reducir movimiento */
.hero.hero-forzado .hero-slide {
  transition: opacity 1s ease;
}

.hero.hero-forzado .hero-slide.is-leaving {
  transition: none;
}

.hero-slide picture,
.hero-slide img {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-slide img {
  object-fit: cover;
  object-position: var(--foco, 55%) 50%;
}

/* Capa oscura fija: el texto blanco se lee igual en las 4 fotos */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(1, 59, 75, 0.93) 0%, rgba(1, 59, 75, 0.8) 50%, rgba(1, 59, 75, 0.3) 100%);
}

.hero .photo-note {
  left: auto;
  right: var(--space-2);
  bottom: var(--space-2);
  z-index: 3;
}

/* Puntos indicadores (zona táctil de 44 px, punto visible pequeño) */
.hero-controls {
  position: absolute;
  left: 50%;
  bottom: var(--space-1);
  z-index: 3;
  width: 100%;
  max-width: 1140px;
  padding: 0 var(--space-3);
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-dots {
  display: flex;
  pointer-events: auto;
  margin-left: -12px;
}

.hero-dot {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.hero-dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.hero-dot:hover::before {
  background: rgba(255, 255, 255, 0.85);
}

.hero-dot[aria-current="true"]::before {
  background: var(--white);
  transform: scale(1.3);
}

.hero-dot:focus-visible {
  outline: 3px solid var(--brasa-bright);
  outline-offset: -4px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: var(--space-4) 0;
  color: var(--white);
  opacity: 0;
  animation: heroContentIn 0.9s ease-out 0.3s forwards;
}

@keyframes heroContentIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-eyebrow {
  display: block;
  font-size: var(--fs-eyebrow);
  line-height: var(--lh-eyebrow);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--espuma);
  margin-bottom: var(--space-2);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.hero-content h1 {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-2);
}

.hero-content p {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: var(--space-3);
  max-width: 480px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ===== Secciones ===== */
.section {
  padding: var(--space-section) 0;
}

.section-alt {
  background: var(--surface-alt);
}

.section-title {
  margin-bottom: var(--space-4);
}

.section-title.center {
  text-align: center;
}

/* ===== Animación al hacer scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .hero-content {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  .hero-slide {
    transition: none;
  }
}

/* ===== Especialidades ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--space-3);
}

.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-photo-slot {
  position: relative;
  height: 180px;
  background:
    repeating-linear-gradient(45deg, rgba(1, 59, 75, 0.06) 0 10px, transparent 10px 20px),
    var(--surface-alt);
}

.card-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: var(--space-2) var(--space-3) var(--space-3);
}

.card-body h3 {
  color: var(--ink);
  margin-bottom: var(--space-1);
}

.card-desc {
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

.card-price {
  display: block;
  margin-top: var(--space-1);
  font-family: var(--font-display);
  font-size: var(--fs-price);
  line-height: var(--lh-price);
  font-weight: 700;
  color: var(--brasa);
}

/* ===== Menú del día ===== */
.menu-dia-card {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  background: var(--petrol);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-3) var(--space-4);
  text-align: center;
}

.menu-dia-card .section-title {
  color: var(--white);
  margin-bottom: var(--space-3);
}

.menu-dia-tag {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--brasa-bright);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 28px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.menu-dia-items {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.menu-dia-label {
  display: block;
  font-size: var(--fs-eyebrow);
  line-height: var(--lh-eyebrow);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--espuma);
  margin-bottom: 4px;
}

.menu-dia-items p {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 500;
}

.menu-dia-precio {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: 700;
  color: var(--white);
}

/* ===== Carta CTA ===== */
.carta-cta {
  text-align: center;
  max-width: 560px;
}

.carta-cta .section-title {
  margin-bottom: var(--space-2);
}

.carta-cta p {
  color: var(--muted);
  margin-bottom: var(--space-3);
}

/* ===== Por qué elegirnos ===== */
.why-us-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  text-align: center;
}

.why-us-icon {
  display: block;
  width: 64px;
  height: 64px;
  padding: 14px;
  border-radius: 50%;
  background: rgba(122, 192, 198, 0.22); /* turquesa de la marca, muy suave */
  margin: 0 auto var(--space-2);
  color: var(--petrol);
}

.why-us-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.why-us-item h3 {
  margin-bottom: var(--space-1);
}

.why-us-item p {
  color: var(--muted);
}

/* ===== Galería ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.gallery-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  background:
    repeating-linear-gradient(45deg, rgba(1, 59, 75, 0.06) 0 10px, transparent 10px 20px),
    var(--surface-alt);
  border: 1px solid var(--hairline);
  overflow: hidden;
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Ubicación ===== */
.ubicacion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: center;
}

.ubicacion-info .section-title {
  margin-bottom: var(--space-3);
}

.ubicacion-direccion,
.ubicacion-horario {
  margin-bottom: var(--space-1);
}

.ubicacion-label {
  display: block;
  font-size: var(--fs-eyebrow);
  line-height: var(--lh-eyebrow);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.ubicacion-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}

.ubicacion-map {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--hairline);
  overflow: hidden;
}

.ubicacion-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ===== Reseñas ===== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
}

.review-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}

.review-stars {
  color: var(--brasa);
  letter-spacing: 2px;
  margin-bottom: var(--space-1);
}

.review-card p {
  margin-bottom: var(--space-2);
}

.review-author {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--petrol);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--petrol-dark);
  color: rgba(255, 255, 255, 0.86);
  padding: var(--space-4) 0 var(--space-3);
}

.brand-footer {
  color: var(--white);
  margin-bottom: var(--space-1);
}

/* El avatar es del mismo turquesa que el pie: un aro crema fino lo separa del fondo */
.brand-footer .brand-logo {
  box-shadow: 0 0 0 1px rgba(247, 240, 228, 0.35);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-contacto,
.footer-redes {
  display: flex;
  flex-direction: column;
}

.footer-contacto a,
.footer-redes a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
}

.footer-contacto a:hover,
.footer-redes a:hover {
  color: var(--espuma);
}

.footer-copy {
  text-align: center;
  color: rgba(255, 255, 255, 0.62);
  margin-top: var(--space-3);
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-2) var(--space-3) var(--space-3);
    gap: 0;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a:not(.btn) {
    min-height: var(--tap-min);
    border-bottom: 1px solid var(--hairline);
  }

  .main-nav .btn {
    margin-top: var(--space-2);
    min-height: var(--tap-min);
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(1, 59, 75, 0.5) 0%, rgba(1, 59, 75, 0.72) 40%, rgba(1, 59, 75, 0.78) 70%, rgba(1, 59, 75, 0.6) 100%);
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-eyebrow {
    color: var(--white);
  }

  .ubicacion-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 var(--space-2);
  }

  .brand {
    font-size: 16px;
    line-height: 20px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-1);
  }

  .hero .photo-note {
    right: var(--space-1);
    bottom: var(--space-1);
  }

  .hero-controls {
    padding: 0 var(--space-2);
  }

  .hero-actions .btn,
  .ubicacion-actions .btn,
  .carta-cta .btn {
    width: 100%;
  }

  .menu-dia-card {
    padding: var(--space-4) var(--space-2);
  }

  .menu-dia-items {
    gap: var(--space-3);
  }
}

/* ===== Sorteo del Roble ===== */
.section-sorteo {
  background: var(--petrol);
  color: var(--white);
}
.section-sorteo .section-title,
.section-sorteo .eyebrow {
  color: var(--white);
}
.section-sorteo .eyebrow {
  color: var(--espuma);
}
.sorteo-grid {
  display: grid;
  gap: var(--space-4, 32px);
  align-items: center;
}
.sorteo-intro {
  color: #e8f3f4;
  max-width: 46ch;
}
.sorteo-cuenta {
  display: flex;
  gap: 12px;
  margin: var(--space-2) 0 var(--space-3);
  max-width: 340px;
}
.sorteo-cuenta div {
  flex: 1;
  text-align: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 4px;
}
.sorteo-cuenta b {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 32px;
}
.sorteo-cuenta span {
  font-size: 12px;
  color: var(--espuma);
}
.sorteo-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.sorteo-acciones .btn-secondary {
  background: transparent;
  border-color: var(--espuma);
  color: var(--white);
}
.sorteo-acciones .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}
.sorteo-premios {
  display: grid;
  gap: 12px;
}
.sorteo-premio {
  background: rgba(255, 255, 255, 0.1);
  border-left: 5px solid var(--brasa-bright);
  border-radius: 12px;
  padding: 12px 16px;
}
.sorteo-premio strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 24px;
}
.sorteo-premio span {
  color: #e8f3f4;
  font-size: 15px;
}
@media (min-width: 861px) {
  .sorteo-grid {
    grid-template-columns: 1.1fr 1fr;
  }
}

/* ===== Menú del día: listas de entradas y fondos publicadas por el POS ===== */
.menu-dia-lista {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu-dia-lista li {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 500;
  margin: 0 0 6px;
}
.menu-dia-extra {
  margin: var(--space-1) 0 0;
  color: var(--espuma);
  font-size: var(--fs-small);
}
.menu-dia-items > div[hidden] {
  display: none;
}
