/* ============================================================
   iGroove.Live — brand styles (white · black · gold)
   ============================================================ */
:root {
  --bg: #FFFFFF;
  --ink: #0B0B0B;
  --ink-2: #3D3A33;
  --muted: #6B6558;
  --gold: #D4A64A;        /* fills: buttons, badges, bars */
  --gold-ink: #8A6516;    /* gold text on white */
  --gold-soft: #FBF3DF;   /* tinted chips */
  --card: #F7F4EC;
  --soft: #F3EEE2;
  --line: #E6DFCD;
  --ok: #1E7B3A;  --ok-soft: #E4F3E8;
  --bad: #A3261E; --bad-soft: #FBE6E4;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(11, 11, 11, .08);
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  --tabbar: 68px;
  --dock: 0px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; margin: 0; line-height: 1.05; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Logo */
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -.02em; }
.logo-img { height: 26px; width: auto; display: block; }
.logo .tag { font-family: var(--body); font-size: 10px; font-weight: 700; letter-spacing: 2px; padding: 3px 6px; border-radius: 5px; background: var(--gold); color: var(--ink); }

/* ---------- Header */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled { border-color: var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.nav { display: none; gap: 28px; font-size: 15px; }
.nav a { padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a.on { border-color: var(--gold); font-weight: 700; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: transparent; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 0; font-weight: 700; font-size: 16px; white-space: nowrap; transition: transform .08s, filter .15s, background .15s; }
.btn:active { transform: scale(.98); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #262420; }
.btn-soft { background: var(--soft); color: var(--ink); }
.btn-soft:hover { background: #ECE5D4; }
.btn-line { background: transparent; border: 1px solid var(--ink); color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-lg { min-height: 56px; font-size: 17px; padding: 0 30px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link-gold { color: var(--gold-ink); font-weight: 700; }

/* ---------- Common bits */
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--gold-ink); text-transform: uppercase; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(212,166,74,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(212,166,74,0); } 100% { box-shadow: 0 0 0 0 rgba(212,166,74,0); } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } * { scroll-behavior: auto !important; } }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; background: var(--gold-soft); color: var(--gold-ink); }
.badge-ink { background: var(--ink); color: #fff; }
.badge-gold { background: var(--gold); color: var(--ink); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.section { padding-top: 40px; padding-bottom: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: 26px; }
.page-head { padding-top: 28px; padding-bottom: 8px; }
.page-head h1 { font-size: clamp(34px, 6vw, 56px); }
.page-head p { color: var(--ink-2); max-width: 640px; margin: 12px 0 0; font-size: 17px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.skeleton { background: linear-gradient(90deg, var(--card), #EFE9DB, var(--card)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 14px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Waveform backdrop */
.wave { position: absolute; left: 0; right: 0; pointer-events: none; display: flex; align-items: center; gap: 4px; overflow: hidden; opacity: .55; }
.wave i { flex: 1 0 5px; max-width: 7px; border-radius: 4px; background: var(--gold); opacity: .35; }

/* ---------- Hero */
.hero { position: relative; overflow: hidden; padding: 24px 0 36px; }
.hero .wave { bottom: 10px; height: 130px; }
.hero-grid { position: relative; display: grid; gap: 28px; }
.hero h1 { font-size: clamp(44px, 8.5vw, 88px); line-height: .98; margin: 14px 0 16px; }
.hero h1 em { font-style: normal; color: var(--gold-ink); }
.hero p.lede { font-size: 17px; color: var(--ink-2); max-width: 580px; margin: 0 0 24px; }
.hero-ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-ctas .btn-gold { grid-column: 1 / -1; }

.now-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.now-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--muted); }
.now-main { display: flex; gap: 16px; align-items: center; }
.art { width: 84px; height: 84px; border-radius: 16px; flex-shrink: 0; background: var(--ink); display: grid; place-items: center; overflow: hidden; }
.art img { width: 100%; height: 100%; object-fit: cover; }
.bars { display: flex; gap: 3px; align-items: flex-end; height: 34px; }
.bars span { width: 5px; background: var(--gold); border-radius: 3px; animation: eq 1s ease-in-out infinite; }
.bars span:nth-child(2) { animation-delay: .2s } .bars span:nth-child(3) { animation-delay: .45s } .bars span:nth-child(4) { animation-delay: .1s } .bars span:nth-child(5) { animation-delay: .35s }
@keyframes eq { 0%,100% { height: 20% } 50% { height: 100% } }
.paused .bars span { animation-play-state: paused; }

/* ---------- Event cards */
.events { display: grid; gap: 14px; }
.event-card { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.event-card:hover { border-color: var(--gold); }
.datebox { width: 64px; height: 64px; border-radius: 14px; background: var(--gold); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.datebox b { font-family: var(--display); font-size: 24px; line-height: 1; }
.datebox small { font-size: 11px; font-weight: 700; letter-spacing: 1px; }
.event-card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.event-card .t { font-weight: 700; font-size: 17px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event-card .v { font-size: 14px; color: var(--ink-2); }
.event-card .p { font-size: 14px; font-weight: 700; color: var(--gold-ink); }
.pay-note { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-top: 12px; }

/* ---------- Clips row + feed */
.clip-row { display: grid; grid-auto-flow: column; grid-auto-columns: 42%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.clip-row::-webkit-scrollbar { display: none; }
.clip-tile { position: relative; aspect-ratio: 9/16; border-radius: 18px; overflow: hidden; background: var(--ink); scroll-snap-align: start; color: #fff; }
.clip-tile video, .clip-tile img { width: 100%; height: 100%; object-fit: cover; }
.clip-tile .meta { position: absolute; inset: auto 0 0 0; padding: 12px; background: linear-gradient(transparent, rgba(0,0,0,.75)); font-size: 13px; }
.clip-tile .meta b { display: block; font-size: 15px; }
.clip-tile .badge { position: absolute; top: 10px; left: 10px; }
.play-ico { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 52px; height: 52px; border-radius: 50%; background: rgba(212,166,74,.95); display: grid; place-items: center; color: var(--ink); }

.feed { height: calc(100dvh - 72px - var(--tabbar) - var(--dock)); overflow-y: auto; scroll-snap-type: y mandatory; background: var(--ink); border-radius: 0; }
.feed-item { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; }
.feed-item video { height: 100%; width: 100%; max-width: 560px; object-fit: cover; background: #000; }
.feed-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 20px 24px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.85)); max-width: 560px; margin: 0 auto; }
.feed-overlay h3 { font-size: 22px; }
.feed-overlay p { margin: 6px 0 14px; color: #E7E2D6; font-size: 15px; }
.feed-top { position: absolute; top: 14px; left: 0; right: 0; max-width: 560px; margin: 0 auto; padding: 0 16px; display: flex; justify-content: space-between; align-items: center; }
.mute-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; }

/* ---------- Playlists */
.playlists { display: grid; gap: 14px; }
.pl-card { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.pl-cover { width: 72px; height: 72px; border-radius: 14px; background: var(--ink); color: var(--gold); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 26px; flex-shrink: 0; overflow: hidden; }
.pl-cover img { width: 100%; height: 100%; object-fit: cover; }
.pl-card .info { flex: 1; min-width: 0; }
.pl-card h3 { font-size: 18px; }
.pl-card p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.round-play { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--gold); color: var(--ink); display: grid; place-items: center; flex-shrink: 0; }

/* ---------- Player dock (persists across pages) */
.dock { position: fixed; left: 0; right: 0; bottom: var(--tabbar); z-index: 45; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0,0,0,.06); }
.dock[hidden] { display: none; }
.dock .wrap { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
.dock-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.dock-head b { font-size: 14px; }
.dock iframe { width: 100%; border: 0; border-radius: 12px; background: var(--card); }
.dock .dock-empty { padding: 10px 12px; border-radius: 10px; background: var(--card); color: var(--ink-2); font-size: 13px; line-height: 1.4; }

/* ---------- Chart */
.chart { display: flex; flex-direction: column; gap: 10px; }
.chart-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.chart-row .pos { font-family: var(--display); font-weight: 700; font-size: 26px; text-align: center; }
.chart-row:nth-child(-n+3) .pos { color: var(--gold-ink); }
.chart-row .move { font-size: 12px; font-weight: 700; }
.up { color: var(--ok); } .down { color: var(--bad); } .new { color: var(--gold-ink); }
.vote-btn { min-width: 84px; }
.vote-btn.voted { background: var(--gold-soft); color: var(--gold-ink); }

/* ---------- Forms */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 14px; }
.field .hint { font-size: 13px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 16px; }
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,166,74,.25); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--ink); flex-shrink: 0; }
.err { color: var(--bad); font-size: 14px; font-weight: 600; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; }
.seg button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.grid-2 { display: grid; gap: 16px; }

/* ---------- Event page + checkout */
.ev-hero { position: relative; border-radius: 24px; overflow: hidden; background: var(--ink); color: #fff; min-height: 260px; display: flex; align-items: flex-end; }
.ev-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.ev-hero .ev-hero-in { position: relative; padding: 24px; width: 100%; }
.ev-hero h1 { font-size: clamp(32px, 6vw, 56px); margin: 10px 0 6px; }
.ev-hero .wave { bottom: 0; height: 90px; opacity: .6; }
.ev-layout { display: grid; gap: 24px; margin-top: 24px; }
.facts { display: grid; gap: 10px; }
.fact { display: flex; gap: 12px; align-items: flex-start; }
.fact svg { flex-shrink: 0; margin-top: 2px; color: var(--gold-ink); }
.tt { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: #fff; }
.tt + .tt { margin-top: 10px; }
.tt .info { flex: 1; }
.tt .n { font-weight: 700; }
.tt .d { font-size: 13px; color: var(--muted); }
.tt .pr { font-weight: 700; color: var(--gold-ink); }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 20px; line-height: 1; display: grid; place-items: center; }
.stepper output { min-width: 26px; text-align: center; font-weight: 700; }
.summary { padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 8px; font-size: 15px; }
.summary .row { display: flex; justify-content: space-between; gap: 10px; }
.summary .total { font-weight: 700; font-size: 18px; border-top: 1px solid var(--line); padding-top: 10px; }
.buy-panel { position: sticky; top: 90px; display: grid; gap: 14px; }

/* ---------- Tickets */
.ticket { background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); max-width: 420px; }
.ticket-top { background: var(--ink); color: #fff; padding: 18px 20px; }
.ticket-top h3 { font-size: 22px; margin-top: 8px; }
.ticket-mid { padding: 20px; display: grid; justify-items: center; gap: 10px; }
.ticket-mid .qr { width: 220px; height: 220px; }
.ticket-mid .qr svg, .ticket-mid .qr img { width: 100%; height: 100%; }
.ticket-code { font-family: ui-monospace, Menlo, monospace; font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.ticket-cut { border-top: 2px dashed var(--line); margin: 0 18px; }
.ticket-bot { padding: 14px 20px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 13px; }
.ticket-bot b { display: block; font-size: 15px; }
.ticket.used { opacity: .6; }
.tickets-list { display: grid; gap: 18px; justify-items: center; }

/* ---------- Promote */
.packages { display: grid; gap: 14px; }
.pkg { padding: 22px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.pkg h3 { font-size: 21px; }
.pkg ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 15px; }
.pkg .price { font-family: var(--display); font-weight: 700; font-size: 22px; }
.pkg.best { background: var(--ink); color: #fff; border-color: var(--ink); }
.pkg.best ul { color: #D9D4C7; }

/* ---------- Footer */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 30px 0 calc(var(--tabbar) + var(--dock) + 30px); font-size: 14px; color: var(--ink-2); }
.footer .cols { display: grid; gap: 20px; }
.footer a { display: block; padding: 4px 0; }
.demo-bar { background: var(--ink); color: #fff; font-size: 13px; text-align: center; padding: 8px 12px; }
.demo-bar b { color: var(--gold); }

/* ---------- Mobile tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: var(--tabbar); background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); }
.tabbar a.on { color: var(--ink); }
.tabbar a.on svg { color: var(--gold-ink); }

/* ---------- Sheet / modal */
.sheet-bg { position: fixed; inset: 0; z-index: 80; background: rgba(11,11,11,.5); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto; border-radius: 24px 24px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); }
.sheet h2 { font-size: 24px; margin-bottom: 6px; }
.menu-links { display: grid; gap: 4px; margin-top: 12px; }
.menu-links a { padding: 14px 12px; border-radius: 12px; font-weight: 600; font-size: 17px; }
.menu-links a:hover { background: var(--card); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + var(--dock) + 16px); z-index: 90; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

.prose { max-width: 720px; color: var(--ink-2); }
.prose h2 { font-size: 24px; margin: 28px 0 10px; color: var(--ink); }
.prose p, .prose li { font-size: 16px; }

/* ---------- Larger screens */
@media (min-width: 700px) {
  .clip-row { grid-auto-columns: 23%; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .packages { grid-template-columns: repeat(2, 1fr); }
  .playlists { grid-template-columns: 1fr 1fr; }
  .footer .cols { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .hero-ctas { display: flex; flex-wrap: wrap; }
  .hero-ctas .btn-gold { grid-column: auto; }
}
@media (min-width: 960px) {
  :root { --tabbar: 0px; }
  .tabbar { display: none; }
  .nav { display: flex; }
  .menu-btn { display: none; }
  .hero { padding: 40px 0 70px; }
  .hero-grid { grid-template-columns: 1.25fr .9fr; align-items: center; gap: 56px; }
  .events.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .ev-layout { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .packages { grid-template-columns: repeat(3, 1fr); }
  .sheet-bg { align-items: center; }
  .sheet { border-radius: 24px; }
  .clip-row { grid-auto-columns: 18%; }
  .feed { border-radius: 24px; margin-top: 12px; height: calc(100dvh - 120px - var(--dock)); }
}
body.on-clips .footer { display: none; }

/* ---------- Fixes: let grid/flex children shrink on small screens */
.hero-grid > *, .events > *, .ev-layout > *, .playlists > *, .packages > * { min-width: 0; }
@media (max-width: 699px) {
  .hero-ctas .btn { padding: 0 14px; font-size: 15px; }
  .hero-ctas .btn-gold { font-size: 17px; }
}
.feed-item { overflow: hidden; }
.feed-item video { position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: 0 auto; height: 100%; width: 100%; max-width: 560px; object-fit: cover; }

@media (max-width: 699px) { .demo-bar .long { display: none; } }

/* Header on phones: keep the logo clear of the buttons */
.topbar .logo, .top-actions { flex-shrink: 0; }
.mt-ico { display: none; }
@media (max-width: 459px) {
  .topbar .wrap { gap: 10px; }
  #myTicketsBtn { width: 44px; min-height: 44px; height: 44px; padding: 0; border-radius: 12px; }
  #myTicketsBtn .mt-ico { display: block; }
  #myTicketsBtn .mt-txt { display: none; }
  .top-actions { gap: 8px; }
}
@media (max-width: 359px) { .logo-img { height: 22px; } .logo .tag { display: none; } }
