/* ============================================================================
   FinFactum AI — landing.css
   Premium enterprise landing: nav, hero, products, modules, company directory.
   ========================================================================== */

/* ---------------- NAV ---------------- */
.nav {
  position: sticky; top: 0; z-index: 80;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  background: rgba(8, 12, 22, 0.62);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; position: relative; flex-shrink: 0;
  background: linear-gradient(140deg, var(--accent), var(--accent-deep));
  box-shadow: 0 8px 22px -8px rgba(45, 212, 167, 0.7);
  display: grid; place-items: center;
}
.brand-mark::before { content: ""; width: 14px; height: 14px; border: 2.4px solid #04140f; border-radius: 4px; transform: rotate(45deg); }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: -0.01em; }
.brand-name b { color: var(--accent); font-weight: 600; }
.brand-tag { font-size: 0.6rem; letter-spacing: 0.18em; color: var(--text-faint); text-transform: uppercase; margin-top: -3px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 9px 14px; border-radius: 9px; color: var(--text-dim); font-size: 0.9rem; font-weight: 500; transition: all 0.2s; position: relative; }
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-search-btn { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); padding: 9px 14px; border-radius: 11px; color: var(--text-dim); font-size: 0.86rem; transition: all 0.2s; }
.nav-search-btn:hover { border-color: var(--accent); color: var(--text); }
.kbd { font-family: var(--font-mono); font-size: 0.66rem; border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; color: var(--text-faint); }

