/*
  M.A.R.E. accessibility layer
  Loaded after the client-approved stylesheet so visual content remains intact
  while typography, contrast, focus and responsive spacing meet the v1 standard.
*/

:root {
  --page-gutter: clamp(1rem, 3vw, 3rem);
  --section-space: clamp(4rem, 8vw, 7.8125rem);
  --type-compact: clamp(0.75rem, 0.72rem + 0.1vw, 0.875rem);
  --type-body: clamp(1rem, 0.97rem + 0.12vw, 1.125rem);
  --type-body-wide: clamp(1rem, 0.96rem + 0.25vw, 1.125rem);
  --body-leading: 1.65;
  --focus-ring: #f4c52e;
  --content-text: #314c55;
  --content-muted: #526a72;
}

html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #071820;
  --ink: #edf8fa;
  --line: #33545e;
  --aqua-dark: #9de0ec;
  --content-text: #dceff2;
  --content-muted: #bfd7dc;
}

html {
  color-scheme: light dark;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  scroll-padding-top: calc(6rem + env(safe-area-inset-top));
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  font-size: var(--type-body);
  line-height: var(--body-leading);
  text-rendering: optimizeLegibility;
}

main,
main > section,
.revised-opening,
.revised-closing {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

img,
picture,
video,
canvas {
  max-width: 100%;
}

.shell {
  width: min(73.75rem, calc(100% - (2 * var(--page-gutter))));
}

.section {
  padding-block: var(--section-space);
}

.hero h1 {
  font-size: clamp(3.25rem, 8vw, 6.625rem);
  line-height: 0.96;
  text-wrap: balance;
}

.hero-lede {
  max-width: 42rem;
  margin-block: clamp(1.5rem, 3vw, 2.25rem);
  color: #f1f9fa;
  font-size: var(--type-body-wide);
  line-height: 1.65;
}

.hero-actions {
  gap: clamp(0.75rem, 1.5vw, 1.125rem);
}

.button,
.button-secondary,
.text-link {
  min-height: 2.75rem;
}

.button-secondary {
  border-color: #a9d9e4;
  color: #ffffff;
}

.button-secondary:hover {
  background: rgba(103, 179, 198, 0.2);
}

.decision-copy,
.analyst-assurance-copy,
.solutions-top > p,
.network-copy > p,
.role-copy > p,
.cta-inner > p {
  color: var(--content-text);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.125rem);
  line-height: 1.7;
}

.proof-grid span,
.feed-tag,
.source-tag,
.cap-number,
.mini-label,
.role-index,
.network-caption span,
.shot-caption span,
.system-kicker,
.signal-core span,
.signal-core small,
.signal-result > span,
.footer-bottom {
  font-size: var(--type-compact);
  line-height: 1.45;
}

.proof-grid span {
  color: #d2e3e6;
}

.system-kicker,
.system-kicker small {
  color: #4c6268;
}

.source-body small,
.ecosystem-panel li small {
  color: #4c6268;
  font-size: var(--type-compact);
  line-height: 1.5;
}

.signal-result > span {
  color: #1e5b70;
}

.signal-result > small {
  color: #3c565d;
  font-size: var(--type-compact);
}

.kicker,
.cap-content .mini-label {
  color: #24677d;
}

/* Make the VigilEye destination unmistakable when reached from navigation. */
.vigileye-section .section-heading .kicker {
  margin-bottom: clamp(1rem, 0.8rem + 0.35vw, 1.35rem);
  font-size: clamp(1rem, 0.93rem + 0.22vw, 1.2rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: clamp(0.12em, 0.1em + 0.08vw, 0.18em);
}

.split-heading > p {
  color: #4e656b;
}

.cap-number {
  color: #49636a;
}

.network-points > div > p {
  color: #52666b;
}

.vigileye-proof-head .mini-label,
.vigileye-proof-note,
.role-index {
  color: #bfd9de;
}

.analyst-assurance-copy {
  color: #d6e8eb;
}

.analyst-assurance-copy h3 {
  color: #f1f9fa;
}

.analyst-assurance-copy h3 em {
  color: #9de0ec;
}

a:focus-visible,
summary:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(4, 16, 23, 0.78);
}

