/* ============================================================
   THE LAB LEDGER — MARKETING DESIGN SYSTEM
   Colors derived from the official logo:
     Cyan (#76CBF5) = primary brand (logo "Ledger" text + icon)
     Green (#10b981) = CTA / action accent
   ============================================================ */

:root {
  --bg:           #0a0e1a;
  --bg2:          #0d1221;
  --surface:      #151c2e;
  --surface2:     #1c2540;
  --surface3:     #243050;
  --text:         #f1f5f9;
  --text2:        #e2e8f0;
  --muted:        #8b9dc3;
  --border:       rgba(118,203,245,0.12);
  --border2:      rgba(118,203,245,0.22);

  --brand:        #76CBF5;
  --brand-hover:  #92DBF6;
  --brand-soft:   rgba(118,203,245,0.10);
  --brand2:       #10b981;
  --brand2-soft:  rgba(16,185,129,0.12);
  --brandContrast:#0a0e1a;

  --accent:       #5bb8f0;
  --accent-soft:  rgba(91,184,240,0.10);
  --cta:          #76CBF5;
  --cta-hover:    #9FE3FF;
  --cta-soft:     rgba(118,203,245,0.12);
  --ctaContrast:  #0a0e1a;

  --success:      #10b981;
  --warn:         #f59e0b;
  --danger:       #ef4444;

  --radius:       8px;
  --radius-lg:    12px;
  --radius-xl:    16px;
  --radius-pill:  999px;
  --shadow:       0 4px 24px rgba(0,0,0,0.25);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.35);

  --space1: 4px;
  --space2: 8px;
  --space3: 16px;
  --space4: 24px;
  --space5: 40px;
  --space6: 64px;

  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --brand-logo-h: 44px;
}
@media (max-width: 640px) {
  :root { --brand-logo-h: 34px; }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--brand-hover); }

/* ---- LAYOUT ---- */
.container { max-width: 1140px; margin: 0 auto; padding: 0 var(--space4); }
.section   { padding: var(--space6) 0; }
.section--alt { background: var(--bg2); }
.text-center { text-align: center; }
.text-muted  { color: var(--muted); }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: var(--space3); }
h3 { font-size: 1.2rem; margin-bottom: var(--space2); }
.section-sub { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin: 0 auto var(--space5); line-height: 1.6; }
.label-sm { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: var(--brand); margin-bottom: var(--space2); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius); font-size: 0.95rem;
  font-weight: 600; border: none; cursor: pointer; transition: all 0.18s;
  text-decoration: none; white-space: nowrap;
}
.btn-primary   { background: var(--cta); color: var(--ctaContrast); }
.btn-primary:hover { background: var(--cta-hover); box-shadow: 0 0 20px rgba(118,203,245,0.3); transform: translateY(-1px); color: var(--ctaContrast); }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border2); }
.btn-secondary:hover { background: var(--surface3); border-color: var(--brand); transform: translateY(-1px); color: var(--text); }
.btn-ghost     { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ---- CARDS ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space4);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border2); }
.card-icon { font-size: 2rem; margin-bottom: var(--space3); display: block; color: var(--brand); }
.card-icon svg, .proof-item svg, .check-icon svg { width: 1em; height: 1em; stroke-width: 2; }
.card h3 { font-size: 1.1rem; }
.card p  { color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

/* ---- CHIPS ---- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: var(--radius-pill);
  font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  background: var(--surface2); border: 1px solid var(--border); color: var(--muted);
}
.chip--brand { border-color: rgba(118,203,245,0.3); color: var(--brand); background: var(--brand-soft); }
.chip--accent { border-color: rgba(118,203,245,0.3); color: var(--accent); background: var(--accent-soft); }

/* ---- GRID ---- */
.grid { display: grid; gap: var(--space4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-6 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-6 { grid-template-columns: 1fr; }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,14,26,0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 14px;
}

/* Brand / logo (header) */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-logo {
  height: var(--brand-logo-h);
  width: auto;
  display: block;
  image-rendering: auto;
  background: transparent !important;
  box-shadow: none !important;
  border: 0;
}

/* Legacy logo text (if ever needed) */
.logo { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; font-size: 20px; font-weight: 600; letter-spacing: 0.2px; gap: 6px; }
.logo:hover { text-decoration: none; }
.brand-main { color: #ffffff; }
.brand-accent { color: #6fd3ff; }
.logo img { max-height: 48px; width: auto; height: auto; display: block; }
.hero { position: relative; }

/* Nav menu (desktop: row; wrap so pills don't clip) */
.nav-menu { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-links li { display: block; }
.nav-links a {
  display: block; padding: 8px 18px; border-radius: var(--radius-pill);
  font-size: 0.88rem; font-weight: 500; line-height: 1.3;
  color: var(--muted); transition: all 0.15s; text-decoration: none; white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: rgba(118,203,245,0.08); }
.nav-links a.active { color: var(--text); background: var(--surface2); }

/* CTA button in nav */
.nav-cta { flex-shrink: 0; margin-left: 4px; }

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); cursor: pointer;
  padding: 8px; line-height: 0;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* Tablet: tighter pills */
@media (max-width: 1024px) {
  .logo { font-size: 18px; }
  .nav-links a { padding: 7px 14px; font-size: 0.84rem; }
  .nav-cta .btn { padding: 8px 16px; font-size: 0.84rem; }
}

/* Mobile: collapse to hamburger */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(10,14,26,0.98); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; z-index: 9999;
    display: none; overflow-y: auto;
  }
  .nav-menu.open { display: flex; }
  .nav-close {
    position: absolute; top: 20px; right: 20px;
    background: none; border: 1px solid var(--border2); border-radius: var(--radius);
    color: var(--text); cursor: pointer; padding: 8px; line-height: 0;
  }
  .nav-close svg { width: 22px; height: 22px; }
  .nav-links { flex-direction: column; gap: 6px; width: 100%; max-width: 320px; }
  .nav-links a { font-size: 1.2rem; padding: 16px 24px; text-align: center; border-radius: var(--radius); }
  .nav-links a:hover, .nav-links a.active { background: var(--surface); }
  .nav-cta { margin-left: 0; margin-top: var(--space4); width: 100%; max-width: 320px; }
  .nav-cta .btn { width: 100%; justify-content: center; font-size: 1rem; padding: 16px 24px; }
  body.menu-open { overflow: hidden; }
}

@media (max-width: 600px) {
  .site-header .container { height: 64px; }
  .logo { font-size: 17px; }
}

/* ============================================================
   ANNOUNCEMENT BAR
   ============================================================ */
.announce {
  background: var(--brand-soft); border-bottom: 1px solid rgba(118,203,245,0.15);
  text-align: center; padding: 8px var(--space3); font-size: 0.82rem; font-weight: 500;
  color: var(--brand); letter-spacing: 0.2px; position: fixed; top: 0; left: 0; right: 0; z-index: 101;
}
.announce ~ .site-header { top: 32px; }
.announce ~ .site-header ~ main { padding-top: 104px; }
main { padding-top: 72px; }
@media (max-width: 600px) {
  main { padding-top: 64px; }
  .announce ~ .site-header ~ main { padding-top: 96px; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: var(--space6) 0 var(--space6); }
.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space6); align-items: center; }
.hero h1 { margin-bottom: var(--space3); }
.hero-sub { font-size: 1.15rem; color: var(--muted); line-height: 1.6; margin-bottom: var(--space4); max-width: 520px; }
.hero-btns { display: flex; gap: var(--space3); flex-wrap: wrap; }
.hero-mock {
  background: var(--surface); border: 1px solid rgba(118,203,245,0.25); border-radius: var(--radius-xl);
  padding: var(--space4); display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  box-shadow: 0 0 0 1px rgba(118,203,245,0.08), 0 8px 32px rgba(0,0,0,0.3);
}
.mock-tile {
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 10px; text-align: center; font-size: 0.78rem; font-weight: 600; color: var(--muted);
  transition: border-color 0.15s;
}
.mock-tile:hover { border-color: var(--brand); color: var(--text); }
.mock-chip { grid-column: 1/-1; display: flex; justify-content: center; padding-top: 6px; }
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin: 0 auto var(--space4); }
  .hero-btns { justify-content: center; }
  .hero-mock { max-width: 380px; margin: 0 auto; }
}

