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

:root {
  --bg:          #090b10;
  --surface:     #0f1117;
  --surface-2:   #161922;
  --border:      #1e2230;
  --border-2:    #252a3a;
  --text:        #e8eaf2;
  --text-muted:  #6b7280;
  --text-subtle: #9ca3af;
  --accent:      #4f86f7;
  --accent-2:    #7ba4f9;
  --success:     #34d399;
  --warning:     #fbbf24;

  --radius:    12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --font:      'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-md: 0 4px 24px rgba(0,0,0,.45);
  --shadow-lg: 0 8px 48px rgba(0,0,0,.6);

  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; border-radius: var(--radius); }

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

kbd {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: .85em;
  color: var(--text);
}

code {
  font-family: var(--font-mono);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: .88em;
  color: var(--accent-2);
}

/* ───────────────────────────── LAYOUT ───────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }

/* ───────────────────────────── TYPOGRAPHY ───────────────────────────── */
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; }

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 60%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ───────────────────────────── BUTTONS ───────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(79,134,247,.4);
}
.btn-primary:hover {
  background: var(--accent-2);
  box-shadow: 0 0 0 6px rgba(79,134,247,.15);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-2);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-2);
}

.btn-sm  { padding: 8px 16px; font-size: .875rem; }
.btn-lg  { padding: 14px 28px; font-size: 1rem; }

/* ───────────────────────────── IMAGE PLACEHOLDERS ───────────────────────────── */
.image-placeholder {
  background: var(--surface-2);
  border: 2px dashed var(--border-2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: border-color var(--transition);
}
.image-placeholder:hover { border-color: var(--accent); }

.img-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 24px;
  color: var(--text-muted);
  text-align: center;
}
.img-placeholder-inner svg { opacity: .4; }
.img-placeholder-inner p { font-size: .9rem; font-weight: 500; color: var(--text-subtle); }
.img-placeholder-inner span { font-size: .75rem; opacity: .6; font-family: var(--font-mono); }

/* ───────────────────────────── SECTION HEADER ───────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header p {
  margin-top: 14px;
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.section-tag {
  display: inline-block;
  background: rgba(79,134,247,.12);
  border: 1px solid rgba(79,134,247,.25);
  color: var(--accent);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ───────────────────────────── NAV ───────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9,11,16,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 28px;
  flex: 1;
}
.nav-links a {
  font-size: .9rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }

/* ───────────────────────────── HERO ───────────────────────────── */
.hero {
  padding: 100px 0 80px;
  background:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(79,134,247,.18) 0%, transparent 70%),
    var(--bg);
}

.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(79,134,247,.1);
  border: 1px solid rgba(79,134,247,.2);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: .82rem;
  color: var(--accent-2);
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-title { margin-bottom: 20px; }

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  margin-bottom: 48px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 56px;
  flex-wrap: wrap;
  justify-content: center;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat strong { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.stat span { font-size: .78rem; color: var(--text-muted); }
.stat-sep { width: 1px; height: 36px; background: var(--border-2); }

.hero-image-wrap {
  position: relative;
  width: 100%;
  max-width: 860px;
}

/* ── Image sizing rules (replace placeholders) ── */
.hero-image-wrap img {
  display: block;
  width: 420px;
  max-width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  object-position: top;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.feature-card img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  margin-top: 8px;
}

.step img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

.screenshot-item img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  object-fit: cover;
  object-position: top;
}

.screenshot-main img {
  max-height: 500px;
}

.screenshot-wide img {
  max-height: 240px;
}

.screenshot-item:not(.screenshot-main):not(.screenshot-wide) img {
  max-height: 280px;
}

.hero-img-placeholder { min-height: 440px; border-radius: var(--radius-lg); }

.hero-image-badge {
  position: absolute;
  bottom: -16px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: .8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(52,211,153,.4);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52,211,153,.4); }
  70%  { box-shadow: 0 0 0 8px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}

/* ───────────────────────────── FEATURES ───────────────────────────── */
.features { background: var(--surface); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--transition), transform var(--transition);
}
.feature-card:hover {
  border-color: rgba(79,134,247,.4);
  transform: translateY(-2px);
}

.feature-large { grid-column: span 6; }
.feature-card:not(.feature-large):not(.feature-wide) { grid-column: span 3; }
.feature-wide { grid-column: span 12; }

.feature-icon { font-size: 1.8rem; }

.feature-card p { color: var(--text-muted); font-size: .9rem; line-height: 1.65; }

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .875rem;
  color: var(--text-subtle);
}
.feature-list li { display: flex; align-items: center; gap: 8px; }

.feature-img-placeholder { min-height: 180px; margin-top: 8px; }
.feature-img-sm { min-height: 130px; }

.api-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 4px;
}
.api-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.api-icon { font-size: 1.4rem; }
.api-card strong { font-size: .9rem; font-weight: 600; }
.api-card span { font-size: .8rem; color: var(--text-muted); line-height: 1.5; }

