/* ============================================================
   Homepage v3 — Animated Showcase + Hero Polish
   Loaded after site.css. Overrides hero layout for the
   showcase monitor and adds cycling frame styles.
   ============================================================ */

/* ── Hero: full-viewport, showcase layout ─────────────────── */
.hp-hero {
  background: var(--mp-primary-900);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--mp-space-24) var(--mp-space-6) calc(var(--mp-space-24) + 20px);
  position: relative;
  overflow: hidden;
}
.hp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 55% at 72% 28%, rgba(212,166,74,0.10) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 18% 78%, rgba(37,116,191,0.14) 0%, transparent 50%);
  pointer-events: none;
}
.hp-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 6px;
  background: repeating-linear-gradient(90deg,
    var(--mp-accent-500) 0, var(--mp-accent-500) 12px,
    transparent 12px, transparent 18px);
}
.hp-hero-inner {
  max-width: var(--mp-max-width);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--mp-space-12);
  align-items: center;
  position: relative;
  z-index: 2;
}
.hp-hero-copy h1 {
  color: #fff;
  font-family: var(--mp-font-display);
  font-weight: 600;
  font-size: clamp(2.75rem, 5.5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.hp-hero-copy h1 em {
  display: block;
  font-style: italic;
  color: var(--mp-accent-400);
}
.hp-hero-copy .gold-rule {
  width: 72px; height: 2px;
  background: var(--mp-accent-400);
  margin: var(--mp-space-6) 0;
}
.hp-hero-copy .lede {
  color: rgba(255,255,255,0.78);
  font-size: var(--mp-text-lg);
  line-height: 1.65;
  max-width: 44ch;
}
.hp-hero-copy .lede strong { color: #fff; font-weight: 600; }
.hp-hero-copy .lede em { font-style: italic; color: var(--mp-accent-400); }
.hp-hero-copy .btn-group {
  display: flex;
  gap: var(--mp-space-4);
  margin-top: var(--mp-space-8);
}
.hp-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--mp-space-2);
  margin-top: var(--mp-space-12);
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: var(--mp-space-6);
}
.hp-stat .s-num {
  font-family: var(--mp-font-display);
  font-weight: 600;
  font-size: var(--mp-text-4xl);
  color: var(--mp-accent-400);
  line-height: 1;
  letter-spacing: -0.02em;
}
.hp-stat .s-num em { font-style: italic; }
.hp-stat .s-label {
  font-family: var(--mp-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.50);
  margin-top: var(--mp-space-2);
  max-width: 18ch;
  line-height: 1.4;
}

/* ── Animated Showcase Monitor ────────────────────────────── */
.showcase { position: relative; width: 100%; }

.showcase-monitor {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--mp-primary-800);
  border-radius: var(--mp-radius-lg);
  padding: 8px;
  box-shadow:
    0 40px 80px -20px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 0 100px rgba(212,166,74,0.06);
  position: relative;
}
.showcase-screen {
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

/* Each cycling frame */
.showcase-frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.showcase-frame.active { opacity: 1; }

/* App chrome bar inside frames */
.sc-bar {
  height: 28px;
  background: linear-gradient(180deg, #FCFAF6, #F4F1E8);
  border-bottom: 1px solid var(--mp-neutral-200);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  font-family: var(--mp-font-mono);
  font-size: 8.5px;
  color: var(--mp-neutral-500);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.sc-bar .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mp-neutral-300); }
.sc-bar .dot.gold { background: var(--mp-accent-500); }
.sc-bar .mod-name { margin-left: 6px; color: var(--mp-neutral-700); font-weight: 600; }
.sc-bar .url {
  margin-left: auto;
  background: rgba(10,37,64,0.04);
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 8px;
  color: var(--mp-neutral-600);
}

/* Frame body (the "app" area) */
.sc-body {
  flex: 1;
  padding: 12px 14px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sc-body .sc-title {
  font-family: var(--mp-font-display);
  font-weight: 600;
  font-size: 11px;
  color: var(--mp-primary-700);
}
.sc-body .sc-subtitle {
  font-family: var(--mp-font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mp-neutral-500);
  margin-top: -4px;
}

/* ── Mini-viz: table rows ─────────────────────────────────── */
.sc-table { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.sc-trow {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.8fr 0.7fr;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  align-items: center;
}
.sc-trow.head { border-bottom-color: var(--mp-neutral-200); }
.sc-tcell {
  height: 5px;
  background: var(--mp-neutral-200);
  border-radius: 2px;
}
.sc-trow.head .sc-tcell { height: 4px; background: var(--mp-neutral-300); }
.sc-tcell.gold { background: var(--mp-accent-400); }
.sc-tcell.blue { background: var(--mp-primary-300); }
.sc-tcell.w80 { width: 80%; }
.sc-tcell.w65 { width: 65%; }
.sc-tcell.w50 { width: 50%; }
.sc-tcell.w40 { width: 40%; }
.sc-tcell.w90 { width: 90%; }

/* ── Mini-viz: bar chart ──────────────────────────────────── */
.sc-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  flex: 1;
  padding-top: 4px;
  border-bottom: 1px solid var(--mp-neutral-200);
}
.sc-vbar {
  flex: 1;
  border-radius: 2px 2px 0 0;
  min-height: 6px;
  background: var(--mp-primary-200);
}
.sc-vbar.dark { background: var(--mp-primary-600); }
.sc-vbar.gold { background: var(--mp-accent-400); }
.sc-vbar.light { background: var(--mp-primary-100); }

/* ── Mini-viz: horizontal bars (leaderboard) ──────────────── */
.sc-hbars { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.sc-hrow {
  display: grid;
  grid-template-columns: 50px 1fr 36px;
  gap: 6px;
  align-items: center;
}
.sc-hrow .lbl { height: 5px; background: var(--mp-neutral-300); border-radius: 2px; }
.sc-hrow .bar { height: 8px; border-radius: 2px; background: var(--mp-primary-300); }
.sc-hrow .bar.gold { background: var(--mp-accent-400); }
.sc-hrow .val { height: 4px; width: 60%; background: var(--mp-neutral-200); border-radius: 2px; }

/* ── Mini-viz: SVG curves ─────────────────────────────────── */
.sc-chart { flex: 1; position: relative; }
.sc-chart svg { width: 100%; height: 100%; }

/* ── Video placeholder hint ───────────────────────────────── */
.showcase-video-hint {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-family: var(--mp-font-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mp-neutral-400);
  pointer-events: none;
  z-index: 5;
}

/* ── Progress indicator ───────────────────────────────────── */
.showcase-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}
.showcase-pip {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.showcase-pip:hover { background: rgba(255,255,255,0.35); }
.showcase-pip.active {
  background: var(--mp-accent-400);
  width: 28px;
  border-radius: 4px;
}
.showcase-info {
  text-align: center;
  margin-top: 6px;
  font-family: var(--mp-font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--mp-accent-400);
  min-height: 20px;
  transition: opacity 0.3s;
}

/* ── Monitor stand ────────────────────────────────────────── */
.showcase-stand {
  width: 26%;
  height: 8px;
  background: linear-gradient(180deg, var(--mp-primary-700), var(--mp-primary-900));
  margin: 0 auto;
  border-radius: 0 0 4px 4px;
}
.showcase-stand::after {
  content: '';
  display: block;
  width: 60%;
  height: 4px;
  background: var(--mp-primary-900);
  margin: 2px auto 0;
  border-radius: 2px;
}

/* ── Scroll cue ───────────────────────────────────────────── */
.hp-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mp-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.50);
  z-index: 3;
  pointer-events: none;
}
.hp-scroll-cue .rail {
  width: 1px; height: 36px;
  background: linear-gradient(to bottom,
    transparent 0%, var(--mp-accent-400) 35%,
    var(--mp-accent-400) 65%, transparent 100%);
  position: relative;
  overflow: hidden;
}
.hp-scroll-cue .rail::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    transparent 0%, rgba(255,255,255,0.85) 45%,
    rgba(255,255,255,0.85) 55%, transparent 100%);
  transform: translateY(-100%);
  animation: hpCue 2.4s cubic-bezier(.55,.1,.25,1) infinite;
}
@keyframes hpCue {
  0%   { transform: translateY(-100%); }
  60%  { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 860px) {
  .hp-hero-inner { grid-template-columns: 1fr; }
  .hp-hero { min-height: auto; padding: var(--mp-space-16) var(--mp-space-6); }
  .showcase { max-width: 560px; margin: var(--mp-space-8) auto 0; }
}
@media (max-width: 600px) {
  .hp-stats { grid-template-columns: 1fr; gap: var(--mp-space-4); }
}
