/* ==========================================================================
   La Buena — base de estilos
   Paso 1: fundamentos y paleta. El diseño fino llega en el Paso 3.
   Mobile-first: todo se escribe primero para móvil, porque ahí es donde
   la gente abrirá esta web, de camino al mercado.
   ========================================================================== */

:root {
  /* Paleta: sacada de una paella de verdad, no de una plantilla */
  --charcoal: #241f1c;      /* el hierro de la paellera */
  --ink: #14100e;
  --saffron: #e9a13b;       /* azafrán */
  --saffron-deep: #c9832a;
  --terracotta: #c05a34;
  --olive: #6b7148;
  --cream: #fbf5e9;
  --cream-warm: #f4e9d4;
  --white: #fffdf9;

  --text: var(--ink);
  --text-soft: #5c524b;
  --line: rgba(36, 31, 28, 0.12);

  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: ui-serif, Georgia, "Times New Roman", serif;

  --wrap: 68rem;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(36, 31, 28, .06), 0 8px 24px -12px rgba(36, 31, 28, .18);

  --step: clamp(2.5rem, 8vw, 5rem);
}

/* --- Reset mínimo ------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--terracotta); text-underline-offset: .18em; }
a:hover { color: var(--saffron-deep); }

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

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--charcoal);
  color: var(--cream);
  padding: .75rem 1.25rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* --- Botones ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 3rem;            /* área táctil cómoda en móvil */
  padding: .75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--terracotta);
  color: var(--white);
  box-shadow: var(--shadow);
}
.btn--primary:hover { background: #a94a29; color: var(--white); }

.btn--ghost {
  border: 1.5px solid var(--line);
  color: var(--charcoal);
  background: transparent;
}
.btn--ghost:hover { border-color: var(--charcoal); color: var(--charcoal); }

/* --- Cabecera ----------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 245, 233, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}

/* El logo YA lleva el nombre "La Buena" dentro, así que no se repite en texto
   al lado: quedaba escrito dos veces. Es una marca-escudo, no un logo
   horizontal, por eso necesita algo de alto para que se lea el rótulo. */
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
  padding: .25rem 0;
}
.brand__logo {
  height: 2.75rem;
  width: auto;
  transition: transform .25s ease;
}
.brand:hover .brand__logo { transform: scale(1.04); }

@media (min-width: 48rem) {
  .brand__logo { height: 3.25rem; }
}

.nav { display: none; gap: 1.5rem; }
.nav a {
  color: var(--charcoal);
  text-decoration: none;
  font-weight: 500;
  font-size: .9375rem;
}
.nav a:hover { color: var(--terracotta); }

.lang { display: flex; gap: .25rem; font-size: .8125rem; font-weight: 600; }
.lang a {
  color: var(--text-soft);
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: 6px;
}
.lang a[aria-current] { background: var(--charcoal); color: var(--cream); }

@media (min-width: 48rem) {
  .nav { display: flex; }
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  background: var(--charcoal);
  color: var(--cream);
  padding-block: var(--step);
}

.hero__kicker {
  font-size: .8125rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: .75rem;
}

.hero__title {
  font-size: clamp(2.125rem, 7vw, 3.75rem);
  color: var(--cream);
  max-width: 18ch;
}

.hero__subtitle {
  font-size: clamp(1.0625rem, 2.5vw, 1.25rem);
  color: rgba(251, 245, 233, .78);
  max-width: 46ch;
  margin-bottom: 2rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero .btn--ghost { border-color: rgba(251, 245, 233, .35); color: var(--cream); }
.hero .btn--ghost:hover { border-color: var(--cream); color: var(--cream); }

/* --- Bloque "¿dónde estamos hoy?" --------------------------------------- */

.today { padding-block: var(--step); }

.today__heading {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin-bottom: 1.5rem;
}

.today__panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--saffron);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}
.today__panel.is-closed { border-left-color: var(--text-soft); }

.today__status,
.today__next-label {
  font-size: .8125rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: .25rem;
}

.today__city {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 600;
  line-height: 1.05;
  margin-bottom: .25rem;
}

.today__place { font-size: 1.0625rem; margin-bottom: .25rem; }
.today__hours { font-variant-numeric: tabular-nums; color: var(--text-soft); }
.today__note { color: var(--text-soft); max-width: 44ch; }
.today__route { margin-top: .75rem; }

/* --- Calendario semanal ------------------------------------------------- */

.markets {
  display: grid;
  gap: .75rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 40rem) {
  .markets { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 64rem) {
  .markets { grid-template-columns: repeat(4, 1fr); }
}

.market {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
}

.market.is-today {
  border-color: var(--saffron);
  background: var(--cream-warm);
  box-shadow: 0 0 0 2px var(--saffron);
}

.market--rest { background: transparent; border-style: dashed; }

.market__badge {
  position: absolute;
  top: -.625rem;
  left: 1.25rem;
  background: var(--saffron);
  color: var(--charcoal);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .1875rem .5rem;
  border-radius: 999px;
}

.market__day {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: .125rem;
}

.market__city {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: .125rem;
}

.market__place,
.market__hours,
.market__note {
  font-size: .9375rem;
  color: var(--text-soft);
  margin-bottom: .25rem;
}
.market__hours { font-variant-numeric: tabular-nums; }

.market__route {
  display: inline-block;
  margin-top: .5rem;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--terracotta);
}

.link-more { font-weight: 600; }

/* --- Cabecera de página interior ---------------------------------------- */

.page-head { padding-block: var(--step) 0; }
.page-head h1 { font-size: clamp(2rem, 6vw, 3rem); }
.lede { font-size: 1.125rem; color: var(--text-soft); max-width: 52ch; }

/* --- Pie ---------------------------------------------------------------- */

.site-footer {
  background: var(--charcoal);
  color: rgba(251, 245, 233, .75);
  padding-block: var(--step) 1.5rem;
  margin-top: var(--step);
  font-size: .9375rem;
}

.site-footer__inner {
  display: grid;
  gap: 2rem;
}
@media (min-width: 44rem) {
  .site-footer__inner { grid-template-columns: 1.4fr 1fr 1fr; }
}

.site-footer h2 {
  font-family: var(--font-body);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: .75rem;
}

.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { color: var(--saffron); text-decoration: underline; }
.site-footer li { margin-bottom: .375rem; }
.site-footer__brand img { width: 3rem; margin-bottom: .75rem; }
.site-footer .legal { color: rgba(251, 245, 233, .6); }

.site-footer__base {
  border-top: 1px solid rgba(251, 245, 233, .14);
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  font-size: .8125rem;
  color: rgba(251, 245, 233, .5);
}
