/* =============================================================
   RESET.CSS — Box-sizing, normalize, CSS custom properties
   ============================================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-texto);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-titulo);
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

address {
  font-style: normal;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* ===== CSS CUSTOM PROPERTIES ===== */

:root {
  /* Brand colors — light theme */
  --color-verde:        #1a4232;
  --color-verde-medio:  #2d6649;
  --color-verde-claro:  #4a8a62;
  --color-rojo:         #8c1c24;
  --color-rojo-claro:   #b02535;
  --color-dorado:       #c9962a;
  --color-dorado-claro: #dbb04a;

  /* Backgrounds */
  --bg-primary:    #faf6ee;
  --bg-secondary:  #f0e6d3;
  --bg-card:       #ffffff;
  --bg-verde:      #1a4232;
  --bg-verde-card: #22573e;

  /* Text */
  --color-texto:        #1a1209;
  --color-texto-suave:  #5c4a3a;
  --color-titulo:       #1a1209;
  --color-titulo-light: #ffffff;

  /* UI */
  --color-border:   rgba(26, 66, 50, 0.15);
  --color-divider:  rgba(26, 66, 50, 0.1);

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Font sizes */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(26, 18, 9, 0.08);
  --shadow-md:  0 4px 20px rgba(26, 18, 9, 0.12);
  --shadow-lg:  0 8px 40px rgba(26, 18, 9, 0.18);
  --shadow-xl:  0 16px 60px rgba(26, 18, 9, 0.22);

  /* Radii */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 999px;

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-base:   0.3s ease;
  --transition-slow:   0.5s ease;

  /* Layout */
  --container-max:  1240px;
  --section-py:     5rem;
  --header-height:  72px;
}

/* ===== DARK THEME ===== */

[data-theme="dark"] {
  --bg-primary:    #0f1a14;
  --bg-secondary:  #182614;
  --bg-card:       #1e2f22;
  --bg-verde:      #0a1410;
  --bg-verde-card: #162018;

  --color-texto:       #f0e8d4;
  --color-texto-suave: #a89880;
  --color-titulo:      #f0e8d4;
  --color-border:      rgba(201, 150, 42, 0.2);
  --color-divider:     rgba(201, 150, 42, 0.1);

  --shadow-sm:  0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md:  0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg:  0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-xl:  0 16px 60px rgba(0, 0, 0, 0.6);
}

/* ===== UTILITY ===== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.lightbox-open {
  overflow: hidden;
}
