/* ==========================================================================
   LABS & DROPS — REFINED EXECUTIVE DESIGN SYSTEM
   Standard: Google Material Design & Apple Minimalist Luxury
   Consistency: Matches Heartbeats Memories (apps/heartbeats/) and Labs Ecosystem.
   Palette: Deep Obsidian #060a12, Slate #080e1c, Emerald #10b981, Precision Sky #38bdf8
   Typography: Montserrat (Headings & Brand) + Plus Jakarta Sans (Body) + JetBrains Mono (Specs)
   Icons: Google Material Symbols Outlined (wght 250, opsz 20)
   Zero dots, zero toy brutalism, zero blurry IA gradients.
   ========================================================================== */

:root {
  --bg-deep: #060a12;
  --bg-surface: #080e1c;
  --bg-card: rgba(10, 18, 34, 0.88);
  --bg-card-hover: rgba(14, 25, 48, 0.95);
  --bg-sunken: #050811;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(56, 189, 248, 0.16);
  --border-emerald: rgba(16, 185, 129, 0.4);
  --border-focus: #10b981;

  --emerald: #10b981;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --sky: #38bdf8;
  --sky-dim: rgba(56, 189, 248, 0.12);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.12);

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-brand: 'Montserrat', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* ==========================================================================
   GOOGLE MATERIAL SYMBOLS OUTLINED (Apple / Google Minimalist Luxury)
   ========================================================================== */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: 300;
  font-style: normal;
  font-size: 19px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variation-settings:
    'FILL' 0,
    'wght' 250,
    'GRAD' 0,
    'opsz' 20;
  vertical-align: middle;
  flex-shrink: 0;
  user-select: none;
}

* {
  box-sizing: border-box;
}

body.portal-body {
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 12% 45%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 88% 50%, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
    linear-gradient(135deg, #050811 0%, #0a1120 55%, #050811 100%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  line-height: 1.6;
  user-select: none;
  -webkit-user-select: none;
}

.portal-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   NAVBAR (Minimalist Executive Header)
   ========================================================================== */
.portal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  background: rgba(6, 10, 18, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
}

.portal-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
}

.portal-nav-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: block;
}

.portal-nav-title {
  font-family: var(--font-brand);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.portal-nav-title span {
  color: var(--emerald);
}

.portal-nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.portal-nav-link {
  font-family: var(--font-body);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.portal-nav-link:hover {
  color: #ffffff;
}

.portal-founder-pill {
  font-family: var(--font-mono);
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--sky);
  padding: 7px 15px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.portal-founder-pill:hover {
  border-color: var(--sky);
  color: #ffffff;
  background: rgba(56, 189, 248, 0.1);
}

/* ==========================================================================
   MODULE 2: ASYMMETRIC EXECUTIVE HERO (7 cols brand + 5 cols engineering log)
   ========================================================================== */
.portal-hero-section {
  padding: 60px 0 50px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.portal-hero-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 40px;
  align-items: flex-end;
}

/* Columna Izquierda: Marca y Pilares */
.hero-left-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.hero-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  background: var(--emerald-dim);
  border: 1px solid var(--border-emerald);
  color: var(--emerald);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.hero-tag-dot {
  width: 6px;
  height: 6px;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald);
}

.hero-brand-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-brand-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
}

.hero-brand-title {
  font-family: var(--font-brand);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0;
  line-height: 1.1;
}

.hero-brand-title span {
  color: var(--emerald);
}

.hero-brand-domain {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.hero-main-slogan {
  font-family: var(--font-brand);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0;
  max-width: 620px;
}

.hero-main-slogan .accent-sky {
  color: var(--sky);
}

.hero-subtitle-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  max-width: 580px;
}

/* Pilares en Fila (4 columnas compactas con bordes limpios) */
.hero-pillars-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}

@media (max-width: 992px) {
  .hero-pillars-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .hero-pillars-row {
    grid-template-columns: 1fr;
  }
}

.hero-pillar-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}

.hero-pillar-box:hover {
  background: var(--bg-card-hover);
  border-color: rgba(56, 189, 248, 0.4);
}

