/* ==========================================================================
   LATRIA — Cocina Mediterránea
   Hoja de estilos base. Diseño original: "Diseño Web Latria.ai" (1920 px).
   Tema de WordPress: las imágenes y textos vienen de ACF; las únicas
   adiciones al CSS del HTML están marcadas con "WordPress".
   ========================================================================== */

/* ---------- Tipografías ---------- */
@font-face { font-family: "Tartuffo"; src: url("../fonts/Tartuffo-Thin.otf") format("opentype"); font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: "Tartuffo"; src: url("../fonts/Tartuffo-ThinItalic.otf") format("opentype"); font-weight: 100; font-style: italic; font-display: swap; }
@font-face { font-family: "Tartuffo"; src: url("../fonts/Tartuffo-Light.otf") format("opentype"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Tartuffo"; src: url("../fonts/Tartuffo-LightItalic.otf") format("opentype"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Tartuffo"; src: url("../fonts/Tartuffo-Regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Tartuffo"; src: url("../fonts/Tartuffo-RegularItalic.otf") format("opentype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Tartuffo"; src: url("../fonts/Tartuffo-Medium.otf") format("opentype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Tartuffo"; src: url("../fonts/Tartuffo-MediumItalic.otf") format("opentype"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Tartuffo"; src: url("../fonts/Tartuffo-Bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Tartuffo"; src: url("../fonts/Tartuffo-BoldItalic.otf") format("opentype"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url("../fonts/AlbertSans-VariableFont_wght.ttf") format("truetype-variations"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  /* Paleta tomada del archivo de Illustrator */
  --cream:      #FFF1E3;   /* fondo cabecera / texto sobre oscuro */
  --sand:       #F2E4D7;   /* fondo de secciones */
  --red:        #E52E27;   /* línea divisoria */
  --red-text:   #E42020;   /* titulares Tartuffo */
  --red-link:   #EA2A26;   /* logo, enlace activo */
  --ink:        #1D0908;   /* pie de página */
  --brown:      #3F1A19;   /* navegación */
  --cocoa:      #472D21;   /* cita en Concepto */

  --font-display: "Tartuffo", "Times New Roman", Georgia, serif;
  --font-body:    "Albert Sans", "Helvetica Neue", Arial, sans-serif;

  /* Escala fluida: valores máximos = medidas del diseño a 1920 px */
  --gutter:   clamp(20px, 4.5vw, 87px);
  --gap:      clamp(12px, 1.2vw, 22px);
  --radius:   clamp(12px, 1.05vw, 20px);
  --header-h: clamp(76px, 8.45vw, 162px);
  --line:     clamp(10px, 0.9vw, 17px);

  --text-nav:   clamp(13px, 0.94vw, 18px);
  --text-body:  clamp(15px, 1.38vw, 26.5px);
  --text-quote: clamp(26px, 2.42vw, 46px);
  --text-h1:    clamp(36px, 3.35vw, 64px);
  --text-addr:  clamp(30px, 4.1vw, 78px);
  --text-hours: clamp(20px, 1.83vw, 35px);
  --text-hours-h: clamp(26px, 2.3vw, 44px);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ligero ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-nav);
  line-height: 1.5;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, address, figure { margin: 0; font-style: normal; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

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

.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: var(--gutter); top: -100px; z-index: 100;
  padding: .75em 1.25em; background: var(--ink); color: var(--cream);
  text-transform: uppercase; letter-spacing: .1em; border-radius: 0 0 8px 8px;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* El contenido crece y empuja el footer al fondo en ventanas altas */
main { flex: 1 0 auto; }
.site-header, .site-footer { flex-shrink: 0; }

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

/* ---------- Utilidades tipográficas ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  line-height: 1.55;
}
.display {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -.04em;
  line-height: 1.1;
}
.display small,
.display .sup {
  font-size: .55em;
  letter-spacing: -.02em;
}
.display .sup { vertical-align: .6em; font-size: .5em; }

/* ==========================================================================
   Cabecera
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  transition: box-shadow .3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 6px 30px rgba(29, 9, 8, .08); }

/* WordPress: la barra de administración (sesión iniciada) es fija arriba */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

.site-header__inner {
  display: flex;
  align-items: center;
  height: var(--header-h);
}

.brand { flex: 0 0 auto; }
.brand img { width: clamp(118px, 9.85vw, 189px); height: auto; }

.nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}
.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(28px, 6.3vw, 120px);
}
.nav__link,
.lang__item {
  position: relative;
  display: inline-block;
  padding: .35em 0;
  color: var(--brown);
  text-transform: uppercase;
  letter-spacing: .1em;
  white-space: nowrap;
  transition: color .25s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: .05em;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav__link:hover,
.nav__link:focus-visible,
.nav__link.is-active { color: var(--red-link); }
.nav__link:hover::after,
.nav__link:focus-visible::after,
.nav__link.is-active::after { transform: scaleX(1); }

.lang {
  display: flex;
  align-items: center;
  gap: .45em;
  margin-left: clamp(36px, 10.4vw, 200px);
  font-size: clamp(14px, 1.1vw, 21px);
}
.lang__item { color: var(--brown); }
.lang__item:hover, .lang__item:focus-visible { color: var(--red-link); }
.lang__sep { color: var(--brown); }

.menu-toggle {
  display: none;
  position: relative;
  z-index: 60;
  width: 44px; height: 44px;
  margin-left: auto;
  margin-right: -8px;
}
.menu-toggle__bar {
  position: absolute; left: 10px; right: 10px;
  height: 2px; background: var(--brown);
  transition: transform .3s var(--ease), top .3s var(--ease), opacity .2s;
}
.menu-toggle__bar:nth-child(1) { top: 16px; }
.menu-toggle__bar:nth-child(2) { top: 26px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* ==========================================================================
   Galería de tres fotografías (Home, Concepto, Ubicación)
   ========================================================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}
.gallery__item {
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 578 / 460;
  background: var(--ink);
}
.gallery__item picture { display: block; width: 100%; height: 100%; }
.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
@media (hover: hover) {
  .gallery__item:hover img { transform: scale(1.04); }
}

/* ==========================================================================
   Home — Hero
   ========================================================================== */
.hero {
  background: var(--sand);
  padding-top: clamp(16px, 1.8vw, 35px);
  padding-bottom: clamp(32px, 2.75vw, 53px);
}
.hero__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 1779 / 826;
  background: var(--ink);
}
.hero__media > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 40% 50%;
}
.hero__copy {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 3% 1.6%;
  color: var(--cream);
  text-align: center;
}
.hero__eyebrow {
  position: absolute;
  left: 0; right: 0;
  top: 43%;
  transform: translateY(-50%);
  font-size: var(--text-body);
  line-height: 1.36;
  text-shadow: 0 2px 20px rgba(29, 9, 8, .25);
}
.hero__title { width: 100%; }
.hero__title-svg { width: 100%; height: auto; }
.hero__title-text {
  display: none;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.04em;
  text-transform: uppercase;
  text-shadow: 0 2px 24px rgba(29, 9, 8, .35);
}
.hero__title-text small { font-size: .5em; letter-spacing: 0; }
/* WordPress: titular solo en texto (sin imagen SVG en el campo ACF) */
.hero__title--texto .hero__title-text {
  display: block;
  font-size: clamp(44px, 7.6vw, 146px);
}

.hero .gallery { margin-top: clamp(16px, 1.5vw, 28px); }

/* ==========================================================================
   Concepto
   ========================================================================== */
.concept {
  /* WordPress: el patrón viene del campo ACF «Patrón de fondo» (--concept-bg) */
  background: var(--sand) var(--concept-bg, none) center top / cover no-repeat;
  padding-top: clamp(56px, 6.4vw, 123px);
  padding-bottom: clamp(40px, 3.75vw, 72px);
  text-align: center;
}
.concept__head { margin-bottom: clamp(48px, 6.8vw, 130px); }
.concept__head .display { font-size: var(--text-h1); color: var(--red-text); }
.concept__head .eyebrow {
  margin-top: .35em;
  font-size: var(--text-body);
  color: var(--red-text);
}
.concept__quote {
  max-width: 1130px;
  margin-inline: auto;
  font-size: var(--text-quote);
  color: var(--cocoa);
  line-height: 1.14;
  letter-spacing: -.05em;
  text-wrap: balance;
}
.concept__body {
  position: relative;
  max-width: 1130px;
  margin: clamp(36px, 3.8vw, 73px) auto 0;
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--ink);
}
.concept__body p + p { margin-top: 1.55em; }
.concept__signature {
  width: clamp(240px, 42.8vw, 821px);
  margin: clamp(-24px, -3vw, -57px) 0 0 auto;
  transform: translateX(clamp(0px, 4vw, 90px));
  pointer-events: none;
}
.concept .gallery { margin-top: clamp(24px, 1.75vw, 33px); }

/* ==========================================================================
   Ubicación
   ========================================================================== */
.location {
  background: var(--sand);
  padding-top: clamp(24px, 2.7vw, 52px);
  padding-bottom: clamp(48px, 4.3vw, 83px);
}
.location__address {
  margin: clamp(32px, 2.2vw, 42px) auto clamp(40px, 5.2vw, 100px);
  max-width: 1560px;
  font-size: var(--text-addr);
  line-height: 1.13;
  color: var(--red-text);
  text-align: center;
  text-wrap: balance;
}
.location__address a { color: inherit; }
.location__address a:hover { text-decoration: underline; text-decoration-thickness: .04em; text-underline-offset: .1em; }

.location__grid {
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) minmax(0, 2.3fr);
  gap: clamp(28px, 2.6vw, 50px);
  align-items: center;
}
.hours { color: var(--red-text); }
.hours__title {
  font-size: var(--text-hours-h);
  margin-bottom: clamp(20px, 4vw, 110px);
}
.hours__list {
  font-size: var(--text-hours);
  line-height: 1.13;
}
.hours__list li { display: flex; flex-wrap: wrap; column-gap: .3em; }
.hours .sup { font-size: .5em; vertical-align: .7em; letter-spacing: 0; }

.map {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1240 / 520;
  overflow: hidden;
  border-radius: var(--radius);
  background: #e9e2da;
}
.map__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* WordPress: enlace a Google Maps visible mientras el mapa no se ha cargado */
.map__fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--brown);
  text-decoration: underline;
  text-underline-offset: .3em;
}
.map__fallback:hover, .map__fallback:focus-visible { color: var(--red-link); }
.map.is-ready .map__fallback { display: none; }
.map .mapboxgl-ctrl-logo, .map .mapboxgl-ctrl-attrib { opacity: .6; }
.map-marker {
  display: block;
  width: 34px; height: 44px;
  cursor: pointer;
  filter: drop-shadow(0 6px 10px rgba(29, 9, 8, .35));
  transition: transform .25s var(--ease);
}
.map-marker:hover, .map-marker:focus-visible { transform: translateY(-3px) scale(1.06); }
.map-marker svg { width: 100%; height: 100%; }

