:root {
    --ink: #0d0d0d;
    --paper: #f5f0e8;
    --cream: #ede8da;
    --gold: #c9a84c;
    --gold-light: #e8c97a;
    --rust: #b5451b;
    --sage: #4a6741;
    --muted: #7a7267;
    --white: #fdfcfa;
    --shadow: rgba(13,13,13,0.12);
  }

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

  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--paper);
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* Background texture */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: 
      radial-gradient(ellipse at 20% 0%, rgba(201,168,76,0.08) 0%, transparent 60%),
      radial-gradient(ellipse at 80% 100%, rgba(181,69,27,0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
  }

  /* HEADER */
  header {
    position: relative;
    z-index: 10;
    padding: 32px 48px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(13,13,13,0.08);
  }

  .logo {
    display: flex;
    align-items: baseline;
    gap: 2px;
  }

  .logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 900;
    color: var(--ink);
    letter-spacing: -0.5px;
  }

  .logo-text span {
    color: var(--gold);
  }

  .logo-badge {
    background: var(--ink);
    color: var(--gold);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    padding: 3px 8px;
    border-radius: 2px;
    margin-left: 10px;
    text-transform: uppercase;
  }

  .header-stats {
    display: flex;
    gap: 32px;
    align-items: center;
  }

  .stat {
    text-align: center;
  }

  .stat-num {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
  }

  .stat-label {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  /* HERO */
  .hero {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 64px 48px 48px;
  }

  .hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cream);
    border: 1px solid rgba(201,168,76,0.3);
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.5px;
    margin-bottom: 24px;
    text-transform: uppercase;
  }

  .hero-eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
  }

  .hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(38px, 6vw, 68px);
    font-weight: 900;
    line-height: 1.05;
    color: var(--ink);
    max-width: 800px;
    margin: 0 auto 20px;
    letter-spacing: -1px;
  }

  .hero h1 em {
    font-style: italic;
    color: var(--gold);
  }

  .hero p {
    font-size: 17px;
    color: var(--muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 300;
  }

  /* MAIN CONTAINER */
  .container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px 80px;
  }

  /* STEPS */
  .steps-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 48px;
  }

  .step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 100px;
    transition: all 0.3s;
  }

  .step-item.active {
    background: var(--ink);
  }

  .step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    flex-shrink: 0;
    transition: all 0.3s;
  }

  .step-item.active .step-num {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
  }

  .step-item.done .step-num {
    background: var(--sage);
    border-color: var(--sage);
    color: white;
  }

  .step-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    transition: all 0.3s;
  }

  .step-item.active .step-label {
    color: var(--white);
  }

  .step-divider {
    width: 40px;
    height: 1px;
    background: rgba(13,13,13,0.15);
    flex-shrink: 0;
  }

  /* FORM SECTION */
  .form-section {
    display: none;
    animation: fadeUp 0.4s ease forwards;
  }

  .form-section.active {
    display: block;
  }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
  }

  .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .form-group.full {
    grid-column: 1 / -1;
  }

  label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--ink);
  }

  label span {
    color: var(--gold);
    margin-left: 2px;
  }

  input, textarea, select {
    background: var(--white);
    border: 1.5px solid rgba(13,13,13,0.12);
    border-radius: 8px;
    padding: 13px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--ink);
    transition: all 0.2s;
    resize: vertical;
    outline: none;
  }

  input:focus, textarea:focus, select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
  }

  textarea {
    min-height: 120px;
    line-height: 1.6;
  }

  /* TONE SELECTOR */
  .tone-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .tone-btn {
    padding: 12px 8px;
    border: 1.5px solid rgba(13,13,13,0.12);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
  }

  .tone-btn:hover {
    border-color: var(--gold);
    background: rgba(201,168,76,0.04);
  }

  .tone-btn.selected {
    border-color: var(--gold);
    background: rgba(201,168,76,0.1);
  }

  .tone-emoji {
    font-size: 20px;
    display: block;
    margin-bottom: 4px;
  }

  .tone-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
    display: block;
  }

  /* FREE USES BANNER */
  .free-banner {
    background: linear-gradient(135deg, var(--ink) 0%, #2a2a2a 100%);
    border-radius: 12px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
  }

  .free-banner-text {
    color: var(--white);
    font-size: 14px;
  }

  .free-banner-text strong {
    color: var(--gold);
  }

  .free-count {
    display: flex;
    gap: 6px;
  }

  .free-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
  }

  .free-dot.used {
    background: rgba(255,255,255,0.2);
  }

  /* GENERATE BUTTON */
  .btn-generate {
    width: 100%;
    padding: 18px 32px;
    background: var(--ink);
    color: var(--gold);
    border: none;
    border-radius: 10px;
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: -0.3px;
    position: relative;
    overflow: hidden;
    margin-top: 24px;
  }

  .btn-generate::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(201,168,76,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
  }

  .btn-generate:hover::before {
    transform: translateX(100%);
  }

  .btn-generate:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(13,13,13,0.2);
  }

  .btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
  }

  /* LOADING */
  .loading-state {
    display: none;
    text-align: center;
    padding: 60px 32px;
  }

  .loading-state.active {
    display: block;
  }

  .loading-animation {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
  }

  .loading-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
    animation: loadBounce 1.2s infinite;
  }

  .loading-dot:nth-child(2) { animation-delay: 0.2s; }
  .loading-dot:nth-child(3) { animation-delay: 0.4s; }

  @keyframes loadBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 1; }
    30% { transform: translateY(-16px); opacity: 0.7; }
  }

  .loading-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
  }

  .loading-sub {
    color: var(--muted);
    font-size: 14px;
  }

  .loading-steps {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .loading-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.4s;
  }

  .loading-step.done {
    background: rgba(74,103,65,0.08);
    color: var(--sage);
  }

  .loading-step-icon {
    font-size: 14px;
  }

  /* RESULT */
  .result-section {
    display: none;
    animation: fadeUp 0.5s ease forwards;
  }

  .result-section.active {
    display: block;
  }

  .result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .result-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
  }

  .result-title span {
    color: var(--gold);
  }

  .result-actions {
    display: flex;
    gap: 10px;
  }

  .btn-action {
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1.5px solid rgba(13,13,13,0.15);
    background: var(--white);
    color: var(--ink);
  }

  .btn-action:hover {
    border-color: var(--gold);
    background: rgba(201,168,76,0.06);
  }

  .btn-action.primary {
    background: var(--ink);
    color: var(--gold);
    border-color: var(--ink);
  }

  .btn-action.primary:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
  }

  /* LETTER CARD */
  .letter-card {
    background: var(--white);
    border: 1px solid rgba(13,13,13,0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 32px var(--shadow);
  }

  .letter-toolbar {
    background: var(--cream);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(13,13,13,0.08);
  }

  .toolbar-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
  }

  .letter-content {
    padding: 48px;
    font-size: 15px;
    line-height: 1.85;
    color: var(--ink);
    white-space: pre-wrap;
    font-family: 'DM Sans', sans-serif;
    min-height: 300px;
    outline: none;
  }

  .letter-content[contenteditable]:focus {
    box-shadow: inset 0 0 0 2px rgba(201,168,76,0.3);
  }

  /* SCORE CARD */
  .score-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
  }

  .score-card {
    background: var(--white);
    border: 1px solid rgba(13,13,13,0.08);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
  }

  .score-value {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 900;
    color: var(--sage);
    line-height: 1;
    margin-bottom: 4px;
  }

  .score-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* TIPS */
  .tips-section {
    margin-top: 24px;
    background: var(--cream);
    border-radius: 12px;
    padding: 20px 24px;
  }

  .tips-title {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    color: var(--ink);
  }

  .tip-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
    line-height: 1.5;
  }

  .tip-icon {
    color: var(--gold);
    flex-shrink: 0;
    margin-top: 1px;
  }

  /* NEW LETTER BTN */
  .btn-new {
    margin-top: 32px;
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 1.5px dashed rgba(13,13,13,0.2);
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
  }

  .btn-new:hover {
    border-color: var(--gold);
    color: var(--ink);
    background: rgba(201,168,76,0.04);
  }

  /* PAYWALL */
  .paywall-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(13,13,13,0.7);
    z-index: 100;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
  }

  .paywall-overlay.active {
    display: flex;
  }

  .paywall-card {
    background: var(--white);
    border-radius: 20px;
    padding: 48px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    animation: fadeUp 0.3s ease forwards;
  }

  .paywall-icon {
    font-size: 48px;
    margin-bottom: 16px;
  }

  .paywall-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 8px;
  }

  .paywall-sub {
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 32px;
    line-height: 1.6;
  }

  .pricing-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
  }

  .pricing-card {
    border: 1.5px solid rgba(13,13,13,0.12);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
  }

  .pricing-card:hover, .pricing-card.selected {
    border-color: var(--gold);
    background: rgba(201,168,76,0.05);
  }

  .pricing-card.popular {
    border-color: var(--ink);
    position: relative;
  }

  .popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ink);
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 100px;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .pricing-price {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 900;
    color: var(--ink);
  }

  .pricing-price sup {
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
  }

  .pricing-period {
    font-size: 12px;
    color: var(--muted);
  }

  .pricing-desc {
    font-size: 12px;
    color: var(--muted);
    margin-top: 8px;
    line-height: 1.5;
  }

  .btn-subscribe {
    width: 100%;
    padding: 16px;
    background: var(--ink);
    color: var(--gold);
    border: none;
    border-radius: 10px;
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
  }

  .btn-subscribe:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
  }

  .paywall-skip {
    margin-top: 12px;
    font-size: 12px;
    color: var(--muted);
    cursor: pointer;
    text-decoration: underline;
  }

  /* TOAST */
  .toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: var(--ink);
    color: var(--white);
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 200;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.3s;
  }

  .toast.show {
    transform: translateY(0);
    opacity: 1;
  }

  /* RESPONSIVE */
  @media (max-width: 768px) {
    header { padding: 20px 20px 16px; }
    .header-stats { display: none; }
    .hero { padding: 40px 20px 32px; }
    .container { padding: 0 20px 60px; }
    .form-grid { grid-template-columns: 1fr; }
    .tone-selector { grid-template-columns: repeat(2, 1fr); }
    .score-grid { grid-template-columns: 1fr; }
    .letter-content { padding: 28px; }
    .pricing-cards { grid-template-columns: 1fr; }
    .steps-bar { gap: 0; overflow-x: auto; }
    .step-label { display: none; }
  }
