:root {
  color-scheme: dark;
  --bg: #08070c;
  --bg-soft: #14111f;
  --viewer-bg: #08070c;
  --panel: rgba(19, 16, 27, 0.8);
  --panel-solid: #100d17;
  --ink: #f7f1ea;
  --ink-muted: rgba(247, 241, 234, 0.62);
  --line: rgba(247, 241, 234, 0.12);
  --accent: #d7b36a;
  --accent-2: #6ee7d0;
  --accent-3: #e07c58;
  --accent-4: #9b87f5;
  --shadow: 0 32px 90px rgba(4, 3, 10, 0.7);
  --radius: 24px;
  --radius-sm: 16px;

  --font-display: "IBM Plex Serif", "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "IBM Plex Serif", "Iowan Old Style", "Palatino Linotype", serif;
  --font-ui: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Menlo", monospace;

  /* CMYK halftone overlay (dark theme tuning) */
  --cmyk-c: rgba(0, 209, 255, 0.18);
  --cmyk-m: rgba(255, 64, 191, 0.14);
  --cmyk-y: rgba(255, 214, 70, 0.12);
  --cmyk-k: rgba(0, 0, 0, 0.12);
}

:root[data-theme="paper"] {
  color-scheme: light;

  --bg: #f5efe4;
  --bg-soft: #efe5d6;
  --viewer-bg: #08070c;
  --panel: rgba(255, 250, 240, 0.74);
  --panel-solid: #fffaf0;

  --ink: #1f1a14;
  --ink-muted: rgba(31, 26, 20, 0.64);
  --line: rgba(31, 26, 20, 0.16);

  /* warmer accents on paper */
  --accent: #a66b1e;
  --accent-2: #0aa8a2;
  --accent-3: #c2552f;
  --accent-4: #5b52c8;

  /* journal mode: slightly squarer + flatter */
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 45px rgba(31, 26, 20, 0.14);

  /* CMYK overlay tuned for paper (subtle) */
  --cmyk-c: rgba(0, 170, 255, 0.18);
  --cmyk-m: rgba(255, 60, 170, 0.14);
  --cmyk-y: rgba(255, 200, 0, 0.1);
  --cmyk-k: rgba(20, 14, 10, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  font: 17px/1.65 var(--font-body);
  background:
    radial-gradient(900px 620px at 14% -10%, rgba(215, 179, 106, 0.32), transparent 60%),
    radial-gradient(720px 540px at 90% 8%, rgba(110, 231, 208, 0.22), transparent 62%),
    radial-gradient(640px 520px at 50% 115%, rgba(155, 135, 245, 0.2), transparent 65%),
    linear-gradient(180deg, #07060b 0%, #0c0b15 55%, #08070c 100%);
  position: relative;
  z-index: 0;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(247, 241, 234, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(247, 241, 234, 0.05) 1px, transparent 1px);
  background-size: 160px 160px;
  opacity: 0.24;
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  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.8' numOctaves='2' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.35'/></svg>");
  mix-blend-mode: soft-light;
  opacity: 0.2;
  pointer-events: none;
  z-index: -1;
}

.cmyk-print {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.28;
  mix-blend-mode: screen;
}

.cmyk-print .screen {
  position: absolute;
  inset: -25%;
  background-size: 7px 7px;
  background-image: radial-gradient(circle, currentColor 0 1.1px, transparent 1.2px);
  transform-origin: 50% 50%;
  filter: blur(0.1px) contrast(1.25);
}

.cmyk-print .c {
  color: var(--cmyk-c);
  transform: rotate(15deg);
}

.cmyk-print .m {
  color: var(--cmyk-m);
  transform: rotate(45deg);
}

.cmyk-print .y {
  color: var(--cmyk-y);
  transform: rotate(75deg);
}

.cmyk-print .k {
  color: var(--cmyk-k);
  background-size: 9px 9px;
  transform: rotate(0deg);
  opacity: 0.85;
  mix-blend-mode: soft-light;
}

:root[data-theme="paper"] .cmyk-print {
  opacity: 0.11;
  mix-blend-mode: multiply;
}

:root[data-theme="paper"] .cmyk-print .screen {
  background-size: 11px 11px;
  filter: blur(0px) contrast(1.22);
}

@media (prefers-reduced-motion: no-preference) {
  .cmyk-print .screen {
    animation: misreg 26s ease-in-out infinite;
  }

  @keyframes misreg {
    0%,
    100% {
      translate: 0 0;
    }
    50% {
      translate: 0.7px -0.5px;
    }
  }
}

::selection {
  background: rgba(215, 179, 106, 0.4);
  color: #120d16;
}

a,
a:visited {
  color: inherit;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-color: rgba(215, 179, 106, 0.6);
  color: var(--accent);
}

img {
  max-width: 100%;
  display: block;
}

code {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 64px 24px 48px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 260px;
}

.mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  padding: 2px;
  overflow: visible;
  box-shadow: 0 18px 40px rgba(5, 4, 10, 0.7);
  background: linear-gradient(140deg, rgba(215, 179, 106, 0.9), rgba(110, 231, 208, 0.45));
  position: relative;
  z-index: 0;
}

.mark img {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: #0f0d17;
}

.mark::after {
  content: "";
  position: absolute;
  inset: -16px;
  background: radial-gradient(circle, rgba(215, 179, 106, 0.35), transparent 60%);
  filter: blur(12px);
  opacity: 0.7;
  z-index: -1;
}

.wordmark {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.tagline {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.18px;
}

.links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(247, 241, 234, 0.18);
  background: linear-gradient(140deg, rgba(18, 15, 24, 0.9), rgba(9, 8, 14, 0.95));
  box-shadow: 0 12px 26px rgba(4, 3, 10, 0.65), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
  white-space: nowrap;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18px;
  color: var(--ink);
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
  border-color: rgba(215, 179, 106, 0.6);
  box-shadow: 0 18px 36px rgba(4, 3, 10, 0.75), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(130deg, #f0d68e 0%, #d8b06a 45%, #e08b5c 100%);
  color: #1b1216;
  box-shadow: 0 18px 40px rgba(215, 179, 106, 0.35), 0 8px 24px rgba(224, 139, 92, 0.25);
}

.btn.primary:hover {
  color: #1b1216;
}

.btn.ghost {
  background: transparent;
  border-color: rgba(247, 241, 234, 0.25);
  box-shadow: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  align-items: center;
  padding: 34px;
  border-radius: var(--radius);
  border: 1px solid rgba(247, 241, 234, 0.14);
  background: linear-gradient(150deg, rgba(19, 16, 27, 0.92), rgba(9, 8, 14, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(520px 260px at 12% 0%, rgba(215, 179, 106, 0.35), transparent 60%),
    radial-gradient(420px 240px at 88% 8%, rgba(110, 231, 208, 0.22), transparent 60%),
    radial-gradient(300px 240px at 65% 90%, rgba(155, 135, 245, 0.18), transparent 70%);
  opacity: 0.8;
  z-index: 0;
  pointer-events: none;
  animation: halo 12s ease-in-out infinite;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 45%),
    linear-gradient(320deg, rgba(255, 255, 255, 0.04), transparent 35%);
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}

.copy {
  position: relative;
  z-index: 1;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(215, 179, 106, 0.3);
  font-size: 11px;
  letter-spacing: 0.3px;
  font-family: var(--font-ui);
  font-weight: 600;
  color: rgba(247, 241, 234, 0.9);
  background: linear-gradient(140deg, rgba(20, 16, 25, 0.85), rgba(10, 9, 15, 0.75));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.copy h1 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 600;
  text-shadow: 0 12px 28px rgba(3, 2, 8, 0.6);
}

.copy p {
  margin: 0 0 16px;
  color: var(--ink-muted);
  font-size: 17px;
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.keyline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-family: var(--font-ui);
  letter-spacing: 0.22px;
  font-size: 12px;
}

.key {
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(215, 179, 106, 0.32);
  background: linear-gradient(160deg, rgba(215, 179, 106, 0.18), rgba(14, 12, 20, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.key-label {
  color: var(--ink-muted);
  margin-left: 4px;
}

.bullets {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--ink-muted);
  font-size: 15px;
}

.bullets li {
  margin: 8px 0;
}

.bullets li::marker {
  color: var(--accent);
}

.specimen {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid rgba(215, 179, 106, 0.2);
  background: linear-gradient(160deg, rgba(17, 14, 23, 0.95), rgba(9, 8, 14, 0.95));
  box-shadow: 0 30px 80px rgba(3, 2, 9, 0.7);
  padding: 20px;
  overflow: hidden;
  isolation: isolate;
  z-index: 1;
}

.specimen::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  z-index: 0;
  pointer-events: none;
}

.specimen::after {
  content: "";
  position: absolute;
  inset: -120px;
  background:
    radial-gradient(480px 240px at 90% 0%, rgba(110, 231, 208, 0.2), transparent 65%),
    radial-gradient(420px 260px at 0% 90%, rgba(215, 179, 106, 0.2), transparent 70%);
  opacity: 0.7;
  z-index: 0;
  pointer-events: none;
}

.specimen-header,
.specimen-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.specimen-title {
  font-family: var(--font-ui);
  letter-spacing: 0.28px;
  font-size: 12px;
  font-weight: 600;
}

.pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(110, 231, 208, 0.16);
  border: 1px solid rgba(110, 231, 208, 0.5);
  font-size: 11px;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.18px;
}

.specimen-body {
  position: relative;
  height: 260px;
  margin: 14px 0;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(247, 241, 234, 0.12);
  background:
    radial-gradient(320px 200px at 60% 30%, rgba(110, 231, 208, 0.18), transparent 65%),
    radial-gradient(240px 180px at 35% 80%, rgba(215, 179, 106, 0.18), transparent 70%),
    linear-gradient(160deg, rgba(15, 13, 21, 0.9), rgba(9, 8, 14, 0.92));
  overflow: hidden;
  padding: 10px;
  z-index: 1;
}

.viewer-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--radius-sm) - 6px);
  overflow: hidden;
  border: 1px solid rgba(247, 241, 234, 0.1);
  background: var(--viewer-bg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.molstar-host {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#molstar-viewer {
  background: var(--viewer-bg);
}

#molstar-viewer .msp-plugin {
  background: var(--viewer-bg);
}

#molstar-viewer canvas {
  background: var(--viewer-bg);
  display: block;
}

