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

:root {
  --orange:     #f97316;
  --orange-dim: #ea6a07;
  --og-glow:    rgba(249,115,22,0.22);
  --og-faint:   rgba(249,115,22,0.07);
  --og-border:  rgba(249,115,22,0.32);
  --white:      #ffffff;
  --text:       #e2e2e2;
  --muted:      #6b6b6b;
  --border:     rgba(255,255,255,0.07);
  --bg:         #080808;
  --surface:    #101010;
  --surface2:   #161616;
  --font:       'Inter', system-ui, sans-serif;
  --mono:       'JetBrains Mono', monospace;
  --ease:       0.18s ease;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

/* ── Logo ── */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.3px;
  color: var(--white);
}
.logo span { color: var(--orange); }
.logo-svg { width: 20px; height: 20px; color: var(--orange); flex-shrink: 0; }

/* ══════════════════════════════════════════
   NAV
══════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  padding-left: max(28px, env(safe-area-inset-left));
  padding-right: max(28px, env(safe-area-inset-right));
  background: rgba(8,8,8,0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.btn-signin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--orange);
  color: #fff;
  font-family: var(--font);
  font-size: 0.83rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  transition: background var(--ease), box-shadow var(--ease), transform var(--ease);
}
.btn-signin:hover {
  background: var(--orange-dim);
  box-shadow: 0 0 20px var(--og-glow);
  transform: translateY(-1px);
}
.btn-signin:active { transform: scale(0.97); }

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 100px 28px 60px;
  overflow: hidden;
}

/* Noise texture overlay */
.hero-noise {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

/* Ambient glows */
.hero-glow-left {
  position: absolute;
  top: -120px; left: -180px;
  width: 680px; height: 680px;
  background: radial-gradient(circle, rgba(249,115,22,0.1) 0%, transparent 65%);
  pointer-events: none;
}
.hero-glow-right {
  position: absolute;
  bottom: -80px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(249,115,22,0.06) 0%, transparent 65%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 72px;
  align-items: center;
}

/* ── Text side ── */
.hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 22px;
}
.eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 8px var(--og-glow);
  animation: dot-pulse 2.4s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--og-glow); }
  50% { opacity: 0.5; box-shadow: 0 0 2px transparent; }
}

h1 {
  font-size: clamp(2.8rem, 4.5vw, 4rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -2.5px;
  margin-bottom: 22px;
  color: var(--white);
}
h1 em {
  font-style: italic;
  color: var(--orange);
  font-weight: 900;
}

.hero-desc {
  font-size: 1rem;
  color: #888;
  line-height: 1.75;
  max-width: 420px;
  margin-bottom: 36px;
}

/* Big CTA button */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--orange);
  color: #fff;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  position: relative;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  animation: cta-glow 3s ease-in-out infinite;
  margin-bottom: 16px;
}
@keyframes cta-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249,115,22,0); }
  50%       { box-shadow: 0 0 28px 4px rgba(249,115,22,0.2); }
}
.cta-btn:hover {
  background: var(--orange-dim);
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(249,115,22,0.35);
  animation: none;
}
.cta-btn:active { transform: scale(0.97); }