/* ========== NAVBAR ========== */
.navbar {
  position: relative;
  z-index: 10;
  padding: 0 48px;
  background: var(--white);
  border-bottom: 1px solid rgba(13,13,13,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-logo span { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-links a:hover {
  background: var(--cream);
  color: var(--ink);
}

.nav-links a.active {
  background: var(--ink);
  color: var(--gold);
}

.nav-premium {
  background: var(--gold) !important;
  color: var(--ink) !important;
  font-weight: 700 !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ========== PAGE HERO ========== */
.page-hero {
  text-align: center;
  padding: 48px 32px 32px;
  position: relative;
  z-index: 1;
}

.page-hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.page-hero h1 em { color: var(--gold); font-style: italic; }

.page-hero p {
  font-size: 16px;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ========== TOOL CARD ========== */
.tool-card {
  background: var(--white);
  border: 1px solid rgba(13,13,13,0.08);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 24px var(--shadow);
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ========== OUTPUT BOX ========== */
.output-box {
  background: var(--cream);
  border: 1px solid rgba(13,13,13,0.08);
  border-radius: 12px;
  padding: 28px;
  margin-top: 24px;
  min-height: 120px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
  white-space: pre-wrap;
  display: none;
}

.output-box.active { display: block; }

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.output-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
}

/* ========== QA CARDS ========== */
.qa-list { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }

.qa-card {
  background: var(--white);
  border: 1px solid rgba(13,13,13,0.08);
  border-radius: 12px;
  overflow: hidden;
  display: none;
}

.qa-card.active { display: block; }

.qa-question {
  background: var(--ink);
  color: var(--gold);
  padding: 14px 20px;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.qa-num {
  background: var(--gold);
  color: var(--ink);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.qa-answer {
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

/* ========== FOOTER ========== */
footer {
  text-align: center;
  padding: 32px;
  border-top: 1px solid rgba(13,13,13,0.08);
  font-size: 13px;
  color: var(--muted);
  position: relative;
  z-index: 1;
  margin-top: 64px;
}

footer a { color: var(--gold); text-decoration: none; }

@media (max-width: 768px) {
  .navbar { padding: 0 20px; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); padding: 16px; border-bottom: 1px solid rgba(13,13,13,0.08); z-index: 100; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .tool-card { padding: 20px; }
}
