/* ══════════════════════════════════════
   infai — Terminal Luxury
   ══════════════════════════════════════ */

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

:root {
  --bg: #0c0b09;
  --bg-elevated: #141310;
  --bg-surface: #1a1916;
  --border: #2a2820;
  --border-warm: #3d3828;
  --text: #e8e2d6;
  --text-secondary: #a09882;
  --text-muted: #6b6456;
  --amber: #e8a838;
  --amber-dim: rgba(232, 168, 56, 0.12);
  --amber-glow: rgba(232, 168, 56, 0.25);
  --green: #6bca6b;
  --green-dim: rgba(107, 202, 107, 0.15);
  --red-dim: rgba(220, 80, 80, 0.12);
  --red-muted: #a05050;
  --serif: 'Playfair Display', Georgia, serif;
  --mono: 'IBM Plex Mono', 'Menlo', monospace;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --max-w: 1100px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { color: var(--text); }
h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

section {
  padding: 6rem 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ── Grain & Scanlines ── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* ── Animations ── */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 0.08s);
}
.reveal-up.revealed { opacity: 1; transform: translateY(0); }

.reveal-line {
  display: block;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 0.12s + 0.2s);
}
.reveal-line.revealed { opacity: 1; transform: translateX(0); }

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
.blink { animation: blink 1s step-end infinite; }

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(12, 11, 9, 0.92);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text) !important;
  text-decoration: none !important;
  letter-spacing: -0.02em;
}
.logo-bracket { color: var(--amber); }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: lowercase;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary) !important;
  transition: border-color 0.2s, color 0.2s;
}
.btn-nav:hover { border-color: var(--amber); color: var(--text) !important; }
.btn-nav svg { opacity: 0.7; }

/* ── Hero ── */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 9rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  min-height: 100vh;
}
.hero-label {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--amber);
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5.5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero-accent {
  color: var(--amber);
  font-style: italic;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 480px;
}
.hero-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  background: var(--amber);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.25s;
  box-shadow: 0 0 40px var(--amber-dim), 0 4px 20px rgba(0,0,0,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px var(--amber-glow), 0 8px 30px rgba(0,0,0,0.5);
  text-decoration: none;
}
.btn-prompt { opacity: 0.5; }

.btn-ghost {
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); text-decoration: none; }

/* ── Hero Terminal ── */
.hero-terminal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 80px var(--amber-dim);
}
.term-chrome {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.term-dots { display: flex; gap: 6px; }
.term-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border-warm);
}
.term-dots span:first-child { background: #dc5050; }
.term-dots span:nth-child(2) { background: #dcb050; }
.term-dots span:last-child { background: var(--green); }
.term-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
  margin-right: auto;
}
.term-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
}
.term-line { white-space: nowrap; }
.t-muted { color: var(--text-muted); }
.t-dim { color: var(--text-muted); opacity: 0.6; }
.t-arrow { color: var(--amber); }
.t-highlight { color: var(--amber); font-weight: 500; }

/* ── Comparison ── */
.comparison {
  padding-top: 4rem;
  padding-bottom: 6rem;
  border-top: 1px solid var(--border);
}
.comp-header { text-align: center; margin-bottom: 4rem; }
.comp-header em { font-family: var(--serif); color: var(--amber); font-style: italic; }
.comp-sub { color: var(--text-secondary); font-size: 1.05rem; max-width: 540px; margin: 0.75rem auto 0; }

.comp-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
}
.comp-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
}
.comp-before { border-color: var(--red-muted); background: linear-gradient(145deg, var(--bg-elevated), rgba(160, 80, 80, 0.04)); }
.comp-after { border-color: rgba(107, 202, 107, 0.3); background: linear-gradient(145deg, var(--bg-elevated), rgba(107, 202, 107, 0.04)); }

.comp-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red-muted);
  margin-bottom: 1.25rem;
}
.comp-label-good { color: var(--green); }

.comp-terminal {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  overflow-x: auto;
}
.comp-terminal code {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--text);
  white-space: pre;
}
.comp-caption {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
}

.comp-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding-top: 4rem;
}
.divider-line { width: 1px; height: 40px; background: var(--border); }
.divider-vs {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Showcase (Screenshots) ── */
.showcase {
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 6rem;
}
.showcase-item {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: center;
}
.showcase-reverse { grid-template-columns: 1.4fr 1fr; }
.showcase-reverse .showcase-text { order: 2; }
.showcase-reverse .showcase-img { order: 1; }

.showcase-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--amber);
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 1rem;
}
.showcase-text h3 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.showcase-text p { color: var(--text-secondary); font-size: 1rem; line-height: 1.75; }

