/* ── Viscer page styles ─────────────────────────────────────────────────
   Extends the Vegoia design system (../assets/css/base.css + style.css
   provides .hud-nav, .section-header, .footer-section). Viscer keeps the
   ecosystem's surfaces and type but swaps the accent to a blue-purple —
   scoped to this page via the accent tokens below. */

:root {
  /* Viscer accent — blue-purple, same dimness family as the site teal */
  --v-accent:      #8f7ff7;
  --v-accent-dim:  rgba(143, 127, 247, 0.15);
  --v-shadow:      0 0 24px rgba(143, 127, 247, 0.18);
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.viscer-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: center;
  padding: calc(var(--space-16) + var(--space-8)) var(--space-6) var(--space-10);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}

.viscer-hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.viscer-hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0.4;
}

.viscer-hero__gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px at 18% 0%, rgba(143, 127, 247, 0.07), transparent 65%),
    linear-gradient(
      to bottom,
      rgba(13, 13, 11, 0.35) 0%,
      rgba(13, 13, 11, 0.15) 40%,
      rgba(13, 13, 11, 0.30) 65%,
      rgba(13, 13, 11, 0.88) 90%,
      rgba(13, 13, 11, 1.00) 100%
    );
  pointer-events: none;
}

.viscer-hero__scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .viscer-hero__video-wrap { display: none; }
}

.viscer-hero__inner {
  position: relative;
  z-index: 3;
  width: min(var(--content-default), 100%);
  margin: 0 auto;
}

.viscer-hero__chapter {
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.viscer-hero__title {
  margin-top: var(--space-4);
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.95;
  font-weight: 400;
  color: var(--color-text);
}

.viscer-hero__cursor {
  color: var(--v-accent);
  animation: viscer-blink 1.1s steps(1) infinite;
}

@keyframes viscer-blink { 50% { opacity: 0; } }

.viscer-hero__subtitle {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  letter-spacing: 0.18em;
  color: var(--v-accent);
}

.viscer-hero__desc {
  margin-top: var(--space-4);
  max-width: 62ch;
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: 1.7;
}

.viscer-hero__stamp {
  position: absolute;
  top: 0;
  right: 0;
  padding: var(--space-3) var(--space-4);
  border: 1px dashed var(--color-text-faint);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: right;
  line-height: 1.8;
  transform: rotate(2deg);
}

/* ── Sections ─────────────────────────────────────────────────────────── */
.viscer-section {
  padding: var(--space-12) var(--space-6);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.viscer-section--surface {
  background: var(--color-surface);
}

.viscer-section__inner {
  width: min(var(--content-default), 100%);
  margin: 0 auto;
}

.viscer-section .section-header { margin-bottom: var(--space-6); }

.viscer-lede {
  max-width: 68ch;
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-muted);
}

/* ── CTA row ──────────────────────────────────────────────────────────── */
.viscer-cta-row {
  margin-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.viscer-cta-row--center { justify-content: center; }

.viscer-cta {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-interactive), border-color var(--transition-interactive);
}

.viscer-cta:hover {
  color: var(--color-text);
  border-color: var(--v-accent);
}

.viscer-cta--primary {
  color: var(--color-text);
  border-color: var(--v-accent);
  box-shadow: var(--v-shadow);
}

.viscer-cta--primary:hover { color: #ffffff; }

/* ── Headline number cards ────────────────────────────────────────────── */
.viscer-headline {
  margin-top: var(--space-8);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}

.viscer-headline__card {
  padding: var(--space-6) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.viscer-headline__card dt {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.viscer-headline__card dd {
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 2rem;
  line-height: 1.1;
  color: var(--v-accent);
}

.viscer-headline__card dd span {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--color-text-muted);
}

.viscer-lede--tight { margin-top: var(--space-6); }

.viscer-lede strong { color: var(--color-text); font-weight: 500; }

.viscer-lede code,
.viscer-note code,
.viscer-faq__a code {
  font-size: 0.9em;
  padding: 0 0.3em;
  border-radius: var(--radius-sm);
  background: var(--color-surface-offset);
  color: var(--color-text);
}

.viscer-lede a,
.viscer-note a,
.viscer-faq__a a,
.viscer-why__item p a {
  color: var(--v-accent);
  text-decoration: none;
}

.viscer-lede a:hover,
.viscer-note a:hover,
.viscer-faq__a a:hover,
.viscer-why__item p a:hover { text-decoration: underline; }

/* ── Code blocks ──────────────────────────────────────────────────────── */
.viscer-code {
  margin-top: var(--space-6);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.viscer-code pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--color-text-muted);
  white-space: pre;
  tab-size: 2;
}

.viscer-code pre .tok-key { color: var(--v-accent); }

/* ── Data tables ──────────────────────────────────────────────────────── */
.viscer-table-wrap {
  margin-top: var(--space-6);
  overflow-x: auto;
}

.viscer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.viscer-table th,
.viscer-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-divider);
  text-align: left;
  vertical-align: baseline;
}

