/* ============================================================
   Brevio — Landing del smoke test
   Registro editorial: Hueso claro, filetes, tipografía disciplinada.
   Tokens de marca "Velvet". Mobile-first.
   ============================================================ */

:root {
  /* Superficie y texto */
  --hueso:      #EEEEEE;  /* superficie base */
  --grafito:    #171514;  /* texto sobre hueso */
  --malva:      #A99086;  /* metadatos, filetes, puntos */
  --vino:       #3B1010;  /* chrome, acentos, hover de salida */
  --wine-black: #1A0505;  /* scrim */
  --crema:      #F6EEE6;  /* texto sobre vino */
  --rose:       #E9C7BF;  /* secundarios sobre vino (footer) */
  --filete-crema: rgba(246,238,230,0.22); /* divisores sobre vino */

  /* Derivados de trabajo */
  --filete:        rgba(169,144,134,0.40); /* filete fino entre filas */
  --filete-fuerte: rgba(169,144,134,0.55); /* filete de masthead/footer */
  --hueso-hover:   #E5DCC9;                 /* fila al pasar el cursor */
  --hueso-origin:  #E9E1D1;                 /* fila de origen (?flash=) */
  --hueso-pulse:   #E2D7C1;                 /* pico del pulso de resaltado */
  --texto-suave:   #5B534E;                 /* párrafos secundarios */

  /* Métricas */
  --col: 620px;      /* columna de lectura estrecha (desktop) */
  --thumb: 116px;    /* miniatura cuadrada fija, idéntica en todas las filas */
  --ease: cubic-bezier(.2,.6,.2,1);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--hueso);
  color: var(--grafito);
  font-family: Archivo, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--vino); text-decoration: none; }

/* Accesibilidad: quien tenga reduce-motion ve la página quieta */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============================ MASTHEAD ============================ */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--hueso);
  border-bottom: 1px solid var(--filete-fuerte);
}

.masthead__inner {
  max-width: var(--col);
  margin: 0 auto;
  padding: 20px 22px 16px;
  transition: padding 240ms var(--ease);
}

.masthead__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* wordmark SIEMPRE centrado al ancho completo */
  align-items: center;
  gap: 10px;
}

/* Toggle ES/EN (izquierda) */
.lang-toggle {
  justify-self: start;
  border: 0; background: none; padding: 4px 2px; cursor: pointer;
  font-family: Archivo, sans-serif;
  font-weight: 600; font-size: 10.5px; letter-spacing: 0.1em;
  color: var(--malva);
  transition: opacity 200ms ease;
}
.lang-toggle__sep, .lang-toggle__off { color: #CBBBB0; }
/* El idioma activo se pinta en malva; el inactivo, atenuado */

/* Wordmark (centro) */
.wordmark {
  justify-self: center;
  font-family: 'Bodoni Moda', serif;
  font-variation-settings: 'opsz' 14;
  font-weight: 600;
  font-size: 31px;
  line-height: 1;
  letter-spacing: 0.005em;
  color: var(--grafito);
  transition: font-size 240ms var(--ease);
}

/* Lupa (derecha) */
.icon-btn {
  border: 0; background: none; padding: 4px 2px; cursor: pointer;
  color: var(--vino); display: flex; align-items: center;
}
.search-open { justify-self: end; }

/* Descriptor + fecha del día */
.masthead__sub {
  text-align: center;
  margin-top: 13px;
  overflow: hidden;
  transition: max-height 240ms var(--ease), opacity 200ms ease, margin-top 240ms ease;
  max-height: 80px; opacity: 1;
}
.descriptor {
  font-family: Archivo, sans-serif;
  font-weight: 600; font-size: 10px; letter-spacing: 0.19em; text-transform: uppercase;
  color: var(--malva);
}
.today {
  margin-top: 7px;
  font-family: Archivo, sans-serif;
  font-weight: 500; font-size: 11px; letter-spacing: 0.03em;
  color: #B7A297;
  font-variant-numeric: tabular-nums;
}

/* --- Estado condensado (al hacer scroll) --- */
.masthead.is-condensed .masthead__inner { padding: 13px 22px; }
.masthead.is-condensed .wordmark { font-size: 19px; font-variation-settings: 'opsz' 12; }
.masthead.is-condensed .masthead__sub { max-height: 0; opacity: 0; margin-top: 0; }

/* --- Estado buscando --- */
.masthead.is-searching .masthead__sub { max-height: 0; opacity: 0; margin-top: 0; }
.masthead.is-searching .lang-toggle,
.masthead.is-searching .search-open { opacity: 0; pointer-events: none; }
.masthead.is-searching .wordmark { font-size: 19px; font-variation-settings: 'opsz' 12; color: #C6B6AB; }

/* Buscador editorial de filete */
.search { margin-top: 14px; }
.search__field {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--malva);
}
.search__icon { color: var(--malva); flex-shrink: 0; }
.search__input {
  flex: 1; min-width: 0;
  border: 0; background: none; padding: 0; margin: 0;
  font-family: Archivo, sans-serif; font-size: 16px; color: var(--grafito);
  letter-spacing: 0.005em;
}
.search__input:focus { outline: none; }
.search__input::placeholder { color: var(--malva); opacity: 1; }
.search__input::-webkit-search-cancel-button { display: none; }
.search-close { color: #8A756B; }
.search__status {
  margin-top: 9px;
  font-family: Archivo, sans-serif; font-size: 10.5px; letter-spacing: 0.02em;
  color: var(--malva);
}
.search__status strong { color: var(--grafito); font-weight: 500; }

/* ============================== FEED ============================== */

.feed {
  max-width: var(--col);
  margin: 0 auto;
  border-top: 1px solid var(--filete);
}
.feed__loading, .feed__empty {
  font-family: Archivo, sans-serif; font-size: 12px; color: var(--malva);
  padding: 28px 22px; text-align: center;
}

/* Fila = enlace editorial, sin caja */
.flash {
  display: flex;
  gap: 14px;
  align-items: stretch;
  padding: 19px 22px;
  color: var(--grafito);
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--filete);
  background-color: transparent;
  transition: background-color 180ms ease;
}
.flash__body { flex: 1; min-width: 0; }

.flash__kicker { display: flex; align-items: center; gap: 7px; }
.flash__dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.flash__cat {
  font-family: Archivo, sans-serif;
  font-weight: 600; font-size: 9.5px; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--grafito);
}

