/* Shared appearance controls for the main site and its privacy page. */
.theme-toggle[hidden], .menu-toggle[hidden], .site-header nav[hidden] { display: none !important; }
.theme-toggle, .menu-toggle {
  display: inline-flex;
  width: 44px;
  min-width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line, rgba(255,255,255,.16));
  border-radius: 50%;
  background: var(--surface, rgba(255,255,255,.06));
  color: var(--text);
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
}
.theme-toggle:hover, .menu-toggle:hover { background: var(--surface-strong, rgba(255,255,255,.1)); border-color: var(--accent); }
.theme-toggle:focus-visible, .menu-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.theme-toggle svg, .menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle { display: none; }
.menu-toggle [data-menu-icon="close"] { display: none; }
.menu-toggle[aria-expanded="true"] [data-menu-icon="open"] { display: none; }
.menu-toggle[aria-expanded="true"] [data-menu-icon="close"] { display: block; }
.theme-toggle [data-theme-icon="sun"] { display: none; }
:root[data-theme="dark"] .theme-toggle [data-theme-icon="moon"] { display: none; }
:root[data-theme="dark"] .theme-toggle [data-theme-icon="sun"] { display: block; }
:root[data-theme="dark"] { color-scheme: dark; }
.site-header { gap: .75rem; }
.site-header .brand { min-width: 0; }
.site-header .brand > span { min-width: 0; }
.site-header nav { margin-inline-start: auto; }

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f8f7;
  --surface: rgba(255,255,255,.72);
  --surface-strong: rgba(223,236,232,.85);
  --line: rgba(34,74,67,.18);
  --line-soft: rgba(34,74,67,.12);
  --text: #182b27;
  --muted: #526660;
  --accent: #236c62;
  --accent-two: #326b81;
}
:root[data-theme="light"] body {
  background: radial-gradient(circle at 50% -20%, rgba(112,182,164,.16), transparent 36rem), var(--bg);
}
:root[data-theme="light"] body::before { background: rgba(75,143,129,.045); }
:root[data-theme="light"] .site-header {
  background: rgba(255,255,255,.8);
  box-shadow: 0 .75rem 3rem rgba(35,66,59,.08), inset 0 1px rgba(255,255,255,.92);
}
:root[data-theme="light"] .brand-mark { border-color: var(--line); }
:root[data-theme="light"] .ambient-one { background: #b6d9cf; opacity: .2; }
:root[data-theme="light"] .ambient-two { background: #bad8de; opacity: .15; }
:root[data-theme="light"] .noise { opacity: .018; }
:root[data-theme="light"] .eyebrow,
:root[data-theme="light"] .section-index { color: var(--muted); }
:root[data-theme="light"] .pulse::before { border-color: rgba(35,108,98,.4); }
:root[data-theme="light"] h1 span,
:root[data-theme="light"] h2 span {
  background-image: linear-gradient(100deg, #254b47 0%, #23786f 50%, #316b81 100%);
}
:root[data-theme="light"] .stage::before { background: radial-gradient(circle, rgba(88,160,143,.18), transparent 68%); }
:root[data-theme="light"] .orbit { border-color: rgba(44,101,88,.22); }
:root[data-theme="light"] .orbit-inner { border-color: rgba(44,101,88,.3); }
:root[data-theme="light"] .glass-core {
  border-color: rgba(35,89,76,.23);
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(255,255,255,.3)), rgba(175,210,200,.62);
  box-shadow: inset 0 1px #fff, inset -1.5rem -1.5rem 3rem rgba(65,133,115,.12), 0 2rem 5rem rgba(35,80,67,.12), 0 0 5rem rgba(91,171,151,.12);
}
:root[data-theme="light"] .glass-core::before { background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); }
:root[data-theme="light"] .core-light { background: #4a9a86; box-shadow: 0 0 3rem 1rem rgba(71,155,130,.2); }
:root[data-theme="light"] .core-label { color: #365b50; }
:root[data-theme="light"] .core-divider { background: linear-gradient(90deg, rgba(45,98,83,.1), rgba(45,98,83,.6)); }
:root[data-theme="light"] .satellite { border-color: rgba(37,98,81,.25); background: #5c9f90; box-shadow: 0 0 1.6rem rgba(75,150,127,.2); }
:root[data-theme="light"] .satellite-two { background: #477f72; }
:root[data-theme="light"] .scroll-note { color: var(--muted); }
:root[data-theme="light"] .principle-card {
  background: linear-gradient(150deg, rgba(255,255,255,.86), rgba(235,245,241,.48));
  box-shadow: inset 0 1px #fff, 0 .6rem 2rem rgba(35,66,59,.035);
}
:root[data-theme="light"] .principle-card:hover { border-color: rgba(35,108,98,.35); background: linear-gradient(150deg, #fff, rgba(235,245,241,.68)); }
:root[data-theme="light"] .icon-context span { border-color: rgba(50,117,102,.5); }
:root[data-theme="light"] .icon-context span:nth-child(2) { background: rgba(74,143,124,.08); }
:root[data-theme="light"] .icon-context span:nth-child(3) { background: #408879; box-shadow: 0 0 2.5rem rgba(65,139,120,.25); }
:root[data-theme="light"] .icon-agency span {
  border-color: rgba(38,95,78,.23);
  background: rgba(255,255,255,.65);
  box-shadow: inset 0 1px #fff, 0 1rem 2rem rgba(35,80,67,.08);
}
:root[data-theme="light"] .icon-agency span:nth-child(2) { border-color: rgba(38,95,78,.32); background: rgba(110,176,154,.2); }
:root[data-theme="light"] .icon-calm::before {
  background: linear-gradient(90deg, transparent, rgba(45,108,89,.6), transparent);
  box-shadow: 0 -1.5rem rgba(39,93,78,.12), 0 1.5rem rgba(39,93,78,.12);
}
:root[data-theme="light"] .icon-calm::after { border-color: rgba(41,102,84,.38); background: rgba(102,166,143,.16); box-shadow: 0 0 2.5rem rgba(64,133,110,.14); }
:root[data-theme="light"] .icon-calm span { background: #3b806f; box-shadow: 0 0 1rem rgba(59,128,111,.3); }
:root[data-theme="light"] .project-card {
  background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(235,245,241,.45));
  box-shadow: inset 0 1px #fff, 0 .6rem 2rem rgba(35,66,59,.035);
}
:root[data-theme="light"] .project-kairos { --project-accent: #326b81; }
:root[data-theme="light"] .project-bongaus { --project-accent: #875d26; }
:root[data-theme="light"] .project-card:hover { background-color: #fff; }
:root[data-theme="light"] .footer-brand { color: var(--muted); }
:root[data-theme="light"] .analytics-banner,
:root[data-theme="light"] .analytics-dialog {
  border-color: rgba(33,87,72,.24);
  background: #fafdfb;
  box-shadow: 0 1rem 4rem rgba(28,65,53,.18);
}
:root[data-theme="light"] .analytics-banner p,
:root[data-theme="light"] .analytics-dialog p { color: #465f57; }
:root[data-theme="light"] .analytics-dialog::backdrop { background: rgba(15,36,29,.38); }
:root[data-theme="light"] .consent-actions button { border-color: #537f72; color: #253b32; }
:root[data-theme="light"] .consent-actions button:hover { background: rgba(35,108,98,.07); }
:root[data-theme="light"] .privacy-page p { color: var(--muted); }
:root[data-theme="light"] .privacy-page header,
:root[data-theme="light"] .privacy-page footer,
:root[data-theme="light"] .privacy-page section { border-color: var(--line); }

.privacy-page header { position: sticky; top: 0; z-index: 50; background: var(--bg); }
.privacy-page header .brand { min-width: 0; }
.privacy-page header .brand > span { min-width: 0; }
.privacy-page header > a:last-of-type { margin-inline-start: auto; }

@media (max-width: 600px) {
  .site-header .brand span:last-child { max-width: none; }
  .site-header:not(.navigation-ready) .theme-toggle { order: 1; margin-inline-start: auto; }
  .site-header:not(.navigation-ready) nav {
    order: 2;
    width: 100%;
    justify-content: space-between;
    padding-top: .25rem;
    margin-top: .25rem;
    margin-inline-start: 0;
    border-top: 1px solid var(--line-soft);
  }
  .hero { padding-top: 10rem; }
  .privacy-page header .brand { flex: 1; }
  .privacy-page header .theme-toggle { order: 1; }
  .privacy-page header > a:last-of-type { order: 2; width: 100%; margin-inline-start: 0; }
}
@media (max-width: 768px) {
  .site-header.navigation-ready {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    gap: .5rem;
  }
  .navigation-ready .brand { grid-column: 1; gap: .5rem; }
  .navigation-ready .brand-mark { width: 28px; height: 28px; }
  .navigation-ready .brand > span { max-width: none; }
  .navigation-ready .theme-toggle { grid-column: 2; }
  .navigation-ready .menu-toggle { display: inline-flex; grid-column: 3; }
  .site-header.navigation-ready .site-navigation {
    position: absolute;
    top: calc(100% + .65rem);
    inset-inline: 0;
    display: flex;
    width: auto;
    max-height: calc(100dvh - 8rem);
    align-items: stretch;
    flex-direction: column;
    gap: .25rem;
    margin: 0;
    padding: .5rem;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    background: rgba(10,10,14,.94);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.16);
    backdrop-filter: blur(24px) saturate(140%);
  }
  .site-header.navigation-ready .site-navigation a { width: 100%; padding: .75rem 1rem; }
  :root[data-theme="light"] .site-header.navigation-ready .site-navigation {
    background: rgba(250,253,251,.96);
    box-shadow: 0 1rem 3rem rgba(35,66,59,.1);
  }
  .site-header.navigation-ready + main .hero { padding-top: 8rem; }
}
@media (prefers-reduced-motion: reduce) { .theme-toggle, .menu-toggle { transition: none; } }
@media (forced-colors: active) {
  .theme-toggle, .menu-toggle { border-color: ButtonText; }
  :root[data-theme] h1 span, :root[data-theme] h2 span { background: none; color: CanvasText; }
}
