/* ==========================================================================
   TENSOR SV — Design System
   Ingeniería de Software e Infraestructura · San Salvador, El Salvador
   ========================================================================== */

/* --- Custom Properties / Tokens --- */
:root {
  /* Colors - Light (Default technical paper) */
  --bg: #f8f8f6;
  --bg-surface: #ffffff;
  --bg-subtle: #f0f0ee;
  --fg: #0c0a09;
  --fg-secondary: #27272a;
  --fg-muted: #52525b;
  --fg-subtle: #71717a;
  --border: #e4e4e7;
  --border-strong: #a1a1aa;
  --border-subtle: #eeeeea;

  /* Brand Accent */
  --brand: #16a34a;
  --brand-hover: #15803d;
  --brand-light: rgba(22, 163, 74, 0.08);
  --brand-border: rgba(22, 163, 74, 0.25);

  /* Semantic */
  --success: #16a34a;
  --error: #dc2626;
  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;

  /* Typography */
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-display: 'Instrument Serif', Georgia, serif;

  /* Spacing Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Layout */
  --container-max: 1200px;
  --header-height: 68px;
  --radius-sm: 2px;
  --radius-md: 4px;
}

/* --- Dark Theme Support --- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0b;
    --bg-surface: #121215;
    --bg-subtle: #18181c;
    --fg: #ebebef;
    --fg-secondary: #d4d4d8;
    --fg-muted: #a1a1aa;
    --fg-subtle: #71717a;
    --border: #222228;
    --border-strong: #3f3f46;
    --border-subtle: #1c1c22;

    --brand: #22c55e;
    --brand-hover: #16a34a;
    --brand-light: rgba(34, 197, 94, 0.12);
    --brand-border: rgba(34, 197, 94, 0.3);

    --error-bg: #450a0a;
    --error-border: #7f1d1d;
    --success-bg: #052e16;
    --success-border: #14532d;
  }
}

/* --- Global Reset & Box Sizing --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-mono);
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* High Contrast Link Focus */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* Selection */
::selection {
  background-color: var(--fg);
  color: var(--bg);
}

/* Accessibility skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--fg);
  color: var(--bg);
  padding: 8px 16px;
  z-index: 1000;
  font-size: 14px;
  transition: top 0.2s ease;
  text-decoration: none;
}
.skip-link:focus {
  top: 16px;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

@media (min-width: 768px) {
  .container {
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (min-width: 1200px) {
  .container {
    padding-left: 48px;
    padding-right: 48px;
  }
}

/* --- Typography Helpers --- */
.italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.text-muted {
  color: var(--fg-muted);
}

.text-brand {
  color: var(--brand);
}

/* --- Navigation & Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(248, 248, 246, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background: rgba(10, 10, 11, 0.92);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--fg);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}

.brand-mark-svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.brand-sv-badge {
  font-size: 0.75rem;
  padding: 1px 5px;
  background-color: var(--brand-light);
  color: var(--brand);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-left: 2px;
}

/* Desktop Nav */
.nav-desktop {
  display: none;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 28px;
  }

  .nav-link {
    color: var(--fg-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.15s ease;
    padding: 6px 0;
    position: relative;
  }

  .nav-link:hover {
    color: var(--fg);
  }

  .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--brand);
    transition: width 0.2s ease;
  }

  .nav-link:hover::after {
    width: 100%;
  }
}

/* Telemetry pill */
.telemetry-pill {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--fg-subtle);
  background: var(--bg-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  white-space: nowrap;
}

@media (min-width: 640px) {
  .telemetry-pill {
    display: flex;
  }
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--brand);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px var(--brand-light);
  animation: pulse-dot 2.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 420px) {
  .header-actions > .btn {
    display: none;
  }
}

@media (min-width: 640px) {
  .header-actions {
    gap: 16px;
  }
}

/* Mobile Toggle Button */
.mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  cursor: pointer;
  padding: 0;
}

@media (min-width: 1024px) {
  .mobile-toggle {
    display: none;
  }
}

.mobile-toggle svg {
  width: 20px;
  height: 20px;
}

/* Mobile Menu Drawer */
.mobile-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 20px;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, visibility 0.25s;
  z-index: 99;
  overflow-y: auto;
}

