/* =====================================================================
   ffwarn — landing-page stylesheet (emerald/stone palette)
   Loaded only on the home page, on top of the shared app.css.
   Contains the hero, scan card, stats, how-it-works, who-helps,
   pricing, API docs, and FAQ section styles.
   ===================================================================== */

/* ===== LANDING BODY =====
   The shared app.css gives body a flex column + bg-soft for the
   dashboard layout. On the landing page we want a flat white
   background so the alternating section backgrounds read correctly. */
body.landing {
  background: var(--bg);
  display: block;
  min-height: 0;
}

/* ===== EYEBROW ===== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--emerald-50);
  color: var(--emerald-700);
  font-size: 13px;
  font-weight: 600;
  border-radius: 50px;
  border: 1px solid var(--emerald-200);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--emerald-500);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.2);
}

/* ===== BUTTONS (landing-specific) ===== */
.btn-check {
  background: var(--emerald-600);
  color: #fff;
  padding: 13px 32px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-check:hover { background: var(--emerald-700); }
.btn-check:disabled { background: var(--stone-400); cursor: not-allowed; }

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 88px 0 64px;
  background:
    radial-gradient(900px 500px at 85% -10%, var(--emerald-50), transparent 60%),
    radial-gradient(700px 400px at 0% 20%, #fffbeb, transparent 55%),
    linear-gradient(180deg, var(--bg-soft) 0%, #ffffff 100%);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 4.6vw, 54px);
  font-weight: 700;
  line-height: 1.08;
  color: var(--ink);
  margin: 22px 0 18px;
}
.hero h1 .highlight {
  color: var(--emerald-600);
  position: relative;
  white-space: nowrap;
}
.hero h1 .highlight::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 10px;
  background: var(--emerald-200);
  z-index: -1;
  border-radius: 4px;
}
.hero p.lead {
  font-size: 18px;
  color: var(--stone-600);
  max-width: 520px;
  margin: 0 0 32px;
  line-height: 1.65;
}
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== HERO SCAN CARD ===== */
.scan-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.scan-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, var(--emerald-200), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.scan-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.scan-head h2 {
  font-size: 18px; font-weight: 600; color: var(--ink);
}
.scan-head .live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--emerald-700);
  background: var(--emerald-50); padding: 4px 10px; border-radius: 50px;
}
.scan-head .live .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--emerald-500);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}
.mode-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--stone-100);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.mode-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--stone-600);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.mode-tab:hover { color: var(--emerald-700); }
.mode-tab.active {
  background: #fff;
  color: var(--emerald-700);
  box-shadow: var(--shadow-sm);
}
.scan-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.mode-panel { display: none; flex-direction: column; gap: 10px; }
.mode-panel.active { display: flex; }
.field-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 1fr;
  gap: 10px;
}
.scan-form input {
  padding: 13px 15px;
  border: 1px solid var(--stone-300);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.scan-form input::placeholder { color: var(--stone-400); }
.scan-form input:focus { border-color: var(--emerald-500); box-shadow: 0 0 0 3px rgba(16,185,129,0.18); }
.scan-form .btn-check { width: 100%; }
.scan-result {
  min-height: 60px;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  display: none;
  align-items: flex-start;
  gap: 12px;
}
.scan-result.visible { display: flex; }
.scan-result.safe {
  background: var(--emerald-50);
  color: var(--emerald-800);
  border: 1px solid var(--emerald-200);
}
.scan-result.warn {
  background: var(--red-50);
  color: var(--red-700);
  border: 1px solid var(--red-100);
}
.scan-result .result-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 15px; margin-top: 1px;
}
.scan-result.safe .result-icon { background: var(--emerald-200); color: var(--emerald-800); }
.scan-result.warn .result-icon { background: var(--red-100); color: var(--red-700); }
.scan-result .result-text { flex: 1; min-width: 0; }
.scan-result .result-detail { font-weight: 400; font-size: 13px; margin-top: 2px; opacity: 0.85; }
.scan-result .result-meta {
  font-weight: 400; font-size: 12px; margin-top: 6px;
  display: flex; flex-wrap: wrap; gap: 6px 10px;
}
.scan-result .tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 50px;
  background: rgba(255,255,255,0.6);
  border: 1px solid currentColor;
  opacity: 0.8;
}
.scan-upsell {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.scan-upsell a { font-weight: 600; }

/* ===== STATS BAR ===== */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 28px; padding-bottom: 28px;
}
.stat { text-align: center; }
.stat .num {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 700; color: var(--emerald-700);
  line-height: 1;
}
.stat .label { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ===== SECTION HEADER ===== */
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}
.section-header p {
  font-size: 16px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
}

/* ===== HOW IT WORKS ===== */
.how-it-works { padding: 88px 0; background: var(--bg-soft); }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 980px;
  margin: 0 auto;
}
.step {
  position: relative;
  text-align: center;
  padding: 32px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald-50), var(--emerald-100));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.step-icon svg { width: 26px; height: 26px; color: var(--emerald-600); }
