/* ============================================================
   AGLAION — Sistema visual
   Azul marino profundo + oro cibernético · modo oscuro
   ============================================================ */

:root {
  /* Fondos — negro predominante + azul marino oscuro */
  --bg-0: #030509;
  --bg-1: #05080f;
  --bg-2: #080d18;
  --navy: #0a1730;
  --navy-soft: #112038;

  /* Tinta / texto */
  --ink: #e9eefa;
  --muted: #92a2c0;
  --faint: #5b6c89;

  /* Oro cibernético (acento) */
  --gold: #e9bd6b;
  --gold-bright: #ffdb93;
  --gold-deep: #8a6322;

  /* Acento secundario tecnológico */
  --cyan: #63d6cf;

  /* Líneas / bordes */
  --line: rgba(233, 189, 107, 0.16);
  --line-soft: rgba(146, 162, 192, 0.14);

  /* Tipografía */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Space Mono', monospace;

  /* Métrica */
  --maxw: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

/* ---------- Canvas de escena (fondo fijo) ---------- */
#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
  pointer-events: none;
}
/* capa frontal del nodo (sobre el logo, debajo del nav) */
#scene-front {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 6;
  display: block;
  pointer-events: none;
}

/* sutil grano/viñeta encima del canvas */
#vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 38%, transparent 38%, rgba(1, 2, 5, 0.62) 100%),
    radial-gradient(48% 42% at 50% 42%, rgba(233, 189, 107, 0.05), transparent 70%),
    radial-gradient(90% 70% at 50% 50%, rgba(63, 131, 222, 0.035), transparent 72%);
  mix-blend-mode: normal;
}

/* ---------- Capa de contenido ---------- */
.layer {
  position: relative;
  z-index: 2;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 54px);
  transition: background 0.5s var(--ease), backdrop-filter 0.5s var(--ease), border-color 0.5s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: linear-gradient(180deg, rgba(5, 8, 15, 0.86), rgba(5, 8, 15, 0.5));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__brand {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.42em;
  font-size: 15px;
  padding-left: 0.42em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav__brand .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px 2px rgba(233, 189, 107, 0.7);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 40px);
  list-style: none;
}
.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  transition: color 0.3s;
  padding: 4px 0;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 1px;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(233, 189, 107, 0.8);
  transition: width 0.35s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { width: 100%; }

.lang {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 100px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11px;
}
.lang button {
  background: transparent;
  border: none;
  color: var(--faint);
  padding: 6px 11px;
  cursor: pointer;
  transition: color 0.25s, background 0.25s;
  letter-spacing: 0.05em;
}
.lang button.active {
  color: var(--bg-0);
  background: var(--gold);
  font-weight: 700;
}
.nav__menu-btn { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: clamp(78px, 10vh, 120px) 20px 60px;
  gap: clamp(14px, 2.4vh, 34px);
}
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
}
/* logo central (A giratoria 360°) */
.hero__logo {
  position: relative;
  z-index: 2;
  width: min(240px, 46vw);
  height: min(240px, 46vw);
  margin-top: clamp(46px, 9vh, 110px);
  display: grid;
  place-items: center;
  perspective: 900px;
  cursor: grab;
  touch-action: none;
}
.hero__logo:active { cursor: grabbing; }
.hero__logo::before {
  content: "";
  position: absolute;
  inset: -22%;
  background: radial-gradient(closest-side, rgba(233, 189, 107, 0.22), transparent 72%);
  filter: blur(4px);
  pointer-events: none;
}
.logo-a {
  width: min(208px, 40vw);
  height: auto;
  overflow: visible;
  color: #5aa9ff;
  transform-style: preserve-3d;
  will-change: transform;
  filter: drop-shadow(0 0 14px rgba(70, 150, 255, 0.4));
  user-select: none;
  -webkit-user-select: none;
}
.logo-a .la-dash { opacity: 0.5; }
.logo-a .la-dash2 { opacity: 0.26; }