.mobile-drawer.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav-link {
  font-size: 1.15rem;
  color: var(--fg);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}

.mobile-nav-link span.num {
  font-size: 0.8rem;
  color: var(--brand);
}

.mobile-drawer .telemetry-pill {
  margin-top: 12px;
  align-self: flex-start;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 12px 24px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
}

.btn-primary:hover {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  color: var(--fg);
  border: 1px solid var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--fg);
  background-color: var(--bg-subtle);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 0.8rem;
}

.btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}

.btn:hover svg {
  transform: translateX(3px);
}

/* --- Meta Tag / Labels --- */
.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.meta-line {
  display: inline-block;
  width: 16px;
  height: 1px;
  background-color: var(--brand);
}

/* --- Section Shared Styles --- */
.section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
  border-bottom: 1px solid var(--border);
  position: relative;
}

@media (min-width: 768px) {
  .section {
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
  }
}

.section-header {
  margin-bottom: var(--space-10);
  max-width: 820px;
}

.section-title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--fg-muted);
  line-height: 1.6;
}

/* --- Hero Section --- */
.hero-section {
  padding-top: calc(var(--header-height) + var(--space-10));
  padding-bottom: var(--space-16);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
  .hero-section {
    padding-top: calc(var(--header-height) + var(--space-16));
    padding-bottom: var(--space-20);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.25fr 0.95fr;
    gap: var(--space-16);
  }
}

.hero-title {
  font-size: clamp(2.4rem, 8vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: var(--space-4);
}

.hero-subtitle {
  font-size: clamp(1.4rem, 4.5vw, 2.25rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--fg-secondary);
  margin-bottom: var(--space-6);
}

.hero-subtitle strong {
  color: var(--fg);
  font-weight: 600;
}

.hero-description {
  font-size: clamp(0.95rem, 2vw, 1.08rem);
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: var(--space-8);
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: var(--space-10);
}

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
    align-items: center;
  }
}

/* Metrics Row */
.metrics-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

@media (min-width: 560px) {
  .metrics-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-val {
  font-size: clamp(1.2rem, 3.5vw, 1.75rem);
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.metric-label {
  font-size: 0.72rem;
  color: var(--fg-subtle);
  letter-spacing: 0.02em;
  margin-top: 2px;
}

/* Hero Visual Box */
.hero-visual-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  text-align: center;
}

.hero-mark-svg {
  width: 100%;
  max-width: 280px;
  height: auto;
  aspect-ratio: 1 / 1;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-mark-svg {
    max-width: 320px;
  }
}

.visual-caption {
  margin-top: var(--space-6);
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--fg-subtle);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-3);
}

/* --- Problem / Diagnostics Section --- */
.diagnostics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .diagnostics-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

.diag-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: var(--space-8);
  border-radius: var(--radius-sm);
  position: relative;
}

.diag-card.highlight {
  border-color: var(--fg);
  background: var(--bg);
}

.diag-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.diag-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.badge-risk {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error-border);
}

.badge-solution {
  background: var(--brand-light);
  color: var(--brand);
  border: 1px solid var(--brand-border);
}

.diag-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--fg);
}

.diag-card p {
  color: var(--fg-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* --- Capabilities Section --- */
.capabilities-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
  .capabilities-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

.cap-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: var(--space-8);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease;
}

.cap-card:hover {
  border-color: var(--border-strong);
}

.cap-icon {
  width: 44px;
  height: 44px;
  background: var(--brand-light);
  color: var(--brand);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
}

.cap-icon svg {
  width: 22px;
  height: 22px;
}

.cap-card h3 {
  font-size: 1.35rem;
  margin-bottom: var(--space-3);
  color: var(--fg);
}

.cap-card p {
  font-size: 0.92rem;
  color: var(--fg-muted);
  line-height: 1.65;
  margin-bottom: var(--space-6);
  flex-grow: 1;
}

.cap-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-4);
}

.cap-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--fg-secondary);
}

.cap-points li::before {
  content: '→';
  color: var(--brand);
  font-weight: 600;
}


