/* Bihari · base común: tipografía, color y componentes compartidos */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-italic-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Color de marca */
  --hari: #434f33;          /* verde oliva: tinta principal */
  --hari-suave: #5d6849;    /* texto secundario */
  --hari-tenue: #8a917a;    /* textos de apoyo */
  --krema: #f3f2e3;         /* fondo */
  --papel: #fbfaf2;         /* superficies elevadas */
  --lila: #e6cdf8;
  --eguzki: #e8da08;        /* el punto de la i: solo como señal */
  --teja: #a9654e;
  --linea: #d9d8c3;
  --linea-fuerte: #b9bba3;

  /* Tipografía */
  --f-display: "the-seasons", "Cormorant Garamond", Georgia, serif;
  --f-texto: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Forma: la esquina redondeada de las muestras del catálogo */
  --esquina: 2px 22px 2px 2px;
  --esquina-s: 2px 12px 2px 2px;
  --esquina-l: 3px 40px 3px 3px;

  /* Movimiento */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-cajon: cubic-bezier(0.32, 0.72, 0, 1);

  --ancho: 1240px;
  --pad: clamp(20px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--krema);
  color: var(--hari);
  font-family: var(--f-texto);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--hari); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--lila); color: var(--hari); }

[hidden] { display: none !important; }
.oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

dialog { border: 0; padding: 0; margin: auto; background: transparent; color: inherit; max-width: none; max-height: none; }

/* Titulares */
.display {
  font-family: var(--f-display);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.02;
  margin: 0;
}
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -0.005em; }

/* Botones con la etiqueta de costura */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: var(--esquina);
  background: var(--hari);
  color: var(--krema);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, opacity 200ms ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.boton:active { transform: scale(0.97); }
.boton[disabled], .boton[aria-disabled="true"] { opacity: 0.38; pointer-events: none; }
.boton--claro { background: transparent; color: var(--hari); box-shadow: inset 0 0 0 1px var(--linea-fuerte); }
.boton--lila { background: var(--lila); color: var(--hari); }
@media (hover: hover) and (pointer: fine) {
  .boton:hover { background: #38422a; }
  .boton--claro:hover { background: rgba(67, 79, 51, 0.06); }
  .boton--lila:hover { background: #dcbff2; }
}

.enlace {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--linea-fuerte);
  transition: text-decoration-color 200ms ease;
}
@media (hover: hover) { .enlace:hover { text-decoration-color: currentColor; } }

/* Puntada: línea discontinua de costura */
.puntada { border: 0; height: 0; border-top: 1.5px dashed var(--linea-fuerte); margin: 0; }

/* Logo */
.logo { display: inline-block; color: var(--hari); line-height: 0; }
.logo svg { width: 100%; height: auto; }
.logo .punto { fill: var(--eguzki); }

/* Aviso tipo tostada */
.tostada {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 90;
  max-width: min(92vw, 460px);
  padding: 14px 18px;
  border-radius: var(--esquina);
  background: var(--hari);
  color: var(--krema);
  font-size: 14px;
  display: flex;
  gap: 16px;
  align-items: center;
  transform: translate(-50%, 0);
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
}
.tostada[hidden] { display: none; }
.tostada.saliendo { opacity: 0; transform: translate(-50%, 12px); }
@starting-style { .tostada { opacity: 0; transform: translate(-50%, 12px); } }
.tostada button { color: var(--eguzki); font-weight: 600; white-space: nowrap; }

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

/* ---------- Idioma: ES · EU ---------- */

.idioma { display: flex; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; }
.idioma a { padding: 6px 8px; border-radius: 2px 8px 2px 2px; color: var(--hari-tenue); text-decoration: none; transition: color 160ms ease, background-color 160ms ease; }
.idioma a[aria-current] { color: var(--hari); background-color: rgba(67, 79, 51, 0.08); }
@media (hover: hover) { .idioma a:not([aria-current]):hover { color: var(--hari); } }