.hero-note {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ── Code window ── */
.code-window {
  max-width: 100%;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 32px 64px rgba(0,0,0,0.6),
    0 0 60px rgba(249,115,22,0.06);
}

.window-bar {
  display: flex;
  align-items: center;
  padding: 0 14px;
  height: 40px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.window-dots { display: flex; gap: 6px; flex-shrink: 0; }
.window-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.window-dots span:nth-child(1) { background: #ff5f57; }
.window-dots span:nth-child(2) { background: #ffbd2e; }
.window-dots span:nth-child(3) { background: #28c840; }

.window-tabs {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  min-width: 0;
}
.window-tabs svg { color: var(--muted); flex-shrink: 0; }
.wtab { white-space: nowrap; }
.wtab-active { color: var(--orange); }

.window-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--og-faint);
  border: 1px solid var(--og-border);
  color: var(--orange);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

.window-panes {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  min-width: 0;
}

.code-pane { min-width: 0; padding: 16px 14px 20px; overflow: hidden; }
.code-pane-out { background: rgba(0,0,0,0.25); }

.code-pane-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  font-family: var(--mono);
}
.code-pane-label-out { color: #60a5fa; opacity: 0.7; }

/* Divider between panes */
.pane-sep {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 0;
}
.pane-sep-line { flex: 1; width: 1px; background: var(--border); }
.pane-sep-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--og-faint);
  border: 1px solid var(--og-border);
  color: var(--orange);
  flex-shrink: 0;
  margin: 8px 0;
}

/* Code block */
pre.code {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.72;
  color: #c9c9c9;
  white-space: pre;
  overflow: hidden;
  text-overflow: clip;
}

/* Syntax tokens */
pre.code .kw  { color: #f97316; font-weight: 600; }
pre.code .fn  { color: #c4b5fd; }
pre.code .bi  { color: #60a5fa; }
pre.code .str { color: #86efac; }
pre.code .num { color: #fb923c; }
pre.code .cm  { color: #3a3a3a; font-style: italic; }
pre.code .op  { color: #6b7280; }

/* Obfuscated output tokens */
pre.code .obf      { color: #999; }
pre.code .obf-muted { color: #555; }

/* ══════════════════════════════════════════
   FEATURES STRIP
══════════════════════════════════════════ */
.features {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.features-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: stretch;
}

.feat {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 36px 28px;
}
.feat:first-child { padding-left: 0; }
.feat:last-child { padding-right: 0; }

.feat-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  flex-shrink: 0;
}

.feat-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--og-faint);
  border: 1px solid var(--og-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  flex-shrink: 0;
}
.feat-icon svg { width: 17px; height: 17px; }

.feat-body h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--white);
}
.feat-body p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.footer {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--border);
}
.footer-logo { font-size: 0.95rem; }
.footer p { font-size: 0.75rem; color: var(--muted); }

/* Error banner */
.error-banner {
  position: fixed;
  top: 54px; left: 0; right: 0;
  z-index: 200;
  background: rgba(239,68,68,0.1);
  border-bottom: 1px solid rgba(239,68,68,0.25);
  color: #fca5a5;
  text-align: center;
  padding: 10px;
  font-size: 0.83rem;
  font-family: var(--font);
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 42px;
    text-align: center;
  }
  .hero-text { align-items: center; }
  .hero-desc { max-width: 100%; }
  .eyebrow { justify-content: center; }
  h1 { font-size: clamp(2.4rem, 6vw, 3.2rem); }
  .code-window {
    width: min(100%, 720px);
    justify-self: center;
  }
  .features-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0;
  }
  .feat {
    padding: 28px;
    border-bottom: 1px solid var(--border);
  }
  .feat:first-child,
  .feat:last-child {
    padding-left: 28px;
    padding-right: 28px;
  }
  .feat-divider { display: none; }
  .feat:nth-of-type(5),
  .feat:nth-of-type(7) {
    border-bottom: none;
  }
}

@media (max-width: 700px) {
  .nav {
    height: 56px;
    padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right));
  }
  .features-inner {
    flex-direction: column;
    display: flex;
    padding: 0;
  }
  .feat { padding: 24px 20px; }
  .feat:first-child { padding-left: 20px; }
  .feat:last-child  { padding-right: 20px; }
  .feat-divider { width: auto; height: 1px; align-self: auto; }
  .window-panes {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .pane-sep {
    flex-direction: row;
    padding: 0 16px;
    height: 32px;
  }
  .pane-sep-line { flex: 1; height: 1px; width: auto; }
  .pane-sep-icon { margin: 0 8px; }
  .btn-signin { min-height: 36px; padding-inline: 13px; }
  .hero {
    align-items: flex-start;
    padding: 92px 16px 48px;
  }
  .hero-inner { gap: 38px; }
  .hero-desc {
    font-size: 0.95rem;
    line-height: 1.7;
  }
  .footer { padding: 20px 16px; }
  h1 { letter-spacing: -1.5px; }
  .window-badge { display: none; }
  .window-tabs { justify-content: flex-end; }
  .code-window {
    border-radius: 12px;
    box-shadow:
      0 0 0 1px rgba(255,255,255,0.04),
      0 22px 44px rgba(0,0,0,0.52),
      0 0 36px rgba(249,115,22,0.05);
  }
  .code-pane {
    padding: 14px 12px 18px;
  }
}

@media (max-width: 460px) {
  .logo { font-size: 1rem; }
  .btn-signin { font-size: 0.78rem; gap: 6px; }
  .btn-signin svg { width: 14px; height: 14px; }
  .cta-btn {
    width: 100%;
    justify-content: center;
    padding-inline: 18px;
  }
  .window-tabs svg,
  .wtab:not(.wtab-active) { display: none; }
  pre.code { font-size: 10.5px; }
  .window-bar {
    height: 38px;
    padding-inline: 12px;
  }
  .window-dots span {
    width: 9px;
    height: 9px;
  }
  .features { margin-top: 0; }
  .feat {
    gap: 13px;
  }
}

@media (max-width: 380px) {
  .btn-signin {
    padding-inline: 10px;
  }
  .btn-signin svg {
    display: none;
  }
  h1 {
    font-size: 2.2rem;
  }
  .eyebrow {
    font-size: 0.66rem;
    letter-spacing: 0.1em;
  }
  pre.code {
    font-size: 9.8px;
  }
}

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