/* =========================================================
   Digital Celestia — Theme
   Palette: deep night indigo, lavender, starlight gold
   ========================================================= */
:root {
  --bg: #0b0a1f;
  --bg-2: #120f2e;
  --bg-3: #1a1540;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.09);
  --text: #ece9ff;
  --muted: #a9a3c9;
  --gold: #f6d98a;
  --gold-2: #e8b95b;
  --lav: #c38bff;
  --lav-2: #8b6cff;
  --grad: linear-gradient(135deg, var(--gold) 0%, var(--lav) 100%);
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: radial-gradient(1200px 600px at 80% -10%, #2a1b5a 0%, transparent 60%),
              radial-gradient(900px 500px at -10% 40%, #1b1442 0%, transparent 60%),
              var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.container.narrow { max-width: 780px; }
.section { padding: clamp(4rem, 9vw, 7rem) 0; position: relative; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section-sub { color: var(--muted); font-size: 1.05rem; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .22em; font-size: .75rem; font-weight: 600;
  color: var(--gold); margin-bottom: .9rem; display: inline-flex; align-items: center; gap: .5rem;
}
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Starfield canvas */
#starfield { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .9; }
header, main, footer, .modal, .back-top { position: relative; z-index: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
  font-family: var(--font-body);
}
.btn-primary { background: var(--grad); color: #1a1230; box-shadow: 0 10px 30px rgba(195, 139, 255, .25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(195, 139, 255, .4); }
.btn-ghost { border-color: rgba(255,255,255,.2); color: var(--text); background: rgba(255,255,255,.03); }
.btn-ghost:hover { border-color: var(--lav); background: rgba(195,139,255,.08); }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 10, 31, .72); border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; }
.brand-logo { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex-shrink: 0; box-shadow: 0 0 18px rgba(195,139,255,.35); }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.55) translateY(10%); }
.brand-text { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; letter-spacing: .01em; }
.brand-text em { font-style: italic; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.main-nav { display: flex; gap: 1.8rem; align-items: center; }
.main-nav a { font-size: .92rem; font-weight: 500; color: var(--muted); position: relative; transition: color .2s; }
.main-nav a:hover { color: var(--text); }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 1.5px; width: 0; background: var(--grad); transition: width .25s; }
.main-nav a:hover::after { width: 100%; }
.nav-cta { padding: .5rem 1.1rem; border-radius: 999px; background: var(--grad); color: #1a1230 !important; font-weight: 600; }
.nav-cta:hover { box-shadow: 0 8px 24px rgba(195,139,255,.35); }
.nav-cta::after { display: none; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(5rem, 12vw, 9rem) 0 clamp(4rem, 9vw, 7rem); overflow: hidden; text-align: center; }
.hero-inner { position: relative; z-index: 2; max-width: 860px; }
.hero-logo {
  width: clamp(150px, 20vw, 220px); height: auto; margin: 0 auto 1.6rem; border-radius: 50%;
  box-shadow: 0 0 60px rgba(195,139,255,.45), 0 0 120px rgba(106,63,214,.35);
  animation: float 8s ease-in-out infinite;
}
.hero h1 { margin-bottom: 1.2rem; }
.hero-sub { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 620px; margin: 0 auto 2.2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.6rem; }
.hero-badges { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.5rem 2.2rem; justify-content: center; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.hero-badges i { color: var(--gold); margin-right: .4rem; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; }
.hero-orb-1 { width: 420px; height: 420px; background: #6a3fd6; top: -120px; left: -120px; }
.hero-orb-2 { width: 380px; height: 380px; background: #d9a441; bottom: -160px; right: -100px; opacity: .3; }
.hero-moon {
  position: absolute; right: 6%; top: 14%; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6dc, #f1cf7a 45%, #c9a04a 100%);
  box-shadow: 0 0 60px rgba(246,217,138,.45), inset -30px -20px 50px rgba(0,0,0,.25);
  opacity: .9; animation: float 8s ease-in-out infinite;
}
.hero-moon::after {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  background: radial-gradient(circle at 20% 20%, transparent 58%, var(--bg) 60%);
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

/* ---------- Shop ---------- */
.shop-controls { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-bottom: 2.2rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.filter-btn {
  background: rgba(255,255,255,.04); border: 1px solid var(--card-border); color: var(--muted);
  padding: .5rem 1.05rem; border-radius: 999px; cursor: pointer; font-size: .85rem; font-weight: 500; font-family: var(--font-body);
  transition: all .2s;
}
.filter-btn:hover { color: var(--text); border-color: rgba(255,255,255,.25); }
.filter-btn.active { background: var(--grad); color: #1a1230; border-color: transparent; }
.search { display: flex; align-items: center; gap: .6rem; background: rgba(255,255,255,.04); border: 1px solid var(--card-border); border-radius: 999px; padding: .5rem 1rem; min-width: 240px; }
.search i { color: var(--muted); }
.search input { background: none; border: 0; outline: 0; color: var(--text); font-family: var(--font-body); font-size: .9rem; width: 100%; }
.search input::placeholder { color: var(--muted); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.6rem; }
.product-card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .25s, border-color .25s, box-shadow .25s;
  animation: fadeUp .5s ease both;
}
.product-card:hover { transform: translateY(-6px); border-color: rgba(195,139,255,.4); box-shadow: var(--shadow); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.product-media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; cursor: pointer; background: var(--bg-3); }
.product-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s; }
.product-card:hover .product-media img { transform: scale(1.05); }
.product-badge {
  position: absolute; top: .8rem; left: .8rem; background: rgba(11,10,31,.75); backdrop-filter: blur(6px);
  color: var(--gold); font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: .3rem .7rem; border-radius: 999px; border: 1px solid rgba(246,217,138,.3);
}
.product-media .quick-view {
  position: absolute; inset: 0; display: grid; place-items: center; background: rgba(11,10,31,.45);
  color: #fff; font-weight: 600; font-size: .9rem; opacity: 0; transition: opacity .25s;
}
.product-card:hover .quick-view { opacity: 1; }
.product-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.product-cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--lav); font-weight: 600; }
.product-title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; margin: 0; }
.product-desc { color: var(--muted); font-size: .9rem; margin: 0; flex: 1; }
.product-file { font-size: .78rem; color: var(--lav); margin: 0; display: flex; gap: .4rem; align-items: center; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: .6rem; }
.product-price { font-size: 1.25rem; font-weight: 600; color: var(--gold); }
.product-price del { color: var(--muted); font-size: .9rem; font-weight: 400; margin-left: .4rem; }
.btn-buy { padding: .65rem 1.2rem; font-size: .88rem; }
.empty-state { text-align: center; color: var(--muted); padding: 3rem 0; }

/* ---------- About ---------- */
.about-inner { display: grid; grid-template-columns: 1fr 1.3fr; gap: 4rem; align-items: center; }
.about-card {
  background: linear-gradient(160deg, rgba(195,139,255,.14), rgba(246,217,138,.08));
  border: 1px solid var(--card-border); border-radius: 28px; padding: 3rem 2rem; text-align: center;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.about-card::before { content: ""; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, rgba(195,139,255,.18), transparent 30%); animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.about-card > * { position: relative; }
.about-card { padding: 2rem; }
.about-logo { width: 100%; max-width: 300px; height: auto; margin: 0 auto 1rem; border-radius: 24px; box-shadow: 0 0 50px rgba(195,139,255,.35); }
.about-card small { color: var(--muted); }
.about-points { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .7rem; }
.about-points li { display: flex; gap: .7rem; align-items: center; color: var(--text); }
.about-points i { color: var(--gold); background: rgba(246,217,138,.12); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; }
.about-copy p { color: var(--muted); }

/* ---------- How it works ---------- */
.how { background: linear-gradient(180deg, transparent, rgba(255,255,255,.02), transparent); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 2.2rem 1.8rem; position: relative; text-align: center; }
.step-num { position: absolute; top: 1rem; right: 1.2rem; font-family: var(--font-display); font-size: 2.6rem; color: rgba(255,255,255,.08); font-weight: 700; line-height: 1; }
.step-icon { font-size: 1.6rem; color: #1a1230; background: var(--grad); width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 1.2rem; }
.step h3 { font-size: 1.4rem; }
.step p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- FAQ ---------- */
.accordion { display: grid; gap: .8rem; }
.accordion details { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 0 1.3rem; transition: border-color .2s; }
.accordion details[open] { border-color: rgba(195,139,255,.4); }
.accordion summary { cursor: pointer; padding: 1.1rem 0; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 1.4rem; color: var(--gold); transition: transform .25s; line-height: 1; }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion details p { color: var(--muted); padding-bottom: 1.1rem; margin: 0; }
.accordion a { color: var(--lav); text-decoration: underline; }

/* ---------- Contact ---------- */
.contact-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 4rem; align-items: start; }
.contact-copy p { color: var(--muted); }
.contact-links { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.2rem; }
.contact-links li { display: flex; gap: 1rem; align-items: center; }
.contact-links li > i { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem; background: rgba(195,139,255,.12); color: var(--lav); flex-shrink: 0; }
.contact-links span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.contact-links a { font-weight: 500; word-break: break-all; }
.contact-links a:hover { color: var(--gold); }
.contact-form { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 2rem; display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .85rem; font-weight: 500; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; background: rgba(11,10,31,.6); border: 1px solid var(--card-border); border-radius: var(--radius-sm);
  padding: .8rem 1rem; color: var(--text); font-family: var(--font-body); font-size: .95rem; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field select option { background: var(--bg-2); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--lav); box-shadow: 0 0 0 3px rgba(195,139,255,.18); }
.field textarea { resize: vertical; min-height: 120px; }
.honey { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.form-status { margin: 0; font-size: .9rem; min-height: 1.2em; }
.form-status.ok { color: #8ef0b8; }
.form-status.err { color: #ff9aa2; }
.form-note { margin: 0; font-size: .82rem; color: var(--muted); text-align: center; }
.form-note a { color: var(--lav); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid rgba(255,255,255,.07); background: rgba(5,4,16,.6); padding-top: 3.5rem; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; padding-bottom: 2.5rem; }
.footer-brand p { color: var(--muted); margin: 1rem 0; max-width: 320px; }
.socials { display: flex; gap: .6rem; }
.socials a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--card-border); display: grid; place-items: center; color: var(--muted); transition: all .2s; }
.socials a:hover { color: #1a1230; background: var(--grad); border-color: transparent; }
.footer-nav { display: grid; gap: .5rem; align-content: start; }
.footer-nav h4 { font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .15em; color: var(--gold); margin-bottom: .4rem; }
.footer-nav a { color: var(--muted); font-size: .92rem; }
.footer-nav a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.06); padding: 1.3rem 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; color: var(--muted); font-size: .82rem; }
.footer-bottom p { margin: 0; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1.5rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,4,16,.78); backdrop-filter: blur(6px); }
.modal-card { position: relative; background: var(--bg-2); border: 1px solid var(--card-border); border-radius: 24px; max-width: 900px; width: 100%; max-height: 90vh; overflow-y: auto; overflow-x: hidden; box-shadow: var(--shadow); animation: fadeUp .3s ease; }
.modal-close { position: absolute; top: .9rem; right: .9rem; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(11,10,31,.7); color: #fff; cursor: pointer; font-size: 1.1rem; }
.modal-body { display: grid; grid-template-columns: 1fr 1fr; }
.modal-body > * { min-width: 0; }
.modal-media { position: sticky; top: 0; align-self: start; background: #000; display: flex; flex-direction: column; max-height: 90vh; }
.modal-media > img { width: 100%; flex: 1; min-height: 0; object-fit: contain; background: #05040f; }
.modal-counter { position: absolute; top: .9rem; left: .9rem; background: rgba(11,10,31,.75); color: var(--text); font-size: .75rem; padding: .25rem .6rem; border-radius: 999px; border: 1px solid var(--card-border); }
.modal-thumbs { display: flex; gap: .45rem; padding: .6rem; overflow-x: auto; width: 100%; min-width: 0; background: rgba(11,10,31,.9); border-top: 1px solid var(--card-border); scrollbar-width: thin; }
.modal-thumb { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; background: #000; cursor: pointer; opacity: .6; transition: opacity .2s, border-color .2s; }
.modal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal-thumb:hover { opacity: .9; }
.modal-thumb.active { opacity: 1; border-color: var(--gold); }
.modal-info { padding: 2.2rem 2rem; display: flex; flex-direction: column; gap: .8rem; }
.modal-info h3 { font-size: 2rem; margin: 0; }
.modal-info .product-desc { font-size: .98rem; flex: initial; }
.modal-desc p + p { margin-top: .6rem; }
.modal-subhead { font-family: var(--font-body); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--gold); margin: .6rem 0 0; }
.modal-legal { font-size: .78rem; color: var(--muted); margin: .4rem 0 0; display: flex; gap: .5rem; align-items: flex-start; }
.modal-legal i { margin-top: .25em; }
.modal-includes { list-style: none; padding: 0; margin: .4rem 0; display: grid; gap: .4rem; font-size: .92rem; color: var(--muted); }
.modal-includes i { color: var(--gold); margin-right: .5rem; }
.modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--card-border); flex-wrap: wrap; }
.modal-actions .product-price { font-size: 1.6rem; }
.modal-actions-top { margin-top: .2rem; padding-top: .6rem; padding-bottom: .4rem; border-top: 0; border-bottom: 1px solid var(--card-border); }
.coming-soon-note { font-size: .82rem; color: var(--muted); margin: 0; }

/* ---------- Back to top ---------- */
.back-top { position: fixed; right: 1.4rem; bottom: 1.4rem; width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #1a1230; display: grid; place-items: center; opacity: 0; transform: translateY(10px); pointer-events: none; transition: all .3s; z-index: 40; }
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .about-inner, .contact-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-visual { max-width: 380px; margin: 0 auto; width: 100%; }
  .steps { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero-moon { display: none; }
  .modal-body { grid-template-columns: 1fr; }
  .modal-media { position: static; max-height: none; }
  .modal-media > img { max-height: 380px; }
  .modal-info { padding: 1.5rem 1.2rem; }
  .modal-info h3 { font-size: 1.6rem; }
}
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(11,10,31,.97); border-bottom: 1px solid var(--card-border); padding: .5rem 1.25rem 1.25rem;
    transform: translateY(-120%); transition: transform .3s; opacity: 0; pointer-events: none;
  }
  .main-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .main-nav a { padding: .9rem 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 1rem; }
  .main-nav a::after { display: none; }
  .nav-cta { margin-top: .8rem; text-align: center; justify-content: center; border-bottom: 0 !important; }
  .shop-controls { flex-direction: column; align-items: stretch; }
  .search { min-width: 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { justify-content: center; text-align: center; }
  .contact-form { padding: 1.4rem; }
  .hero-moon { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
