/* ==========================================================
   Tracemetric landing — styles
   ========================================================== */
:root {
  --navy-950: #070e22;
  --navy-900: #0b1530;
  --navy-800: #122046;
  --navy-700: #182c54; /* brand navy from the logo */
  --ink: #0f1b38;
  --muted: #5a6785;
  --line: #e4e9f3;
  --bg: #ffffff;
  --bg-tint: #f5f8fd;
  --accent: #4f7cff;
  --accent-2: #7aa2ff;
  --accent-3: #22d3a6;
  --violet: #9b7bff;
  --light: #d3e0f2; /* brand light from the logo */
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(15, 27, 56, .06), 0 8px 24px rgba(15, 27, 56, .06);
  --shadow-lg: 0 30px 80px -20px rgba(4, 10, 30, .55);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 820px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: 12px;
  font: 600 15px/1 var(--font); border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--sm { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #6a5cff 100%);
  box-shadow: 0 8px 24px -8px rgba(79, 124, 255, .7);
}
.btn--primary:hover { box-shadow: 0 12px 30px -8px rgba(79, 124, 255, .9); }
.btn--ghost { color: #fff; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.04); }
.btn--ghost:hover { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.08); }
.btn--light { background: #fff; color: var(--navy-900); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn--outline-light:hover { border-color: #fff; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(7, 14, 34, .78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(255,255,255,.08);
}
.header__inner { display: flex; align-items: center; gap: 32px; height: 72px; }
.logo img { height: 30px; width: auto; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { color: rgba(255,255,255,.72); font-size: 15px; font-weight: 500; transition: color .2s; }
.nav a:hover { color: #fff; }
.header__cta { display: flex; align-items: center; gap: 12px; }
.burger { display: none; width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s, top .25s; }
.burger span:first-child { top: 15px; }
.burger span:last-child { top: 23px; }
.burger[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at 80% -10%, #1d3270 0%, transparent 60%), var(--navy-950);
  padding: 150px 0 110px;
}
.hero__glow {
  position: absolute; width: 900px; height: 900px; left: -300px; top: -350px; border-radius: 50%;
  background: radial-gradient(circle, rgba(79,124,255,.28), transparent 60%);
  filter: blur(20px); pointer-events: none;
}
.hero__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--light);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--accent-3); }
.dot--live { box-shadow: 0 0 0 0 rgba(34,211,166,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,211,166,.55); } 70% { box-shadow: 0 0 0 8px rgba(34,211,166,0); } 100% { box-shadow: 0 0 0 0 rgba(34,211,166,0); } }
.hero h1 { font-size: clamp(40px, 5.6vw, 66px); font-weight: 800; margin: 22px 0 20px; letter-spacing: -0.035em; }
.grad { background: linear-gradient(90deg, #8fb0ff, #b79bff 55%, #5ee6c2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; color: rgba(255,255,255,.72); max-width: 540px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__facts { list-style: none; padding: 0; margin: 44px 0 0; display: flex; gap: 36px; flex-wrap: wrap; }
.hero__facts li { display: flex; flex-direction: column; }
.hero__facts strong { font-size: 24px; font-weight: 700; }
.hero__facts span { font-size: 13px; color: rgba(255,255,255,.55); }

/* ---------- Product mock ---------- */
.mock {
  border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  transition: transform .6s ease;
}
.mock:hover { transform: perspective(1400px) rotateY(0) rotateX(0); }
.mock__bar, .browser__bar { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.mock__dots { display: flex; gap: 6px; }
.mock__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.18); }
.mock__dots i:first-child { background: #ff6b6b; } .mock__dots i:nth-child(2) { background: #ffc85b; } .mock__dots i:last-child { background: #3ddc97; }
.mock__url { font: 500 12px var(--mono); color: rgba(255,255,255,.45); background: rgba(255,255,255,.05); padding: 4px 12px; border-radius: 6px; }
.mock__body { padding: 18px; display: grid; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 12px; min-width: 0; }
.kpi span { display: block; font-size: 11px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .06em; }
.kpi b { display: block; font-size: 17px; font-weight: 700; margin: 4px 0 2px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi em { font-style: normal; font-size: 12px; font-weight: 600; }
.up { color: var(--accent-3); }
.chart { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 12px 14px 6px; }
.chart__head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: rgba(255,255,255,.6); margin-bottom: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(34,211,166,.12); color: var(--accent-3); }
.chip .dot { width: 6px; height: 6px; }
.chart__svg { width: 100%; height: 110px; display: block; }
.chart__line { stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 2.2s ease forwards .3s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.feed { display: grid; gap: 6px; }
.feed__row {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center;
  font-size: 13px; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.04);
  animation: slideIn .5s ease both;
}
.feed__row:nth-child(2) { animation-delay: .15s; } .feed__row:nth-child(3) { animation-delay: .3s; }
.feed__row span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed__row .mono { font: 500 11px var(--mono); color: rgba(255,255,255,.45); }
.feed__row b { font-variant-numeric: tabular-nums; }
@keyframes slideIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.tag--green { background: rgba(34,211,166,.14); color: #5ee6c2; }
.tag--violet { background: rgba(155,123,255,.16); color: #c3b1ff; }

/* ---------- Strip ---------- */
.strip { background: var(--navy-900); color: rgba(255,255,255,.55); border-top: 1px solid rgba(255,255,255,.06); }
.strip__inner { display: flex; align-items: center; gap: 32px; padding-top: 22px; padding-bottom: 22px; flex-wrap: wrap; }
.strip__label { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: rgba(255,255,255,.4); }
.strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 36px; }
.strip li { font-weight: 600; color: rgba(255,255,255,.75); }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section--tint { background: var(--bg-tint); }
#contact { padding-top: 0; }
.section--dark { background: var(--navy-950); color: #fff; }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section__head h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; margin: 12px 0 14px; }
.section__head p { color: var(--muted); font-size: 18px; }
.section__head--light p { color: rgba(255,255,255,.6); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); }
.eyebrow--light { color: var(--accent-2); }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature {
  padding: 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d3dcf0; }
.feature__icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(79,124,255,.12), rgba(155,123,255,.12)); color: var(--accent);
}
.feature__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }
.features__more { text-align: center; color: var(--muted); margin-top: 40px; }

