/* Hiraya theme compatibility layer for the compiled React website.
   Preserves light mode; dark-mode overrides are scoped by data-hiraya-theme. */

/* 1. Base and text on intentionally dark sections */
:root { color-scheme: light; }
html[data-hiraya-theme="dark"] { color-scheme: dark; }
html body { color: #2B2927; }
html body h1, html body h2, html body h3, html body h4, html body .font-serif { color: inherit; }

html [data-testid="process-section"],
html [data-testid="process-section"] :is(h1,h2,h3,h4,.font-serif) {
  color: #F9F8F6 !important;
}
html [data-testid="process-section"] :is(p,a) { color: #F9F8F6; }

html section[class*="bg-[#2B2927]"],
html section[class*="bg-[#1A1918]"],
html footer[class*="bg-[#2B2927]"],
html footer[class*="bg-[#1A1918]"] { color: #F9F8F6; }
html section[class*="bg-[#2B2927]"] :is(h1,h2,h3,h4,.font-serif),
html section[class*="bg-[#1A1918]"] :is(h1,h2,h3,h4,.font-serif) {
  color: #F9F8F6;
}

/* 2. One click-to-cycle appearance icon; mobile/desktop placement */
.hiraya-theme-control {
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  flex: none;
  z-index: 55;
}
.hiraya-theme-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.hiraya-theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hiraya-theme-toggle:focus-visible {
  outline: 2px solid #A85C42;
  outline-offset: 2px;
}
header[data-testid="site-header"] [data-hiraya-theme-placement="desktop"] {
  display: none !important;
}
header[data-testid="site-header"] [data-hiraya-theme-placement="mobile"] {
  display: inline-flex !important;
  margin-right: 6px !important;
}
@media (max-width: 1023px) {
  header[data-testid="site-header"] .hiraya-theme-control {
    margin-left: auto;
    margin-right: 4px;
  }
}
@media (min-width: 1024px) {
  header[data-testid="site-header"] [data-hiraya-theme-placement="mobile"] {
    display: none !important;
  }
  header[data-testid="site-header"] [data-hiraya-theme-placement="desktop"] {
    display: inline-flex !important;
    margin-left: 10px !important;
  }
}

/* 3. Dark-mode foundations and header */
html[data-hiraya-theme="dark"] body {
  background: #191817 !important;
  color: #F9F8F6;
}
html[data-hiraya-theme="dark"] #root {
  background: #191817;
  color: #F9F8F6;
}
html[data-hiraya-theme="dark"] :is(
  header[data-testid="site-header"],
  header[data-testid="site-header"] > div,
  header[data-testid="site-header"] > div + div
) {
  background: #22211F !important;
  color: #F9F8F6 !important;
  border-color: #46423D !important;
}
html[data-hiraya-theme="dark"] header[data-testid="site-header"] a:not([data-testid="header-cta-book"]),
html[data-hiraya-theme="dark"] header[data-testid="site-header"] button {
  color: #F9F8F6 !important;
}
html[data-hiraya-theme="dark"] header[data-testid="site-header"] :is(
  a[data-testid="header-cta-book"],
  a[data-testid="mobile-cta-book"]
) {
  background: #A85C42 !important;
  color: #FFF !important;
}

/* 4. Dark-mode surfaces and form elements */
html[data-hiraya-theme="dark"] :is(main,section,article,div,aside,footer):is(
  [class*="bg-[#F9F8F6]"],
  [class*="bg-[#FFFFFF]"],
  [class*="bg-[#FAF9F7]"],
  [class*="bg-white"]
) {
  background-color: #24221F !important;
  color: #F9F8F6 !important;
}
html[data-hiraya-theme="dark"] :is(main,section,article,div,aside,footer):is(
  [class*="bg-[#F1EEE9]"],
  [class*="bg-[#EAE4DC]"]
) {
  background-color: #302D29 !important;
  color: #F9F8F6 !important;
}
html[data-hiraya-theme="dark"] :is(main,section,article,div,aside,footer):is(
  [class*="bg-background"],
  [class*="bg-card"]
) {
  background: #24221F !important;
  color: #F9F8F6 !important;
}
html[data-hiraya-theme="dark"] :is(main,section,article,div,aside,footer) :is(h1,h2,h3,h4,.font-serif) {
  color: inherit;
}
html[data-hiraya-theme="dark"] :is(main,section,article,div,aside,footer) :is(input,textarea,select) {
  background: #302D29;
  color: #F9F8F6;
  border-color: #675F57;
}
html[data-hiraya-theme="dark"] :is(main,section,article,div,aside,footer) :is(input,textarea)::placeholder {
  color: #BBB1A7;
}
html[data-hiraya-theme="dark"] :is(a,button)[class*="bg-[#1A1918]"] {
  color: #F9F8F6 !important;
}

/* 5. Dark-mode text contrast, preserving warmer secondary tones */
html[data-hiraya-theme="dark"] main [class*="text-[#4A4642]"] {
  color: #C9C0B6 !important;
}
html[data-hiraya-theme="dark"] main [class*="text-[#7A736C]"] {
  color: #B5AAA0 !important;
}
html[data-hiraya-theme="dark"] main :is(
  [class*="text-[#2B2927]"],
  [class*="text-[#1A1918]"]
) {
  color: #F4F0EA !important;
}
html[data-hiraya-theme="dark"] [data-testid="philosophy-section"] p {
  color: #C9C0B6 !important;
}
html[data-hiraya-theme="dark"] [data-testid="philosophy-section"] li {
  color: #B5AAA0 !important;
}

/* 6. About: Studio Principles */
html[data-hiraya-theme="dark"] [data-testid="values-section"] {
  background-color: #24221F !important;
  color: #F4F0EA !important;
}
html[data-hiraya-theme="dark"] [data-testid="values-section"] h2,
html[data-hiraya-theme="dark"] [data-testid="values-section"] .font-serif {
  color: #F4F0EA !important;
}
html[data-hiraya-theme="dark"] [data-testid="values-section"] [class*="text-[#4A4642]"] {
  color: #C9C0B6 !important;
}
html[data-hiraya-theme="dark"] [data-testid="values-section"] [class*="border-t"] {
  border-color: #514B45 !important;
}
html[data-hiraya-theme="dark"] [data-testid="values-section"] [class*="text-[#A85C42]"] {
  color: #CA8267 !important;
}
/* Individual titles, not the section's main heading. */
html[data-hiraya-theme="dark"] [data-testid="values-section"] h3,
html[data-hiraya-theme="dark"] [data-testid="values-section"] h3.font-serif,
html[data-hiraya-theme="dark"] [data-testid="values-section"] .grid > div > div.font-serif {
  color: #A85C42 !important;
}

/* 7. Homepage: What We Do / Services */
html[data-hiraya-theme="dark"] [data-testid="services-section"] {
  background-color: #24221F !important;
  color: #F4F0EA !important;
}
html[data-hiraya-theme="dark"] [data-testid="services-section"] a[class*="bg-"] {
  background-color: #2D2A26 !important;
  color: #F4F0EA !important;
}
html[data-hiraya-theme="dark"] [data-testid="services-section"] a[class*="bg-"]:hover {
  background-color: #39342F !important;
}
html[data-hiraya-theme="dark"] [data-testid="services-section"] h2,
html[data-hiraya-theme="dark"] [data-testid="services-section"] h3,
html[data-hiraya-theme="dark"] [data-testid="services-section"] .font-serif {
  color: #F4F0EA !important;
}
html[data-hiraya-theme="dark"] [data-testid="services-section"] p {
  color: #C9C0B6 !important;
}
html[data-hiraya-theme="dark"] [data-testid="services-section"] [class*="text-[#7A736C]"] {
  color: #B5AAA0 !important;
}
html[data-hiraya-theme="dark"] [data-testid="services-section"] [class*="bg-[#C7C1B7]"] {
  background-color: #514B45 !important;
}
html[data-hiraya-theme="dark"] [data-testid="services-section"] a[class*="border-b"] {
  border-color: #C9C0B6 !important;
}
html[data-hiraya-theme="dark"] [data-testid="services-section"] [class*="text-[#A85C42]"] {
  color: #CA8267 !important;
}
/* Intentionally retain h2.font-serif: it was part of the working live override. */
html[data-hiraya-theme="dark"] [data-testid="services-section"] h3,
html[data-hiraya-theme="dark"] [data-testid="services-section"] h3.font-serif,
html[data-hiraya-theme="dark"] [data-testid="services-section"] h2.font-serif {
  color: #A85C42 !important;
}



/* Hiraya — consistent section labels across pages */

html body :is(div, span, p)[class*="uppercase"][class*="tracking-"]:is(
  [class*="text-[10px]"],
  [class*="text-[11px]"],
  [class*="text-[12px]"]
) {
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0.20em !important;
  line-height: 1.6 !important;
}
