/* ═══════════════════════════════════════════════════════════════════
   KF Agency — Industry interactive tools (shared styles)
   ───────────────────────────────────────────────────────────────────
   Reused by every per-industry tool (media plan, growth, funnel, KPI).
   Relies on the design tokens already defined in landing.css
   (--accent, --bg, --text, --radius, --kf-grad, …) since both
   stylesheets load on the same page. All classes are prefixed `kft-`.
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Hero layout when a tool is present (message + tool card side by side) ─ */
.hero.has-tool .hero-inner { max-width: 1140px; }
.hero.has-tool .hero-top {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center; text-align: start;
}
.hero.has-tool .hero-lead { text-align: start; min-width: 0; }
.hero.has-tool .hero-sub { margin-inline: 0; margin-bottom: 0; max-width: 540px; }
.hero.has-tool .hero-cta-row { justify-content: flex-start; margin-top: 30px; margin-bottom: 16px; }
.hero.has-tool .hero-microtrust { justify-content: flex-start; }
@media (max-width: 900px) {
  .hero.has-tool .hero-top { grid-template-columns: 1fr; gap: 26px; }
  .hero.has-tool .hero-cta-row { justify-content: stretch; }
}

/* ─── Tool launch card (icon entry point) ─────────────────────────── */
.kft-launch {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  width: 100%; margin: 0; padding: 28px; text-align: start; cursor: pointer;
  border: 1px solid var(--border-2); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fff, var(--bg-alt));
  box-shadow: var(--shadow-md);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.kft-launch:hover, .kft-launch:focus-visible {
  transform: translateY(-3px); border-color: var(--border-accent);
  box-shadow: 0 28px 64px rgba(138, 92, 246, .22); outline: none;
}
.kft-launch-icon {
  width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center;
  background: var(--kf-grad); color: #fff; box-shadow: var(--shadow-cta);
}
.kft-launch-icon svg { width: 30px; height: 30px; }
.kft-launch-tag {
  font-family: var(--kf-display); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); background: rgba(138, 92, 246, .1); padding: 5px 10px; border-radius: 999px;
}
.kft-launch-title { font-family: var(--kf-display); font-size: 20px; font-weight: 700; line-height: 1.35; color: var(--heading); margin: 0; }
body[dir="rtl"] .kft-launch-title { font-family: var(--kf-body-ar); font-weight: 800; }
.kft-launch-desc { font-size: 13.5px; line-height: 1.7; color: var(--text-dim); margin: 0; }
.kft-launch-cue {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 2px;
  font-family: var(--kf-display); font-weight: 600; font-size: 14.5px; color: var(--accent);
}
.kft-launch-cue svg { width: 17px; height: 17px; }
.kft-spark { font-size: 16px; line-height: 1; }
@media (max-width: 900px) { .kft-launch { padding: 24px; } }

/* ─── Modal overlay ──────────────────────────────────────────────── */
.kft-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: flex-start; justify-content: center;
  padding: clamp(8px, 4vw, 48px) clamp(8px, 4vw, 32px);
  background: rgba(15, 13, 36, .55); backdrop-filter: blur(6px);
  overflow-y: auto; opacity: 0; transition: opacity .2s ease;
}
.kft-modal.open { display: flex; opacity: 1; }
body.kft-modal-open { overflow: hidden; }

.kft-panel {
  position: relative; width: 100%; max-width: 940px;
  background: var(--bg); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); box-shadow: 0 40px 90px -30px rgba(15, 13, 36, .55);
  margin: auto; overflow: hidden;
  transform: translateY(14px); transition: transform .25s ease;
}
.kft-modal.open .kft-panel { transform: translateY(0); }

.kft-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, var(--bg-alt)); position: sticky; top: 0; z-index: 2;
}
.kft-head-icon {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; font-size: 21px;
  background: rgba(138, 92, 246, .1); color: var(--accent);
}
.kft-head-text { flex: 1 1 auto; min-width: 0; }
.kft-head-text h2 { margin: 0; font-family: var(--kf-display); font-size: 18px; font-weight: 700; color: var(--heading); }
body[dir="rtl"] .kft-head-text h2 { font-family: var(--kf-body-ar); font-weight: 800; }
.kft-head-text p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-faint); }
.kft-close {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text-dim);
  display: grid; place-items: center; font-size: 20px; line-height: 1;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.kft-close:hover { background: var(--surface-hover); color: var(--accent); border-color: var(--border-accent); }