.hero-pillar-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-pillar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot-emerald { background: var(--emerald); }
.dot-sky { background: var(--sky); }
.dot-amber { background: var(--amber); }
.dot-purple { background: #a855f7; }

.hero-pillar-header strong {
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.hero-pillar-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* Barra Unificada Inferior (R&D Focus a la izquierda + Redes Sociales a la derecha) */
.hero-bottom-bar {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 40px;
  align-items: center;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}

@media (max-width: 992px) {
  .hero-bottom-bar {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.hero-bottom-left {
  display: flex;
  align-items: center;
}

.hero-bottom-left .hero-rnd-banner {
  margin: 0;
}

.hero-bottom-right {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.hero-contact-pills-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}

.hero-contact-pills-row .btn-contact-pill {
  padding: 4px 8px;
  font-size: 11px;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .hero-contact-pills-row {
    flex-wrap: wrap;
  }
}

/* Barra de Contacto y Redes (Legacy) */
.hero-contact-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  width: 100%;
}

.btn-contact-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: none;
  transition: all 0.2s ease;
}

.btn-contact-pill:hover {
  border-color: var(--sky);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.btn-contact-pill.btn-linkedin:hover {
  border-color: #0a66c2;
  color: #38bdf8;
  background: rgba(10, 102, 194, 0.14);
  box-shadow: 0 0 8px rgba(10, 102, 194, 0.2);
}

.btn-contact-pill.btn-github:hover {
  border-color: #f8fafc;
  color: #ffffff;
  background: rgba(248, 250, 252, 0.1);
  box-shadow: 0 0 8px rgba(248, 250, 252, 0.15);
}

.btn-contact-pill.btn-whatsapp:hover {
  border-color: #25d366;
  color: #4ade80;
  background: rgba(37, 211, 102, 0.14);
  box-shadow: 0 0 8px rgba(37, 211, 102, 0.2);
}

.btn-contact-pill.btn-instagram:hover {
  border-color: #e1306c;
  color: #f472b6;
  background: rgba(225, 48, 108, 0.14);
  box-shadow: 0 0 8px rgba(225, 48, 108, 0.2);
}

.btn-contact-pill.btn-tiktok:hover {
  border-color: #00f2fe;
  color: #38bdf8;
  background: rgba(0, 242, 254, 0.14);
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.2);
}

.contact-sep {
  color: var(--border-subtle);
  font-size: 11px;
}

.contact-social-icons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.contact-social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  transition: all 0.2s ease;
}

.contact-social-link i {
  font-size: 13px;
  transition: transform 0.2s ease;
}

.contact-social-link:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.contact-social-link:hover i {
  transform: scale(1.15);
}

.link-email:hover {
  border-color: rgba(56, 189, 248, 0.4);
  color: #ffffff;
}
.link-email:hover i {
  color: var(--sky);
}

.link-linkedin:hover {
  border-color: rgba(10, 102, 194, 0.5);
  color: #ffffff;
}
.link-linkedin:hover i {
  color: #0a66c2;
}

.link-instagram:hover {
  border-color: rgba(225, 48, 108, 0.5);
  color: #ffffff;
}
.link-instagram:hover i {
  color: #e1306c;
}

.link-tiktok:hover {
  border-color: rgba(0, 242, 254, 0.5);
  color: #ffffff;
}
.link-tiktok:hover i {
  color: #00f2fe;
}

.link-x:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}
.link-x:hover i {
  color: #ffffff;
}

.contact-email strong {
  color: var(--sky);
}

/* Columna Derecha: Tarjeta de Ficha de Ingeniería Marcelo Poblete */
.hero-right-col {
  width: 100%;
}

.engineering-spec-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

/* Indicador lateral verde esmeralda */
.spec-side-indicator {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--emerald);
}

.spec-card-header {
  margin-bottom: 16px;
}

.spec-founder-name {
  font-family: var(--font-brand);
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.spec-founder-role {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--sky);
  font-weight: 500;
}

.spec-telemetry-list {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  white-space: nowrap;
}

.spec-label {
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

.spec-value {
  color: #e2e8f0;
  text-align: right;
  white-space: nowrap;
}

.spec-value.highlight-emerald {
  color: var(--emerald);
  font-weight: 600;
}

.spec-card-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
}

.spec-uptime {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--emerald);
  font-weight: 600;
}

.uptime-dot {
  width: 6px;
  height: 6px;
  background: var(--emerald);
  border-radius: 50%;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.btn-open-cv {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--sky);
  text-decoration: none;
  border: 1px solid var(--border-card);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-open-cv:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--sky);
  color: #ffffff;
}

/* ==========================================================================
   MODULE 3: THREE DETAILED PILLARS (Executive Architecture)
   ========================================================================== */
