/* Silat site-wide colour theme. The inline page styles own layout; this file owns theme state. */
:root {
  color-scheme: light;
  --nav-bg: rgba(248, 248, 245, 0.92);
  --theme-shadow: rgba(13, 30, 64, 0.14);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090b12;
  --surface: #111520;
  --surface-2: #181d29;
  --border: rgba(245, 247, 251, 0.10);
  --border-mid: rgba(245, 247, 251, 0.19);
  --ink: #f5f7fb;
  --ink-dim: rgba(245, 247, 251, 0.68);
  --ink-faint: rgba(245, 247, 251, 0.42);
  --blue-light: #17264d;
  --nav-bg: rgba(9, 11, 18, 0.88);
  --theme-shadow: rgba(0, 0, 0, 0.42);
}

body,
.nav,
.mobile-menu,
.nav-dropdown-menu,
.project-media,
.meta-item,
.theme-picker,
.theme-picker__menu {
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

/* Inline page CSS predates the shared nav token, so this deliberately wins in the cascade. */
.nav { background: var(--nav-bg); }
.nav-dropdown-menu { box-shadow: 0 16px 48px var(--theme-shadow); }

.theme-picker {
  position: relative;
  flex: 0 0 auto;
  margin-left: 18px;
  margin-right: 0;
  z-index: 220;
}

.theme-picker__trigger {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border-mid);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-dim);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.theme-picker__trigger:hover,
.theme-picker__trigger:focus-visible {
  border-color: var(--blue-mid);
  color: var(--blue-mid);
  outline: none;
}

.theme-picker__trigger svg { width: 16px; height: 16px; }

.theme-picker__menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  min-width: 142px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  box-shadow: 0 16px 48px var(--theme-shadow);
}

.theme-picker__menu[hidden] { display: none; }

.theme-picker__option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-dim);
  font: 500 11px/1.2 var(--mono, monospace);
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}

.theme-picker__option:hover,
.theme-picker__option:focus-visible { background: var(--surface-2); color: var(--ink); outline: none; }
.theme-picker__option[aria-checked="true"] { color: var(--blue-mid); }
.theme-picker__option[aria-checked="true"]::after { content: "✓"; }

@media (max-width: 900px) {
  .theme-picker { margin-left: auto; margin-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  body, .nav, .mobile-menu, .nav-dropdown-menu, .theme-picker, .theme-picker__menu { transition: none; }
}

/* Silat nav alignment fix: keep links and theme control grouped on the right. */
@media (min-width: 901px) {
  .nav-links { margin-left: auto; }
}

/* The ticker is an intentionally dark brand strip in both colour themes. */
.marquee { background: #0a0a12; }
.marquee .marquee-item { color: rgba(248, 248, 245, 0.70); }

/* Homepage dark-panel invariants: these brand panels stay dark in either site theme. */
body { transition: none; }
#why, #cta { background: #0a0a12; }
#why .section-title, #why .why-title { color: #f8f8f5; }
#why .section-body, #why .why-desc { color: rgba(248, 248, 245, 0.52); }

/* Dark service hover contrast. */
:root[data-theme="dark"] .service-row:hover .service-name,
:root[data-theme="dark"] .service-row:hover .service-arrow { color: #60a5fa; }

/* Service approach panel invariant: this section is intentionally dark in both themes. */
.approach { background: #0a0a12; }
.approach .section-title, .approach .step-h { color: #f8f8f5; }
.approach .section-lede, .approach .step-d { color: rgba(248, 248, 245, 0.55); }
