/* ==========================================================================
   CYPHER SYSTEMS STUDIO DESIGN SYSTEM (DARK MODE ONLY)
   Strict adherence to Cypher Web Architecture:
   - Zero JavaScript / Zero External Assets / Pure Semantic HTML5 & CSS3
   - Studio Palette: #050505 (Base), #0d0d0d (Card), #38bdf8 (Studio Blue)
   - Bilingual Default: English (EN) & Spanish (ES) paired throughout
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg-base: #050505;
  --bg-surface: #0d0d0d;
  --bg-surface-elevated: #131313;
  --accent: #38bdf8;
  --accent-muted: rgba(56, 189, 248, 0.12);
  --text-primary: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #7c828d;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(56, 189, 248, 0.4);
  --status-emerald: #10b981;
  --status-amber: #f59e0b;

  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Custom Selection */
::selection { background: #38bdf8; color: #050505; }
/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #333333; border-radius: 4px; border: 1px solid #050505; }
::-webkit-scrollbar-thumb:hover { background: #38bdf8; }
/* Global Link Transitions */
a { transition: color 0.2s ease-in-out, transform 0.2s ease; }

/* Global Keyboard Focus Ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Screen-Reader-Only Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip Link (visible on keyboard focus only) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #030712;
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
}

.skip-link:focus-visible {
  top: 1rem;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem; /* header is static on mobile; sticky from 600px */
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.6;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 189, 248, 0.12), transparent 70%),
    radial-gradient(circle at 90% 70%, rgba(56, 189, 248, 0.04), transparent 50%);
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Bilingual Formatting Classes */
.es-text {
  display: block;
  color: var(--text-muted);
  font-size: 0.9em;
  font-style: normal;
  margin-top: 0.25rem;
}

.es-inline {
  color: var(--text-muted);
  font-size: 0.9em;
  margin-left: 0.35rem;
}

/* Header & Navigation */
/* Static on mobile (the wrapped nav is too tall to pin); sticky from 600px up */
header {
  position: relative;
  z-index: 100;
  background-color: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-wrapper {
  display: flex;
  flex-direction: column;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  gap: 0.75rem;
}

.nav-brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.15rem;
}

.brand-logo {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  color: var(--accent);
  flex-shrink: 0;
}

.studio-logo-img { width: 32px; height: 32px; border-radius: 6px; object-fit: contain; }

.brand-title-group {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  color: var(--accent);
}

.nav-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.7rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--status-emerald);
  box-shadow: 0 0 6px var(--status-emerald);
}

/* Amber variant: pre-release / beta build phase */
.status-dot--beta {
  background-color: var(--status-amber);
  box-shadow: 0 0 6px var(--status-amber);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  font-family: var(--font-stack);
  border: 1px solid transparent;
  line-height: 1.3;
  text-align: center;
}

.btn-primary {
  background-color: var(--accent);
  color: #030712;
  border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: #7dd3fc;
  border-color: #7dd3fc;
  box-shadow: 0 0 16px var(--accent-muted);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--border-hover);
  color: var(--accent);
  background-color: var(--bg-surface-elevated);
}

/* Section Utilities */
section {
  padding-top: 5rem;
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-eyebrow::before {
  content: '//';
  color: var(--text-dim);
}

.section-heading {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.section-lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 760px;
  margin-bottom: 3rem;
  line-height: 1.7;
}

/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */
.hero {
  padding-top: 5rem;
  padding-bottom: 6rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.hero-badge-tag {
  color: var(--accent);
  font-weight: 700;
}

/* Glow pulses via opacity on a pseudo-element (compositor-only, no per-frame repaint) */
.hero-emblem { position: relative; width: fit-content; margin: 0 auto 24px; }
.hero-emblem::before { content: ''; position: absolute; inset: -24px; border-radius: 50%; background: radial-gradient(circle, rgba(56, 189, 248, 0.35), transparent 65%); opacity: 0.2; animation: node-pulse 4s ease-in-out infinite alternate; pointer-events: none; }
.hero-emblem img { position: relative; display: block; width: 120px; height: 120px; filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.25)); }
@keyframes node-pulse { 0% { opacity: 0.2; } 100% { opacity: 1; } }

