/* ORA VFX theme layer. Kept separate from the original styles/assets. */
:root {
  color-scheme: dark;
  --ora-page: #02080e;
  --ora-page-raised: #07121b;
  --ora-surface: #091722;
  --ora-surface-soft: rgba(10, 25, 36, 0.78);
  --ora-text: #f1f6fa;
  --ora-muted: #9aaab8;
  --ora-border: rgba(151, 188, 208, 0.19);
  --ora-accent: #55d4e8;
  --ora-accent-deep: #128da8;
  --ora-shadow: 0 18px 50px rgba(4, 18, 28, 0.12);
}

html[data-theme="light"] {
  color-scheme: light;
  --ora-page: #f1f5f7;
  --ora-page-raised: #eaf0f4;
  --ora-surface: #ffffff;
  --ora-surface-soft: rgba(255, 255, 255, 0.88);
  --ora-text: #172834;
  --ora-muted: #526370;
  --ora-border: rgba(30, 55, 70, 0.14);
  --ora-accent: #0585a2;
  --ora-accent-deep: #09677e;
  --ora-shadow: 0 18px 48px rgba(25, 52, 68, 0.09);
}

body {
  background-color: var(--ora-page);
  color: var(--ora-text);
  transition: background-color 260ms ease, color 220ms ease;
}

/* Compact controls sit in the existing navbar; no existing navigation is replaced. */
.theme-toggle {
  position: relative;
  z-index: 8;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 42px;
  min-height: 42px;
  margin: 0 4px;
  padding: 0 11px;
  border: 1px solid rgba(132, 177, 196, 0.28);
  border-radius: 999px;
  background: rgba(9, 24, 35, 0.78);
  color: #eaf7fb;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 7px 24px rgba(0, 0, 0, 0.12);
  -webkit-tap-highlight-color: transparent;
  transition: color 200ms ease, background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}
