/* ==========================================================================
   Hilbeon — marketing site design system
   --------------------------------------------------------------------------
   Dark, glassy, gradient-accented. Matches the Hilbeon 3D viewer.
   Mobile-first; breakpoints at ~640 / 900 / 1120px.
   Implements every class in the markup contract.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --bg-0: #0a0b10;
  --bg-1: #11131b;
  --panel: #14171f;
  --panel-2: #1b2030;
  --card: rgba(31, 36, 51, 0.55);
  --card-hi: rgba(40, 47, 66, 0.65);

  /* Strokes */
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-hi: rgba(255, 255, 255, 0.16);

  /* Text */
  --text: #e8ecf5;
  --text-dim: #9aa6bd;
  /* Lightened from #6b768d to meet WCAG AA (>=4.5:1 on --bg-0/--panel) for small text. */
  --text-mute: #8b96ad;

  /* Brand accents */
  --accent: #5b8cff;
  --accent-2: #7c5cff;
  --grad: linear-gradient(135deg, #5b8cff, #7c5cff);

  /* Scientific signal colours */
  --homo: #ff8a3d;
  --lumo: #45d0c8;
  --pos: #ff6b6b;
  --neg: #56b1ff;
  --good: #58d6a0;
  --warn: #ffc857;
  --cuda: #76b900;

  /* Shape */
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);

  /* Type */
  --font-sans: "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Layout */
  --maxw: 1120px;
  --gutter: clamp(1rem, 4vw, 2rem);

  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   2. Reset / normalize
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* sticky nav offset so anchored sections aren't hidden under the header */
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Layered, subtle background glow — the Hilbeon "viewer" atmosphere */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 720px at 78% -8%, rgba(124, 92, 255, 0.16), transparent 60%),
    radial-gradient(1000px 640px at 8% 4%, rgba(91, 140, 255, 0.14), transparent 58%),
    radial-gradient(900px 900px at 50% 118%, rgba(69, 208, 200, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 60%, var(--bg-0));
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: #8fb0ff;
}

button {
  font-family: inherit;
  cursor: pointer;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

hr {
  border: none;
  border-top: 1px solid var(--stroke);
  margin: 2.5rem 0;
}

::selection {
  background: rgba(124, 92, 255, 0.35);
  color: #fff;
}

/* --------------------------------------------------------------------------
   3. Typography scale
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

p {
  margin: 0 0 1.1rem;
}

p:last-child {
  margin-bottom: 0;
}

.h1,
h1 {
  font-size: clamp(2.4rem, 5.4vw, 3.6rem);
  letter-spacing: -0.035em;
}

.h2,
h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
}

h3 {
  font-size: 1.25rem;
}

.lede {
  font-size: clamp(1.08rem, 1.7vw, 1.3rem);
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 40ch;
}

.mono,
.mono * {
  font-family: var(--font-mono);
}

.muted {
  color: var(--text-mute);
}

.center {
  text-align: center;
}

.accent-text {
  /* gradient text for emphasis */
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Headings that should carry the gradient */
.gradient-head {
  background: linear-gradient(135deg, #cdd8ff 0%, #5b8cff 55%, #7c5cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(3.25rem, 8vw, 5rem);
}

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(2rem, 5vw, 3.25rem);
  text-align: center;
}

.section-eyebrow,
.eyebrow,
.post-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.section-sub {
  font-size: 1.08rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--stroke-hi);
  border-radius: var(--radius-sm);
  background: var(--card-hi);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    background 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--stroke-hi);
  color: var(--text);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 24px rgba(91, 110, 255, 0.32);
}

.btn-primary:hover {
  color: #fff;
  filter: brightness(1.08);
  box-shadow: 0 12px 30px rgba(91, 110, 255, 0.42);
}

.btn-ghost {
  background: transparent;
  border-color: var(--stroke-hi);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent);
}

.btn-lg {
  padding: 0.95rem 1.7rem;
  font-size: 1.02rem;
  border-radius: var(--radius);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* --------------------------------------------------------------------------
   6. Badges
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.badge-gpu {
  border-color: rgba(118, 185, 0, 0.4);
  background: rgba(118, 185, 0, 0.12);
  color: #a6e34d;
}

.badge-gpu::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cuda);
  box-shadow: 0 0 8px var(--cuda);
}

/* --------------------------------------------------------------------------
   7. Glass panel helper
   -------------------------------------------------------------------------- */
