/* ==========================================================================
   Dark first.

   RoyalSeer and TopStart are both light sites with warm accents and one dark
   panel. Building Undid the same way made it a sibling no matter the palette,
   so the page itself changes temperature: deep ink-plum ground, peach for the
   action, magenta for depth, mint only as a status dot. The brand sheet calls
   the dark icon the primary one, so this is the app's own voice, not a mode.

   Light stays available through the toggle, defined at the bottom of this file.
   ========================================================================== */

html[data-theme="moonlit"]{
  --canvas:#141021;
  --surface:#1E1836;
  --band:#191331;
  --line:rgba(252,249,243,.12);
  --text:#FCF9F3;
  --muted:rgba(252,249,243,.66);
  --peach-deep:#FFB27E;
  --accent-text:#FFB27E;   /* 9.6:1 on the dark surface */
  --shadow:0 30px 60px -34px rgba(0,0,0,.85), 0 2px 10px rgba(0,0,0,.4);
}

html[data-theme="moonlit"] body{
  background-color:#141021;
  background-image:
    radial-gradient(920px 640px at 6% -8%, rgba(142,59,98,.38), transparent 62%),
    radial-gradient(860px 620px at 98% -2%, rgba(247,146,87,.20), transparent 60%),
    radial-gradient(1100px 760px at 50% 116%, rgba(91,74,138,.42), transparent 68%);
  color:var(--text);
}

/* ---------- nav ---------- */
html[data-theme="moonlit"] nav{
  background:color-mix(in srgb,#141021 82%,transparent);
  border-bottom-color:rgba(252,249,243,.10);
}
html[data-theme="moonlit"] .nav-link{color:var(--text)}
html[data-theme="moonlit"] .theme-btn{
  background:rgba(252,249,243,.05);
  border-color:rgba(252,249,243,.16);
  color:var(--text);
}

/* ---------- hero card: deepen, so it still sits above the page ---------- */
html[data-theme="moonlit"] .product-card{
  border-color:rgba(252,249,243,.10);
  background:
    radial-gradient(720px 520px at 92% -14%, rgba(180,74,78,.42), transparent 62%),
    radial-gradient(560px 460px at 4% 112%, rgba(142,59,98,.45), transparent 66%),
    linear-gradient(115deg,#1B1330 0%,#2A1A44 40%,#4A2452 72%,#8E3B62 100%);
  box-shadow:0 60px 120px -60px rgba(0,0,0,.9);
}

/* ---------- bands ---------- */
html[data-theme="moonlit"] section.band{
  background:linear-gradient(180deg,rgba(252,249,243,.035),rgba(142,59,98,.10));
  border-top:1px solid rgba(252,249,243,.08);
  border-bottom:1px solid rgba(252,249,243,.08);
}
html[data-theme="moonlit"] section.band-warm{
  background:linear-gradient(180deg,rgba(247,146,87,.07),rgba(142,59,98,.12));
  border-top:1px solid rgba(247,146,87,.14);
  border-bottom:1px solid rgba(247,146,87,.14);
}

/* ---------- cards ---------- */
html[data-theme="moonlit"] .feature{
  background:
    radial-gradient(130% 100% at 8% -28%, rgba(247,146,87,.15), transparent 60%),
    var(--surface);
  border-color:rgba(252,249,243,.11);
}
html[data-theme="moonlit"] .step{
  background:
    radial-gradient(130% 100% at 8% -28%, var(--acc-soft), transparent 60%),
    var(--surface);
  border-color:rgba(252,249,243,.11);
}
html[data-theme="moonlit"] .step p{color:rgba(252,249,243,.78)}
html[data-theme="moonlit"] kbd{box-shadow:0 2px 0 rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.16)}
html[data-theme="moonlit"] body::after{opacity:.055}
html[data-theme="moonlit"] .feature p{color:rgba(252,249,243,.78)}
html[data-theme="moonlit"] .feature:hover{
  border-color:rgba(247,146,87,.55);
  box-shadow:0 30px 60px -34px rgba(247,146,87,.45);
}

html[data-theme="moonlit"] .feature::after{
  background:radial-gradient(95% 85% at 100% 0%, rgba(247,146,87,.22), transparent 60%);
}
html[data-theme="moonlit"] .feature h3,
html[data-theme="moonlit"] .step h3,
html[data-theme="moonlit"] .section-head h2,
html[data-theme="moonlit"] .price-card h3{color:var(--text)}

/* ---------- pricing ---------- */
html[data-theme="moonlit"] .price-card{
  background-image:linear-gradient(var(--surface),var(--surface)),
                   linear-gradient(140deg,#F79257,#8E3B62 52%,#4A2452);
  box-shadow:0 50px 100px -60px rgba(142,59,98,.9);
}
html[data-theme="moonlit"] #pricing{
  background-image:linear-gradient(180deg,rgba(247,146,87,.09),transparent 70%);
}

/* ---------- faq + doc pages ---------- */
html[data-theme="moonlit"] .faq details{border-bottom-color:rgba(252,249,243,.10)}
html[data-theme="moonlit"] .faq summary{color:var(--text)}
html[data-theme="moonlit"] .faq p{color:var(--muted)}
html[data-theme="moonlit"] .doc h2,
html[data-theme="moonlit"] .doc h3{color:var(--text)}
html[data-theme="moonlit"] .doc p,
html[data-theme="moonlit"] .doc li{color:var(--muted)}
html[data-theme="moonlit"] .doc strong{color:var(--text)}
html[data-theme="moonlit"] .doc code,
html[data-theme="moonlit"] .doc .note{background:var(--surface);border-color:var(--line);color:var(--text)}
html[data-theme="moonlit"] .doc a{color:var(--peach);border-bottom-color:rgba(247,146,87,.4)}
html[data-theme="moonlit"] .release .ver{color:var(--text)}

/* ---------- footer ---------- */
html[data-theme="moonlit"] footer{
  border-top:0;
  background:linear-gradient(180deg,#120E1E,#0C0916);
}
html[data-theme="moonlit"] footer::before{
  background:linear-gradient(90deg,transparent,rgba(247,146,87,.55),rgba(142,59,98,.55),transparent);
}
html[data-theme="moonlit"] .foot-links a{color:var(--muted)}
html[data-theme="moonlit"] .foot-links a:hover{color:var(--accent-text)}
html[data-theme="moonlit"] .foot .copy{color:var(--muted)}

/* ---------- screenshots keep their cream, which is the point ---------- */
html[data-theme="moonlit"] .shot-fig img{background:#FCF9F3}

/* ---------- light remains a real, finished theme ---------- */
html[data-theme="light"] body{
  background-color:#FBF7EF;
  background-image:
    radial-gradient(900px 640px at 6% -8%, rgba(247,146,87,.20), transparent 62%),
    radial-gradient(860px 640px at 98% 2%, rgba(142,59,98,.12), transparent 60%),
    radial-gradient(1100px 760px at 50% 114%, rgba(91,74,138,.16), transparent 68%);
}