#molstar-viewer .msp-layout-standard,
#molstar-viewer .msp-layout-expanded,
#molstar-viewer .msp-layout-standard-outside {
  background: transparent;
  border: none;
}

#molstar-viewer .msp-layout-region,
#molstar-viewer .msp-layout-main {
  background: transparent;
}

#molstar-viewer .msp-layout-top,
#molstar-viewer .msp-layout-bottom,
#molstar-viewer .msp-layout-left,
#molstar-viewer .msp-layout-right {
  display: none;
}

#molstar-viewer .msp-layout-main,
#molstar-viewer .msp-layout-standard-outside .msp-layout-main {
  inset: 0 !important;
}

#molstar-viewer .msp-viewport-controls,
#molstar-viewer .msp-viewport-top-left-controls,
#molstar-viewer .msp-viewport-controls-panel,
#molstar-viewer .msp-highlight-toast-wrapper,
#molstar-viewer .msp-logo {
  display: none !important;
}

.viewer-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  pointer-events: none;
}

.viewer-overlay.is-hidden {
  display: none;
}

.viewer-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18px;
  border: 1px solid rgba(247, 241, 234, 0.2);
  background: rgba(10, 9, 15, 0.75);
  color: var(--ink);
}

.viewer-status[data-tone="busy"] {
  border-color: rgba(215, 179, 106, 0.6);
  color: var(--accent);
}

