/* ─────────────────────────────────────────────────────────────
   Jorge Rodríguez Saiz — Landing
   Tech / cyberpunk dark · Space Grotesk + JetBrains Mono
   ───────────────────────────────────────────────────────────── */

/* ── SPA view transition ──────────────────────────────────────────────────── */
#view {
  opacity: 1;
  transition: opacity 180ms ease;
}
#view.route-leave {
  opacity: 0;
  pointer-events: none;
}

:root {
  /* palette (overridden via JS for tweaks) */
  --bg-0: #06090f;
  --bg-1: #0a0e1a;
  --bg-2: #11172a;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --fg-0: #f5f7fb;
  --fg-1: #cdd3e0;
  --fg-2: #8b93a8;
  --fg-3: #5a627a;
  --accent: #00d9ff;     /* cyan */
  --accent-2: #7c3aed;   /* violet */
  --accent-glow: 0 0 40px rgba(0, 217, 255, 0.45);

  --font-sans: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  --font-display: var(--font-sans);

  /* density */
  --section-y: 120px;
  --section-y-s: 80px;
  --container-x: clamp(24px, 4vw, 64px);
  --gap: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-1);
  color: var(--fg-0);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--bg-1); }

/* Web components — invisibles al layout, el CSS actúa sobre su contenido directamente */
app-navbar, app-hero, app-marquee, app-services, app-about,
app-articles, app-reviews, app-cta-strip, app-footer,
contact-navbar, contact-aside, contact-form-card, contact-foot { display: contents; }

/* ───── Density modes ───── */
body[data-density="compact"] {
  --section-y: 80px;
  --gap: 16px;
}
body[data-density="comfy"] {
  --section-y: 120px;
  --gap: 24px;
}

@media (max-width: 720px) {
  :root { --section-y: 64px; }
}

/* ───── Animations off ───── */
body[data-animations="false"] *,
body[data-animations="false"] *::before,
body[data-animations="false"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

/* ───── Reusable container ───── */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--container-x);
}

/* ───── Mono caption ───── */
.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
  font-weight: 400;
}
.mono-sm { font-size: 10px; }
.mono-md { font-size: 12px; }

/* ───── Section header — shared across multiple sections ───── */
.section {
  padding: var(--section-y-s) 0;
  position: relative;
}
.section-hd {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: end;
  margin-bottom: 64px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.section-hd-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.section-hd-num::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 1px;
  box-shadow: 0 0 12px var(--accent);
}
.section-hd-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1;
  letter-spacing: -0.025em;
  text-transform: none;
}
.section-hd-title .dim { color: var(--fg-3); }
.section-hd-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--fg-2);
  margin-top: 12px;
}

@media (max-width: 720px) {
  .section-hd { grid-template-columns: 1fr; gap: 12px; }
}

/* ───── Shared: pulsing status dot ───── */
.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 10px #22c55e;
  animation: pulse 1.6s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.7); }
}

/* ───── FX: reveal on scroll ───── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }
body[data-animations="false"] .reveal { opacity: 1; transform: none; transition: none; }

/* ───── FX: custom cursor follower ───── */
.cursor-glow {
  position: fixed;
  pointer-events: none;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
  opacity: 0.06;
  z-index: 1;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  transition: opacity .25s ease;
}
body[data-animations="false"] .cursor-glow { display: none; }

/* ───── Typography mixes ───── */
body[data-typo="mono"] { --font-display: var(--font-mono); }
body[data-typo="sans"] { --font-display: var(--font-sans); }

@media print { .cursor-glow { display: none !important; } }
