/* ============================================
   LUCID BROKERS — STYLESHEET (Phase 0 hotfix)
   Colors: Black (#000), White (#fff), Grays
   Moved out of index.html so the CSP can use style-src 'self'.
   ============================================ */

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

:root {
  --black: #000000;
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  --accent: #000000;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Anchor targets clear the fixed 72px nav */
[id] { scroll-margin-top: 88px; }

/* ============ ACCESSIBILITY ============ */
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 3000;
  background: var(--black); color: var(--white);
  padding: 0.75rem 1.25rem; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--black); outline-offset: 3px;
}
.cta-section a:focus-visible, .cta-section button:focus-visible,
.skip-link:focus-visible {
  outline-color: var(--white);
}
.btn-primary:focus-visible, .nav-cta:focus-visible {
  outline: 3px solid var(--black); outline-offset: 3px;
}

/* Typography */
h1 { font-size: 3rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: 2.25rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
h4 { font-size: 1.125rem; font-weight: 600; }

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
}

/* ============ NAVIGATION ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 2rem;
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-size: 1.5rem; font-weight: 800; color: var(--black);
  text-decoration: none; letter-spacing: -0.03em;
}
.nav-logo span { font-weight: 300; }
.footer-brand .nav-logo { font-size: 1.25rem; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  text-decoration: none; color: var(--gray-600); font-size: 0.95rem;
  font-weight: 500; transition: color 0.2s;
}
.nav-links a:hover { color: var(--black); }
.nav-links a.nav-cta {
  background: var(--black); color: var(--white);
  padding: 0.6rem 1.5rem; border-radius: 50px;
  font-weight: 600; transition: opacity 0.2s;
}
.nav-links a.nav-cta:hover { opacity: 0.85; color: var(--white); }

.mobile-menu-btn {
  display: none; background: none; border: none; cursor: pointer;
  padding: 0.5rem; min-width: 44px; min-height: 44px;
}
.mobile-menu-btn span.bar {
  display: block; width: 24px; height: 2px; background: var(--black);
  margin: 5px 0; transition: 0.3s;
}

@media (max-width: 768px) {
  .nav { padding: 0 1rem; }
  /* Without JS the menu button cannot work, so the links stay visible and wrap. */
  html:not(.js) .nav { position: static; height: auto; min-height: 72px; flex-wrap: wrap; padding: 0.75rem 1rem; gap: 0.5rem; }
  html:not(.js) .hero, html:not(.js) .legal { padding-top: 2rem; }
  html:not(.js) .nav-links { flex-wrap: wrap; gap: 0.5rem 1rem; }
  .js .nav-links { display: none; }
  .js .mobile-menu-btn { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; position: absolute;
    top: 72px; left: 0; right: 0; background: var(--white);
    padding: 1.5rem 1rem; border-bottom: 1px solid var(--gray-200);
    gap: 1rem;
  }
}

/* ============ HERO SECTION ============ */
.hero {
  padding: 10rem 2rem 6rem;
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
  align-items: center;
}
.hero-content h1 { margin-bottom: 1.5rem; }
.hero-content p {
  font-size: 1.25rem; color: var(--gray-600); margin-bottom: 2rem;
  max-width: 500px;
}
.hero-content p.agent-notice {
  font-size: 0.95rem; color: var(--gray-700); margin-top: 1.5rem; margin-bottom: 0;
}
.hero-badges {
  list-style: none; display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap;
}
.hero-badge {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.9rem; color: var(--gray-600);
}
.hero-badge svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn-primary {
  display: inline-block; background: var(--black); color: var(--white);
  padding: 1rem 2.5rem; border-radius: 50px; font-size: 1.1rem;
  font-weight: 600; text-decoration: none; border: none; cursor: pointer;
  transition: all 0.2s; letter-spacing: -0.01em; text-align: center;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); box-shadow: var(--shadow-lg); }

.btn-secondary {
  display: inline-block; background: var(--white); color: var(--black);
  padding: 1rem 2.5rem; border-radius: 50px; font-size: 1.1rem;
  font-weight: 600; text-decoration: none; border: 2px solid var(--gray-300);
  cursor: pointer; transition: all 0.2s; margin-left: 1rem; text-align: center;
}
.btn-secondary:hover { border-color: var(--black); }

