/* ============================================================
   LexSense marketing site — single-file design system.
   Palette: LexShare app tokens — primary violet on slate.
   Type: Inter throughout.
   ============================================================ */

:root {
  /* Palette mirrors the LexShare app design tokens (resources/css/app.css):
     primary violet #502cd4/#3922ce/#271e95 family on slate surfaces. The
     legacy variable names (navy/gold/blue) are kept so rules don't churn —
     they now carry the violet/slate values. */
  --navy-950: #13104f;   /* primary-950 */
  --navy-900: #271e95;   /* primary-900 (logo deep) */
  --navy-800: #2e20b0;   /* primary-800 */
  --navy-100: #e7e3ff;   /* primary-100 */
  --ink: #0f172a;        /* surface-900 */
  --ink-soft: #475569;   /* surface-600 */
  --gold: #502cd4;       /* primary-500 (logo accent) — primary CTA/accent */
  --gold-soft: #e7e3ff;  /* primary-100 */
  --accent-bright: #aea0ff; /* primary-300 — accents on dark surfaces */
  --blue: #502cd4;       /* links share the primary */
  --blue-soft: #f3f1ff;  /* primary-50 */
  --green: #16a34a;      /* success-600 */
  --paper: #ffffff;
  --paper-alt: #f8fafc;  /* surface-50 */
  --line: #e2e8f0;       /* surface-200 */
  --radius: 14px;
  --shadow: 0 10px 40px rgba(13, 27, 62, .10);
  --font-text: "Inter", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-text);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16.5px;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 780px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--gold); color: #fff; padding: 8px 16px; z-index: 100; }
.skip-link:focus { left: 8px; }
.muted { color: var(--ink-soft); }

/* Typography: Inter everywhere — semibold headings with tight tracking. */
h1, h2, h3 { font-family: var(--font-text); line-height: 1.15; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 1.18rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--blue); }

.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .78rem;
  font-weight: 700; color: var(--gold); margin-bottom: .6em;
}
.section-lede { max-width: 640px; color: var(--ink-soft); font-size: 1.08rem; }

/* ----------------------------- Buttons ---------------------------- */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 10px;
  font-weight: 600; text-decoration: none; font-size: 1rem;
  border: 1.5px solid transparent; cursor: pointer; transition: all .18s ease;
}
.btn-sm { padding: 9px 18px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: #3922ce; transform: translateY(-1px); }
.btn-ghost { border-color: var(--navy-900); color: var(--navy-900); background: transparent; }
.btn-ghost:hover { background: var(--navy-100); }

/* ----------------------------- Header ----------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { display: inline-flex; }
.brand-name { font-family: var(--font-text); font-weight: 600; letter-spacing: -0.03em; font-size: 1.35rem; color: var(--navy-900); }
.brand-name span { color: var(--gold); }
.brand-name em { font-style: normal; font-weight: 500; color: var(--blue); font-size: .8em; }

.nav-menu { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-menu a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav-menu a:hover { color: var(--blue); }
.nav-cta a.btn { color: #fff; }
.nav-login { color: var(--ink-soft) !important; }
.nav-login:hover { color: var(--ink) !important; }
.nav-toggle { display: none; }

/* ------------------------------ Hero ------------------------------ */
.hero {
  background:
    radial-gradient(1000px 500px at 85% -10%, var(--blue-soft), transparent 60%),
    radial-gradient(800px 420px at -10% 110%, var(--gold-soft), transparent 55%),
    var(--paper);
  padding: 84px 0 72px;
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--gold); }
.lede { font-size: 1.16rem; color: var(--ink-soft); max-width: 34em; }
.hero-actions { display: flex; gap: 14px; margin: 26px 0 14px; flex-wrap: wrap; }

.hero-tagline {
  font-size: .92rem; font-weight: 600; letter-spacing: .02em;
  color: var(--ink-soft); margin: 2px 0 0;
}

