/* ================================================================
   Kvill -- Mobile Hero State (Redesigned)
   "Sequential Feed" -- vertical card feed matching the real slide view.
   Loads AFTER mobile.css, overrides base hero styles.
   ================================================================ */


/* ----------------------------------------------------------------
   DESIGN TOKENS (hero-specific)
   Warm stone palette for card surfaces and wireframe elements.
   ---------------------------------------------------------------- */

:root {
  --hero-card-bg: #ffffff;
  --hero-card-bg-end: #fafafa;
  --hero-card-border: rgba(0, 0, 0, 0.08);
  --hero-card-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.03),
    0 12px 32px rgba(0, 0, 0, 0.02);

  --hero-title: rgba(0, 0, 0, 0.18);
  --hero-subtitle: rgba(0, 0, 0, 0.12);
  --hero-body: rgba(0, 0, 0, 0.07);
  --hero-bar: rgba(0, 0, 0, 0.14);
  --hero-bar-alt: rgba(0, 0, 0, 0.10);
  --hero-ring-bg: rgba(0, 0, 0, 0.06);
  --hero-ring-fill: rgba(0, 0, 0, 0.14);
  --hero-icon: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  --hero-card-bg: #222225;
  --hero-card-bg-end: #1f1f22;
  --hero-card-border: rgba(255, 255, 255, 0.08);
  --hero-card-shadow: none;

  --hero-title: rgba(160, 160, 170, 0.35);
  --hero-subtitle: rgba(130, 130, 140, 0.22);
  --hero-body: rgba(130, 130, 140, 0.16);
  --hero-bar: rgba(100, 100, 110, 0.40);
  --hero-bar-alt: rgba(100, 100, 110, 0.28);
  --hero-ring-bg: rgba(80, 80, 90, 0.30);
  --hero-ring-fill: rgba(130, 130, 140, 0.35);
  --hero-icon: rgba(100, 100, 110, 0.22);
}


/* ----------------------------------------------------------------
   HERO CONTAINER
   Tight padding -- cards should fill the space, not float in void.
   ---------------------------------------------------------------- */

.m-hero-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 0 8px;
  gap: 10px;
  width: 100%;
  max-width: 100%;
}

.m-hero-state::before {
  display: none;
}


/* ----------------------------------------------------------------
   HERO HINT -- Freestanding text, NOT a pill badge
   ---------------------------------------------------------------- */

.m-hero-hint {
  display: block;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;

  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--text-3);
  text-align: center;

  animation: m-hero-hint-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.05s;
}

.m-hero-hint svg {
  display: none;
}

@keyframes m-hero-hint-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ----------------------------------------------------------------
   DEMO SLIDES CONTAINER -- Sequential vertical feed
   Cards stack vertically with small gap, like the real slide view.
   ---------------------------------------------------------------- */

.m-demo-slides {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  gap: 10px;
  position: relative;
}


/* ----------------------------------------------------------------
   DEMO CARD -- Base styling
   Full-width, warm stone surface, all cards equally visible.
   ---------------------------------------------------------------- */

.m-demo-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    var(--hero-card-bg) 0%,
    var(--hero-card-bg-end) 100%
  );
  border: 1px solid var(--hero-card-border);
  box-shadow: var(--hero-card-shadow);
  overflow: hidden;
  animation: m-hero-card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Specular highlight */
.m-demo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--specular, rgba(255,255,255,0.12));
  z-index: 1;
}

/* Sequential staggered entrance -- all cards fully visible */
.m-demo-card-1 {
  animation-delay: 0.1s;
}

.m-demo-card-2 {
  animation-delay: 0.22s;
}

.m-demo-card-3 {
  animation-delay: 0.34s;
}

@keyframes m-hero-card-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ----------------------------------------------------------------
   HIDE LEGACY ELEMENTS
   ---------------------------------------------------------------- */

.m-demo-card-accent,
.m-demo-card-shine,
.m-demo-card-label,
.m-hero-badge,
.m-hero-tagline {
  display: none;
}


/* ----------------------------------------------------------------
   CARD INNER
   ---------------------------------------------------------------- */

.m-demo-card-inner {
  padding: 12% 10%;
  height: 100%;
  display: flex;
  flex-direction: column;
}


/* ----------------------------------------------------------------
   PLACEHOLDER LINES -- Pill-rounded, warm stone, clear hierarchy
   ---------------------------------------------------------------- */

.m-demo-line {
  border-radius: 100px;
}

.m-demo-title-line {
  width: 58%;
  height: 10px;
  margin-bottom: 8px;
  background: var(--hero-title);
}

.m-demo-subtitle-line {
  width: 38%;
  height: 7px;
  margin-bottom: 0;
  background: var(--hero-subtitle);
}

.m-demo-text-line {
  height: 5px;
  margin-bottom: 5px;
  background: var(--hero-body);
}

.m-demo-text-line:nth-child(2) { width: 90%; }
.m-demo-text-line:nth-child(3) { width: 100%; }
.m-demo-text-line:nth-child(4) { width: 72%; }

.m-demo-text-line.short {
  width: 48%;
}


/* ----------------------------------------------------------------
   CARD 1: BAR CHART
   ---------------------------------------------------------------- */

