/* ═══════════════════════════════════════════════════════════════
   SGT shared stylesheet — shop.studioghost.town
   Used by: shop.html, docs/ghostalizer.html
   ═══════════════════════════════════════════════════════════════ */

/* ── Palette ─────────────────────────────────────────────────── */
:root {
  --bg-top:      #150A24;
  --bg-bottom:   #0D0818;
  --panel:       #1A0F2E;
  --panel-dark:  #0D0818;
  --panel-deep:  #251540;
  --border:      rgba(255,0,102,0.25);
  --border-hi:   rgba(255,0,102,0.55);
  --pink:        #FF0066;
  --pink-soft:   #FF4488;
  --pink-glow:   rgba(255,0,102,0.13);
  --purple:      #8A6BC8;
  --purple-viv:  #B070FF;
  --purple-icon: #8844BB;
  --text:        #ffffff;
  --muted:       rgba(255,255,255,0.55);
  --muted-lo:    rgba(255,255,255,0.30);
  --shadow:      0 16px 48px rgba(0,0,0,0.55);
  --r:           10px;
}

/* ── Reset / Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  min-height: 100%;
}

body {
  background:
    radial-gradient(ellipse 900px 400px at 80% 0%, rgba(255,0,102,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 600px 300px at 0% 50%, rgba(138,107,200,0.15) 0%, transparent 55%),
    linear-gradient(175deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
}

/* ── Typography ───────────────────────────────────────────────── */
h1 { margin: 0 0 6px; font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
h2 { margin: 0 0 10px; font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 700; color: var(--text); letter-spacing: 0.01em; }
h3 { margin: 0 0 7px; font-size: .93rem; font-weight: 700; color: var(--text); letter-spacing: 0.03em; text-transform: uppercase; }
p  { margin: 7px 0; color: var(--muted); }
ul, ol { margin: 6px 0 0 1.2em; padding: 0; }
li { margin: 5px 0; color: var(--muted); }
li strong, p strong { color: var(--text); }
.small { font-size: .8rem; color: var(--muted-lo); margin-top: 5px; }
a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }
hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

/* ── Layout helpers ───────────────────────────────────────────── */
.wrap  { max-width: 1060px; margin: 0 auto; }
.g2    { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.g3    { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }

/* ── Cards ────────────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 18px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--pink); }

/* Product card (shop only) */
.product-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  border-top: 2px solid rgba(255,0,102,0.35);
  box-shadow: var(--shadow), 0 0 40px rgba(255,0,102,0.08) inset;
  transition: border-color 0.2s, transform 0.2s;
}
.product-card:hover { border-color: var(--pink); transform: translateY(-2px); }

.inner {
  background: var(--panel-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}

/* ── Hero panel (docs) ────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 2px solid rgba(255,0,102,0.35);
  border-radius: var(--r);
  box-shadow: var(--shadow), 0 0 40px rgba(255,0,102,0.08) inset;
  padding: 22px 24px 20px;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 480px 200px at top right, rgba(255,0,102,0.12), transparent 65%);
  pointer-events: none;
}
.hero-title { color: var(--pink); }
.hero-sub {
  font-size: .8rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: var(--muted);
  margin: 0 0 10px;
}

/* ── Labels, chips ────────────────────────────────────────────── */
.label {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--pink);
  border: 1px solid rgba(255,0,102,0.35);
  background: rgba(255,0,102,0.1);
  margin-bottom: 10px;
}

.chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  font-weight: 700; font-size: .82rem;
  background: var(--panel-dark);
  border: 1px solid var(--border-hi);
  color: var(--text);
  white-space: nowrap;
}

