/* ==========================================================================
   Buffet Express — estilos
   Paleta medida del logo original (azul #05466E, dorado #F6B232).
   Regla: el dorado nunca es color de texto sobre fondo claro; los botones
   dorados llevan texto azul (contraste 5.4:1).
   ========================================================================== */

@font-face {
  font-family: "Lora";
  src: url("fonts/lora-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("fonts/opensans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("fonts/opensans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* Subset solo con las letras de "Maribel de Borrayo" */
@font-face {
  font-family: "Great Vibes";
  src: url("fonts/greatvibes-firma.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --azul: #05466e;
  --azul-900: #03314e;
  --azul-100: #e6eef4;
  --dorado: #f6b232;
  --dorado-600: #e09b17;
  --marfil: #f7f3ea;
  --blanco: #ffffff;
  --texto: #1e2a33;
  --texto-suave: #4a5863;
  --terracota: #803524;
  --wa: #25d366;

  --font-serif: "Lora", Georgia, "Times New Roman", serif;
  --font-sans: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-script: "Great Vibes", "Brush Script MT", cursive;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgb(3 49 78 / 0.06), 0 2px 8px rgb(3 49 78 / 0.06);
  --shadow: 0 2px 6px rgb(3 49 78 / 0.06), 0 12px 32px rgb(3 49 78 / 0.1);
  --gutter: 16px;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
html.has-dialog { overflow: hidden; }

body {
  margin: 0;
  background: var(--blanco);
  color: var(--texto);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--font-serif); font-weight: 600; line-height: 1.2; color: var(--azul); text-wrap: balance; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--azul); }
strong { font-weight: 700; }

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

.icon { width: 1.25em; height: 1.25em; flex: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  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: 12px 16px; border-radius: var(--radius-sm);
  background: var(--azul); color: var(--blanco); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border: 2px solid transparent; border-radius: 999px;
  font: 700 1rem/1.2 var(--font-sans); text-decoration: none; text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn--lg { min-height: 56px; padding: 14px 28px; font-size: 1.0625rem; }
.btn--sm { min-height: 44px; padding: 8px 16px; font-size: 0.9375rem; gap: 8px; }

.btn--gold { background: var(--dorado); color: var(--azul-900); box-shadow: 0 6px 18px rgb(246 178 50 / 0.35); }
.btn--gold:hover { background: var(--dorado-600); }
.btn--gold:focus-visible { outline-color: var(--blanco); box-shadow: 0 0 0 6px var(--azul); }

.btn--blue { background: var(--azul); color: var(--blanco); }
.btn--blue:hover { background: var(--azul-900); }

.btn--outline { border-color: var(--azul); color: var(--azul); background: transparent; }
.btn--outline:hover { background: var(--azul-100); }

.btn--ghost { border-color: rgb(255 255 255 / 0.75); color: var(--blanco); background: rgb(255 255 255 / 0.06); }
.btn--ghost:hover { background: rgb(255 255 255 / 0.16); border-color: var(--blanco); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  transition: background-color 0.3s, box-shadow 0.3s;
}
.site-header.is-solid { background: rgb(255 255 255 / 0.96); box-shadow: var(--shadow-sm); }
@supports (backdrop-filter: blur(8px)) {
  .site-header.is-solid { background: rgb(255 255 255 / 0.86); backdrop-filter: saturate(1.4) blur(10px); }
}
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 48px; }
.brand__disc {
  display: grid; place-items: center; flex: none;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--blanco); box-shadow: var(--shadow-sm);
}
.brand__disc img { width: 38px; }
.brand__disc--lg { width: 64px; height: 64px; }
.brand__disc--lg img { width: 50px; }
.brand__name { font: 600 1.125rem/1 var(--font-serif); color: var(--blanco); transition: color 0.3s; }
.is-solid .brand__name { color: var(--azul); }

.site-nav { display: none; }

@media (max-width: 350px) {
  .brand__name { display: none; }
}
@media (min-width: 900px) {
  :root { --header-h: 76px; }
  .site-nav { display: flex; gap: 4px; margin-left: auto; }
  .site-nav a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
    border-radius: 999px; color: var(--blanco); text-decoration: none; font-weight: 700; font-size: 0.9375rem;
    transition: color 0.2s, background-color 0.2s;
  }
  .site-nav a:hover { background: rgb(255 255 255 / 0.14); }
  .is-solid .site-nav a { color: var(--azul); }
  .is-solid .site-nav a:hover { background: var(--azul-100); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; align-items: center;
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--header-h) + env(safe-area-inset-top) + 24px) 0 88px;
  color: var(--blanco); text-align: center;
}
.hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(3 49 78 / 0.72) 0%, rgb(3 49 78 / 0.62) 40%, rgb(3 49 78 / 0.9) 100%);
}
.hero__content { display: flex; flex-direction: column; align-items: center; }
.hero__logo {
  display: grid; place-items: center;
  width: 148px; height: 148px; margin-bottom: 20px; border-radius: 50%;
  background: var(--blanco); box-shadow: 0 10px 40px rgb(0 0 0 / 0.3);
}
.hero__logo img { width: 118px; }
.eyebrow {
  margin: 0 0 10px;
  font: 700 0.8125rem/1.4 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--terracota);
}
.eyebrow--light { color: var(--dorado); }
.hero__title { color: var(--blanco); font-size: clamp(2.125rem, 1.5rem + 3.4vw, 4rem); max-width: 16ch; }
.hero__lead { margin: 14px 0 28px; font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.3125rem); max-width: 34ch; color: rgb(255 255 255 / 0.92); }
.hero__actions { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 360px; }
.hero__note { margin-top: 18px; font-size: 0.875rem; color: rgb(255 255 255 / 0.85); }