.panel,
.card,
.tier,
.post-card,
.step,
.callout,
.figure {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
}

/* --------------------------------------------------------------------------
   8. Sticky nav + mobile menu
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 11, 16, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--stroke);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 68px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--text);
}

.nav-brand img,
.nav-brand svg {
  height: 30px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.18s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
}

@media (max-width: 860px) {
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: rgba(10, 11, 16, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    /* hidden state */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links a {
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--stroke);
    font-size: 1.05rem;
    color: var(--text);
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   9. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.hero-copy .eyebrow {
  color: var(--accent);
}

.hero-copy .h1,
.hero-copy h1 {
  margin-bottom: 1rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.8rem 0 1.25rem;
}

.trust-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--text-mute);
}

.trust-line strong {
  color: var(--text-dim);
  font-weight: 600;
}

.hero-visual {
  position: relative;
}

/* --------------------------------------------------------------------------
   10. 3D viewer slot
   -------------------------------------------------------------------------- */
.mol-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
  z-index: 1;
  transition: opacity 0.5s ease;
}
.mol-poster.is-hidden { opacity: 0; pointer-events: none; }

/* Static figure images (e.g. rendered NCI surfaces, diagnostic plots). */
.figure img:not(.mol-poster) {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
}

.mol-viewer {
  position: relative;
  min-height: 380px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background:
    radial-gradient(80% 80% at 60% 30%, rgba(124, 92, 255, 0.14), transparent 70%),
    radial-gradient(70% 70% at 30% 70%, rgba(91, 140, 255, 0.12), transparent 70%),
    var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* keep 3Dmol's own canvas inside the rounded corners */
.mol-viewer canvas {
  border-radius: inherit;
}

.mol-viewer-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--text-mute);
  background: rgba(10, 11, 16, 0.6);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* --------------------------------------------------------------------------
   11. Grids + cards
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 1.25rem;
}

.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  padding: 1.6rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--stroke-hi);
  background: var(--card-hi);
}

.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.18rem;
}

.card p {
  color: var(--text-dim);
  font-size: 0.96rem;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.2), rgba(124, 92, 255, 0.2));
  border: 1px solid var(--stroke-hi);
  color: var(--accent);
  font-size: 1.35rem;
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

/* --------------------------------------------------------------------------
   12. Steps
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  counter-reset: step;
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step {
  position: relative;
  padding: 1.6rem 1.4rem 1.4rem;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 0.9rem;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 6px 18px rgba(91, 110, 255, 0.32);
}

.step h3 {
  font-size: 1.08rem;
  margin-bottom: 0.35rem;
}

.step p {
  color: var(--text-dim);
  font-size: 0.93rem;
}

/* --------------------------------------------------------------------------
   13. Pricing tiers
   -------------------------------------------------------------------------- */
.tiers {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .tiers {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1120px) {
  .tiers {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tier {
  display: flex;
  flex-direction: column;
  padding: 1.8rem 1.6rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.tier:hover {
  transform: translateY(-3px);
  border-color: var(--stroke-hi);
}

.tier-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tier-price {
  margin: 0.6rem 0 0.2rem;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.tier-price small {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-mute);
  letter-spacing: 0;
}

.tier-list {
  list-style: none;
  margin: 1.2rem 0 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.93rem;
  color: var(--text-dim);
}

.tier-list li {
  position: relative;
  padding-left: 1.5rem;
}

.tier-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--grad);
}

.tier .btn {
  margin-top: auto;
}

.tier-featured {
  border-color: rgba(124, 92, 255, 0.55);
  background: var(--card-hi);
  box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.25), 0 18px 50px rgba(60, 50, 140, 0.4);
}

.tier-featured::before {
  content: "Most popular";
  position: absolute;
  top: -0.85rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.8rem;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(91, 110, 255, 0.4);
}

.tier {
  position: relative;
}

/* --------------------------------------------------------------------------
   14. CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  margin-block: clamp(2rem, 6vw, 4rem);
  padding-block: clamp(3rem, 7vw, 4.5rem);
  text-align: center;
  overflow: hidden;
  border-block: 1px solid var(--stroke);
  background:
    radial-gradient(900px 360px at 50% -40%, rgba(124, 92, 255, 0.25), transparent 70%),
    radial-gradient(700px 320px at 50% 140%, rgba(91, 140, 255, 0.2), transparent 70%),
    var(--panel);
}

.cta-band h2,
.cta-band .cta-title {
  margin-bottom: 0.6rem;
}

/* Promotional CTA headline that must NOT enter the document outline
   (used inside <article> so real section <h2>s stay the clean outline). */
.cta-title {
  margin-top: 0;
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.cta-band p {
  max-width: 50ch;
  margin: 0 auto 1.8rem;
  color: var(--text-dim);
}

.cta-band .hero-cta,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--stroke);
  background: rgba(10, 11, 16, 0.6);
  padding-block: 3rem 1.75rem;
  margin-top: 2rem;
}

