:root {
  --bg-0: #f8fafc;
  --bg-1: #ffffff;
  --bg-2: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.78);
  --ink-1: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --brand: #0f766e;
  --brand-dark: #0a1920;
  --brand-mint: #10b981;
  --brand-glow: rgba(16, 185, 129, 0.14);
  --accent-indigo: #4f46e5;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 20px 50px -12px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.05);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-1);
  background-color: var(--bg-0);
  background-image:
    radial-gradient(900px 480px at 50% -80px, rgba(16, 185, 129, 0.12), transparent 70%),
    radial-gradient(700px 420px at 85% 120px, rgba(79, 70, 229, 0.08), transparent 70%),
    linear-gradient(to right, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-glass);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.nav-bar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(10, 25, 32, 0.18);
}

.brand-domain {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.24);
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-lg {
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
  border-radius: 12px;
}

.btn-primary {
  background: var(--ink-1);
  color: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.btn-primary:hover {
  background: #1e293b;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
}

.btn-secondary {
  background: var(--bg-1);
  color: var(--ink-1);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-2);
  border-color: #94a3b8;
}

.btn-accent {
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #fff;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.25);
}

.btn-accent:hover {
  filter: brightness(1.06);
}

/* Hero */
.hero {
  padding: 76px 0 64px;
  text-align: center;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 24px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-mint);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.hero h1 {
  margin: 0 auto 20px;
  max-width: 960px;
  font-size: clamp(30px, 4.3vw, 52px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 800;
  text-wrap: balance;
}

.text-gradient {
  background: linear-gradient(115deg, #0a2e2e 0%, #0f766e 52%, #10b981 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 0 auto 34px;
  max-width: 680px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.hero-meta {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 52px;
}

/* Interactive Studio Window Mockup */
.studio-window {
  text-align: left;
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.window-topbar {
  height: 48px;
  padding: 0 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.window-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 650;
}

.window-brand img {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.window-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-2);
  padding: 4px;
  border-radius: 9px;
}

.win-tab {
  border: 0;
  background: transparent;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s ease;
}

.win-tab.is-active {
  background: var(--bg-1);
  color: var(--brand);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.window-status {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}

.window-body {
  display: grid;
  grid-template-columns: 128px 1fr;
  min-height: 410px;
}

.studio-rail {
  background: #f8fafc;
  border-right: 1px solid var(--line);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-item {
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
  cursor: pointer;
}

.rail-item.is-active {
  background: #e6f4f1;
  color: var(--brand);
  font-weight: 650;
}

.studio-stage {
  padding: 24px;
  background-color: #ffffff;
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 20px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-panel {
  display: none;
  width: 100%;
  gap: 20px;
}

.stage-panel.is-active {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.mock-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-indigo {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

.slot-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.slot-box {
  background: var(--bg-0);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 10px 8px;
  font-size: 12px;
  text-align: center;
  color: var(--ink-2);
}

.slot-box strong {
  display: block;
  font-size: 11px;
  color: var(--brand);
  font-family: var(--font-mono);
  margin-bottom: 2px;
}

.code-preview {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  overflow-x: auto;
}

.code-preview .kw {
  color: #69faba;
}

.code-preview .tag {
  color: #93c5fd;
}

.param-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.param-pills span {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--ink-2);
  font-family: var(--font-mono);
}

/* Sections */
.section {
  padding: 84px 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 52px;
}

.section-header h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.025em;
}

.section-header p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
}

/* Feature Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.bento-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.bento-card:hover {
  transform: translateY(-2px);
  border-color: #94a3b8;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.bento-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.bento-card h3 {
  margin: 0 0 10px;
  font-size: 21px;
  letter-spacing: -0.015em;
}

.bento-card p {
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 14.5px;
}

.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.feature-list li::before {
  content: "✦";
  color: var(--brand-mint);
  margin-right: 8px;
}

/* Workflow Steps */
.workflow-box {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ink-1);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

.step-card h4 {
  margin: 0 0 8px;
  font-size: 17px;
}

.step-card p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}

/* API Key & Download Portal */
.portal-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
}

.portal-card {
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.portal-card.is-dark {
  background: linear-gradient(145deg, #0a1920, #132c33);
  color: #f8fafc;
  border-color: #294c52;
}

.portal-card.is-dark p {
  color: #cbd5e1;
}

.key-tiers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0 24px;
}

.key-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-0);
  border: 1px solid var(--line);
}

.key-item strong {
  display: block;
  font-size: 14.5px;
  margin-bottom: 2px;
}

.key-item span {
  font-size: 13px;
  color: var(--ink-3);
}

.download-specs {
  margin: 20px 0 26px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13.5px;
  display: grid;
  gap: 8px;
}

.download-specs div {
  display: flex;
  justify-content: space-between;
  color: #e2e8f0;
}

.download-specs code {
  color: #69faba;
  font-family: var(--font-mono);
}

/* Toast Modal */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: 360px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--ink-1);
  color: #fff;
  font-size: 13.5px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13.5px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 920px) {
  .nav-links {
    display: none;
  }
  .window-body {
    grid-template-columns: 1fr;
  }
  .studio-rail {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .stage-panel.is-active,
  .bento-grid,
  .steps-grid,
  .portal-grid {
    grid-template-columns: 1fr;
  }
}