@media (min-width: 640px) {
  .hero__actions { flex-direction: row; justify-content: center; max-width: none; width: auto; }
}
@media (min-width: 960px) {
  .hero { text-align: left; }
  .hero::before { background: linear-gradient(90deg, rgb(3 49 78 / 0.93) 0%, rgb(3 49 78 / 0.78) 45%, rgb(3 49 78 / 0.3) 100%); }
  .hero__content { align-items: flex-start; }
  .hero__actions { justify-content: flex-start; }
  .hero__logo { width: 168px; height: 168px; }
  .hero__logo img { width: 134px; }
}

/* ---------- Propuesta de valor ---------- */
.values { position: relative; z-index: 1; margin-top: -56px; }
.values__grid { display: grid; gap: 12px; }
.value {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px; border-radius: var(--radius);
  background: var(--blanco); box-shadow: var(--shadow);
}
.value__icon {
  display: grid; place-items: center; flex: none;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--azul); color: var(--dorado);
}
.value__icon .icon { width: 24px; height: 24px; }
.value__title { font-size: 1.125rem; margin-bottom: 4px; }
.value p { font-size: 0.9375rem; color: var(--texto-suave); }
@media (min-width: 768px) {
  .values__grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .value { flex-direction: column; padding: 28px; }
}

/* ---------- Secciones ---------- */
.section { padding-block: 72px; }
.section--ivory { background: var(--marfil); }
.section--blue { background: var(--azul); color: var(--blanco); }
.section__head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section__title { font-size: clamp(1.875rem, 1.4rem + 2.2vw, 2.75rem); margin-bottom: 14px; }
.section__lead { color: var(--texto-suave); font-size: 1.0625rem; }
@media (min-width: 960px) {
  .section { padding-block: 104px; }
  .section__head { margin-bottom: 56px; }
}