.footer-inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .footer-inner {
    grid-template-columns: 1.4fr repeat(3, 1fr);
  }
}

.footer-col-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 0.9rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-col a {
  color: var(--text-dim);
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-brand img,
.footer-brand svg {
  height: 30px;
  width: auto;
  margin-bottom: 0.9rem;
}

.footer-brand p {
  color: var(--text-mute);
  font-size: 0.9rem;
  max-width: 32ch;
}

.footer-bottom {
  max-width: var(--maxw);
  margin: 2.5rem auto 0;
  padding: 1.5rem var(--gutter) 0;
  border-top: 1px solid var(--stroke);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--text-mute);
}

.footer-bottom a {
  color: var(--text-mute);
}

.footer-bottom a:hover {
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   16. Blog list
   -------------------------------------------------------------------------- */
.post-list {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .post-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1120px) {
  .post-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--stroke-hi);
  background: var(--card-hi);
  color: var(--text);
}

/* Disabled "coming soon" teaser cards: read as inactive, no hover affordance. */
.post-card.is-muted {
  opacity: 0.55;
  pointer-events: none;
  cursor: default;
}

.post-card.is-muted:hover {
  transform: none;
  border-color: var(--stroke);
  background: var(--card);
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  color: var(--text-mute);
  margin-bottom: 0.85rem;
}

.post-card-meta .tag {
  color: var(--accent);
}

.post-card h2,
.post-card h3 {
  font-size: 1.18rem;
  margin-bottom: 0.5rem;
}

.post-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   17. Article (.post)
   -------------------------------------------------------------------------- */
.post {
  max-width: 760px;
  margin-inline: auto;
}

.post-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.post-header h1 {
  margin: 0.4rem 0 1rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-mute);
}

.post-meta .tag,
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.post-body {
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--text);
}

.post-body > * + * {
  margin-top: 1.2rem;
}

.post-body h2 {
  margin-top: 2.4rem;
  font-size: 1.65rem;
}

.post-body h3 {
  margin-top: 1.8rem;
  font-size: 1.3rem;
}

.post-body p,
.post-body li {
  color: var(--text-dim);
}

.post-body strong {
  color: var(--text);
}

.post-body ul,
.post-body ol {
  padding-left: 1.4rem;
}

.post-body li {
  margin-top: 0.5rem;
}

.post-body a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(91, 140, 255, 0.4);
}

.post-body blockquote {
  margin: 1.6rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-left: 3px solid var(--accent);
  color: var(--text-dim);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   18. Figures
   -------------------------------------------------------------------------- */
.figure {
  margin: 1.8rem 0;
  padding: 0.75rem;
  overflow: hidden;
}

.figure img {
  width: 100%;
  border-radius: var(--radius-sm);
}

.figure .mol-viewer {
  box-shadow: none;
}

.figure-caption {
  margin-top: 0.7rem;
  padding: 0 0.25rem;
  font-size: 0.86rem;
  color: var(--text-mute);
  text-align: center;
}

/* --------------------------------------------------------------------------
   19. Callouts
   -------------------------------------------------------------------------- */
.callout {
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--accent);
  font-size: 0.97rem;
}

.callout p {
  margin-bottom: 0;
  color: var(--text-dim);
}

.callout strong {
  color: var(--text);
}

.callout-note {
  border-left-color: var(--accent);
  background: rgba(91, 140, 255, 0.08);
}

.callout-warn {
  border-left-color: var(--warn);
  background: rgba(255, 200, 87, 0.08);
}

.callout-warn strong {
  color: var(--warn);
}

/* --------------------------------------------------------------------------
   20. Code blocks
   -------------------------------------------------------------------------- */
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

:not(pre) > code {
  padding: 0.15em 0.42em;
  border-radius: 6px;
  background: rgba(124, 92, 255, 0.13);
  border: 1px solid var(--stroke);
  color: #c9d4ff;
  white-space: nowrap;
}

