/* Inteslab portal — viewport único, identidad Academy */
:root {
  --bg: #09090b;
  --surface: #111827;
  --surface-2: #161b22;
  --primary: #00b8ff;
  --secondary: #00e676;
  --accent: #38bdf8;
  --text: #ffffff;
  --muted: #a1a1aa;
  --line: rgba(255, 255, 255, 0.08);
  --glow: rgba(0, 184, 255, 0.35);
  --radius: 18px;
  --max: 1040px;
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; cursor: pointer; background: none; color: inherit; }

.wrap {
  width: min(100%, var(--max));
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 6vw, 4.5rem);
  box-sizing: border-box;
}

/* —— Ambient (Academy: grid + corriente PCB) —— */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 70% 50% at 80% -10%, rgba(0, 184, 255, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 40%, rgba(0, 230, 118, 0.06), transparent 50%),
    var(--bg);
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 10%, transparent 75%);
  pointer-events: none;
  animation: gridDrift 28s linear infinite;
}
@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 56px 56px, 56px 56px; }
}
.pcb-lines {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
}
.pcb-lines svg { width: 100%; height: 100%; }
.pcb-lines .current {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--primary));
  stroke-dasharray: 8 10;
  animation: currentFlow 1.2s linear infinite;
}
.pcb-lines circle {
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 0 8px currentColor);
  animation: nodePulse 2.2s ease-in-out infinite;
}
.pcb-lines circle:nth-of-type(2) { animation-delay: 0.35s; }
.pcb-lines circle:nth-of-type(3) { animation-delay: 0.7s; }
@keyframes currentFlow {
  to { stroke-dashoffset: -36; }
}
@keyframes nodePulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.35); }
}

/* —— Shell —— */
.shell {
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* —— Nav —— */
.nav {
  flex: 0 0 auto;
  backdrop-filter: blur(16px);
  background: rgba(9, 9, 11, 0.65);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.brand .word { height: 20px; width: auto; }
.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  border: 1px solid rgba(0, 184, 255, 0.35);
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

/* —— Stage —— */
.stage {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-height: 0;
  padding-block: clamp(1rem, 3vh, 2rem);
}
.stage-inner {
  width: 100%;
  display: grid;
  gap: clamp(1.25rem, 3.5vh, 2.25rem);
}

/* —— Intro —— */
.intro {
  max-width: none;
  text-align: center;
  margin-inline: auto;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}
.led {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.7);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.intro h1 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.4vw, 2.35rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 0.65rem;
  white-space: nowrap;
}
.intro h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.intro-sub {
  color: var(--muted);
  font-size: clamp(0.8rem, 1.55vw, 1.05rem);
  max-width: none;
  line-height: 1.45;
  margin-inline: auto;
  white-space: nowrap;
}

/* —— Buttons (Academy) —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, #00b8ff, #0090d0);
  color: #041018;
  box-shadow: 0 0 0 1px rgba(0, 184, 255, 0.4), 0 12px 40px rgba(0, 184, 255, 0.25);
}
.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(0, 184, 255, 0.55), 0 16px 48px rgba(0, 184, 255, 0.4);
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.35) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-disabled,
.btn:disabled {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
  transform: none !important;
  opacity: 0.85;
}

/* —— Product cards (proporción vertical, estilo Academy) —— */
.product-grid {
  display: grid;
  gap: 1rem;
}
.product-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0;
  min-height: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.72);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 184, 255, 0.35);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4), 0 0 32px rgba(0, 184, 255, 0.1);
}
.product-card--soon { opacity: 0.95; }
.product-card--soon:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.product-media {
  position: relative;
  min-height: 88px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 70% 30%, rgba(0, 184, 255, 0.28), transparent 50%),
    linear-gradient(135deg, #0c1220, #152033);
  border-bottom: 1px solid var(--line);
}
.product-card--soon .product-media {
  background:
    radial-gradient(circle at 70% 30%, rgba(251, 191, 36, 0.12), transparent 50%),
    linear-gradient(135deg, #0c1220, #152033);
}
.badge-soon {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(9, 9, 11, 0.65);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.product-icon {
  width: 2.6rem;
  height: 2.6rem;
  color: var(--primary);
}
.product-icon svg { width: 100%; height: 100%; }

.product-body {
  padding: 1.15rem 1.2rem 0.85rem;
  display: grid;
  align-content: start;
  gap: 0.35rem;
}
.product-eyebrow {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.product-card h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.product-desc {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-top: 0.2rem;
}

.product-card .btn {
  width: calc(100% - 2.4rem);
  margin: 0 1.2rem 1.2rem;
  justify-self: stretch;
}

/* —— Footer —— */
.footer {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  padding-block: 0.9rem 1rem;
  background: rgba(9, 9, 11, 0.35);
}
.footer-inner {
  display: grid;
  gap: 0.65rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.footer-brand img {
  height: 16px;
  width: auto;
  opacity: 0.9;
}
.footer-brand p {
  color: var(--muted);
  font-size: 0.8rem;
}
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.1rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.footer-meta a:hover { color: var(--primary); }
.footer-copy {
  color: var(--muted);
  font-size: 0.75rem;
  opacity: 0.8;
}

/* —— Reveal —— */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (min-width: 640px) {
  .nav-inner { height: 4.15rem; }
  .brand .word { height: 22px; }
}

@media (min-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
    align-items: stretch;
  }
  .product-card {
    min-height: 340px;
  }
  .product-media { min-height: 110px; }
  .footer-inner {
    grid-template-columns: 1.4fr 1fr auto;
    align-items: center;
  }
  .footer-copy { justify-self: end; text-align: right; }
}

@media (max-width: 639px) {
  .intro h1,
  .intro-sub {
    white-space: normal;
  }
  .intro h1 {
    font-size: clamp(1.35rem, 6.2vw, 1.75rem);
  }
  .intro-sub {
    font-size: 0.92rem;
    max-width: 22rem;
  }
}

@media (max-height: 700px) and (min-width: 900px) {
  .product-card { min-height: 300px; }
  .product-media { min-height: 84px; }
  .intro h1 { font-size: clamp(1.15rem, 2.8vw, 1.85rem); }
  .product-desc { font-size: 0.86rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
  .bg-grid { animation: none; }
}