.hero-visual {
  background: var(--gray-100); border-radius: 16px; padding: 2.5rem;
  border: 1px solid var(--gray-200);
}
.start-card h2.h3-size { font-size: 1.5rem; font-weight: 600; line-height: 1.3; letter-spacing: 0; margin-bottom: 0.25rem; }
.start-card > p { color: var(--gray-600); font-size: 0.95rem; margin-bottom: 1.5rem; }
.start-option {
  background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: 12px; padding: 1.25rem 1.5rem; margin-bottom: 1rem;
}
.start-option:last-child { margin-bottom: 0; }
.start-option h3 { font-size: 1.125rem; margin-bottom: 0.25rem; }
.start-option p { color: var(--gray-600); font-size: 0.9rem; margin-bottom: 1rem; }
.start-option .btn-primary { width: 100%; font-size: 1rem; padding: 0.85rem 1.5rem; }
.contact-links { display: flex; flex-direction: column; gap: 0.5rem; }
.contact-links a {
  color: var(--black); font-weight: 600; text-decoration: underline;
  text-underline-offset: 3px; overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; padding: 8rem 1rem 4rem; gap: 2rem; }
  .hero-visual { padding: 1.5rem; }
  .btn-secondary { margin-left: 0; margin-top: 1rem; }
  .hero-content .btn-primary, .hero-content .btn-secondary { display: block; }
}

/* ============ PRODUCTS SECTION ============ */
.section {
  padding: 6rem 2rem;
  max-width: 1200px; margin: 0 auto;
}
.section-header {
  text-align: center; margin-bottom: 3.5rem;
}
.section-header p {
  color: var(--gray-600); font-size: 1.1rem; margin-top: 0.75rem; max-width: 600px; margin-left: auto; margin-right: auto;
}
.section-header p.section-label {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--gray-600); margin-top: 0; margin-bottom: 0.75rem;
}

.product-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
.product-card {
  border: 1.5px solid var(--gray-200); border-radius: 12px;
  padding: 2.5rem 2rem; transition: all 0.3s;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.product-card:hover {
  border-color: var(--black); box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.product-icon {
  width: 48px; height: 48px; background: var(--gray-100);
  border-radius: 12px; display: flex; align-items: center;
  justify-content: center; margin-bottom: 1.5rem;
}
.product-card h3 { margin-bottom: 0.75rem; }
.product-card p { color: var(--gray-600); font-size: 0.95rem; margin-bottom: 1.5rem; }
.product-features { list-style: none; margin-bottom: 1.5rem; }
.product-features li {
  padding: 0.4rem 0; font-size: 0.9rem; color: var(--gray-600);
  display: flex; align-items: flex-start; gap: 0.5rem;
}
.product-features li::before {
  content: ""; width: 6px; height: 6px; background: var(--black);
  border-radius: 50%; flex-shrink: 0; margin-top: 0.6em;
}
.product-cta {
  margin-top: auto; padding-top: 1.5rem; border-top: 1px solid var(--gray-200);
}
.product-cta .btn-primary { width: 100%; font-size: 1rem; padding: 0.85rem 1.5rem; }
.product-cta p.cta-note { font-size: 0.85rem; color: var(--gray-600); margin: 0.75rem 0 0; overflow-wrap: anywhere; }
.product-cta p.cta-note a { color: var(--black); }

@media (max-width: 768px) {
  .section { padding: 4rem 1rem; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { padding: 2rem 1.5rem; }
}

/* ============ HOW IT WORKS ============ */
.steps-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
  position: relative; list-style: none;
}
.steps-grid::before {
  content: ""; position: absolute; top: 32px; left: 10%; right: 10%;
  height: 2px; background: var(--gray-200);
}
.step {
  text-align: center; position: relative; z-index: 1;
}
.step-number {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--black); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 700; margin: 0 auto 1.25rem;
}
.step h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.step p { color: var(--gray-600); font-size: 0.9rem; }

@media (max-width: 768px) {
  .steps-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .steps-grid::before { display: none; }
}

/* ============ WHY LUCID ============ */
.trust-section { background: var(--gray-50); padding: 6rem 2rem; }
.container { max-width: 1200px; margin: 0 auto; }
.trust-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
  text-align: center;
}
.trust-item .trust-number {
  font-size: 2.5rem; font-weight: 800; color: var(--black); line-height: 1.2;
}
.trust-item p { color: var(--gray-600); font-size: 0.9rem; margin-top: 0.25rem; }
.trust-item p.trust-fine { font-size: 0.9rem; color: var(--gray-700); }

@media (max-width: 768px) {
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .trust-section { padding: 4rem 1rem; }
  .trust-item .trust-number { font-size: 1.75rem; }
}
@media (max-width: 420px) {
  .trust-grid { grid-template-columns: 1fr; }
}

