/* ============ Visual modules: GPUs, key numbers, fit cards, chart hover ============ */

/* GPU cards */
.gpu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0 22px; }
.gpu-card {
  border-radius: 14px; padding: 18px 18px 16px; border: 1px solid var(--slate);
  background: linear-gradient(160deg, rgba(42,46,53,.65), rgba(20,22,26,.9));
}
.gpu-card h3 { font-size: 1rem; margin: 14px 0 12px; min-height: 2.4em; }
.gpu-top { display: flex; justify-content: space-between; align-items: center; }

.fans { display: flex; gap: 8px; padding: 8px 10px; border-radius: 8px; background: #0E1013; border: 1px solid var(--slate); }
.fan {
  width: 30px; height: 30px; border-radius: 50%; position: relative;
  background:
    radial-gradient(circle, #2A2E35 0 4px, transparent 5px),
    conic-gradient(from 0deg, rgba(185,181,174,.55) 0 30deg, transparent 30deg 72deg, rgba(185,181,174,.55) 72deg 102deg, transparent 102deg 144deg, rgba(185,181,174,.55) 144deg 174deg, transparent 174deg 216deg, rgba(185,181,174,.55) 216deg 246deg, transparent 246deg 288deg, rgba(185,181,174,.55) 288deg 318deg, transparent 318deg 360deg);
  border: 1px solid #3a3f47;
}
.gpu-card.ok .fan { animation: spin 1.1s linear infinite; background:
    radial-gradient(circle, #2A2E35 0 4px, transparent 5px),
    conic-gradient(from 0deg, rgba(245,165,36,.75) 0 30deg, transparent 30deg 72deg, rgba(245,165,36,.75) 72deg 102deg, transparent 102deg 144deg, rgba(245,165,36,.75) 144deg 174deg, transparent 174deg 216deg, rgba(245,165,36,.75) 216deg 246deg, transparent 246deg 288deg, rgba(245,165,36,.75) 288deg 318deg, transparent 318deg 360deg);
  box-shadow: 0 0 14px rgba(255,106,43,.25); }
.gpu-card.ok .fan + .fan { animation-duration: 1.3s; }
.gpu-card.maybe .fan { animation: spin 3.5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* the tile fans turn only on the chosen card (or under the pointer), not on all six at once */
.gpu-card.ok .fan, .gpu-card.maybe .fan { animation-play-state: paused; }
.gpu-card:has(.gpu-pick[aria-pressed="true"]) .fan, .gpu-card:hover .fan { animation-play-state: running; }

.mem-bar { position: relative; height: 10px; border-radius: 5px; background: rgba(255,255,255,.05); border: 1px solid var(--slate); }
.mem-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 5px; background: linear-gradient(90deg, #3a3f47, #5b5f67); transition: width 1.4s cubic-bezier(.2,.7,.2,1) .2s; }
.gpu-card.ok .mem-fill { background: linear-gradient(90deg, rgba(91,208,138,.35), rgba(91,208,138,.75)); }
.gpu-card.maybe .mem-fill { background: linear-gradient(90deg, rgba(245,165,36,.35), rgba(245,165,36,.8)); }
.gpu-card.in .mem-fill, html:not(.js) .mem-fill { width: var(--mem); }
.dag-line { position: absolute; top: -5px; bottom: -5px; left: calc(2.5 / 16 * 100%); width: 2px; background: var(--glow); box-shadow: 0 0 8px var(--glow); }
.mem-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: .8rem; color: var(--snow-dim); }
.mem-legend span:last-child { color: var(--glow); }

/* Key numbers */
.keynums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0 14px; }
.keynum {
  border-radius: 14px; padding: 22px 20px; border: 1px solid var(--slate);
  background: radial-gradient(120% 120% at 0% 0%, rgba(255,106,43,.12), transparent 55%), linear-gradient(160deg, rgba(42,46,53,.7), rgba(20,22,26,.9));
  display: flex; flex-direction: column; gap: 6px;
}
.kn-v { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1; color: var(--snow); font-variant-numeric: tabular-nums; }
.kn-v small { font-size: .42em; color: var(--amber); font-family: var(--font-mono); letter-spacing: .02em; }
.kn-l { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--snow-dim); }

/* Fit cards */
.fitcards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0 22px; }
/* two plain lists under a rule, not two more boxes after the bento */
.fitcard { padding: 18px 0 0; border-top: 1px solid var(--slate); }
.fitcard.yes { border-top-color: rgba(245,165,36,.45); }
.fitcard h3 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin-bottom: 14px; }
.fit-ico { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: .9rem; }
.yes .fit-ico { background: var(--amber); color: var(--coal); box-shadow: 0 0 14px rgba(245,165,36,.5); }
.maybe .fit-ico { border: 1px solid var(--slate); color: var(--snow-dim); }
.fitcard ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fitcard li { position: relative; padding-left: 22px; color: var(--snow-dim); }
.fitcard li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 2px; border-radius: 1px; background: var(--slate); }
.yes li { color: var(--snow); }
.yes li::before { background: var(--glow); box-shadow: 0 0 6px var(--glow); }
.callout-line { margin: 0; padding: 0; color: var(--snow-dim); }

/* Chart hover */
.chart-wrap { position: relative; }
.chart .hover { opacity: 0; transition: opacity .15s ease; pointer-events: none; }
.chart-wrap.hovering .hover { opacity: 1; }
.chart .hover-line { stroke: var(--snow-dim); stroke-dasharray: 2 3; }
.chart .hover-dot { fill: var(--coal); stroke: var(--amber); stroke-width: 2.5; }
.chart-tip {
  position: absolute; top: 0; left: 0; pointer-events: none; opacity: 0; transform: translate(-50%, -110%);
  display: grid; gap: 2px; padding: 8px 12px; border-radius: 8px; white-space: nowrap;
  background: rgba(14,16,19,.95); border: 1px solid rgba(245,165,36,.45); font-size: .82rem; color: var(--snow-dim);
  transition: opacity .15s ease;
}
.chart-tip b { color: var(--amber); font-family: var(--font-mono); }
.chart-wrap.hovering .chart-tip { opacity: 1; }
.chart svg { cursor: crosshair; }

@media (max-width: 900px) {
  .gpu-grid { grid-template-columns: 1fr 1fr; }
  .keynums { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .gpu-grid, .fitcards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .fan { animation: none !important; }
  .mem-fill { transition: none; }
}

/* ---------- Consistent rhythm between modules ---------- */
:root { --gap: clamp(36px, 4vw, 52px); }
.section { padding: var(--gap) 0; }
.hero { padding: 56px 0; }
.stats { padding: 28px 0 var(--gap); }
.warning + .section { padding-top: var(--gap); }
.wrap > :last-child { margin-bottom: 0; }
.fins { margin: calc(var(--gap) * -0.5) 0; position: relative; z-index: 1; }
.chart { margin-top: 28px; }
.bento { margin: 28px 0 28px; }
.gpu-grid { margin: 24px 0 18px; }
.int-grid { margin: 24px 0 20px; }
.fitcards { margin: 0 0 18px; }

/* "examples, not a full list" note above the card grid */
.gpu-note { margin: 28px 0 0; max-width: 68ch; font-size: 15px; color: var(--snow-dim); }
.gpu-note strong { color: var(--snow); font-weight: 600; }
.gpu-note + .gpu-grid { margin-top: 14px; }
