/* Funnelguru Style & Branding Guide — tokens (colors_and_type.css equivalent) */
:root {
  /* surfaces */
  --fg-bg: #0f0f13;
  --fg-card: #1a1a24;
  --fg-card-2: #22222f;
  --fg-border: #2e2e40;

  /* magenta */
  --fg-magenta-500: #B713AE;
  --fg-magenta-400: #D048C1;
  --fg-magenta-600: #990E92;
  --fg-magenta-700: #760A70;

  /* yellow */
  --fg-yellow-500: #FFD529;
  --fg-yellow-400: #FFDA38;
  --fg-yellow-600: #E6BC13;
  --fg-yellow-700: #B4940A;

  /* deep purple */
  --fg-purple-500: #592298;
  --fg-purple-400: #7747BE;
  --fg-purple-600: #471A7A;
  --fg-purple-700: #322849;

  /* text on dark */
  --fg-text-strong: #ffffff;
  --fg-text: #e2e8f0;
  --fg-text-muted: #94a3b8;
  --fg-text-faint: #64748b;

  /* functional */
  --fg-good: #10b981;
  --fg-warn: #f59e0b;
  --fg-danger: #ef4444;
  --fg-info: #3b82f6;

  /* the one gradient, 135°, three stops */
  --fg-gradient: linear-gradient(135deg, #592298 0%, #B713AE 55%, #FFD529 100%);
  --fg-gradient-soft: linear-gradient(135deg, rgba(89,34,152,.18) 0%, rgba(183,19,174,.16) 55%, rgba(255,213,41,.10) 100%);
  --fg-gradient-spotlight: radial-gradient(600px circle at 15% -10%, rgba(183,19,174,.16), transparent 60%), radial-gradient(500px circle at 100% 10%, rgba(89,34,152,.16), transparent 55%);

  /* radii */
  --fg-r-xs: 6px;
  --fg-r-sm: 10px;
  --fg-r-md: 12px;
  --fg-r-lg: 14px;
  --fg-r-xl: 16px;
  --fg-r-2xl: 18px;
  --fg-r-pill: 999px;

  /* shadows & glows */
  --fg-shadow-sm: 0 2px 8px rgba(0,0,0,.30);
  --fg-shadow-md: 0 8px 24px rgba(0,0,0,.40);
  --fg-shadow-lg: 0 20px 50px rgba(0,0,0,.50);
  --fg-glow-cta: 0 10px 32px rgba(183,19,174,.40), 0 4px 16px rgba(255,213,41,.18);
  --fg-glow-ring: 0 0 0 3px var(--fg-bg), 0 0 0 5px rgba(183,19,174,.55);

  /* type */
  --fg-font-ui: 'Inter', system-ui, sans-serif;
  --fg-font-display: 'Fraunces', Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--fg-bg);
  color: var(--fg-text);
  font-family: var(--fg-font-ui);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.fg-bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--fg-gradient-spotlight);
}

.fg-wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ---------- header ---------- */

.fg-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 32px;
}

.fg-pre-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-text-muted);
  background: var(--fg-gradient-soft);
  border: 1px solid rgba(183,19,174,.30);
  border-radius: var(--fg-r-pill);
  padding: 7px 16px;
  margin-bottom: 18px;
}

h1.fg, h2.fg {
  font-family: var(--fg-font-display);
  font-weight: 600;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--fg-text-strong);
  margin: 0 0 14px;
}

h1.fg em, h2.fg em {
  font-style: italic;
  font-weight: 600;
  background: var(--fg-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.fg-lede {
  font-size: 17px;
  line-height: 1.5;
  color: var(--fg-text-muted);
  margin: 0;
}

/* ---------- tabs ---------- */

.fg-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 28px;
}

.fg-tab {
  cursor: pointer;
  background: var(--fg-card);
  border: 1px solid var(--fg-border);
  border-radius: var(--fg-r-lg);
  padding: 14px 16px;
  text-align: left;
  color: var(--fg-text-muted);
  font-family: var(--fg-font-ui);
  transition: border-color .15s ease, transform .1s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fg-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(183,19,174,.45);
}

.fg-tab.active {
  background: var(--fg-gradient-soft);
  border-color: var(--fg-magenta-500);
  box-shadow: var(--fg-shadow-sm);
}

.fg-tab-title {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--fg-text-strong);
}

.fg-tab.active .fg-tab-title {
  background: var(--fg-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.fg-tab-desc {
  font-size: 12px;
  color: var(--fg-text-faint);
}

@media (max-width: 900px) {
  .fg-tabs { grid-template-columns: 1fr; }
}

/* ---------- calculator head ---------- */

.calc-head {
  margin-bottom: 22px;
}

.calc-head h2 {
  font-family: var(--fg-font-display);
  font-weight: 600;
  font-size: 26px;
  margin: 0 0 4px;
  color: var(--fg-text-strong);
  letter-spacing: -0.01em;
}

.calc-head p {
  margin: 0;
  color: var(--fg-text-muted);
  font-size: 14.5px;
}

/* ---------- layout & cards ---------- */

.grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--fg-card);
  border: 1px solid var(--fg-border);
  border-radius: var(--fg-r-2xl);
  padding: 22px;
  box-shadow: var(--fg-shadow-sm);
}

