/* Birchwoods v7 — Birch Theme App */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --primary: #3a5332;
  --primary-light: #6b8f5e;
  --accent: #d4a04a;
  --accent-hover: #b8872e;
  --text: #2e3328;
  --text-mid: #5e6b58;
  --text-light: #7a8574;
  --bg: #f9faf7;
  --bg-subtle: #f0f3ec;
  --border: #c8cfc0;
  --success: #4a6741;
  --danger: #b33a2e;
  --warning: #c4820a;
  --max-width: 1080px;
  --radius: 10px;
  --shadow-sm: 0 1px 4px rgba(46,66,40,0.06);
  --shadow: 0 2px 12px rgba(46,66,40,0.09);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text); line-height: 1.6; background: var(--bg);
  -webkit-font-smoothing: antialiased; position: relative;
}
body::before {
  content: ''; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: url('/img/birch-bg.jpg') center/cover no-repeat;
  opacity: 0.1; pointer-events: none; z-index: -1;
}

a { color: var(--primary-light); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--primary); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
.site-header {
  background: linear-gradient(90deg, #2e4228 0%, #3a5332 50%, #2e4228 100%);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px; height: 60px;
}
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.3px; }
.logo-img { height: 36px; border-radius: 3px; }
.logo-text span { color: #d4a04a; }
.nav-links { display: flex; gap: 24px; list-style: none; align-items: center; }
.nav-links a { color: rgba(255,255,255,0.75); font-size: 0.88rem; font-weight: 500; transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links .btn-sm { color: #fff; }

/* ── Hero ── */
.hero {
  background: linear-gradient(160deg, #2e4228 0%, #4a6741 40%, #3a5332 70%, #2e4228 100%);
  color: #fff; padding: 56px 0; text-align: center;
}
.hero h1 { font-size: 2.1rem; font-weight: 700; margin-bottom: 12px; line-height: 1.25; letter-spacing: -0.5px; }
.hero p { font-size: 1.05rem; opacity: 0.85; max-width: 540px; margin: 0 auto 24px; }

/* ── Buttons ── */
.btn {
  display: inline-block; padding: 11px 26px; border-radius: 20px;
  font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.15s; border: none; text-align: center;
}
.btn-primary { background: linear-gradient(180deg, #d4a04a 0%, #b88830 100%); color: #fff; }
.btn-primary:hover { background: linear-gradient(180deg, #deb060 0%, #c49838 100%); color: #fff; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(196,127,44,0.3); }
.btn-secondary { background: var(--primary-light); color: #fff; }
.btn-secondary:hover { background: var(--primary); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #922e24; color: #fff; }
.btn-sm { padding: 8px 18px; font-size: 0.82rem; border-radius: 14px; }
.btn-block { display: block; width: 100%; }

/* ── Sections ── */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-subtle); }
.section-title { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 8px; color: var(--primary); letter-spacing: -0.3px; }
.section-subtitle { text-align: center; color: var(--text-light); font-size: 0.95rem; margin-bottom: 36px; max-width: 520px; margin-left: auto; margin-right: auto; }

/* ── Cards ── */
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 14px;
  padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.card:hover { box-shadow: var(--shadow); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card-title { font-size: 1.05rem; font-weight: 600; color: var(--primary); }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-mid); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 0.9rem; color: var(--text); background: #fff; outline: none; transition: border-color 0.15s;
  font-family: inherit;
}
.form-control:focus { border-color: var(--primary-light); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%237a8574' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-error { color: var(--danger); font-size: 0.82rem; margin-top: 4px; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
thead { background: var(--bg-subtle); }
th { text-align: left; padding: 10px 14px; font-weight: 600; color: var(--text-mid); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 2px solid var(--border); }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
tr:hover { background: rgba(58,83,50,0.02); }

/* ── Badges ── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 10px;
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
}
.badge-success { background: #eef5eb; color: var(--success); }
.badge-warning { background: #fef5e7; color: var(--warning); }
.badge-danger { background: #fdf2f0; color: var(--danger); }
.badge-info { background: #e8f0f8; color: #2a6496; }
.badge-neutral { background: var(--bg-subtle); color: var(--text-mid); }

/* ── Stats ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.82rem; color: var(--text-light); margin-top: 2px; }

/* ── Search ── */
.search-bar { max-width: 460px; margin: 0 auto 28px; position: relative; }
.search-bar input {
  width: 100%; padding: 11px 16px 11px 48px;
  border: 1.5px solid var(--border); border-radius: 20px;
  font-size: 0.92rem; outline: none; background: var(--bg); color: var(--text); transition: border-color 0.15s;
}
.search-bar input:focus { border-color: var(--primary-light); }
.search-bar .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 0.95rem; }

.search-results { max-width: 520px; margin: 0 auto; }
.result-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center;
  box-shadow: var(--shadow-sm);
}
.result-card .result-info h4 { font-size: 0.95rem; color: var(--primary); margin-bottom: 2px; }
.result-card .result-info p { color: var(--text-light); font-size: 0.82rem; }
.no-results { text-align: center; color: var(--text-light); padding: 24px; font-size: 0.9rem; }

/* ── Modal ── */
.modal-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: #fff; border-radius: 14px; padding: 28px; width: 90%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-title { font-size: 1.15rem; font-weight: 700; color: var(--primary); }
.modal-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-light); padding: 4px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ── Alerts ── */
.alert {
  padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px;
  font-size: 0.88rem; display: none;
}
.alert.show { display: block; }
.alert-success { background: #eef5eb; color: var(--success); border: 1px solid #c8dfc0; }
.alert-danger { background: #fdf2f0; color: var(--danger); border: 1px solid #f0c8c4; }
.alert-warning { background: #fef5e7; color: var(--warning); border: 1px solid #f0ddb8; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-light); }
.empty-state p { font-size: 0.95rem; margin-bottom: 16px; }

/* ── Page Layout ── */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-content { min-height: 60vh; }

/* ── Toolbar ── */
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar select { padding: 8px 32px 8px 12px; }

/* ── Tabs ── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab {
  padding: 10px 20px; font-size: 0.88rem; font-weight: 600; color: var(--text-light);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--accent); }

/* ── Portal Cards ── */
.portal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 720px; margin: 0 auto; }
.portal-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 14px;
  padding: 32px 28px; text-align: center; box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, transform 0.15s; display: block; color: inherit; text-decoration: none;
}
.portal-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.portal-card .card-icon { margin-bottom: 14px; }
.portal-card h3 { font-size: 1.1rem; font-weight: 600; color: var(--primary); margin-bottom: 8px; }
.portal-card p { color: var(--text-mid); font-size: 0.88rem; margin-bottom: 18px; line-height: 1.55; }

/* ── Features Grid ── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 14px;
  padding: 28px 24px; box-shadow: var(--shadow-sm); transition: box-shadow 0.15s;
}
.feature-card:hover { box-shadow: var(--shadow); }
.feature-card .card-icon { margin-bottom: 14px; }
.feature-card h3 { font-size: 1rem; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.feature-card p { color: var(--text-mid); font-size: 0.88rem; line-height: 1.55; }

/* ── Steps ── */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }
.step { text-align: center; }
.step-number {
  width: 36px; height: 36px; background: linear-gradient(135deg, #6b8f5e, #4a6741); color: #fff; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.95rem; font-weight: 700; margin-bottom: 12px;
}
.step h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; color: var(--primary); }
.step p { color: var(--text-mid); font-size: 0.88rem; }

/* ── CTA Box ── */
.cta-box {
  background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 36px; text-align: center; max-width: 520px; margin: 0 auto; box-shadow: var(--shadow-sm);
}
.cta-box h3 { font-size: 1.2rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.cta-box p { color: var(--text-mid); font-size: 0.9rem; margin-bottom: 16px; }
.cta-box .contact-info { font-size: 0.88rem; color: var(--text-mid); margin-top: 16px; }
.cta-box .contact-info a { font-weight: 600; color: var(--primary-light); }
.cta-box .contact-info .name { font-weight: 600; color: var(--primary); margin-top: 8px; }

/* ── Founder Note ── */
.founder-note { max-width: 620px; margin: 0 auto; text-align: center; }
.founder-note p { color: var(--text-mid); font-size: 0.92rem; line-height: 1.7; }

/* ── Compare Grid ── */
.compare-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0;
  max-width: 620px; margin: 0 auto 40px;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.compare-cell { padding: 20px 16px; text-align: center; border-right: 1px solid var(--border); }
.compare-cell:last-child { border-right: none; }
.compare-cell.header { background: var(--bg-subtle); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-light); padding: 12px 16px; }
.compare-cell .big { font-size: 1.6rem; font-weight: 800; color: var(--primary); margin-bottom: 2px; }
.compare-cell .sub { font-size: 0.8rem; color: var(--text-light); }
.compare-cell.highlight { background: rgba(42,125,79,0.04); }
.compare-cell.highlight .big { color: var(--success); }

/* ── Transition Steps ── */
.transition-steps { max-width: 620px; margin: 0 auto; }
.transition-step { display: flex; gap: 16px; margin-bottom: 18px; align-items: flex-start; }
.step-num {
  min-width: 32px; height: 32px; background: var(--primary); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.transition-step p { color: var(--text-mid); font-size: 0.9rem; line-height: 1.55; }

/* ── Footer ── */
.site-footer { background: linear-gradient(180deg, #2e4228 0%, #243520 100%); color: rgba(255,255,255,0.65); padding: 32px 0 16px; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; text-align: center; }
.footer-inner p { font-size: 0.82rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 24px; }
.footer-brand .logo { margin-bottom: 8px; display: inline-flex; }
.footer-brand p { font-size: 0.82rem; line-height: 1.6; }
.site-footer h4 { color: #fff; font-size: 0.82rem; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 6px; font-size: 0.82rem; }
.footer-links a { color: rgba(255,255,255,0.65); font-size: 0.82rem; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 16px; text-align: center; font-size: 0.78rem; }

/* ── Loading Spinner ── */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { text-align: center; padding: 48px; }
.loading .spinner { width: 32px; height: 32px; }

/* ── Utility ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-muted { color: var(--text-light); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-none { display: none; }
.d-flex { display: flex; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.6rem; }
  .hero { padding: 40px 0; }
  .portal-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 20px; }
  .nav-links { gap: 14px; flex-wrap: wrap; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .compare-grid { grid-template-columns: 1fr; }
  .compare-cell { border-right: none; border-bottom: 1px solid var(--border); }
  .compare-cell:last-child { border-bottom: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
}
