/* ============================================================
   EPN STORE · Manual Mayorista
   Sistema de diseño — "Editorial verde profundo"
   Paleta tomada de mayoristas.epnstore.com.ar
   ============================================================ */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Verdes de marca */
  --verde-950: #001B0F;
  --verde-900: #002E1A;   /* fondo profundo — base del sitio */
  --verde-800: #05412A;
  --verde-700: #09583B;   /* verde institucional EPN */
  --verde-600: #1E8A5C;   /* verde vivo — barra superior de la tienda */
  --verde-400: #4FB585;
  --verde-200: #A8DCC3;
  --verde-050: #E8F4EE;

  /* Bronce / dorado — acento principal */
  --bronce-700: #6F4526;
  --bronce-600: #8A5A34;
  --bronce-500: #A67246;  /* acento dominante */
  --bronce-400: #C08F5F;
  --bronce-200: #E4C9AC;
  --dorado-500: #DC8F38;
  --dorado-300: #F0C88A;

  /* Neutros tibios */
  --papel:      #FBF8F1;  /* fondo claro de lectura */
  --papel-alt:  #F4EFE4;
  --crema:      #FFF9D9;  /* resaltado */
  --blanco:     #FFFFFF;
  --tinta:      #191814;
  --gris-700:   #333333;
  --gris-500:   #6E6A5F;
  --gris-400:   #9A958A;
  --gris-300:   #DDD8CB;
  --gris-200:   #EBE6DA;

  /* Semánticos */
  --alerta:     #C2410C;
  --alerta-bg:  #FDF0E8;
  --ok:         #09583B;
  --ok-bg:      #E8F4EE;

  /* Tipografía */
  --sans: 'Montserrat', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;

  --t-display: clamp(2.75rem, 8.5vw, 6rem);
  --t-h1:      clamp(2.1rem, 5.5vw, 3.6rem);
  --t-h2:      clamp(1.65rem, 4vw, 2.6rem);
  --t-h3:      clamp(1.2rem, 2.4vw, 1.5rem);
  --t-h4:      clamp(1.05rem, 1.8vw, 1.2rem);
  --t-body:    clamp(1rem, 1.15vw, 1.1rem);
  --t-lead:    clamp(1.1rem, 1.6vw, 1.35rem);
  --t-small:   0.875rem;
  --t-micro:   0.75rem;

  /* Ritmo */
  --e-1: 0.25rem;  --e-2: 0.5rem;   --e-3: 0.75rem;
  --e-4: 1rem;     --e-5: 1.5rem;   --e-6: 2rem;
  --e-7: 3rem;     --e-8: 4rem;     --e-9: 6rem;
  --e-10: 8rem;

  /* Formas */
  --r-sm: 4px;  --r-md: 10px;  --r-lg: 18px;  --r-full: 999px;

  /* Sombras (tintadas en verde, nunca gris puro) */
  --sh-sm: 0 1px 2px rgba(0, 46, 26, .06), 0 2px 6px rgba(0, 46, 26, .04);
  --sh-md: 0 2px 4px rgba(0, 46, 26, .05), 0 8px 24px rgba(0, 46, 26, .07);
  --sh-lg: 0 4px 8px rgba(0, 46, 26, .05), 0 20px 48px rgba(0, 46, 26, .12);

  /* Layout */
  --ancho-max: 1220px;
  --ancho-texto: 68ch;
  --header-h: 68px;

  --transicion: 220ms cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--e-5));
}

body {
  font-family: var(--sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--gris-700);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
ul, ol { padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 3px solid var(--bronce-500);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

/* ---------- 3. TIPOGRAFÍA ---------- */
h1, h2, h3, h4 {
  font-family: var(--sans);
  color: var(--verde-900);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
  font-weight: 800;
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.25; letter-spacing: -0.015em; }
h4 { font-size: var(--t-h4); line-height: 1.35; font-weight: 700; letter-spacing: -0.01em; }

p { text-wrap: pretty; }
p + p { margin-top: var(--e-4); }

strong, b { font-weight: 700; color: var(--verde-900); }

a {
  color: var(--bronce-600);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color var(--transicion);
}
a:hover { color: var(--verde-700); }

.lead {
  font-size: var(--t-lead);
  line-height: 1.55;
  color: var(--gris-500);
  max-width: 58ch;
}

/* Volanta / eyebrow */
.volanta {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  /* Bronce-600: a 12px, el 500 no llega al contraste mínimo sobre papel. */
  color: var(--bronce-600);
}
.volanta::before {
  content: "";
  width: 28px; height: 1.5px;
  background: currentColor;
  flex: none;
}

/* Acento editorial en serif — se usa con moderación */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.serif-it { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ---------- 4. UTILIDADES DE LAYOUT ---------- */
.contenedor {
  width: 100%;
  max-width: var(--ancho-max);
  margin-inline: auto;
  padding-inline: var(--e-5);
}
@media (min-width: 768px) { .contenedor { padding-inline: var(--e-6); } }

.seccion { padding-block: clamp(var(--e-8), 9vw, var(--e-10)); }
.seccion--compacta { padding-block: clamp(var(--e-7), 6vw, var(--e-8)); }

.medida { max-width: var(--ancho-texto); }

.pila { display: flex; flex-direction: column; }
.pila--2 { gap: var(--e-2); }
.pila--3 { gap: var(--e-3); }
.pila--4 { gap: var(--e-4); }
.pila--5 { gap: var(--e-5); }
.pila--6 { gap: var(--e-6); }
.pila--7 { gap: var(--e-7); }

.fila { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-3); }

.grilla { display: grid; gap: var(--e-5); }
.grilla--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grilla--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grilla--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

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

/* Fondos de sección */
.fondo-oscuro {
  background: var(--verde-900);
  color: var(--verde-050);
}
.fondo-oscuro h1, .fondo-oscuro h2, .fondo-oscuro h3, .fondo-oscuro h4 { color: var(--blanco); }
.fondo-oscuro strong { color: var(--blanco); }
.fondo-oscuro .lead { color: rgba(232, 244, 238, .78); }
.fondo-oscuro a { color: var(--dorado-300); }
.fondo-oscuro a:hover { color: var(--blanco); }
.fondo-oscuro .volanta { color: var(--dorado-300); }

.fondo-papel { background: var(--papel); }
.fondo-papel-alt { background: var(--papel-alt); }

/* Grano sutil sobre superficies oscuras — da profundidad sin gradientes */
.grano { position: relative; isolation: isolate; }
.grano::after {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

/* Filete de acento */
.filete {
  height: 3px;
  width: 64px;
  background: var(--bronce-500);
  border-radius: var(--r-full);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
