/*
 * base.css — Reset, body, tipografía base
 * Gennaro Cibelli
 */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=DM+Sans:wght@300;400;500;600&display=swap');

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

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

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

/* ── Scrollbar ── */
::-webkit-scrollbar         { width: 4px; }
::-webkit-scrollbar-track   { background: var(--color-bg); }
::-webkit-scrollbar-thumb   { background: var(--color-accent); border-radius: 2px; }

/* ── Selección ── */
::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}

/* ── Links / imágenes base ── */
a   { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── Ruido de fondo (sutil) ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
}

/* ── Tipografía base ── */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

h2 { font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl)); font-weight: 700; }
h3 { font-size: var(--text-xl); font-weight: 600; font-family: var(--font-sans); letter-spacing: -0.01em; }
h4 { font-size: var(--text-lg); font-weight: 600; font-family: var(--font-sans); }

p {
  color: var(--color-text-muted);
  font-size: var(--text-md);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: var(--space-4);
}
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; color: var(--color-text); }

/* ── Contenedor ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-8);
}

/* ── Sección ── */
.section {
  padding-block: var(--space-24);
}

/* ── Eyebrow ── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-5);
}
.eyebrow::before {
  content: '';
  display: block;
  width: 22px;
  height: 1px;
  background: var(--color-accent);
  flex-shrink: 0;
}

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }
.reveal-delay-4 { transition-delay: 0.48s; }

@media (max-width: 600px) {
  .container { padding-inline: var(--space-5); }
  .section    { padding-block: var(--space-16); }
}
