/* Homepage insight sections: marquee, performance dashboard, Reddit listening, numbers bento. */

/* Marquee */
.marquee { background: var(--lime); color: var(--ink); overflow: hidden; border-block: 1px solid var(--ink); }
.marquee-track { display: flex; align-items: center; gap: 28px; width: max-content; padding: 18px 0; font: 300 clamp(22px, 2.4vw, 32px)/1 var(--serif); animation: marquee 40s linear infinite; }
.marquee-track b { font: 400 20px/1 var(--sans); color: var(--violet); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Dashboard */
.dash-section { position: relative; }
.dash-section::before { content: ""; position: absolute; inset: 55% 0 auto; height: 60%; z-index: -1; background: radial-gradient(ellipse at 20% 40%, rgba(109,74,255,.16), transparent 55%), radial-gradient(ellipse at 80% 60%, rgba(255,122,198,.16), transparent 55%); }
.dash { position: relative; margin-top: 56px; width: 100%; max-width: 1240px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 20px; text-align: left; box-shadow: 0 40px 100px rgba(75,47,214,.16); }
.dash-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 4px 4px 18px; }
.dash-title { display: flex; align-items: center; gap: 12px; }
.dash-title strong { display: block; font-weight: 500; }
.dash-title small { color: var(--ink-soft); font-size: 13px; }
.dash-logo { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 500; color: var(--ink); background: linear-gradient(135deg, var(--lime), var(--pink)); }
.seg { display: inline-flex; background: var(--paper-2); border-radius: 99px; padding: 3px; }
.seg button { font: inherit; font-size: 13px; border: 0; background: none; color: var(--ink-soft); padding: 6px 14px; border-radius: 99px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.kpi { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 4px; background: #fcfbfe; }
.kpi span { font-size: 12px; color: var(--ink-soft); }
.kpi strong { font: 300 30px/1.1 var(--serif); }
.kpi em { font-style: normal; font-size: 12px; color: var(--ink-soft); }
.kpi em.up::first-letter { color: var(--teal); }
.kpi:first-child { background: var(--violet); border-color: var(--violet); color: #fff; }
.kpi:first-child span, .kpi:first-child em { color: rgba(255,255,255,.82); }
.kpi:first-child em.up::first-letter { color: var(--lime); }

.dash-grid { margin-top: 10px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; }
.card { margin: 0; border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--card); min-width: 0; }
.card figcaption { display: grid; gap: 2px; margin-bottom: 12px; }
.card figcaption strong { font-weight: 500; font-size: 14px; }
.card figcaption small { color: var(--ink-soft); font-size: 12px; }
.chart svg, .stack svg { display: block; width: 100%; height: auto; overflow: visible; }
.axis text { font: 11px var(--sans); fill: var(--ink-soft); }
.grid-line { stroke: #efeaf3; stroke-width: 1; }
.table-view { margin-top: 8px; font-size: 12px; color: var(--ink-soft); }
.table-view summary { cursor: pointer; }
.table-view table { margin-top: 6px; border-collapse: collapse; width: 100%; }
.table-view td, .table-view th { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }

.heat { display: grid; grid-template-columns: 64px repeat(6, 1fr); gap: 2px; font-size: 11px; }
.heat span { color: var(--ink-soft); display: flex; align-items: center; }
.heat .h { text-align: center; justify-content: center; }
.heat i { aspect-ratio: 1.6; border-radius: 4px; display: grid; place-items: center; font-style: normal; font-size: 10px; cursor: default; }
.heat-scale { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-soft); }
.heat-scale i { flex: 1; height: 6px; border-radius: 99px; background: linear-gradient(90deg, #efeaff, #6d4aff, #2b1a8c); }

.funnel { display: grid; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: 10px; font-size: 12px; }
.funnel-row span { color: var(--ink-soft); }
.funnel-row b { height: 22px; border-radius: 0 4px 4px 0; background: var(--violet); }
.funnel-row em { font-style: normal; text-align: right; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-soft); margin-bottom: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.pos { background: var(--teal); }
.neu { background: #c9c3d6; }
.neg { background: var(--tangerine); }

.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--paper); font-size: 12px; line-height: 1.4; padding: 8px 10px; border-radius: 8px; box-shadow: 0 10px 30px rgba(23,18,46,.3); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); }
.tip b { font-weight: 500; }

/* Reddit listening */
.listen { margin-top: clamp(96px, 11vw, 160px); padding: clamp(80px, 9vw, 120px) var(--pad); background: linear-gradient(160deg, #ff7ac6 0%, #ff5a1f 55%, #ff8a3d 100%); color: var(--ink); border-radius: 36px; margin-inline: clamp(8px, 1.4vw, 20px); position: relative; overflow: hidden; }
.listen::after { content: ""; position: absolute; width: 520px; height: 520px; right: -200px; bottom: -220px; border-radius: 50%; border: 80px solid rgba(212,255,58,.35); pointer-events: none; }
.listen > * { position: relative; z-index: 1; }
.listen-head { text-align: center; display: grid; justify-items: center; }
.listen .eyebrow { background: var(--ink); color: var(--lime); }
.listen .lede { color: rgba(23,18,46,.82); max-width: 52ch; }
.listen .fine { text-align: center; color: rgba(23,18,46,.75); }
.listen-grid { margin: 56px auto 0; max-width: 1240px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; align-items: start; }
.feed { display: grid; gap: 12px; }
.post { background: var(--card); border-radius: 16px; padding: 16px 18px; box-shadow: 0 16px 40px rgba(23,18,46,.14); transition: transform .3s; }
.post:hover { transform: translateY(-3px) rotate(-.3deg); }
.post header { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 12px; }
.sub { font-weight: 500; }
.sub::before { content: ""; display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: var(--tangerine); vertical-align: -3px; margin-right: 6px; }
.tag { border-radius: 99px; padding: 2px 9px; font-size: 11px; font-weight: 500; color: var(--ink); }
.post p { margin: 10px 0; font-size: 15px; line-height: 1.45; }
.post footer { font-size: 12px; color: var(--ink-soft); }
.post footer b { font-weight: 500; color: var(--ink); }
.themes { display: grid; gap: 12px; }
.themes .card { border: 0; box-shadow: 0 16px 40px rgba(23,18,46,.14); border-radius: 16px; }
.theme-bars { display: grid; gap: 10px; margin-bottom: 12px; }
.theme-row { display: grid; grid-template-columns: 118px 1fr 42px; gap: 10px; align-items: center; font-size: 12px; }
.theme-row .bar { display: flex; gap: 2px; height: 18px; }
.theme-row .bar i { height: 100%; }
.theme-row .bar i:first-child { border-radius: 4px 0 0 4px; }
.theme-row .bar i:last-child { border-radius: 0 4px 4px 0; }
.theme-row em { font-style: normal; text-align: right; color: var(--ink-soft); }
.verdict { background: var(--ink); color: var(--paper); border-radius: 16px; padding: 18px 20px; }
.verdict-heading { font: 500 16px/1.4 var(--sans); color: var(--paper); }
.verdict p { margin-top: 10px; font: 300 22px/1.3 var(--serif); }
.framework { list-style: none; margin: 16px auto 0; padding: 0; max-width: 1240px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.framework li { background: rgba(255,255,255,.9); border-radius: 16px; padding: 20px; border-top: 6px solid var(--tone); }
.framework span { font-size: 12px; color: var(--ink-soft); }
.framework h3 { margin: 6px 0 8px; font: 300 28px/1.1 var(--serif); }
.framework p { font-size: 14px; color: var(--ink-soft); }

/* Numbers bento */
.bento { margin-top: 56px; width: 100%; max-width: 1240px; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 180px; grid-auto-flow: dense; gap: 12px; text-align: left; }
.tile { border-radius: 20px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; position: relative; transition: transform .3s; }
.tile:hover { transform: translateY(-4px); }
.tile strong { font: 300 clamp(40px, 4vw, 56px)/1 var(--serif); }
.tile span { font-size: 14px; max-width: 24ch; }
.t-big { grid-column: span 2; grid-row: span 2; }
.t-big strong { font-size: clamp(72px, 9vw, 132px); }
.t-violet { background: var(--violet); color: #fff; }
.t-lime { background: var(--lime); color: var(--ink); }
.t-pink { background: var(--pink); color: var(--ink); }
.t-tangerine { background: var(--tangerine); color: var(--ink); }
.t-ink { background: var(--ink); color: var(--paper); }
.t-ink strong { color: var(--lime); }
.t-paper { background: var(--card); border: 1px solid var(--line); }
.t-paper span { color: var(--ink-soft); }
.t-wide { grid-column: 1 / -1; flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 24px; }
.t-wide span { text-align: right; }
.t-photo { grid-row: span 2; padding: 0; color: #fff; justify-content: flex-end; }
.t-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.t-photo::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(23,18,46,.8)); }
.t-photo span { position: relative; z-index: 1; padding: 22px; font: 300 22px/1.25 var(--serif); max-width: none; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .dash-grid, .listen-grid { grid-template-columns: 1fr; }
  .framework, .bento { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .dash { padding: 12px; border-radius: 16px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi strong { font-size: 26px; }
  .listen { border-radius: 24px; }
  .framework { grid-template-columns: 1fr; }
  .bento { grid-auto-rows: 150px; }
  .t-big { grid-column: span 2; grid-row: span 1; }
  .t-big strong { font-size: 64px; }
  .t-photo { grid-column: span 2; }
  .theme-row { grid-template-columns: 96px 1fr 36px; }
  .funnel-row { grid-template-columns: 92px 1fr 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .post, .tile { transition: none; }
}
