
:root {
  --bg: #F2EDE0;
  --bg-alt: #EAE3D1;
  --bg-card: #ECE5D2;
  --ink: #1A1612;
  --ink-soft: #4A4238;
  --muted: #6B5E4A;
  --accent: #2D5A4A;
  --accent-hover: #234938;
  --amber: #D49A4E;
  --border: #D4CBB5;
  --border-soft: #E0D7C0;

  --term-bg: #15110D;
  --term-bg-header: #1F1A14;
  --term-text: #E8DFC8;
  --term-dim: #7A6F5C;
  --term-accent: #6FAE9B;
  --term-green: #8FAB7F;
  --term-blue: #7B9EAF;

  --max-width: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--bg); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ─── Nav ─── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(242, 237, 224, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
nav.scrolled { border-bottom-color: var(--border-soft); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.logo .logo-img { width: 32px; height: 32px; }
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -22px;
  left: 0; right: 0;
  height: 1.5px;
  background: var(--accent);
}
.nav-cta {
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink) !important;
  transition: all 0.2s !important;
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-cta .nav-cta-icon {
  width: 14px;
  height: 14px;
}
.nav-cta:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg) !important;
}
.nav-cta:hover .nav-cta-icon { filter: invert(1); }

/* ─── Hero ─── */
.hero { padding: clamp(50px, 8vw, 100px) 0 clamp(40px, 5vw, 70px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}
.hero-grid > * { min-width: 0; }
.brand {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(72px, 12vw, 148px);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 28px;
}
.brand .dot { color: var(--amber); }
.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 480px;
  margin-bottom: 36px;
}
.lede strong { color: var(--ink); font-weight: 500; }

.install-block { margin-bottom: 28px; }
.install-cmd {
  display: flex;
  align-items: stretch;
  background: var(--ink);
  border-radius: 10px;
  overflow: hidden;
  max-width: 100%;
  margin-bottom: 10px;
  border: 1px solid #2A2520;
  position: relative;
}
.install-cmd code {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  color: var(--term-text);
  white-space: nowrap;
  overflow-x: auto;
  display: flex;
  align-items: center;
  position: relative;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.install-cmd code::-webkit-scrollbar { display: none; }
.install-cmd code::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to right, transparent 30%, var(--ink) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.install-cmd code.has-overflow::after { opacity: 1; }
.install-cmd code.has-overflow.at-end::after { opacity: 0; }
.copy-btn {
  background: transparent;
  border: none;
  border-left: 1px solid rgba(255,255,255,0.08);
  color: var(--term-dim);
  padding: 0 18px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.copy-btn:hover { color: var(--term-text); background: rgba(255,255,255,0.04); }
.copy-btn.copied { color: var(--term-green); }
.install-alt {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.install-alt code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--bg-alt);
  padding: 3px 8px;
  border-radius: 5px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { border-color: var(--border); color: var(--ink); background: transparent; }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-ghost .btn-ghost-icon {
  width: 16px;
  height: 16px;
}
.btn-ghost:hover { border-color: var(--ink); background: var(--bg-alt); }

/* ─── Terminal ─── */
.terminal {
  background: var(--term-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(26, 22, 18, 0.06),
    0 8px 24px -8px rgba(26, 22, 18, 0.18),
    0 24px 56px -16px rgba(26, 22, 18, 0.22);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.75;
  position: relative;
  border: 1px solid #2A2520;
}
.terminal-header {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  background: var(--term-bg-header);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  gap: 7px;
  position: relative;
}
.term-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.term-dot.r { background: #B56A5A; }
.term-dot.y { background: #C9A84E; }
.term-dot.g { background: #7BA87B; }
.term-title {
  flex: 1;
  text-align: center;
  color: var(--term-dim);
  font-size: 11.5px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
  min-width: 0;
}
.term-replay {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--term-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 5px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, color 0.2s, background 0.2s;
  z-index: 2;
}
.term-replay.show { opacity: 1; }
.term-replay:hover { color: var(--term-text); background: rgba(255,255,255,0.1); }
.terminal-body {
  padding: 20px 22px 24px;
  min-height: 420px;
  color: var(--term-text);
  white-space: pre;
  overflow-x: auto;
}
.term-line {
  opacity: 0;
  transform: translateY(2px);
  animation: termIn 0.25s ease forwards;
}
@keyframes termIn { to { opacity: 1; transform: translateY(0); } }
.term-banner { color: var(--term-accent); font-weight: 500; }
.term-prompt { color: var(--term-accent); }
.term-meta { color: var(--term-dim); }
.term-info { color: var(--term-blue); }
.term-user { color: var(--term-text); font-weight: 500; }
.term-work { color: var(--term-dim); }
.term-success { color: var(--term-green); }
.term-result { color: var(--term-accent); }
.term-cursor {
  display: inline-block;
  width: 7px;
  height: 15px;
  background: var(--term-accent);
  vertical-align: text-bottom;
  margin-left: 4px;
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ─── Facts strip ─── */
.facts {
  padding: 22px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.facts-inner {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 4vw, 56px);
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}
.fact { display: flex; align-items: baseline; gap: 7px; }
.fact-key { color: var(--muted); }
.fact-val { color: var(--ink); font-weight: 500; }

/* ─── Sections ─── */
section { padding: clamp(60px, 9vw, 110px) 0; scroll-margin-top: 88px; }
#features, #install, #source { border-top: 1px solid var(--border-soft); }
.section-head { margin-bottom: 56px; max-width: 640px; }
.section-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 18px;
}
.section-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-sub {
  margin-top: 18px;
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 540px;
}
.section-sub code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86em;
  color: var(--ink);
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 5px;
}
.section-sub + .section-sub { margin-top: 10px; }
.mono-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  max-width: 640px;
}

/* ─── Features ─── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  overflow: hidden;
}
.feature-grid > * { min-width: 0; }
.feature {
  background: var(--bg);
  padding: 34px 30px;
  transition: background 0.2s;
}
.feature:hover { background: var(--bg-card); }
.feature-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 18px;
}
.feature h3 {
  font-family: 'Fraunces', serif;
  font-size: 21px;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.feature p { font-size: 15px; color: var(--ink-soft); line-height: 1.55; }

/* ─── Install ─── */
.install-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 760px;
}
.install-grid > * { min-width: 0; }
@media (min-width: 1100px) {
  .install-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: none;
  }
}
.method-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.method-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}
.method-desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.5;
}
.method-cmd {
  display: flex;
  background: var(--ink);
  border-radius: 8px;
  overflow: hidden;
  margin-top: auto;
  border: 1px solid #2A2520;
  position: relative;
}
.method-cmd code {
  flex: 1;
  min-width: 0;
  padding: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--term-text);
  white-space: nowrap;
  overflow-x: auto;
  display: flex;
  align-items: center;
  position: relative;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.method-cmd code::-webkit-scrollbar { display: none; }
