/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;700;900&display=swap');

/* ── Utilities ── */
.hidden { display: none !important; }

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #fff;
  background: #1C1649;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.55rem 1.35rem;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer; border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
  text-decoration: none;
}
.btn-primary {
  background: #DB3D44; color: #fff; border-color: #DB3D44;
}
.btn-primary:hover { background: #c4343a; border-color: #c4343a; }
.btn-outline {
  background: transparent; color: #fff; border-color: rgba(255,255,255,0.4);
}
.btn-outline:hover { background: rgba(255,255,255,0.08); border-color: #fff; }
.btn-lg { padding: 0.85rem 2.25rem; font-size: 1.05rem; }
.btn-full { width: 100%; }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.82rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Landing page ── */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 2.5rem;
  background: rgba(28, 22, 73, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: sticky; top: 0; z-index: 100;
  transition: background 0.2s;
}
.logo {
  font-size: 1.2rem; font-weight: 900; color: #fff; letter-spacing: -0.01em;
}
.logo span { color: #DB3D44; }
.nav-links { display: flex; gap: 1.25rem; align-items: center; }
.nav-links a:not(.btn) {
  font-weight: 500; color: rgba(255,255,255,0.75);
  transition: color 0.15s;
}
.nav-links a:not(.btn):hover { color: #fff; }

/* ── Hero ── */
.hero {
  padding: 6rem 2rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(219,61,68,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(155,151,194,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(219,61,68,0.15);
  border: 1px solid rgba(219,61,68,0.35);
  color: #DB3D44; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.35rem 1rem; border-radius: 999px;
  margin-bottom: 2rem;
}
.hero-badge::before { content: '•'; }
.hero-content { position: relative; z-index: 1; }
.hero h1 {
  font-size: 3rem; font-weight: 900; color: #fff;
  max-width: 720px; margin: 0 auto 1.25rem;
  line-height: 1.1; letter-spacing: -0.02em;
}
.hero h1 span { color: #DB3D44; }
.hero-sub {
  font-size: 1.15rem; font-weight: 400; color: #9B97C2;
  max-width: 520px; margin: 0 auto 2.5rem; line-height: 1.65;
}
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.hero-note { font-size: 0.82rem; color: #9B97C2; font-weight: 300; }

/* ── Sections ── */
.features, .value-props, .pricing {
  padding: 5rem 2rem; max-width: 960px; margin: 0 auto;
}
.features h2, .pricing h2 {
  text-align: center; font-size: 2rem; font-weight: 900;
  margin-bottom: 3rem; letter-spacing: -0.02em;
}

/* ── Steps ── */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.step {
  text-align: center; padding: 2rem 1.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  transition: border-color 0.2s, background 0.2s;
}
.step:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(219,61,68,0.35);
}
.step-num {
  width: 42px; height: 42px; border-radius: 50%;
  background: #DB3D44; color: #fff;
  font-size: 1.05rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; color: #fff; }
.step p { font-size: 0.9rem; color: #9B97C2; }

/* ── Value props ── */
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.25rem; }
.value-item {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
}
.value-item .icon {
  font-size: 1.1rem; color: #DB3D44;
  font-weight: 900; flex-shrink: 0;
  margin-top: 0.1rem;
}
.value-item h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.25rem; color: #fff; }
.value-item p { font-size: 0.875rem; color: #9B97C2; }

/* ── Pricing ── */
.pricing-grid { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; }
.plan {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 2.25rem; width: 290px;
  text-align: center; position: relative;
  transition: border-color 0.2s;
}
.plan.featured {
  border-color: #DB3D44;
  background: rgba(219,61,68,0.06);
  box-shadow: 0 0 40px rgba(219,61,68,0.12);
}
.plan-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: #DB3D44; color: #fff;
  font-size: 0.75rem; font-weight: 700;
  padding: 0.25rem 1rem; border-radius: 999px;
  white-space: nowrap; letter-spacing: 0.03em;
}
.plan h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; color: #fff; }
.plan-price { font-size: 2.5rem; font-weight: 900; margin: 0.75rem 0 1.5rem; color: #fff; letter-spacing: -0.03em; }
.plan-price span { font-size: 1rem; font-weight: 400; color: #9B97C2; }
.plan ul { margin-bottom: 2rem; display: flex; flex-direction: column; gap: 0.6rem; text-align: left; }
.plan ul li { font-size: 0.9rem; color: #9B97C2; }
.plan ul li::before { content: "✓ "; color: #DB3D44; font-weight: 700; }

/* ── Footer ── */
.footer {
  text-align: center; padding: 2rem;
  color: #9B97C2; font-size: 0.82rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.footer a { color: #DB3D44; }

/* ── App shell ── */
.app-body { background: #1C1649; min-height: 100vh; }
.app-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.75rem;
  background: rgba(28,22,73,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: sticky; top: 0; z-index: 100;
}
.nav-right { display: flex; align-items: center; gap: 1rem; }
.user-email { font-size: 0.875rem; color: #9B97C2; font-weight: 400; }

.app-main {
  max-width: 680px; margin: 0 auto; padding: 2.5rem 1rem;
}

/* ── Screens ── */
.screen { display: none; }
.screen.active { display: block; }
.screen.hidden { display: none; }

/* ── Card ── */
.card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  padding: 2.25rem;
}
.card h2 {
  font-size: 1.5rem; font-weight: 900; margin-bottom: 0.5rem;
  color: #fff; letter-spacing: -0.02em;
}
.section-desc { color: #9B97C2; font-size: 0.95rem; margin-bottom: 1.75rem; }

/* ── Forms ── */
form { display: flex; flex-direction: column; gap: 1.1rem; }
label {
  display: flex; flex-direction: column; gap: 0.35rem;
  font-size: 0.88rem; font-weight: 700; color: #fff;
}
label .hint { font-weight: 400; color: #9B97C2; font-size: 0.8rem; }
.label-optional { font-weight: 400; color: #9B97C2; font-size: 0.8rem; }
.field-note {
  font-weight: 400; font-size: 0.8rem; color: #9B97C2;
  margin-top: 0.35rem; line-height: 1.45;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"],
input[type="url"],
textarea {
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  color: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
input::placeholder, textarea::placeholder { color: rgba(155,151,194,0.6); }
input:focus, textarea:focus {
  outline: none;
  border-color: #DB3D44;
  box-shadow: 0 0 0 3px rgba(219,61,68,0.15);
}
textarea { resize: vertical; min-height: 160px; }

/* ── Auth card ── */
.auth-card { max-width: 420px; margin: 0 auto; }
.tabs {
  display: flex; gap: 0; margin-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.tab {
  flex: 1; padding: 0.7rem;
  background: transparent; border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; font-weight: 700; color: #9B97C2;
  cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab.active { color: #fff; border-bottom-color: #DB3D44; }
.tab-panel { display: flex; flex-direction: column; gap: 1rem; }
.tab-panel.hidden { display: none; }
.tab-panel h2 { margin-bottom: 0.25rem; }

/* ── Gemini onboarding ── */
.gemini-card { max-width: 560px; margin: 0 auto; }
.gemini-steps {
  list-style: decimal; padding-left: 1.4rem;
  display: flex; flex-direction: column; gap: 1rem;
  margin-bottom: 1.75rem; font-size: 0.95rem; color: #9B97C2;
}
.gemini-steps li { padding-left: 0.4rem; }
.gemini-steps a { color: #DB3D44; text-decoration: underline; }
.gemini-steps strong { color: #fff; }
#gemini-key-input { margin-top: 0.5rem; font-family: monospace; }
.gemini-note {
  margin-top: 1rem; font-size: 0.82rem; color: #9B97C2; font-weight: 300;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
}

/* ── Upload ── */
.upload-area {
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 2.5rem 2rem; text-align: center; margin-bottom: 1.25rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.upload-area:hover {
  border-color: #DB3D44;
  background: rgba(219,61,68,0.04);
}
.file-input { display: none; }
.upload-label {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.6rem; cursor: pointer; color: #9B97C2; font-size: 0.95rem;
}
.upload-icon { font-size: 2.25rem; }

/* ── Generate ── */
.file-info {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 0.75rem; font-size: 0.9rem; color: #9B97C2;
}
.spinner-container { text-align: center; padding: 2rem 0; }
.spinner-container p { color: #9B97C2; font-size: 0.9rem; margin-top: 0.75rem; }
.spinner {
  width: 38px; height: 38px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #DB3D44;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Result ── */
.result-card { text-align: center; }
.result-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.result-card h2 { margin-bottom: 1.25rem; }
.result-card .btn { margin: 0.5rem auto; display: block; width: fit-content; }

/* ── Alerts ── */
.alert {
  padding: 0.9rem 1.1rem; border-radius: 8px;
  margin-bottom: 1.25rem; font-size: 0.9rem;
}
.alert-warning {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.35);
  color: #fbbf24;
}

/* ── Paywall ── */
.paywall-card { text-align: center; }
.paywall-price {
  font-size: 2.75rem; font-weight: 900; margin: 1.25rem 0 0.25rem;
  color: #fff; letter-spacing: -0.03em;
}
.paywall-price .period { font-size: 1rem; font-weight: 400; color: #9B97C2; }
.paywall-features {
  display: inline-block; text-align: left;
  margin: 1rem auto 1.75rem; font-size: 0.95rem;
}
.paywall-features li { padding: 0.35rem 0; color: #9B97C2; }
.paywall-features li::before { content: "✓ "; color: #DB3D44; font-weight: 700; }
.paywall-note { font-size: 0.82rem; color: #9B97C2; margin-top: 0.75rem; font-weight: 300; }

/* ── Feedback ── */
.form-error { color: #f87171; font-size: 0.875rem; margin-top: 0.25rem; }
.form-error.hidden { display: none; }
.form-error a { color: #DB3D44; text-decoration: underline; }
.form-success { color: #4ade80; font-size: 0.875rem; margin-top: 0.25rem; }
.form-success.hidden { display: none; }

/* ── Section divider ── */
.section-divider {
  height: 1px; background: rgba(255,255,255,0.07);
  margin: 0 2rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  .hero { padding: 4rem 1.5rem 3rem; }
  .navbar { padding: 1rem 1.25rem; flex-wrap: wrap; gap: 0.5rem; }
  .nav-links { gap: 0.75rem; }
  .pricing-grid { flex-direction: column; align-items: center; }
  .features h2, .pricing h2 { font-size: 1.6rem; }
}