.viscer-table thead th {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  border-bottom: 1px solid var(--color-border);
}

.viscer-table td { color: var(--color-text-muted); }

.viscer-table .num {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.viscer-table td.num { color: var(--color-text); }

.viscer-table tr.hl td { background: var(--v-accent-dim); }

.viscer-table td strong { color: var(--v-accent); font-weight: 500; }

.viscer-table td code {
  font-size: 0.9em;
  color: var(--color-text);
}

/* ── Made list (how it was made) ──────────────────────────────────────── */
.viscer-made {
  margin-top: var(--space-4);
  padding-left: 1.2em;
  max-width: 72ch;
}

.viscer-made li {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-muted);
}

.viscer-made li::marker { color: var(--v-accent); }

.viscer-made li strong { color: var(--color-text); font-weight: 500; }

/* ── Limitations ──────────────────────────────────────────────────────── */
.viscer-limits {
  margin-top: var(--space-6);
  max-width: 72ch;
  list-style: none;
  counter-reset: viscer-limit;
}

.viscer-limits li {
  counter-increment: viscer-limit;
  position: relative;
  padding: var(--space-4) 0 var(--space-4) 3.2rem;
  border-bottom: 1px solid var(--color-divider);
}

.viscer-limits li::before {
  content: counter(viscer-limit, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--v-accent);
  letter-spacing: 0.1em;
}

.viscer-limits h3 {
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  color: var(--color-text);
  font-weight: 500;
}

.viscer-limits p {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-muted);
}

/* ── Mobile ───────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .viscer-hero__stamp { display: none; }
  .viscer-hero { min-height: 52vh; }
  .viscer-hero__title { font-size: clamp(3rem, 16vw, 5.5rem); }
  .viscer-cta { width: 100%; text-align: center; }
}

/* ── Why grid ─────────────────────────────────────────────────────────── */
.viscer-why__grid {
  margin-top: var(--space-6);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: var(--space-8) var(--space-6);
}

.viscer-why__idx {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--v-accent);
  letter-spacing: 0.2em;
}

.viscer-why__item h3 {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  letter-spacing: 0.18em;
  color: var(--color-text);
}

.viscer-why__item p {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-muted);
}

.viscer-why__item p strong {
  color: var(--color-text);
  font-weight: 500;
}

/* ── Status table ─────────────────────────────────────────────────────── */
.viscer-status {
  margin-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
}

.viscer-status__row {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--text-sm);
}

.viscer-status__stage {
  color: var(--color-text);
  flex: 1;
}

.viscer-status__state {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.viscer-status__state--done   { color: var(--v-accent); }
.viscer-status__state--wip    { color: var(--color-gold-bright); }
.viscer-status__state--next   { color: var(--color-text-muted); }

.viscer-note {
  margin-top: var(--space-6);
  font-size: var(--text-xs);
  line-height: 1.8;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
}

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.viscer-faq__list {
  margin-top: var(--space-6);
  max-width: 72ch;
}

.viscer-faq__item {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-divider);
}

.viscer-faq__q {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 500;
}

.viscer-faq__a {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-muted);
}

/* ── Footer note line ─────────────────────────────────────────────────── */
.viscer-outro {
  padding: var(--space-10) var(--space-6) var(--space-16);
  background: var(--color-bg);
  text-align: center;
}

.viscer-outro__line {
  font-size: var(--text-sm);
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

.viscer-outro__line strong {
  color: var(--v-accent);
  font-weight: 500;
}
