/* ==========================================================================
   TECNODUR · BASE
   Reset + global typography + grid utilities. No components here.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01' on, 'cv11' on;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
img { font-style: italic; background-repeat: no-repeat; background-size: cover; shape-margin: 1rem; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

a {
  color: inherit;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color var(--dur-fast) var(--ease-out);
}

::selection { background: var(--ink); color: var(--paper); }

/* ---------- TYPOGRAPHY -------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-tight);
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

.h-display-xl  { font-size: clamp(3rem, 8.5vw, var(--fs-5xl)); font-weight: 600; }
.h-display-lg  { font-size: clamp(2.5rem, 6.5vw, var(--fs-4xl)); font-weight: 600; }
.h-display-md  { font-size: clamp(1.875rem, 4.5vw, var(--fs-3xl)); font-weight: 600; }
.h-display-sm  { font-size: clamp(1.5rem, 3vw, var(--fs-2xl)); font-weight: 600; }
.h-display-xs  { font-size: var(--fs-xl); font-weight: 600; }

p { margin: 0; line-height: var(--lh-relaxed); text-wrap: pretty; }
.lead { font-size: var(--fs-md); line-height: var(--lh-normal); color: var(--steel-500); max-width: 60ch; }

/* Eyebrow — mono label above headlines (texto navy + dash lime) */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--lime);
}
.eyebrow--ink { color: var(--navy); }
.eyebrow--ink::before { background: var(--lime); }
.eyebrow--paper { color: var(--paper); }
.eyebrow--paper::before { background: var(--lime); }

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-mono);
  color: var(--steel-500);
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
  gap: var(--grid-gap);
}

.section { padding-block: clamp(var(--sp-9), 12vw, var(--sp-11)); }
.section--tight { padding-block: var(--sp-8); }
.section--bleed { padding-block: 0; }

/* Inverted (navy-dd) sections */
.section--dark {
  background: var(--navy-dd);
  color: var(--paper);
}
.section--dark h1, .section--dark h2, .section--dark h3,
.section--dark h4, .section--dark h5, .section--dark h6 { color: var(--paper); }
.section--dark .lead, .section--dark .mono { color: var(--gray-l); }
.section--dark .eyebrow { color: var(--lime); }
.section--dark .eyebrow::before { background: var(--lime); }

/* Hairline rule */
.rule { border: 0; height: 1px; background: var(--mist); margin: 0; }
.section--dark .rule { background: rgba(255,255,255,0.14); }

/* ---------- ACCESSIBILITY ----------------------------------------------- */
.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;
}

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

/* Skip link */
.skip-link {
  position: absolute; top: -100px; left: 0;
  background: var(--ink); color: var(--paper);
  padding: var(--sp-3) var(--sp-5);
  z-index: 1000;
}
.skip-link:focus { top: 0; }

/* ---------- REVEAL ANIMATION (IntersectionObserver-driven) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
[data-reveal-delay="1"] { transition-delay: 80ms; }
[data-reveal-delay="2"] { transition-delay: 160ms; }
[data-reveal-delay="3"] { transition-delay: 240ms; }
[data-reveal-delay="4"] { transition-delay: 320ms; }
[data-reveal-delay="5"] { transition-delay: 400ms; }
[data-reveal-delay="6"] { transition-delay: 480ms; }