/* products dropdown */
.has-menu { position: relative; }
.mega {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(8px);
  width: 520px; background: rgba(10, 15, 26, 0.97); border: 1px solid var(--line-2);
  border-radius: 16px; padding: 12px; box-shadow: var(--shadow-lg); backdrop-filter: blur(22px);
  opacity: 0; pointer-events: none; transition: all 0.26s var(--ease); display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.has-menu:hover .mega { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.mega-item { display: flex; gap: 12px; padding: 12px; border-radius: 11px; transition: background 0.2s; }
.mega-item:hover { background: rgba(45, 212, 167, 0.07); }
.mega-ico { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; font-size: 1rem; background: var(--accent-soft); border: 1px solid var(--line-2); }
.mega-t { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.mega-d { font-size: 0.76rem; color: var(--text-dim); margin-top: 1px; }

/* ---------------- HERO ---------------- */
.hero { position: relative; padding: 86px 0 64px; overflow: hidden; }
.hero-canvas-wrap { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.85; }
#heroCanvas { width: 100%; height: 100%; display: block; }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 48px; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(45, 212, 167, 0.3); background: var(--accent-soft);
  padding: 7px 14px; border-radius: 30px; margin-bottom: 24px; animation: floatUp 0.7s var(--ease) both;
}
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulseDot 1.8s infinite; }
.hero h1 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.02; letter-spacing: -0.025em; margin-bottom: 22px;
  animation: floatUp 0.8s var(--ease) 0.05s both;
}
.hero h1 .grad {
  background: linear-gradient(105deg, var(--accent) 0%, #7fe9cf 40%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: clamp(1rem, 2.2vw, 1.22rem); color: var(--text-2); max-width: 540px; margin-bottom: 18px; line-height: 1.6; animation: floatUp 0.8s var(--ease) 0.12s both; }
.hero-30s { font-size: 0.92rem; color: var(--text-dim); margin-bottom: 30px; animation: floatUp 0.8s var(--ease) 0.16s both; }
.hero-30s b { color: var(--text); }

.hero-searchbar { position: relative; max-width: 540px; margin-bottom: 18px; animation: floatUp 0.8s var(--ease) 0.2s both; }
.hero-searchbar .si { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }
.hero-input {
  width: 100%; background: rgba(8, 12, 22, 0.7); border: 1px solid var(--line-2); border-radius: 14px;
  padding: 17px 18px 17px 50px; color: var(--text); font-size: 1.02rem; font-family: var(--font-ui);
  transition: all 0.25s; box-shadow: var(--shadow);
}
.hero-input::placeholder { color: var(--text-faint); }
.hero-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(45, 212, 167, 0.12), var(--shadow); }
.hero-try { font-size: 0.82rem; color: var(--text-faint); animation: floatUp 0.8s var(--ease) 0.26s both; }
.hero-try b { color: var(--accent); font-family: var(--font-mono); font-weight: 500; }

/* hero company dropdown */
.hero-picker { max-width: 540px; margin-top: 20px; animation: floatUp 0.8s var(--ease) 0.2s both; }
.hero-picker-label { display: block; font-size: 0.84rem; color: var(--text-2); font-weight: 600; margin-bottom: 9px; }
.hero-select-wrap { position: relative; }
.hero-select {
  width: 100%; appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background: rgba(8, 12, 22, 0.7); border: 1px solid var(--line-2); border-radius: 13px;
  padding: 14px 44px 14px 16px; color: var(--text); font-family: var(--font-ui); font-size: 0.98rem;
  cursor: pointer; transition: all 0.25s; box-shadow: var(--shadow);
}
.hero-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(45, 212, 167, 0.12), var(--shadow); }
.hero-select:hover { border-color: var(--accent); }
.hero-select option { background: #0c1322; color: var(--text); padding: 8px; }
.hero-select optgroup { background: #070b14; color: var(--accent); font-family: var(--font-ui); font-weight: 700; }
.hero-select-caret { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; transition: color 0.2s; }
.hero-select-wrap:hover .hero-select-caret { color: var(--accent); }
.hero-note { font-size: 0.8rem; color: var(--text-dim); margin-top: 12px; line-height: 1.6; max-width: 500px; }

.hero-trust { display: flex; gap: 26px; margin-top: 34px; flex-wrap: wrap; animation: floatUp 0.8s var(--ease) 0.32s both; }
.hero-trust .ht { }
.ht-num { font-family: var(--font-mono); font-size: 1.7rem; font-weight: 600; color: var(--text); }
.ht-lbl { font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.04em; }

/* hero dashboard card (3D-style intelligence preview) */
.hero-card {
  position: relative; z-index: 3; perspective: 1400px; animation: floatUp 1s var(--ease) 0.2s both;
}
.dash {
  background: linear-gradient(165deg, rgba(20, 30, 52, 0.85), rgba(10, 16, 28, 0.9));
  border: 1px solid var(--line-2); border-radius: 22px; padding: 22px; box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px); transform: rotateY(-9deg) rotateX(4deg); transition: transform 0.5s var(--ease);
}
.hero-card:hover .dash { transform: rotateY(-4deg) rotateX(2deg); }
.dash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dash-co { display: flex; align-items: center; gap: 11px; }
.dash-logo { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, rgba(45, 212, 167, 0.25), rgba(91, 141, 239, 0.2)); border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 600; font-size: 0.8rem; color: var(--accent); }
.dash-co-name { font-weight: 600; font-size: 0.95rem; }
.dash-co-sub { font-size: 0.7rem; color: var(--text-dim); font-family: var(--font-mono); }
.dash-verdict { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--good); border: 1px solid rgba(52, 211, 153, 0.3); background: rgba(52, 211, 153, 0.1); padding: 5px 11px; border-radius: 20px; }
.dash-scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.dash-sc { background: rgba(8, 12, 22, 0.6); border: 1px solid var(--line); border-radius: 12px; padding: 13px; }
.dash-sc-num { font-family: var(--font-mono); font-size: 1.7rem; font-weight: 600; line-height: 1; }
.dash-sc-lbl { font-size: 0.62rem; color: var(--text-dim); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 6px; }
.dash-bars { display: flex; flex-direction: column; gap: 11px; }
.dash-bar-row { display: grid; grid-template-columns: 88px 1fr 34px; align-items: center; gap: 10px; }
.dash-bar-lbl { font-size: 0.72rem; color: var(--text-dim); }
.dash-bar-track { height: 6px; background: var(--ring-track); border-radius: 10px; overflow: hidden; }
.dash-bar-fill { height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--accent), var(--accent-deep)); animation: barGrow 1.4s var(--ease) both; }
@keyframes barGrow { from { width: 0 !important; } }
.dash-bar-val { font-family: var(--font-mono); font-size: 0.78rem; text-align: right; color: var(--text-2); }
.dash-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-size: 0.72rem; color: var(--text-dim); }
.dash-spark svg { vertical-align: middle; }
/* floating mini-cards */
.float-chip { position: absolute; background: rgba(10, 15, 26, 0.92); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow-lg); backdrop-filter: blur(14px); font-size: 0.74rem; z-index: 4; }
.float-chip .fc-num { font-family: var(--font-mono); font-weight: 600; font-size: 1.1rem; }
.float-a { top: -18px; right: -14px; animation: floaty 5s ease-in-out infinite; }
.float-b { bottom: 24px; left: -26px; animation: floaty 6s ease-in-out infinite 0.5s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------------- LOGO STRIP ---------------- */
.trusted { padding: 30px 0 12px; border-bottom: 1px solid var(--line); }
.trusted-label { text-align: center; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 20px; }
.trusted-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 30px; }
.trusted-row .tu { font-weight: 600; font-size: 0.92rem; color: var(--text-dim); opacity: 0.8; display: flex; align-items: center; gap: 8px; }
.trusted-row .tu::before { content: "●"; color: var(--accent); font-size: 0.6rem; }