/* ---------- Nosotros ---------- */
.about { display: grid; gap: 40px; align-items: center; }
.about__text p { font-size: 1.0625rem; }
.quote {
  margin: 24px 0 0; padding: 4px 0 4px 20px;
  border-left: 4px solid var(--dorado);
  font: 600 1.25rem/1.45 var(--font-serif); color: var(--azul);
}
.about__media { position: relative; padding-bottom: 56px; }
.about__img { border-radius: var(--radius-lg); object-fit: cover; }
.about__img--main { width: 88%; aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.about__img--accent {
  position: absolute; right: 0; bottom: 0;
  width: 52%; aspect-ratio: 4 / 3;
  border: 6px solid var(--blanco); box-shadow: var(--shadow);
}
@media (min-width: 960px) {
  .about { grid-template-columns: 1fr 1.05fr; gap: 72px; }
}

/* ---------- Tarjetas de servicios ---------- */
.cards { display: grid; gap: 20px; }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); background: var(--blanco); box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
@media (min-width: 640px) { .card__img { aspect-ratio: 4 / 3; } }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 18px; }
.card__title { font-size: 1.375rem; margin-bottom: 8px; }
.card__body p { color: var(--texto-suave); }
.card__link {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  min-height: 48px; margin-top: auto; padding-top: 8px;
  font-weight: 700; text-decoration: none; color: var(--azul);
}
.card__link .icon { transition: transform 0.2s var(--ease); }
.card__link:hover { text-decoration: underline; text-decoration-color: var(--dorado); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.card__link:hover .icon { transform: translateX(4px); }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .cards { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Proceso (línea de tiempo) ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: paso; display: grid; gap: 0; }
.step {
  position: relative; counter-increment: paso;
  padding: 0 0 32px 72px;
}
.step::before {
  content: counter(paso);
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--azul); color: var(--dorado);
  font: 600 1.375rem/1 var(--font-serif);
  box-shadow: 0 0 0 6px var(--blanco), 0 0 0 7px rgb(5 70 110 / 0.15);
}
.step::after {
  content: ""; position: absolute; left: 25px; top: 60px; bottom: 6px;
  width: 2px; background: linear-gradient(var(--dorado), rgb(246 178 50 / 0.25));
}
.step:last-child { padding-bottom: 0; }
.step:last-child::after { display: none; }
.step__title { font-size: 1.1875rem; margin: 12px 0 6px; }
.step p { color: var(--texto-suave); }
@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(5, 1fr); gap: 24px; }
  .step { padding: 76px 0 0; text-align: center; }
  .step::before { left: 50%; transform: translateX(-50%); }
  .step::after { left: calc(50% + 40px); right: calc(-50% - 24px + 40px); top: 25px; bottom: auto; width: auto; height: 2px; }
  .step:last-child::after { display: none; }
  .step__title { margin-top: 0; }
}

/* ---------- Galería ---------- */
.gallery { columns: 2; column-gap: 12px; }
.gallery__item {
  display: block; margin-bottom: 12px; overflow: hidden;
  border-radius: var(--radius-sm); break-inside: avoid;
  box-shadow: var(--shadow-sm); background: var(--azul-100);
}
.gallery__item img { width: 100%; transition: transform 0.5s var(--ease); }
.gallery__item:hover img { transform: scale(1.04); }
@media (min-width: 768px) { .gallery { columns: 3; column-gap: 16px; } .gallery__item { margin-bottom: 16px; border-radius: var(--radius); } }

/* ---------- Misión y Visión ---------- */
.mv { display: grid; gap: 20px; }
.mv__card {
  padding: 32px 28px; border-radius: var(--radius);
  background: rgb(255 255 255 / 0.06); border: 1px solid rgb(255 255 255 / 0.16);
}
.mv__label {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  font: 600 1.625rem/1.2 var(--font-serif); color: var(--dorado);
}
.mv__label::before { content: ""; width: 32px; height: 3px; border-radius: 3px; background: var(--dorado); }
.mv__text { font-size: 1.1875rem; line-height: 1.6; color: rgb(255 255 255 / 0.94); }
@media (min-width: 768px) { .mv { grid-template-columns: 1fr 1fr; gap: 28px; } .mv__card { padding: 40px; } }

