/* ============================================================
   KARIN RESTAURANT — landing.css (index.html)
   Dirección visual: fonda de barrio con oficio. Tipografía serif
   con carácter (Fraunces) + sans legible (DM Sans), colores planos
   tomados de la fachada real (café, ladrillo, crema), sin degradados
   ni sombras de color, esquinas casi rectas y líneas finas en vez de
   tarjetas flotantes.
   ============================================================ */

:root {
  --kr-crema: #FAF3E8;
  --kr-crema-suave: #F0E3CC;
  --kr-cafe-oscuro: #3B2418;
  --kr-ladrillo: #A94F22;       /* acentos y botones (contraste AA con blanco) */
  --kr-ladrillo-oscuro: #8A3E17;
  --kr-mostaza: #E0A63A;        /* solo sobre fondos oscuros */
  --kr-texto: #4A3A2E;
  --kr-texto-suave: #6F5F50;
  --kr-linea: rgba(59, 36, 24, 0.18);
  --fuente-titulo: 'Fraunces', Georgia, 'Times New Roman', serif;
  --fuente-texto: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --radio: 4px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--fuente-texto);
  font-size: 16px;
  color: var(--kr-texto);
  background: var(--kr-crema);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--fuente-titulo);
  font-weight: 700;
  color: var(--kr-cafe-oscuro);
  letter-spacing: -0.01em;
}

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

.seccion-kicker {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kr-ladrillo);
  margin-bottom: 12px;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.landing-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 6vw;
  background: var(--kr-cafe-oscuro);
}

.landing-marca {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--kr-crema);
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: 19px;
}

.landing-logo { width: 34px; height: 34px; object-fit: contain; }

.btn-acceso-empleados {
  border: none;
  background: none;
  color: rgba(250, 243, 232, 0.7);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 0;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.btn-acceso-empleados:hover {
  color: var(--kr-crema);
  border-bottom-color: var(--kr-crema);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 6vw;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 6vw 80px;
}

.hero-kicker {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kr-ladrillo);
  margin-bottom: 20px;
}

.hero-contenido h1 {
  font-size: clamp(36px, 4.6vw, 62px);
  line-height: 1.06;
  margin-bottom: 24px;
}

.hero-contenido h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--kr-ladrillo);
}

.hero-descripcion {
  font-size: 17px;
  line-height: 1.65;
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-acciones {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin-bottom: 44px;
}

.btn-cta-gigante {
  border: none;
  border-radius: var(--radio);
  padding: 17px 34px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--kr-ladrillo);
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-cta-gigante:hover { background: var(--kr-ladrillo-oscuro); }

.hero-link {
  color: var(--kr-cafe-oscuro);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border-bottom: 2px solid var(--kr-mostaza);
  padding-bottom: 2px;
}

.hero-link:hover { border-bottom-color: var(--kr-ladrillo); }

.hero-datos {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  border-top: 1px solid var(--kr-linea);
  padding-top: 20px;
}

.hero-datos > div { padding-right: 28px; margin-right: 28px; border-right: 1px solid var(--kr-linea); }
.hero-datos > div:last-child { border-right: none; margin-right: 0; padding-right: 0; }

.hero-datos dt {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kr-texto-suave);
  margin-bottom: 4px;
}

.hero-datos dd { font-size: 14.5px; font-weight: 500; color: var(--kr-cafe-oscuro); line-height: 1.4; }

.hero-foto { position: relative; z-index: 0; transform: translateX(-3vw); }

.hero-foto img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 35% 100%;
  border-radius: var(--radio);
}

.hero-foto::before {
  content: '';
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 2px solid var(--kr-ladrillo);
  border-radius: var(--radio);
  z-index: -1;
}

/* ============================================================
   FRANJA DE SERVICIOS
   ============================================================ */
.landing-highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  background: var(--kr-cafe-oscuro);
  padding: 0 6vw;
}

.landing-highlights .highlight {
  font-family: var(--fuente-titulo);
  font-style: italic;
  font-size: 17px;
  color: var(--kr-crema);
  padding: 20px 32px;
  position: relative;
}

.landing-highlights .highlight + .highlight::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 50%;
  width: 5px;
  height: 5px;
  background: var(--kr-mostaza);
  transform: translateY(-50%) rotate(45deg);
}

/* ============================================================
   NUESTRA HISTORIA
   ============================================================ */
.historia-seccion { padding: 110px 6vw; background: var(--kr-crema); }

.historia-contenedor {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 7vw;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

.historia-foto-wrap { position: relative; }

.historia-foto {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radio);
  filter: sepia(0.18);
}

.historia-foto-badge {
  position: absolute;
  right: -20px;
  bottom: -28px;
  background: var(--kr-cafe-oscuro);
  color: var(--kr-crema);
  padding: 18px 24px;
  border-radius: var(--radio);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.historia-foto-badge strong {
  display: block;
  font-family: var(--fuente-titulo);
  font-size: 44px;
  line-height: 1;
  letter-spacing: 0;
  color: var(--kr-mostaza);
  margin-bottom: 4px;
}

.historia-kicker {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kr-ladrillo);
  margin-bottom: 12px;
}

