/* ============================================
   ListingAI — Real Estate Landing Page Styles
   Aesthetic: Editorial, serif-forward, clean
   Fonts: Instrument Serif (display) + Satoshi (body)
   Colors: Deep forest green, warm off-white, gold accent
   ============================================ */

:root {
  --bg: #f8f7f4;
  --bg-warm: #f2f0eb;
  --primary: #1a3a2a;
  --primary-dark: #0f2519;
  --accent: #c9a84c;
  --accent-light: #e8d5a0;
  --text: #1a1a1a;
  --text-muted: #6b7c6f;
  --border: #e0dcd4;
  --border-dark: #c8c2b5;
  --white: #ffffff;
  --error: #c0392b;
  --success: #1a7a4a;
}

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

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

body {
  font-family: 'Satoshi', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  line-height: 1.15;
  color: var(--text);
}

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

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 247, 244, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.25rem;
  color: var(--primary);
}

.logo svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  background: var(--primary);
  color: var(--white);
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.nav-cta:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

/* ===== HERO ===== */
.hero {
  padding: 88px 0 64px;
  text-align: center;
  position: relative;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--primary);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

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

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 40px;
  font-weight: 300;
  line-height: 1.75;
}

/* ===== FORM SECTION ===== */
.form-section {
  padding: 0 0 96px;
}

.form-section .container {
  max-width: 860px;
}

.listing-form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 44px 48px;
  box-shadow: 0 2px 20px rgba(26, 58, 42, 0.06);
}

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

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

.form-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.9375rem;
  font-family: 'Satoshi', -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 58, 42, 0.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a3a2a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-group input[type="number"] {
  -moz-appearance: textfield;
}

.form-group input::-webkit-outer-spin-button,
.form-group input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.btn-generate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: 'Satoshi', -apple-system, sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-generate:hover:not(:disabled) {
  background: var(--primary-dark);
}

.btn-generate:active:not(:disabled) {
  transform: scale(0.98);
}

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

.btn-generate .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn-generate.loading .spinner {
  display: block;
}

.btn-generate.loading .btn-text {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Listing Output */
.listing-output {
  margin-top: 28px;
  padding: 28px 32px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  display: none;
  position: relative;
}

.listing-output.visible {
  display: block;
  animation: fadeUp 0.4s ease;
}

.listing-output-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.listing-output-text {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
}

.listing-output-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Satoshi', -apple-system, sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: rgba(26, 58, 42, 0.06);
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--white);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Satoshi', -apple-system, sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-copy.copied {
  color: var(--success);
  border-color: var(--success);
}

.error-message {
  margin-top: 16px;
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  color: var(--error);
  font-size: 0.875rem;
  display: none;
}

.error-message.visible {
  display: block;
}

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

/* ===== HOW IT WORKS ===== */
.how-it-works {
  padding: 88px 0;
  background: var(--bg-warm);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 300;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.step {
  text-align: center;
}

.step-number {
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.125rem;
  margin: 0 auto 20px;
}

.step h3 {
  font-size: 1.125rem;
  margin-bottom: 10px;
}

.step p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.65;
}

/* ===== SOCIAL PROOF ===== */
.social-proof {
  padding: 88px 0;
  text-align: center;
}

.social-proof h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-bottom: 8px;
}

.social-proof > .container > p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 300;
  margin-bottom: 48px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 32px;
  text-align: left;
  transition: box-shadow 0.2s, transform 0.2s;
}

.testimonial-card:hover {
  box-shadow: 0 4px 20px rgba(26, 58, 42, 0.08);
  transform: translateY(-2px);
}

.testimonial-quote {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 18px;
  font-style: italic;
}

.testimonial-author {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== PRICING ===== */
.pricing {
  padding: 96px 0;
  background: var(--primary);
  color: var(--white);
}

.pricing .section-header h2 {
  color: var(--white);
}

.pricing .section-header p {
  color: rgba(255,255,255,0.6);
}

.pricing-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 12px;
  padding: 48px 44px;
  text-align: center;
  color: var(--text);
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}

.pricing-badge {
  display: inline-block;
  background: var(--accent-light);
  color: #7a5c1a;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.pricing-amount {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 3.75rem;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}

.pricing-amount span {
  font-size: 1.25rem;
  font-family: 'Satoshi', -apple-system, sans-serif;
  font-weight: 400;
  color: var(--text-muted);
  vertical-align: super;
}

.pricing-period {
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 36px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 36px;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  font-size: 0.9375rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features li svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--primary);
  margin-top: 2px;
}

.btn-pricing {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Satoshi', -apple-system, sans-serif;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s;
}

.btn-pricing:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

.pricing-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 14px;
  font-weight: 300;
}

/* ===== FOOTER ===== */
.site-footer {
  padding: 44px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-brand {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 300;
}

.footer-links {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 28px;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero {
    padding: 64px 0 56px;
  }

  .listing-form-card {
    padding: 28px 24px;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn-generate,
  .btn-secondary,
  .btn-copy {
    width: 100%;
    justify-content: center;
  }

  .listing-output {
    padding: 20px 20px;
  }

  .pricing-card {
    padding: 36px 28px;
  }
}