/* ─── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette */
  --ink:        #0D0D0D;
  --ink-soft:   #3D3D3D;
  --ink-muted:  #888;
  --paper:      #F7F5F0;
  --paper-warm: #EFECE4;
  --rule:       #E0DDD5;
  --accent:     #1A1AFF;
  --accent-soft:#5C5CFF;
  --accent-dim: #EBEBFF;
  --white:      #FFFFFF;
  --green:      #0A7C3E;
  --green-dim:  #E6F4EC;

  /* Type */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, sans-serif;
  --font-mono:  'DM Mono', 'Courier New', monospace;

  /* Spacing */
  --gap:   clamp(1rem, 4vw, 2rem);
  --wrap:  1160px;
  --r:     6px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

/* ─── Layout ────────────────────────────────────────────────────── */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ─── Nav ───────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gap);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

/* Logo A — mono split */
.logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; }
.logo .press { color: var(--ink); }
.logo .sep {
  display: inline-block;
  width: 2px;
  background: var(--accent);
  border-radius: 1px;
  flex-shrink: 0;
}
.logo .bin { color: var(--accent); }

.logo--nav { font-size: 1.2rem; }
.logo--nav .sep { height: 1rem; margin: 0 5px; }

.logo--hero { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 1.5rem; }
.logo--hero .sep { height: 1.75rem; margin: 0 6px; width: 2px; }

.logo--footer { font-size: 1.1rem; }
.logo--footer .sep { height: 0.9rem; margin: 0 5px; }

.logo--inv .press { color: var(--paper); }
.logo--inv .bin   { color: var(--accent-soft); }
.logo--inv .sep   { background: var(--accent-soft); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--ink-soft);
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--ink); }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.82rem !important;
  background: var(--ink) !important;
  color: var(--paper) !important;
  padding: 7px 16px;
  border-radius: var(--r);
  transition: background 0.15s, transform 0.15s !important;
}
.nav-cta:hover {
  background: var(--accent) !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero {
  padding: clamp(5rem, 12vw, 9rem) 0 clamp(4rem, 8vw, 7rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(26,26,255,0.07) 0%, transparent 70%),
    repeating-linear-gradient(0deg, transparent, transparent 39px, var(--rule) 39px, var(--rule) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, var(--rule) 39px, var(--rule) 40px);
  pointer-events: none;
  z-index: 0;
}

.hero > * { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--green-dim);
  color: var(--green);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 1.75rem;
  border: 1px solid rgba(10,124,62,0.2);
  animation: fadeUp 0.5s ease both;
}

.hero-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 820px;
  margin: 0 auto 1.5rem;
  animation: fadeUp 0.5s 0.1s ease both;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  animation: fadeUp 0.5s 0.2s ease both;
}
.hero-sub strong { color: var(--ink); font-weight: 600; }

.hero .logo {
  display: flex;
  justify-content: center;
  animation: fadeUp 0.5s ease both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.5s 0.3s ease both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--r);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--ink);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,26,255,0.2);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--rule);
}
.btn-outline:hover {
  border-color: var(--ink);
  background: var(--paper-warm);
}

/* ─── Terminal block ────────────────────────────────────────────── */
.hero-terminal {
  max-width: 620px;
  margin: 3.5rem auto 0;
  background: var(--ink);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 32px 64px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.04);
  animation: fadeUp 0.6s 0.4s ease both;
  text-align: left;
}