@media (max-width: 48.75rem) {
  .hero-actions {
    align-items: stretch;
  }

  .hero-actions .button {
    width: min(100%, 23rem);
  }

  .audience-line {
    gap: 0.65rem;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Use the system scheme only before the explicit menu preference is available. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --paper: #071820;
    --ink: #eef8fa;
    --line: #31525d;
    --aqua-dark: #8bd2e2;
    --content-text: #d6e8eb;
    --content-muted: #b7d1d6;
  }

  html:not([data-theme]) :is(.site-header, .decision-section, .signal-source, .role-card, .footer) {
    background-color: #0a2029;
    border-color: #31525d;
  }

  html:not([data-theme]) :is(.section-heading h2, .solutions-top h2, .network-copy h2, .cta-inner h2, .decision-copy, .analyst-assurance-copy, .solutions-top > p, .network-copy > p, .role-copy > p, .cta-inner > p) {
    color: var(--content-text);
  }
}

/* M.A.R.E. palette extensions: dark navy surfaces and pale aqua text retain
   the original brand while supplying a reliable contrast pair. */
.theme-toggle {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0 0.7rem;
  color: #173744;
  background: transparent;
  border: 1px solid #54747d;
  border-radius: 2px;
  font: 700 clamp(0.75rem, 0.72rem + 0.1vw, 0.875rem)/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.theme-toggle:hover {
  color: #071820;
  background: #d9eef2;
  border-color: #173744;
}

.theme-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.mobile-theme-control {
  padding: 0.8rem 1.15rem 0.2rem;
}

.mobile-theme-control .theme-toggle {
  width: 100%;
}

.revised-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.5rem, 1vw, 0.875rem);
}

.revised-site-header .theme-toggle {
  color: #d7e2e3;
  border-color: rgba(202, 226, 230, 0.55);
}

.revised-site-header .theme-toggle:hover {
  color: #ffffff;
  background: rgba(19, 66, 79, 0.72);
  border-color: #d7e2e3;
}

.revised-site-header .theme-control {
  display: inline-flex;
  flex: 0 0 auto;
  overflow: visible;
  border: 0.0625rem solid rgba(202, 226, 230, 0.55);
  border-radius: 0.5rem;
  background: rgba(3, 21, 29, 0.36);
}

.revised-site-header .theme-option {
  position: relative;
  display: inline-grid;
}

