/* ForgechatAI — light theme design system */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fc;
  --bg-alt: #f1f3fb;
  --surface: #ffffff;
  --border: #e7e9f2;
  --text: #1c2130;
  --text-soft: #5b6272;
  --text-faint: #8a90a3;
  --primary: #6c5ce7;
  --primary-dark: #5a48d6;
  --primary-soft: #eeeafd;
  --accent: #00c2a8;
  --accent-soft: #e2faf5;
  --warn: #ff9f43;
  --danger: #ff5b6a;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(30, 34, 60, 0.06);
  --shadow: 0 8px 28px rgba(30, 34, 60, 0.08);
  --shadow-lg: 0 20px 48px rgba(30, 34, 60, 0.12);
  --maxw: 1160px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  scroll-behavior: smooth;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
h1, h2, .brand, .plan-price, .stat-card .num {
  font-family: var(--font-display);
}

/* ---------- Nav ---------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.navbar .inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--text); }
.brand .logo-mark { width: 32px; height: 32px; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: 13px; font-weight: 700; color: var(--text-soft);
  text-transform: uppercase; letter-spacing: .06em;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.nav-actions > a.btn-text {
  font-size: 13px; font-weight: 700; color: var(--text);
  text-transform: uppercase; letter-spacing: .06em;
}
.nav-actions > a.btn-text:hover { color: var(--primary); }

.lang-switch {
  position: relative;
}
.lang-switch select {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-soft) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6"><path d="M0 0l5 6 5-6z" fill="%235b6272"/></svg>') no-repeat right 10px center;
  border-radius: var(--radius-sm);
  padding: 8px 28px 8px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px;
  font-weight: 700; font-size: 13px; cursor: pointer; border: none;
  text-transform: uppercase; letter-spacing: .05em;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(108,92,231,.28); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-soft { background: var(--primary-soft); color: var(--primary-dark); }
.btn-soft:hover { background: #e2ddfc; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 12px; }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 64px; text-align: center; background: radial-gradient(circle at 50% -10%, var(--primary-soft), transparent 60%); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: #058a76; font-weight: 700; font-size: 12.5px;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(38px, 6.2vw, 72px); line-height: 1.02; margin: 0 0 20px; font-weight: 700; letter-spacing: -0.03em; }
.hero h1 .hero-highlight { color: var(--primary); }
.hero p.lead { font-size: 18px; color: var(--text-soft); max-width: 620px; margin: 0 auto 32px; line-height: 1.6; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--text-faint); }

/* Two-column hero layout used only on the homepage — scoped to .hero-grid so
   the plain centered .hero header on pricing.html / platforms.html is untouched. */
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
  text-align: left; max-width: 1160px; margin: 0 auto;
}
.hero-grid .eyebrow, .hero-grid .hero-actions, .hero-grid .hero-note { margin-left: 0; margin-right: 0; }
.hero-grid .hero-actions { justify-content: flex-start; }
.hero-grid p.lead { margin-left: 0; margin-right: 0; }
.hero-illustration { display: flex; justify-content: center; align-items: center; }
.hero-illustration svg { width: 100%; max-width: 460px; height: auto; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 28px; }
  .hero-grid .hero-actions { justify-content: center; }
  .hero-grid p.lead { margin-left: auto; margin-right: auto; }
  .hero-illustration { order: -1; }
  .hero-illustration svg { max-width: 320px; }
}

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head .tag { color: var(--primary); font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(28px, 4.4vw, 44px); margin: 10px 0 12px; font-weight: 700; letter-spacing: -0.02em; }
.section-head p { color: var(--text-soft); font-size: 16px; line-height: 1.6; }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.card:hover { box-shadow: var(--shadow); }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 16px;
}
.card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.card p { margin: 0; color: var(--text-soft); font-size: 14.5px; line-height: 1.55; }

.bg-soft { background: var(--bg-soft); }

/* ---------- Pricing ---------- */
.billing-toggle {
  display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 44px;
}
.switch { position: relative; width: 52px; height: 28px; background: var(--border); border-radius: 999px; cursor: pointer; transition: background .2s; }
.switch.on { background: var(--primary); }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch.on .knob { transform: translateX(24px); }
.save-badge { background: var(--accent-soft); color: #058a76; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; display: flex; flex-direction: column; position: relative; box-shadow: var(--shadow-sm);
}
.plan-card.popular { border-color: var(--primary); box-shadow: 0 12px 32px rgba(108,92,231,.16); }
.plan-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: 11.5px; font-weight: 800; padding: 5px 14px; border-radius: 999px;
  letter-spacing: .03em; text-transform: uppercase;
}
.plan-name { font-size: 19px; font-weight: 800; margin: 6px 0 4px; }
.plan-tagline { color: var(--text-soft); font-size: 13.5px; min-height: 36px; }
.plan-price { font-size: 38px; font-weight: 800; margin: 14px 0 2px; }
.plan-price small { font-size: 14px; font-weight: 600; color: var(--text-faint); }
.plan-period { font-size: 13px; color: var(--text-faint); margin-bottom: 20px; }
.plan-features { list-style: none; margin: 0 0 24px; padding: 0; flex: 1; }
.plan-features li { display: flex; gap: 8px; font-size: 13.8px; padding: 7px 0; color: var(--text); border-top: 1px solid var(--border); }
.plan-features li:first-child { border-top: none; }
.plan-features li:before { content: "✓"; color: var(--accent); font-weight: 800; }