/* ==========================================================================
   Pie de página
   ========================================================================== */
.site-footer {
  border-top: var(--line) solid var(--red);
  background: var(--ink);
  color: var(--cream);
  padding-block: clamp(40px, 3.65vw, 70px);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr 1.58fr 2.6fr 1.9fr;
  align-items: start;
}
.site-footer__brand img { width: clamp(84px, 6.6vw, 127px); margin-top: .5em; }
.site-footer a { transition: color .25s var(--ease); }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--red-link); }
.site-footer .eyebrow { line-height: 1.92; }

/* ==========================================================================
   WordPress: páginas de contenido (Aviso de privacidad, Facturación…) y 404
   ========================================================================== */
.page-content {
  padding-block: clamp(56px, 6.4vw, 123px);
}
.page-content__inner { max-width: 1130px; }
.page-content__title {
  margin-bottom: clamp(28px, 3vw, 56px);
  font-size: var(--text-h1);
  color: var(--red-text);
}
.page-content__body {
  font-weight: 400;
  font-size: clamp(16px, 1.05vw, 20px);
  line-height: 1.65;
  color: var(--ink);
}
.page-content__body > * + * { margin-top: 1em; }
.page-content__body h2,
.page-content__body h3 {
  margin-top: 1.8em;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--red-text);
}
.page-content__body h2 { font-size: 1.8em; }
.page-content__body h3 { font-size: 1.4em; }
.page-content__body a { color: var(--red-link); text-decoration: underline; text-underline-offset: .15em; }
.page-content__body ul,
.page-content__body ol { padding-left: 1.4em; }
.page-content__body ul { list-style: disc; }
.page-content__body img { border-radius: var(--radius); }
.page-content--404 { text-align: center; }
.button-link {
  display: inline-block;
  margin-top: clamp(24px, 2vw, 40px);
  padding: .9em 2em;
  border-radius: 999px;
  background: var(--red-link);
  color: var(--cream);
  transition: background-color .25s var(--ease);
}
.button-link:hover, .button-link:focus-visible { background: var(--brown); }