/* ---- A energética: filamentos, neón, chispas ---- */
.logo-a .la-fil path {
  stroke-dasharray: 14 26;
  animation: laFlow 3.2s linear infinite;
}
.logo-a .la-fil .f2 { animation-duration: 2.6s; animation-delay: -0.6s; }
.logo-a .la-fil .f3 { animation-duration: 2.9s; animation-delay: -1.2s; }
.logo-a .la-fil .f4 { animation-duration: 2.2s; animation-delay: -0.3s; }
.logo-a .la-fil .f5 { animation-duration: 3.6s; animation-delay: -1.8s; }
@keyframes laFlow { to { stroke-dashoffset: -240; } }

.logo-a .la-neon { animation: laFlicker 3.4s ease-in-out infinite; }
@keyframes laFlicker {
  0%, 100% { opacity: 0.95; }
  45% { opacity: 0.78; }
  70% { opacity: 1; }
}

.logo-a .la-sparks circle { animation: laTwinkle 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.logo-a .la-sparks .s1 { animation-delay: -0.2s; }
.logo-a .la-sparks .s2 { animation-delay: -0.9s; }
.logo-a .la-sparks .s3 { animation-delay: -1.5s; }
.logo-a .la-sparks .s4 { animation-delay: -0.6s; }
.logo-a .la-sparks .s5 { animation-delay: -1.9s; }
.logo-a .la-sparks .s6 { animation-delay: -1.1s; }
@keyframes laTwinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.3); }
}
.logo-a .la-net { animation: laNetPulse 4s ease-in-out infinite; }
@keyframes laNetPulse { 0%,100%{opacity:0.35;} 50%{opacity:0.65;} }
@media (prefers-reduced-motion: reduce) {
  .logo-a .la-fil path, .logo-a .la-neon, .logo-a .la-sparks circle, .logo-a .la-net { animation: none; }
}
/* el wordmark va DEBAJO, como rótulo "BOTANICAL" */
.hero__mark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 3.8vw, 46px);
  letter-spacing: 0.52em;
  padding-left: 0.52em;
  line-height: 1;
  color: #d7deea;
  text-shadow: 0 2px 22px rgba(2, 4, 9, 0.92), 0 0 30px rgba(233, 189, 107, 0.3);
  margin-top: clamp(48px, 9vh, 120px);
}
.hero__slogan {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(15px, 2vw, 21px);
  color: var(--muted);
  max-width: 620px;
  text-wrap: balance;
  line-height: 1.55;
  text-shadow: 0 2px 18px rgba(2, 4, 9, 0.95), 0 1px 4px rgba(2, 4, 9, 0.9);
}
.hero__slogan b { color: var(--gold-bright); font-weight: 500; }