.step-number {
  font-size: 12px; font-weight: 700;
  color: var(--emerald-600);
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 8px;
}
.step h3 { font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ===== WHO THIS HELPS ===== */
.who-helps { padding: 88px 0; background: #fff; }
.who-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 820px;
  margin: 0 auto;
}
.who-card {
  display: flex;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.who-card:hover { border-color: var(--emerald-200); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.who-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--emerald-50);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.who-icon svg { width: 22px; height: 22px; color: var(--emerald-600); }
.who-card h3 { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.who-card p { font-size: 14px; color: var(--muted); line-height: 1.55; }

/* ===== PRICING ===== */
.pricing { padding: 88px 0; background: var(--bg-soft); }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 980px;
  margin: 0 auto;
  align-items: stretch;
}
.pricing-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex; flex-direction: column;
}
.pricing-card:hover { box-shadow: var(--shadow-md); }
.pricing-card.featured {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 1px var(--emerald-500), var(--shadow-lg);
  transform: translateY(-6px);
}
.pricing-badge {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--emerald-600);
  color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 5px 14px;
  border-radius: 50px;
  text-transform: uppercase; letter-spacing: 0.6px;
}
.pricing-card h3 { font-size: 20px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.pricing-price {
  font-family: var(--font-display);
  font-size: 38px; font-weight: 700; color: var(--ink);
  margin: 16px 0 4px;
}
.pricing-price span { font-size: 16px; font-weight: 500; color: var(--muted); }
.pricing-period { font-size: 13px; color: var(--stone-400); margin-bottom: 24px; }
.pricing-features { list-style: none; margin-bottom: 28px; flex: 1; }
.pricing-features li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--stone-600);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.pricing-features li svg { width: 18px; height: 18px; color: var(--emerald-500); flex-shrink: 0; margin-top: 1px; }
.pricing-note {
  font-size: 12px; color: var(--stone-400);
  text-align: center; margin-top: 24px; font-style: italic;
}
.pricing-card .btn { width: 100%; }

/* ===== API DOCS ===== */
.api-docs { padding: 88px 0; background: #fff; }
.api-content { max-width: 740px; margin: 0 auto; }
.code-block {
  background: var(--stone-900);
  border-radius: var(--radius);
  padding: 26px 28px;
  overflow-x: auto;
  margin: 24px 0 16px;
  border: 1px solid var(--stone-800);
}
.code-block pre {
  font-family: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  font-size: 13px; line-height: 1.75;
  color: var(--stone-200);
  white-space: pre;
}
.code-block .kw { color: #6ee7b7; }
.code-block .str { color: #fcd34d; }
.code-block .hdr { color: #93c5fd; }
.code-block .url { color: #5eead4; }
.code-block .cmt { color: var(--stone-500); }
.response-block {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 16px 0 24px;
}
.response-block pre {
  font-family: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  font-size: 13px; line-height: 1.75;
  color: var(--stone-600);
  white-space: pre;
}
.api-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 15px;
}
.api-link svg { width: 16px; height: 16px; }

/* ===== FAQ ===== */
.faq { padding: 88px 0; background: var(--bg-soft); }
.faq-list { max-width: 740px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item.open { border-color: var(--emerald-200); }
.faq-question {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  background: none; border: none;
  font-family: var(--font-body);
  font-size: 16px; font-weight: 600; color: var(--ink);
  cursor: pointer; text-align: left;
}
.faq-question:hover { color: var(--emerald-700); }
.faq-question svg {
  width: 20px; height: 20px; color: var(--stone-400);
  transition: transform 0.2s; flex-shrink: 0;
}
.faq-item.open .faq-question svg { transform: rotate(180deg); color: var(--emerald-600); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-answer-inner {
  padding: 0 24px 20px;
  font-size: 15px; color: var(--stone-600); line-height: 1.7;
}

/* ===== LANDING FOOTER (taller than the shared dashboard footer) ===== */
.footer-landing {
  padding: 56px 0;
  background: var(--stone-900);
  color: var(--stone-400);
}
.footer-landing .footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-landing .logo { color: #fff; }
.footer-landing .logo .accent { color: var(--emerald-400); }
.footer-landing .footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-landing .footer-links a { color: var(--stone-400); font-size: 14px; }
.footer-landing .footer-links a:hover { color: var(--emerald-400); text-decoration: none; }
.footer-landing .footer-copy { font-size: 13px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .stats .container { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .field-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .hero { padding: 56px 0 40px; }
  .hero h1 { font-size: 30px; }
  .hero p.lead { font-size: 16px; }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .scan-card { padding: 22px; }
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .who-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; }
  .pricing-card.featured { transform: none; }
  .nav-links .nav-link-text { display: none; }
  .api-content { padding: 0; }
  .code-block { padding: 20px; }
  .code-block pre { font-size: 12px; }
  .footer-landing .footer-inner { flex-direction: column; text-align: center; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .pricing-grid { max-width: 740px; }
}