/* ==========================================================================
   LegalPrecision.ai Hub — Layout & Components
   Designed to match the four product sites (same tokens, same fonts).
   ========================================================================== */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--color-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: 4px; }

img, svg { max-width: 100%; display: block; }

/* ---------- Containers ---------- */
.container { max-width: var(--container-content); padding: 0 var(--space-6); margin: 0 auto; }
.container--narrow { max-width: var(--container-narrow); }
.container--wide { max-width: var(--container-wide); }

/* ---------- Top Bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(12px);
  background: color-mix(in oklch, var(--color-surface), transparent 8%);
  border-bottom: 1px solid var(--color-border);
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) 0;
  gap: var(--space-6);
}
.brand {
  display: inline-flex; align-items: baseline; gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600; letter-spacing: var(--tracking-snug);
  font-size: var(--text-lg); color: var(--color-text);
}
.brand__dot {
  width: 0.55em; height: 0.55em; border-radius: 999px;
  background: var(--navy-700);
  display: inline-block;
  transform: translateY(-0.05em);
}
.topbar__nav {
  display: flex; gap: var(--space-6); align-items: center;
  font-size: var(--text-sm); color: var(--color-text-muted);
}
.topbar__nav a { color: var(--color-text); font-weight: 500; }
.topbar__nav a:hover { color: var(--color-brand); }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(var(--space-16), 6vw, var(--space-32)) 0 var(--space-20);
  background:
    radial-gradient(ellipse 60% 80% at 90% 10%, color-mix(in oklch, var(--navy-700), transparent 92%), transparent 60%),
    radial-gradient(ellipse 40% 50% at 10% 20%, color-mix(in oklch, var(--navy-700), transparent 95%), transparent 60%),
    var(--color-bg);
}
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--navy-700);
  margin-bottom: var(--space-6);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-hero);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-6);
  color: var(--color-brand-strong);
  max-width: 18ch;
}
.hero__lede {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--ink-700);
  max-width: 56ch;
  margin: 0 0 var(--space-10);
}
.hero__cta-row {
  display: flex; flex-wrap: wrap; gap: var(--space-4);
  margin-bottom: var(--space-12);
}
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: 600; font-size: var(--text-sm);
  border: 1px solid transparent;
  cursor: pointer; transition: transform var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}
.btn--primary {
  background: var(--navy-700); color: white;
}
.btn--primary:hover { background: var(--navy-800); text-decoration: none; transform: translateY(-1px); }
.btn--ghost {
  background: transparent; color: var(--color-text);
  border-color: var(--color-border-strong);
}
.btn--ghost:hover { background: var(--color-surface-tint); text-decoration: none; }

.hero__trust {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-weight: 600;
}
.hero__trust::before {
  content: ""; width: 28px; height: 1px; background: var(--color-border-strong); display: inline-block;
}

/* ---------- Section ---------- */
.section { padding: var(--space-20) 0; }
.section--tint { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.section__eyebrow {
  text-transform: uppercase; letter-spacing: var(--tracking-wide);
  font-size: var(--text-xs); font-weight: 600; color: var(--navy-700);
  margin-bottom: var(--space-4);
}
.section__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--text-2xl); line-height: var(--leading-tight);
  margin: 0 0 var(--space-6); color: var(--color-brand-strong);
  max-width: 22ch;
}
.section__lede {
  font-size: var(--text-lg); line-height: var(--leading-relaxed);
  color: var(--ink-700); max-width: 64ch; margin: 0 0 var(--space-12);
}

/* ---------- Product Grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}
.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex; flex-direction: column;
  gap: var(--space-4);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
  position: relative; overflow: hidden;
}
.product-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--card-accent, var(--navy-700));
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border-strong);
}
.product-card__code {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-muted);
}
.product-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
  margin: 0;
  color: var(--color-brand-strong);
}
.product-card__tagline {
  font-size: var(--text-base);
  color: var(--ink-700);
  margin: 0;
  font-weight: 500;
}
.product-card__promise {
  font-size: var(--text-sm);
  color: var(--ink-600);
  line-height: var(--leading-relaxed);
  margin: 0;
}
.product-card__cta {
  margin-top: auto;
  font-size: var(--text-sm); font-weight: 600;
  color: var(--card-accent, var(--navy-700));
  display: inline-flex; align-items: center; gap: var(--space-2);
}
.product-card__cta::after {
  content: "→"; transition: transform var(--duration-fast) var(--ease-out);
}
.product-card:hover .product-card__cta::after { transform: translateX(4px); }

/* ---------- "How it works" 3-step ---------- */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-8);
}
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: var(--navy-700); color: white;
  font-family: var(--font-mono); font-weight: 600; font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}
.step__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--text-lg); margin: 0 0 var(--space-3);
  color: var(--color-brand-strong);
}
.step__body { color: var(--ink-600); font-size: var(--text-sm); line-height: var(--leading-relaxed); margin: 0; }

/* ---------- Pricing strip ---------- */
.pricing-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}
.pricing-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-2);
}
.pricing-tile__product { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--color-text-muted); font-weight: 600; }
.pricing-tile__range { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; color: var(--color-brand-strong); }
.pricing-tile__note { font-size: var(--text-xs); color: var(--ink-600); }
.pricing-tile__link { font-size: var(--text-sm); font-weight: 600; margin-top: var(--space-2); }

/* ---------- Promise band ---------- */
.promise-band {
  padding: var(--space-16) 0;
  background: var(--color-brand-strong);
  color: white;
}
.promise-band .section__eyebrow { color: color-mix(in oklch, white, transparent 50%); }
.promise-band .section__title { color: white; }
.promise-band .section__lede { color: color-mix(in oklch, white, transparent 25%); }
.promise-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
}
.promise-list li {
  padding-left: var(--space-6); position: relative;
  color: color-mix(in oklch, white, transparent 12%);
  font-size: var(--text-base); line-height: var(--leading-relaxed);
}
.promise-list li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 12px; height: 1px; background: color-mix(in oklch, white, transparent 50%);
}

/* ---------- Footer ---------- */
.footer {
  padding: var(--space-12) 0 var(--space-10);
  background: var(--ink-50);
  border-top: 1px solid var(--color-border);
}
.footer__row {
  display: flex; flex-wrap: wrap; gap: var(--space-8);
  justify-content: space-between; align-items: flex-start;
}
.footer__brand { display: flex; flex-direction: column; gap: var(--space-3); max-width: 36ch; }
.footer__tag { font-size: var(--text-sm); color: var(--ink-600); line-height: var(--leading-relaxed); }
.footer__links {
  display: flex; flex-wrap: wrap; gap: var(--space-8);
  font-size: var(--text-sm);
}
.footer__group { display: flex; flex-direction: column; gap: var(--space-2); }
.footer__group h4 {
  text-transform: uppercase; letter-spacing: var(--tracking-wide);
  font-size: var(--text-xs); margin: 0 0 var(--space-2);
  color: var(--color-text-muted); font-weight: 600;
}
.footer__group a { color: var(--ink-700); }
.footer__legal {
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs); color: var(--color-text-muted);
  display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between;
}

/* ---------- Responsive helpers ---------- */
@media (max-width: 640px) {
  .hero { padding: var(--space-16) 0 var(--space-12); }
  .section { padding: var(--space-12) 0; }
  .topbar__nav { display: none; }
  .product-card { padding: var(--space-6); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
