/* ═══════════════════════════════════════
   CINEMAIQ — STYLESHEET
   Cinematic dark luxury aesthetic
═══════════════════════════════════════ */

:root {
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --gold-dim: #8a6e2a;
  --bg: #080a0f;
  --bg2: #0d1018;
  --bg3: #111520;
  --card: #13161f;
  --card2: #181c28;
  --border: #1e2235;
  --border2: #252a3a;
  --text: #e8e6df;
  --text2: #9ca3af;
  --text3: #6b7280;
  --red: #e05555;
  --green: #4ade80;
  --blue: #4f9cf9;
  --amber: #f8a93e;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 24px 64px rgba(0,0,0,0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }

/* ── NAV ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(8,10,15,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex; align-items: center; gap: 32px;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700;
  color: var(--text); text-decoration: none;
  white-space: nowrap;
}
.nav-logo span { color: var(--gold); }

.nav-links {
  display: flex; gap: 24px; flex: 1;
}
.nav-links a {
  color: var(--text3); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--gold); }

.nav-cta {
  background: var(--gold); color: #000;
  border: none; border-radius: 6px;
  padding: 8px 18px; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--gold-light); }

.nav-burger {
  display: none; background: none; border: none;
  color: var(--text); font-size: 22px; cursor: pointer;
  margin-left: auto;
}

.nav-mobile {
  display: none; flex-direction: column;
  padding: 12px 24px 16px;
  border-top: 1px solid var(--border);
  background: rgba(8,10,15,0.98);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  color: var(--text2); text-decoration: none;
  padding: 10px 0; font-size: 15px;
  border-bottom: 1px solid var(--border);
}
.nav-mobile a:last-child { border-bottom: none; }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  padding: 100px 24px 60px;
  text-align: center;
}

.hero-bg {
  position: absolute; inset: 0;
  pointer-events: none;
}

.hero-glow {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.15;
}
.g1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #c9a84c, transparent);
  top: -200px; left: -200px;
  animation: drift1 12s ease-in-out infinite alternate;
}
.g2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #1a3a6a, transparent);
  bottom: -100px; right: -100px;
  animation: drift2 15s ease-in-out infinite alternate;
}

@keyframes drift1 { from { transform: translate(0,0); } to { transform: translate(60px, 40px); } }
@keyframes drift2 { from { transform: translate(0,0); } to { transform: translate(-40px, -30px); } }

.grain {
  position: absolute; inset: 0; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.hero-content { position: relative; z-index: 1; max-width: 700px; }

.hero-badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 99px; padding: 6px 16px; margin-bottom: 24px;
  animation: fadeUp 0.8s ease both;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(48px, 10vw, 88px);
  font-weight: 900; line-height: 1.0;
  color: var(--text); margin-bottom: 24px;
  animation: fadeUp 0.8s 0.15s ease both;
}
.hero-title .gold {
  color: var(--gold);
  font-style: italic;
}

.hero-sub {
  font-size: 17px; font-weight: 300;
  color: var(--text2); max-width: 560px;
  margin: 0 auto 36px; line-height: 1.7;
  animation: fadeUp 0.8s 0.3s ease both;
}

.hero-btns {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 48px;
  animation: fadeUp 0.8s 0.45s ease both;
}

.btn-primary {
  background: var(--gold); color: #000;
  padding: 14px 28px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600;
  text-decoration: none; transition: all 0.2s;
  display: inline-block;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }

.btn-ghost {
  background: transparent; color: var(--text2);
  padding: 14px 28px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500;
  text-decoration: none; border: 1px solid var(--border2);
  transition: all 0.2s; display: inline-block;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.hero-stats {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  animation: fadeUp 0.8s 0.6s ease both;
}
.stat { text-align: center; }
.stat span {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 28px; font-weight: 700; color: var(--gold);
}
.stat { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-div { width: 1px; height: 36px; background: var(--border2); }

.hero-scroll {
  position: absolute; bottom: 24px;
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 0.1em;
  color: var(--text3); text-transform: uppercase;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── SECTION PILLS ── */
.section-pills {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center; padding: 16px 24px;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  position: sticky; top: 60px; z-index: 50;
}

.pill {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 0.06em;
  color: var(--text3); text-decoration: none;
  padding: 6px 14px; border-radius: 99px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.pill:hover { color: var(--gold); border-color: var(--gold); }

/* ── SECTIONS ── */
.section { padding: 80px 24px; }
.section-alt { background: var(--bg2); }
.section-inner { max-width: 960px; margin: 0 auto; }

.section-header { margin-bottom: 48px; }
.section-tag {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 900; line-height: 1.1;
  margin-bottom: 16px;
}
.section-header h2 .gold { color: var(--gold); font-style: italic; }
.section-sub { font-size: 16px; color: var(--text2); font-weight: 300; max-width: 560px; line-height: 1.7; }

/* ── CALC CARD ── */
.calc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.calc-inputs {
  padding: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  border-bottom: 1px solid var(--border);
}

.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-group.full { grid-column: 1 / -1; }

.input-group label {
  font-size: 12px; font-weight: 500;
  color: var(--text3); text-transform: uppercase;
  letter-spacing: 0.08em;
}

.input-row {
  display: flex; align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}
.input-row:focus-within { border-color: var(--gold); }

.input-row input,
.input-row select {
  flex: 1; background: transparent; border: none;
  color: var(--text); font-family: 'DM Sans', sans-serif;
  font-size: 16px; font-weight: 500;
  padding: 10px 14px; outline: none;
  -webkit-appearance: none;
}
.input-row select { cursor: pointer; }
.input-row select option { background: var(--bg3); color: var(--text); }

.unit {
  padding: 0 14px 0 0;
  font-family: 'DM Mono', monospace;
  font-size: 12px; color: var(--text3);
  white-space: nowrap;
}

.calc-btn {
  grid-column: 1 / -1;
  background: var(--gold); color: #000;
  border: none; border-radius: var(--radius-sm);
  padding: 14px 28px; font-size: 15px; font-weight: 600;
  cursor: pointer; width: 100%;
  transition: all 0.2s; font-family: 'DM Sans', sans-serif;
}
.calc-btn:hover { background: var(--gold-light); transform: translateY(-1px); }
.calc-btn:active { transform: translateY(0); }

/* ── RESULTS ── */
.calc-results { padding: 32px; }

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin-bottom: 24px;
}

.result-card {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 18px 14px; text-align: center;
  transition: border-color 0.2s;
}
.result-card:hover { border-color: var(--gold-dim); }

.result-icon { font-size: 22px; margin-bottom: 8px; }

.result-val {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700;
  color: var(--gold); margin-bottom: 4px;
  line-height: 1.2;
}

.result-lbl {
  font-size: 11px; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.08em;
}

.result-tips {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 14px; color: var(--text2);
  line-height: 1.7;
}
.result-tips:empty { display: none; }

/* ── PRODUCT RECS ── */
.product-recs {
  margin-top: 20px;
}
.product-recs h4 {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.rec-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  gap: 12px;
}
.rec-name { font-size: 14px; font-weight: 500; flex: 1; }
.rec-price { font-family: 'DM Mono', monospace; font-size: 13px; color: var(--gold); white-space: nowrap; }
.rec-link {
  font-size: 12px; color: var(--blue); text-decoration: none;
  padding: 4px 10px; border: 1px solid var(--blue);
  border-radius: 4px; transition: all 0.2s; white-space: nowrap;
}
.rec-link:hover { background: var(--blue); color: #000; }

/* ── SPEAKER DIAGRAM ── */
.speaker-diagram {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px; margin-bottom: 20px;
  font-size: 14px;
}

.spk-room {
  position: relative;
  border: 2px solid var(--border2);
  border-radius: 8px;
  padding: 20px;
  min-height: 200px;
  display: flex; align-items: center; justify-content: center;
}

.spk-screen {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  background: var(--border2); color: var(--text3);
  font-family: 'DM Mono', monospace; font-size: 11px;
  padding: 4px 20px; border-radius: 4px;
  white-space: nowrap;
}

.spk-item {
  position: absolute;
  font-size: 11px; text-align: center;
  color: var(--text2);
}
.spk-dot {
  width: 28px; height: 28px;
  background: var(--card2); border: 2px solid var(--gold-dim);
  border-radius: 50%; margin: 0 auto 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.spk-dot.active { border-color: var(--gold); background: rgba(201,168,76,0.1); }

.spk-table { width: 100%; border-collapse: collapse; }
.spk-table th {
  text-align: left; padding: 8px 12px;
  font-family: 'DM Mono', monospace; font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text3); border-bottom: 1px solid var(--border);
}
.spk-table td {
  padding: 10px 12px; font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
}
.spk-table td:first-child { color: var(--gold); font-weight: 500; }
.spk-table tr:last-child td { border-bottom: none; }

/* ── BUDGET ── */
.budget-slider-wrap { position: relative; padding-bottom: 8px; }
.budget-slider-wrap input[type=range] {
  width: 100%; height: 4px;
  background: linear-gradient(to right, var(--gold) 0%, var(--gold) var(--pct, 14%), var(--border2) var(--pct, 14%));
  border-radius: 2px; outline: none; -webkit-appearance: none;
  cursor: pointer;
}
.budget-slider-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  background: var(--gold); border-radius: 50%;
  cursor: pointer; border: 2px solid var(--bg);
}

.budget-display {
  position: absolute; right: 0; top: -36px;
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 700; color: var(--gold);
}

.budget-tier {
  font-family: 'Playfair Display', serif;
  font-size: 28px; font-weight: 700;
  color: var(--gold); margin-bottom: 20px;
  text-align: center;
}

.budget-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px; margin-bottom: 24px;
}