.m-demo-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  flex: 1;
  min-height: 0;
}

.m-demo-bar {
  flex: 1;
  height: var(--h, 50%);
  border-radius: 4px 4px 0 0;
  background: var(--hero-bar);
  transform-origin: bottom center;
  animation: m-demo-bar-grow 0.6s ease-out both;
}

.m-demo-bar:nth-child(even) {
  background: var(--hero-bar-alt);
}

.m-demo-bar:nth-child(5) {
  background: var(--accent-blue);
  opacity: 0.15;
}

[data-theme="dark"] .m-demo-bar:nth-child(5) {
  opacity: 0.18;
}

.m-demo-bar:nth-child(1) { animation-delay: 0.3s; }
.m-demo-bar:nth-child(2) { animation-delay: 0.4s; }
.m-demo-bar:nth-child(3) { animation-delay: 0.5s; }
.m-demo-bar:nth-child(4) { animation-delay: 0.6s; }
.m-demo-bar:nth-child(5) { animation-delay: 0.7s; }
.m-demo-bar:nth-child(6) { animation-delay: 0.8s; }

@keyframes m-demo-bar-grow {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}


/* ----------------------------------------------------------------
   CARD 2: METRIC RINGS
   ---------------------------------------------------------------- */

.m-demo-metrics {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin: auto 0;
  padding: 4px 0;
}

.m-demo-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.m-demo-metric-ring {
  width: 38px;
  height: 38px;
}

.m-demo-metric-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.m-demo-ring-fill {
  stroke: var(--hero-ring-fill);
  opacity: 1;
  animation: m-demo-ring-draw 1s ease-out both;
  stroke-dashoffset: 97;
}

.m-demo-metric:nth-child(1) .m-demo-ring-fill { animation-delay: 0.4s; }
.m-demo-metric:nth-child(2) .m-demo-ring-fill { animation-delay: 0.6s; }
.m-demo-metric:nth-child(3) .m-demo-ring-fill { animation-delay: 0.8s; }

@keyframes m-demo-ring-draw {
  from { stroke-dashoffset: 97; }
  to   { stroke-dashoffset: 0; }
}

.m-demo-metric-label {
  width: 22px;
  height: 4px;
  border-radius: 100px;
  background: var(--hero-body);
}


/* ----------------------------------------------------------------
   CARD 3: IMAGE/CONTENT BLOCK
   ---------------------------------------------------------------- */

.m-demo-image-block {
  margin-top: auto;
  flex: 1;
  min-height: 0;
}

.m-demo-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 24px;
  border-radius: 10px;
  background: var(--hero-icon);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
}

.m-demo-image-placeholder svg {
  opacity: 0.35;
  width: 20px;
  height: 20px;
}


/* ----------------------------------------------------------------
   REDUCED MOTION
   ---------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .m-demo-card,
  .m-demo-bar,
  .m-demo-ring-fill,
  .m-hero-hint {
    animation: none !important;
  }

  .m-demo-card {
    opacity: 1;
    transform: none;
  }

  .m-demo-bar {
    opacity: 1;
    transform: scaleY(1);
  }

  .m-demo-bar:nth-child(5) {
    opacity: 0.15;
  }

  .m-demo-ring-fill {
    stroke-dashoffset: 0;
  }

  .m-hero-hint {
    opacity: 1;
  }
}


/* ----------------------------------------------------------------
   RESPONSIVE -- 768px+
   ---------------------------------------------------------------- */

@media (min-width: 768px) {

  .m-hero-state {
    padding: 8px 0 16px;
    gap: 14px;
  }

  .m-demo-slides {
    max-width: 600px;
    gap: 12px;
  }

  .m-demo-card {
    border-radius: 14px;
  }

  .m-demo-card-inner {
    padding: 10% 10%;
  }

  .m-demo-title-line {
    height: 12px;
    margin-bottom: 10px;
  }

  .m-demo-chart {
    gap: 10px;
  }

  .m-demo-metric-ring {
    width: 44px;
    height: 44px;
  }

  .m-demo-metrics {
    gap: 22px;
  }

  .m-hero-hint {
    font-size: 14px;
    letter-spacing: 0;
  }
}


/* ----------------------------------------------------------------
   RESPONSIVE -- 1024px+
   ---------------------------------------------------------------- */

@media (min-width: 1024px) {

  .m-hero-state {
    padding: 12px 0 20px;
    gap: 16px;
  }

  .m-demo-slides {
    max-width: 640px;
    gap: 14px;
  }

  .m-demo-card {
    border-radius: 16px;
  }

  .m-demo-card-inner {
    padding: 10% 10%;
  }

  .m-demo-metric-ring {
    width: 48px;
    height: 48px;
  }

  .m-hero-hint {
    font-size: 14px;
    letter-spacing: -0.005em;
  }
}


/* ----------------------------------------------------------------
   RESPONSIVE -- 1440px+
   ---------------------------------------------------------------- */

@media (min-width: 1440px) {

  .m-demo-slides {
    max-width: 760px;
    gap: 16px;
  }

  .m-hero-state {
    padding: 16px 0 24px;
  }
}