/* --- Services Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: var(--space-6);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.service-card:hover {
  border-color: var(--fg);
}

.service-idx {
  font-size: 0.75rem;
  color: var(--brand);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.service-card h4 {
  font-size: 1.15rem;
  color: var(--fg);
  margin-bottom: var(--space-3);
}

.service-card p {
  font-size: 0.86rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: var(--space-4);
  flex-grow: 1;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-4);
}

.service-tag {
  font-size: 0.72rem;
  padding: 2px 7px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg-subtle);
}

/* --- Methodology Timeline --- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.timeline-step {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  transition: border-color 0.15s ease;
}

@media (min-width: 768px) {
  .timeline-step {
    grid-template-columns: 80px 1.5fr 120px;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-6) var(--space-8);
  }
}

.timeline-step:hover {
  border-color: var(--brand);
}

.step-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand);
}

.step-info h4 {
  font-size: 1.15rem;
  color: var(--fg);
  margin-bottom: 4px;
}

.step-info p {
  font-size: 0.88rem;
  color: var(--fg-muted);
}

.step-duration {
  font-size: 0.78rem;
  color: var(--fg-subtle);
  background: var(--bg-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  white-space: nowrap;
  display: inline-block;
  text-align: center;
}

/* --- Credentials --- */
.credentials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .credentials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.credential-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
}

.cred-index {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--brand);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.credential-box h4 {
  font-size: 1.1rem;
  color: var(--fg);
  margin-bottom: var(--space-2);
}

.credential-box p {
  font-size: 0.86rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* --- Contact Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-16);
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.contact-status-card {
  margin-top: var(--space-8);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--fg-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.contact-meta-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-meta-row strong {
  color: var(--fg);
}

/* Form Styling */
.form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
}

@media (min-width: 768px) {
  .form-card {
    padding: var(--space-10);
  }
}

.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: var(--space-2);
  letter-spacing: 0.02em;
}

.form-label .req {
  color: var(--brand);
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 1rem; /* 16px to prevent iOS auto-zoom */
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-light);
}

.form-textarea {
  min-height: 130px;
  resize: vertical;
}

/* Honeypot field (anti-spam) */
.honeypot-field {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  top: -9999px !important;
  left: -9999px !important;
}

/* Form Alert Boxes */
.form-alert {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-5);
  font-size: 0.88rem;
  line-height: 1.5;
  display: none;
}

.form-alert.is-visible {
  display: block;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.alert-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error-border);
}

.ticket-display {
  margin-top: 8px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--fg);
  background: var(--bg-surface);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
  font-size: 0.82rem;
  color: var(--fg-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

.footer-brand h5 {
  font-size: 1rem;
  color: var(--fg);
  margin-bottom: 8px;
}

.footer-col h6 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.75rem;
  color: var(--fg-subtle);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* --- Executive Hero H1 --- */
.hero-title-exec {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5.2vw, 3.85rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.06;
  color: var(--fg);
  margin-bottom: var(--space-5);
  max-width: 18ch;
}

.metric-val-compact {
  font-size: clamp(0.92rem, 1.3vw, 1.08rem);
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
}

/* --- Team Trajectory Nominative Marquee --- */
.pedigree-band {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding-top: var(--space-8);
  padding-bottom: var(--space-6);
  overflow: hidden;
}

.pedigree-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--space-5);
}

@media (min-width: 768px) {
  .pedigree-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.pedigree-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.pedigree-sublabel {
  font-size: 0.72rem;
  color: var(--fg-subtle);
}

.pedigree-marquee {
  position: relative;
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: 16px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}

.pedigree-track {
  display: flex;
  flex-shrink: 0;
  align-items: stretch;
  gap: 16px;
  min-width: 100%;
  animation: pedigree-scroll 48s linear infinite;
}

.pedigree-marquee:hover .pedigree-track,
.pedigree-marquee:focus-within .pedigree-track {
  animation-play-state: paused;
}

@keyframes pedigree-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - 16px));
  }
}

.pedigree-item {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: border-color 0.15s ease;
}

.pedigree-item:hover {
  border-color: var(--border-strong);
}