.portal-pillars-section {
  padding: 50px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.portal-section-intro {
  text-align: center;
  margin-bottom: 36px;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--emerald);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.portal-section-intro h2 {
  font-family: var(--font-brand);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.portal-section-intro p {
  font-size: 14.5px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.portal-pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 1024px) {
  .portal-pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .portal-pillars-grid {
    grid-template-columns: 1fr;
  }
}

.pillar-detail-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color var(--transition-base), box-shadow var(--transition-base);
  will-change: opacity, transform;
}

.pillar-detail-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pillar-detail-card:hover {
  transform: translateY(-2px);
}

.pillar-detail-card:nth-child(1) {
  border-color: rgba(16, 185, 129, 0.25);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-surface) 100%);
}
.pillar-detail-card:nth-child(1):hover {
  border-color: var(--emerald);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.16);
}
.pillar-detail-card:nth-child(1) .pillar-tag {
  background: rgba(16, 185, 129, 0.10);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.pillar-detail-card:nth-child(2) {
  border-color: rgba(56, 189, 248, 0.25);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.05) 0%, var(--bg-surface) 100%);
}
.pillar-detail-card:nth-child(2):hover {
  border-color: var(--sky);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.16);
}
.pillar-detail-card:nth-child(2) .pillar-tag {
  background: rgba(56, 189, 248, 0.10);
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

.pillar-detail-card:nth-child(3) {
  border-color: rgba(245, 158, 11, 0.25);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.05) 0%, var(--bg-surface) 100%);
}
.pillar-detail-card:nth-child(3):hover {
  border-color: var(--amber);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.16);
}
.pillar-detail-card:nth-child(3) .pillar-tag {
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.pillar-detail-card:nth-child(4) {
  border-color: rgba(168, 85, 247, 0.25);
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.05) 0%, var(--bg-surface) 100%);
}
.pillar-detail-card:nth-child(4):hover {
  border-color: #a855f7;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.16);
}
.pillar-detail-card:nth-child(4) .pillar-tag {
  background: rgba(168, 85, 247, 0.10);
  border-color: rgba(168, 85, 247, 0.3);
  color: #c084fc;
}

.pillar-detail-card .material-symbols-outlined {
  font-size: 26px;
  margin-bottom: 14px;
}

.icon-emerald { color: var(--emerald); }
.icon-sky { color: var(--sky); }
.icon-amber { color: var(--amber); }
.icon-purple { color: #a855f7; }

.pillar-detail-title {
  font-family: var(--font-brand);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.pillar-detail-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 16px 0;
  flex-grow: 1;
}

.pillar-tags-row {
  display: flex;
  gap: 5px;
  flex-wrap: nowrap;
  font-family: var(--font-mono);
  font-size: 10px;
}

.pillar-tag {
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.pillar-tag:hover {
  transform: translateY(-1px);
}

/* ==========================================================================
   MODULE 4: VIDEO SHOWCASE (3 Columns · YouTube / Heartbeats Clean Aesthetics)
   ========================================================================== */
.portal-showcase-section {
  padding: 50px 0 70px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.video-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.video-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
  
  opacity: 0;
  transform: translateY(20px);
  will-change: opacity, transform;
}

.video-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.video-card:hover {
  border-color: var(--emerald);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.video-thumb-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  overflow: hidden;
}

.video-thumb-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.video-card:hover .video-thumb-container video {
  opacity: 1;
}

.video-tag-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-mono);
  background: rgba(6, 10, 18, 0.9);
  border: 1px solid var(--border-card);
  color: var(--sky);
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.video-duration-pill {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease;
}

.video-play-overlay .material-symbols-outlined {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(6, 10, 18, 0.85);
  border: 1px solid var(--border-card);
  color: #ffffff;
  font-size: 24px;
  transition: all 0.2s ease;
}

.video-card:hover .video-play-overlay .material-symbols-outlined {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #060a12;
  transform: scale(1.08);
}

.video-meta-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.video-title {
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: #ffffff;
  margin: 0 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 14px 0;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-footer-action {
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--sky);
  transition: color 0.2s ease;
}

.video-card:hover .video-footer-action {
  color: #7dd3fc;
}

/* ==========================================================================
   MODULE 5: ACTIVE ECOSYSTEM APPS & LABS
   ========================================================================== */
.portal-apps-section {
  padding: 50px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.portal-apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.portal-app-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.portal-app-card:hover {
  border-color: var(--sky);
  transform: translateY(-2px);
}

.portal-app-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.portal-app-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald);
}