.budget-cat {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px; text-align: center;
}
.budget-cat-icon { font-size: 20px; margin-bottom: 6px; }
.budget-cat-name {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text3); margin-bottom: 4px;
}
.budget-cat-amt {
  font-family: 'DM Mono', monospace;
  font-size: 16px; font-weight: 500; color: var(--gold);
}

.budget-list { display: flex; flex-direction: column; gap: 8px; }
.budget-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.budget-item-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.budget-item-body { flex: 1; }
.budget-item-name { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.budget-item-desc { font-size: 12px; color: var(--text3); line-height: 1.4; }
.budget-item-price {
  font-family: 'DM Mono', monospace;
  font-size: 14px; color: var(--gold);
  white-space: nowrap; font-weight: 500;
  flex-shrink: 0;
}

/* ── VISUALIZER ── */
.visualizer-card { overflow: visible; }

.upload-zone {
  border: 2px dashed var(--border2);
  border-radius: var(--radius);
  padding: 60px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin: 24px;
}
.upload-zone:hover { border-color: var(--gold); background: rgba(201,168,76,0.03); }
.upload-zone.drag { border-color: var(--gold); background: rgba(201,168,76,0.06); }

.upload-icon { font-size: 48px; margin-bottom: 16px; }
.upload-title { font-size: 18px; font-weight: 500; margin-bottom: 8px; }
.upload-sub { font-size: 13px; color: var(--text3); }

.viz-options { padding: 0 24px 24px; }
.viz-option-group { margin-bottom: 20px; }
.viz-option-group label {
  display: block; font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text3); margin-bottom: 10px;
}