.method-cmd code::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to right, transparent 30%, var(--ink) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.method-cmd code.has-overflow::after { opacity: 1; }
.method-cmd code.has-overflow.at-end::after { opacity: 0; }
.install-note {
  margin-top: 32px;
  padding: 22px 26px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 760px;
}
.install-note code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--ink);
  background: var(--bg-alt);
  padding: 2px 7px;
  border-radius: 5px;
}

/* ─── Source ─── */
.source-content {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
}
.source-content > * { min-width: 0; }
.source-left { display: flex; flex-direction: column; gap: 24px; }
.release-info {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}
.release-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.release-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg-alt);
  padding: 4px 10px;
  border-radius: 6px;
}
.release-date { font-size: 14px; color: var(--muted); }
.platform-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
}
.platform {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--bg);
  text-decoration: none;
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  transition: background 0.15s;
  min-width: 0;
}
.platform:hover { background: var(--bg-card); }
.platform-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.platform-name .arrow { color: var(--muted); transition: color 0.15s, transform 0.15s; flex-shrink: 0; }
.platform:hover .arrow { color: var(--accent); transform: translateY(2px); }
.platform-meta { color: var(--muted); font-size: 12.5px; flex-shrink: 0; }
.source-right { display: flex; flex-direction: column; gap: 20px; }
.source-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 22px 24px;
}
.source-card h4 {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}
.source-card p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 16px;
}
.license-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
}

/* ─── Footer ─── */
footer { padding: 56px 0 36px; border-top: 1px solid var(--border-soft); }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}
.footer-brand .logo { font-size: 26px; margin-bottom: 14px; }
.footer-brand .logo .logo-img { width: 36px; height: 36px; }
.footer-tagline {
  font-size: 14px;
  color: var(--muted);
  max-width: 380px;
  line-height: 1.6;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: flex-end;
}
.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--accent); }

/* ─── Responsive ─── */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .feature-grid { grid-template-columns: 1fr; }
  .source-content { grid-template-columns: 1fr; }
  .nav-links { gap: 20px; }
  .nav-links a:not(.nav-cta) { display: none; }
}
@media (max-width: 600px) {
  .term-title { display: none; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .terminal-body { font-size: 11.5px; padding: 16px 18px 20px; min-height: 380px; }
  .brand { font-size: clamp(64px, 18vw, 96px); }
  .facts-inner { gap: 14px 24px; font-size: 12px; }
  .method-card { padding: 22px 18px; }
  .method-cmd code, .install-cmd code { padding: 12px 14px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