.portal-app-meta h3 {
  font-family: var(--font-brand);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #ffffff;
}

.portal-app-status-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--emerald);
  background: var(--emerald-dim);
  border: 1px solid var(--border-emerald);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.portal-app-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 18px 0;
  flex-grow: 1;
}

.portal-app-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   DYNAMIC REVERSE-THEMED APP ACTION BUTTONS
   Outline by default matching card accent; solid vibrant fill on hover
   ========================================================================== */
.btn-app-theme {
  font-family: var(--font-mono);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  box-sizing: border-box;
}

.btn-app-emerald {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: var(--emerald);
}
.btn-app-emerald:hover {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #060a12;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.btn-app-sky {
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: var(--sky);
}
.btn-app-sky:hover {
  background: var(--sky);
  border-color: var(--sky);
  color: #060a12;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.btn-app-purple {
  background: rgba(168, 85, 247, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #c084fc;
}
.btn-app-purple:hover {
  background: #a855f7;
  border-color: #a855f7;
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.35);
  transform: translateY(-1px);
}

.btn-app-secondary {
  font-family: var(--font-mono);
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.btn-app-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--text-muted);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ==========================================================================
   FOOTER & LEGAL COMPLIANCE
   ========================================================================== */
.portal-footer {
  padding: 40px 0 30px 0;
}

.portal-footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}

.portal-footer-brand h4 {
  font-family: var(--font-brand);
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: #ffffff;
}

.portal-footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0;
}

.portal-footer-links {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.portal-footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.portal-footer-links a:hover {
  color: var(--emerald);
}

.portal-legal-disclaimer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 18px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.portal-legal-disclaimer .dual-lang-notice {
  margin-bottom: 6px;
}

/* ==========================================================================
   THEATER MODAL (Full-Focus Video Player)
   ========================================================================== */
.video-theater-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 18, 0.94);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.video-theater-modal.is-active,
.video-theater-modal.is-open {
  display: flex;
}

.theater-container {
  max-width: 960px;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.theater-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-sunken);
}

.theater-title {
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.theater-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theater-close-btn:hover {
  color: #ffffff;
}

.theater-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.theater-video-wrapper video {
  width: 100%;
  height: 100%;
  display: block;
}

.theater-meta {
  padding: 16px 20px;
}

.theater-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
  .portal-hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .video-grid-3col {
    grid-template-columns: repeat(2, 1fr);
  }
  .portal-pillars-grid {
    grid-template-columns: 1fr;
  }
  .portal-apps-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .hero-pillars-row {
    grid-template-columns: 1fr;
  }
  .video-grid-3col {
    grid-template-columns: 1fr;
  }
  .portal-nav-links {
    gap: 8px;
    flex-wrap: wrap;
  }
  .portal-nav-link {
    font-size: 12px;
    padding: 4px 6px;
  }
  .hero-brand-title {
    font-size: 26px;
  }
  .hero-main-slogan {
    font-size: 22px;
  }
}

/* ==========================================================================
   LANGUAGE TOGGLE (Minimalist Text: ES | EN - Zero Sensitive Flags)
   ========================================================================== */
.lang-toggle-wrap {
  display: inline-flex;
  align-items: center;
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px 4px;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.lang-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
}

.lang-toggle-btn:hover {
  color: #ffffff;
}

.lang-toggle-btn.is-active {
  background: rgba(56, 189, 248, 0.18);
  color: var(--sky);
}

.lang-toggle-sep {
  color: var(--border-subtle);
  font-size: 10px;
}

/* Hero R&D Banner under 4 pillars */
.hero-rnd-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-primary);
  margin-top: 14px;
  margin-bottom: 12px;
  white-space: nowrap;
}

.hero-rnd-banner strong {
  color: var(--emerald);
  font-weight: 700;
}

/* 3-Column Grid for Apps & R&D Hub */
.apps-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 48px;
}

@media (max-width: 1024px) {
  .apps-grid-3col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .apps-grid-3col {
    grid-template-columns: 1fr;
  }
}

.apps-highlight-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
}

.apps-highlight-card:hover {
  border-color: var(--emerald);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.apps-highlight-card.card-hub:hover {
  border-color: var(--sky);
}

.apps-highlight-card.card-labs:hover {
  border-color: var(--purple, #a855f7);
}

.app-price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 16px;
}

.app-price-amount {
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 800;
  color: var(--emerald);
}

.app-price-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Ecosystem Roadmap 4-Col Grid */
.roadmap-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 40px;
}

