/* ─── RESET & BASE ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #1a1a2e;
  --gold: #ffd700;
  --gold-dark: #e6c200;
  --text: #1a1a2e;
  --text-muted: #64748b;
  --bg: #ffffff;
  --bg-light: #f8faff;
  --border: #e2e8f0;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── NAVBAR ───────────────────────────────────────────────────────────────── */
.navbar {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  color: var(--gold);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: #c0c0d0;
  font-size: 14px;
  transition: color var(--transition);
}

.nav-links a:hover { color: #fff; text-decoration: none; }

/* ─── BUTTONS ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-decoration: none;
  text-align: center;
}

.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gold);
  color: var(--navy);
}
.btn-primary:hover { background: var(--gold-dark); box-shadow: 0 4px 16px rgba(255,215,0,.35); }

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-secondary:hover { background: var(--navy); color: #fff; }

.btn-gold {
  background: var(--gold);
  color: var(--navy);
}
.btn-gold:hover { background: var(--gold-dark); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn-block { display: block; width: 100%; }

/* ─── FLASH MESSAGES ───────────────────────────────────────────────────────── */
.flash-container { padding: 0 16px; margin-top: 8px; }

.flash {
  max-width: 700px;
  margin: 8px auto;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
}

.flash-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

/* ─── CONTAINERS ───────────────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 700px; margin: 0 auto; padding: 0 24px; }

/* ─── HERO ─────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #2d2d5e 60%, #1a1a2e 100%);
  color: #fff;
  padding: 80px 24px;
  text-align: center;
}

.hero-inner { max-width: 700px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  background: rgba(255,215,0,.15);
  color: var(--gold);
  border: 1px solid rgba(255,215,0,.3);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #fff;
}

.hero-subtitle {
  font-size: 18px;
  color: #c0c0d0;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-ctas .btn-secondary {
  border-color: rgba(255,255,255,.4);
  color: #fff;
}
.hero-ctas .btn-secondary:hover { background: rgba(255,255,255,.1); }

.hero-note {
  color: #8888aa;
  font-size: 14px;
}

/* ─── LETTER TYPES ─────────────────────────────────────────────────────────── */
.letter-types {
  padding: 64px 0;
  background: var(--bg-light);
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin-bottom: 40px;
}

.letter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.letter-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.letter-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.letter-icon { font-size: 28px; }

/* ─── HOW IT WORKS ─────────────────────────────────────────────────────────── */
.how-it-works { padding: 72px 0; }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-content h3 { font-size: 17px; margin-bottom: 6px; }
.step-content p { color: var(--text-muted); font-size: 15px; }

/* ─── PRICING ──────────────────────────────────────────────────────────────── */
.pricing {
  padding: 72px 0;
  background: var(--bg-light);
}

.pricing-cards {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.pricing-card {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 36px 32px;
  max-width: 340px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow);
}

.pricing-card-featured {
  border-color: var(--gold);
  box-shadow: 0 8px 32px rgba(255,215,0,.2);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 12px;
  white-space: nowrap;
}

.pricing-tier { font-weight: 700; font-size: 18px; margin-bottom: 8px; }

.pricing-price {
  font-size: 48px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.pricing-subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }

.pricing-features {
  list-style: none;
  margin-bottom: 28px;
}

.pricing-features li {
  padding: 6px 0;
  font-size: 15px;
  color: var(--text-muted);
}

.pricing-features li:first-child { color: var(--text); }

.pricing-disclaimer {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 24px;
}

/* ─── TRUST ────────────────────────────────────────────────────────────────── */
.trust { padding: 72px 0; }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  text-align: center;
}

.trust-icon { font-size: 36px; margin-bottom: 12px; }
.trust-item h3 { font-size: 17px; margin-bottom: 8px; }
.trust-item p { color: var(--text-muted); font-size: 15px; }

/* ─── FINAL CTA ────────────────────────────────────────────────────────────── */
.final-cta {
  background: var(--navy);
  color: #fff;
  text-align: center;
  padding: 72px 24px;
}

