/* Base: tokens de diseño, reset y tipografía.
   Para cambiar la identidad visual se editan las variables de :root (razones en DESIGN.md). */

:root {
  /* Verdes del logotipo */
  --green-950: #08241A;   /* fondo de secciones oscuras */
  --green-900: #0E3322;
  --green-800: #154A30;
  --green-700: #1C6A38;   /* verde "ECOARG" del logo */
  --green-600: #2E8A3A;
  --green-500: #4FA63A;
  --green-300: #A6D46A;   /* verde lima del isotipo */
  --green-100: #E4F1D6;

  /* Naranjas del logotipo */
  --orange-800: #A93C0B;
  --orange-700: #C9470F;  /* fondo de botones: texto blanco a 4,78:1 */
  --orange-600: #E95A16;  /* naranja "Soluciones Ambientales"; solo texto grande */
  --orange-500: #F47A23;
  --orange-300: #FBB04E;  /* ámbar del isotipo, para fondos oscuros */
  --orange-100: #FDEBD8;

  /* Neutros cálidos */
  --cream: #FAF7F0;
  --sand: #F2EDE1;
  --line: #E3DCCB;
  --ink: #142019;
  --ink-soft: #3C4A41;
  --muted: #5A665E;
  --white: #FFFFFF;

  --color-bg: var(--cream);
  --color-text: var(--ink);

  /* Anillo de foco: cada fondo redefine este color para mantener 3:1 */
  --focus-ring: var(--green-800);

  /* Tipografía */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.1875rem;
  --fs-h3: 1.3125rem;
  --fs-h2: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  --fs-h1: clamp(2.6rem, 1.4rem + 5vw, 5.25rem);

  /* Espaciado y forma */
  --space-section: clamp(4.5rem, 3rem + 6vw, 8rem);
  --container: 1200px;
  --gutter: clamp(1rem, 0.5rem + 2vw, 2rem);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;

  /* Sombras neutras, solo para elevación real (foto del hero, formulario, botón flotante) */
  --shadow: 0 10px 30px -12px rgb(14 51 34 / 0.18);
  --shadow-lg: 0 30px 60px -25px rgb(14 51 34 / 0.35);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 76px;
}

/* Reset */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

/* El atributo hidden gana siempre, aunque un componente defina su propio display */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  scrollbar-color: var(--green-700) var(--sand);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  caret-color: var(--orange-700);
  accent-color: var(--green-700);
}

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

img { height: auto; }

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

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

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

ul,
ol { padding: 0; list-style: none; }

/* Tipografía */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 120;
  text-wrap: balance;
}

h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* Única itálica del sitio: el slogan del hero */
h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--orange-600);
}

p { text-wrap: pretty; }

::selection { background: var(--green-300); color: var(--green-950); }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Enlace "saltar al contenido" para teclado y lectores de pantalla */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--green-900);
  color: var(--white);
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

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