/* Titular: Bodoni, COMPLETO — nunca se trunca */
.flash__title {
  margin: 9px 0 0;
  font-family: 'Bodoni Moda', serif;
  font-variation-settings: 'opsz' 15;
  font-weight: 500; font-size: 19px; line-height: 1.2; letter-spacing: -0.003em;
  color: var(--grafito);
  text-wrap: pretty;
}

.flash__meta {
  margin-top: 10px;
  font-family: Archivo, sans-serif; font-size: 11.5px; color: var(--malva);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
}
.flash__readlink {
  color: var(--grafito); font-weight: 500; white-space: nowrap;
  transition: color 180ms ease;
}
.flash__readlink .ico-arrow {
  vertical-align: -1px; /* asienta la flecha sobre la línea base del texto */
  margin-left: 1px;
}

/* Miniatura: CUADRADO FIJO idéntico en todas las filas (116×116),
   centrado verticalmente respecto al alto del contenido de la fila.
   No se estira con el titular. */
.flash__thumb {
  width: var(--thumb);
  height: var(--thumb);
  align-self: center;
  flex-shrink: 0;
  overflow: hidden;
  background: repeating-linear-gradient(135deg, #CDC7BB 0 7px, #C6BFB3 7px 14px);
}
.flash__thumb img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 220ms var(--ease);
}

/* Hover: fila teñida, miniatura micro-zoom, salida a vino */
.flash:hover { background-color: var(--hueso-hover); }
.flash:hover .flash__readlink { color: var(--vino); }
.flash:hover .flash__thumb img { transform: scale(1.07); }

/* Scroll-in: fade + leve subida (se activa vía JS con IntersectionObserver) */
.flash.reveal { opacity: 0; transform: translateY(10px); }
.flash.reveal.in {
  opacity: 1; transform: none;
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}

/* Fila de origen (?flash=): fondo cálido + filete vino a la izquierda + pulso */
.flash--origin {
  background-color: var(--hueso-origin);
  border-left-color: var(--vino);
}
.flash--origin.pulse { animation: brPulse 1300ms ease 1; }
@keyframes brPulse {
  0%, 100% { background-color: var(--hueso-origin); }
  42%      { background-color: var(--hueso-pulse); }
}

/* Filtro de búsqueda: las que no casan se ocultan por completo */
.flash.is-hidden { display: none; }