pre {
  margin: 1.6rem 0;
  padding: 1.2rem 1.35rem;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: #0c0e15;
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}

pre code {
  display: block;
  padding: 0;
  background: none;
  border: none;
  white-space: pre;
  color: #d7def0;
  font-size: 0.86rem;
  line-height: 1.7;
}

/* command-line prompt style */
pre code .prompt,
pre .prompt {
  color: var(--accent);
  user-select: none;
}

pre code .comment {
  color: var(--text-mute);
}

pre code .str {
  color: var(--lumo);
}

pre code .kw {
  color: var(--accent-2);
}

/* --------------------------------------------------------------------------
   21. Tables (.receipts / .table)
   -------------------------------------------------------------------------- */
.receipts,
.table {
  width: 100%;
  margin: 1.6rem 0;
  border-collapse: collapse;
  font-size: 0.92rem;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
}

.receipts th,
.receipts td,
.table th,
.table td {
  padding: 0.7rem 0.95rem;
  text-align: left;
  border-bottom: 1px solid var(--stroke);
}

.receipts thead th,
.table thead th {
  background: var(--panel-2);
  color: var(--text);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.receipts tbody tr:last-child td,
.table tbody tr:last-child td {
  border-bottom: none;
}

.receipts tbody tr:hover,
.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.receipts td.mono,
.receipts .num,
.table .num {
  font-family: var(--font-mono);
  color: var(--text);
}

/* --------------------------------------------------------------------------
   22. Forms
   -------------------------------------------------------------------------- */
.form {
  max-width: 560px;
  margin-inline: auto;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.15rem;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
}

.field .req {
  color: var(--accent);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-family: inherit;
  font-size: 0.97rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--stroke-hi);
  border-radius: var(--radius-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
    linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 1.25em,
    calc(100% - 15px) 1.25em;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-mute);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.22);
}

/* inline validation */
.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: var(--pos);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.18);
}

.field-error {
  font-size: 0.82rem;
  color: var(--pos);
  min-height: 1em;
}

.form-actions {
  margin-top: 1.5rem;
}

.form-note {
  margin-top: 1rem;
  font-size: 0.84rem;
  color: var(--text-mute);
  text-align: center;
}

.form-success {
  display: none;
  padding: 2rem 1.75rem;
  text-align: center;
  border: 1px solid rgba(88, 214, 160, 0.4);
  border-radius: var(--radius);
  background: rgba(88, 214, 160, 0.1);
}

.form-success.show {
  display: block;
}

.form-success h3 {
  color: var(--good);
  margin-bottom: 0.4rem;
}

.form-success p {
  color: var(--text-dim);
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   23. Accessibility — focus states
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.btn:focus-visible {
  outline-offset: 3px;
}

/* skip link, if a page provides one */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--panel);
  border: 1px solid var(--stroke-hi);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* --------------------------------------------------------------------------
   24. Misc helpers
   -------------------------------------------------------------------------- */
.stack-sm > * + * {
  margin-top: 0.75rem;
}

.stack > * + * {
  margin-top: 1.25rem;
}

.divider {
  height: 1px;
  background: var(--stroke);
  border: none;
  margin: 0;
}

.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2.5rem;
  justify-content: center;
  opacity: 0.8;
}

/* small stat row used on the home page */
.stat-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 2.5rem;
}

@media (min-width: 640px) {
  .stat-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  text-align: center;
  padding: 1.1rem 0.75rem;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--card);
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-mute);
}

/* --------------------------------------------------------------------------
   24b. Frontier polish — aurora, reveal-on-scroll, glow borders
   -------------------------------------------------------------------------- */

/* Slow-drifting aurora on top of the static glow (GPU-cheap: transform only) */
body::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 30% at 30% 30%, rgba(124, 92, 255, 0.10), transparent 70%),
    radial-gradient(32% 26% at 70% 60%, rgba(91, 140, 255, 0.09), transparent 70%),
    radial-gradient(26% 24% at 55% 20%, rgba(69, 208, 200, 0.05), transparent 70%);
  animation: aurora-drift 26s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes aurora-drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(3%, 3%, 0) scale(1.08); }
}

