/* =============================================
   VARIABLES & RESET — Museos San Lorenzo
   Paleta oficial: Marca_San_Lorenzo brand guide
   Tipografía oficial: Poppins
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

/* ---- CUSTOM PROPERTIES ---- */
:root {
  /* Brand Colors */
  --c-azul:       #04719a;
  --c-rojo:       #e30b17;
  --c-naranja:    #f39204;
  --c-verde:      #afca11;
  --c-gris:       #4b4a49;

  /* Derived / Extended */
  --c-azul-dark:  #035a7a;
  --c-azul-light: #e8f4f9;
  --c-rojo-dark:  #b50912;
  --c-naranja-dark:#c47403;
  --c-verde-dark: #8da40e;

  /* Neutrals */
  --c-black:      #111111;
  --c-dark:       #1a1a1a;
  --c-dark2:      #242424;
  --c-mid:        #666666;
  --c-light:      #f0f0f0;
  --c-cream:      #faf8f4;
  --c-white:      #ffffff;

  /* Typography */
  --font:         'Poppins', sans-serif;

  /* Sizing */
  --max-w:        1280px;
  --max-w-text:   760px;

  /* Spacing scale */
  --s1:  0.5rem;
  --s2:  1rem;
  --s3:  1.5rem;
  --s4:  2rem;
  --s5:  3rem;
  --s6:  5rem;
  --s7:  7rem;

  /* Border radius */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.18);

  /* Transitions */
  --t-fast:  0.15s ease;
  --t-base:  0.25s ease;
  --t-slow:  0.4s ease;
  --t-xslow: 0.6s cubic-bezier(0.16,1,0.3,1);
}

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

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

body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--c-dark);
  background: var(--c-white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
}

input, textarea, select {
  font-family: var(--font);
}

/* ---- TYPOGRAPHY SCALE ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  line-height: 1.15;
  font-weight: 700;
}

.display-xl {
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.display-lg {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.display-md {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
}

.display-sm {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
}

.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.body-lg {
  font-size: 1.125rem;
  line-height: 1.7;
  font-weight: 300;
}

.body-md {
  font-size: 0.9375rem;
  line-height: 1.7;
}

.body-sm {
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* ---- LAYOUT ---- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s4);
}

.container--narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--s4);
}

.section-pad {
  padding: var(--s7) 0;
}

.section-pad--lg {
  padding: 9rem 0;
}

/* ---- GRID HELPERS ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); }

/* ---- UTILITY CLASSES ---- */
.text-white    { color: var(--c-white); }
.text-azul     { color: var(--c-azul); }
.text-rojo     { color: var(--c-rojo); }
.text-naranja  { color: var(--c-naranja); }
.text-verde    { color: var(--c-verde); }
.text-gris     { color: var(--c-mid); }

.bg-azul    { background: var(--c-azul); }
.bg-rojo    { background: var(--c-rojo); }
.bg-naranja { background: var(--c-naranja); }
.bg-verde   { background: var(--c-verde); }
.bg-gris    { background: var(--c-gris); }
.bg-dark    { background: var(--c-dark); }
.bg-cream   { background: var(--c-cream); }
.bg-light   { background: var(--c-light); }
.bg-black   { background: var(--c-black); }
.bg-white   { background: var(--c-white); }

.fw-300 { font-weight: 300; }
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.text-center { text-align: center; }
.text-right  { text-align: right; }

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--s1); }
.gap-2 { gap: var(--s2); }
.gap-3 { gap: var(--s3); }
.gap-4 { gap: var(--s4); }

/* ---- SECTION HEADER ---- */
.section-header {
  margin-bottom: var(--s5);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--s2);
}

.section-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: currentColor;
  flex-shrink: 0;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--r-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--t-base);
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background: var(--c-rojo);
  color: var(--c-white);
  border-color: var(--c-rojo);
}
.btn--primary:hover {
  background: var(--c-rojo-dark);
  border-color: var(--c-rojo-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(227,11,23,0.35);
}

.btn--azul {
  background: var(--c-azul);
  color: var(--c-white);
  border-color: var(--c-azul);
}
.btn--azul:hover {
  background: var(--c-azul-dark);
  border-color: var(--c-azul-dark);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--c-white);
  border-color: var(--c-white);
}
.btn--outline:hover {
  background: var(--c-white);
  color: var(--c-dark);
  transform: translateY(-2px);
}

.btn--outline-dark {
  background: transparent;
  color: var(--c-dark);
  border-color: var(--c-dark);
}
.btn--outline-dark:hover {
  background: var(--c-dark);
  color: var(--c-white);
  transform: translateY(-2px);
}

