:root {
  --bg: #0D0D0D;
  --bg-2: #111111;
  --bg-3: #1A1A1A;
  --fg: #F5F5F0;
  --fg-2: #999999;
  --accent: #F59E0B;
  --accent-dim: rgba(245, 158, 11, 0.12);
  --border: rgba(245, 245, 240, 0.08);
  --font-display: 'Sora', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 8px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 13, 13, 0.9);
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo-icon {
  width: 32px;
  height: 32px;
}
.nav-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.nav-tagline {
  font-size: 0.8rem;
  color: var(--fg-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  color: var(--fg-2);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--fg); }
.nav-cta {
  background: var(--accent);
  color: #000;
  padding: 8px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.85; }

/* HERO */
.hero {
  position: relative;
  overflow: hidden;
  padding: 100px 0 80px;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}
.hero-shape-1 {
  width: 500px;
  height: 500px;
  background: var(--accent);
  top: -150px;
  right: -100px;
}
.hero-shape-2 {
  width: 300px;
  height: 300px;
  background: #fff;
  bottom: 0;
  left: 20%;
  opacity: 0.04;
}
.hero-shape-3 {
  width: 200px;
  height: 200px;
  background: var(--accent);
  bottom: 60px;
  right: 30%;
  opacity: 0.08;
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}
.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  max-width: 700px;
}
.hero-title-accent {
  color: var(--accent);
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--fg-2);
  max-width: 520px;
  margin-bottom: 40px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #000;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.85; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-3);
  color: var(--fg);
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.btn-secondary:hover { border-color: rgba(245, 245, 240, 0.2); }

/* HOW IT WORKS */
.how {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 40px;
  border-top: 1px solid var(--border);
}
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.section-sub {
  color: var(--fg-2);
  font-size: 1rem;
  margin-bottom: 56px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.step-num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.step-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}
.step-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.step-desc {
  color: var(--fg-2);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* CTA SECTION */
.cta-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 40px;
  border-top: 1px solid var(--border);
}
.cta-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 64px;
  text-align: center;
}
.cta-box h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.cta-box p {
  color: var(--fg-2);
  font-size: 1rem;
  margin-bottom: 32px;
}

/* FORM SECTION */
.generate-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 40px;
  border-top: 1px solid var(--border);
}
.generate-form {
  max-width: 640px;
  margin: 0 auto;
}
.form-group {
  margin-bottom: 24px;
}
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
}
.form-input, .form-textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s;
  outline: none;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--accent);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
}
.form-hint {
  font-size: 0.8rem;
  color: var(--fg-2);
  margin-top: 6px;
}
.form-error {
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 6px;
  display: none;
}
.form-error.show { display: block; }
.generating-state {
  display: none;
  text-align: center;
  padding: 40px;
}
.generating-state.active { display: block; }
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.generating-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.generating-sub {
  color: var(--fg-2);
  font-size: 0.9rem;
}
.progress-bar-wrap {
  max-width: 400px;
  margin: 24px auto 0;
  height: 4px;
  background: var(--bg-3);
  border-radius: 100px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  width: 0%;
  transition: width 0.5s ease;
}

/* PREVIEW SECTION */
.preview-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 40px;
  border-top: 1px solid var(--border);
}
.preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 20px;
}
.preview-header h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.preview-count {
  background: var(--accent-dim);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}
.creatives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.creative-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}
.creative-card:hover {
  border-color: rgba(245, 245, 240, 0.18);
}
.creative-img {
  width: 100%;
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
  display: block;
}
.creative-body {
  padding: 20px;
}
.creative-headline {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}
.creative-body-text {
  color: var(--fg-2);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 12px;
}
.creative-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 10px;
  font-size: 0.75rem;
  color: var(--fg-2);
}
.tag-accent {
  background: var(--accent-dim);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--accent);
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer p {
  color: var(--fg-2);
  font-size: 0.85rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-inner { padding: 0 20px; }
  .nav-links { display: none; }
  .hero { padding: 60px 20px 50px; }
  .steps { grid-template-columns: 1fr; }
  .how, .cta-section, .generate-section, .preview-section { padding: 60px 20px; }
  .cta-box { padding: 40px 24px; }
  .preview-header { flex-direction: column; }
  .footer { flex-direction: column; text-align: center; }
  .creatives-grid { grid-template-columns: 1fr; }
}