.historia-texto h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.12;
  margin-bottom: 28px;
  max-width: 520px;
}

.historia-texto p {
  font-size: 16.5px;
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 18px;
}

.historia-texto p:last-child { margin-bottom: 0; }

/* ============================================================
   PLATILLOS DESTACADOS
   ============================================================ */
.destacados-seccion {
  padding: 100px 6vw;
  background: var(--kr-crema-suave);
}

.destacados-encabezado,
.destacados-grid {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.destacados-encabezado { margin-bottom: 40px; }

.destacados-encabezado h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.1; }

.destacados-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.destacados-seccion[hidden], .hero-link[hidden] { display: none; }
.destacado-card { display: flex; flex-direction: column; overflow: hidden; }

.destacado-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radio);
  transition: transform 0.4s ease;
}

.destacado-card:hover img { transform: scale(1.03); }

.destacado-card-cuerpo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 14px 0 0;
}

.destacado-card-cuerpo h3 {
  font-size: 18px;
  line-height: 1.25;
}

/* línea punteada entre nombre y precio, como en un menú impreso */
.destacado-card-cuerpo::after {
  content: '';
  order: 1;
  flex: 1;
  min-width: 12px;
  border-bottom: 2px dotted var(--kr-linea);
  transform: translateY(-4px);
}

.destacado-card-precio {
  order: 2;
  font-family: var(--fuente-titulo);
  font-size: 18px;
  font-weight: 700;
  color: var(--kr-ladrillo);
}

.btn-cta-mediano {
  border: none;
  border-radius: var(--radio);
  padding: 14px 28px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--kr-ladrillo);
  cursor: pointer;
  transition: background 0.15s ease;
  margin-top: 42px;
}

.btn-cta-mediano:hover { background: var(--kr-ladrillo-oscuro); }

.destacados-seccion > .btn-cta-secundario {
  display: block;
  margin: 44px auto 0;
  width: 100%;
  max-width: 1180px;
  text-align: left;
  background: none;
  border: none;
  border-top: 1px solid var(--kr-linea);
  border-radius: 0;
  padding: 22px 0 0;
}

.btn-cta-secundario {
  border: 2px solid var(--kr-cafe-oscuro);
  border-radius: var(--radio);
  padding: 13px 28px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--kr-cafe-oscuro);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-cta-secundario:hover { background: var(--kr-cafe-oscuro); color: var(--kr-crema); }

.destacados-seccion > .btn-cta-secundario::after { content: ' →'; }
.destacados-seccion > .btn-cta-secundario:hover { background: none; color: var(--kr-ladrillo); }

.btn-full { width: 100%; margin-top: 6px; }

/* ============================================================
   RESEÑAS — carrusel
   ============================================================ */
.resenas-seccion {
  padding: 110px 6vw;
  background: var(--kr-cafe-oscuro);
  color: var(--kr-crema);
}

.resenas-seccion .seccion-kicker { color: var(--kr-mostaza); text-align: center; }

.resenas-seccion h2 {
  color: var(--kr-crema);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.carrusel-resenas {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}

.carrusel-flecha {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(250, 243, 232, 0.4);
  border-radius: 50%;
  background: transparent;
  color: var(--kr-crema);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.carrusel-flecha:hover { background: var(--kr-crema); color: var(--kr-cafe-oscuro); }

.carrusel-viewport {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.carrusel-viewport::-webkit-scrollbar { display: none; }

.carrusel-track { display: flex; }

/* flex-basis:100% garantiza una tarjeta por vista sin importar el ancho */
.resena-card {
  scroll-snap-align: start;
  flex: 0 0 100%;
  padding: 4px 4px 0;
}

.resena-estrellas {
  color: var(--kr-mostaza);
  font-size: 15px;
  letter-spacing: 4px;
  margin-bottom: 20px;
}

.resena-texto {
  font-family: var(--fuente-titulo);
  font-size: clamp(19px, 2.2vw, 25px);
  font-weight: 500;
  line-height: 1.5;
  color: var(--kr-crema);
  min-height: 120px;
  margin-bottom: 28px;
}

.resena-autor { display: flex; align-items: center; gap: 14px; }

.resena-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--kr-mostaza);
  color: var(--kr-mostaza);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resena-nombre { font-size: 15px; font-weight: 700; color: var(--kr-crema); }
.resena-fuente { font-size: 13px; color: rgba(250, 243, 232, 0.65); }

.carrusel-dots { display: flex; justify-content: center; gap: 10px; margin-top: 40px; }

.carrusel-dot {
  width: 24px;
  height: 3px;
  border: none;
  background: rgba(250, 243, 232, 0.3);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease;
}

.carrusel-dot.activo { background: var(--kr-mostaza); }

/* ============================================================
   FOOTER
   ============================================================ */
.landing-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 80px;
  padding: 56px 6vw;
  background: #2A1910;
  color: rgba(250, 243, 232, 0.8);
}

.footer-col h4 {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kr-mostaza);
  margin-bottom: 10px;
}

