/* Diginamics 1.4: explicit themes, readable light mode and scene controls. */
:root {
  --dgm-dark-background: #020917;
  --dgm-dark-surface: #071a31;
  --dgm-dark-text: #f3f8ff;
  --dgm-dark-muted: #9eb0c8;
  --dgm-dark-border: #1a456c;
  --dgm-light-background: #f4f8fc;
  --dgm-light-surface: #ffffff;
  --dgm-light-text: #10253a;
  --dgm-light-muted: #506b80;
  --dgm-light-border: #a9cadf;
  --dgm-grid-opacity: .08;
}

.dgm-theme-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; width: min(100%,22rem); }
.dgm-theme-choice { display: inline-flex; min-width: 0; min-height: 46px; align-items: center; justify-content: center; gap: .55rem; padding: .65rem .8rem; border: 1px solid var(--dgm-color-border); border-radius: 6px; color: var(--dgm-color-text-muted); background: color-mix(in srgb,var(--dgm-color-surface) 88%,transparent); font: 700 .72rem/1.2 var(--wp--preset--font-family--mono); letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.dgm-theme-choice__dot { width: .72rem; height: .72rem; border: 1px solid currentColor; border-radius: 50%; }
.dgm-theme-choice[aria-pressed="true"] { border-color: var(--dgm-color-secondary); color: var(--dgm-color-text); box-shadow: 0 0 0 2px color-mix(in srgb,var(--dgm-color-secondary) 18%,transparent); }
.dgm-theme-choice[data-dgm-theme-choice="dark"] .dgm-theme-choice__dot { background: #06172e; }
.dgm-theme-choice[data-dgm-theme-choice="light"] .dgm-theme-choice__dot { background: #f4f8fc; }

@media (max-width:782px) {
  .wp-block-navigation__responsive-container-content .dgm-mobile-theme-row { align-items: stretch; flex-direction: column; }
  .dgm-mobile-theme-row__title { display: block; }
  .dgm-theme-choices { width: 100%; }
}

html[data-dgm-theme="dark"] body.diginamics-site { --dgm-color-background:var(--dgm-dark-background); --dgm-color-surface:var(--dgm-dark-surface); --dgm-color-text:var(--dgm-dark-text); --dgm-color-text-muted:var(--dgm-dark-muted); --dgm-color-border:var(--dgm-dark-border); --dgm-surface-solid:var(--dgm-dark-surface); --dgm-surface-raised:color-mix(in srgb,var(--dgm-dark-surface) 82%,var(--dgm-color-primary)); --dgm-surface-deep:var(--dgm-dark-background); --dgm-copy:var(--dgm-dark-muted); }
html[data-dgm-theme="light"] body.diginamics-site { --dgm-color-background:var(--dgm-light-background); --dgm-color-surface:var(--dgm-light-surface); --dgm-color-text:var(--dgm-light-text); --dgm-color-text-muted:var(--dgm-light-muted); --dgm-color-border:var(--dgm-light-border); --dgm-surface-solid:var(--dgm-light-surface); --dgm-surface-raised:color-mix(in srgb,var(--dgm-light-surface) 86%,var(--dgm-color-primary)); --dgm-surface-deep:var(--dgm-light-background); --dgm-copy:var(--dgm-light-muted); }
html[data-dgm-theme="light"] :where(.dgm-page-stage,.dgm-front-page,.dgm-content-shell) :where(.dgm-section,.dgm-solid-section,.dgm-solid-section--alt) :where(h1,h2,h3,h4,h5,h6) { color: var(--dgm-light-text); }
html[data-dgm-theme="light"] :where(.dgm-page-stage,.dgm-front-page,.dgm-content-shell) :where(.dgm-section,.dgm-solid-section,.dgm-solid-section--alt) :where(p,li) { color: var(--dgm-light-muted); }
html[data-dgm-theme="light"] :where(.dgm-section-intro,.dgm-visual-band,.dgm-entry-header) :where(h1,h2,h3) { color: var(--dgm-light-text); text-shadow: none; }
html[data-dgm-theme="light"] :where(.dgm-eyebrow,.dgm-section-marker,.dgm-card-index) { color: #075ba8 !important; }
html[data-dgm-theme="light"] :where(.dgm-cta,.dgm-sea-feature) :where(h1,h2,h3,h4,p,li) { color: #f3f8ff; }
html[data-dgm-theme="light"] :where(.dgm-cta,.dgm-sea-feature) :where(p,li) { color: #c5d5e4; }
html[data-dgm-theme="light"] .is-style-dgm-secondary .wp-block-button__link { border-color: var(--dgm-light-border); color: var(--dgm-light-text); background: #fff; }
html[data-dgm-theme="light"] .wp-block-navigation__responsive-container.is-menu-open { color: var(--dgm-light-text); }
html[data-dgm-theme="light"] .dgm-theme-choice { border-color: #7fb2ce; color: #38566d; background: #fff; }
html[data-dgm-theme="light"] .dgm-theme-choice[aria-pressed="true"] { color: #0b2035; border-color: #168cff; background: #e9f5fc; }

.dgm-webgl-lab { padding-block: clamp(4rem,8vw,8rem); background: radial-gradient(circle at 50% 50%,color-mix(in srgb,var(--dgm-color-primary) 15%,transparent),transparent 42rem),var(--dgm-color-background); }
.dgm-webgl-lab__intro { margin-bottom: 2rem; }
.dgm-webgl-lab__intro h2 { max-width: 18ch; }
.dgm-webgl-lab .dgm-hero-scene { height: min(680px,78svh); min-height: 520px; }
html[data-dgm-theme="light"] .dgm-webgl-lab { background: radial-gradient(circle at 50% 50%,rgba(22,140,255,.14),transparent 42rem),#eaf3fa; }
html[data-dgm-theme="light"] .dgm-webgl-lab :where(h2,p) { color: var(--dgm-light-text); }
html[data-dgm-theme="light"] .dgm-webgl-lab p { color: var(--dgm-light-muted); }

@media (max-width:782px) {
  .dgm-webgl-lab .dgm-hero-scene { min-height: 430px; height: 62svh; max-height: none; }
}

@media (max-width:390px) { .dgm-theme-choice { gap:.35rem; padding-inline:.5rem; font-size:.64rem; letter-spacing:.02em; } }