.addons-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 20px; }
.addon-card { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.addon-price { font-weight: 800; color: var(--primary); white-space: nowrap; }

.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.compare-table th, .compare-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: center; }
.compare-table th:first-child, .compare-table td:first-child { text-align: left; color: var(--text-soft); }
.compare-table thead th { color: var(--text); font-weight: 800; }
.compare-table td.yes { color: var(--accent); font-weight: 800; }
.compare-table td.no { color: var(--text-faint); }

/* ---------- Platforms / channels ---------- */
.channel-filters { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 34px; }
.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-soft); font-size: 13.5px; font-weight: 700; color: var(--text-soft); cursor: pointer; }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.channel-card { display: flex; gap: 16px; align-items: flex-start; }
.channel-icon {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: #fff;
}
.channel-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.min-plan { font-size: 11.5px; font-weight: 800; color: var(--primary); background: var(--primary-soft); padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 14px; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq-q { display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 700; font-size: 15px; }
.faq-q .plus { color: var(--primary); font-size: 20px; transition: transform .15s; }
.faq-item.open .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .2s ease; color: var(--text-soft); font-size: 14.5px; line-height: 1.6; }
.faq-item.open .faq-a { max-height: 300px; padding-top: 10px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--primary), #8a7cf0);
  border-radius: var(--radius-lg); padding: 56px; text-align: center; color: #fff;
}
.cta-band h2 { font-size: 30px; margin: 0 0 12px; font-weight: 800; }
.cta-band p { opacity: .9; margin: 0 0 26px; }
.cta-band .btn-primary { background: #fff; color: var(--primary-dark); box-shadow: none; }
.cta-band .btn-primary:hover { background: #f2f0ff; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 48px 0 28px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 24px; margin-bottom: 32px; }
.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin: 0 0 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--text-soft); font-size: 14px; }
.footer-grid a:hover { color: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-faint); }

/* ---------- Forms / auth / dashboard ---------- */
.auth-wrap { min-height: calc(100vh - 68px); display: flex; align-items: center; justify-content: center; background: var(--bg-soft); padding: 40px 20px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 22px; margin: 0 0 6px; font-weight: 800; }
.auth-card p.sub { color: var(--text-soft); font-size: 14px; margin: 0 0 24px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; background: var(--bg-soft); color: var(--text); font-family: inherit;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--primary); background: #fff; }
.form-msg { font-size: 13.5px; padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; display: none; }
.form-msg.error { background: #fff0f1; color: #c0303f; display: block; }
.form-msg.success { background: var(--accent-soft); color: #058a76; display: block; }
.auth-alt { text-align: center; font-size: 13.5px; color: var(--text-soft); margin-top: 18px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-faint); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.google-btn-wrap { display: flex; justify-content: center; }

.dash-shell { display: flex; min-height: calc(100vh - 68px); }
.dash-sidebar { width: 240px; border-right: 1px solid var(--border); padding: 24px 16px; background: var(--bg-soft); flex-shrink: 0; }
.dash-sidebar a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; color: var(--text-soft); margin-bottom: 4px; }
.dash-sidebar a.active, .dash-sidebar a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.dash-main { flex: 1; padding: 32px 36px; max-width: 980px; }
.dash-main h1 { font-size: 24px; margin: 0 0 6px; }
.dash-main p.sub { color: var(--text-soft); margin: 0 0 28px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.stat-card .num { font-size: 26px; font-weight: 800; }
.stat-card .label { font-size: 12.5px; color: var(--text-soft); }

table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); }
.data-table th { color: var(--text-faint); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }

.badge-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--accent-soft); color: #058a76; }

code.snippet, pre.snippet {
  display: block; background: #1c2130; color: #dfe3f5; border-radius: var(--radius-sm);
  padding: 16px; font-size: 13px; overflow-x: auto; line-height: 1.6;
}

/* ---------- Mobile nav toggle ---------- */
.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--text);
}

@media (max-width: 900px) {
  .navbar .inner { flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; }
  .nav-links, .nav-actions {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .navbar.nav-open { background: var(--bg); backdrop-filter: none; }
  .navbar.nav-open .inner { height: auto; padding-bottom: 8px; }
  .navbar.nav-open .nav-links, .navbar.nav-open .nav-actions { display: flex; }
  .nav-links { padding-top: 10px; }
  .nav-links a { padding: 12px 4px; border-top: 1px solid var(--border); text-align: left; }
  .nav-actions {
    padding: 16px 0 18px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    gap: 10px;
  }
  .nav-actions > a.btn-text { padding: 8px 0; }
  .nav-actions .lang-switch select { width: 100%; }
  .nav-actions .btn { width: 100%; }

  .grid-4, .grid-3, .grid-2, .pricing-grid, .addons-grid, .steps, .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .dash-shell { flex-direction: column; }
  .dash-sidebar { width: 100%; display: flex; overflow-x: auto; }
  .dash-main { padding: 24px 20px; }
  .form-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .grid-4, .grid-3, .grid-2, .pricing-grid, .addons-grid, .steps, .footer-grid { grid-template-columns: 1fr; }
}
