/* ==========================================================
   Q de Lima - styles.css
   Paleta y tipografía tomadas de la marca original.
   ========================================================== */

@font-face {
  font-family: "Gravtac";
  src: url("assets/fonts/Gravtrac-Bd-Comp.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color */
  --crema: #fdf5e6;      /* fondo principal */
  --arena: #fdecd1;      /* cabecera y bloques cálidos */
  --tinta: #1e2a47;      /* texto y botones, azul profundo del logo */
  --pizarra: #7a839a;    /* líneas y detalles */
  --blanco: #fffaf0;

  /* Tipografía */
  --font-display: "Gravtac", "Arial Narrow", Impact, sans-serif;
  --font-body: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;

  --step-0: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  --step-1: clamp(1.25rem, 1.1rem + 0.6vw, 1.55rem);
  --step-2: clamp(2rem, 1.5rem + 2.2vw, 3.2rem);
  --step-3: clamp(2.6rem, 1.6rem + 5vw, 5.6rem);

  /* Espaciado */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4rem, 9vw, 8rem);
  --header-h: 7.5rem;
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--crema);
  color: var(--tinta);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

h2 { font-size: var(--step-2); }

p { margin: 0 0 1em; max-width: 62ch; }

a { color: inherit; text-underline-offset: 0.2em; }

:focus-visible {
  outline: 3px solid var(--tinta);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.6rem 1rem;
  background: var(--tinta);
  color: var(--crema);
  z-index: 100;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.lead {
  font-size: var(--step-1);
  line-height: 1.4;
  font-style: italic;
}

/* ---------- Botones ---------- */

.button {
  display: inline-block;
  padding: 0.8em 1.6em;
  background: var(--tinta);
  color: var(--crema);
  border: 2px solid var(--tinta);
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.button:hover { background: transparent; color: var(--tinta); }

.button--ghost {
  background: transparent;
  color: var(--crema);
  border-color: var(--crema);
}
.button--ghost:hover { background: var(--crema); color: var(--tinta); }

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 0.5rem var(--gutter);
  background: var(--arena);
  border-bottom: 1px solid var(--pizarra);
}

.site-header__logo img { width: auto; height: 5.5rem; }

.site-nav { display: flex; gap: clamp(1.25rem, 4vw, 2.75rem); }

.site-nav a {
  padding: 0.4rem 0;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--tinta); }

@media (max-width: 560px) {
  :root { --header-h: 9.5rem; }
  .site-header { justify-content: center; }
}

/* ---------- Inicio ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: calc(100svh - var(--header-h));
  min-height: calc(100vh - var(--header-h));
  color: var(--crema);
  background: var(--tinta);
  overflow: hidden;
}

/* La capa oscura va sobre las fotos para que el texto se lea */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(20 28 50 / 0.85) 0%, rgb(20 28 50 / 0.35) 55%, rgb(20 28 50 / 0.15) 100%);
}

.hero__slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: slide 20s infinite;
}
.hero__slides img:nth-child(1) { animation-delay: 0s; }
.hero__slides img:nth-child(2) { animation-delay: 5s; }
.hero__slides img:nth-child(3) { animation-delay: 10s; }
.hero__slides img:nth-child(4) { animation-delay: 15s; }

@keyframes slide {
  0%   { opacity: 0; }
  5%   { opacity: 1; }
  25%  { opacity: 1; }
  30%  { opacity: 0; }
  100% { opacity: 0; }
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 78rem;
  margin: 0 auto;
  padding: var(--section) var(--gutter) clamp(2.5rem, 6vw, 5rem);
}

.hero h1 {
  max-width: 14ch;
  margin-bottom: 0.45em;
  font-size: var(--step-3);
  text-wrap: balance;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }

/* ---------- Nosotros ---------- */

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  max-width: 82rem;
  margin: 0 auto;
  padding: var(--section) var(--gutter);
}

.about__image img {
  width: 100%;
  border-radius: 4px;
}

@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .about__image { order: -1; }
}

/* ---------- Carta ---------- */

.menu {
  padding: var(--section) 0;
  background: var(--arena);
  border-top: 1px solid var(--pizarra);
  border-bottom: 1px solid var(--pizarra);
}