.kft-body { padding: 22px clamp(16px, 4vw, 30px) 30px; max-height: calc(100vh - 200px); overflow-y: auto; }

/* ─── Forms ──────────────────────────────────────────────────────── */
.kft-form-intro { font-size: 14px; line-height: 1.7; color: var(--text-dim); margin: 0 0 20px; }
.kft-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.kft-grid .kft-full { grid-column: 1 / -1; }
.kft-field { display: flex; flex-direction: column; gap: 7px; }
.kft-field label { font-size: 13.5px; font-weight: 600; color: var(--heading); }
.kft-field label .kft-req { color: var(--accent-pink); margin-inline-start: 3px; }
.kft-field input,
.kft-field select {
  width: 100%; padding: 11px 13px; font-size: 14.5px;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); transition: border-color .15s ease, box-shadow .15s ease;
}
.kft-field input:focus,
.kft-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138, 92, 246, .14); }
.kft-field .kft-hint { font-size: 12px; color: var(--text-faint); }

.kft-section-label {
  grid-column: 1 / -1; margin: 8px 0 -4px;
  font-family: var(--kf-display); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint); display: flex; align-items: center; gap: 10px;
}
.kft-section-label::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--border); }

/* budget-mode segmented control */
.kft-modes { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kft-mode {
  position: relative; border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  padding: 13px 12px; cursor: pointer; background: var(--surface); transition: border-color .15s ease, background .15s ease;
}
.kft-mode:hover { border-color: var(--border-accent); }
.kft-mode input { position: absolute; opacity: 0; pointer-events: none; }
.kft-mode-t { display: block; font-weight: 700; font-size: 13.5px; color: var(--heading); }
.kft-mode-d { display: block; font-size: 11.5px; color: var(--text-faint); margin-top: 3px; line-height: 1.4; }
.kft-mode:has(input:checked) { border-color: var(--accent); background: rgba(138, 92, 246, .06); box-shadow: 0 0 0 1px var(--accent) inset; }

/* contact gate */
.kft-gate {
  grid-column: 1 / -1; margin-top: 6px; padding: 18px;
  border: 1px dashed var(--border-accent); border-radius: var(--radius);
  background: rgba(138, 92, 246, .04);
}
.kft-gate-head { display: flex; align-items: center; gap: 9px; margin: 0 0 4px; font-family: var(--kf-display); font-weight: 700; font-size: 15px; color: var(--heading); }
.kft-gate-head .kft-lock { color: var(--accent); }
.kft-gate-sub { margin: 0 0 14px; font-size: 12.5px; color: var(--text-dim); line-height: 1.6; }
.kft-gate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.kft-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; }
.kft-submit {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--kf-display); font-weight: 600; font-size: 15px;
  padding: 13px 24px; border: 0; border-radius: 999px;
  background: var(--kf-grad); color: #fff; box-shadow: var(--shadow-cta);
  transition: transform .15s ease, box-shadow .15s ease;
}
.kft-submit:hover { transform: translateY(-2px); }
.kft-submit:disabled { opacity: .6; transform: none; cursor: default; }
.kft-error { flex-basis: 100%; color: var(--accent-pink); font-size: 13px; font-weight: 600; display: none; }
.kft-error.show { display: block; }
.kft-privacy { flex-basis: 100%; font-size: 11.5px; color: var(--text-faint); margin: 0; }

.kft-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 640px) {
  .kft-grid { grid-template-columns: 1fr; }
  .kft-gate-grid { grid-template-columns: 1fr; }
  .kft-modes { grid-template-columns: 1fr; }
}