/* ---------- Tour (screenshots) ---------- */
.tour__tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 40px; }
.tour__tabs button {
  font: 600 14px var(--font); color: rgba(255,255,255,.65); background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1); border-radius: 999px; padding: 9px 18px; cursor: pointer; transition: all .2s;
}
.tour__tabs button:hover { color: #fff; border-color: rgba(255,255,255,.25); }
.tour__tabs button[aria-selected="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }
.tour__panel { display: grid; grid-template-columns: 1fr 2.2fr; gap: 48px; align-items: center; }
.tour__text h3 { font-size: 28px; font-weight: 700; margin-bottom: 14px; }
.tour__text p { color: rgba(255,255,255,.65); font-size: 17px; }
.browser { border-radius: 14px; overflow: hidden; background: #1a2442; border: 1px solid rgba(255,255,255,.1); box-shadow: var(--shadow-lg); }
.browser img { width: 100%; background: #fff; transition: opacity .25s ease; }
.browser img.is-fading { opacity: 0; }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.step { position: relative; padding: 32px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: linear-gradient(180deg, #fff, var(--bg-tint)); }
.step__num { font: 500 14px var(--mono); color: var(--accent); }
.step h3 { font-size: 22px; margin: 14px 0 10px; }
.step p { color: var(--muted); }

/* ---------- Why ---------- */
.why { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start; }
.why__copy h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; margin: 12px 0 16px; }
.why__copy p { color: var(--muted); font-size: 17px; margin-bottom: 28px; }
.why__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.why__list li { padding: 22px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.why__list b { display: block; font-size: 16px; margin-bottom: 6px; }
.why__list span { color: var(--muted); font-size: 15px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .2s, box-shadow .2s; }
.faq details[open] { border-color: #cdd8f0; box-shadow: var(--shadow); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 56px 20px 24px; font-weight: 600; font-size: 17px; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 24px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 24px 22px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact {
  position: relative; overflow: hidden; border-radius: 28px; padding: 64px; color: #fff;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center;
  background: radial-gradient(800px 400px at 100% 0%, #2a3f8f 0%, transparent 60%), var(--navy-900);
}
.contact__glow { position: absolute; width: 500px; height: 500px; left: -150px; bottom: -250px; border-radius: 50%; background: radial-gradient(circle, rgba(155,123,255,.3), transparent 65%); pointer-events: none; }
.contact__main, .contact__cards { position: relative; }
.contact h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; margin: 12px 0 16px; }
.contact__main p { color: rgba(255,255,255,.7); font-size: 17px; max-width: 480px; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.contact__cards { display: grid; gap: 12px; }
.ccard {
  display: block; padding: 18px 20px; border-radius: var(--radius); background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); transition: background .2s, border-color .2s;
}
a.ccard:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
.ccard__label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.5); margin-bottom: 4px; }
.ccard__value { font-weight: 600; font-size: 16px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 64px 0 28px; background: #fff; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr; gap: 40px; }
.footer__brand img { height: 28px; width: auto; margin-bottom: 16px; }
.footer__brand p { color: var(--muted); font-size: 14px; max-width: 280px; }
.footer__col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 14px; }
.footer__col a { display: block; font-size: 15px; margin-bottom: 8px; transition: color .2s; }
.footer__col a:hover { color: var(--accent); }
.footer__legal p { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.footer__legal b { color: var(--ink); }
.footer__legal a { display: inline; margin: 0; color: var(--ink); }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer__bottom a:hover { color: var(--accent); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--navy-900); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg); transition: all .25s ease; z-index: 100;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .features { grid-template-columns: repeat(3, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .hero { padding: 120px 0 80px; }
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .mock { transform: none; }
  .tour__panel { grid-template-columns: 1fr; gap: 28px; }
  .why { grid-template-columns: 1fr; gap: 36px; }
  .contact { grid-template-columns: 1fr; padding: 44px 32px; }
  .nav {
    position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 24px 24px;
    background: rgba(7, 14, 34, .97); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.08);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: all .2s ease;
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 17px; }
  .burger { display: block; }
}
@media (max-width: 760px) {
  .features { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .why__list { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .header__cta .btn { display: none; }
  .features { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .feed__row { grid-template-columns: auto 1fr auto; }
  .feed__row .mono { display: none; }
  .hero__facts { gap: 24px; }
  .contact { padding: 36px 20px; border-radius: 20px; }
  .contact__actions .btn { width: 100%; }
  .footer__inner { grid-template-columns: 1fr; }
  .tour__tabs { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 28px; padding: 0 16px 4px; scrollbar-width: none; }
  .tour__tabs::-webkit-scrollbar { display: none; }
  .tour__tabs button { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  .chart__line { stroke-dashoffset: 0; }
}
