/* =========================================================
   NIETO ABOGADOS — BASE.CSS
   Estilo: Borgoña Clásico
   Variables, reset, tipografía, escala global
   ========================================================= */

/* ----- VARIABLES DE DISEÑO ----- */
:root {
  /* Paleta Borgoña Clásico */
  --color-navy:        #2D1B0E;   /* marrón oscuro cálido — autoridad */
  --color-navy-mid:    #3D2518;
  --color-navy-light:  #4D2F20;
  --color-gold:        #7A1F2E;   /* borgoña — acento principal */
  --color-gold-light:  #9A3545;   /* borgoña claro */
  --color-gold-pale:   #F2E8EA;   /* rosa pálido — fondos de acento */
  --color-cream:       #F8F4EE;   /* crema cálida — fondo principal */
  --color-sand:        #EDE5D8;   /* arena — fondo secundario */
  --color-white:       #FFFFFF;
  --color-text:        #2D1B0E;   /* marrón oscuro — texto principal */
  --color-text-mid:    #7A6050;   /* marrón medio */
  --color-text-light:  #9A7060;   /* marrón suave */
  --color-border:      #EDE5D8;
  --color-border-dark: #D4C9B8;
  --color-success:     #2D6A4F;
  --color-error:       #9B2226;

  /* Tipografía Borgoña */
  --font-display: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body:    'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Escala tipográfica fluida */
  --text-xs:   clamp(0.75rem,  1vw,   0.8125rem);
  --text-sm:   clamp(0.875rem, 1.2vw, 0.9375rem);
  --text-base: clamp(1rem,     1.4vw, 1.0625rem);
  --text-lg:   clamp(1.125rem, 1.8vw, 1.25rem);
  --text-xl:   clamp(1.25rem,  2.2vw, 1.5rem);
  --text-2xl:  clamp(1.5rem,   2.8vw, 2rem);
  --text-3xl:  clamp(2rem,     3.5vw, 2.75rem);
  --text-4xl:  clamp(2.5rem,   5vw,   3.75rem);
  --text-5xl:  clamp(3.25rem,  7vw,   5.5rem);
  --text-hero: clamp(3.5rem,   8.5vw, 7rem);

  /* 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;
  --space-section: clamp(5rem, 9vw, 9rem);

  /* Bordes y radios */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Sombras */
  --shadow-sm:  0 2px 8px rgba(45, 27, 14, 0.07);
  --shadow-md:  0 8px 24px rgba(45, 27, 14, 0.10);
  --shadow-lg:  0 20px 48px rgba(45, 27, 14, 0.13);
  --shadow-xl:  0 32px 64px rgba(45, 27, 14, 0.17);
  --shadow-gold: 0 8px 32px rgba(122, 31, 46, 0.22);

  /* Transiciones */
  --ease-premium: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast:   180ms;
  --duration-base:   300ms;
  --duration-slow:   600ms;
  --duration-slower: 900ms;

  /* Layout */
  --container-max:  1280px;
  --container-wide: 1440px;
  --nav-height:     80px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

input, button, textarea, select {
  font: inherit;
}

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

ul, ol {
  list-style: none;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p {
  line-height: 1.75;
}

/* ----- ACCESIBILIDAD ----- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--color-navy);
  color: var(--color-white);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  border-radius: var(--radius-sm);
  z-index: 9999;
  transition: top var(--duration-fast);
}
.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* ----- CONTENEDOR ----- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.container--wide  { max-width: var(--container-wide); }
.container--narrow { max-width: 760px; }

/* ----- TIPOGRAFÍA GLOBAL ----- */
.display-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-navy);
}

.section-title--light {
  color: var(--color-white);
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 300;
  color: var(--color-text-mid);
  line-height: 1.7;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--color-gold);
  flex-shrink: 0;
}

/* ----- DIVIDERS DECORATIVOS ----- */
.gold-line {
  display: block;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
  margin-bottom: var(--space-lg);
}

.gold-line--center { margin-inline: auto; }

/* ----- UTILIDADES ----- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-center { text-align: center; }
.text-gold   { color: var(--color-gold); }
.text-navy   { color: var(--color-navy); }
.text-mid    { color: var(--color-text-mid); }

/* ----- REDUCCIÓN DE MOVIMIENTO ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
