/* Shared theme control. The icon describes the theme it will activate. */
.theme-toggle { display: inline-grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; color: var(--white); border: 1px solid transparent; border-radius: 50%; background: transparent; transition: color .2s, background .2s, border-color .2s; }
.theme-toggle:hover { color: var(--mint); background: rgb(178 221 202 / 9%); border-color: var(--line); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .theme-moon { display: none; }
html[data-theme='light'] .theme-toggle .theme-sun { display: none; }
html[data-theme='light'] .theme-toggle .theme-moon { display: block; }

/* Warm white, mineral surfaces and deep green keep the brand recognizable. */
html[data-theme='light'] {
  color-scheme: light;
  --bg: #f7f9f6;
  --deep: #eef4f0;
  --surface: #ffffff;
  --mint: #166e61;
  --lilac: #6c6583;
  --white: #183532;
  --muted: #526964;
  --line: rgb(24 65 58 / 17%);
  --scene-angle: 90deg;
}
html[data-theme='light'][dir='rtl'] { --scene-angle: 270deg; }
html[data-theme='light'] ::selection { background: #b8dfcf; color: #123d34; }
html[data-theme='light'] header { background: rgb(247 249 246 / 88%); border-bottom-color: var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
html[data-theme='light'] header.is-scrolled, html[data-theme='light'] .legal-page header { background: rgb(247 249 246 / 96%); }
html[data-theme='light'] .logo { filter: brightness(0); opacity: .82; }
html[data-theme='light'] nav a { color: #34544d; }
html[data-theme='light'] nav a:hover { color: var(--mint); }
html[data-theme='light'] .nav-cta { color: var(--white); border-color: rgb(22 110 97 / 35%); }
html[data-theme='light'] .nav-cta:hover, html[data-theme='light'] .theme-toggle:hover { background: rgb(22 110 97 / 7%); }
html[data-theme='light'] .language-switcher > summary { color: var(--white); }
html[data-theme='light'] .language-options { background: #fff; border-color: var(--line); box-shadow: 0 15px 40px rgb(18 55 43 / 12%); }
html[data-theme='light'] .language-options button { color: #34544d; }
html[data-theme='light'] .language-options button:is(:hover, :focus-visible, [aria-pressed='true']) { background: #edf5f0; color: var(--mint); }

/* The abstract ribbons retain their motion on a pale canvas. */
html[data-theme='light'] .hero-visual img { filter: invert(1) hue-rotate(180deg) saturate(.6) contrast(.7) brightness(1.12); }
html[data-theme='light'] .hero-video { filter: invert(1) hue-rotate(180deg) saturate(.6) contrast(.7) brightness(1.12); }
html[data-theme='light'] .hero-visual::after { background: linear-gradient(180deg, rgb(247 249 246 / 80%), transparent 190px); }
html[data-theme='light'] .hero::after { background: linear-gradient(var(--scene-angle), rgb(247 249 246 / 92%), rgb(247 249 246 / 55%) 45%, rgb(247 249 246 / 12%) 85%), linear-gradient(0deg, var(--bg), transparent 38%); }
html[data-theme='light'] .lead, html[data-theme='light'] .textlink { color: #3d5852; }
html[data-theme='light'] .textlink:hover { color: var(--mint); }
html[data-theme='light'] .button { background: #166e61; color: #fff; }
html[data-theme='light'] .button:hover { background: #11574d; }
html[data-theme='light'] .hero-motion-toggle { background: rgb(255 255 255 / 65%); border-color: var(--line); }
html[data-theme='light'] .hero-motion-toggle:hover { background: #e0eee6; }

/* Photographic cards keep natural color and readable captions. */
html[data-theme='light'] .sector { color: #f4faf7; background: #102229; }
html[data-theme='light'] .sector p { color: #d5e3dc; }
html[data-theme='light'] .portfolio { background: #edf3ef; }
html[data-theme='light'] .solution-contact { border-bottom-color: rgb(22 110 97 / 40%); }
html[data-theme='light'] .logos > div { border-bottom-color: var(--line); }
html[data-theme='light'] .logos img { filter: brightness(0); opacity: .63; }
html[data-theme='light'] .logos > div:hover img { opacity: .85; }

/* Keep photographic hardware intact, with light surfaces behind the copy. */
html[data-theme='light'] .spotlight .cyber-scene image,
html[data-theme='light'] .intelligence .cyber-scene image { opacity: .85; filter: brightness(1.25) saturate(.75); }
html[data-theme='light'] .spotlight::after { background: linear-gradient(var(--scene-angle), rgb(238 244 240 / 3%), rgb(238 244 240 / 10%) 25%, rgb(238 244 240 / 96%) 58%, #eef4f0 80%); }
html[data-theme='light'] .intelligence::after { background: linear-gradient(var(--scene-angle), #eef4f0 22%, rgb(238 244 240 / 97%) 43%, rgb(238 244 240 / 20%) 76%, rgb(238 244 240 / 3%)); }
html[data-theme='light'] .split p:not(.eyebrow), html[data-theme='light'] .lines { color: var(--muted); }
html[data-theme='light'] .iso-section h2 { color: var(--white); }

/* Fine teal connections remain visible behind the translucent white form. */
html[data-theme='light'] .cyber-scene--contact image { filter: invert(1) hue-rotate(180deg) saturate(.55) contrast(.75) brightness(1.08); }
html[data-theme='light'] .contact::after { background: linear-gradient(var(--scene-angle), rgb(247 249 246 / 62%), rgb(247 249 246 / 25%) 62%, rgb(247 249 246 / 8%)); }
html[data-theme='light'] .cyber-scene--contact .cyber-flow { stroke: #137e70; }
html[data-theme='light'] .cyber-scene--contact .cyber-violet { stroke: #7863a9; }
html[data-theme='light'] .cyber-scene--contact .cyber-halo { opacity: .3; }
html[data-theme='light'] .cyber-node { fill: #166e61; }
html[data-theme='light'] .cyber-node-glow { fill: #289c87; }
html[data-theme='light'] .contact-form-panel { background: rgb(255 255 255 / 85%); border-color: rgb(22 110 97 / 20%); border-top-color: rgb(22 110 97 / 45%); box-shadow: 0 24px 65px rgb(18 55 43 / 6%); }
html[data-theme='light'] .contact-form-panel :is(input, textarea, select) { background: #f8fbf9; border-color: #b4c9c0; color: var(--white); }
html[data-theme='light'] .contact-form-panel :is(input, textarea, select):focus { background: #fff; border-color: var(--mint); }
html[data-theme='light'] footer h4, html[data-theme='light'] .footnote a { color: var(--white); }

/* Long-form documents share the same light reading palette. */
html[data-theme='light'] .legal-hero { background: radial-gradient(ellipse at 88% 0%, rgb(22 110 97 / 8%), transparent 55%); }
html[data-theme='light'] .legal-page .legal-content { color: #3e5751; }
html[data-theme='light'] .legal-content strong { color: #183532; }
html[data-theme='light'] .legal-content :is(a, u) { text-decoration-color: rgb(22 110 97 / 45%); }
html[data-theme='light'] .legal-content a.document-download { border-color: rgb(22 110 97 / 35%); }
html[data-theme='light'] .legal-content a.document-download:hover { background: rgb(22 110 97 / 7%); }

@media (max-width: 960px) {
  html[data-theme='light'] header:has(.menu[aria-expanded='true']), html[data-theme='light'] nav { background: #f7f9f6; }
}
@media (max-width: 760px) {
  html[data-theme='light'] .hero::after { background: linear-gradient(var(--scene-angle), rgb(247 249 246 / 88%), rgb(247 249 246 / 48%)), linear-gradient(0deg, var(--bg), transparent 42%); }
  html[data-theme='light'] .spotlight::after { background: linear-gradient(180deg, rgb(238 244 240 / 3%), rgb(238 244 240 / 8%) 160px, rgb(238 244 240 / 92%) 335px, #eef4f0 420px); }
  html[data-theme='light'] .intelligence::after { background: linear-gradient(180deg, rgb(238 244 240 / 3%), rgb(238 244 240 / 8%) 160px, rgb(238 244 240 / 92%) 335px, #eef4f0 420px); }
}
@media (max-width: 420px) {
  header { gap: 8px; }
  .header-controls { gap: 8px; }
  .theme-toggle { width: 34px; height: 34px; flex-basis: 34px; }
}
@media (max-width: 360px) {
  header .brand-mark { width: 120px; }
  .header-controls { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle { transition: none; }
}
