/* emailzeno — apex marketing site overlay on Bootstrap 5
   Tokens (--brand, --accent, --paper, --ink, etc.) come from ./tokens.css.
   Load order in index.php: bootstrap.css → tokens.css → site.css */

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-emphasis);
  --bs-btn-hover-border-color: var(--brand-emphasis);
  --bs-btn-active-bg: var(--brand-emphasis);
  --bs-btn-active-border-color: var(--brand-emphasis);
}
.btn-outline-primary {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
}

.text-brand           { color: var(--brand) !important; }
.text-brand-emphasis  { color: var(--brand-emphasis) !important; }
.bg-brand             { background-color: var(--brand) !important; }
.bg-brand-subtle      { background-color: var(--brand-subtle) !important; }
.border-brand         { border-color: var(--brand) !important; }

html { scroll-behavior: smooth; }
body {
  font-family: var(--body-font);
  color: var(--ink);
  background: var(--paper);
}

.navbar-brand { font-size: 1.15rem; }
.nav-link     { font-weight: 500; color: var(--muted); }
.nav-link:hover { color: var(--brand); }

/* Hero */
.hero { background: linear-gradient(180deg, var(--brand-subtle) 0%, var(--paper) 60%); }
.hero h1 { letter-spacing: -0.02em; }
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.hero-form input:focus { box-shadow: none; }
.hero-form { transition: box-shadow 0.2s; }
.hero-form:focus-within {
  box-shadow:
    0 0 0 4px rgba(var(--bs-primary-rgb), 0.12),
    var(--shadow-md) !important;
}

/* Feature icons / step numbers */
.feature-icon,
.step-num {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
}

/* Compare table */
.compare-table th,
.compare-table td               { vertical-align: middle; }
.compare-table thead th         { border-bottom: 2px solid var(--rule); padding-bottom: 0.75rem; }
.compare-table .bi-check-circle-fill { font-size: 1.1rem; }

/* Pricing */
.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Accordion brand styling */
.accordion-button:not(.collapsed) {
  background-color: var(--brand-subtle);
  color: var(--brand-emphasis);
}
.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.18);
  border-color: var(--brand);
}

/* Cards subtle hover */
.card.shadow-sm           { transition: transform 0.2s, box-shadow 0.2s; }
.card.shadow-sm:hover     { transform: translateY(-2px); box-shadow: var(--shadow-md) !important; }

/* Result card */
.result-card           { padding: 0.85rem 1rem; border-radius: var(--radius); text-align: left; }
.result-card.green     { background: var(--ok-soft);   color: var(--ok);   border: 1px solid var(--ok); }
.result-card.amber     { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn); }
.result-card.red       { background: var(--bad-soft);  color: var(--bad);  border: 1px solid var(--bad); }

/* Theme toggle button (apex navbar) */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink);
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.theme-toggle:hover { background: var(--surface-2); border-color: var(--brand); }
.theme-toggle .bi-sun-fill   { display: none; }
.theme-toggle .bi-moon-fill  { display: inline-block; }
[data-theme="dark"] .theme-toggle .bi-sun-fill   { display: inline-block; }
[data-theme="dark"] .theme-toggle .bi-moon-fill  { display: none; }

/* ── EC component utilities (shared by apex and app via token vars) ─────────── */

/* Code blocks — dark terminal look in BOTH themes (emailable signature style).
   --code-bg / --code-fg are intentionally NOT theme-swapped: always dark. */
.ec-code-block {
  background: var(--code-bg, #0d1117);
  color: var(--code-fg, #e6edf3);
  border-radius: var(--radius);
  padding: 38px var(--space-5) var(--space-5);
  font-family: var(--mono-font);
  font-size: 13px;
  line-height: 1.65;
  position: relative;
  overflow-x: auto;
  margin-bottom: var(--space-4);
}
.ec-code-block .ec-lang-label {
  position: absolute;
  top: 10px;
  left: 14px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #7d8590;
  text-transform: uppercase;
  font-family: var(--mono-font);
}
.ec-code-block .ec-copy-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: #7d8590;
  border-radius: 4px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}
.ec-code-block .ec-copy-btn:hover { background: rgba(255,255,255,0.13); color: #e6edf3; }
.ec-code-block .ec-copy-btn.copied { color: #3fb950; border-color: rgba(63,185,80,0.5); }
.ec-code-block pre { margin: 0; white-space: pre; }

/* Pricing cards — flat emailable style */
.ec-pricing-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--space-6);
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
  height: 100%;
}
.ec-pricing-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.ec-pricing-card.is-featured {
  border-color: var(--accent);
  border-width: 2px;
}
.ec-pricing-card .ec-popular-pill {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--paper);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.ec-pricing-card .ec-price-amount {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.ec-pricing-card .ec-price-period {
  font-size: 13px;
  color: var(--muted);
  margin-left: 4px;
}
.ec-pricing-card .ec-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-5);
}
.ec-pricing-card .ec-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dotted var(--rule-soft);
  font-size: 13px;
  color: var(--ink-soft);
}
.ec-pricing-card .ec-feature-list li:last-child { border-bottom: none; }
.ec-pricing-card .ec-feature-list .ec-check { color: var(--accent); flex-shrink: 0; margin-top: 2px; }

/* Feature / comparison rows */
.ec-feature-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--rule-soft);
}
.ec-feature-row:last-child { border-bottom: none; }
.ec-feature-row .ec-feature-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-cream);
  color: var(--accent);
  border-radius: var(--radius);
  flex-shrink: 0;
  font-size: 1.1rem;
}
.ec-feature-row .ec-feature-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}
.ec-feature-row .ec-feature-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* Dark-mode card adjustments for Bootstrap utilities used on the page */
[data-theme="dark"] .bg-white      { background-color: var(--surface) !important; color: var(--ink); }
[data-theme="dark"] .bg-light      { background-color: var(--surface-2) !important; color: var(--ink); }
[data-theme="dark"] .text-muted    { color: var(--muted) !important; }
[data-theme="dark"] .text-dark     { color: var(--ink) !important; }
[data-theme="dark"] .border        { border-color: var(--rule) !important; }
[data-theme="dark"] .border-bottom { border-color: var(--rule) !important; }
[data-theme="dark"] .card          { background-color: var(--surface); color: var(--ink); border-color: var(--rule); }
[data-theme="dark"] .accordion-item,
[data-theme="dark"] .accordion-button {
  background-color: var(--surface);
  color: var(--ink);
}
[data-theme="dark"] .table { color: var(--ink); border-color: var(--rule); }
[data-theme="dark"] .table td, [data-theme="dark"] .table th { border-color: var(--rule); }
/* breadcrumb + nav color fix in dark */
[data-theme="dark"] .breadcrumb-item.active { color: var(--muted); }
[data-theme="dark"] .breadcrumb-item a { color: var(--brand); }
[data-theme="dark"] .nav-link { color: var(--muted); }
[data-theme="dark"] .nav-link:hover { color: var(--brand); }
/* badge utilities in dark */
[data-theme="dark"] .badge.bg-primary { background-color: var(--accent) !important; }
/* code inline in dark */
[data-theme="dark"] code:not([class]) {
  background: var(--surface-2);
  color: var(--accent);
  padding: 1px 5px;
  border-radius: 3px;
}