.footer-col p { font-size: 15px; line-height: 1.6; max-width: 320px; }

/* ============================================================
   RESPONSIVE (landing)
   ============================================================ */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-foto { order: -1; max-width: 520px; transform: none; }
  .hero-foto img { aspect-ratio: 4 / 3; }
  .hero-foto::before { inset: 12px -12px -12px 12px; }
  .destacados-grid { grid-template-columns: repeat(2, 1fr); }
  .historia-contenedor { grid-template-columns: 1fr; gap: 56px; }
  .historia-foto-badge { right: 12px; }
}

@media (max-width: 640px) {
  .hero-datos { grid-template-columns: 1fr; gap: 14px; }
  .hero-datos > div { border-right: none; margin-right: 0; padding-right: 0; }
  .btn-cta-gigante { width: 100%; }
  .historia-seccion, .destacados-seccion, .resenas-seccion { padding: 72px 6vw; }
  .landing-highlights { flex-direction: column; align-items: flex-start; padding: 12px 6vw; }
  .landing-highlights .highlight { padding: 8px 0; }
  .landing-highlights .highlight + .highlight::before { display: none; }
  .carrusel-flecha { display: none; }
  .resena-texto { min-height: 0; }
}

@media (max-width: 480px) {
  .landing-topbar { gap: 12px; }
  .landing-marca { font-size: 16px; gap: 8px; }
  .landing-logo { width: 28px; height: 28px; }
  .btn-acceso-empleados { font-size: 12px; white-space: nowrap; }
  .destacados-grid { grid-template-columns: 1fr; }
  .destacado-card img { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  html, .carrusel-viewport { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ============================================================
   MODAL — LOGIN / REGISTRO
   Mismo lenguaje que el resto: panel crema plano, borde café arriba,
   títulos en serif, campos cuadrados con foco visible.
   ============================================================ */
.modal-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(42, 25, 16, 0.72);
  display: flex;
  justify-content: center;
  overflow-y: auto;
  padding: 24px 16px;
}

.modal-auth-overlay[hidden] { display: none; }

.modal-auth {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: auto;                      /* centra, y deja scrollear si no cabe */
  background: #FFFBF3;
  border-top: 4px solid var(--kr-cafe-oscuro);
  border-radius: var(--radio);
  padding: 40px 36px 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.modal-auth-cerrar {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radio);
  background: none;
  color: var(--kr-texto-suave);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.modal-auth-cerrar:hover { background: var(--kr-crema-suave); color: var(--kr-cafe-oscuro); }

.modal-auth-marca {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kr-ladrillo);
  margin-bottom: 10px;
}

.modal-auth h2 {
  font-size: 30px;
  line-height: 1.1;
  margin-bottom: 8px;
}

.modal-auth #authSubtitulo {
  font-size: 15px;
  line-height: 1.5;
  color: var(--kr-texto-suave);
  margin-bottom: 22px;
}

.auth-mensaje {
  background: #E3F1E6;
  border-left: 3px solid #2E7D4A;
  color: #1D5A32;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 2px;
  margin-bottom: 16px;
}

.auth-mensaje[hidden] { display: none; }

.auth-form { display: flex; flex-direction: column; gap: 4px; }

.auth-form[hidden] { display: none; }

.auth-form label {
  font-size: 13px;
  font-weight: 700;
  color: var(--kr-cafe-oscuro);
  margin-top: 12px;
}

.auth-form input {
  height: 46px;
  border: 1px solid #CDBBA0;
  border-radius: var(--radio);
  background: #fff;
  padding: 0 12px;
  font: inherit;
  font-size: 16px;                   /* 16px evita el zoom automático en iOS */
  color: var(--kr-cafe-oscuro);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--kr-ladrillo);
  box-shadow: 0 0 0 3px rgba(224, 166, 58, 0.45);
}

.auth-error {
  min-height: 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: #A32020;
  margin-top: 8px;
}

.auth-form .btn-cta-mediano { margin-top: 6px; height: 48px; padding: 0 28px; }

.auth-toggle {
  display: block;
  width: 100%;
  text-align: center;
  border: none;
  background: none;
  color: var(--kr-cafe-oscuro);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  margin-top: 18px;
  padding: 8px 0;
}

.auth-toggle:hover { color: var(--kr-ladrillo); }

.auth-toggle[hidden] { display: none; }

@media (max-width: 480px) {
  .modal-auth { padding: 36px 22px 24px; }
  .modal-auth h2 { font-size: 26px; }
}