.scroll-cue {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  background: none; border: none;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  transition: color 0.3s;
}
.scroll-cue:hover { color: var(--gold); }
.scroll-cue .line {
  width: 1px; height: 46px;
  background: linear-gradient(var(--gold), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-cue .line::after {
  content: "";
  position: absolute; top: -50%; left: 0;
  width: 100%; height: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 8px var(--gold);
  animation: cue 1.9s var(--ease) infinite;
}
@keyframes cue {
  0% { top: -55%; opacity: 0; }
  30% { opacity: 1; }
  100% { top: 105%; opacity: 0; }
}
/* "Entrar" — animación que llama la atención */
.scroll-cue { animation: cueBob 2.6s ease-in-out infinite; }
.scroll-cue span:first-child {
  color: var(--gold);
  font-weight: 500;
  animation: cueGlow 1.8s ease-in-out infinite;
}
.scroll-cue:hover span:first-child { animation-play-state: paused; opacity: 1; }
@keyframes cueBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}
@keyframes cueGlow {
  0%, 100% { opacity: 0.55; text-shadow: 0 0 0 rgba(233, 189, 107, 0); letter-spacing: 0.26em; }
  50% { opacity: 1; text-shadow: 0 0 16px rgba(233, 189, 107, 0.85), 0 0 30px rgba(233, 189, 107, 0.4); letter-spacing: 0.32em; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue, .scroll-cue span:first-child { animation: none; }
  .scroll-cue span:first-child { opacity: 1; }
}

/* ============================================================
   SECCIONES GENÉRICAS
   ============================================================ */
.section {
  position: relative;
  padding: clamp(90px, 12vh, 160px) clamp(20px, 4vw, 54px);
  background: linear-gradient(180deg, rgba(5, 8, 15, 0.72), rgba(7, 12, 23, 0.92) 22%, rgba(7, 12, 23, 0.92) 78%, rgba(5, 8, 15, 0.72));
}
.section--seam {
  border-top: 1px solid var(--line-soft);
}
/* fondo animado de "cables de datos" */
.section--flow { position: relative; overflow: hidden; }
.section-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
  /* fundido progresivo arriba y abajo: la animación emerge y se disuelve */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 15%, #000 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 15%, #000 85%, transparent 100%);
}
.section--flow > .wrap { position: relative; z-index: 1; }
/* sin línea dura: la transición la da el fundido */
.section--flow.section--seam { border-top: none; }
/* Nosotros sin línea para fluir continuo desde Proceso */
#nosotros { border-top: none; }
/* hilo conductor: línea de energía que enlaza con la sección anterior */
.section--flow::before {
  content: "";
  position: absolute;
  top: -70px;
  left: 50%;
  width: 1px;
  height: 150px;
  z-index: 1;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, rgba(120,225,255,0.55) 55%, rgba(120,225,255,0));
  pointer-events: none;
}
.section--flow::after {
  content: "";
  position: absolute;
  top: -70px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  z-index: 1;
  transform: translateX(-50%);
  background: #bfeaff;
  box-shadow: 0 0 12px 2px rgba(120,225,255,0.8);
  pointer-events: none;
  animation: threadFlow 3.4s var(--ease) infinite;
}
@keyframes threadFlow {
  0% { top: -70px; opacity: 0; }
  20% { opacity: 1; }
  100% { top: 70px; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .section--flow::after { animation: none; opacity: 0; } }.wrap { max-width: var(--maxw); margin: 0 auto; }

.sec-head { margin-bottom: clamp(40px, 6vh, 72px); max-width: 760px; }
.sec-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.sec-kicker::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(233, 189, 107, 0.6);
}
.sec-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.sec-title .accent { color: var(--gold); }
.sec-intro {
  margin-top: 22px;
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 300;
  color: var(--muted);
  max-width: 620px;
  line-height: 1.6;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

/* ============================================================
   SOLUCIONES / LÍNEAS DE SERVICIO
   ============================================================ */
.lines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  overflow: hidden;
}
/* variante 5 líneas: paneles de CRISTAL (glassmorphism) translúcidos */
.lines-grid--5 {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 0;
  overflow: visible;
}
.lines-grid--5 .line-card {
  flex: 1 1 332px;
  max-width: 392px;
  border-radius: 20px;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), background 0.5s var(--ease);
  background: linear-gradient(155deg, rgba(78,116,160,0.20), rgba(12,20,36,0.30) 62%);
  backdrop-filter: blur(13px) saturate(125%);
  -webkit-backdrop-filter: blur(13px) saturate(125%);
  border: 1px solid rgba(176,206,255,0.22);
  box-shadow:
    0 26px 60px -26px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.24),
    inset 0 0 44px rgba(120,180,255,0.05);
}
/* sheen glossy + tinte holográfico del cristal */
.lines-grid--5 .line-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255,255,255,0.16), transparent 42%),
    linear-gradient(135deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 26%),
    linear-gradient(305deg, rgba(110,255,205,0.10), rgba(180,140,255,0.08) 42%, transparent 72%);
  mix-blend-mode: screen;
  opacity: 0.85;
  transition: opacity 0.5s var(--ease);
}
.lines-grid--5 .line-card:hover {
  background: linear-gradient(155deg, rgba(96,140,190,0.26), rgba(14,24,42,0.34) 62%);
  box-shadow: 0 34px 70px -30px rgba(0,0,0,0.8), 0 0 0 1px rgba(176,206,255,0.28), inset 0 1px 0 rgba(255,255,255,0.3);
}
.lines-grid--5 .line-card:hover::after { opacity: 1; }
.lines-grid--5 .line-card .line-card__idx,
.lines-grid--5 .line-card .line-card__glyph { position: relative; z-index: 1; }
.line-card {
  position: relative;
  background: linear-gradient(165deg, rgba(12, 19, 34, 0.96), rgba(7, 12, 23, 0.96));
  padding: 38px 32px 42px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  transition: background 0.5s var(--ease);
  overflow: hidden;
}
.line-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, rgba(233, 189, 107, 0.12), transparent 55%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.line-card:hover { background: linear-gradient(165deg, rgba(16, 25, 44, 0.98), rgba(9, 15, 28, 0.98)); }
.line-card:hover::before { opacity: 1; }
.line-card__idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 26px;
}
.line-card__glyph {
  width: 48px; height: 48px;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}
