/* ==========================================================================
   LeanHaus — Base: reset, tipografía, utilidades, movimiento
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  min-height: 100vh;
  background: var(--brand-choco);
  color: var(--brand-cream);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
p, li, dd, blockquote { text-wrap: pretty; }
h1, h2, h3, h4 { font-weight: 400; text-wrap: balance; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
abbr[title] { text-decoration: none; }
em { font-style: italic; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

::selection { background: var(--brand-oxford); color: var(--brand-choco); }

/* Grano sutil de papel sobre todo el sitio */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Temas: fondo y color de cada sección ---- */
.theme-dark,
.theme-light,
.theme-accent {
  background-color: var(--bg);
  color: var(--fg);
}

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

.section { padding-block: var(--space-section); }

.section-head { margin-bottom: clamp(3rem, 2rem + 4vw, 6rem); }

/* ---- Tipografía ---- */
.display-xl,
.display-l,
.display-m {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.display-xl { font-size: var(--fs-display-xl); line-height: var(--lh-tight); }
.display-l  { font-size: var(--fs-display-l);  line-height: 0.98; }
.display-m  { font-size: var(--fs-display-m);  line-height: 1.02; }

.display-xl em,
.display-l em,
.display-m em,
.statement em { color: var(--accent-text); }

.statement {
  font-family: var(--font-display);
  font-size: var(--fs-statement);
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
  max-width: 26ch;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
}

/* ---- Accesibilidad ---- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--brand-cream);
  color: var(--brand-choco);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

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

main:focus { outline: none; }

/* Las animaciones de aparición y scroll viven en motion.css */

@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;
  }
}
