/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0b0d12;
  color: #e7e9ee;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input[type="range"] { accent-color: #6d5efc; }
h1, h2, h3 { margin: 0 0 .5em; font-weight: 800; letter-spacing: -0.02em; }
p { margin: 0 0 1em; color: #a6acbb; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

:root {
  --bg: #0b0d12;
  --surface: #12151c;
  --surface-2: #171b24;
  --border: #232836;
  --text: #e7e9ee;
  --text-dim: #a6acbb;
  --accent: #6d5efc;
  --accent-2: #46c8ff;
  --radius: 14px;
}

.grad-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--accent-2);
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn.full { width: 100%; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(109, 94, 252, .6);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(109, 94, 252, .75); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: #3a4257; background: var(--surface-2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 13, 18, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-text { font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.logo-text span { color: var(--accent-2); }
.main-nav { display: flex; align-items: center; gap: 28px; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--text-dim); transition: color .15s ease; }
.nav-link:hover { color: var(--text); }
.nav-cta {
  padding: 9px 18px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}
.nav-cta:hover { border-color: var(--accent); color: var(--text); }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 60px; overflow: hidden; position: relative; }
.hero::before {
  content: "";
  position: absolute;
  top: -200px; right: -200px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(109,94,252,.25), transparent 70%);
  pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; position: relative; }
.hero h1 { font-size: 46px; line-height: 1.12; }
.hero .lead { font-size: 17px; max-width: 480px; }
.hero-actions { display: flex; gap: 14px; margin: 28px 0 40px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; }
.hero-stats strong { display: block; font-size: 22px; font-weight: 800; }
.hero-stats span { font-size: 13px; color: var(--text-dim); }

.hero-visual { display: flex; justify-content: center; }
.mock-window {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
  transform: perspective(1000px) rotateY(-6deg) rotateX(2deg);
}
.mock-titlebar { display: flex; gap: 6px; padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.mock-titlebar span { width: 10px; height: 10px; border-radius: 50%; background: #3a4257; }
.mock-titlebar span:first-child { background: #ff6d6d; }
.mock-titlebar span:nth-child(2) { background: #ffd166; }
.mock-titlebar span:nth-child(3) { background: #38d39f; }
.mock-body { padding: 18px; }
.mock-canvas { border-radius: 10px; overflow: hidden; margin-bottom: 16px; aspect-ratio: 4/3; }
.mock-gradient { width: 100%; height: 100%; background: linear-gradient(135deg, #6d5efc, #46c8ff 45%, #ff6d9c 100%); }
.mock-slider { margin-bottom: 12px; }
.mock-slider span { font-size: 12px; color: var(--text-dim); display: block; margin-bottom: 6px; }
.mock-slider i { display: block; height: 5px; border-radius: 3px; background: var(--border); position: relative; }
.mock-slider i::before {
  content: "";
  position: absolute; inset: 0;
  width: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 3px;
}
.mock-chip-row { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.mock-chip { font-size: 11px; padding: 6px 10px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim); }
.mock-chip.active { background: var(--accent); color: #fff; border-color: transparent; }

/* ---------- Logos strip ---------- */
.logos { padding: 20px 0 60px; text-align: center; }
.logos p { font-size: 13px; color: #5c6478; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Features ---------- */
.section-head { text-align: center; max-width: 560px; margin: 0 auto 48px; }
.section-head h2 { font-size: 32px; }
.features { padding: 40px 0 90px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .15s ease, border-color .15s ease;
}
.feature-card:hover { transform: translateY(-3px); border-color: #343c50; }
.feature-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; margin: 0; }

/* ---------- How it works ---------- */
.how { padding: 20px 0 100px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.steps li { position: relative; padding-left: 4px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  font-weight: 700; font-size: 15px; color: var(--accent-2);
  margin-bottom: 14px;
}
.steps h3 { font-size: 17px; margin-bottom: 6px; }
.steps p { font-size: 14px; }
.cta-inline { text-align: center; margin-top: 48px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-brand p { font-size: 13px; margin: 6px 0 0; max-width: 260px; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { font-size: 14px; color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 13px; color: #5c6478; }

/* ==================================================== */
/* ---------- Editor layout ---------- */
/* ==================================================== */
.editor-main { min-height: calc(100vh - 68px); background: var(--bg); }
.editor-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: calc(100vh - 68px);
}

.editor-panel {
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.panel-scroll { padding: 22px; display: flex; flex-direction: column; gap: 28px; }
.panel-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); margin-bottom: 14px; font-weight: 700; }

.upload-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 600; font-size: 14px;
}
.hint { font-size: 12px; color: #5c6478; margin: 10px 0 0; }

.slider-row { margin-bottom: 18px; }
.slider-row label {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--text-dim); margin-bottom: 8px;
}
.slider-row output { color: var(--text); font-weight: 600; }
.slider-row input[type="range"] {
  width: 100%; height: 4px; border-radius: 3px;
  background: var(--border); appearance: none; -webkit-appearance: none;
}
.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-2);
  border: 2px solid #0b0d12;
  cursor: pointer;
  margin-top: -6px;
}
.slider-row input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent-2); border: 2px solid #0b0d12; cursor: pointer;
}

.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 13px; border-radius: 20px; font-size: 13px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
  transition: all .15s ease;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active { background: var(--accent); border-color: transparent; color: #fff; }

.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
  font-size: 12px; transition: all .15s ease;
}
.tool-btn:hover { border-color: var(--accent); color: var(--text); }

.actions-section { display: flex; flex-direction: column; gap: 10px; }
.editor-panel [hidden] { display: none !important; }

.editor-stage {
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
  background:
    radial-gradient(circle at 20% 20%, rgba(109,94,252,.08), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(70,200,255,.08), transparent 40%);
}
.stage-inner {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.dropzone {
  width: 100%; max-width: 520px;
  border: 2px dashed var(--border);
  border-radius: 18px;
  padding: 70px 30px;
  text-align: center;
  color: var(--text-dim);
  transition: border-color .15s ease, background .15s ease;
  cursor: pointer;
}
.dropzone.drag-over { border-color: var(--accent); background: rgba(109,94,252,.06); }
.dropzone svg { margin: 0 auto 16px; color: var(--accent-2); }
.dropzone h3 { color: var(--text); font-size: 18px; margin-bottom: 6px; }
.dropzone p { margin: 0; font-size: 14px; }
.link-like { color: var(--accent-2); font-weight: 600; }

#canvas {
  max-width: 100%; max-height: calc(100vh - 132px);
  border-radius: 12px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .editor-shell { grid-template-columns: 1fr; }
  .editor-panel { border-right: none; border-bottom: 1px solid var(--border); max-height: 46vh; }
}
@media (max-width: 680px) {
  .main-nav { position: fixed; top: 68px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: column; padding: 18px 24px; gap: 16px; transform: translateY(-140%); transition: transform .2s ease; }
  .main-nav.open { transform: translateY(0); }
  .nav-toggle { display: flex; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