/* ── Callouts ─────────────────────────────────────────────────── */
.callout {
  border-left: 2px solid var(--purple);
  background: rgba(138,107,200,0.10);
  padding: 11px 13px;
  border-radius: 0 8px 8px 0;
  margin: 10px 0;
}
.callout.pink  { border-left-color: var(--pink);  background: rgba(255,0,102,0.10); }
.callout.warn  { border-left-color: #ffbf66;       background: rgba(255,191,102,0.09); }
.callout p     { color: var(--muted); margin: 4px 0 0; }
.callout strong { color: var(--text); }

/* ── Tables ───────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: .91rem; }
th, td { border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; vertical-align: top; padding: 9px 6px; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--purple); font-weight: 700; }
td:first-child strong { color: var(--text); white-space: nowrap; }
td { color: var(--muted); }

/* ── Details / FAQ ────────────────────────────────────────────── */
.faq { display: grid; gap: 7px; }
details {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  transition: border-color .15s;
}
details[open] { border-color: var(--border-hi); }
summary {
  cursor: pointer; list-style: none;
  font-weight: 700; font-size: .93rem; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "+";
  font-size: .85rem; font-weight: 700;
  color: var(--pink);
  width: 16px; flex-shrink: 0;
  font-family: monospace;
}
details[open] summary::before { content: "\2212"; }
details p { margin: 9px 0 2px 24px; color: var(--muted); font-size: .91rem; }

/* ── Section heading rule ─────────────────────────────────────── */
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sec-head h2 { margin: 0; }
.sec-head::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ── Chip hover popup (docs) ──────────────────────────────────── */
.chip[data-peek] { cursor: help; }
#chip-popup {
  display: none;
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  border-radius: 8px;
  border: 1px solid var(--border-hi);
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  overflow: hidden;
  background: var(--panel-dark);
}
#chip-popup img { display: block; max-height: 240px; width: auto; }

/* ═══════════════════════════════════════════════════════════════
   Shop-specific styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Shop layout ──────────────────────────────────────────────── */
body.shop { padding: 48px 24px 64px; }

header {
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 20px;
}
header img { height: 224px; width: auto; flex-shrink: 0; }
.header-logo-link { display: inline-flex; flex-shrink: 0; line-height: 0; }
.site-title-link  { text-decoration: none; }

.site-title {
  font-size: 28px;
  letter-spacing: -0.5px;
  color: var(--pink);
  margin-bottom: 6px;
}
.tagline    { color: var(--muted-lo); font-size: 14px; }
.positioning { margin-top: 10px; color: var(--muted); font-size: 15px; max-width: 680px; }

/* ── Product grid ─────────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

/* ── Product card layout (defined in Cards section above) ────── */

.card-inner  { display: flex; gap: 20px; align-items: stretch; }
.card-info   { flex: 1; display: flex; flex-direction: column; }

.card-thumb  { flex-shrink: 0; width: 50%; }
.card-thumb a {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,0,102,0.15);
  transition: border-color 0.2s;
}
.card-thumb a:hover { border-color: var(--pink); }
.card-thumb img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.card-thumb a:hover img { transform: scale(1.03); }

/* ── Product card name ────────────────────────────────────────── */
.card .card-name { font-size: 18px; margin-bottom: 8px; color: var(--text); }

/* ── Description ──────────────────────────────────────────────── */
.card .desc {
  flex: 1;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 18px;
}
.card .desc p { margin-bottom: 10px; }
.card .desc p:last-child { margin-bottom: 0; }
.card .desc details {
  margin-top: 6px;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-radius: 0;
  padding: 8px 0 0;
  background: transparent;
}
.card .desc summary {
  color: var(--pink-soft);
  font-weight: 600;
  display: block; /* override flex from shared */
}
.card .desc summary::before { display: none; }
.card .desc summary::after  { content: ' +'; color: var(--muted); font-weight: 400; }
.card .desc details[open] summary::after { content: ' −'; }
.card .desc ul  { margin: 10px 0 0 16px; color: var(--muted); }
.card .desc li  { margin-bottom: 6px; }