/* Resaltado del término buscado dentro del titular */
mark.flash__hl {
  background: transparent;
  color: var(--vino);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(59, 16, 16, 0.45);
}

/* ============================= FOOTER ============================= */

/* Footer invertido: fondo CAMPO VINO, texto en crema/rosé.
   Se mantiene el filete de separación con el feed (border-top malva). */
.footer {
  border-top: 1px solid var(--malva);
  margin-top: 8px;
  background: var(--vino);
  color: var(--crema);
}
.footer__inner {
  max-width: var(--col);
  margin: 0 auto;
  padding: 34px 24px 44px;
}

.footer__title {
  margin: 0;
  font-family: 'Bodoni Moda', serif;
  font-variation-settings: 'opsz' 34;
  font-weight: 500; font-size: 27px; line-height: 1.12; letter-spacing: -0.006em;
  color: var(--crema);
  max-width: 15ch;
}
.footer__lede {
  margin: 14px 0 0;
  font-family: Archivo, sans-serif; font-size: 13px; line-height: 1.55;
  color: var(--rose); max-width: 46ch; text-wrap: pretty;
}

/* Waitlist */
.waitlist {
  margin-top: 30px; padding-top: 26px;
  border-top: 1px solid var(--filete-crema);
}
.waitlist__eyebrow {
  font-family: Archivo, sans-serif;
  font-weight: 600; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--rose);
}
.waitlist__pitch {
  margin: 9px 0 0;
  font-family: 'Bodoni Moda', serif; font-variation-settings: 'opsz' 20;
  font-weight: 500; font-size: 19px; line-height: 1.25; color: var(--crema);
  max-width: 24ch;
}
.waitlist__form {
  display: flex; align-items: center; gap: 12px;
  margin-top: 18px; padding-bottom: 10px;
  border-bottom: 1px solid var(--rose);
}
.waitlist__input {
  flex: 1; min-width: 0;
  border: 0; background: none; padding: 0;
  font-family: Archivo, sans-serif; font-size: 15px; color: var(--crema);
}
.waitlist__input:focus { outline: none; }
.waitlist__input::placeholder { color: var(--rose); opacity: 0.8; }
/* Botón invertido: sobre vino, en crema con texto vino, para que resalte */
.waitlist__btn {
  border: 0; background: var(--crema); color: var(--vino); cursor: pointer;
  font-family: Archivo, sans-serif;
  font-weight: 600; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 9px 15px;
  display: flex; align-items: center; gap: 7px;
  transition: background-color 160ms ease;
}
.waitlist__btn:hover { background: var(--rose); }
.waitlist__arrow { font-size: 13px; line-height: 1; }
.waitlist__consent {
  margin: 11px 0 0;
  font-family: Archivo, sans-serif; font-size: 10.5px; line-height: 1.4; color: var(--rose);
}
.waitlist__consent a {
  color: var(--rose); text-decoration: underline; text-underline-offset: 2px;
  text-decoration-color: rgba(233,199,191,0.6);
}
.waitlist__done {
  margin: 12px 0 0;
  font-family: Archivo, sans-serif; font-size: 12px; color: var(--crema); font-weight: 500;
}

/* Sociales */
.social {
  display: flex; align-items: center; gap: 20px;
  margin-top: 30px; padding-top: 24px;
  border-top: 1px solid var(--filete-crema);
}
.social__link {
  color: var(--crema); display: flex; align-items: center; gap: 8px;
  transition: color 160ms ease;
}
.social__link span {
  font-family: Archivo, sans-serif; font-size: 12px; font-weight: 500;
}
.social__link:hover { color: var(--rose); }

/* Legal + cierre */
.footer__legal {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 26px; padding-top: 18px;
  border-top: 1px solid var(--filete-crema);
}
.footer__legal a {
  font-family: Archivo, sans-serif; font-size: 11px; color: var(--rose);
}
.footer__sig {
  font-family: 'Bodoni Moda', serif; font-variation-settings: 'opsz' 10;
  font-weight: 600; font-size: 12px; letter-spacing: 0.02em; color: var(--rose);
}

/* ============================ RESPONSIVE ============================
   Mobile-first por defecto. En desktop mantenemos la columna estrecha y
   centrada (no rejilla multicolumna): solo aire y algo más de escala. */
@media (min-width: 720px) {
  .masthead__inner { padding: 26px 22px 18px; }
  .wordmark { font-size: 34px; }
  .flash__title { font-size: 21px; }
  .footer__title { font-size: 30px; }
}