/* ============================================================
   PROOF ROW
   ============================================================ */
.proof { padding: var(--space5) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.proof .container { display: flex; justify-content: center; gap: var(--space5); flex-wrap: wrap; }
.proof-item { text-align: center; }
.proof-item strong { display: block; font-size: 0.88rem; color: var(--text); margin-top: 4px; }
.proof-item small { color: var(--muted); font-size: 0.78rem; }

/* ============================================================
   STEPS
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space4); counter-reset: step; }
.step { position: relative; padding-left: 52px; min-height: 60px; }
.step::before {
  content: counter(step); counter-increment: step;
  position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); color: var(--brandContrast);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
}
.step h3 { font-size: 1rem; margin-bottom: 4px; }
.step p  { font-size: 0.88rem; color: var(--muted); }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; } }

/* ============================================================
   WORKFLOW STRIP
   ============================================================ */
.workflow { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap; padding: var(--space4) 0; }
.wf-step {
  padding: 12px 24px; background: var(--surface); border: 1px solid var(--border);
  font-size: 0.88rem; font-weight: 600; color: var(--muted); position: relative;
}
.wf-step:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.wf-step:last-child  { border-radius: 0 var(--radius) var(--radius) 0; }
.wf-step:not(:last-child)::after {
  content: '→'; position: absolute; right: -14px; top: 50%; transform: translateY(-50%);
  color: var(--brand); font-weight: 700; font-size: 1rem; z-index: 1;
}
.wf-step:not(:last-child) { margin-right: 14px; }
@media (max-width: 600px) {
  .workflow { flex-direction: column; gap: 8px; }
  .wf-step { border-radius: var(--radius) !important; width: 100%; text-align: center; }
  .wf-step::after { display: none; }
  .wf-step:not(:last-child) { margin-right: 0; }
}

/* ============================================================
   DIFF / SPLIT
   ============================================================ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space6); align-items: center; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

/* ============================================================
   PRICING CARDS
   ============================================================ */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space4); align-items: start; }