.card + .card { margin-top: 20px; }

.fg-eyebrow {
  font-family: var(--fg-font-ui);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-text-muted);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fg-eyebrow .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--fg-gradient);
  color: var(--fg-text-strong);
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

/* ---------- fields ---------- */

.field {
  margin-bottom: 16px;
}

.field:last-child { margin-bottom: 0; }

.field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--fg-text-muted);
  margin-bottom: 6px;
}

.field .input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field input[type="number"] {
  width: 100%;
  background: var(--fg-card-2);
  border: 1px solid var(--fg-border);
  color: var(--fg-text-strong);
  font-size: 16px;
  font-weight: 600;
  font-family: var(--fg-font-ui);
  border-radius: var(--fg-r-sm);
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  -moz-appearance: textfield;
}

.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.field input[type="number"]:focus {
  border-color: var(--fg-magenta-500);
  box-shadow: 0 0 0 3px rgba(183,19,174,.18);
}

.field .unit {
  position: absolute;
  right: 12px;
  font-size: 12.5px;
  color: var(--fg-text-faint);
  pointer-events: none;
}

/* ---------- rate sliders ---------- */

.rate-field {
  margin-bottom: 18px;
}

.rate-field:last-child { margin-bottom: 0; }

.rate-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.rate-top label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--fg-text-muted);
}

.rate-top .rate-value {
  font-family: var(--fg-font-display);
  font-weight: 700;
  font-size: 16px;
  background: var(--fg-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  min-width: 52px;
  text-align: right;
}

.rate-bench {
  font-size: 11px;
  color: var(--fg-text-faint);
  margin-top: 5px;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--fg-border);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fg-gradient);
  box-shadow: var(--fg-glow-ring);
  cursor: pointer;
  border: none;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fg-magenta-500);
  box-shadow: var(--fg-glow-ring);
  cursor: pointer;
  border: none;
}

/* ---------- funnel ---------- */

.funnel {
  display: flex;
  flex-direction: column;
}

.funnel-step {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--fg-card-2);
  border: 1px solid var(--fg-border);
  border-radius: var(--fg-r-md);
}

.funnel-step + .funnel-step { margin-top: 8px; }

.funnel-step .fs-label {
  font-size: 13.5px;
  color: var(--fg-text-muted);
}

.funnel-step .fs-value {
  font-family: var(--fg-font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--fg-text-strong);
  white-space: nowrap;
}

.funnel-arrow {
  display: flex;
  justify-content: center;
  padding: 4px 0;
  color: var(--fg-text-faint);
  font-size: 12px;
}

/* ---------- KPI results ---------- */

.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 20px;
}

@media (max-width: 720px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
}

.kpi {
  background: var(--fg-card);
  border: 1px solid var(--fg-border);
  border-radius: var(--fg-r-xl);
  padding: 18px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--fg-shadow-sm);
}

.kpi.primary {
  background: var(--fg-gradient-soft);
  border-color: var(--fg-magenta-500);
  box-shadow: var(--fg-glow-cta);
}

.kpi .kpi-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--fg-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.kpi .kpi-value {
  font-family: var(--fg-font-display);
  font-weight: 600;
  font-size: 25px;
  letter-spacing: -0.01em;
  color: var(--fg-text-strong);
}