.img-frame {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: 0 16px 50px rgba(0,0,0,0.4);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.img-frame:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 60px var(--amber-dim);
}
.img-frame img { width: 100%; display: block; }

/* ── Features ── */
.features {
  border-top: 1px solid var(--border);
  padding-top: 6rem;
}
.features-header { margin-bottom: 3rem; }
.features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.feat {
  display: flex;
  gap: 1.25rem;
  padding: 2rem;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transition: background 0.3s;
}
.feat:nth-child(even) { border-right: none; }
.feat:nth-last-child(-n+2) { border-bottom: none; }
.feat:hover { background: var(--bg-elevated); }

.feat-marker {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--amber);
  flex-shrink: 0;
  padding-top: 0.15rem;
}
.feat h3 {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}
.feat p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }

/* ── Stats ── */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4rem 2rem;
  background: var(--bg-elevated);
}
.stats-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-val {
  display: block;
  font-family: var(--mono);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 0.35rem;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 200px;
  display: block;
}
.stat-sep {
  width: 1px;
  height: 50px;
  background: var(--border);
}
.stats-punchline {
  text-align: center;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 2.5rem auto 0;
}

/* ── Install ── */
.install {
  border-top: none;
  padding-top: 6rem;
}
.install h2 { margin-bottom: 3rem; }

.install-options {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
}
.install-primary {
  background: var(--bg-elevated);
  border: 1px solid var(--amber);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 0 50px var(--amber-dim);
}
.install-alt {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.install-row {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}
.install-method {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
  text-transform: lowercase;
}
.install-tag {
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--amber);
  border: 1px solid var(--amber-dim);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  vertical-align: middle;
}
.install-cmd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.install-cmd:hover { border-color: var(--amber); }
.install-cmd code {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--amber);
}
.install-cmd-sm code { font-size: 0.75rem; }
.install-copy {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  transition: color 0.2s;
}
.install-copy.copied { color: var(--green); }
.install-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}
.install-row p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* ── Roadmap ── */
.roadmap {
  border-top: 1px solid var(--border);
}
.roadmap h2 { margin-bottom: 0.5rem; }
.roadmap-sub {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 3rem;
}
.roadmap-timeline {
  position: relative;
  padding-left: 2rem;
}
.roadmap-line {
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--amber), var(--border) 30%, var(--border));
}
.roadmap-node {
  position: relative;
  padding: 0 0 2.5rem 2rem;
}
.roadmap-node:last-child { padding-bottom: 0; }
.node-dot {
  position: absolute;
  left: -2rem;
  top: 0.35rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
}
.roadmap-node.done .node-dot {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 12px var(--amber-glow);
}
.node-status {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.roadmap-node.done .node-status { color: var(--amber); }
.node-content h3 {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  margin: 0.25rem 0 0.3rem;
}
.node-content p { color: var(--text-muted); font-size: 0.88rem; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.logo-sm {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}
.footer-sep { color: var(--border); margin: 0 0.5rem; }
.footer-meta { font-size: 0.8rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: lowercase;
}
.footer-links a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 7rem;
    min-height: auto;
  }
  .hero-terminal { max-width: 500px; }
  .comp-grid { grid-template-columns: 1fr; }
  .comp-divider { flex-direction: row; padding-top: 0; }
  .divider-line { width: 40px; height: 1px; }
  .showcase-item,
  .showcase-reverse { grid-template-columns: 1fr; gap: 2rem; }
  .showcase-reverse .showcase-text { order: 1; }
  .showcase-reverse .showcase-img { order: 2; }
  .features-list { grid-template-columns: 1fr; }
  .feat { border-right: none !important; }
  .install-options { grid-template-columns: 1fr; }
  .stats-inner { flex-direction: column; }
  .stat-sep { width: 60px; height: 1px; }
}

@media (max-width: 640px) {
  section { padding: 4rem 1.25rem; }
  .nav-links a:not(.btn-nav) { display: none; }
  .hero h1 { font-size: 2.2rem; }
  .hero-sub { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-ghost { text-align: center; justify-content: center; }
}