.pedigree-name {
  font-family: var(--font-display);
  font-size: 1.32rem;
  line-height: 1.15;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.pedigree-meta {
  font-size: 0.66rem;
  color: var(--fg-subtle);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}

.pedigree-disclaimer {
  margin-top: var(--space-4);
  font-size: 0.68rem;
  color: var(--fg-subtle);
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .pedigree-marquee {
    -webkit-mask-image: none;
    mask-image: none;
    overflow: visible;
  }
  .pedigree-track {
    animation: none;
    flex-wrap: wrap;
    min-width: 0;
  }
  .pedigree-track[aria-hidden="true"] {
    display: none;
  }
}

/* --- Execution Cases & Operator Advantage --- */
.operator-callout {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 900px) {
  .operator-callout {
    grid-template-columns: 240px 1fr;
    align-items: center;
    gap: var(--space-8);
    padding: var(--space-6) var(--space-8);
  }
}

.operator-callout-tag {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.operator-callout p {
  font-size: 0.88rem;
  color: var(--fg-secondary);
  line-height: 1.65;
}

.cases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 960px) {
  .cases-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.case-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease;
}

.case-card:hover {
  border-color: var(--fg);
}

.case-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  margin-bottom: var(--space-4);
}

.case-sector {
  color: var(--brand);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.case-badge {
  color: var(--fg-subtle);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.case-card h3 {
  font-size: 1.12rem;
  color: var(--fg);
  line-height: 1.35;
  margin-bottom: var(--space-3);
}

.case-card p {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.62;
  margin-bottom: var(--space-5);
  flex-grow: 1;
}

.case-outcomes {
  list-style: none;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.case-outcomes li {
  font-size: 0.76rem;
  color: var(--fg-secondary);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.case-outcomes li::before {
  content: '✓';
  color: var(--brand);
  font-weight: 700;
  flex-shrink: 0;
}

/* --- Commercial Engagement Models --- */
.models-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 960px) {
  .models-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.model-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
}

.model-card.featured {
  border-color: var(--brand);
  box-shadow: inset 0 2px 0 0 var(--brand);
}

.model-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-3);
}

.model-idx {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.05em;
}

.model-pill {
  font-size: 0.7rem;
  padding: 2px 8px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--fg-secondary);
  border-radius: var(--radius-sm);
}

.model-card h3 {
  font-size: 1.15rem;
  color: var(--fg);
  margin-bottom: var(--space-3);
}

.model-card p {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: var(--space-5);
  flex-grow: 1;
}

.model-deliverables {
  list-style: none;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-4);
  margin-bottom: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.model-deliverables li {
  font-size: 0.76rem;
  color: var(--fg-secondary);
  padding-left: 14px;
  position: relative;
}

.model-deliverables li::before {
  content: '·';
  position: absolute;
  left: 2px;
  color: var(--brand);
  font-weight: 700;
}

.model-cta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
  transition: color 0.15s ease;
}

.model-cta:hover {
  color: var(--brand);
}

/* --- B2B Form Qualification Chips & NDA Notice --- */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-option {
  position: relative;
}

.chip-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.chip-option label {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 0.76rem;
  color: var(--fg-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  user-select: none;
}

.chip-option label:hover {
  border-color: var(--border-strong);
  color: var(--fg);
}

.chip-option input[type="radio"]:checked + label {
  background: var(--brand-light);
  border-color: var(--brand);
  color: var(--fg);
  font-weight: 600;
}

.chip-option input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.nda-notice {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.74rem;
  color: var(--fg-subtle);
  line-height: 1.55;
}

.nda-notice a {
  color: var(--fg-secondary);
  text-decoration: underline;
}

/* --- Legal Prose (/privacidad) --- */
.legal-prose h3 {
  font-size: 1.05rem;
  color: var(--fg);
  margin-top: var(--space-8);
  margin-bottom: var(--space-2);
}

.legal-prose p {
  font-size: 0.9rem;
  color: var(--fg-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.legal-prose a {
  color: var(--brand);
}

/* --- Defensive Grid Overflow Guard --- */
.hero-grid > *,
.contact-grid > *,
.cases-grid > *,
.models-grid > *,
.services-grid > *,
.diagnostics-grid > * {
  min-width: 0;
}

/* --- Print Styles --- */
@media print {
  .site-header, .mobile-toggle, .btn, .form-card, .pedigree-band {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
}

