/* ==========================================================================
   EdgarKit landing page
   Single stylesheet, no frameworks. Modern but understated.
   ========================================================================== */

:root {
  --bg: #0a0a0c;
  --bg-elevated: #131318;
  --bg-card: #16171c;
  --border: #24262e;
  --border-strong: #34373f;
  --text: #ecedf1;
  --text-muted: #b4b6c0;
  --text-dim: #8e919b;
  --accent: #7c5cff;
  --accent-bright: #9d85ff;
  --accent-dim: #5b3fff;
  --success: #34d399;
  --code-bg: #0c0d11;
  --code-key: #c4b5fd;
  --code-string: #a7e3a4;
  --code-num: #fbbf24;
  --code-comment: #6b6e78;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 48px rgba(124, 92, 255, 0.18);
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(124, 92, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(94, 234, 212, 0.06), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

a { color: var(--accent-bright); text-decoration: none; }
a:hover { color: var(--accent); }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ====== NAV ====== */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 12, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 17px;
}
.brand:hover { color: var(--text); }
.logo { font-size: 20px; }
.logo-img {
  display: block;
  border-radius: 6px;
  object-fit: contain;
}
.brand-name { letter-spacing: -0.02em; font-weight: 700; }
.footer-brand { display: flex; align-items: center; gap: 8px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }
.nav-links .btn {
  margin-left: 8px;
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1;
}
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: white;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 8px 24px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover {
  filter: brightness(1.1);
  color: white;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ====== HERO ====== */
.hero {
  padding: 80px 0 100px;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-content { max-width: 540px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: var(--success);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 24px;
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

h1 {
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 20px;
}
.gradient-text {
  background: linear-gradient(135deg, #b8a4ff 0%, #7c5cff 60%, #5eead4 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 32px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
}
.hero-meta .sep { color: var(--border-strong); }

/* ====== CODE BLOCK ====== */
.hero-code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green { background: #28c840; }
.code-title {
  margin-left: 8px;
  color: var(--text-dim);
  font-size: 12px;
  font-family: var(--font-mono);
}
.code-block {
  margin: 0;
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
}
.c-comment { color: var(--code-comment); }
.c-key { color: var(--code-key); }
.c-string { color: var(--code-string); }
.c-num { color: var(--code-num); }

/* ====== SECTIONS ====== */
section { padding: 80px 0; }

.section-title {
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 14px;
  text-align: center;
}
.section-sub {
  font-size: 18px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 auto 56px;
  max-width: 560px;
}

/* ====== FEATURES ====== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
}
.feature:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  font-size: 24px;
  margin-bottom: 14px;
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
}
.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.55;
}

/* ====== PRICING ====== */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
}
.price-card {
  position: relative;
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}
.price-card-featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.price-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
}
.price-name {
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 10px;
}
.price-amount {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.price-amount span {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
}
.price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  flex: 1;
}
.price-list li {
  padding: 8px 0;
  color: var(--text);
  font-size: 14.5px;
  position: relative;
  padding-left: 24px;
}
.price-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* ====== DOCS ====== */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
.docs-step {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: white;
  border-radius: 50%;
  font-weight: 700;
  margin-bottom: 14px;
  font-size: 14px;
}
.docs-step h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.docs-step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.docs-h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 48px 0 16px;
  letter-spacing: -0.01em;
}

.endpoint-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
  margin-bottom: 32px;
}
.endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.endpoint:last-child { border-bottom: none; }
.endpoint code {
  color: var(--text);
  background: transparent;
}
.endpoint .ep-desc {
  margin-left: auto;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
}
.method {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-family: var(--font-sans);
  min-width: 44px;
  text-align: center;
}
.method.get { background: rgba(52, 211, 153, 0.15); color: var(--success); }
.method.post { background: rgba(124, 92, 255, 0.2); color: var(--accent-bright); }

.docs-code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}
.docs-code code { color: var(--text); }

/* ====== WATCH DEMO BUTTON + MODAL ====== */
.watch-demo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  background: none;
  border: none;
  color: var(--text-muted, #98a2b3);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 0;
  font-family: inherit;
  transition: color 0.15s;
}
.watch-demo-link:hover {
  color: var(--accent-bright);
}
.watch-demo-link .play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(124, 92, 255, 0.15);
  color: var(--accent-bright);
  font-size: 9px;
  padding-left: 1px;
}

.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.demo-modal[hidden] { display: none; }
.demo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}
.demo-modal-panel {
  position: relative;
  width: 100%;
  max-width: 960px;
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.demo-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.demo-modal-close:hover { background: rgba(255,255,255,0.15); }
.demo-modal-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;  /* 16:9 */
}
.demo-modal-video iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ====== RECIPES ====== */
.recipes-sub {
  margin-top: -8px;
  margin-bottom: 32px;
}
.recipes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
.recipe {
  background: var(--surface, rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 24px;
  align-items: start;
}
.recipe-head h4 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
}
.recipe-head p {
  margin: 0;
  color: var(--text-muted, #98a2b3);
  font-size: 14px;
  line-height: 1.55;
}
.recipe-head code {
  background: rgba(124, 92, 255, 0.12);
  color: var(--accent-bright);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12.5px;
}
.recipe .docs-code {
  font-size: 12.5px;
  padding: 18px;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
}
.recipe .docs-code code {
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
  display: block;
}
@media (max-width: 820px) {
  .recipe {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ====== SIGNUP ====== */
.signup {
  padding-bottom: 100px;
}
.signup-form {
  display: flex;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
}
.signup-form input {
  flex: 1;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease;
}
.signup-form input:focus { border-color: var(--accent); }

.signup-result {
  max-width: 720px;
  margin: 32px auto 0;
}
.hidden { display: none !important; }

.result-success {
  background: var(--bg-card);
  border: 1px solid var(--success);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.result-success h3 {
  margin: 0 0 8px;
  color: var(--success);
}
.api-key {
  background: var(--code-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--code-string);
  margin: 16px 0;
  word-break: break-all;
  white-space: pre-wrap;
}
.result-meta {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 13.5px;
}
.result-meta code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

.result-error {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  color: #fca5a5;
}

/* ====== FOOTER ====== */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 14px;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.footer-meta { color: var(--text-dim); font-size: 13px; }

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
  .hero { padding: 60px 0 80px; }
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  h1 { font-size: 40px; }
  .lead { font-size: 17px; }
  .section-title { font-size: 30px; }
  section { padding: 60px 0; }
  .feature-grid, .price-grid, .docs-grid {
    grid-template-columns: 1fr;
  }
  .price-card-featured { transform: none; }
  .nav-links a:not(.btn) { display: none; }
  .signup-form { flex-direction: column; }
  .endpoint .ep-desc { display: none; }
}