.viewer-status[data-tone="ready"] {
  border-color: rgba(110, 231, 208, 0.6);
  color: var(--accent-2);
}

.viewer-status[data-tone="error"] {
  border-color: rgba(224, 124, 88, 0.6);
  color: var(--accent-3);
}

.specimen-footer {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px;
}

.viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.viewer-hint {
  flex-basis: 100%;
  color: var(--ink-muted);
  font-size: 12px;
  font-family: var(--font-ui);
  letter-spacing: 0.18px;
}

.btn.compact {
  padding: 9px 13px;
  font-size: 11px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.molecule {
  position: absolute;
  inset: 0;
  animation: drift 12s ease-in-out infinite;
}

.atom {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff, var(--accent-2) 55%, rgba(110, 231, 208, 0.2));
  box-shadow: 0 0 18px rgba(110, 231, 208, 0.5);
}

.atom.a1 {
  top: 34%;
  left: 20%;
}

.atom.a2 {
  top: 22%;
  left: 48%;
}

.atom.a3 {
  top: 54%;
  left: 60%;
}

.atom.a4 {
  top: 64%;
  left: 36%;
}

.atom.a5 {
  top: 38%;
  left: 72%;
}

.atom.a6 {
  top: 18%;
  left: 30%;
}

.bond {
  position: absolute;
  height: 3px;
  background: linear-gradient(90deg, rgba(215, 179, 106, 0.8), rgba(110, 231, 208, 0.5));
  box-shadow: 0 0 12px rgba(215, 179, 106, 0.35);
  border-radius: 999px;
}

