/* ─────────────────────────────────────────────────────────────────
   BrainIQ — Tool landing page  (tool-new.css)
   Depends on: home-new.css (loaded first for :root vars + base reset)
   ───────────────────────────────────────────────────────────────── */

/* ── Scroll bar ─────────────────────────────────────────────────── */
.sp-bar {
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  height: 2px;
  width: calc(var(--sp, 0) * 100%);
  background: linear-gradient(90deg, var(--tc, #2563eb), color-mix(in srgb, var(--tc, #2563eb) 50%, #7c3aed));
  transform-origin: left;
  box-shadow: 0 0 14px color-mix(in srgb, var(--tc, #2563eb) 60%, transparent);
}

/* ── Tool nav ───────────────────────────────────────────────────── */
.tnav {
  position: fixed;
  inset: 18px var(--gut) auto;
  z-index: 50;
  max-width: var(--max);
  margin: 0 auto;
  pointer-events: none;
}
.tnav-inner {
  pointer-events: all;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 10px 0 18px;
  border-radius: 16px;
  background: rgba(7,16,30,.0);
  border: 1px solid rgba(255,255,255,.0);
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.tnav.solid .tnav-inner {
  background: rgba(255,255,255,.9);
  border-color: var(--line);
  box-shadow: 0 20px 60px rgba(10,15,30,.1);
  backdrop-filter: blur(28px) saturate(180%);
}

.tnav .brand { color: rgba(255,255,255,.92); transition: color .3s ease; }
.tnav .brand .iq { color: #60a5fa; }
.tnav.solid .brand { color: var(--ink); }
.tnav.solid .brand .iq { color: var(--blue); }

.tnav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: rgba(255,255,255,.66);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  transition: color .3s ease;
}
.tnav-links a:hover { color: rgba(255,255,255,.94); }
.tnav.solid .tnav-links { color: var(--muted); }
.tnav.solid .tnav-links a:hover { color: var(--ink); }

.tnav-acts {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tnav-ghost {
  color: rgba(255,255,255,.66);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  padding: 0 14px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  transition: color .3s ease;
}
.tnav-ghost:hover { color: #fff; }
.tnav.solid .tnav-ghost { color: var(--muted); }
.tnav.solid .tnav-ghost:hover { color: var(--ink); }

/* Nav CTA buttons (on dark hero) */
.tb-dark {
  background: rgba(255,255,255,.13);
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: none;
  backdrop-filter: blur(12px);
}
.tb-dark:hover { background: rgba(255,255,255,.2); }
.tnav.solid .tb-dark {
  background: var(--ink);
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(10,15,30,.2);
}

/* Shared button overrides */
.tb-white { background: #fff; color: var(--ink); box-shadow: 0 14px 40px rgba(0,0,0,.16); }
.tb-white:hover { box-shadow: 0 20px 50px rgba(0,0,0,.22); }
.tb-ghost {
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(12px);
}
.tb-ghost:hover { background: rgba(255,255,255,.18); }
.tb-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.tb-outline:hover { border-color: var(--ink); }

/* ── Tool hero ──────────────────────────────────────────────────── */
.tool-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background: #07101e;
}

.th-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5,10,20,.97) 0%, rgba(5,10,20,.88) 46%, rgba(5,10,20,.52) 100%),
    linear-gradient(180deg, rgba(5,10,20,.4) 0%, transparent 40%),
    url("image1.png") center / cover no-repeat;
  transform: scale(1.02);
  will-change: transform;
}

.th-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 40%,
    color-mix(in srgb, var(--tc, #2563eb) 26%, transparent),
    transparent 34vw);
}

/* Dot grid */
.th-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.th-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 130px var(--gut) 72px;
  display: grid;
  grid-template-columns: 1fr min(440px, 38%);
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
}

/* Left copy */
.th-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.th-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tc, #2563eb) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--tc, #2563eb) 36%, transparent);
  color: color-mix(in srgb, var(--tc, #2563eb) 80%, #fff);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.th-num {
  color: rgba(255,255,255,.28);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}
.th-name {
  font-size: clamp(52px, 8vw, 104px);
  font-weight: 900;
  line-height: .88;
  letter-spacing: -.03em;
  margin-bottom: 22px;
}
.th-name .iq { color: var(--tc, #60a5fa); }
.th-headline {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  color: rgba(255,255,255,.82);
  line-height: 1.35;
  margin-bottom: 16px;
  max-width: 680px;
}
.th-sub {
  color: rgba(255,255,255,.62);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.68;
  max-width: 640px;
  margin-bottom: 36px;
}
.th-btns {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.th-audience {
  color: rgba(255,255,255,.44);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.5;
}

/* Right panel */
.th-panel {
  position: relative;
}
.th-panel-inner {
  padding: 28px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  background:
    linear-gradient(160deg, rgba(255,255,255,.96), rgba(255,255,255,.82)),
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--tc, #2563eb) 20%, transparent), transparent 58%);
  color: var(--ink);
  box-shadow:
    0 36px 100px rgba(0,0,0,.3),
    0 0 0 1px rgba(255,255,255,.08);
}

.th-logo-wrap {
  width: 72px; height: 72px;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 16px 40px color-mix(in srgb, var(--tc, #2563eb) 28%, transparent);
}
.th-logo-wrap img {
  width: 100%; height: 100%;
  display: block;
  object-fit: contain;
}

.th-panel-name {
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.025em;
  margin-bottom: 6px;
}
.th-panel-name .iq { color: var(--tc, #2563eb); }

.th-panel-cat {
  color: color-mix(in srgb, var(--tc, #2563eb) 75%, #222);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 22px;
}

.th-metrics {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 22px;
}
.th-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line2);
}
.th-metric span {
  color: var(--muted);
  font-size: 13px;
}
.th-metric strong {
  color: color-mix(in srgb, var(--tc, #2563eb) 72%, var(--ink));
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
}

.th-panel-cta {
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  transition: opacity .15s ease;
}
.th-panel-cta:hover { opacity: .7; }

/* ── Platform strip ─────────────────────────────────────────────── */
.platform-strip {
  background: #f1f5f9;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px var(--gut);
}
.ps-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.ps-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  white-space: nowrap;
  flex-shrink: 0;
}
.ps-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ps-pills span {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color .15s ease, color .15s ease;
}
.ps-pills span:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ── Shared section wrapper ─────────────────────────────────────── */
.tf-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gut);
}
.tf-head {
  max-width: 800px;
  margin-bottom: 56px;
}
.tf-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.tf-head h2 {
  font-size: clamp(36px, 4.6vw, 66px);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.022em;
  margin-bottom: 14px;
}
.tf-head p {
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.65;
}

/* ── Features ───────────────────────────────────────────────────── */
.tool-features {
  padding: clamp(80px, 9vw, 120px) 0;
}
.tf-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.tf-card {
  padding: 32px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--white);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tf-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 60px rgba(10,15,30,.1);
}
.tf-card-num {
  display: block;
  color: color-mix(in srgb, var(--tc, #2563eb) 70%, var(--ink));
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 40px;
}
.tf-card h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 10px;
  line-height: 1.15;
}
.tf-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

/* Platform layer card (dark, full-width) */
.tf-platform-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  padding: 44px 48px;
  border-radius: 16px;
  background: #07101e;
  color: #fff;
}
.tpc-left h3 {
  font-size: clamp(24px, 2.8vw, 38px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}
.tpc-left p {
  color: rgba(255,255,255,.58);
  font-size: 15px;
  line-height: 1.65;
}
.tpc-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  list-style: none;
  margin: 0;
  padding-top: 4px;
}
.tpc-right li {
  padding: 13px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.78);
  font-size: 14px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tpc-right li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tc, #2563eb) 80%, #fff);
  flex-shrink: 0;
  box-shadow: 0 0 8px color-mix(in srgb, var(--tc, #2563eb) 60%, transparent);
}

/* ── Audience ───────────────────────────────────────────────────── */
.tool-audience-sec {
  padding: clamp(80px, 9vw, 120px) 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.ta-card {
  padding: 28px 24px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--white);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.ta-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--tc, #2563eb) 36%, var(--line));
  box-shadow: 0 18px 50px rgba(10,15,30,.1);
}
.ta-num {
  display: block;
  color: color-mix(in srgb, var(--tc, #2563eb) 70%, var(--ink));
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 36px;
}
.ta-card h3 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 10px;
  line-height: 1.15;
}
.ta-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ── Integrations ───────────────────────────────────────────────── */
.tool-integrations-sec {
  padding: clamp(80px, 9vw, 120px) 0;
}
.ti-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ti-pill {
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink2);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(10,15,30,.06);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.ti-pill:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--tc, #2563eb) 36%, var(--line));
  box-shadow: 0 14px 36px rgba(10,15,30,.1);
}

/* ── Related tools ──────────────────────────────────────────────── */
.tool-related-sec {
  padding: clamp(80px, 9vw, 120px) 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tr-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.tr-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--white);
  text-decoration: none;
  color: var(--ink);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
}
.tr-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--rc, #2563eb);
  opacity: 0;
  transition: opacity .2s ease;
}
.tr-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--rc, #2563eb) 36%, var(--line));
  box-shadow: 0 18px 50px rgba(10,15,30,.1);
}
.tr-card:hover::before { opacity: 1; }

.tr-logo {
  width: 52px; height: 52px;
  border-radius: 14px;
  object-fit: contain;
  margin-bottom: 16px;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--rc, #2563eb) 22%, transparent);
}
.tr-num {
  color: var(--soft);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: auto;
}
.tr-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-top: 14px;
  margin-bottom: 5px;
}
.tr-name .iq { color: var(--rc, #2563eb); }
.tr-cat {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

/* ── Tool pricing ───────────────────────────────────────────────── */
.tool-pricing-sec {
  padding: clamp(80px, 9vw, 120px) 0;
}
.tp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}
.tp-card {
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--white);
  display: flex;
  flex-direction: column;
  position: relative;
}
.tp-card.featured {
  background: #07101e;
  border-color: transparent;
  color: #fff;
  box-shadow: 0 44px 100px rgba(7,16,30,.28);
  transform: translateY(-10px);
}
.tp-badge {
  position: absolute;
  top: -13px; left: 50%;
  transform: translateX(-50%);
  background: var(--tc, #2563eb);
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  padding: 5px 16px;
  border-radius: 999px;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tp-name {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 16px;
}
.tp-card.featured .tp-name { color: rgba(255,255,255,.46); }
.tp-price {
  font-size: clamp(42px, 4.8vw, 60px);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}
.tp-price em {
  display: block;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: 0;
}
.tp-card.featured .tp-price em { color: rgba(255,255,255,.44); }
.tp-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 26px;
}
.tp-card.featured .tp-desc { color: rgba(255,255,255,.44); }
.tp-card ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  margin-bottom: 28px;
}
.tp-card li {
  font-size: 14px;
  color: var(--ink2);
  padding-left: 20px;
  position: relative;
  line-height: 1.4;
}
.tp-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--tc, #2563eb);
  font-size: 12px;
  font-weight: 900;
}
.tp-card.featured li { color: rgba(255,255,255,.82); }
.tp-card.featured li::before { color: color-mix(in srgb, var(--tc, #2563eb) 70%, #60a5fa); }
.tp-card .btn { width: 100%; justify-content: center; }

/* ── Tool CTA ───────────────────────────────────────────────────── */
.tool-cta-sec {
  padding: clamp(90px, 10vw, 140px) var(--gut);
  background: linear-gradient(140deg, #060d20, #0e1c3e 50%, #070c1d);
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.tool-cta-sec::before {
  content: '';
  position: absolute;
  top: -40%; left: 15%;
  width: 70%; height: 220%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--tc, #2563eb) 20%, transparent), transparent 60%);
  pointer-events: none;
}
.tc-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}
.tc-inner h2 {
  font-size: clamp(36px, 5vw, 70px);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.03em;
  margin-bottom: 16px;
}
.tc-inner p {
  color: rgba(255,255,255,.56);
  font-size: clamp(15px, 1.4vw, 17px);
  margin-bottom: 40px;
  line-height: 1.65;
}
.tc-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Tool footer ────────────────────────────────────────────────── */
.tool-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.tf-foot-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px var(--gut);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.tool-footer .brand { color: var(--ink); font-size: 16px; }
.tool-footer .brand .iq { color: var(--blue); }
.tf-foot-inner p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  flex: 1;
  min-width: 180px;
}
.tf-foot-inner a:not(.brand) {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .th-inner       { grid-template-columns: 1fr; }
  .th-panel       { max-width: 440px; }
  .tf-grid        { grid-template-columns: 1fr; }
  .tf-platform-card { grid-template-columns: 1fr; }
  .tr-grid        { grid-template-columns: repeat(2, 1fr); }
  .tp-grid        { grid-template-columns: 1fr; }
  .tp-card.featured { transform: none; }
  .tp-badge { position: static; transform: none; display: inline-flex; margin-bottom: 16px; }
  .tnav-links     { display: none; }
}

@media (max-width: 640px) {
  .th-btns        { flex-direction: column; align-items: flex-start; }
  .ta-grid        { grid-template-columns: 1fr 1fr; }
  .tr-grid        { grid-template-columns: 1fr; }
  .tc-btns        { flex-direction: column; }
}

/* ── Reveal animation (same as home-new.css) ────────────────────── */
.r {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s var(--ease), transform .9s var(--spring);
}
.r.in { opacity: 1; transform: translateY(0); }