/* ==========================================================================
   Navegación móvil / tablet
   ========================================================================== */
@media (max-width: 1024px) {
  .menu-toggle { display: block; }
  .brand { position: relative; z-index: 60; }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 55;
    flex-direction: column;
    justify-content: center;
    gap: 8vh;
    margin: 0;
    padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
    background: var(--cream);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s .35s;
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s;
  }
  .nav__list {
    flex-direction: column;
    align-items: center;
    gap: clamp(20px, 4vh, 36px);
  }
  .nav__link {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(26px, 8.5vw, 44px);
    letter-spacing: -.03em;
    padding: 0;
    white-space: normal;
    text-align: center;
  }
  .nav__link::after { height: 2px; bottom: .02em; }
  .lang { margin: 0; font-size: 16px; }

  body.nav-open { overflow: hidden; }
}

/* ==========================================================================
   Tablet
   ========================================================================== */
@media (max-width: 900px) {
  :root { --gap: 12px; }

  /* Galerías → una foto por fila */
  .gallery {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap);
  }

  .location__grid { grid-template-columns: minmax(0, 1fr); }
  .location__grid > * { min-width: 0; }
  .hours__title { margin-bottom: 20px; }
  .map { aspect-ratio: auto; height: clamp(280px, 75vw, 460px); }

  .site-footer__inner {
    grid-template-columns: auto 1fr;
    column-gap: clamp(24px, 6vw, 60px);
    row-gap: 28px;
  }
  .site-footer__brand { grid-row: 1 / 3; }
}

/* ==========================================================================
   Móvil
   ========================================================================== */
@media (max-width: 767px) {
  .hero__media { aspect-ratio: 4 / 5; }
  .hero__media > img { object-position: 35% 50%; }
  .hero__copy { padding: 6% 5%; }
  .hero__eyebrow { top: 40%; font-size: 13px; line-height: 1.5; }
  .hero__title-svg { display: none; }
  .hero__title-text,
  .hero__title--texto .hero__title-text {
    display: block;
    font-size: clamp(44px, 14vw, 64px);
  }

  .concept {
    background-size: 160% auto;
    background-repeat: repeat-y;
  }
  .concept__signature {
    width: min(78%, 320px);
    margin: -8px auto 0;
    transform: none;
  }

  .hours__list li { flex-direction: column; row-gap: .1em; margin-bottom: .55em; }
  .hours__list .hours__day { opacity: .85; font-size: .8em; }

  .site-footer__inner {
    grid-template-columns: 1fr;
    row-gap: 24px;
  }
  .site-footer__brand { grid-row: auto; }
  .site-footer .eyebrow { font-size: 13px; }
}

/* ---------- Preferencias de movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