.theme-toggle:hover {
  border-color: var(--ora-accent);
  box-shadow: 0 0 0 3px rgba(85, 212, 232, 0.12), 0 9px 24px rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
}
.theme-toggle:active { transform: translateY(0); }
.theme-toggle:focus-visible {
  outline: 2px solid var(--ora-accent);
  outline-offset: 3px;
}
.theme-toggle__track {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
}
.theme-toggle__icon {
  display: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html[data-theme="dark"] .theme-toggle__icon--sun,
html:not([data-theme="light"]) .theme-toggle__icon--sun { display: block; }
html[data-theme="light"] .theme-toggle__icon--moon { display: block; }
.theme-toggle__text { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.02em; }
.theme-toggle--floating {
  position: fixed;
  top: 16px;
  right: max(16px, env(safe-area-inset-right));
  z-index: 999;
  margin: 0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

/* Light theme: pale mineral surfaces, deep ink, restrained cyan accents. */
html[data-theme="light"] body {
  background: var(--ora-page) !important;
  color: var(--ora-text) !important;
}
html[data-theme="light"] body :is(h1, h2, h3, h4, h5, h6) {
  color: #152733;
}
html[data-theme="light"] body :is(p, li, label, summary, .lead, .muted) {
  color: var(--ora-muted);
}
html[data-theme="light"] body a:not(.btn):not(.logo):not(.theme-toggle) {
  color: var(--ora-accent-deep);
}
html[data-theme="light"] body a:not(.btn):not(.logo):not(.theme-toggle):hover {
  color: #034d60;
}

html[data-theme="light"] .nav-wrap {
  background: rgba(244, 248, 250, 0.9) !important;
  border-bottom: 1px solid var(--ora-border);
  box-shadow: 0 8px 28px rgba(22, 46, 60, 0.055);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
html[data-theme="light"] .navlinks a {
  color: #273c49;
}
html[data-theme="light"] .navlinks a:hover,
html[data-theme="light"] .navlinks a:focus-visible {
  color: var(--ora-accent-deep);
}
html[data-theme="light"] .menu {
  color: #1e3340;
  border-color: var(--ora-border);
}
html[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(30, 65, 82, 0.18);
  color: #1d3441;
  box-shadow: 0 7px 22px rgba(25, 52, 68, 0.08);
}
html[data-theme="light"] .theme-toggle:hover {
  border-color: #0585a2;
  box-shadow: 0 0 0 3px rgba(5, 133, 162, 0.1), 0 9px 24px rgba(25, 52, 68, 0.1);
}

html[data-theme="light"] body :is(.section, .intro, .services, .audience, .why, .portfolio, .before, .process, .solutions, .about, .team, .pricing, .contact, .faq, .final, .full-portfolio-intro) {
  color: var(--ora-text);
  background-color: var(--ora-page) !important;
}
html[data-theme="light"] body :is(.intro, .audience, .before, .solutions, .team, .contact, .final) {
  background-image: linear-gradient(135deg, #f5f8fa 0%, #edf3f6 54%, #f6f8fa 100%) !important;
}
html[data-theme="light"] body :is(.services, .why, .portfolio, .process, .about, .pricing, .faq, .full-portfolio-intro) {
  background-image: linear-gradient(135deg, #edf3f6 0%, #f5f8fa 58%, #eaf1f5 100%) !important;
}

html[data-theme="light"] body :is(.service-card, .work, .solution-box, .price-grid > *, .team-grid > *, .contact-grid > *, .faq-list details, .highlight-grid > *, .audience-grid > *, .process-grid > *, .flow > *, .featured, .cta-box, .compare-note) {
  color: var(--ora-text);
  background-color: var(--ora-surface-soft);
  border-color: var(--ora-border);
  box-shadow: var(--ora-shadow);
}
html[data-theme="light"] body :is(.service-card, .work, .solution-box, .price-grid > *, .team-grid > *, .contact-grid > *, .faq-list details, .highlight-grid > *, .audience-grid > *, .process-grid > *, .flow > *, .featured, .cta-box, .compare-note) :is(h2, h3, h4, h5, strong, b) {
  color: #172d3a;
}
html[data-theme="light"] body :is(.service-card, .work, .solution-box, .price-grid > *, .team-grid > *, .contact-grid > *, .faq-list details, .highlight-grid > *, .audience-grid > *, .process-grid > *, .flow > *, .featured, .cta-box, .compare-note) :is(p, li, small, label, summary) {
  color: #526370;
}
html[data-theme="light"] .featured {
  border-color: rgba(5, 133, 162, 0.4);
  background-image: linear-gradient(145deg, #ffffff, #e8f5f8);
}
html[data-theme="light"] .cta {
  background: linear-gradient(135deg, #e4eff4 0%, #f4f8fa 65%, #dcecf2 100%) !important;
  color: var(--ora-text);
}
html[data-theme="light"] .cta-box {
  border: 1px solid rgba(5, 133, 162, 0.18);
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(230,244,248,.96));
}

html[data-theme="light"] body :is(input, textarea, select) {
  background-color: #ffffff;
  border-color: rgba(29, 58, 73, 0.2);
  color: #172b38;
  box-shadow: inset 0 1px 1px rgba(14, 39, 52, 0.025);
}
html[data-theme="light"] body :is(input, textarea, select)::placeholder {
  color: #7b8993;
  opacity: 1;
}
html[data-theme="light"] body :is(input, textarea, select):focus-visible {
  border-color: #0785a1;
  outline: 2px solid rgba(7, 133, 161, 0.16);
  outline-offset: 1px;
}
html[data-theme="light"] .btn-primary {
  color: #ffffff !important;
  border-color: #087f99;
  background: linear-gradient(135deg, #078ca8, #09677e) !important;
  box-shadow: 0 9px 24px rgba(5, 117, 143, 0.18);
}
html[data-theme="light"] .btn-primary:hover {
  background: linear-gradient(135deg, #067994, #07596c) !important;
  box-shadow: 0 12px 28px rgba(5, 117, 143, 0.22);
}
html[data-theme="light"] .btn-ghost {
  color: #18313e !important;
  border-color: rgba(26, 60, 76, 0.24);
  background: rgba(255, 255, 255, 0.72);
}
html[data-theme="light"] .btn-ghost:hover {
  border-color: #0785a1;
  background: #ffffff;
}
html[data-theme="light"] .filters button {
  color: #3c515e;
  background: rgba(255, 255, 255, 0.68);
  border-color: var(--ora-border);
}
html[data-theme="light"] .filters button:hover,
html[data-theme="light"] .filters button.active {
  color: #ffffff;
  background: #087f99;
  border-color: #087f99;
}
html[data-theme="light"] .scroll-progress {
  background: linear-gradient(90deg, #078ca8, #68c8d8);
}
html[data-theme="light"] .faq-list details {
  border-bottom-color: var(--ora-border);
}
html[data-theme="light"] .form-success {
  color: #14613c;
  background: #e8f7ef;
  border-color: #b9e4cc;
}
html[data-theme="light"] .form-error {
  color: #8a2c2c;
  background: #fff0f0;
  border-color: #efc5c5;
}

/* Retain cinematic contrast where ORA's hero footage, intro loader, and footer are visual assets. */
html[data-theme="light"] body :is(.ora-loader, .hero) {
  color: #f3f8fb;
  background-color: #02080e !important;
}
html[data-theme="light"] body .hero :is(h1, h2, h3, h4, p, .eyebrow, .hero-proof, .hero-proof span) {
  color: #f3f8fb !important;
}
html[data-theme="light"] body .ora-loader :is(p, small) {
  color: #e4edf2 !important;
}
html[data-theme="light"] body footer {
  color: #eaf2f6;
  background-color: #06111a !important;
  border-top: 1px solid rgba(120, 178, 200, 0.18);
}
html[data-theme="light"] body footer :is(h1, h2, h3, h4, h5, h6, p, span) {
  color: #eaf2f6;
}
html[data-theme="light"] body footer a:not(.btn):not(.logo) {
  color: #b9cbd4;
}
html[data-theme="light"] body footer a:not(.btn):not(.logo):hover {
  color: #70d8e8;
}
html[data-theme="light"] .ora-floating-contact a {
  box-shadow: 0 8px 22px rgba(15, 46, 59, 0.14);
}

@media (max-width: 860px) {
  .theme-toggle {
    min-width: 40px;
    min-height: 40px;
    padding: 0 9px;
    gap: 6px;
  }
  .theme-toggle__text { display: none; }
  .theme-toggle--floating { top: 12px; right: max(12px, env(safe-area-inset-right)); }
}

@media (prefers-reduced-motion: reduce) {
  body, .theme-toggle { transition-duration: 0.01ms !important; }
  .theme-toggle:hover { transform: none; }
}
