/* ==========================================================================
   VIRAXL — design tokens
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg: #0a0a0b;
  --bg-raised: #111113;
  --surface: #141416;
  --surface-2: #1a1a1d;
  --border: #232327;
  --border-strong: #313136;

  --text: #f3f3f1;
  --text-dim: #9b9b9f;
  --text-faint: #626266;

  --accent: #5271ff;
  --accent-strong: #6d89ff;
  --accent-wash: rgba(82, 113, 255, 0.12);
  --accent-wash-strong: rgba(82, 113, 255, 0.22);

  --danger: #e05a4e;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "SF Pro Text",
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "Cascadia Mono", "Roboto Mono",
    Consolas, "Liberation Mono", Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --wrap: 1160px;
  --wrap-lg: 1240px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: dark;
  }
}

/* ==========================================================================
   Reset
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p,
ol,
ul,
table {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

table {
  border-collapse: collapse;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
}

@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;
  }
}

/* ==========================================================================
   Utility
   ========================================================================== */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 480px) {
  .wrap {
    padding: 0 28px;
  }
}

@media (min-width: 1200px) {
  .wrap {
    max-width: var(--wrap-lg);
    padding: 0 40px;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  z-index: 100;
}

.skip-link:focus {
  left: 24px;
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 4px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  margin: 0 0 20px;
}

h1,
h2,
h3 {
  font-weight: 560;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 560;
  letter-spacing: -0.005em;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease),
    transform 0.18s var(--ease), color 0.18s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--text);
  color: #0a0a0b;
}

.btn-primary:hover {
  background: var(--accent-strong);
  color: #fff;
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--text-dim);
  background: var(--surface);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

@media (min-width: 768px) {
  .hero-actions {
    margin-top: 38px;
  }
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.wordmark {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: var(--text-dim);
}

.site-nav a:not(.nav-cta) {
  display: none;
}

.site-nav a:not(.nav-cta):hover {
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.nav-cta:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

@media (min-width: 768px) {
  .site-nav {
    gap: 32px;
  }
  .site-nav a:not(.nav-cta) {
    display: inline;
  }
  .nav-cta {
    height: 36px;
    padding: 0 16px;
    font-size: 13.5px;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 480px) {
  .hero {
    padding: 68px 0 76px;
  }
}

@media (min-width: 768px) {
  .hero {
    padding: 84px 0 92px;
  }
}

@media (min-width: 1200px) {
  .hero {
    padding: 108px 0 120px;
  }
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 44px;
  }
}

.hero-copy h1 {
  font-size: 2.75rem; /* 44px — mobile */
  line-height: 1.05;
}

@media (min-width: 480px) {
  .hero-copy h1 {
    font-size: 3.25rem; /* 52px */
  }
}

@media (min-width: 768px) {
  .hero-copy h1 {
    font-size: 4.25rem; /* 68px */
  }
}

@media (min-width: 1200px) {
  .hero-copy h1 {
    font-size: 5rem; /* 80px */
  }
}

.hero-sub {
  margin-top: 20px;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-dim);
}

@media (min-width: 768px) {
  .hero-sub {
    font-size: 18px;
    margin-top: 24px;
  }
}

/* ---- hero visual: document -> table flow ---- */

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flow-caption {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  text-align: center;
}

.flow-stage {
  width: 100%;
  max-width: 560px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
}

@media (max-width: 720px) {
  .flow-stage {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .flow-arrow {
    transform: rotate(90deg);
  }
}

.doc-card,
.out-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  width: 100%;
}

.doc-card {
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.7);
}

.doc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}

.doc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
}

.doc-filename {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}

.doc-body {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.doc-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  color: var(--text-dim);
}

.doc-row span:last-child {
  color: var(--text);
}

.doc-row-title span:last-child {
  color: var(--text);
  font-weight: 600;
}

.doc-table-scroll {
  overflow-x: auto;
  margin: 10px -2px;
  border-top: 1px dashed var(--border-strong);
  border-bottom: 1px dashed var(--border-strong);
}

.doc-table {
  padding: 8px 2px;
  min-width: 380px;
}

.doc-table-head,
.doc-table-row {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr 0.6fr 0.7fr 0.9fr;
  gap: 6px;
  padding: 3px 0;
}

.doc-table-head {
  color: var(--text-faint);
  font-size: 9.5px;
}