/* Product mockup */
.hero-visual { position: relative; }
.mock-window {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; font-size: .82rem;
}
.mock-titlebar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: var(--navy-900); color: #d4cff5;
}
.mock-titlebar span { width: 10px; height: 10px; border-radius: 50%; background: #4a41c9; }
.mock-titlebar b { margin-left: 8px; font-weight: 600; }
.mock-body { display: grid; grid-template-columns: 150px 1fr; min-height: 260px; }
.mock-side { background: var(--paper-alt); border-right: 1px solid var(--line); padding: 10px 0; }
.mock-side-item { padding: 8px 14px; color: var(--ink-soft); white-space: nowrap; }
.mock-side-item.active { background: var(--blue-soft); color: var(--navy-900); font-weight: 600; }
.mock-main { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.mock-row {
  display: flex; align-items: center; gap: 9px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
}
.doc-ic {
  font-style: normal; font-weight: 700; color: #fff; background: #2b5797;
  width: 22px; height: 22px; border-radius: 5px; display: inline-flex;
  align-items: center; justify-content: center; font-size: .72rem; flex: none;
}
.doc-ic.pdf { background: #c23b2c; }
.doc-ic.xls { background: #1e7145; }
.pill {
  margin-left: auto; font-size: .68rem; font-weight: 600; padding: 3px 9px;
  border-radius: 99px; background: var(--navy-100); color: var(--navy-800); white-space: nowrap;
}
.pill-green { background: #e2f4ea; color: var(--green); }
.pill-blue { background: var(--blue-soft); color: var(--blue); }
.mock-deadline {
  margin-top: auto; padding: 9px 11px; border-radius: 9px;
  background: #fef3c7; color: #b45309; font-weight: 500;
}
.mock-toast {
  position: absolute; right: -10px; bottom: -18px;
  background: var(--navy-900); color: #dff2e7; padding: 10px 16px;
  border-radius: 10px; font-size: .82rem; box-shadow: var(--shadow);
}

/* ---------------------------- Stat bar ---------------------------- */
.statbar { background: var(--navy-900); color: #fff; padding: 26px 0; }
.statbar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; text-align: center; }
.statbar b { display: block; font-family: var(--font-text); font-weight: 600; font-size: 1.25rem; color: var(--accent-bright); }
.statbar span { font-size: .86rem; color: #c6c1ee; }

/* ---------------------------- Sections ---------------------------- */
.section { padding: 84px 0; }
.section-alt { background: var(--paper-alt); }

/* Product cards */
.center-head { text-align: center; }
.center-head .section-lede.centered { margin: 0 auto; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 42px; }
.product-card {
  position: relative; background: #fff; border: 1.5px solid var(--line);
  border-radius: 20px; padding: 30px 28px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #c9d6f5; }
.product-featured { border-color: var(--gold); }
.product-flag {
  position: absolute; top: 20px; right: 20px;
  background: var(--gold-soft); color: #3922ce;
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 99px;
}
.product-card h3 { font-size: 1.45rem; letter-spacing: -0.02em; margin: 0 0 2px; }
.product-sub { color: var(--blue); font-weight: 600; font-size: .88rem; margin-bottom: 14px; }
.product-card > p:not(.product-sub) { color: var(--ink-soft); font-size: .95rem; }
.product-ic {
  width: 50px; height: 50px; border-radius: 13px; background: var(--navy-900);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.product-ic svg { width: 26px; height: 26px; fill: none; stroke: var(--accent-bright); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dots { list-style: none; padding: 0; margin: 16px 0 0; }
.dots li { padding-left: 20px; position: relative; margin-bottom: 8px; font-size: .92rem; }
.dots li::before { content: "•"; position: absolute; left: 4px; color: var(--green); font-weight: 700; }

/* Feature cards */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 38px; }
.feature-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; transition: transform .18s ease, box-shadow .18s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-ic {
  width: 44px; height: 44px; border-radius: 11px; background: var(--blue-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.feature-ic svg { width: 24px; height: 24px; fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature-card p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* Spotlights */
.spot {
  display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center;
  margin-top: 64px;
}
.spot-rev .spot-copy { order: 2; }
.spot-rev .spot-visual { order: 1; }
.spot h3 { font-size: 1.5rem; letter-spacing: -0.02em; }
.spot p { color: var(--ink-soft); }
.tag {
  vertical-align: middle; margin-left: 8px; font-family: var(--font-text);
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: var(--gold-soft); color: #3922ce; padding: 4px 10px; border-radius: 99px;
}
.checks { list-style: none; padding: 0; margin: 18px 0 0; }
.checks li { padding-left: 28px; position: relative; margin-bottom: 10px; color: var(--ink); }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--green); font-weight: 700;
}
.checks.light li { color: #ded9f7; }
.checks.light li::before { color: var(--accent-bright); }

/* Spotlight visuals */
.mini-window {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; min-height: 230px;
}
.mini-bar { height: 34px; background: var(--navy-900); }
.mini-bar.word { background: #2b5797; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 20px; }
.mini-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 16px; text-align: center;
}
.mini-card b { display: block; font-family: var(--font-text); font-weight: 600; font-size: 1.7rem; color: var(--navy-900); }
.mini-card span { font-size: .8rem; color: var(--ink-soft); }
.mini-doc { position: relative; padding: 22px 150px 22px 22px; }
.mini-line { height: 11px; border-radius: 6px; background: var(--navy-100); margin-bottom: 12px; }
.w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; } .w95 { width: 95%; }
.mini-pane {
  position: absolute; right: 14px; top: 14px; bottom: 14px; width: 128px;
  background: var(--paper-alt); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; font-size: .78rem; font-weight: 600; color: var(--navy-900);
}
.mini-pane small { font-weight: 400; color: var(--ink-soft); line-height: 1.5; display: block; margin-top: 8px; }
.mini-window.chat { padding: 20px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.chat-b { max-width: 85%; padding: 11px 15px; border-radius: 13px; font-size: .88rem; }
.chat-b.user { align-self: flex-end; background: var(--navy-900); color: #e7e3ff; border-bottom-right-radius: 4px; }
.chat-b.ai { align-self: flex-start; background: var(--paper-alt); border: 1px solid var(--line); border-bottom-left-radius: 4px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 38px; counter-reset: step; }
.step {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px;
  background: #fff;
}
.step b {
  display: inline-flex; width: 38px; height: 38px; border-radius: 50%;
  background: var(--navy-900); color: var(--accent-bright); align-items: center; justify-content: center;
  font-weight: 600; font-size: 1.1rem; margin-bottom: 14px;
}
.step p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* Security */
.section-dark { background: var(--navy-950); color: #ded9f7; }
.section-dark h2 { color: #fff; }
.section-dark .section-lede { color: #b3ace4; }
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 38px; }
.sec-item {
  border: 1px solid #2a2493; border-radius: var(--radius); padding: 24px 22px;
  background: linear-gradient(180deg, #1c1770, #150f54);
}
.sec-item h3 { color: var(--accent-bright); font-size: 1.02rem; }
.sec-item p { color: #b3ace4; font-size: .92rem; margin: 0; }

/* Quote */
.quote-band { padding: 64px 0; background: var(--paper-alt); }
.quote-band blockquote {
  margin: 0 auto; max-width: 760px; text-align: center;
  font-family: var(--font-text); font-weight: 500; font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-style: normal; color: var(--navy-900); line-height: 1.4;
}
.quote-band footer { margin-top: 18px; font-family: var(--font-text); font-size: .95rem; font-style: normal; color: var(--ink-soft); }

/* FAQ */
.faq {
  border: 1px solid var(--line); border-radius: 12px; margin-top: 14px;
  background: #fff; overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 18px 22px; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--gold); transition: transform .18s ease; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 22px 18px; margin: 0; color: var(--ink-soft); }

/* CTA + contact */
.cta-band { background: var(--navy-900); color: #ded9f7; }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: start; }
.cta-band h2 { color: #fff; }
.contact-card {
  background: #fff; border-radius: var(--radius); padding: 30px 28px;
  box-shadow: var(--shadow); color: var(--ink);
}
.contact-card h3 { font-size: 1.3rem; margin-bottom: 14px; }
.contact-card label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 14px; }
.contact-card input, .contact-card textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 13px;
  border: 1.5px solid var(--line); border-radius: 9px; font: inherit; font-weight: 400;
  background: var(--paper-alt);
}
.contact-card input:focus, .contact-card textarea:focus {
  outline: none; border-color: var(--blue); background: #fff;
}
.hp { position: absolute; left: -9999px; }
.form-fineprint { font-size: .8rem; color: var(--ink-soft); text-align: center; margin: 12px 0 0; }
.form-banner { border-radius: 10px; padding: 12px 16px; font-size: .92rem; margin-bottom: 16px; }
.form-banner.ok { background: #e2f4ea; color: #1c6b46; }
.form-banner.bad { background: #fde8e6; color: #9c2b1f; }

/* Footer */
.site-footer { background: var(--navy-950); color: #b3ace4; padding: 60px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 36px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-name span, .footer-brand .brand-name em { color: var(--accent-bright); }
.footer-brand p { font-size: .9rem; margin-top: 14px; max-width: 30em; }
.footer-col h3 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: #b3ace4; text-decoration: none; font-size: .92rem; }
.footer-col a:hover { color: var(--accent-bright); }
.footer-legal { border-top: 1px solid #241d85; margin-top: 44px; padding-top: 22px; font-size: .82rem; }

/* Legal pages (privacy/terms) */
.legal-page { padding: 64px 0; }
.legal-page h1 { font-size: 2rem; }
.legal-page h2 { font-size: 1.25rem; margin-top: 1.6em; }
.legal-page .container { max-width: 780px; }
.legal-updated { color: var(--ink-soft); font-size: .9rem; }

/* --------------------------- Responsive --------------------------- */
@media (max-width: 960px) {
  .hero-grid, .cta-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; }
  .feature-grid, .sec-grid, .steps { grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: 1fr; max-width: 480px; margin-left: auto; margin-right: auto; }
  .spot { grid-template-columns: 1fr; gap: 28px; }
  .spot-rev .spot-copy { order: 1; }
  .spot-rev .spot-visual { order: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  /* Safety net against any horizontal creep on small phones. */
  body { overflow-x: clip; }

  .feature-grid, .sec-grid, .steps, .statbar-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .container { padding: 0 18px; }
  .hero { padding: 48px 0 56px; }
  /* Let the headline wrap naturally instead of at the desktop break point. */
  .hero h1 br { display: none; }

  /* The hero mockup: the fixed 150px sidebar + non-wrapping document rows
     exceed a ~428px viewport. Shrink, truncate, and let rows wrap. */
  .mock-window { font-size: .72rem; }
  .mock-body { grid-template-columns: 104px 1fr; min-height: 0; }
  .mock-side-item { padding: 7px 10px; overflow: hidden; text-overflow: ellipsis; }
  .mock-main { padding: 10px; min-width: 0; }
  .mock-row { flex-wrap: wrap; row-gap: 4px; padding: 7px 9px; min-width: 0; }
  .pill { margin-left: 31px; } /* aligns under the name, after the icon */

  /* Mobile nav */
  .nav-toggle {
    display: block; background: none; border: none; padding: 10px; cursor: pointer;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    display: block; width: 22px; height: 2px; background: var(--navy-900);
    position: relative; transition: transform .2s ease;
  }
  .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; }
  .nav-toggle-bar::before { top: -7px; }
  .nav-toggle-bar::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: rotate(-90deg) translateX(-7px); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { opacity: 0; }

  .nav-menu {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 0 16px;
  }
  .nav-menu.open { display: flex; }
  .nav-menu li { padding: 10px 24px; }
  .mock-toast { position: static; margin-top: 14px; display: inline-block; }
}