.bond.b1 {
  width: 120px;
  top: 36%;
  left: 22%;
  transform: rotate(12deg);
}

.bond.b2 {
  width: 100px;
  top: 30%;
  left: 40%;
  transform: rotate(-16deg);
}

.bond.b3 {
  width: 110px;
  top: 52%;
  left: 44%;
  transform: rotate(24deg);
}

.bond.b4 {
  width: 80px;
  top: 58%;
  left: 30%;
  transform: rotate(-22deg);
}

.bond.b5 {
  width: 90px;
  top: 26%;
  left: 52%;
  transform: rotate(28deg);
}

.scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(247, 241, 234, 0.1) 48%, transparent 100%);
  animation: scan 4s ease-in-out infinite;
  mix-blend-mode: screen;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.18px;
  font-size: 12px;
}

.stat-value {
  font-size: 13px;
  color: var(--accent);
}

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-title p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 380px;
}

.steps {
  margin-top: 28px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(247, 241, 234, 0.12);
  background: rgba(18, 15, 24, 0.65);
  box-shadow: var(--shadow);
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.step {
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(247, 241, 234, 0.1);
  background: rgba(10, 9, 15, 0.8);
}

.step-index {
  font-family: var(--font-mono);
  color: var(--accent-2);
  letter-spacing: 0.6px;
  font-size: 12px;
}

.step h3 {
  margin: 8px 0 6px;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.3px;
}

.step p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 14px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.card {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(247, 241, 234, 0.12);
  background: rgba(15, 12, 20, 0.78);
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18px;
}

.card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 14px;
}

.formats {
  margin-top: 26px;
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.format {
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(247, 241, 234, 0.12);
  background: rgba(12, 10, 18, 0.8);
}

.format-tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(215, 179, 106, 0.45);
  color: var(--accent);
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.18px;
  font-size: 12px;
  margin-bottom: 10px;
  background: rgba(215, 179, 106, 0.08);
}

.format p {
  margin: 0;
  color: var(--ink-muted);
}

.cta-panel {
  margin-top: 28px;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(215, 179, 106, 0.2);
  background: linear-gradient(135deg, rgba(215, 179, 106, 0.2), rgba(10, 9, 15, 0.92));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cta-panel h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.4px;
}

.cta-panel p {
  margin: 0;
  color: var(--ink-muted);
}

.cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.foot {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}

.foot a {
  text-decoration: underline;
  text-decoration-color: rgba(215, 179, 106, 0.4);
}

[data-animate] {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 680ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  animation-delay: calc(var(--d, 0) * 90ms);
}

[data-animate="1"] {
  --d: 1;
}

