/* Color-only study: all geometry, typography and breakpoints stay in D. */
.theme-study {
  color-scheme: dark;
  --color-bg-primary: #101114;
  --color-bg-secondary: #08090b;
  --color-surface: #202329;
  --color-surface-elevated: #202329;
  --color-text-primary: #f5f5f5;
  --color-text-secondary: #b8bec8;
  --color-text-muted: #9298a3;
  --color-accent: #4b8cf8;
  --color-accent-hover: #77a8fb;
  --color-accent-text: #101114;
  --color-link-hover: #4b8cf8;
  --color-border: #393e48;
  --color-focus: #4b8cf8;
  --color-hero-text: #d5d8df;
  --color-hero-note: #c6cad2;
  --color-hero-border: rgb(245 245 245 / .18);
  --color-compare-text: #b6bbc4;
  --color-photo-overlay: #101114;
  --color-photo-overlay-text: #f5f5f5;
  --hero-rgb: 16 17 20;
}
.theme-brass, .theme-hybrid {
  --color-bg-primary: #111315;
  --color-bg-secondary: #191b1d;
  --color-surface: #222426;
  --color-surface-elevated: #222426;
  --color-text-primary: #f5f2ed;
  --color-text-secondary: #c6c0b8;
  --color-text-muted: #9b958d;
  --color-accent: #c58b47;
  --color-accent-hover: #d5a367;
  --color-accent-text: #111315;
  --color-link-hover: #d5a367;
  --color-border: #56514b;
  --color-focus: #c58b47;
  --color-hero-text: #ddd7cf;
  --color-hero-note: #c6c0b8;
  --color-hero-border: rgb(245 242 237 / .18);
  --color-compare-text: #c6c0b8;
  --color-photo-overlay: #111315;
  --color-photo-overlay-text: #f5f2ed;
  --hero-rgb: 17 19 21;
}
.theme-hybrid { --color-text-primary: #f7f4ef; }
.theme-hybrid .surface-light {
  color-scheme: light;
  --color-bg-primary: #f2eee8;
  --color-bg-secondary: #e4ddd3;
  --color-surface: #e4ddd3;
  --color-surface-elevated: #e4ddd3;
  --color-text-primary: #1b1b1a;
  --color-text-secondary: #59534c;
  --color-text-muted: #625b52;
  --color-border: #9b9184;
  --color-focus: #815321;
  /* Brass remains the accent; darker brass is the readable text/focus role on ivory. */
  --color-link-hover: #815321;
}
/* Rebind aliases locally: inherited aliases otherwise resolve in the dark parent. */
.theme-study, .theme-study .surface-light {
  --background: var(--color-bg-primary);
  --surface: var(--color-surface);
  --text: var(--color-text-primary);
  --muted: var(--color-text-muted);
  --accent: var(--color-accent);
  --line: var(--color-border);
  background-color: var(--background);
  color: var(--text);
}
.theme-study :focus-visible { outline-color: var(--color-focus); }
.theme-study ::selection { background: var(--color-accent); color: var(--color-accent-text); }
.theme-study .compare-bar { background: var(--color-bg-secondary); color: var(--color-compare-text); }
.theme-study .button-primary, .theme-study .skip-link { color: var(--color-accent-text); }
.theme-study .button-primary:hover { background: var(--color-accent-hover); }
.theme-study .site-nav a:hover, .theme-study .text-link:hover { color: var(--color-link-hover); }
.theme-study .hero-intro { color: var(--color-hero-text); }
.theme-study .hero-note { color: var(--color-hero-note); border-color: var(--color-hero-border); }
.variant-d.theme-study .section-heading h2 span,
.variant-d.theme-study .about h2 span,
.theme-study .section-heading > p,
.theme-study figcaption,
.theme-study .service-item p,
.theme-study .about-copy > p:not(.eyebrow),
.theme-study .contact-bottom p,
.theme-study .dialog-caption { color: var(--color-text-secondary); }
.theme-study .photo-open { background: var(--color-photo-overlay); color: var(--color-photo-overlay-text); }
.theme-study .dialog-toolbar button { background: var(--color-surface-elevated); }
.variant-d.theme-study .hero::after {
  background: linear-gradient(90deg, rgb(var(--hero-rgb) / .76) 0%, rgb(var(--hero-rgb) / .26) 47%, transparent 77%), linear-gradient(0deg, var(--background), rgb(var(--hero-rgb) / .4) 38%, transparent 75%);
}
/* Paint an uninterrupted light band without moving, padding or resizing components. */
.theme-hybrid .about.surface-light {
  box-shadow: 0 0 0 100vmax var(--background);
  clip-path: inset(0 -100vmax);
}
.theme-hybrid .other-services.surface-light { position: relative; isolation: isolate; }
.theme-hybrid .other-services.surface-light::before {
  content: '';
  position: absolute;
  inset: 0 0 calc(-1 * clamp(4.5rem, 8vw, 7.5rem));
  z-index: -1;
  background: var(--background);
  box-shadow: 0 0 0 100vmax var(--background);
  clip-path: inset(0 -100vmax);
}
.theme-hybrid .surface-light .text-link:hover { border-color: var(--color-link-hover); }
.theme-hybrid .surface-light a:hover { color: var(--color-link-hover); }
@media (max-width: 599px) {
  .variant-d.theme-study .hero::after { background: linear-gradient(0deg, var(--background) 1%, rgb(var(--hero-rgb) / .9) 32%, rgb(var(--hero-rgb) / .55) 61%, rgb(var(--hero-rgb) / .08) 95%); }
}