.revised-site-header .theme-tooltip {
  position: absolute;
  z-index: 140;
  top: calc(100% + 0.55rem);
  left: 50%;
  width: max-content;
  max-width: min(15rem, 80vw);
  padding: 0.45rem 0.65rem;
  border: 0.0625rem solid rgba(191, 218, 222, 0.55);
  border-radius: 0.25rem;
  color: #f5f8f8;
  background: #03151d;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.28);
  font-family: Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transform: translate(-50%, -0.25rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.revised-site-header .theme-option:hover .theme-tooltip,
.revised-site-header .theme-option:has(button:focus-visible) .theme-tooltip {
  transform: translate(-50%, 0);
  opacity: 1;
}

html[data-theme="light"] .revised-site-header .theme-tooltip {
  border-color: rgba(9, 70, 84, 0.45);
  color: #102b35;
  background: #ffffff;
}

html[data-theme="contrast"] .revised-site-header .theme-tooltip {
  border-color: #ffffff;
  color: #ffffff;
  background: #000000;
}

.revised-site-header .theme-option + .theme-option {
  border-left: 0.0625rem solid rgba(202, 226, 230, 0.34);
}

.revised-site-header .theme-control button {
  display: inline-grid;
  width: 2.5rem;
  min-height: 2.5rem;
  place-items: center;
  padding: 0;
  border: 0;
  color: #d7e2e3;
  background: transparent;
}

.revised-site-header .theme-control button:hover,
.revised-site-header .theme-control button[aria-pressed="true"] {
  color: #03151d;
  background: #63d8ee;
}

.revised-site-header .theme-control button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 0.1875rem solid #f6c746;
  outline-offset: -0.1875rem;
}

.revised-site-header .theme-control svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.revised-site-header nav a,
.revised-site-header .revised-login {
  white-space: nowrap;
}

.revised-site-header nav {
  font-weight: 750;
}

html[data-theme="light"] .revised-site-header .theme-control {
  border-color: rgba(9, 70, 84, 0.42);
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .revised-site-header .theme-option + .theme-option {
  border-color: rgba(9, 70, 84, 0.2);
}

html[data-theme="light"] .revised-site-header .theme-control button {
  color: #164754;
}

html[data-theme="light"] .revised-site-header .theme-control button:hover,
html[data-theme="light"] .revised-site-header .theme-control button[aria-pressed="true"] {
  color: #03151d;
  background: #63d8ee;
}

html[data-theme="contrast"] .revised-site-header .theme-control {
  border-color: #ffffff;
  background: #000000;
}

html[data-theme="contrast"] .revised-site-header .theme-option + .theme-option {
  border-color: #ffffff;
}

html[data-theme="contrast"] .revised-site-header .theme-control button {
  color: #ffffff;
}

html[data-theme="contrast"] .revised-site-header .theme-control button[aria-pressed="true"] {
  color: #000000;
  background: #ffde00;
}

@media (min-width: 70rem) {
  .section-heading,
  .solutions-top,
  .network-grid {
    max-width: none;
  }

  .section-heading h2,
  .solutions-top h2,
  .network-copy h2 {
    max-width: 70rem;
    font-size: clamp(2.5rem, 3.75vw, 4.125rem);
  }

  .section-heading h2:has(br),
  .solutions-top h2:has(br),
  .network-copy h2:has(br) {
    white-space: nowrap;
  }

  .split-heading {
    grid-template-columns: minmax(0, 1.55fr) minmax(18rem, .6fr);
    gap: clamp(3rem, 6vw, 7rem);
  }

  .decision-section .decision-grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(24rem, 0.95fr);
    gap: clamp(2rem, 3vw, 2.75rem);
    align-items: center;
  }

  .decision-section .section-heading h2 {
    max-width: 44rem;
    font-size: clamp(2.75rem, 3.2vw, 3.25rem);
    white-space: normal;
  }

  .decision-section .decision-copy {
    max-width: 32rem;
    font-size: clamp(0.9375rem, 0.91rem + 0.08vw, 1rem);
    line-height: 1.65;
  }

  .vigileye-section .split-heading {
    grid-template-columns: minmax(0, 1.7fr) minmax(23rem, 0.8fr);
    gap: clamp(2rem, 3vw, 3rem);
    align-items: center;
  }

  .vigileye-section .section-heading h2 {
    max-width: 50rem;
    font-size: clamp(2.75rem, 3vw, 3.1rem);
    white-space: normal;
  }

  .vigileye-section .split-heading > p {
    max-width: 27rem;
  }

  .network-section .network-grid {
    grid-template-columns: minmax(24rem, 0.9fr) minmax(0, 1.25fr);
    gap: clamp(3rem, 5vw, 5.5rem);
  }

  .network-section .network-visual {
    width: 100%;
    min-width: 24rem;
  }
}

@media (max-width: 45rem) {
  .shell,
  .revised-hero-grid,
  .revised-audience-block,
  .revised-metrics,
  .revised-closing footer {
    width: min(73.75rem, calc(100% - 2rem));
    max-width: 100%;
  }

  :is(h1, h2, h3, p, li, a, span) {
    overflow-wrap: break-word;
  }

  .revised-site-header .theme-toggle {
    min-width: 2.75rem;
    padding-inline: 0.65rem;
  }

  .revised-site-header .theme-toggle span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .revised-site-header .theme-tooltip {
    transition: none;
  }
}

.cookie-banner {
  position: fixed;
  z-index: 1000;
  right: var(--page-gutter);
  bottom: max(var(--page-gutter), env(safe-area-inset-bottom));
  left: var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 2rem);
  width: min(68rem, calc(100% - (2 * var(--page-gutter))));
  margin-inline: auto;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 0.0625rem solid rgba(184, 235, 240, 0.55);
  border-radius: 0.5rem;
  color: #f5f8f8;
  background: rgba(3, 21, 29, 0.97);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.4);
}

.cookie-banner strong {
  display: block;
  font-size: 1rem;
}