.kpi.primary .kpi-value {
  background: var(--fg-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kpi .kpi-value.negative { color: var(--fg-danger); }
.kpi.primary .kpi-value.negative {
  background: none;
  -webkit-text-fill-color: initial;
  color: var(--fg-danger);
}

/* ---------- CTA block ---------- */

.fg-cta-block {
  text-align: center;
  margin: 48px 0 0;
  padding: 40px 32px;
  background: var(--fg-gradient-soft);
  border: 1px solid var(--fg-magenta-500);
  border-radius: var(--fg-r-2xl);
  box-shadow: var(--fg-shadow-md);
  text-align: center;
}

.fg-cta-inner {
  max-width: 640px;
  margin: 0 auto;
}

.fg-cta-block h2.fg {
  font-size: clamp(22px, 3.6vw, 30px);
  margin: 0 0 12px;
}

.fg-cta-block .fg-lede {
  max-width: 100%;
}

.fg-checks {
  list-style: none;
  margin: 20px 0;
  padding: 0;
  display: inline-flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.fg-checks li {
  font-size: 15px;
  color: var(--fg-text);
  font-weight: 500;
}

.fg-cta-lede {
  margin-top: 4px !important;
  margin-bottom: 22px !important;
  color: var(--fg-text) !important;
  font-weight: 500;
}

.fg-cta {
  display: inline-block;
  font-family: var(--fg-font-ui);
  font-weight: 700;
  font-size: 16px;
  color: var(--fg-text-strong);
  text-decoration: none;
  background: var(--fg-gradient);
  border: none;
  border-radius: var(--fg-r-lg);
  padding: 15px 32px;
  box-shadow: var(--fg-glow-cta);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.fg-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(183,19,174,.50), 0 6px 20px rgba(255,213,41,.22);
}

.fg-cta-full {
  display: block;
  width: 100%;
}

/* ---------- knowledge base teaser ---------- */

.fg-kb-block {
  text-align: center;
  max-width: 640px;
  margin: 32px auto 0;
  padding: 32px;
  background: var(--fg-card);
  border: 1px solid var(--fg-border);
  border-radius: var(--fg-r-2xl);
  box-shadow: var(--fg-shadow-sm);
}

.fg-kb-block h2.fg {
  font-size: clamp(20px, 3.4vw, 26px);
  margin: 0 0 10px;
}

.fg-kb-block .fg-lede {
  max-width: 100%;
  margin: 0 0 22px;
}

/* ---------- opt-in modal ---------- */

.fg-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 14, 0.75);
  backdrop-filter: blur(3px);
  padding: 20px;
}

.fg-modal-overlay[hidden] { display: none; }

.fg-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--fg-card);
  border: 1px solid var(--fg-magenta-500);
  border-radius: var(--fg-r-2xl);
  box-shadow: var(--fg-shadow-lg);
  padding: 32px 28px;
  text-align: center;
}

.fg-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--fg-card-2);
  border: 1px solid var(--fg-border);
  color: var(--fg-text-muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.fg-modal-close:hover {
  color: var(--fg-text-strong);
  border-color: var(--fg-magenta-500);
}

.fg-modal-title {
  font-family: var(--fg-font-display);
  font-weight: 600;
  font-size: 21px;
  color: var(--fg-text-strong);
  margin: 4px 0 8px;
}

.fg-modal-text {
  font-size: 14px;
  color: var(--fg-text-muted);
  margin: 0 0 20px;
}

#kb-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#kb-form input {
  width: 100%;
  font-family: var(--fg-font-ui);
  font-size: 16px;
  padding: 13px 14px;
  border-radius: var(--fg-r-sm);
  border: 1px solid var(--fg-border);
  background: var(--fg-card-2);
  color: var(--fg-text-strong);
  outline: none;
}

#kb-form input:focus {
  border-color: var(--fg-magenta-500);
  box-shadow: 0 0 0 3px rgba(183,19,174,.18);
}

.fg-modal-error {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--fg-danger);
}

.fg-reassure {
  margin: 18px 0 0;
  font-size: 12.5px;
  color: var(--fg-text-faint);
}

.fg-trustbadges {
  margin: 22px auto 0;
  max-width: 460px;
}

.fg-trustbadges img {
  width: 100%;
  height: auto;
  display: block;
}

.fg-signature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(183,19,174,.25);
}

.fg-signature-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(183,19,174,.35);
}

.fg-signature-text {
  text-align: left;
}

.fg-signature-name {
  font-family: var(--fg-font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--fg-text-strong);
}

.fg-signature-role {
  font-size: 12.5px;
  color: var(--fg-text-muted);
}

@media (max-width: 600px) {
  .fg-cta-block { padding: 32px 20px; }
}

/* ---------- info icon & tooltip ---------- */

.fg-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--fg-card-2);
  border: 1px solid var(--fg-border);
  color: var(--fg-text-muted);
  font-family: var(--fg-font-ui);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.fg-info-btn:hover,
.fg-info-btn.active {
  border-color: var(--fg-magenta-500);
  color: var(--fg-text-strong);
  background: var(--fg-gradient-soft);
}

.fg-tooltip {
  position: fixed;
  display: none;
  max-width: 260px;
  background: var(--fg-card-2);
  border: 1px solid var(--fg-magenta-500);
  border-radius: var(--fg-r-md);
  padding: 10px 13px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--fg-text);
  box-shadow: var(--fg-shadow-md);
  z-index: 60;
}

.fg-tooltip.visible { display: block; }

/* ---------- disclaimer (under calculator) ---------- */

.fg-disclaimer {
  text-align: center;
  color: var(--fg-text-faint);
  font-size: 12px;
  margin: 20px 0 0;
}

/* ---------- footer ---------- */

.fg-footer {
  text-align: center;
  margin-top: 32px;
}

.fg-footer p {
  color: var(--fg-text-faint);
  font-size: 12px;
}