/* ───────────────────────────── HOW IT WORKS ───────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 56px; }

.step {
  display: grid;
  grid-template-columns: 56px 1fr 1fr;
  gap: 32px;
  align-items: center;
}
.step-reverse { direction: rtl; }
.step-reverse > * { direction: ltr; }

.step-number {
  font-size: 3rem;
  font-weight: 800;
  color: rgba(79,134,247,.2);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.step-content { display: flex; flex-direction: column; gap: 12px; }
.step-content h3 { font-size: 1.3rem; }
.step-content p { color: var(--text-muted); line-height: 1.7; }

.step-img { min-height: 220px; }

/* ───────────────────────────── SCREENSHOTS ───────────────────────────── */
.screenshots { background: var(--surface); }

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.screenshot-item { display: flex; flex-direction: column; gap: 10px; }
.screenshot-main { grid-column: span 2; grid-row: span 2; }
.screenshot-wide { grid-column: span 2; }

.screenshot-item .image-placeholder { min-height: 200px; flex: 1; }
.screenshot-main .image-placeholder { min-height: 440px; }
.screenshot-wide .image-placeholder { min-height: 200px; }

.screenshot-caption {
  font-size: .8rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
}

.upload-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 12px 16px;
  background: rgba(79,134,247,.06);
  border: 1px solid rgba(79,134,247,.15);
  border-radius: var(--radius);
  font-size: .82rem;
  color: var(--text-muted);
}
.upload-hint svg { flex-shrink: 0; color: var(--accent); }

/* ───────────────────────────── SHORTCUTS ───────────────────────────── */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.shortcut-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.shortcut-card > span { color: var(--text-muted); font-size: 1rem; }
.shortcut-card kbd { font-size: 1rem; padding: 6px 12px; }
.shortcut-card p { font-size: .82rem; color: var(--text-muted); margin-top: 8px; }

/* ───────────────────────────── LANGUAGES ───────────────────────────── */
.languages { background: var(--surface); }

.lang-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.lang-badge {
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  padding: 6px 18px;
  font-size: .875rem;
  font-family: var(--font-mono);
  color: var(--text-subtle);
  transition: all var(--transition);
}
.lang-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(79,134,247,.06);
}

/* ───────────────────────────── FAQ ───────────────────────────── */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item[open] { border-color: rgba(79,134,247,.3); }

.faq-item summary {
  padding: 18px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .95rem;
  user-select: none;
}
.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 16px;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item p {
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.75;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* ───────────────────────────── CTA ───────────────────────────── */
.cta-section { background: var(--surface); }

.cta-card {
  background: linear-gradient(135deg, rgba(79,134,247,.08) 0%, rgba(167,139,250,.06) 100%);
  border: 1px solid rgba(79,134,247,.2);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  display: flex;
  align-items: center;
  gap: 48px;
}

.cta-image-placeholder {
  width: 280px;
  min-height: 280px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
}

.cta-content { flex: 1; display: flex; flex-direction: column; gap: 16px; }
.cta-content h2 { font-size: 2rem; }
.cta-content > p { color: var(--text-muted); font-size: 1rem; }

.cta-sub {
  font-size: .78rem !important;
  color: var(--text-muted) !important;
  opacity: .7;
  margin-top: -4px;
}

/* ───────────────────────────── FOOTER ───────────────────────────── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .95rem;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-size: .85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text); }

.footer-copy {
  font-size: .8rem;
  color: var(--text-muted);
  opacity: .6;
}

/* ───────────────────────────── ANIMATIONS ───────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease both; }
.fade-up-2 { animation: fadeUp .6s .15s ease both; }
.fade-up-3 { animation: fadeUp .6s .3s ease both; }

/* ───────────────────────────── RESPONSIVE ───────────────────────────── */
@media (max-width: 1024px) {
  .feature-large { grid-column: span 12; }
  .feature-card:not(.feature-large):not(.feature-wide) { grid-column: span 6; }
  .step { grid-template-columns: 40px 1fr; }
  .step-img { display: none; }
  .api-cards { grid-template-columns: 1fr 1fr; }
  .screenshots-grid { grid-template-columns: repeat(2, 1fr); }
  .screenshot-main { grid-column: span 2; grid-row: span 1; }
  .screenshot-wide { grid-column: span 2; }
  .shortcuts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .nav-links { display: none; }
  .hero { padding: 72px 0 56px; }
  .feature-card:not(.feature-large):not(.feature-wide) { grid-column: span 12; }
  .feature-large { grid-column: span 12; }
  .features-grid { gap: 14px; }
  .api-cards { grid-template-columns: 1fr; }
  .shortcuts-grid { grid-template-columns: 1fr 1fr; }
  .cta-card { flex-direction: column; padding: 32px 24px; text-align: center; }
  .cta-image-placeholder { width: 100%; max-width: 280px; }
  .screenshots-grid { grid-template-columns: 1fr 1fr; }
  .step-reverse { direction: ltr; }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .shortcuts-grid { grid-template-columns: 1fr; }
  .screenshots-grid { grid-template-columns: 1fr; }
  .screenshot-main, .screenshot-wide { grid-column: span 1; }
}