/* ── Proof block (inside card) ────────────────────────────────── */
.proof {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.proof h2 {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}
.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.proof-item {
  border: 1px solid rgba(255,0,102,0.18);
  background: rgba(255,0,102,0.06);
  border-radius: 8px;
  padding: 10px 12px;
}
.proof-item .pair { color: var(--pink-soft); font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.proof-item .note { color: var(--muted-lo); font-size: 12px; line-height: 1.35; }
.proof-cta { margin-top: 10px; color: var(--muted-lo); font-size: 12px; }

/* ── Pricing ──────────────────────────────────────────────────── */
.card-info .price { margin-top: auto; margin-bottom: 16px; }
.card .price .regular {
  font-size: 14px;
  color: var(--muted-lo);
  text-decoration: line-through;
  display: block;
  margin-bottom: 2px;
}
.card .price .current { font-size: 26px; color: var(--pink); font-weight: 700; }
.card .price .badge {
  display: inline-block;
  font-size: 11px;
  background: rgba(255,0,102,0.15);
  color: var(--pink);
  border: 1px solid rgba(255,0,102,0.3);
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: 8px;
  vertical-align: middle;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── Buy row ──────────────────────────────────────────────────── */
.buy-row { display: flex; gap: 10px; align-items: stretch; }
.buy-row .buy, .buy-row .try-free { flex: 1; }

button.buy, a.buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pink);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
button.buy:hover, a.buy:hover { background: #cc0052; }
button.buy:disabled { background: #5a2a40; cursor: wait; }

a.more-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid rgba(255,0,102,0.4);
  color: var(--pink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
a.more-info:hover { background: rgba(255,0,102,0.1); border-color: var(--pink); color: #fff; }

button.try-free, a.try-free {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid rgba(138,107,200,0.5);
  color: var(--purple-viv);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
button.try-free:hover, a.try-free:hover { background: rgba(138,107,200,0.12); border-color: var(--purple-viv); color: #fff; }

.btn-neutral { border-color: rgba(255,255,255,0.2) !important; color: rgba(255,255,255,0.75) !important; }
.btn-neutral:hover { background: rgba(255,255,255,0.06) !important; border-color: rgba(255,255,255,0.45) !important; color: #fff !important; }

/* ── Download modal ───────────────────────────────────────────── */
.dl-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.dl-modal-overlay[hidden] { display: none; }
.dl-modal-box {
  position: relative;
  background: var(--panel-deep);
  border: 1px solid var(--border-hi);
  border-radius: var(--r);
  box-shadow: var(--shadow), 0 0 60px rgba(255,0,102,0.12);
  padding: 32px 28px 28px;
  max-width: 480px;
  width: 100%;
}
.dl-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s;
}
.dl-modal-close:hover { color: #fff; }
.dl-modal-title { font-size: 1.2rem; margin-bottom: 4px; }
.dl-modal-sub { color: var(--muted); font-size: .82rem; margin-bottom: 22px; }
.dl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dl-col h3 { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.dl-col { display: flex; flex-direction: column; gap: 8px; }
.dl-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 14px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  gap: 4px;
  transition: background 0.2s, border-color 0.2s;
}
.dl-btn * { text-decoration: none; }
}
.dl-os { font-size: 1rem; font-weight: 700; }
.dl-formats { font-size: .72rem; font-weight: 400; color: var(--muted); }
a.dl-btn:hover { background: rgba(176,112,255,0.15); border-color: var(--purple-viv); }
a.dl-btn:hover .dl-formats { color: rgba(255,255,255,0.7); }
.dl-soon {
  color: var(--muted);
  cursor: default;
}
.dl-soon .dl-os { color: var(--muted); }
.dl-soon em { font-size: .72rem; font-weight: 400; font-style: normal; color: var(--muted-lo); }
@media (max-width: 440px) { .dl-cols { grid-template-columns: 1fr; } }

.buy-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.buy-meta strong { color: var(--muted); }

/* ── Misc ─────────────────────────────────────────────────────── */
.err { color: #ff6699; font-size: 13px; margin-top: 8px; min-height: 16px; }

footer {
  margin-top: 64px;
  color: var(--muted-lo);
  font-size: 12px;
  text-align: center;
}
footer a { color: var(--muted); }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 940px) { .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 760px) { .proof-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .g2, .g3 { grid-template-columns: 1fr; }
  body.shop { padding: 24px 14px 48px; }
  .card, .inner { padding: 14px; }
}
@media (max-width: 520px) {
  .card-inner { flex-direction: column; }
  .card-thumb { width: 100%; }
}