.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 1.75rem;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title .highlight {
  color: var(--accent);
}

.hero-description {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-primary);
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.5rem;
  line-height: 1.65;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: stretch;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 4rem;
}

/* Telemetry HUD inside Hero */
.telemetry-console {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

.console-header {
  background-color: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.console-controls {
  display: flex;
  gap: 6px;
}

.console-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.console-dot.close { background: #ef4444; }
.console-dot.minimize { background: var(--status-amber); }
.console-dot.maximize { background: var(--status-emerald); }

.console-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.console-line {
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
}

.cmd-prompt { color: var(--accent); }
.cmd-val { color: var(--text-primary); }
.cmd-stat { color: var(--status-emerald); }
.cmd-warn { color: var(--status-amber); }

/* ==========================================================================
   2. PORTFOLIO SECTION (FYVORIN SPOTLIGHT)
   ========================================================================== */
.portfolio-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.spotlight-card,
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.spotlight-card:hover,
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.3);
}

.spotlight-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.spotlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fbbf24;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.card-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  transition: transform 0.2s ease;
}

.card-link:hover,
.card-link:focus-visible {
  color: #7dd3fc;
}

.card-link:hover svg,
.card-link:focus-visible svg {
  transform: translateX(4px);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  display: inline-block;
  animation: pulse-dot-anim 2s ease-in-out infinite;
}

@keyframes pulse-dot-anim {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

.spotlight-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.spotlight-title span {
  color: var(--accent);
}

.spotlight-description {
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 900px;
}

/* Feature Cards Grid */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.feature-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.25rem;
  transition: border-color 0.2s ease;
}

.feature-item:hover {
  border-color: var(--border-hover);
}

.feature-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}

.feature-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.feature-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Beta Access Card (mailto, zero backend) */
.beta-enrollment-card {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.75rem;
  margin-top: 1rem;
}

.beta-enrollment-header {
  margin-bottom: 1.5rem;
}

.beta-enrollment-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.beta-enrollment-title svg {
  flex-shrink: 0;
}

