/*
 * TRiNOV theme layer — Swedish-gold study 08
 * Dark remains the default. Light is a neutral-grey glass counterpart.
 */

:root {
  color-scheme: dark;
  --bg: #151a1a;
  --bg-deep: #0e1314;
  --ink: #f0f3ef;
  --muted: #a7adaa;
  --line: rgba(240, 243, 239, 0.18);
  --glass: rgba(210, 213, 205, 0.075);
  --accent: #f5b700;
  --accent-strong: #ffca1a;
  --accent-text: #f5b700;
  --accent-text-strong: #f5b700;
  --accent-text-small: #f5b700;
  --accent-soft: rgba(245, 183, 0, 0.12);
  --accent-line: rgba(245, 183, 0, 0.48);
  --accent-glow: rgba(255, 188, 0, 0.42);
  --on-accent: #18150b;
  --focus-ring: #f5b700;
  --body-background:
    radial-gradient(circle at 12% 5%, rgba(183, 175, 163, 0.24), transparent 26%),
    radial-gradient(circle at 88% 70%, rgba(53, 102, 100, 0.2), transparent 30%),
    linear-gradient(150deg, #343531 0%, #1b2120 44%, #101617 100%);
  --text-lead: #d8ddd8;
  --text-focus: #edf1ed;
  --text-tail: #b6beb8;
  --text-body: #b7bcb8;
  --text-secondary: #aab1ad;
  --text-tertiary: #818986;
  --nav-hover: rgba(255, 255, 255, 0.06);
  --header-glass: var(--glass);
  --header-scrolled: rgba(21, 26, 26, 0.8);
  --mobile-nav: rgba(22, 27, 27, 0.985);
  --glass-hover: rgba(220, 225, 218, 0.11);
  --glass-featured: rgba(245, 183, 0, 0.075);
  --control-bg: rgba(255, 255, 255, 0.055);
  --control-hover: rgba(245, 183, 0, 0.12);
  --foundation-border: rgba(240, 243, 239, 0.22);
  --foundation-gradient:
    linear-gradient(135deg,
      rgba(216, 220, 214, 0.12) 0%,
      rgba(110, 121, 115, 0.09) 52%,
      rgba(54, 86, 79, 0.14) 100%);
  --process-node-bg: #29302e;
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  --hero-shadow: inset 0 0 60px rgba(255, 255, 255, 0.025);
  --axis-color: rgba(255, 255, 255, 0.07);
  --corner-color: rgba(255, 255, 255, 0.45);
  --logo-fill: #eef2ee;
  --brand-filter: none;
  --partner-logo-filter: brightness(0) invert(1);
  --partner-logo-opacity: 0.94;
  --grain-opacity: 0.035;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #e3e6e3;
  --bg-deep: #d1d6d2;
  --ink: #171b19;
  --muted: #58605c;
  --line: rgba(20, 27, 23, 0.16);
  --glass: rgba(178, 186, 182, 0.3);
  --accent: #f5b700;
  --accent-strong: #ffc51a;
  --accent-text: #b98200;
  --accent-text-strong: #a97800;
  --accent-text-small: #39403c;
  --accent-soft: rgba(185, 130, 0, 0.14);
  --accent-line: #a97800;
  --accent-glow: rgba(245, 183, 0, 0.24);
  --on-accent: #18150b;
  --focus-ring: #171b19;
  --body-background:
    radial-gradient(circle at 12% 5%, rgba(145, 139, 130, 0.14), transparent 29%),
    radial-gradient(circle at 88% 72%, rgba(101, 121, 113, 0.17), transparent 32%),
    linear-gradient(150deg, #eff0ed 0%, #e0e3e0 46%, #cdd3cf 100%);
  --text-lead: #4f5652;
  --text-focus: #171b19;
  --text-tail: #5d6561;
  --text-body: #414844;
  --text-secondary: #515955;
  --text-tertiary: #6f7773;
  --nav-hover: rgba(17, 23, 20, 0.055);
  --header-glass: rgba(255, 255, 255, 0.44);
  --header-scrolled: rgba(232, 235, 232, 0.82);
  --mobile-nav: rgba(235, 238, 235, 0.985);
  --glass-hover: rgba(200, 207, 203, 0.42);
  --glass-featured: rgba(185, 130, 0, 0.1);
  --control-bg: rgba(174, 182, 178, 0.24);
  --control-hover: rgba(185, 130, 0, 0.14);
  --foundation-border: rgba(20, 27, 23, 0.18);
  --foundation-gradient:
    linear-gradient(135deg,
      rgba(206, 212, 208, 0.5) 0%,
      rgba(180, 189, 184, 0.36) 52%,
      rgba(149, 163, 156, 0.28) 100%);
  --process-node-bg: #d1d6d2;
  --glass-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 18px 55px rgba(33, 41, 36, 0.055);
  --hero-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 0 70px rgba(255, 255, 255, 0.1),
    0 20px 60px rgba(33, 41, 36, 0.06);
  --axis-color: rgba(22, 29, 25, 0.1);
  --corner-color: rgba(22, 29, 25, 0.42);
  --logo-fill: #202522;
  --brand-filter: brightness(0);
  --partner-logo-filter: brightness(0);
  --partner-logo-opacity: 0.8;
  --grain-opacity: 0.025;
}

body {
  color: var(--ink);
  background: var(--body-background);
}

::selection {
  color: var(--on-accent);
  background: var(--accent);
}

.grain {
  opacity: var(--grain-opacity);
}

.ambient-one {
  background: #8a8277;
  opacity: 0.25;
}

.ambient-two {
  background: #124b4f;
  opacity: 0.25;
}

html[data-theme="light"] .ambient-one {
  background: #918b82;
  opacity: 0.1;
}

html[data-theme="light"] .ambient-two {
  background: #71837c;
  opacity: 0.14;
}

.glass {
  background: var(--glass);
  border-color: var(--line);
  box-shadow: var(--glass-shadow);
}

.site-header.glass {
  background: var(--header-glass);
}

.skip-link,
.button-primary {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}

.button-primary:hover {
  color: var(--on-accent);
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button-ghost:hover {
  background: var(--control-hover);
  border-color: var(--accent-line);
}

a:focus-visible,
button:focus-visible {
  outline-color: var(--focus-ring);
}

.site-header.scrolled {
  background: var(--header-scrolled);
}

.site-header nav a:hover,
.site-header nav a.active {
  color: var(--ink);
  background: var(--nav-hover);
  border-color: var(--nav-hover);
}

.header-controls {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
}

.language-switcher {
  justify-self: auto;
}

.theme-toggle {
  position: relative;
  width: 34px;
  height: 34px;
  display: none;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.js .theme-toggle {
  display: grid;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--muted);
  background: var(--nav-hover);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  overflow: visible;
}

.theme-icon {
  transform-origin: 10px 10px;
  transition: opacity 220ms ease, transform 260ms cubic-bezier(.2, .8, .2, 1);
}

.theme-icon-sun {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: square;
}

.theme-icon-moon {
  fill: currentColor;
}

html[data-theme="dark"] .theme-icon-sun {
  opacity: 0;
  transform: rotate(-35deg) scale(.65);
}

html[data-theme="dark"] .theme-icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

html[data-theme="light"] .theme-icon-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}

html[data-theme="light"] .theme-icon-moon {
  opacity: 0;
  transform: rotate(30deg) scale(.65);
}

.brand img {
  filter: var(--brand-filter);
}

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

html[data-theme="dark"] .brand-i {
  text-shadow: 0 0 12px rgba(245, 183, 0, 0.24);
}

.eyebrow span,
.language-switcher a[aria-current="page"]::after,
.site-header.open nav .mobile-language-switcher a[aria-current="page"]::after {
  background: var(--accent);
}

.eyebrow span::after {
  background: var(--accent);
  box-shadow: 0 0 9px var(--accent-glow);
}

.title-lead {
  color: var(--text-lead);
}

.title-focus strong {
  color: var(--text-focus);
}

.title-pre,
.title-tail {
  color: var(--text-tail);
}

.hero-description,
.service-card p,
.process-track p,
.contact p {
  color: var(--text-body);
}

.visual-head,
.process-top,
.metric span,
.section-heading > p,
.foundation-base small,
.foundation-base > span,
.foundation-capabilities span,
.partner-boundary,
.partner-role span,
.partner-capabilities span,
footer p,
footer a:last-child {
  color: var(--text-secondary);
}

.hero-foot,
.contact-kicker,
.contact-meta,
footer {
  color: var(--text-tertiary);
}

.metric strong {
  color: var(--accent-text-strong);
}

.section-index,
.card-top > span:first-child {
  color: var(--accent-text-small);
}

.status i {
  background: var(--accent);
  box-shadow: 0 0 13px var(--accent-glow);
}

.hero-visual {
  box-shadow: var(--hero-shadow);
}

.orbit {
  --orbit-rest: rgba(230, 232, 226, 0.17);
  --orbit-hit-core: rgb(255 248 218 / .98);
  --orbit-hit-glow: rgb(245 183 0 / .76);
  --orbit-hit-aura: rgb(245 183 0 / .34);
}

.orbit-three {
  --orbit-rest: rgba(230, 232, 226, 0.32);
}

.hero-logo-mark {
  --wave-line: rgba(255, 226, 110, 0.34);
  --wave-halo: rgba(245, 183, 0, 0.12);
  --panel-wave: rgba(255, 224, 96, 0.58);
  --logo-hit-core: rgb(255 250 226 / 1);
  --logo-hit-glow: rgb(245 183 0 / .76);
}

.logo-faces use {
  fill: var(--logo-fill);
}

.axis {
  background: var(--axis-color);
}

.orbit-dot {
  background: var(--accent);
  box-shadow: 0 0 17px var(--accent-glow);
}

.corner {
  border-color: var(--corner-color);
}

.scroll-line {
  background: var(--line);
}

.scroll-line i,
.track-line i {
  background: var(--accent);
}

.service-card:hover {
  background: var(--glass-hover);
}

.service-card.featured {
  background: var(--glass-featured);
}

.card-icon,
.service-card > a span {
  color: var(--accent-text);
}

.signal i,
.code-lines i {
  background: var(--accent-text);
}

.radar i {
  border-color: var(--accent-line);
}

.radar i:nth-child(3) {
  background: var(--accent);
  box-shadow: 0 0 25px var(--accent-glow);
}

.radar::after {
  background: linear-gradient(90deg, var(--accent), transparent);
}

.service-card h3 > span,
.service-card li,
.foundation-base > span {
  color: var(--text-secondary);
}

.service-card li::before {
  color: var(--accent-text);
}

.foundation-pillars span {
  color: var(--text-focus);
  background: var(--control-bg);
}

.foundation-connector::before,
.foundation-connector::after,
.foundation-connector i::before {
  background: var(--accent-line);
}

.foundation-connector i::after {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 12px var(--accent-glow);
}

.foundation-base div,
.foundation-base > span {
  border-color: var(--foundation-border);
  background: var(--foundation-gradient);
}

.process-track b {
  position: relative;
  z-index: 2;
  color: var(--accent-text-small);
  background: var(--process-node-bg);
}

.track-line i::after {
  background: var(--accent);
  box-shadow: 0 0 13px var(--accent-glow);
}

.deep-springs-logo {
  filter: var(--partner-logo-filter);
  opacity: var(--partner-logo-opacity);
}

.partner-motto {
  color: var(--text-focus);
}

.contact-panel::before {
  border-color: var(--accent-soft);
  box-shadow:
    0 0 0 80px color-mix(in srgb, var(--accent) 2.8%, transparent),
    0 0 0 160px color-mix(in srgb, var(--accent) 1.8%, transparent);
}

.contact-link {
  background: var(--control-bg);
}

.contact-link-static:hover {
  color: var(--ink);
  background: var(--control-bg);
}

.contact-link-static i {
  color: var(--accent-text);
  text-shadow: 0 0 10px var(--accent-glow);
}

html[data-theme="light"] .orbit {
  --orbit-rest: rgba(27, 35, 31, 0.14);
  --orbit-hit-core: rgb(185 130 0 / .94);
  --orbit-hit-glow: rgb(245 183 0 / .46);
  --orbit-hit-aura: rgb(185 130 0 / .2);
}

html[data-theme="light"] .orbit-three {
  --orbit-rest: rgba(27, 35, 31, 0.26);
}

html[data-theme="light"] .hero-logo-mark {
  --wave-neutral-line: rgba(32, 32, 32, 0.42);
  --wave-neutral-halo: rgba(32, 32, 32, 0.1);
  --panel-wave-neutral: rgba(32, 32, 32, 0.52);
  --wave-line: rgba(185, 130, 0, 0.5);
  --wave-halo: rgba(245, 183, 0, 0.12);
  --panel-wave: rgba(185, 130, 0, 0.62);
  --logo-rest-brightness: 1;
  --logo-trough-brightness: 1;
  --logo-hit-brightness: 1.05;
  --logo-hit-core: rgb(196 143 0 / 1);
  --logo-hit-glow: rgb(245 183 0 / .52);
}

html[data-theme="light"] .contact-panel::before {
  border-color: rgba(57, 64, 60, 0.16);
  box-shadow:
    0 0 0 80px rgba(57, 64, 60, 0.035),
    0 0 0 160px rgba(57, 64, 60, 0.022);
}

html[data-theme="light"] .orbit::after {
  mix-blend-mode: normal;
  filter: drop-shadow(0 0 4px var(--orbit-hit-core)) drop-shadow(0 0 12px var(--orbit-hit-glow));
}

html[data-theme="light"] .logo-face-flash {
  mix-blend-mode: normal;
}

@supports not (color: color-mix(in srgb, white, black)) {
  .contact-panel::before {
    box-shadow: 0 0 0 80px rgba(245, 183, 0, 0.028), 0 0 0 160px rgba(245, 183, 0, 0.018);
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto auto;
  }

  .header-controls {
    gap: 0;
  }

  .site-header.open nav {
    height: auto;
    background: var(--mobile-nav);
  }

  .menu-button span {
    background: var(--ink);
  }
}

@media (max-width: 600px) {
  .theme-toggle {
    width: 36px;
    height: 36px;
  }
}

@media (color-gamut: p3) {
  @supports (color: color(display-p3 1 1 1)) {
    html[data-theme="dark"] .orbit {
      --orbit-hit-core: color(display-p3 1 .93 .7 / .98);
      --orbit-hit-glow: color(display-p3 1 .68 0 / .78);
      --orbit-hit-aura: color(display-p3 1 .62 0 / .36);
    }

    html[data-theme="dark"] .hero-logo-mark {
      --logo-hit-core: color(display-p3 1 .96 .77);
      --logo-hit-glow: color(display-p3 1 .68 0 / .8);
    }
  }
}

@media (dynamic-range: high) {
  @supports (color: color(rec2100-pq .7 .6 .2)) {
    html[data-theme="dark"] .hero-logo-mark {
      --wave-neutral-line: color(rec2100-pq .61 .61 .61 / .46);
      --wave-neutral-halo: color(rec2100-pq .59 .59 .59 / .14);
      --panel-wave-neutral: color(rec2100-pq .66 .66 .66 / .58);
      --wave-line: color(rec2100-pq .68 .58 .16 / .48);
      --wave-halo: color(rec2100-pq .66 .54 .1 / .16);
      --panel-wave: color(rec2100-pq .7 .59 .17 / .62);
      --logo-hit-core: color(rec2100-pq .73 .66 .34);
      --logo-hit-glow: color(rec2100-pq .69 .56 .12 / .84);
    }

    html[data-theme="dark"] .orbit {
      --orbit-hit-core: color(rec2100-pq .73 .66 .34);
      --orbit-hit-glow: color(rec2100-pq .68 .55 .12 / .82);
      --orbit-hit-aura: color(rec2100-pq .62 .48 .08 / .5);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-icon,
  .theme-toggle {
    transition: none;
  }
}