.pricing-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: var(--space5) var(--space4); text-align: center; position: relative; transition: all 0.18s;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-card.popular { border-color: var(--brand); box-shadow: 0 0 30px rgba(118,203,245,0.1); }
.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: var(--brandContrast); padding: 4px 16px;
  border-radius: var(--radius-pill); font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.pricing-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.pricing-price { font-size: 1.6rem; font-weight: 700; color: var(--brand); margin-bottom: var(--space3); }
.pricing-price small { font-size: 0.85rem; font-weight: 400; color: var(--muted); }
.pricing-list { list-style: none; text-align: left; margin-bottom: var(--space4); }
.pricing-list li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.pricing-list li::before { content: '✓'; color: var(--brand); font-weight: 700; flex-shrink: 0; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } }

/* ============================================================
   COMPARISON TABLE
   ============================================================ */
.compare-wrap { overflow-x: auto; margin-top: var(--space5); }
.compare {
  width: 100%; border-collapse: collapse; font-size: 0.88rem;
  background: var(--surface); border-radius: var(--radius-lg); overflow: hidden;
}
.compare th, .compare td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.compare thead th { background: var(--surface2); font-weight: 700; color: var(--text); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; }
.compare td { color: var(--muted); }
.compare .check { color: var(--brand); font-weight: 700; }
.compare .dash  { color: var(--muted); opacity: 0.4; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  margin-bottom: var(--space2); overflow: hidden;
}
.faq-q {
  padding: var(--space3) var(--space4); cursor: pointer; font-weight: 600; font-size: 0.95rem;
  display: flex; justify-content: space-between; align-items: center; color: var(--text);
  transition: background 0.15s; user-select: none;
}
.faq-q:hover { background: var(--surface2); }
.faq-q::after { content: '+'; font-size: 1.3rem; color: var(--muted); transition: transform 0.2s; flex-shrink: 0; margin-left: 16px; }
.faq-item.open .faq-q::after { content: '−'; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a-inner { padding: 0 var(--space4) var(--space4); color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.faq-item.open .faq-a { max-height: 400px; }

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: var(--space6) 0; text-align: center;
}
.cta-band h2 { margin-bottom: var(--space3); }

/* ============================================================
   FORM
   ============================================================ */
.form-group { margin-bottom: var(--space3); }
.form-group label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group small { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 16px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 0.95rem; font-family: var(--font);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(118,203,245,0.15);
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-select { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space3); }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-error { color: var(--danger); font-size: 0.82rem; margin-top: 4px; display: none; }
.form-input.invalid, .form-textarea.invalid { border-color: var(--danger); }
.form-success {
  padding: var(--space4); background: var(--brand-soft); border: 1px solid rgba(118,203,245,0.3);
  border-radius: var(--radius-lg); text-align: center; color: var(--brand); font-weight: 600;
  display: none;
}
.form-success.show { display: block; }

/* ============================================================
   SECURITY CHECKLIST
   ============================================================ */
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space3); }
.check-item {
  display: flex; gap: 12px; padding: var(--space3); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.check-icon { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; color: var(--brand); font-weight: 700; font-size: 0.85rem; }
.check-item h4 { font-size: 0.92rem; margin-bottom: 2px; }
.check-item p  { font-size: 0.82rem; color: var(--muted); line-height: 1.45; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg2); border-top: 1px solid var(--border); padding: var(--space5) 0 var(--space4);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space4); flex-wrap: wrap;
}
.footer-brand { max-width: 280px; }
.footer-brand .logo,
.footer-brand .brand { display: inline-block; margin-bottom: var(--space2); }

/* Footer logo only (header .brand-logo unchanged) */
.site-footer .footer-logo {
  height: 30px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}
@media (max-width: 640px) {
  .site-footer .footer-logo { height: 24px; }
}
.footer-brand p { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.footer-links h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: var(--space2); }
.footer-links ul { list-style: none; }
.footer-links a { display: block; padding: 3px 0; font-size: 0.88rem; color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-copy { text-align: center; padding-top: var(--space4); border-top: 1px solid var(--border); margin-top: var(--space4); font-size: 0.8rem; color: var(--muted); }

/* ---- REVEAL ---- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---- CONTACT LAYOUT ---- */
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr !important; }
}

/* ---- MISC ---- */
.mb-2 { margin-bottom: var(--space2); }
.mb-3 { margin-bottom: var(--space3); }
.mb-4 { margin-bottom: var(--space4); }
.mb-5 { margin-bottom: var(--space5); }
.mt-3 { margin-top: var(--space3); }
.mt-4 { margin-top: var(--space4); }
.mt-5 { margin-top: var(--space5); }

/* Mobile lightening — reduce crushed dark feel on small screens */
@media (max-width: 700px) {
  :root {
    --bg:       #0f1525;
    --bg2:      #131a2d;
    --surface:  #1a2438;
    --surface2: #21304a;
    --surface3: #2a3a58;
    --border:   rgba(118,203,245,0.14);
  }
  .section--alt { background: var(--bg2); }
  .card { background: var(--surface); }
}
