/* ==========================================================================
   MYNISTIK · DISEÑO QUIET ARCHIVAL
   Tokens de diseño derivados de stitch_curated_vintage_boutique_suite/quiet_archival/DESIGN.md
   Orden: 1) fuentes 2) color 3) tipografia 4) espaciado 5) elevacion 6) base
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FUENTES
   Autoalojadas en assets/fonts (ver tools/download-fonts.mjs).
   Si los .woff2 aun no existen, el navegador cae con elegancia a los
   fallbacks del sistema definidos en cada token de tipografia.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/playfair-display-latin-400-500.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/playfair-display-latin-italic-400.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/manrope-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/manrope-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/manrope-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/manrope-latin-700.woff2") format("woff2");
}

/* --------------------------------------------------------------------------
   2. COLOR
   Paleta calida y mineral: alabastro, tinta calida, taupe y arena.
   -------------------------------------------------------------------------- */
:root {
  /* Superficies */
  --surface: #faf8f5;
  --surface-alabaster: #f5f2eb;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f5f3f0;
  --surface-container: #efeeeb;
  --surface-container-high: #eae8e5;
  --surface-container-highest: #e4e2df;
  --surface-dim: #dbdad7;

  /* Tinta y texto */
  --ink: #1a1918;
  --onyx-deep: #121110;
  --charcoal-soft: #2c2a29;
  --on-surface-variant: #4a4640;
  --text-muted: #736e67;
  --outline: #7b766f;
  --outline-variant: #ccc5bd;
  --inverse-surface: #30312f;
  --inverse-on-surface: #f2f0ed;
  --on-primary: #faf8f5;

  /* Acentos */
  --secondary: #8c7d70;
  --secondary-taupe: #695c50;
  --secondary-container: #efdccd;
  --tertiary-sand: #c8b8a6;
  --status-archival: #5a524a;

  /* Bordes */
  --border-hairline: #e5dfd7;
  --border-muted: #dcd5cd;
  --border-strong: #c8c0b6;

  /* Estados */
  --error: #ba1a1a;
  --on-error: #ffffff;
  --error-container: #ffdad6;
  --on-error-container: #93000a;

  /* Etiquetas de curaduria */
  --badge-curation-bg: #efece6;
  --badge-verified-bg: #dcd5cd;
  --badge-verified-text: #2c2a29;

  /* Tipografia */
  --font-display: "Playfair Display", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-sans: "Manrope", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  /* Espaciado */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --gutter: 1.5rem;
  --gutter-desktop: 2.5rem;
  --margin: 1.25rem;
  --margin-desktop: 4rem;
  --max-width: 1440px;
  --header-height: 73px;

  /* Movimiento */
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 200ms;
  --duration-slow: 400ms;

  /* Elevacion: solo overlays, nunca tarjetas */
  --shadow-whisper: 0 20px 48px -12px rgba(26, 25, 24, 0.08);
  --shadow-whisper-strong: 0 24px 60px -16px rgba(26, 25, 24, 0.14);
}

/* --------------------------------------------------------------------------
   3. TIPOGRAFIA
   Serif editorial para narrativa, grotesca para interfaz y metadatos.
   -------------------------------------------------------------------------- */
html {
  -webkit-text-size-adjust: 100%;
  /* El cajon de la bolsa y los modales viven fuera del viewport cuando estan
     cerrados. Con clip no generan scroll horizontal ni barra fantasma. */
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 26px;
  font-weight: 400;
  color: var(--ink);
  background-color: var(--surface);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.display-hero {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: -0.01em;
}
.headline-lg {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.28;
}
.headline-md {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.3;
}
.headline-sm {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.36;
}
.editorial-italic {
  font-family: var(--font-display);
  font-size: 20px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
}
.body-lg {
  font-size: 16px;
  line-height: 26px;
}
.body-md {
  font-size: 14px;
  line-height: 22px;
}
.body-sm {
  font-size: 12px;
  line-height: 18px;
}
.label-md {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0.04em;
}
.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.eyebrow-tight {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.badge-curation {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.mono-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

@media (min-width: 768px) {
  .display-hero {
    font-size: 56px;
    line-height: 68px;
    letter-spacing: -0.02em;
  }
  .headline-lg {
    font-size: 40px;
    line-height: 50px;
    letter-spacing: -0.01em;
  }
  .headline-md {
    font-size: 28px;
    line-height: 36px;
  }
}

/* --------------------------------------------------------------------------
   4. BASE Y RESET
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  border-radius: 0;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

hr {
  border: 0;
  border-top: 1px solid var(--border-hairline);
}

::selection {
  background-color: var(--ink);
  color: var(--surface);
}

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

/* Accesibilidad */
.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: -9999px;
  top: 0;
  z-index: 200;
  padding: var(--space-md) var(--space-lg);
  background: var(--ink);
  color: var(--on-primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.skip-link:focus {
  left: 0;
}

/* El atributo hidden debe ganar siempre. Sin esto, cualquier clase con
   display propio (tarjetas, chips, filas) anula el filtrado por hidden. */
[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   5. LAYOUT
   Grilla fluida 12/8/4 con margenes generosos.
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 480px) {
  .shell {
    padding-inline: var(--margin);
  }
}

@media (min-width: 768px) {
  .shell {
    padding-inline: 2rem;
  }
}

@media (min-width: 1024px) {
  .shell {
    padding-inline: var(--margin-desktop);
  }
}

.section {
  padding-block: var(--space-2xl);
  border-bottom: 1px solid var(--border-hairline);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-3xl);
  }
}

.section--alabaster {
  background-color: var(--surface-alabaster);
}

.section--flush {
  border-bottom: 0;
  padding-bottom: 0;
}

/* --------------------------------------------------------------------------
   GRILLAS
   --------------------------------------------------------------------------
   .grid--3 la usa la tienda. En movil va a DOS columnas: con una sola, el
   catalogo se hace interminable y no se puede comparar una pieza con otra.
   Si la pantalla es muy estrecha (menos de 360 px) se cae a una columna, para
   que las tarjetas no queden del ancho de un sello.
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--gutter);
}

@media (min-width: 768px) {
  .grid {
    gap: var(--gutter-desktop);
  }
}

.grid--2 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
.grid--3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid--4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid--12 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

/* Pantallas muy estrechas: una sola columna */
@media (max-width: 359px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

@media (min-width: 700px) {
  .grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid--4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .grid--12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}

.stack > * + * {
  margin-top: var(--space-md);
}

.rule {
  border-top: 1px solid var(--border-hairline);
}

.text-muted {
  color: var(--text-muted);
}
.text-center {
  text-align: center;
}
