/* ============================================================
   SITE.CSS — marketing site, auth pages, dashboard, editor
   ============================================================ */
:root {
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Poppins", system-ui, sans-serif;

  --bg: #fffaf6;
  --surface: #ffffff;
  --ink: #241a16;
  --ink-soft: #7a6a63;
  --primary: #a8715c;
  --primary-dark: #7c5342;
  --secondary: #d9a86c;
  --border: #ecdfd4;
  --success: #2f7a40;
  --danger: #c13b3b;
  --radius: 18px;
  --shadow: 0 20px 50px -25px rgba(60,40,20,0.35);
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--font-heading); margin: 0; }
.muted { color: var(--ink-soft); }

/* ---------- NAVBAR ---------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,250,246,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  max-width: var(--max); margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-heading); font-size: 20px; font-weight: 700; color: var(--primary-dark); }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--secondary); }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; font-weight: 600; font-size: 14px;
  cursor: pointer; border: none; transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 25px -10px rgba(124,83,66,0.6); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--primary-dark); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-danger { background: #fff0f0; color: var(--danger); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---------- HERO ---------- */
.hero {
  padding: 80px 0 60px;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 16px; font-size: 12px; font-weight: 600; color: var(--primary-dark);
  margin-bottom: 20px;
}
.hero h1 { font-size: 48px; line-height: 1.15; color: var(--primary-dark); margin-bottom: 18px; }
.hero p.lead { font-size: 17px; color: var(--ink-soft); max-width: 480px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-trust { display: flex; gap: 22px; font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; }
.hero-trust strong { color: var(--ink); }

.hero-mock {
  position: relative; display: flex; justify-content: center;
}
.phone {
  width: 280px; border-radius: 36px; background: linear-gradient(160deg,#8c3e56,#b8617a 55%,#e7b7a3);
  padding: 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  aspect-ratio: 9/18.5;
}
.phone::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.5));
}
.phone-content { position: relative; z-index: 1; color: #fff; text-align: center; padding-top: 50px; }
.phone-content .script { font-family: "Great Vibes", cursive; font-size: 30px; color: #f3d9c9; }
.phone-content h3 { font-size: 26px; margin-top: 6px; }
.phone-content small { letter-spacing: 2px; text-transform: uppercase; font-size: 10px; opacity: 0.85; }
.phone-float {
  position: absolute; background: #fff; color: var(--ink); border-radius: 14px;
  padding: 10px 14px; font-size: 12px; font-weight: 600; box-shadow: var(--shadow);
}
.phone-float.f1 { top: 40px; left: -30px; }
.phone-float.f2 { bottom: 60px; right: -36px; }

/* ---------- LOGO STRIP / STATS ---------- */
.stats-strip {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 16px;
  padding: 36px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.stat { text-align: center; }
.stat strong { display: block; font-family: var(--font-heading); font-size: 30px; color: var(--primary-dark); }
.stat span { font-size: 12px; color: var(--ink-soft); }

/* ---------- SECTION HEADER ---------- */
.section-head { text-align: center; max-width: 560px; margin: 0 auto 44px; }
.section-head .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.section-head h2 { font-size: 34px; color: var(--ink); margin-bottom: 10px; }
.section { padding: 80px 0; }
.section-alt { background: var(--surface); }

/* ---------- FEATURES ---------- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.feature-icon { width: 46px; height: 46px; border-radius: 12px; background: #fdf1e9; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; color: var(--ink); }
.feature-card p { font-size: 14px; color: var(--ink-soft); margin: 0; }

/* ---------- THEME GALLERY ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.theme-card { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); background: var(--surface); }
.theme-preview { height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-align: center; padding: 20px; }
.theme-preview .script { font-family: "Great Vibes", cursive; font-size: 24px; }
.theme-preview h4 { font-size: 20px; margin-top: 4px; font-family: var(--font-heading); }
.theme-preview small { letter-spacing: 2px; text-transform: uppercase; font-size: 9px; opacity: 0.85; }
.theme-preview.t-floral { background: linear-gradient(160deg,#8c3e56,#b8617a 55%,#e7b7a3); }
.theme-preview.t-minimalist { background: linear-gradient(160deg,#111,#2b2b2b 60%,#4a4a4a); font-family: "Cormorant Garamond", serif;}
.theme-preview.t-javanese { background: linear-gradient(160deg,#4e1119,#7a1f2b 55%,#c7982f); }
.theme-preview.t-rustic { background: linear-gradient(160deg,#3c4f38,#5c7257 55%,#a9b78e); }
.theme-meta { padding: 16px 18px; text-align: center; }
.theme-meta strong { display: block; font-size: 14px; margin-bottom: 4px; }
.theme-meta span { font-size: 12px; color: var(--ink-soft); }

/* ---------- PRICING ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
.price-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 24px; display: flex; flex-direction: column; box-shadow: var(--shadow);
  position: relative;
}
.price-card.popular { border: 2px solid var(--primary); transform: translateY(-8px); }
.price-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 700;
  padding: 5px 14px; border-radius: 999px; letter-spacing: 0.5px;
}
.price-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.price-tagline { font-size: 12px; color: var(--ink-soft); margin-bottom: 18px; min-height: 32px; }
.price-amount { font-family: var(--font-heading); font-size: 32px; color: var(--primary-dark); margin-bottom: 2px; }
.price-amount span { font-size: 13px; font-family: var(--font-body); color: var(--ink-soft); font-weight: 400; }
.price-features { list-style: none; padding: 0; margin: 22px 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.price-features li { font-size: 13px; display: flex; gap: 8px; align-items: flex-start; color: var(--ink); }
.price-features li::before { content: "✓"; color: var(--success); font-weight: 700; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.faq-q { padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 600; font-size: 14px; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; font-size: 13px; color: var(--ink-soft); }
.faq-a-inner { padding: 0 22px 18px; }
.faq-item.open .faq-a { max-height: 300px; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.chev { transition: transform 0.2s ease; }

/* ---------- TESTIMONIALS ---------- */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testi-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.testi-stars { color: var(--secondary); margin-bottom: 10px; font-size: 14px; }
.testi-text { font-size: 14px; color: var(--ink); margin-bottom: 16px; }
.testi-person { display: flex; align-items: center; gap: 10px; }
.testi-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.testi-person strong { display: block; font-size: 13px; }
.testi-person span { font-size: 12px; color: var(--ink-soft); }

/* ---------- CTA BANNER ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 60%, var(--secondary));
  border-radius: 28px; padding: 60px 40px; text-align: center; color: #fff;
}
.cta-banner h2 { color: #fff; font-size: 30px; margin-bottom: 12px; }
.cta-banner p { color: rgba(255,255,255,0.85); margin-bottom: 26px; }

/* ---------- FOOTER ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 50px 0 24px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-grid h4 { font-size: 13px; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { font-size: 13px; color: var(--ink-soft); }
.footer-grid a:hover { color: var(--primary); }
.footer-bottom { text-align: center; font-size: 12px; color: var(--ink-soft); padding-top: 20px; border-top: 1px solid var(--border); }

/* ---------- AUTH PAGES ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(circle at 20% 20%, #f7e3d6, var(--bg) 60%);
}
.auth-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 40px 34px; max-width: 400px; width: 100%; border: 1px solid var(--border);
}
.auth-card h1 { font-size: 24px; margin-bottom: 6px; color: var(--primary-dark); }
.auth-card p.muted { margin-bottom: 26px; font-size: 13px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  font-family: var(--font-body); font-size: 14px; background: #fff;
}
.field input:focus { outline: none; border-color: var(--primary); }
.form-msg { font-size: 13px; margin-top: 14px; display: none; padding: 10px 14px; border-radius: 10px; }
.form-msg.error { display: block; background: #fdeeee; color: var(--danger); }
.form-msg.success { display: block; background: #eaf7ed; color: var(--success); }
.auth-switch { text-align: center; font-size: 13px; margin-top: 20px; color: var(--ink-soft); }
.auth-switch a { color: var(--primary); font-weight: 600; }

/* ---------- DASHBOARD ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  width: 240px; background: var(--surface); border-right: 1px solid var(--border);
  padding: 24px 18px; display: flex; flex-direction: column; gap: 6px; flex-shrink: 0;
}
.sidebar-link {
  padding: 11px 14px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--ink-soft);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-link.active, .sidebar-link:hover { background: #fdf1e9; color: var(--primary-dark); }
.app-main { flex: 1; padding: 30px 36px; max-width: 1100px; }
.app-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; flex-wrap: wrap; gap: 14px; }
.plan-chip { display: inline-flex; align-items: center; gap: 6px; background: #fdf1e9; color: var(--primary-dark); padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; }

.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.inv-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.inv-card-cover { height: 120px; background: linear-gradient(160deg,#8c3e56,#b8617a 55%,#e7b7a3); display:flex; align-items:center; justify-content:center; color:#fff; font-family: var(--font-heading); font-size: 18px; text-align: center; padding: 10px;}
.inv-card-body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.inv-status { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; align-self: flex-start; }
.inv-status.published { background: #eaf7ed; color: var(--success); }
.inv-status.draft { background: #f1f1f1; color: #666; }
.inv-card-actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.inv-card-actions .btn { padding: 8px 14px; font-size: 12px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.modal-overlay { position: fixed; inset: 0; background: rgba(30,20,15,0.5); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal-box { background: #fff; border-radius: var(--radius); padding: 30px; max-width: 420px; width: 100%; box-shadow: var(--shadow); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .features-grid, .theme-grid, .pricing-grid, .testi-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: repeat(2,1fr); }
  .app-sidebar { display: none; }
  .app-main { padding: 20px; }
  .stats-strip { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 560px) {
  .features-grid, .theme-grid, .pricing-grid, .testi-grid, .footer-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero h1 { font-size: 34px; }
}
