/*
 * base.css — Reset, tipografía, cursor, utilidades y animaciones
 */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", sans-serif;
  overflow-x: hidden;
  cursor: none;
  transition: var(--t-speed);
  line-height: 1.6;
}

/* Grain noise overlay */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1000;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .015;
}

/* ── Cursor ──────────────────────────────────────── */
.cursor {
  position: fixed; width: 10px; height: 10px;
  background: var(--grad); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .15s, height .15s;
}
.cursor-ring {
  position: fixed; width: 34px; height: 34px;
  border: 1.5px solid var(--accent); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  opacity: .4;
  transition: opacity .2s, width .25s, height .25s;
}
body:has(a:hover, button:hover) .cursor      { width: 16px; height: 16px; }
body:has(a:hover, button:hover) .cursor-ring { width: 52px; height: 52px; opacity: .8; }

/* ── Tipografía global ───────────────────────────── */
h2 {
  font-family: "Fraunces", serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -.01em;
}
h2 em {
  font-style: italic;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Componentes de texto ────────────────────────── */
.section-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: .7rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .9rem;
  display: flex; align-items: center; gap: .6rem;
}
.section-tag::before {
  content: ""; display: block;
  width: 26px; height: 1.5px;
  background: var(--grad); border-radius: 2px;
}

.section-header {
  display: flex; align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 3.5rem; gap: 2rem;
}
.section-note {
  font-size: .86rem; color: var(--muted);
  max-width: 260px; text-align: right;
  line-height: 1.75;
}

.tag {
  font-family: "JetBrains Mono", monospace;
  font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  background: var(--accent-bg); border: 1px solid var(--border);
  color: var(--accent2); padding: .18rem .6rem; border-radius: 20px;
}

/* ── Animaciones ─────────────────────────────────── */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse    { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(1.5); } }
@keyframes blobDrift{ from { transform: translate(0, 0) scale(1); } to { transform: translate(18px, 14px) scale(1.06); } }

/* Scroll reveal  */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Shared sections ─────────────────────────────── */
section { position: relative; overflow: hidden; }