.beta-enrollment-lead {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.beta-steps {
  list-style: none;
  counter-reset: beta-step;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.beta-steps li {
  counter-increment: beta-step;
  position: relative;
  padding-left: 2.5rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.beta-steps li::before {
  content: counter(beta-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  padding-top: 0.15rem;
}

.btn-block {
  width: 100%;
}

.beta-fallback {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.beta-fallback a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

/* Studio Capabilities Grid */
.capabilities-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.initiatives-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

.initiative-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.initiative-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.initiative-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.initiative-card h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.initiative-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==========================================================================
   3. TECHNICAL DNA SECTION
   ========================================================================== */
.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.25rem;
  margin-bottom: 2.5rem;
}

.stack-tags span {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid #333333;
  border-radius: 6px;
  color: #9ca3af;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  background: var(--bg-surface);
  line-height: 1.4;
}

.dna-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.dna-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 2rem 1.5rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dna-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.dna-index {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
}

.dna-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.dna-card p {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.tech-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--accent);
}

/* Native Pure CSS Accordion via HTML5 <details> */
.specs-accordion-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
}

.spec-details {
  border-bottom: 1px solid var(--border-subtle);
}

.spec-details:last-child {
  border-bottom: none;
}

.spec-summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  list-style: none;
  user-select: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.spec-summary::-webkit-details-marker {
  display: none;
}

.spec-summary:hover {
  background-color: var(--bg-surface-elevated);
  color: var(--accent);
}

.spec-summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.spec-details[open] > .spec-summary::after {
  content: '−';
}

.spec-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.spec-content code {
  font-family: var(--font-mono);
  background: var(--bg-base);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  color: var(--accent);
  font-size: 0.85em;
}

/* ==========================================================================
   4. FOOTER
   ========================================================================== */
footer {
  background-color: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  padding-top: 4.5rem;
  padding-bottom: 3rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.footer-brand-col p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
  line-height: 1.6;
  max-width: 360px;
}

.footer-col h2 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease;
  display: inline-block;
}

.footer-col a:hover,
.footer-col a:focus-visible {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-bottom-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal-notice {
  font-size: 0.75rem;
  line-height: 1.5;
}

.legal-entity-logo {
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  width: 20px;
  height: 20px;
}

.origin-signature {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.legal-privacy-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  margin-top: 8px;
  display: inline-block;
}

.legal-privacy-link:hover,
.legal-privacy-link:focus-visible {
  color: var(--accent);
}

.system-status-label {
  color: var(--accent);
  font-weight: 700;
}

.system-status-value--beta {
  color: var(--status-amber);
}

.footer-contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.footer-contact-row a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-contact-row a:hover,
.footer-contact-row a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.footer-contact-row .contact-sep {
  color: var(--text-dim);
}

/* Compact footer for subpages (no link grid) */
.footer-compact {
  padding-top: 2.5rem;
}

.footer-compact .footer-bottom {
  border-top: none;
  padding-top: 0;
}

/* ==========================================================================
   5. SUBPAGES (Legal Documents & Error Page)
   ========================================================================== */
.doc-page {
  padding-top: 4rem;
  padding-bottom: 5rem;
}

.doc-container {
  max-width: 820px;
}

.doc-header {
  margin-bottom: 2.5rem;
}

.doc-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.doc-notice {
  background: var(--accent-muted);
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 2.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.doc-notice a {
  color: var(--accent);
}

/* Per-language document block (EN, then ES) */
.doc-lang-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
}

.doc-lang-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.doc-lang-block h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.doc-lang-block h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.doc-lang-block h3:first-of-type {
  margin-top: 0;
}

.doc-lang-block p,
.doc-lang-block li {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.doc-lang-block p {
  margin-bottom: 1rem;
}

.doc-lang-block ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.doc-lang-block li {
  margin-bottom: 0.4rem;
}

.doc-lang-block a {
  color: var(--accent);
}

.doc-lang-block strong {
  color: var(--text-primary);
}

/* Error Page (404) */
.error-page {
  text-align: center;
  padding-top: 6rem;
  padding-bottom: 6rem;
  border-bottom: none;
}

.error-panel {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
}

.error-panel img {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.error-panel h1 {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.error-panel p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (Mobile First -> Multi-column Desktop >= 600px)
   ========================================================================== */
@media (min-width: 600px) {
  html {
    scroll-padding-top: 7rem;
  }

  header {
    position: sticky;
    top: 0;
  }

  .nav-wrapper {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .hero-cta-group {
    flex-direction: row;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .initiatives-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dna-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 992px) {
  html {
    scroll-padding-top: 5rem;
  }

  .spotlight-card {
    padding: 3rem;
  }

  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .initiatives-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .dna-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.5fr repeat(3, 1fr);
  }
}

/* ==========================================================================
   MOTION (Pure CSS, progressive enhancement)
   - Cross-page transitions between Home, Privacy and Terms.
   - Scroll-driven reveals: content fades up as it enters the viewport.
   Both apply only where the browser supports them and the visitor has not asked
   for reduced motion. Elsewhere the page renders exactly as before, fully visible.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  /* The header stays put while the page content cross-fades beneath it. */
  header {
    view-transition-name: site-header;
  }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    translate: 0 24px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* `translate` (not `transform`) so the cards' hover lift still composes on top. */
    .section-heading,
    .section-lead,
    .telemetry-console,
    .spotlight-card,
    .feature-item,
    .beta-enrollment-card,
    .initiative-card,
    .stack-tags,
    .dna-card,
    .specs-accordion-wrapper,
    .doc-lang-block {
      animation: reveal-up linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 25%;
    }
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .spotlight-card:hover,
  .card:hover,
  .initiative-card:hover,
  .card-link:hover svg,
  .card-link:focus-visible svg {
    transform: none;
  }
}