/* ─── Results ────────────────────────────────────────────────────── */
.kft-results { display: flex; flex-direction: column; gap: 16px; }
.kft-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 22px; background: var(--surface); box-shadow: var(--shadow-sm);
}
.kft-card h3 { margin: 0 0 14px; font-family: var(--kf-display); font-size: 16px; font-weight: 700; color: var(--heading); display: flex; align-items: center; gap: 9px; }
body[dir="rtl"] .kft-card h3 { font-family: var(--kf-body-ar); font-weight: 800; }
.kft-card h4 { margin: 18px 0 10px; font-size: 13.5px; font-weight: 700; color: var(--text-dim); }
.kft-narrative { font-size: 14px; line-height: 1.85; color: var(--text-dim); margin: 0; }
.kft-narrative strong { color: var(--text); }

.kft-result-hero {
  background: linear-gradient(135deg, #15102b, #241640); color: #fff; border: 0;
}
.kft-result-hero .kft-eyebrow { font-family: var(--kf-display); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-blue); }
.kft-result-hero h2 { margin: 8px 0 6px; font-size: 22px; color: #fff; font-family: var(--kf-display); }
body[dir="rtl"] .kft-result-hero h2 { font-family: var(--kf-body-ar); font-weight: 800; }
.kft-result-hero .kft-meta { font-size: 13px; color: #c9c1e6; }

.kft-bignums { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kft-bignum { text-align: center; padding: 18px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: linear-gradient(180deg, #fff, var(--bg-alt)); }
.kft-bignum span { display: block; font-size: 12px; color: var(--text-faint); margin-bottom: 6px; }
.kft-bignum strong { display: block; font-family: var(--kf-display); font-size: 26px; font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent-pink)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.kft-bignum small { display: block; margin-top: 5px; font-size: 12px; color: var(--text-faint); }

/* funnel bar */
.kft-funnel-bar { display: flex; height: 44px; border-radius: var(--radius-sm); overflow: hidden; margin: 4px 0 14px; border: 1px solid var(--border); }
.kft-funnel-seg { display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; font-family: var(--kf-display); min-width: 0; padding: 0 4px; text-align: center; }
.kft-funnel-seg.tofu { background: linear-gradient(135deg, #38bdf8, #6366f1); }
.kft-funnel-seg.mofu { background: linear-gradient(135deg, #8a5cf6, #a855f7); }
.kft-funnel-seg.bofu { background: linear-gradient(135deg, #e040a0, #f43f5e); }
.kft-funnel-amounts { display: grid; gap: 8px; }
.kft-funnel-amounts > div { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--text-dim); }
.kft-funnel-amounts strong { color: var(--heading); font-family: var(--kf-display); min-width: 120px; }

/* visual funnel (education tool) */
.kft-vfunnel { display: flex; flex-direction: column; align-items: center; gap: 3px; margin: 6px 0; }
.kft-vfunnel-row { width: 100%; display: flex; justify-content: center; }
.kft-vfunnel-bar { color: #fff; padding: 13px 16px; text-align: center; font-size: 13px; line-height: 1.4; clip-path: polygon(6% 0, 94% 0, 86% 100%, 14% 100%); }
.kft-vfunnel-bar strong { font-family: var(--kf-display); display: block; font-size: 17px; }
.kft-vfunnel-bar small { display: block; opacity: .85; font-size: 11.5px; }

/* platforms */
.kft-platforms { display: flex; flex-direction: column; gap: 12px; }
.kft-platform { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--bg-alt); }
.kft-platform-head { display: flex; align-items: center; gap: 12px; }
.kft-platform-icon { font-size: 20px; }
.kft-platform-head > div:nth-child(2) { flex: 1 1 auto; min-width: 0; }
.kft-platform-head strong { display: block; font-size: 14.5px; color: var(--heading); }
.kft-platform-funnel { font-size: 11.5px; color: var(--text-faint); }
.kft-platform-share { text-align: end; }
.kft-platform-share strong { font-family: var(--kf-display); font-size: 18px; color: var(--accent); display: block; }
.kft-platform-share small { font-size: 11.5px; color: var(--text-faint); }
.kft-platform-why { margin: 9px 0 0; font-size: 13px; line-height: 1.6; color: var(--text-dim); }

/* generic metric grid (KPI tool, expected results) */
.kft-metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.kft-metric { text-align: center; padding: 16px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-alt); }
.kft-metric strong { display: block; font-family: var(--kf-display); font-size: 23px; font-weight: 700; color: var(--heading); }
.kft-metric.kft-good strong { color: #16a34a; }
.kft-metric.kft-warn strong { color: #dc2626; }
.kft-metric small { display: block; margin-top: 5px; font-size: 12px; color: var(--text-faint); line-height: 1.4; }
.kft-metric .kft-sub { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

/* lists */
.kft-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; }
.kft-list li { display: flex; gap: 11px; font-size: 13.5px; line-height: 1.65; color: var(--text-dim); }
.kft-list li .kft-ic { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-pink)); }
.kft-list.kft-pos li .kft-ic { background: linear-gradient(135deg, #22c55e, #16a34a); }
.kft-list.kft-neg li .kft-ic { background: linear-gradient(135deg, #f59e0b, #ef4444); }

.kft-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kft-theme-col h5 { margin: 0 0 9px; font-size: 12.5px; font-weight: 700; color: var(--accent); }
.kft-theme-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; }
.kft-theme-col li { font-size: 12.5px; color: var(--text-dim); padding-inline-start: 14px; position: relative; line-height: 1.5; }
.kft-theme-col li::before { content: "•"; position: absolute; inset-inline-start: 0; color: var(--accent); }

.kft-benchmark-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.kft-benchmark-grid > div { text-align: center; padding: 14px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.kft-benchmark-grid strong { display: block; font-family: var(--kf-display); font-size: 18px; color: var(--heading); }
.kft-benchmark-grid small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--text-faint); }
.kft-note { font-size: 12.5px; line-height: 1.7; color: var(--text-faint); margin: 12px 0 0; }
.kft-disclaimer { font-size: 12px; color: var(--text-faint); margin: 0 0 14px; line-height: 1.6; }

.kft-recos { display: flex; flex-direction: column; gap: 12px; }
.kft-reco { display: flex; gap: 13px; padding: 14px 16px; border: 1px solid var(--border); border-inline-start: 3px solid var(--accent); border-radius: var(--radius-sm); background: var(--bg-alt); }
.kft-reco-ic { flex: 0 0 auto; font-size: 18px; }
.kft-reco-t { font-weight: 700; color: var(--heading); display: block; margin-bottom: 3px; font-size: 14px; }
.kft-reco-d { font-size: 13px; color: var(--text-dim); line-height: 1.65; }

/* result footer / CTA */
.kft-result-cta {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-radius: var(--radius); margin-top: 4px;
  background: linear-gradient(120deg, rgba(224, 64, 160, .08), rgba(138, 92, 246, .08));
  border: 1px solid var(--border-accent);
}
.kft-result-cta p { margin: 0; font-size: 14px; color: var(--heading); font-weight: 600; max-width: 420px; line-height: 1.6; }
.kft-cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.kft-btn-wa, .kft-btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--kf-display); font-weight: 600; font-size: 14px;
  padding: 11px 18px; border-radius: 999px; transition: transform .15s ease;
}
.kft-btn-wa { background: #25d366; color: #fff; border: 0; }
.kft-btn-wa svg { width: 17px; height: 17px; }
.kft-btn-wa:hover { transform: translateY(-2px); }
.kft-btn-ghost { background: var(--surface); color: var(--text-dim); border: 1px solid var(--border-2); }
.kft-btn-ghost:hover { border-color: var(--border-accent); color: var(--accent); }

@media (max-width: 640px) {
  .kft-bignums { grid-template-columns: 1fr; }
  .kft-themes { grid-template-columns: 1fr; }
  .kft-result-cta { flex-direction: column; align-items: stretch; }
}

/* print */
@media print {
  .kft-head, .kft-result-cta, .kft-close, .kft-launch { display: none !important; }
  .kft-modal { position: static; background: #fff; padding: 0; }
  .kft-panel { box-shadow: none; border: 0; max-width: none; }
  .kft-body { max-height: none; overflow: visible; }
}