.menu__intro {
  max-width: 82rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.menu__gallery {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  padding: 0.5rem var(--gutter) 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-color: var(--tinta) transparent;
}

.menu__gallery img {
  flex: 0 0 clamp(14rem, 28vw, 18rem);
  width: clamp(14rem, 28vw, 18rem);
  height: auto;
  scroll-snap-align: start;
  border: 1px solid var(--pizarra);
  border-radius: 4px;
  background: var(--blanco);
}

.menu__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 82rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
  list-style: none;
}

.menu__closing {
  max-width: 82rem;
  margin: 2.5rem auto 0;
  padding: 0 var(--gutter);
  font-family: var(--font-display);
  font-size: var(--step-1);
}

/* ---------- Contacto ---------- */

.contact { padding-top: var(--section); }

.contact__grid {
  display: grid;
  grid-template-columns: 4fr 5fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
  max-width: 82rem;
  margin: 0 auto;
  padding: 0 var(--gutter) var(--section);
}

.contact__image img {
  width: 100%;
  border-radius: 4px;
}

.contact__details {
  margin: 0 0 2rem;
  font-style: normal;
  font-weight: 700;
}
.contact__details p { margin: 0 0 0.35em; }

.form { display: grid; gap: 0.35rem; max-width: 34rem; }

.form label { margin-top: 0.75rem; font-weight: 700; }

.form input[type="text"],
.form input[type="email"],
.form textarea {
  width: 100%;
  padding: 0.75em 1em;
  border: 1px solid var(--pizarra);
  border-radius: 8px;
  background: var(--blanco);
  color: inherit;
  font: inherit;
}

.form .button { justify-self: start; margin-top: 1.25rem; }

@media (max-width: 860px) {
  .contact__grid { grid-template-columns: 1fr; }
}

.map iframe {
  display: block;
  width: 100%;
  height: clamp(18rem, 40vw, 28rem);
  border: 0;
}

/* ---------- Pie ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2.5rem;
  padding: 1.5rem var(--gutter);
  background: var(--tinta);
  color: var(--crema);
}

.site-footer__logo { width: auto; height: 5rem; }

.site-footer__legal { flex: 1 1 18rem; margin: 0; font-size: 0.95rem; }

.site-footer__social {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 700;
}

.site-footer a:focus-visible { outline-color: var(--crema); }

/* ---------- Movimiento reducido ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__slides img { animation: none; }
  .hero__slides img:first-child { opacity: 1; }
  .button { transition: none; }
}

/* ==========================================================
   Libro de Reclamaciones
   ========================================================== */

[hidden] { display: none !important; }

.claims {
  max-width: 46rem;
  margin: 0 auto;
  padding: var(--section) var(--gutter);
}

.claims h1 { font-size: var(--step-2); }

.provider {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--tinta);
  background: var(--arena);
}
.provider div { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.provider dt { min-width: 9rem; font-weight: 700; }
.provider dd { margin: 0; }

.claims__form { max-width: none; gap: 2rem; }

.claims__form fieldset {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0 0 1.5rem;
  border: 0;
  border-bottom: 1px solid var(--pizarra);
}

.claims__form legend {
  padding: 0;
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
  font-size: var(--step-1);
}

/* Subgrupos de opciones (Sí/No, Producto/Servicio, Reclamo/Queja) */
.claims__form fieldset.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 0.75rem;
  padding: 0;
  border: 0;
}
.claims__form fieldset.choice legend {
  width: 100%;
  margin-bottom: 0.25rem;
  font-family: var(--font-body);
  font-size: inherit;
  font-weight: 700;
}
.claims__form fieldset.choice label { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-weight: 400; }

.claims__form input[type="radio"] { width: 1.15rem; height: 1.15rem; accent-color: var(--tinta); }

.form input[type="tel"],
.form input[type="date"],
.form select {
  width: 100%;
  padding: 0.75em 1em;
  border: 1px solid var(--pizarra);
  border-radius: 8px;
  background: var(--blanco);
  color: inherit;
  font: inherit;
}

.definitions { margin: 0.5rem 0 0.5rem; padding-left: 1.25rem; font-size: 0.95em; }
.definitions li { margin-bottom: 0.25rem; }

.claims__notice { max-width: none; margin: 0; font-size: 0.95em; }

.form-status { min-height: 1.5em; margin: 0; font-weight: 700; }
.form-status--ok { color: #1d5c34; }
.form-status--error { color: #9b1c1c; }

.button:disabled { opacity: 0.6; cursor: wait; }

/* Pie: dirección legal y enlace al libro */
.site-footer__legal p { margin: 0 0 0.35em; }
.site-footer__legal a { font-weight: 700; }