/* Pravadh Labs — time-of-day tints. Text contrast stays that of the light/dark themes. */

/* Sunrise: light theme, warm cream and a soft morning sun */
html[data-theme="light"][data-sky="sunrise"] {
  --ink: #fff8ef;
  --ink-soft: #fbeee0;
  --line: #f0e2d2;
  --line-dark: #f0e2d2;
  --header-bg: rgba(255, 248, 238, 0.95);
}
html[data-theme="light"][data-sky="sunrise"] body { background-color: #fff8ef; }
.sky-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 130;
  opacity: 0;
  transition: opacity 1.6s ease;
}
html[data-sky="sunrise"] .sky-glow {
  opacity: 1;
  mix-blend-mode: multiply;
  background:
    radial-gradient(70% 60% at 88% 0%, rgba(253, 158, 1, 0.26), rgba(255, 160, 110, 0.12) 45%, transparent 75%),
    linear-gradient(180deg, rgba(255, 214, 170, 0.18) 0%, transparent 40%);
}

/* Dusk: dark theme, violet sky with an amber horizon */
html[data-theme="dark"][data-sky="dusk"] {
  --ink: #15102e;
  --ink-soft: #211944;
  --line-dark: #382b5e;
  --header-bg: rgba(24, 17, 50, 0.9);
}
html[data-theme="dark"][data-sky="dusk"] body { background-color: #15102e; }
html[data-sky="dusk"] .sky-glow {
  opacity: 1;
  mix-blend-mode: screen;
  background:
    radial-gradient(120% 55% at 50% 112%, rgba(253, 120, 40, 0.42), rgba(236, 72, 153, 0.16) 45%, transparent 72%),
    radial-gradient(80% 50% at 90% -12%, rgba(139, 92, 246, 0.30), transparent 70%);
}

/* smooth hand-over between phases (and when the toggle is used) */
html.sky-shift body,
html.sky-shift body *:not(canvas):not(svg *):not(.sky-glow) {
  transition: background-color 1.5s ease, border-color 1.5s ease, color 1.2s ease !important;
}

/* toggle: small "A" badge while following local time */
.theme-toggle { position: relative; }
.theme-toggle[data-mode="auto"]::after {
  content: "A";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #FD9E01;
  color: #1a1200;
  font: 700 9px/15px Inter, system-ui, sans-serif;
  text-align: center;
  box-shadow: 0 0 0 2px var(--header-bg, #fff);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  html.sky-shift body, html.sky-shift body *:not(canvas):not(svg *):not(.sky-glow) { transition: none !important; }
}