.cookie-banner p {
  max-width: 44rem;
  margin: 0.35rem 0;
  color: #d6e8eb;
  font-size: clamp(0.875rem, 0.84rem + 0.1vw, 1rem);
  line-height: 1.5;
}

.cookie-banner a {
  color: #b8ebf0;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.cookie-actions {
  display: flex;
  flex: 0 0 auto;
}

.cookie-actions .button {
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem;
  font-size: clamp(0.8125rem, 0.78rem + 0.1vw, 0.9375rem);
}

@media (max-width: 48rem) {
  .cookie-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .cookie-actions,
  .cookie-actions .button {
    width: 100%;
  }
}

/* The title may stay centered; running copy remains easier to read left-aligned. */
.hero-lede {
  text-align: left;
}

.skip-link:focus,
.skip-link:focus-visible {
  color: #071820;
  background: #f4c52e;
  outline: 3px solid #ffffff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #071820;
}

.footer-links a,
.footer-bottom a {
  color: #d7edef;
  text-decoration-line: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.footer-links a:hover,
.footer-bottom a:hover {
  color: #9de0ec;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .decision-section,
html[data-theme="dark"] .capabilities-section,
html[data-theme="dark"] .vigileye-section,
html[data-theme="dark"] .network-section,
html[data-theme="dark"] .signal-source,
html[data-theme="dark"] .role-card,
html[data-theme="dark"] .ecosystem-panel,
html[data-theme="dark"] .capability-card,
html[data-theme="dark"] .footer {
  background-color: #0a2029;
  border-color: #31525d;
}

html[data-theme="dark"] .signal-source,
html[data-theme="dark"] .ecosystem-panel,
html[data-theme="dark"] .capability-card {
  box-shadow: none;
}

html[data-theme="dark"] .ecosystem-grid,
html[data-theme="dark"] .capability-grid {
  background: #31525d;
  border-color: #31525d;
}

html[data-theme="dark"] .ecosystem-panel li {
  border-color: #31525d;
}

html[data-theme="dark"] .ecosystem-panel:nth-child(2) {
  border-top-color: #f6c746;
}

html[data-theme="dark"] .desktop-nav a,
html[data-theme="dark"] .login-link,
html[data-theme="dark"] .ecosystem-panel h4,
html[data-theme="dark"] .ecosystem-panel li strong,
html[data-theme="dark"] .ecosystem-head > p,
html[data-theme="dark"] .split-heading > p,
html[data-theme="dark"] .network-points > div > p,
html[data-theme="dark"] .source-body small,
html[data-theme="dark"] .ecosystem-panel li small {
  color: #dceff2;
}

html[data-theme="dark"] .source-body strong,
html[data-theme="dark"] .cap-content p:not(.mini-label),
html[data-theme="dark"] .cap-list,
html[data-theme="dark"] .cap-content a,
html[data-theme="dark"] .tracking-option small,
html[data-theme="dark"] .network-copy > p:not(.kicker) {
  color: #dceff2;
}

html[data-theme="dark"] .cap-content h3,
html[data-theme="dark"] .tracking-option strong {
  color: #f4fbfc;
}

html[data-theme="dark"] .signal-icon {
  color: #9de0ec;
  border-color: #6fc7d6;
  background: rgba(99, 216, 238, 0.08);
}

html[data-theme="dark"] .cap-content .mini-label,
html[data-theme="dark"] .cap-content a span,
html[data-theme="dark"] .capability-index,
html[data-theme="dark"] .cap-number {
  color: #8fdcea;
}

html[data-theme="dark"] .cap-list {
  border-color: #466772;
}

html[data-theme="dark"] .cap-list li::before {
  color: #f6c746;
}

html[data-theme="dark"] .tracking-option {
  border-color: rgba(143, 220, 234, 0.42);
  background: rgba(2, 19, 27, 0.9);
}

html[data-theme="dark"] .network-visual {
  border-color: #466772;
}

html[data-theme="dark"] .theme-toggle {
  color: #edf8fa;
  border-color: #8bcfdb;
}

html[data-theme="dark"] .theme-toggle:hover {
  color: #071820;
  background: #9de0ec;
  border-color: #9de0ec;
}
