/* ===== Fonts (self-hosted, exact brand fonts; variable) ===== */
@font-face {
  font-family: "Crimson Pro";
  src: url("assets/fonts/CrimsonPro.ttf") format("truetype-variations");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter.ttf") format("truetype-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/JetBrainsMono.ttf") format("truetype-variations");
  font-weight: 100 800; font-style: normal; font-display: swap;
}

/* ===== Brand tokens (from fimpact_app/lib/core/theme.dart, light) ===== */
:root {
  --coral: #C2654A;
  --coral-bright: #cb6843;
  --coral-strong: #a55335;
  --teal: #1FA89B;
  --teal-bright: #45D6C5;
  --amber: #B8842F;
  --cream: #FBF8F2;
  --cream-2: #f3ecda;
  --surface: #ffffff;
  --ink: #2A2622;
  --muted: #6b6256;
  --faint: #9b9285;

  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(20, 12, 6, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.9);
  --shadow-soft: 0 18px 50px -22px rgba(120, 90, 70, 0.45);
  --shadow-card: 0 10px 30px -16px rgba(120, 90, 70, 0.4);

  --serif: "Crimson Pro", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1120px;
  --radius: 22px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* prevent h-scroll without making body a scroll container */
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.08; letter-spacing: -0.01em; margin: 0; }

/* ===== Mesh background (coral top-left, teal bottom-right) ===== */
.mesh {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 12% 8%, rgba(203, 104, 67, 0.16), transparent 60%),
    radial-gradient(60% 60% at 92% 96%, rgba(31, 168, 155, 0.14), transparent 62%),
    linear-gradient(160deg, var(--cream) 0%, var(--cream-2) 100%);
}

/* ===== Glass ===== */
.glass {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  position: relative;
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  border-top: 1px solid var(--glass-highlight); opacity: 0.5; mask: linear-gradient(#000, transparent 40%);
}

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  max-width: var(--maxw); margin: 0 auto; padding: 16px 24px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.nav::after {
  content: ""; position: absolute; left: 24px; right: 24px; bottom: 0; height: 1px;
  background: var(--glass-border);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { border-radius: 8px; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 26px; letter-spacing: -0.5px; }
.brand-name-sm { font-size: 20px; }
.nav-links { display: flex; gap: 26px; margin-left: 14px; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.lang-toggle {
  font-family: var(--sans); font-weight: 700; font-size: 13px; letter-spacing: 1px;
  color: var(--muted); background: var(--glass-strong); cursor: pointer;
  border: 1px solid var(--glass-border); border-radius: 999px; padding: 7px 12px;
  transition: color .15s, border-color .15s;
}
.lang-toggle:hover { color: var(--coral-strong); border-color: rgba(203,104,67,.35); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 16px; cursor: pointer;
  border-radius: 999px; padding: 13px 24px; transition: transform .12s ease, box-shadow .2s ease, filter .15s; border: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--coral-bright), var(--coral-strong));
  box-shadow: 0 12px 26px -12px rgba(165, 83, 53, 0.7);
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 16px 30px -12px rgba(165, 83, 53, 0.8); }
.btn-ghost { color: var(--ink); background: var(--glass-strong); border: 1px solid var(--glass-border); }
.btn-ghost:hover { border-color: rgba(31,168,155,.4); color: var(--teal); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 16px 32px; font-size: 18px; }

/* ===== Layout ===== */
main { display: block; }
.section { max-width: var(--maxw); margin: 0 auto; padding: 80px 24px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); }
.section-head p { color: var(--muted); font-size: 18px; margin-top: 12px; }
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.tagline {
  display: inline-block; font-family: var(--mono); font-size: 13px; font-weight: 600;
  letter-spacing: 0.5px; color: var(--coral-strong);
  background: rgba(203, 104, 67, 0.1); border: 1px solid rgba(203, 104, 67, 0.22);
  padding: 7px 14px; border-radius: 999px;
}

/* ===== Hero ===== */
.hero {
  max-width: var(--maxw); margin: 0 auto; padding: 60px 24px 40px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
}
.hero-copy h1 { font-size: clamp(40px, 6vw, 68px); margin: 22px 0 18px; }
.lede { font-size: 20px; color: var(--muted); max-width: 30em; }
.lede strong { color: var(--ink); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 16px; }
.hero-note { font-size: 13.5px; color: var(--faint); margin: 0; }

.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 520px; }

/* Phone frame */
.phone {
  width: 270px; border-radius: 38px; padding: 9px;
  background: linear-gradient(160deg, #1b1714, #2a2622);
  box-shadow: var(--shadow-soft);
}
.phone img { border-radius: 30px; width: 100%; height: auto; display: block; }
.phone-lead { position: relative; z-index: 2; }
.phone-trail {
  position: absolute; right: 4%; top: 18%; z-index: 1; width: 232px;
  transform: rotate(5deg); opacity: 0.96; filter: saturate(1.02);
}

/* ===== Engine cards ===== */
.card { padding: 28px; }
.engine h3 { font-size: 24px; margin: 12px 0 10px; }
.engine p { color: var(--muted); margin: 0; font-size: 15.5px; }
.kicker {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; padding: 5px 10px; border-radius: 8px; display: inline-block;
}
.kicker-coral { color: var(--coral-strong); background: rgba(203,104,67,.12); }
.kicker-teal { color: #157d72; background: rgba(31,168,155,.14); }
.kicker-amber { color: #8a6320; background: rgba(184,132,47,.14); }

/* ===== Features ===== */
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  padding: 38px 0;
}
.feature-row.reverse .feature-text { order: 2; }
.feature-text h3 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 14px; }
.feature-text p { color: var(--muted); font-size: 18px; max-width: 28em; }
.feature-shot { display: flex; justify-content: center; }
.feature-shot .phone { width: 248px; }

/* ===== Transparency band ===== */
.band { padding: 48px; }
.band-head { text-align: center; max-width: 620px; margin: 0 auto 36px; }
.band-head h2 { font-size: clamp(26px, 3.6vw, 38px); margin: 16px 0 10px; }
.band-head p { color: var(--muted); font-size: 17px; margin: 0; }
.src-grid { gap: 18px 28px; }
.src { padding: 4px 2px; }
.src h4 { font-family: var(--sans); font-weight: 700; font-size: 16px; color: var(--ink); margin-bottom: 4px; }
.src h4::before { content: "›"; color: var(--coral); font-weight: 800; margin-right: 8px; }
.src p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ===== CTA band ===== */
.cta-band .band-cta { text-align: center; padding: 56px 32px; }
.band-cta h2 { font-size: clamp(28px, 4vw, 42px); }
.band-cta p { color: var(--muted); font-size: 18px; margin: 14px auto 28px; max-width: 32em; }

/* ===== Footer ===== */
.footer { max-width: var(--maxw); margin: 0 auto; padding: 36px 24px 56px; border-top: 1px solid var(--glass-border); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.footer-meta { color: var(--faint); font-size: 14px; }
.disclaimer { color: var(--faint); font-size: 13px; line-height: 1.55; max-width: 70ch; margin: 0; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
  .hero-visual { min-height: 440px; margin-top: 10px; }
  .grid-3 { grid-template-columns: 1fr; }
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; gap: 24px; }
  .feature-row.reverse .feature-text { order: 0; }
  .feature-shot { order: -1; }
  .nav-links { display: none; }
  .band { padding: 32px 22px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .section { padding: 56px 18px; }
  .hero { padding: 28px 18px; }
  .phone { width: 240px; }
  .phone-trail { display: none; }
  .btn { width: 100%; }
  .hero-cta { flex-direction: column; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
