/*
  Luna Public styling (Citadel theme)
  Scope: public pages (home, auth) that are NOT inside the billing portal (body.luna-ui)
  Loaded outside Vite so changes apply without rebuilding assets.
*/

:root {
  --luna-public-accent: 262 83% 62%;
}

/* -------------------------------------------------------------------------- */
/* Background for public (guest) pages                                         */
/* -------------------------------------------------------------------------- */
body.dark:not(.luna-ui):not(.luna-store) {
  --luna-accent: var(--luna-public-accent);
  --luna-violet: var(--luna-public-accent);
  --color-primary: var(--luna-public-accent);

  background:
    radial-gradient(900px circle at 15% -10%, rgba(120, 90, 255, 0.38), transparent 55%),
    radial-gradient(900px circle at 85% 0%, rgba(70, 160, 255, 0.18), transparent 52%),
    linear-gradient(180deg, #0b1220 0%, #070b14 55%, #060a12 100%);
  background-attachment: fixed;
}

/* Make the public shell feel like one piece (similar to billing) */
body.dark:not(.luna-ui):not(.luna-store) .luna-page {
  padding: 0;
}

body.dark:not(.luna-ui):not(.luna-store) .luna-shell {
  max-width: none;
  margin: 0;
  min-height: 100dvh;

  background:
    radial-gradient(1200px circle at 20% -20%, rgba(120, 90, 255, 0.22), transparent 55%),
    radial-gradient(900px circle at 85% 5%, rgba(70, 160, 255, 0.14), transparent 55%),
    rgba(8, 10, 18, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);

  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.dark:not(.luna-ui):not(.luna-store) .luna-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background:
    radial-gradient(900px circle at 18% 0%, rgba(120, 90, 255, 0.16), transparent 62%),
    rgba(10, 12, 20, 0.72) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark:not(.luna-ui):not(.luna-store) .luna-main {
  padding: 26px;
}

@media (max-width: 1024px) {
  body.dark:not(.luna-ui):not(.luna-store) .luna-main {
    padding: 18px;
  }
}

/* -------------------------------------------------------------------------- */
/* Auth pages                                                                 */
/* -------------------------------------------------------------------------- */
body.luna-auth {
  background:
    radial-gradient(900px circle at 15% -10%, rgba(120, 90, 255, 0.38), transparent 55%),
    radial-gradient(900px circle at 85% 0%, rgba(70, 160, 255, 0.18), transparent 52%),
    linear-gradient(180deg, #0b1220 0%, #070b14 55%, #060a12 100%);
  background-attachment: fixed;
}

body.luna-auth .auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: clamp(16px, 4vw, 44px);
  align-items: stretch;
}

@media (max-width: 1024px) {
  body.luna-auth .auth-shell {
    grid-template-columns: 1fr;
    padding: 18px;
  }
}

body.luna-auth .auth-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 3vw, 38px);

  background: rgba(8, 10, 18, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
}

body.luna-auth .auth-card-inner {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

body.luna-auth .auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

body.luna-auth .auth-brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

body.luna-auth .auth-aside {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(1200px circle at 10% 0%, rgba(120, 90, 255, 0.28), transparent 55%),
    radial-gradient(900px circle at 85% 15%, rgba(70, 160, 255, 0.16), transparent 55%),
    rgba(8, 10, 18, 0.62);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5);
}

body.luna-auth .auth-aside img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.02);
}

body.luna-auth .auth-aside-fallback {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

body.luna-auth .auth-aside-fallback .hint {
  max-width: 440px;
  text-align: center;
  color: rgba(255,255,255,0.55);
  font-weight: 600;
}

/* -------------------------------------------------------------------------- */
/* Store tweaks (navigation + no "steps" chips on store listing)              */
/* -------------------------------------------------------------------------- */
body.luna-store .luna-cart-label { display: none !important; }
body.luna-store .store-steps { display: none !important; }

/* -------------------------------------------------------------------------- */
/* Home (portal layout)                                                       */
/* -------------------------------------------------------------------------- */
body.dark:not(.luna-ui):not(.luna-store) .public-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(1100px circle at 20% 0%, rgba(120, 90, 255, 0.26), transparent 55%),
    radial-gradient(900px circle at 85% 10%, rgba(70, 160, 255, 0.14), transparent 55%),
    rgba(8, 10, 18, 0.52);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  padding: clamp(20px, 3vw, 40px);
}

body.dark:not(.luna-ui):not(.luna-store) .public-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(120, 90, 255, 0.12), transparent 42%, rgba(70, 160, 255, 0.10));
  opacity: 0.9;
}

body.dark:not(.luna-ui):not(.luna-store) .public-hero > * {
  position: relative;
  z-index: 1;
}

body.dark:not(.luna-ui):not(.luna-store) .public-section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 14px;
}

body.dark:not(.luna-ui):not(.luna-store) .public-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 18, 0.48);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
}

body.dark:not(.luna-ui):not(.luna-store) .public-card:hover {
  border-color: rgba(120, 90, 255, 0.22);
}

body.dark:not(.luna-ui):not(.luna-store) .public-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(8, 10, 18, 0.35);
}