/* ============ FAQ ============ */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--gray-200); padding: 1.5rem 0;
}
.faq-item h3 { font-size: 1.05rem; font-weight: 600; }
.faq-question {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  cursor: pointer; width: 100%; background: none; border: none;
  text-align: left; font: inherit; font-size: 1.05rem; font-weight: 600;
  color: var(--gray-900); padding: 0;
}
.faq-question .faq-icon { transition: transform 0.3s; font-size: 1.25rem; flex-shrink: 0; }
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-answer {
  color: var(--gray-600); font-size: 0.95rem; line-height: 1.7; padding-top: 1rem;
}
/* Collapsing only applies once site.js has run (no-JS visitors see every answer). */
.js .faq-answer {
  max-height: 0; overflow: hidden; visibility: hidden; padding-top: 0;
  transition: max-height 0.3s ease, padding 0.3s, visibility 0.3s;
}
.js .faq-answer.open { max-height: 600px; padding-top: 1rem; visibility: visible; }
.faq-answer a { color: var(--black); }

/* ============ CTA SECTION ============ */
.cta-section {
  background: var(--black); color: var(--white);
  border-radius: 20px; padding: 5rem 3rem; text-align: center;
  margin: 4rem auto;
  max-width: 1200px;
}
.cta-section h2 { color: var(--white); margin-bottom: 1rem; }
.cta-section p { color: var(--gray-300); font-size: 1.1rem; margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-section p.agent-notice { font-size: 0.95rem; margin-top: 2rem; margin-bottom: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.btn-white {
  display: inline-block; background: var(--white); color: var(--black);
  padding: 1rem 2.5rem; border-radius: 50px; font-size: 1.1rem;
  font-weight: 600; text-decoration: none; border: none; cursor: pointer;
  transition: all 0.2s; text-align: center;
}
.btn-white:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-outline-white {
  display: inline-block; background: transparent; color: var(--white);
  padding: 1rem 2.5rem; border-radius: 50px; font-size: 1.1rem;
  font-weight: 600; text-decoration: none; border: 2px solid var(--gray-500);
  transition: all 0.2s; text-align: center; overflow-wrap: anywhere;
}
.btn-outline-white:hover { border-color: var(--white); }

@media (max-width: 1240px) {
  .cta-section { margin: 4rem 1.25rem; }
}
@media (max-width: 768px) {
  .cta-section { margin: 3rem 1rem; padding: 3rem 1.25rem; border-radius: 16px; }
  .cta-actions a { width: 100%; }
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--gray-200); padding: 4rem 2rem 2rem;
  max-width: 1200px; margin: 0 auto;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand p { color: var(--gray-600); font-size: 0.9rem; margin-top: 0.75rem; max-width: 300px; }
.footer-col h2 { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-600); margin-bottom: 1rem; }
.footer-col a { display: block; color: var(--gray-600); text-decoration: none; font-size: 0.9rem; padding: 0.3rem 0; }
.footer-col a:hover { color: var(--black); text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid var(--gray-200); padding-top: 2rem;
  font-size: 0.85rem; color: var(--gray-600);
}
.footer-bottom p { margin-bottom: 0.5rem; overflow-wrap: anywhere; }
.footer-bottom a { color: var(--gray-900); }
.footer-bottom .footer-row {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .footer { padding: 3rem 1rem 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom .footer-row { flex-direction: column; }
}

/* ============ LEGAL PAGES ============ */
.legal {
  max-width: 760px; margin: 0 auto; padding: 8rem 2rem 4rem;
}
.legal h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.legal h2 { font-size: 1.5rem; margin: 2.5rem 0 0.75rem; }
.legal p, .legal li { color: var(--gray-700); margin-bottom: 0.75rem; }
.legal ul { padding-left: 1.25rem; }
.legal a { color: var(--black); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal .interim-banner {
  border: 2px solid var(--black); border-radius: var(--radius);
  background: var(--gray-100); padding: 1rem 1.25rem; margin-bottom: 2rem;
  color: var(--gray-900); font-weight: 600;
}
.legal .updated { font-size: 0.9rem; color: var(--gray-600); }
.table-wrap { overflow-x: auto; margin: 1rem 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.legal th, .legal td {
  text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--gray-200);
  vertical-align: top; color: var(--gray-700);
}
.legal th { color: var(--gray-900); font-weight: 600; background: var(--gray-50); }

@media (max-width: 768px) {
  .legal { padding: 7rem 1rem 3rem; }
  .legal h1 { font-size: 2rem; }
  .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; }
  .legal thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .legal tr { border: 1px solid var(--gray-200); border-radius: var(--radius); margin-bottom: 1rem; padding: 0.5rem 0; }
  .legal td { border-bottom: none; padding: 0.3rem 0.75rem; }
  .legal td::before { content: attr(data-label) ": "; font-weight: 600; color: var(--gray-900); }
}

/* Utility */
.text-center { text-align: center; }