@media (max-width: 1024px) {
  .roadmap-grid-4col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .roadmap-grid-4col {
    grid-template-columns: 1fr;
  }
}

.roadmap-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
}

.roadmap-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.roadmap-card.drop-prod { border-color: rgba(16, 185, 129, 0.4); }
.roadmap-card.drop-prod:hover { border-color: var(--emerald); }
.roadmap-card.drop-sky { border-color: rgba(56, 189, 248, 0.25); }
.roadmap-card.drop-sky:hover { border-color: var(--sky); }
.roadmap-card.drop-amber { border-color: rgba(245, 158, 11, 0.25); }
.roadmap-card.drop-amber:hover { border-color: var(--amber); }
.roadmap-card.drop-purple { border-color: rgba(168, 85, 247, 0.25); }
.roadmap-card.drop-purple:hover { border-color: #a855f7; }

/* ======================================================================
   SCROLL REVEAL ANIMATIONS
   ====================================================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Spotlight Single Card Layout for Apps & R&D */
.apps-spotlight-wrapper {
  max-width: 820px;
  margin: 0 auto 56px auto;
}

.apps-spotlight-card {
  background: var(--bg-surface);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(16, 185, 129, 0.08);
  transition: all 0.3s ease;
}

.apps-spotlight-card:hover {
  border-color: var(--emerald);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5), 0 0 45px rgba(16, 185, 129, 0.16);
  transform: translateY(-2px);
}

.spotlight-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.spotlight-tag-item {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spotlight-tag-emerald {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.spotlight-actions-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-spotlight-item {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  flex: 1;
  min-width: 175px;
  transition: all 0.22s ease;
  box-sizing: border-box;
}

.btn-spotlight-primary {
  background: var(--emerald);
  color: #060a12;
  border: 1px solid var(--emerald);
}

.btn-spotlight-primary:hover {
  background: #34d399;
  border-color: #34d399;
  transform: translateY(-1px);
}

.btn-spotlight-outline-emerald {
  background: var(--bg-sunken);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-spotlight-outline-emerald:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--emerald);
  transform: translateY(-1px);
}

.btn-spotlight-outline-sky {
  background: var(--bg-sunken);
  color: var(--sky);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.btn-spotlight-outline-sky:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--sky);
  transform: translateY(-1px);
}

.btn-spotlight-outline-purple {
  background: var(--bg-sunken);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.btn-spotlight-outline-purple:hover {
  background: rgba(168, 85, 247, 0.12);
  border-color: #c084fc;
  transform: translateY(-1px);
}

/* White Papers Architecture Cards */
.whitepaper-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

@media (max-width: 860px) {
  .whitepaper-grid-3col {
    grid-template-columns: 1fr;
  }
}

.whitepaper-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.whitepaper-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.whitepaper-card-sky {
  border-color: rgba(56, 189, 248, 0.3);
  background: linear-gradient(170deg, rgba(56, 189, 248, 0.05) 0%, var(--bg-surface) 100%);
}

.whitepaper-card-sky:hover {
  border-color: var(--sky);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 25px rgba(56, 189, 248, 0.15);
}

.whitepaper-card-emerald {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(170deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-surface) 100%);
}

.whitepaper-card-emerald:hover {
  border-color: var(--emerald);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 25px rgba(16, 185, 129, 0.15);
}

.whitepaper-card-purple {
  border-color: rgba(168, 85, 247, 0.3);
  background: linear-gradient(170deg, rgba(168, 85, 247, 0.05) 0%, var(--bg-surface) 100%);
}

.whitepaper-card-purple:hover {
  border-color: #a855f7;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 25px rgba(168, 85, 247, 0.15);
}

/* Terms Checkbox and Checkout Alert */
.pricing-terms-wrap {
  margin: 12px 0 10px 0;
  padding: 8px 10px;
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-align: left;
}

.pricing-terms-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
  cursor: pointer;
}

.pricing-terms-input {
  margin-top: 2px;
  accent-color: var(--emerald);
  cursor: pointer;
  width: 14px;
  height: 14px;
}

.pricing-terms-label a {
  color: var(--sky);
  text-decoration: none;
}

.pricing-terms-label a:hover {
  text-decoration: underline;
}

.terms-warning-msg {
  margin-top: 6px;
  padding: 6px 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 4px;
  color: #fbbf24;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: shakeWarning 0.3s ease;
}

@keyframes shakeWarning {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