/* Faint blueprint grid behind the hero */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(75% 85% at 50% 10%, #000 30%, transparent 100%);
  mask-image: radial-gradient(75% 85% at 50% 10%, #000 30%, transparent 100%);
}

/* Reveal-on-scroll (JS adds .reveal, then .is-in when visible).
   No-JS / reduced-motion users simply see everything. */
.reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  filter: blur(10px) saturate(0.75);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
    filter 0.7s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* --------------------------------------------------------------------------
   24c. Scroll FX — progress bar, hero parallax, aurora hue drift
   -------------------------------------------------------------------------- */

/* Thin brand-gradient progress bar pinned above the nav */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 3000;
  pointer-events: none;
}

.scroll-progress i {
  display: block;
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, #5b8cff, #7c5cff 55%, #76b900);
  box-shadow: 0 0 10px rgba(124, 92, 255, 0.6), 0 0 24px rgba(91, 140, 255, 0.35);
  will-change: transform;
}

/* Aurora slowly re-tints as you travel down the page (JS sets --sh on body) */
body::after {
  filter: hue-rotate(var(--sh, 0deg));
}

/* Hero copy drifts up slower than the page and dissolves (JS-driven) */
.hero-copy {
  will-change: transform, opacity;
}

/* Nav deepens once you leave the top */
.nav.is-scrolled {
  background: rgba(8, 9, 14, 0.88);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress {
    display: none;
  }
}

/* Gradient hairline that lights up on hover — cards & tiers */
.card,
.post-card,
.step,
.tier {
  position: relative;
  overflow: hidden;
}

.card::after,
.post-card::after,
.tier::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.55), rgba(124, 92, 255, 0.4), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.card:hover::after,
.post-card:hover::after,
.tier:hover::after {
  opacity: 1;
}

/* Hero headline shimmer keyword */
.hero-copy h1 .gradient-head {
  background-size: 200% 100%;
  animation: head-shimmer 7s ease-in-out infinite;
}

@keyframes head-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Proof strip under the hero */
.stat-row .stat {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* --------------------------------------------------------------------------
   24c. Frontier polish II — grain, ink type, spotlight, sheen, scroll-nav
   -------------------------------------------------------------------------- */

/* Film grain kills gradient banding and adds material quality */
html::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Typographic finesse */
h1, h2, h3, .section-sub, .lede { text-wrap: balance; }
.post-body p { text-wrap: pretty; }
body { font-feature-settings: "ss01" on, "cv05" on, "cv11" on; }
.stat-num, .tier-price, .receipts .num, .table .num { font-variant-numeric: tabular-nums; }

/* "Ink" headings: soft white→steel vertical gradient (Linear-style) */
.hero-copy h1,
.section-head h2,
.post-header h1 {
  background: linear-gradient(180deg, #f7f9ff 30%, #bcc8e2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Cursor spotlight on cards (JS feeds --mx/--my) */
.card::before,
.post-card::before,
.step::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%),
    rgba(124, 140, 255, 0.11), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover::before,
.post-card:hover::before,
.step:hover::before {
  opacity: 1;
}

/* Primary button sheen sweep */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}

.btn-primary:hover::before {
  animation: sheen 0.8s ease;
}

@keyframes sheen {
  from { left: -60%; }
  to { left: 130%; }
}

/* Nav solidifies as you scroll (CSS scroll-driven; no-op where unsupported) */
@supports (animation-timeline: scroll()) {
  .nav {
    animation: nav-solid linear both;
    animation-timeline: scroll();
    animation-range: 0 140px;
  }

  @keyframes nav-solid {
    to {
      background: rgba(7, 8, 13, 0.9);
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
    }
  }
}

/* Halo behind the hero 3D viewer */
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, rgba(124, 92, 255, 0.2), transparent 70%);
  filter: blur(24px);
  pointer-events: none;
}

/* Featured tier breathes gently */
.tier-featured {
  animation: tier-pulse 5s ease-in-out infinite;
}

@keyframes tier-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.25), 0 18px 50px rgba(60, 50, 140, 0.4); }
  50% { box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.5), 0 20px 60px rgba(80, 70, 180, 0.55); }
}

/* Stat numbers glow on hover */
.stat { transition: transform 0.2s ease, border-color 0.2s ease; }
.stat:hover { transform: translateY(-3px); border-color: var(--stroke-hi); }
.stat:hover .stat-num { filter: drop-shadow(0 0 14px rgba(124, 92, 255, 0.5)); }
.stat-num { font-size: 1.7rem; transition: filter 0.25s ease; }

/* Themed scrollbar */
html { scrollbar-width: thin; scrollbar-color: #262d40 transparent; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #262d40; border: 3px solid var(--bg-0); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #37405c; }

/* --------------------------------------------------------------------------
   25. Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