.line-card__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 21px;
  margin-bottom: 12px;
  position: relative; z-index: 1;
}
.line-card__desc {
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.6;
  position: relative; z-index: 1;
}
.line-card__tags {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative; z-index: 1;
}
.tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--faint);
  border: 1px solid var(--line-soft);
  border-radius: 100px;
  padding: 4px 10px;
}

/* ============================================================
   PROCESO (Cómo funciona)
   ============================================================ */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.process::before {
  content: "";
  position: absolute;
  top: 33px; left: 6%; right: 6%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 12%, var(--line) 88%, transparent);
}
.step {
  position: relative;
  padding: 0 22px;
  text-align: center;
}
.step__node {
  width: 66px; height: 66px;
  margin: 0 auto 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 40%, rgba(16, 25, 44, 0.98), rgba(7, 12, 23, 0.98));
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--gold);
  position: relative;
  z-index: 1;
  transition: box-shadow 0.5s var(--ease), border-color 0.5s;
}
.step:hover .step__node {
  border-color: var(--gold);
  box-shadow: 0 0 0 5px rgba(233, 189, 107, 0.08), 0 0 26px rgba(233, 189, 107, 0.35);
}
.step__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  margin-bottom: 10px;
}
.step__desc {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.55;
  max-width: 220px;
  margin: 0 auto;
}

/* ============================================================
   CÓMO TRABAJAMOS
   ============================================================ */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(24px, 3vw, 44px);
}
.pillar {
  border-left: 1px solid var(--line);
  padding: 6px 0 6px 28px;
}
.pillar__num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.pillar__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  margin-bottom: 14px;
  line-height: 1.2;
}
.pillar__desc {
  color: var(--muted);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.65;
}

/* ============================================================
   SOBRE NOSOTROS
   ============================================================ */
.about {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.about__manifesto {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 3.2vw, 38px);
  line-height: 1.28;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.about__manifesto .accent { color: var(--gold); }
.about__body p {
  color: var(--muted);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 18px;
}
.about__terrarium {
  aspect-ratio: 3 / 4;
  border-radius: 200px 200px 22px 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(233, 189, 107, 0.06), transparent 30%),
    repeating-linear-gradient(135deg, rgba(146,162,192,0.05) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, rgba(12, 19, 34, 0.6), rgba(7, 12, 23, 0.85));
  position: relative;
  display: grid;
  place-items: end center;
  overflow: hidden;
}

/* ============================================================
   CONTACTO
   ============================================================ */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}
.contact__lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin-bottom: 30px;
}
.contact__meta { display: flex; flex-direction: column; gap: 18px; margin-top: 36px; }
.contact__meta a, .contact__meta span {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: color 0.3s;
}
.contact__meta a:hover { color: var(--gold); }
.contact__meta .k {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  min-width: 78px;
}