[data-animate="2"] {
  --d: 2;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scan {
  0%,
  100% {
    transform: translateY(-40%);
    opacity: 0.2;
  }
  50% {
    transform: translateY(30%);
    opacity: 0.45;
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(-6px) rotate(-1deg);
  }
  50% {
    transform: translateY(6px) rotate(1deg);
  }
}

@keyframes halo {
  0%,
  100% {
    transform: translateY(-6px) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translateY(6px) scale(1.02);
    opacity: 0.95;
  }
}

/* -----------------------------
   Paper mode overrides (journal / lab report)
   ----------------------------- */

:root[data-theme="paper"] body {
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(1200px 760px at 10% -10%, rgba(215, 179, 106, 0.14), transparent 60%),
    radial-gradient(980px 720px at 92% 0%, rgba(110, 231, 208, 0.06), transparent 62%),
    radial-gradient(760px 640px at 50% 112%, rgba(155, 135, 245, 0.06), transparent 65%),
    linear-gradient(180deg, #fffaf0 0%, #f5efe4 55%, #efe5d6 100%);
}

:root[data-theme="paper"] body::before {
  background-image:
    linear-gradient(90deg, rgba(31, 26, 20, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(31, 26, 20, 0.06) 1px, transparent 1px);
  opacity: 0.06;
}

:root[data-theme="paper"] body::after {
  mix-blend-mode: multiply;
  opacity: 0.07;
}

:root[data-theme="paper"] ::selection {
  background: rgba(166, 107, 30, 0.22);
  color: #1f1a14;
}

:root[data-theme="paper"] .hero {
  border-color: var(--line);
  background: rgba(255, 250, 240, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

:root[data-theme="paper"] .hero::before {
  opacity: 0.16;
  animation: none;
}

:root[data-theme="paper"] .hero::after {
  opacity: 0.12;
}

:root[data-theme="paper"] .copy h1 {
  text-shadow: 0 14px 30px rgba(31, 26, 20, 0.12);
}

:root[data-theme="paper"] .mark::after {
  opacity: 0;
}

:root[data-theme="paper"] .mark {
  box-shadow: 0 10px 24px rgba(31, 26, 20, 0.18);
}

:root[data-theme="paper"] .badge {
  border-color: rgba(31, 26, 20, 0.16);
  color: rgba(31, 26, 20, 0.84);
  background: rgba(255, 250, 240, 0.78);
}

:root[data-theme="paper"] .tagline {
  color: rgba(31, 26, 20, 0.6);
}

/* less "pills", more journal labels */
:root[data-theme="paper"] .btn,
:root[data-theme="paper"] .badge,
:root[data-theme="paper"] .pill,
:root[data-theme="paper"] .format-tag,
:root[data-theme="paper"] .viewer-status {
  border-radius: 12px;
}

:root[data-theme="paper"] .key {
  border-color: rgba(31, 26, 20, 0.24);
  background: rgba(255, 250, 240, 0.92);
  box-shadow: none;
}

:root[data-theme="paper"] .btn {
  border-color: rgba(31, 26, 20, 0.22);
  background: rgba(255, 250, 240, 0.86);
  box-shadow: 0 10px 18px rgba(31, 26, 20, 0.08);
}

:root[data-theme="paper"] .btn:hover {
  border-color: rgba(166, 107, 30, 0.45);
  box-shadow: 0 14px 24px rgba(31, 26, 20, 0.12);
  transform: none;
}

:root[data-theme="paper"] .btn.primary {
  border-color: rgba(31, 26, 20, 0.82);
  background: rgba(31, 26, 20, 0.88);
  color: rgba(255, 250, 240, 0.97);
  box-shadow: none;
}

:root[data-theme="paper"] .btn.primary:hover {
  border-color: rgba(31, 26, 20, 0.78);
  background: rgba(31, 26, 20, 0.82);
  color: rgba(255, 250, 240, 0.98);
}

/* header CTA should be less sales-y: outlined instead of ink-filled */
:root[data-theme="paper"] .top .links .btn.primary {
  background: transparent;
  color: var(--ink);
  border-color: rgba(31, 26, 20, 0.32);
  box-shadow: none;
}

:root[data-theme="paper"] .top .links .btn.primary:hover {
  background: rgba(31, 26, 20, 0.06);
  border-color: rgba(31, 26, 20, 0.42);
}

:root[data-theme="paper"] .btn.ghost {
  background: transparent;
  border-color: rgba(31, 26, 20, 0.26);
  box-shadow: none;
}

:root[data-theme="paper"] .specimen {
  border-color: rgba(31, 26, 20, 0.18);
  background: rgba(255, 250, 240, 0.82);
  box-shadow: 0 22px 55px rgba(31, 26, 20, 0.14);
}

:root[data-theme="paper"] .specimen::after {
  opacity: 0.08;
}

:root[data-theme="paper"] .specimen-body {
  border-color: rgba(31, 26, 20, 0.18);
  background: rgba(255, 250, 240, 0.74);
}

:root[data-theme="paper"] .steps,
:root[data-theme="paper"] .step,
:root[data-theme="paper"] .card,
:root[data-theme="paper"] .format {
  border-color: rgba(31, 26, 20, 0.16);
  background: rgba(255, 250, 240, 0.72);
}

:root[data-theme="paper"] .cta-panel {
  border-color: rgba(31, 26, 20, 0.16);
  background: rgba(255, 250, 240, 0.76);
}

@media (prefers-reduced-motion: reduce) {
  [data-animate],
  [data-reveal] {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }
  .scanline,
  .molecule,
  .hero::before {
    animation: none;
  }
}

@media (max-width: 960px) {
  .top {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 28px;
  }
  .specimen {
    order: -1;
  }
  .section-title {
    flex-direction: column;
    align-items: flex-start;
  }
  .step-grid,
  .features,
  .format-grid {
    grid-template-columns: 1fr;
  }
  .cta-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .wrap {
    padding: 44px 18px 36px;
  }
  .copy h1 {
    font-size: 32px;
  }
  .section-title h2,
  .cta-panel h2 {
    font-size: 24px;
  }
  .badge-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .specimen-body {
    height: 220px;
  }
}