/* ---------- Contacto ---------- */
.contact { display: grid; gap: 40px; align-items: center; }
.contact__portrait { position: relative; margin: 0 auto; width: min(280px, 78%); }
.contact__portrait::before {
  content: ""; position: absolute; inset: 16px -16px -16px 16px; z-index: -1;
  border-radius: var(--radius-lg); background: var(--dorado);
}
.contact__portrait img { position: relative; border-radius: var(--radius-lg); aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; box-shadow: var(--shadow); }
.contact__text > p { font-size: 1.0625rem; }
.signature { display: flex; flex-direction: column; margin: 20px 0 28px; }
.signature__name { font: 400 2.5rem/1.1 var(--font-script); color: var(--azul); }
.signature__role { font-size: 0.875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--terracota); }
.contact__actions { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 640px) {
  .contact__actions { flex-direction: row; flex-wrap: wrap; }
}
@media (min-width: 960px) {
  .contact { grid-template-columns: 0.8fr 1.2fr; gap: 80px; }
  .contact__portrait { width: 100%; max-width: 380px; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 48px 0 calc(104px + env(safe-area-inset-bottom));
  background: var(--azul-900); color: rgb(255 255 255 / 0.88);
}
.site-footer__inner { display: grid; gap: 28px; }
.site-footer__brand { display: flex; align-items: center; gap: 16px; }
.site-footer__name { margin: 0 0 2px; font: 600 1.375rem/1.2 var(--font-serif); color: var(--blanco); }
.site-footer__tag { font-size: 0.9375rem; }
.site-footer__contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer__contact a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--blanco); text-decoration: none; word-break: break-all;
}
.site-footer__contact a:hover { color: var(--dorado); }
.site-footer__contact .icon { color: var(--dorado); }
.site-footer__copy { margin: 0; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / 0.14); font-size: 0.875rem; color: rgb(255 255 255 / 0.75); }
@media (min-width: 960px) {
  .site-footer { padding-bottom: 48px; }
  .site-footer__inner { grid-template-columns: 1.4fr 1fr; align-items: center; }
  .site-footer__copy { grid-column: 1 / -1; }
}

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed; z-index: 60;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: grid; place-items: center;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa); color: var(--blanco);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.28), 0 0 0 3px var(--blanco);
  transition: transform 0.2s var(--ease);
}
.wa-float .icon { width: 32px; height: 32px; }
.wa-float:hover { transform: scale(1.06); }
.wa-float:focus-visible { outline-color: var(--azul); }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  margin: 0; padding: 0; border: 0;
  background: rgb(3 20 33 / 0.94); color: var(--blanco);
  overscroll-behavior: contain; touch-action: pan-y;
}
.lightbox::backdrop { background: rgb(3 20 33 / 0.7); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox__figure { margin: 0; padding: 72px 16px 56px; display: grid; justify-items: center; gap: 12px; }
.lightbox__img { max-width: min(100%, 1100px); max-height: calc(100svh - 160px); width: auto; border-radius: var(--radius-sm); user-select: none; -webkit-user-drag: none; }
.lightbox__caption { max-width: 60ch; text-align: center; font-size: 0.9375rem; color: rgb(255 255 255 / 0.85); }
.lightbox__counter { position: absolute; top: 22px; left: 20px; margin: 0; font-weight: 700; font-size: 0.9375rem; }
.lightbox__btn {
  position: absolute; display: grid; place-items: center;
  width: 52px; height: 52px; border: 0; border-radius: 50%;
  background: rgb(255 255 255 / 0.14); color: var(--blanco); cursor: pointer;
  transition: background-color 0.2s;
}
.lightbox__btn:hover { background: rgb(255 255 255 / 0.26); }
.lightbox__btn .icon { width: 26px; height: 26px; }
.lightbox__btn--close { top: 10px; right: 10px; }
.lightbox__btn--prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox__btn--next { right: 10px; top: 50%; transform: translateY(-50%); }
@media (max-width: 639px) {
  .lightbox__btn--prev, .lightbox__btn--next { top: auto; bottom: 12px; transform: none; }
}

/* ---------- Animaciones al hacer scroll (solo con JS y sin reducción de movimiento) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js .cards .reveal:nth-child(2), .js .values .reveal:nth-child(2), .js .steps .reveal:nth-child(2) { transition-delay: 0.08s; }
  .js .cards .reveal:nth-child(3), .js .values .reveal:nth-child(3), .js .steps .reveal:nth-child(3) { transition-delay: 0.16s; }
  .js .cards .reveal:nth-child(4), .js .steps .reveal:nth-child(4) { transition-delay: 0.24s; }
  .js .steps .reveal:nth-child(5) { transition-delay: 0.32s; }
}