.final-cta h2 { font-size: 32px; margin-bottom: 12px; }
.final-cta p { color: #c0c0d0; margin-bottom: 32px; font-size: 17px; }

/* ─── UPLOAD PAGE ──────────────────────────────────────────────────────────── */
.upload-page { padding: 40px 0 64px; }

.back-link {
  display: inline-block;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.tier-switcher {
  display: flex;
  gap: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

.tier-tab {
  flex: 1;
  padding: 14px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fff;
  color: var(--text-muted);
  transition: background var(--transition);
  font-size: 14px;
}

.tier-tab strong { font-size: 16px; color: var(--text); }
.tier-tab span { font-size: 13px; }
.tier-tab-active { background: var(--navy); }
.tier-tab-active strong, .tier-tab-active span { color: #fff; }
.tier-tab-active { color: #fff; }

.upload-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow);
}

.upload-title { font-size: 24px; margin-bottom: 8px; }
.upload-subtitle { color: var(--text-muted); margin-bottom: 32px; font-size: 15px; }

.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  transition: border-color var(--transition);
  outline: none;
}

.form-input:focus { border-color: var(--navy); }
.form-hint { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* File drop zone */
.file-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-light);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}

.file-drop.drag-over {
  border-color: var(--gold);
  background: #fffbdb;
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-drop-ui {
  padding: 40px 24px;
  text-align: center;
  pointer-events: none;
}

.file-drop-icon { font-size: 36px; margin-bottom: 8px; }
.file-drop-label { font-size: 15px; margin-bottom: 4px; }
.file-drop-hint { font-size: 13px; color: var(--text-muted); }

.file-selected {
  padding: 12px 16px;
  background: #f0fdf4;
  border-radius: var(--radius);
  color: #166534;
  font-size: 14px;
  margin-top: 8px;
}

.privacy-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-muted);
}

.payment-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}

.what-you-get {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.what-you-get h3 { font-size: 16px; margin-bottom: 12px; }

.what-you-get ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.what-you-get li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
}

.what-you-get li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #22c55e;
  font-weight: 700;
}

.legal-note {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* ─── THANK YOU PAGE ───────────────────────────────────────────────────────── */
.thank-you-page { padding: 64px 0; }

.thank-you-card {
  background: #fff;
  border-radius: 12px;
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--shadow);
}

.thank-you-icon { font-size: 56px; margin-bottom: 16px; }
.thank-you-lead { font-size: 17px; color: var(--text-muted); margin: 12px 0 24px; }
.thank-you-ref { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }
.thank-you-ref code { background: var(--bg-light); padding: 2px 6px; border-radius: 4px; }

.thank-you-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
  margin: 0 auto 28px;
}

.ty-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
}

.ty-step-done { background: #f0fdf4; color: #166534; }
.ty-step-active { background: #fefce8; color: #854d0e; }
.ty-step-icon { font-size: 18px; }

.thank-you-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ─── LEGAL PAGES ──────────────────────────────────────────────────────────── */
.legal-page {
  padding: 56px 0 80px;
}

.legal-page h1 {
  font-size: 32px;
  margin-bottom: 6px;
}

.legal-updated {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 20px;
  margin: 32px 0 12px;
}

.legal-page p, .legal-page li {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 8px;
}

.legal-page ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

/* ─── ADMIN ────────────────────────────────────────────────────────────────── */
.admin-body {
  background: #f0f2f8;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.admin-login-wrap {
  width: 100%;
  padding: 24px;
}

.admin-login-card {
  background: #fff;
  max-width: 380px;
  margin: 0 auto;
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.admin-logo {
  color: var(--navy);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.admin-login-card h2 {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 28px;
}

.admin-login-card .form-group { text-align: left; }

/* ─── FOOTER ───────────────────────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: #c0c0d0;
  padding: 40px 24px;
  text-align: center;
}

.footer-inner { max-width: 800px; margin: 0 auto; }

.footer-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-links a {
  color: #c0c0d0;
  font-size: 14px;
}

.footer-links a:hover { color: #fff; }

.footer-useful {
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-useful-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
  margin-bottom: 10px;
}

.footer-useful-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
}

.footer-useful-links a {
  color: #8888aa;
  font-size: 13px;
}

.footer-useful-links a:hover { color: #c0c0d0; }

.footer-legal {
  font-size: 12px;
  color: #666;
  line-height: 1.6;
}

/* ─── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 56px 20px; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .upload-card { padding: 24px 20px; }
  .nav-links { display: none; }
  .pricing-card { padding: 28px 24px; }
  .steps { grid-template-columns: 1fr; }
}