.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.field input, .field textarea {
  background: rgba(8, 13, 24, 0.8);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 13px 15px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.3s, box-shadow 0.3s;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(233, 189, 107, 0.1);
}
.btn {
  align-self: flex-start;
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--bg-0);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  border: none;
  border-radius: 100px;
  padding: 14px 34px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
  box-shadow: 0 0 0 0 rgba(233, 189, 107, 0.4);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 34px -8px rgba(233, 189, 107, 0.55); }
.form__ok {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
  opacity: 0;
  transition: opacity 0.4s;
}
.form__ok.show { opacity: 1; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 2;
  background: var(--bg-0);
  border-top: 1px solid var(--line-soft);
  padding: clamp(54px, 8vh, 84px) 0 30px;
  overflow: hidden;
}
.footer .section-bg { opacity: 0.55; }
.footer__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: clamp(28px, 5vw, 70px);
  padding: 0 clamp(20px, 4vw, 54px);
  align-items: start;
}
.footer__logo {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.16em;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
}
.footer__dot { color: var(--gold); }
.footer__tag {
  margin-top: 16px;
  color: var(--muted);
  font-weight: 300;
  font-size: 14.5px;
  line-height: 1.55;
  max-width: 240px;
  text-wrap: pretty;
}
.footer__col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer__h {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  margin-bottom: 4px;
}
.footer__col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  width: fit-content;
  transition: color 0.3s, transform 0.3s var(--ease);
}
.footer__col a:hover { color: var(--gold); transform: translateX(3px); }
.footer__bar {
  position: relative;
  z-index: 1;
  margin: clamp(40px, 6vh, 64px) auto 0;
  padding: 22px clamp(20px, 4vw, 54px) 0;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__note, .footer__made {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--faint);
  letter-spacing: 0.04em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .process { grid-template-columns: repeat(2, 1fr); gap: 44px 0; }
  .process::before { display: none; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 36px 28px; }
  .footer__brand { grid-column: 1 / -1; }
  .about, .contact { grid-template-columns: 1fr; }
  .about__terrarium { max-width: 360px; }
}
@media (max-width: 680px) {
  .nav__links { display: none; }
  .nav__links.open {
    display: flex;
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    background: rgba(5, 8, 15, 0.97);
    backdrop-filter: blur(16px);
    padding: 24px 30px 34px;
    gap: 20px;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav__menu-btn {
    display: flex;
    background: none; border: none; cursor: pointer;
    flex-direction: column; gap: 5px; padding: 6px;
  }
  .nav__menu-btn span { width: 22px; height: 1.5px; background: var(--ink); display: block; }
  .process { grid-template-columns: 1fr; }
}

/* ============================================================
   PRODUCCIÓN — añadidos al prototipo
   (terrario como <img> real, fallback sin JS, reduced-motion)
   ============================================================ */

/* Render del terrario: reemplaza al <image-slot> del editor de diseño.
   Absoluto para llenar el contenedor (que es grid place-items:end y no estira
   al hijo); .about__terrarium ya es position:relative + overflow:hidden + radio. */
.about__terrarium-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
}

/* Sin JavaScript: el contenido revelado debe quedar visible (SEO + a11y).
   Con JS, portal.js retira la clase .no-js y reactiva la animación reveal. */
.no-js .reveal { opacity: 1; transform: none; }
/* Los fondos canvas no aportan contenido: ocultarlos si no hay JS. */
.no-js #scene,
.no-js #scene-front,
.no-js #vignette { display: none; }

/* Movimiento reducido: el reveal se mantiene (aparición) pero sin desplazamiento. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: opacity 0.4s var(--ease); transform: none; }
}

/* Rendimiento: el navegador omite layout/paint de las secciones fuera de viewport.
   'auto' recuerda el tamaño real tras el primer render; el px es solo estimación inicial. */
.section { content-visibility: auto; contain-intrinsic-size: auto 760px; }
.footer { content-visibility: auto; contain-intrinsic-size: auto 480px; }