.btn--naranja {
  background: var(--c-naranja);
  color: var(--c-white);
  border-color: var(--c-naranja);
}
.btn--naranja:hover {
  background: var(--c-naranja-dark);
  border-color: var(--c-naranja-dark);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 9px 18px;
  font-size: 11px;
}

.btn--lg {
  padding: 18px 40px;
  font-size: 15px;
}

/* ---- ARROW ICON ---- */
.btn .arrow {
  transition: transform var(--t-base);
}
.btn:hover .arrow {
  transform: translateX(4px);
}

/* ---- TAG / BADGE ---- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
}

.tag--azul    { background: var(--c-azul);    color: #fff; }
.tag--rojo    { background: var(--c-rojo);    color: #fff; }
.tag--naranja { background: var(--c-naranja); color: #fff; }
.tag--verde   { background: var(--c-verde);   color: #fff; }
.tag--gris    { background: var(--c-gris);    color: #fff; }

/* ---- DIVIDER ---- */
.divider {
  width: 48px;
  height: 3px;
  border-radius: 2px;
  margin-bottom: var(--s3);
}

/* ---- FADE IN ANIMATION ---- */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1),
              transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-up.delay-1 { transition-delay: 0.1s; }
.fade-up.delay-2 { transition-delay: 0.2s; }
.fade-up.delay-3 { transition-delay: 0.3s; }
.fade-up.delay-4 { transition-delay: 0.4s; }
.fade-up.delay-5 { transition-delay: 0.5s; }

/* ---- ASPECT RATIOS ---- */
.aspect-square    { aspect-ratio: 1 / 1; }
.aspect-video     { aspect-ratio: 16 / 9; }
.aspect-portrait  { aspect-ratio: 3 / 4; }
.aspect-wide      { aspect-ratio: 4 / 3; }

.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- RESPONSIVE BREAKPOINTS ---- */
@media (max-width: 1024px) {
  :root { --s7: 5rem; --s6: 4rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --s7: 4rem; --s6: 3rem; --s5: 2.5rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 var(--s3); }
}

/* =============================================
   EXTENDED TOKENS — Motion · Depth · Glass
   Sumados en Etapa 0 del rediseño cinematográfico.
   No tocan la paleta institucional original.
   ============================================= */
:root {
  /* ---- MOTION: easings ---- */
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out:    cubic-bezier(0.65, 0, 0.35, 1);
  --ease-back:      cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ---- MOTION: durations ---- */
  --dur-instant: 0.15s;
  --dur-fast:    0.25s;
  --dur-base:    0.4s;
  --dur-slow:    0.7s;
  --dur-xslow:   1.1s;

  /* ---- DEPTH: shadow layers ---- */
  --depth-1: 0 1px 2px rgba(0,0,0,0.06),  0 1px 3px rgba(0,0,0,0.08);
  --depth-2: 0 4px 8px rgba(0,0,0,0.08),  0 2px 4px rgba(0,0,0,0.06);
  --depth-3: 0 12px 24px rgba(0,0,0,0.10),0 6px 12px rgba(0,0,0,0.08);
  --depth-4: 0 24px 48px rgba(0,0,0,0.14),0 12px 24px rgba(0,0,0,0.10);
  --depth-5: 0 48px 96px rgba(0,0,0,0.18),0 24px 48px rgba(0,0,0,0.14);

  /* ---- DEPTH: glows tematizados por museo ---- */
  --glow-azul:    0 0 60px rgba(4,113,154, 0.35);
  --glow-rojo:    0 0 60px rgba(227,11,23, 0.35);
  --glow-naranja: 0 0 60px rgba(243,146,4, 0.35);
  --glow-verde:   0 0 60px rgba(175,202,17,0.35);

  /* ---- GLASSMORPHISM ---- */
  --glass-bg:      rgba(255,255,255,0.06);
  --glass-bg-dark: rgba(10,10,10,0.4);
  --glass-border:  1px solid rgba(255,255,255,0.14);
  --glass-blur:    blur(14px) saturate(140%);

  /* ---- DORADO GRANADERO (acentos puntuales únicamente) ----
     Solo en: borde-divisor cita Cabral, línea decorativa
     bloque Granaderos, hover sutil en sección sanmartiniana. */
  --c-granadero:      #d4a017;
  --c-granadero-warm: #f6b40e;
}

/* =============================================
   ACCESIBILIDAD: prefers-reduced-motion
   Hard floor para todo el sitio — se respeta
   desde el nivel de tokens.
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-instant: 0.01ms;
    --dur-fast:    0.01ms;
    --dur-base:    0.01ms;
    --dur-slow:    0.01ms;
    --dur-xslow:   0.01ms;
  }
  *, *::before, *::after {
    animation-duration:        0.01ms !important;
    animation-iteration-count: 1      !important;
    transition-duration:       0.01ms !important;
    scroll-behavior:           auto   !important;
  }
}