/* ---------------- SECTION SHELL ---------------- */
.section { padding: 78px 0; }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-eyebrow { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.section-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 4vw, 2.9rem); letter-spacing: -0.02em; line-height: 1.1; }
.section-sub { color: var(--text-dim); font-size: 1.04rem; margin-top: 16px; line-height: 1.6; }

/* ---------------- PRODUCTS ---------------- */
.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.prod-card { background: linear-gradient(180deg, rgba(20, 30, 52, 0.5), rgba(12, 19, 34, 0.4)); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: all 0.3s var(--ease); position: relative; overflow: hidden; }
.prod-card::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); padding: 1px; background: linear-gradient(140deg, rgba(45, 212, 167, 0.5), transparent 40%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.3s; }
.prod-card:hover { transform: translateY(-5px); border-color: transparent; }
.prod-card:hover::after { opacity: 1; }
.prod-ico { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 18px; background: linear-gradient(135deg, var(--accent-soft), rgba(91, 141, 239, 0.1)); border: 1px solid var(--line-2); }
.prod-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin-bottom: 4px; }
.prod-name b { color: var(--accent); font-weight: 600; }
.prod-tagline { font-size: 0.78rem; color: var(--accent); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; margin-bottom: 12px; }
.prod-desc { font-size: 0.9rem; color: var(--text-dim); line-height: 1.6; }
.prod-feats { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.prod-feats span { font-size: 0.72rem; color: var(--text-2); border: 1px solid var(--line); border-radius: 7px; padding: 4px 9px; background: rgba(255, 255, 255, 0.02); }

/* ---------------- HOW / SCORES SHOWCASE ---------------- */
.scores-show { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.scores-visual { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.score-demo { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; backdrop-filter: blur(12px); text-align: center; }
.scores-list .sl-item { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.scores-list .sl-item:last-child { border-bottom: none; }
.sl-ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid var(--line-2); font-size: 1.1rem; }
.sl-t { font-weight: 600; font-size: 1rem; }
.sl-d { font-size: 0.86rem; color: var(--text-dim); margin-top: 2px; line-height: 1.5; }

/* ---------------- COMPANY DIRECTORY ---------------- */
.sector-chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-bottom: 32px; }
.sector-chip { font-size: 0.84rem; color: var(--text-dim); border: 1px solid var(--line-2); padding: 8px 16px; border-radius: 30px; transition: all 0.2s; background: rgba(255, 255, 255, 0.02); }
.sector-chip:hover { color: var(--text); border-color: var(--accent); }
.sector-chip.active { background: var(--accent); color: #04140f; border-color: var(--accent); font-weight: 600; }
.company-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cocard { text-align: left; background: linear-gradient(180deg, rgba(20, 30, 52, 0.5), rgba(12, 19, 34, 0.42)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: all 0.28s var(--ease); cursor: pointer; }
.cocard:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 24px 50px -26px rgba(45, 212, 167, 0.4); }
.cocard-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cocard-logo { width: 42px; height: 42px; border-radius: 11px; background: linear-gradient(135deg, rgba(45, 212, 167, 0.22), rgba(91, 141, 239, 0.16)); border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 600; font-size: 0.72rem; color: var(--accent); }
.cocard-action { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 9px; border-radius: 20px; }
.act-pos { color: var(--good); background: rgba(52, 211, 153, 0.12); }
.act-good { color: var(--accent); background: rgba(45, 212, 167, 0.12); }
.act-caution { color: var(--caution); background: rgba(239, 138, 43, 0.14); }
.act-neg { color: var(--neg); background: rgba(240, 86, 106, 0.14); }
.cocard-name { font-weight: 600; font-size: 0.98rem; line-height: 1.3; margin-bottom: 4px; min-height: 2.5em; }
.cocard-meta { font-size: 0.74rem; color: var(--text-dim); margin-bottom: 12px; }
.cocard-spark { margin-bottom: 12px; }
.cocard-scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.cocard-sc { display: flex; flex-direction: column; }
.csc-num { font-family: var(--font-mono); font-weight: 600; font-size: 1.02rem; }
.csc-lbl { font-size: 0.6rem; color: var(--text-faint); letter-spacing: 0.04em; margin-top: 2px; }

/* ---------------- AUDIENCE ---------------- */
.aud-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.aud { text-align: center; padding: 22px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.015); transition: all 0.25s; }
.aud:hover { border-color: var(--accent); background: var(--accent-soft); }
.aud-ico { font-size: 1.5rem; margin-bottom: 10px; }
.aud-t { font-size: 0.82rem; color: var(--text-2); font-weight: 600; }

/* ---------------- CTA ---------------- */
.cta-wrap { position: relative; border-radius: 28px; overflow: hidden; padding: 64px 40px; text-align: center; border: 1px solid var(--line-2); background: linear-gradient(155deg, rgba(45, 212, 167, 0.12), rgba(10, 16, 28, 0.6) 55%); }
.cta-wrap h2 { font-family: var(--font-display); font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 16px; }
.cta-wrap p { color: var(--text-2); max-width: 560px; margin: 0 auto 30px; font-size: 1.05rem; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------------- FOOTER ---------------- */
.foot { border-top: 1px solid var(--line); padding: 50px 0 36px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.foot-col h4 { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 16px; }
.foot-col a { display: block; color: var(--text-dim); font-size: 0.9rem; padding: 5px 0; transition: color 0.2s; }
.foot-col a:hover { color: var(--accent); }
.foot-about { color: var(--text-dim); font-size: 0.9rem; line-height: 1.6; margin-top: 14px; max-width: 320px; }
.foot-bottom { border-top: 1px solid var(--line); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 0.82rem; color: var(--text-faint); }

/* ---------------- COMMAND PALETTE ---------------- */
.palette { position: fixed; inset: 0; z-index: 150; background: rgba(4, 7, 14, 0.7); backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity 0.25s; display: flex; align-items: flex-start; justify-content: center; padding: 14vh 20px 20px; }
.palette.open { opacity: 1; pointer-events: auto; }
.palette-box { width: 100%; max-width: 640px; background: rgba(10, 15, 26, 0.98); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; transform: translateY(-16px) scale(0.98); transition: transform 0.28s var(--ease); }
.palette.open .palette-box { transform: none; }
.palette-input-wrap { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.palette-input-wrap svg { color: var(--text-dim); flex-shrink: 0; }
#paletteInput { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 1.1rem; font-family: var(--font-ui); }
#paletteInput::placeholder { color: var(--text-faint); }
.palette-results { max-height: 52vh; overflow-y: auto; }
.palette-results .ac-drop { position: static; max-height: none; opacity: 1; pointer-events: auto; box-shadow: none; border: none; background: none; border-radius: 0; }
.palette-hint { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 0.74rem; color: var(--text-faint); display: flex; gap: 16px; }
.palette-hint b { color: var(--text-dim); font-weight: 500; }
.palette-empty { padding: 40px 20px; text-align: center; color: var(--text-faint); font-size: 0.9rem; }

/* mobile nav toggle (hidden on desktop) */
.nav-burger { display: none; }