.terminal-bar {
  background: #1E1E1E;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.terminal-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot-red    { background: #FF5F57; }
.dot-yellow { background: #FEBC2E; }
.dot-green  { background: #28C840; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  margin-left: auto;
}

.terminal-body {
  padding: 20px 24px 24px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
}

.t-comment { color: #555; }
.t-prompt  { color: #555; }
.t-cmd     { color: #CDD6F4; }
.t-out     { color: #A6E3A1; }
.t-dim     { color: #6C7086; }
.t-accent  { color: var(--accent-soft); }
.t-warn    { color: #F9E2AF; }

/* ─── Section shared ────────────────────────────────────────────── */
section { padding: clamp(4rem, 8vw, 7rem) 0; }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 520px;
  margin-bottom: 3rem;
}

/* ─── Stats bar ─────────────────────────────────────────────────── */
.stats-bar {
  background: var(--ink);
  color: var(--white);
  padding: 0;
}

.stats-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gap);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  divide-x: 1px solid rgba(255,255,255,0.1);
}

.stat-item {
  padding: 2.5rem var(--gap);
  border-right: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}
.stat-item:last-child { border-right: none; }

.stat-num {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-style: italic;
  color: var(--white);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-desc {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── How it works ──────────────────────────────────────────────── */
.how-section { background: var(--white); }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
}

.step {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--rule);
  position: relative;
  transition: background 0.2s;
}
.step:last-child { border-right: none; }
.step:hover { background: var(--paper); }

.step-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
  letter-spacing: 0.08em;
}

.step-icon {
  margin-bottom: 1rem;
  display: block;
  color: var(--accent);
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon svg {
  display: block;
}

.step h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.step p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ─── Feature grid ──────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
}

.feature-card {
  background: var(--white);
  padding: 2rem;
  transition: background 0.2s;
}
.feature-card:hover { background: var(--paper); }

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

/* ─── Compare table ─────────────────────────────────────────────── */
.compare-section { background: var(--paper-warm); }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  font-size: 0.9rem;
}

.compare-table th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.compare-table th:first-child { width: 40%; }
.compare-table th.highlight    { color: var(--accent); background: var(--accent-dim); }

.compare-table td {
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
  vertical-align: middle;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td:first-child   { font-weight: 500; color: var(--ink); }

.compare-table td.highlight {
  background: rgba(26,26,255,0.02);
  color: var(--ink);
  font-weight: 500;
}

.check { color: var(--green); font-weight: 700; }
.cross  { color: #ccc; }

/* ─── CTA banner ────────────────────────────────────────────────── */
.cta-section {
  background: var(--ink);
  color: var(--white);
  text-align: center;
  padding: clamp(4rem, 8vw, 6rem) 0;
}

.cta-section .section-title { color: var(--white); }
.cta-section .section-title em { font-style: italic; color: rgba(255,255,255,0.5); }

.cta-section p {
  color: rgba(255,255,255,0.55);
  max-width: 420px;
  margin: 0 auto 2rem;
}

.cta-code {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: #A6E3A1;
  padding: 10px 20px;
  border-radius: var(--r);
  margin-top: 1.5rem;
  cursor: pointer;
  transition: background 0.15s;
  user-select: all;
}
.cta-code:hover { background: rgba(255,255,255,0.12); }

/* ─── Footer ────────────────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.55);
  padding-top: 4rem;
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gap) 3rem;
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-left .logo { margin-bottom: 1rem; }

.footer-tagline {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.35);
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.6rem;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 1.25rem var(--gap);
  max-width: var(--wrap);
  margin: 0 auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.2);
}

/* ─── Features page specific ────────────────────────────────────── */
.features-hero {
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 5vw, 5rem);
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}

.feature-deep {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-bottom: 1px solid var(--rule);
}

.feature-deep:last-child { border-bottom: none; }
.feature-deep.reverse    { direction: rtl; }
.feature-deep.reverse > * { direction: ltr; }

.feature-deep-icon {
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.feature-deep h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.feature-deep p {
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 1rem;
  font-size: 0.97rem;
}

.feature-deep ul {
  list-style: none;
  padding: 0;
}

.feature-deep ul li {
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding: 0.35rem 0;
  padding-left: 1.2rem;
  position: relative;
}

.feature-deep ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

.code-panel {
  background: var(--ink);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}

/* ─── Docs page ─────────────────────────────────────────────────── */
.docs-hero {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}

.docs-hero a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  padding: clamp(2rem, 4vw, 3.5rem) var(--gap);
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 80px;
}

.docs-toc {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-left: 2px solid var(--rule);
  padding-left: 1rem;
}

.docs-toc a {
  font-size: 0.88rem;
  color: var(--ink-soft);
  transition: color 0.15s;
}

.docs-toc a:hover { color: var(--accent); }

.docs-content { min-width: 0; }

.docs-section {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.docs-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.docs-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.docs-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
}

.docs-section p {
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 1rem;
  font-size: 0.97rem;
}

.docs-section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.docs-code {
  background: var(--ink);
  color: #E8E8E8;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
}

.docs-code code { font-family: inherit; }

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0 1.25rem;
}

.docs-table th,
.docs-table td {
  text-align: left;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.docs-table th {
  font-weight: 600;
  color: var(--ink);
  background: var(--paper-warm);
}

.docs-table td { color: var(--ink-soft); }

.docs-list {
  margin: 0.75rem 0 1.25rem 1.25rem;
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.75;
}

.docs-list li { margin-bottom: 0.35rem; }

@media (max-width: 768px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .docs-sidebar {
    position: static;
  }
  .docs-toc {
    flex-direction: row;
    flex-wrap: wrap;
    border-left: none;
    padding-left: 0;
    gap: 0.5rem 1rem;
  }
}

/* ─── Animations ────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    padding: 1.5rem var(--gap);
    gap: 1.25rem;
  }
  .nav-links.open   { display: flex; }
  .nav-toggle       { display: flex; }
  .site-header      { position: relative; }

  .stats-inner              { grid-template-columns: 1fr; }
  .stat-item                { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .stat-item:last-child     { border-bottom: none; }

  .steps                    { grid-template-columns: 1fr; }
  .step                     { border-right: none; border-bottom: 1px solid var(--rule); }
  .step:last-child          { border-bottom: none; }

  .feature-deep             { grid-template-columns: 1fr; }
  .feature-deep.reverse     { direction: ltr; }

  .footer-inner             { flex-direction: column; }
  .footer-links             { flex-wrap: wrap; gap: 2rem; }

  .compare-table th,
  .compare-table td         { padding: 0.75rem 1rem; }
}
