/* Semantic light colors are checked against every page surface with axe AA.
   Pale gold button fills stay separate from the darker honey text accent. */
:root[data-theme="light"] {
  --ink: #312746;
  --ink-2: #61566d;
  --ink-3: #72667d;
  --purple-brand: #735393;
  --sage: #3f6b59;
  --cream: #fcf8f3;
  --lavender: #eee5f5;
  --line: #d9cfdf;
  --surface: #f4eff8;
  --surface-raised: #fffaf5;
  --surface-soft: #e8def1;
  --surface-soft-hover: #ddd0e9;
  --moonlight: #865923;
  --sky-background: url('../Assets/light-sky.png');
  color-scheme: light;
}

/* The illustrated sky has darker lilac patches than the flat page surfaces.
   Stronger secondary inks keep small captions readable over those clouds. */
[data-theme="light"] :is(.opening-scene, .closing-section) {
  --ink-2: #4f435d;
  --ink-3: #514160;
  --purple-brand: #5b3c74;
  --moonlight: #714718;
}
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.8rem; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 3rem; background: var(--surface-raised); color: var(--ink); font-size: .72rem; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: var(--surface-soft); }
.theme-toggle-icon { display: grid; width: 1.05rem; height: 1.05rem; flex-shrink: 0; }
.theme-toggle svg { grid-area: 1 / 1; width: 1.05rem; height: 1.05rem; transform-origin: center; }
.theme-icon-sun { opacity: 0; transform: rotate(-90deg) scale(.6); }
.theme-icon-moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .theme-icon-sun { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .theme-icon-moon { opacity: 0; transform: rotate(90deg) scale(.6); }
@media (prefers-reduced-motion: no-preference) {
  .theme-toggle svg { transition: opacity .3s ease,transform .4s cubic-bezier(.22,.68,.25,1); }
  html.theme-view-transition::view-transition-old(root),
  html.theme-view-transition::view-transition-new(root) { animation-duration: .45s; animation-timing-function: ease-in-out; }
  html.theme-view-transition::view-transition { pointer-events: none; }
  html.theme-color-transition :where(body,header,main,section,article,aside,footer,nav,h1,h2,h3,p,a,button,span,summary,div) { transition: background-color .4s ease,color .4s ease,border-color .4s ease,box-shadow .4s ease; }
}
.night-backdrop > img { width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.dream-portrait > picture { display: contents; }

/* Scene-specific decoration: these glows, shadows, borders and phone hardware
   don't carry text and adapt to the light illustrations' softer illumination. */
[data-theme="light"] .night-demo-section { background: radial-gradient(ellipse at 24% 70%, #decce540, transparent 60%), var(--surface); }
[data-theme="light"] .privacy-section { background: radial-gradient(ellipse at 26% 70%, #e6d5f055, transparent 65%), var(--surface); }
[data-theme="light"] .pricing-section { background: radial-gradient(ellipse at 26% 20%, #f7e3c440, transparent 65%), var(--surface); }
[data-theme="light"] .phone-shell { filter: drop-shadow(0 20px 35px #49335726); }
[data-theme="light"] .phone { border-color: #e2d5e9; box-shadow: inset 0 0 0 1px #fffaf5, 0 0 0 1px #bbaac9; }
[data-theme="light"] .story-paper { background: #fff5df; }
[data-theme="light"] .plan-card li { border-bottom-color: var(--line); }
[data-theme="light"] .dream-trail > span { border-top-color: #9574ae80; }
[data-theme="light"] .evening-art .notification-example { box-shadow: 0 10px 35px #49335716; }