.doc-table-row {
  color: var(--text-dim);
  border-radius: 4px;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

.doc-table-row span:first-child {
  color: var(--text);
}

.doc-row-total {
  font-weight: 600;
  padding-top: 8px;
}

.doc-row-total span:last-child {
  color: var(--text);
}

.flow-arrow {
  color: var(--text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.4s var(--ease), transform 0.4s var(--ease);
}

.out-card {
  padding: 14px;
  opacity: 0.35;
  transform: translateY(4px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.out-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.out-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 3px 9px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}

.table-scroll {
  overflow-x: auto;
}

.out-table {
  width: 100%;
  min-width: 340px;
  font-size: 10.5px;
  border-collapse: collapse;
}

.out-table th {
  text-align: left;
  font-weight: 500;
  color: var(--text-faint);
  font-size: 9.5px;
  padding: 0 6px 6px 0;
  border-bottom: 1px solid var(--border);
}

.out-table td {
  padding: 6px 6px 6px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}

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

.out-table tfoot td {
  padding-top: 10px;
  font-weight: 600;
  color: var(--text);
  border: none;
}

/* animated / validated states, toggled via JS */

.flow-stage.is-validated .out-card {
  opacity: 1;
  transform: translateY(0);
}

.flow-stage.is-validated .flow-arrow {
  color: var(--accent);
}

.flow-stage.is-validated .out-badge {
  color: var(--accent-strong);
  border-color: var(--accent);
  background: var(--accent-wash);
}

.flow-stage.is-validated .doc-table-row[data-field] {
  background: var(--accent-wash);
  color: var(--text);
}

/* ==========================================================================
   Sections shared
   ========================================================================== */

section {
  padding: 60px 0;
}

@media (min-width: 480px) {
  section {
    padding: 72px 0;
  }
}

@media (min-width: 768px) {
  section {
    padding: 92px 0;
  }
}

@media (min-width: 1200px) {
  section {
    padding: 112px 0;
  }
}

.section-head {
  max-width: 46ch;
  margin-bottom: 36px;
}

@media (min-width: 768px) {
  .section-head {
    margin-bottom: 48px;
  }
}

.section-head h2 {
  font-size: 1.65rem;
  line-height: 1.2;
}

@media (min-width: 480px) {
  .section-head h2 {
    font-size: 1.85rem;
  }
}

@media (min-width: 768px) {
  .section-head h2 {
    font-size: 2.1rem;
  }
}

@media (min-width: 1200px) {
  .section-head h2 {
    font-size: 2.3rem;
  }
}

.section-head p {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 16px;
}

/* ---- statement ---- */

.statement {
  border-bottom: 1px solid var(--border);
}

.statement-inner {
  max-width: 640px;
}

.statement h2 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1.2;
}

.statement p {
  margin-top: 20px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 56ch;
}

/* ---- process / steps ---- */

.process {
  border-bottom: 1px solid var(--border);
}

.steps {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}

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

.step {
  display: flex;
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
  .step {
    flex-direction: column;
    gap: 28px;
    padding: 0 24px 0 0;
    border-bottom: none;
    border-left: 1px solid var(--border);
    padding-left: 24px;
  }
  .step:first-child {
    padding-left: 0;
    border-left: none;
  }
}

.step-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  flex-shrink: 0;
  width: 28px;
}

.step-body h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.step-body p {
  color: var(--text-dim);
  font-size: 15.5px;
  line-height: 1.55;
}

/* ---- compare (before / after) ---- */

.compare {
  border-bottom: 1px solid var(--border);
}

.compare-panel {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (min-width: 860px) {
  .compare-panel {
    grid-template-columns: 1fr 1fr;
  }
}

.compare-col {
  background: var(--surface);
  padding: 20px;
}

@media (min-width: 480px) {
  .compare-col {
    padding: 28px;
  }
}

.compare-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  margin-bottom: 18px;
}

.messy-doc {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  min-height: 180px;
}

@media (min-width: 480px) {
  .messy-doc {
    padding: 18px;
    min-height: 200px;
  }
}

.messy-line {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 2;
}

.messy-mono {
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.messy-skew {
  transform: rotate(-0.4deg);
}

.messy-skew-2 {
  transform: rotate(0.5deg);
  opacity: 0.85;
}

.messy-faint {
  color: var(--text-faint);
  font-style: italic;
}

.clean-table {
  width: 100%;
  min-width: 360px;
  font-size: 13px;
  margin-bottom: 20px;
}

.clean-table th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  color: var(--text-faint);
  padding: 0 8px 8px 0;
  border-bottom: 1px solid var(--border);
}

.clean-table td {
  padding: 9px 8px 9px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}

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

.check-list {
  display: grid;
  gap: 10px;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-dim);
}

.check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent-strong);
  font-size: 11px;
  flex-shrink: 0;
}

.compare-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-faint);
}

/* ---- capabilities ---- */

.capabilities {
  border-bottom: 1px solid var(--border);
}

.capability-grid {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.capability {
  background: var(--surface);
  padding: 22px 20px;
}

@media (min-width: 480px) {
  .capability {
    padding: 28px;
  }
}

.capability h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.capability p {
  font-size: 15.5px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* ---- cta ---- */

.cta {
  text-align: center;
}

.cta-inner {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta h2 {
  font-size: clamp(1.9rem, 4.4vw, 2.6rem);
  line-height: 1.15;
}

.cta p {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 16px;
}

.cta .btn {
  margin-top: 32px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand .wordmark {
  display: block;
  margin-bottom: 6px;
}

.footer-tagline {
  color: var(--text-faint);
  font-size: 13.5px;
}

.footer-meta {
  text-align: right;
  font-size: 13.5px;
  color: var(--text-faint);
}

.footer-meta a {
  display: block;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.footer-meta a:hover {
  color: var(--accent-strong);
}

@media (max-width: 480px) {
  .footer-inner {
    flex-direction: column;
  }
  .footer-meta {
    text-align: left;
  }
}