.option-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.opt-pill {
  background: var(--bg3); color: var(--text2);
  border: 1px solid var(--border2);
  border-radius: 99px; padding: 7px 14px;
  font-size: 13px; cursor: pointer;
  transition: all 0.2s; font-family: 'DM Sans', sans-serif;
}
.opt-pill:hover { border-color: var(--gold-dim); color: var(--text); }
.opt-pill.active { background: rgba(201,168,76,0.12); border-color: var(--gold); color: var(--gold); }

.viz-btn { margin-top: 8px; }

.viz-result { padding: 24px; }
.viz-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.viz-side { position: relative; }
.viz-label {
  font-family: 'DM Mono', monospace; font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text3); margin-bottom: 8px;
}
.viz-side img, .viz-after-wrap {
  width: 100%; border-radius: var(--radius-sm);
  aspect-ratio: 4/3; object-fit: cover;
  background: var(--bg3);
}
.viz-after-wrap { position: relative; overflow: hidden; }
#viz-after { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.viz-loading {
  position: absolute; inset: 0;
  background: var(--bg3);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
}
.viz-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.viz-loading-text { font-size: 13px; color: var(--text3); }

.viz-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── FOOTER ── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
  text-align: center;
}
.footer-inner { max-width: 700px; margin: 0 auto; }
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 28px; font-weight: 700;
  color: var(--text); margin-bottom: 8px;
}
.footer-logo span { color: var(--gold); }
.footer-tagline { font-size: 14px; color: var(--text3); margin-bottom: 24px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin-bottom: 24px; }
.footer-links a { color: var(--text3); text-decoration: none; font-size: 13px; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
.footer-note { font-size: 11px; color: var(--text3); margin-bottom: 8px; line-height: 1.6; }
.footer-copy { font-size: 11px; color: #374151; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: block; }
  .hero-title { font-size: clamp(40px, 12vw, 64px); }
  .calc-inputs { grid-template-columns: 1fr; padding: 20px; }
  .result-grid { grid-template-columns: repeat(2, 1fr); }
  .viz-compare { grid-template-columns: 1fr; }
  .budget-display { position: static; font-size: 22px; margin-bottom: 8px; }
  .budget-slider-wrap { padding-bottom: 0; }
  .section { padding: 60px 16px; }
  .calc-results { padding: 20px; }
}

@media (max-width: 480px) {
  .result-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 12px; }
  .stat span { font-size: 22px; }
  .option-pills { gap: 6px; }
  .opt-pill { font-size: 12px; padding: 6px 11px; }
}
