/* AcreLogic marketing site. Mobile first: base styles target phones, then min-width breakpoints
   at 640px, 960px and 1200px. Colors and type follow doc-hub/design/design-system.md. */

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin-wght.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --navy: #0f2a44;
  --navy-2: #173a5c;
  --navy-3: #0a1f33;
  --action: #0b5cad;
  --action-hover: #0a4c8f;
  --action-soft: #e6f0fa;
  --accent: #b45309;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-alt: #eef2f6;
  --border: #d9e0e8;
  --text: #0f172a;
  --muted: #475569;
  --subtle: #64748b;
  --on-navy: #ffffff;
  --on-navy-muted: #b6c4d4;
  --success: #166534;
  --success-soft: #e8f5ec;
  --info: #0e7490;
  --info-soft: #e6f4f7;
  --warning-soft: #fdf3e7;
  --focus: #0b5cad;

  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgb(15 23 42 / 0.06), 0 8px 24px rgb(15 23 42 / 0.08);
  --header-h: 64px;
  --gutter: 20px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--action); }
a:hover { color: var(--action-hover); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; color: var(--text); }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 14px;
  background: var(--surface); border-radius: var(--radius);
}
.skip-link:focus { top: 12px; box-shadow: var(--shadow); }

/* Buttons: 44px minimum touch target */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--radius);
  font: inherit; font-size: 0.95rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease);
}
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 1rem; }
.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover { background: var(--action-hover); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--action); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--action); color: var(--action-hover); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--surface-alt); color: var(--text); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.5); }
.btn-outline-light:hover { border-color: #fff; color: #fff; background: rgb(255 255 255 / 0.08); }

/* Header and navigation: drawer on mobile, inline with mega menus from 960px */
.site-header {
  /* No backdrop-filter here: it would make the fixed mobile drawer size itself to the header. */
  position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand img { width: 132px; height: auto; }
.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 0; background: transparent; border-radius: var(--radius); cursor: pointer;
}
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform 200ms var(--ease), opacity 200ms var(--ease);
}
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ''; position: absolute; left: 0; }
.menu-icon::before { top: -7px; }
.menu-icon::after { top: 7px; }
.menu-toggle[aria-expanded='true'] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded='true'] .menu-icon::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded='true'] .menu-icon::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: fixed; inset: var(--header-h) 0 0 0; display: none; flex-direction: column;
  overflow-y: auto; padding: 8px var(--gutter) 24px; background: var(--surface);
}
.site-nav.open { display: flex; }
body.nav-open { overflow: hidden; }
.nav-list { list-style: none; }
.nav-item { border-bottom: 1px solid var(--border); }
.nav-trigger, .nav-link {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px;
  padding: 0; border: 0; background: none; font: inherit; font-size: 1.05rem; font-weight: 600;
  color: var(--text); text-decoration: none; cursor: pointer;
}
.nav-trigger::after {
  content: ''; width: 8px; height: 8px; border-right: 2px solid var(--subtle); border-bottom: 2px solid var(--subtle);
  transform: rotate(45deg); transition: transform 200ms var(--ease); margin-right: 4px;
}
.nav-trigger[aria-expanded='true']::after { transform: rotate(-135deg); }
.mega-menu { display: none; padding: 0 0 16px; }
.nav-trigger[aria-expanded='true'] + .mega-menu { display: grid; gap: 16px; }
.mega-heading { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--subtle); margin: 4px 0 6px; }
.mega-col a {
  display: flex; flex-direction: column; padding: 10px 0; color: var(--text); text-decoration: none;
}
.mega-col a strong { font-weight: 600; font-size: 0.95rem; }
.mega-col a span { color: var(--muted); font-size: 0.85rem; line-height: 1.4; }
.mega-col a:hover strong { color: var(--action); }
.mega-all { color: var(--action) !important; font-weight: 600; }
.nav-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

@media (min-width: 960px) {
  .menu-toggle { display: none; }
  .site-nav {
    position: static; display: flex; flex-direction: row; align-items: center; justify-content: space-between;
    flex: 1; margin-left: 40px; padding: 0; overflow: visible; background: transparent;
  }
  .nav-list { display: flex; gap: 4px; }
  .nav-item { position: relative; border: 0; }
  .nav-trigger, .nav-link {
    min-height: 40px; padding: 0 12px; font-size: 0.95rem; font-weight: 500; border-radius: var(--radius); gap: 8px;
  }
  .nav-trigger:hover, .nav-link:hover { background: var(--surface-alt); }
  .nav-trigger::after { width: 6px; height: 6px; border-width: 0 1.5px 1.5px 0; margin: -3px 0 0; }
  .mega-menu {
    position: absolute; top: calc(100% + 10px); left: -12px; width: 760px; padding: 24px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  }
  .nav-trigger[aria-expanded='true'] + .mega-menu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .mega-narrow { width: 480px; }
  .nav-trigger[aria-expanded='true'] + .mega-narrow { grid-template-columns: repeat(2, 1fr); }
  .mega-col a { padding: 8px 10px; margin: 0 -10px; border-radius: var(--radius); }
  .mega-col a:hover { background: var(--bg); }
  .mega-feature { padding-left: 24px; border-left: 1px solid var(--border); }
  .nav-actions { flex-direction: row; margin: 0; }
}

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--bg); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-block; margin-bottom: 12px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--action);
}
.lead { margin-top: 16px; font-size: 1.125rem; color: var(--muted); }
@media (min-width: 960px) { .section { padding: 96px 0; } }

/* Hero */
.hero { padding: 48px 0 56px; background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 16px; font-size: 0.9rem; color: var(--subtle); }
@media (min-width: 640px) { .hero-actions { flex-direction: row; } }
@media (min-width: 960px) {
  .hero { padding: 88px 0 96px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; }
}

/* Product illustration (HTML mock of the review screen) */
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden; font-size: 0.85rem;
}
.product-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--navy); color: var(--on-navy); font-weight: 600; }
.product-bar img { width: 18px; }
.product-bar span { margin-left: auto; font-weight: 500; color: var(--on-navy-muted); font-size: 0.75rem; }
.product-body { display: grid; gap: 0; }
.doc-pane { padding: 14px; border-bottom: 1px solid var(--border); background: var(--bg); }
.doc-page { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; color: var(--muted); line-height: 1.5; font-size: 0.8rem; }
.doc-page mark { background: #fde9c8; color: var(--text); padding: 0 2px; border-radius: 2px; }
.doc-label { margin-bottom: 8px; font-size: 0.75rem; color: var(--subtle); }
.fields-pane { padding: 6px 14px 14px; }
.field-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.field-row:last-child { border-bottom: 0; }
.field-name { color: var(--muted); font-size: 0.8rem; }
.field-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.field-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--subtle); font-size: 0.75rem; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--radius-sm); font-size: 0.72rem; font-weight: 600; }
.tag-success { background: var(--success-soft); color: var(--success); }
.tag-info { background: var(--info-soft); color: var(--info); }
.tag-warning { background: var(--warning-soft); color: var(--accent); }
.illustrative { margin-top: 10px; font-size: 0.75rem; color: var(--subtle); text-align: center; }
@media (min-width: 640px) { .product-body { grid-template-columns: 1fr 1.1fr; } .doc-pane { border-bottom: 0; border-right: 1px solid var(--border); } }

/* Team strip */
.team-strip { padding: 28px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.team-strip p { text-align: center; color: var(--subtle); font-size: 0.9rem; margin-bottom: 14px; }
.team-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; list-style: none; }
.team-list li { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.9rem; font-weight: 500; color: var(--muted); background: var(--surface); }

/* Grids and cards */
.grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card {
  display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
a.card { color: inherit; text-decoration: none; transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
a.card:hover { border-color: var(--action); box-shadow: var(--shadow); }
.card p { color: var(--muted); }
.card .more { margin-top: auto; padding-top: 6px; color: var(--action); font-weight: 600; font-size: 0.9rem; }
.icon-badge {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: var(--radius); background: var(--action-soft); color: var(--action);
}
.icon-badge svg { width: 22px; height: 22px; }

/* Pain list */
.pain { padding: 24px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.pain h3 { margin-bottom: 8px; }
.pain p { color: var(--muted); }

/* Steps */
.steps { display: grid; gap: 16px; counter-reset: step; list-style: none; }
.steps li { position: relative; padding: 24px 24px 24px 72px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.steps li::before {
  counter-increment: step; content: counter(step); position: absolute; left: 24px; top: 22px;
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 0.9rem;
}
.steps p { color: var(--muted); margin-top: 6px; }
@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { padding: 72px 20px 24px; }
  .steps li::before { left: 20px; top: 24px; }
}

/* Split feature */
.split { display: grid; gap: 32px; align-items: center; }
.split + .split { margin-top: 64px; }
.check-list { list-style: none; display: grid; gap: 12px; margin-top: 20px; }
.check-list li { position: relative; padding-left: 30px; color: var(--muted); }
.check-list li::before {
  content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--success-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23166534' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.check-list strong { color: var(--text); }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } .split.reverse > :first-child { order: 2; } }

.panel {
  padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.timeline { list-style: none; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.timeline li:last-child { border-bottom: 0; }
.timeline time { color: var(--subtle); font-variant-numeric: tabular-nums; }
.timeline span { overflow-wrap: anywhere; }
@media (min-width: 640px) { .timeline li { grid-template-columns: 96px 1fr; } }
.timeline small { display: block; color: var(--subtle); }

/* Security band */
.security-band { background: var(--navy); color: var(--on-navy); }
.security-band h2, .security-band h3 { color: #fff; }
.security-band .lead, .security-band p { color: var(--on-navy-muted); }
.security-band .eyebrow { color: #8dbdf1; }
.security-band .card { background: var(--navy-2); border-color: rgb(255 255 255 / 0.12); }
.security-band .card p { color: var(--on-navy-muted); }
.security-band .icon-badge { background: rgb(141 189 241 / 0.15); color: #8dbdf1; }
.security-band a { color: #8dbdf1; }

/* FAQ */
.faq { max-width: 800px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0;
  font-weight: 600; font-size: 1.05rem; cursor: pointer; list-style: none; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; font-weight: 400; color: var(--action); flex: none; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { padding: 0 0 20px; color: var(--muted); }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%); color: #fff; padding: 56px 0; }
.cta-inner { display: grid; gap: 24px; align-items: center; }
.cta-band h2 { color: #fff; }
.cta-band p { margin-top: 10px; color: var(--on-navy-muted); max-width: 560px; }
.cta-actions { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 640px) { .cta-actions { flex-direction: row; } }
@media (min-width: 960px) { .cta-inner { grid-template-columns: 1.4fr 1fr; } .cta-actions { justify-content: flex-end; } }

/* Footer */
.site-footer { background: var(--navy-3); color: var(--on-navy-muted); padding: 56px 0 24px; font-size: 0.92rem; }
.footer-grid { display: grid; gap: 32px; }
.footer-brand img { width: 132px; }
.footer-brand p { margin: 14px 0 18px; max-width: 300px; }
.footer-col h2 { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #fff; margin-bottom: 12px; }
.footer-col ul { list-style: none; display: grid; gap: 2px; }
.footer-col a { display: inline-flex; align-items: center; min-height: 36px; color: var(--on-navy-muted); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.link-button { display: inline-flex; align-items: center; min-height: 36px; padding: 0; border: 0; background: none; font: inherit; color: var(--on-navy-muted); cursor: pointer; }
.link-button:hover { color: #fff; text-decoration: underline; }
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgb(15 23 42 / 0.12); }
.cookie-banner[hidden] { display: none; }
.cookie-inner { display: flex; flex-direction: column; gap: 14px; padding-top: 16px; padding-bottom: 16px; }
.cookie-inner p { color: var(--muted); font-size: 0.92rem; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions .btn { flex: 1; }
@media (min-width: 760px) {
  .cookie-inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
  .cookie-actions { flex: none; }
  .cookie-actions .btn { flex: none; }
}
.footer-bottom { display: flex; flex-direction: column; gap: 6px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / 0.12); font-size: 0.82rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .footer-grid { grid-template-columns: 1.6fr repeat(4, 1fr); }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* Inner pages */
.page-hero { padding: 48px 0; background: var(--bg); border-bottom: 1px solid var(--border); }
.page-hero .lead { max-width: 720px; }
@media (min-width: 960px) { .page-hero { padding: 80px 0 64px; } }
.anchor-nav { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.anchor-nav a { flex: none; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 0.88rem; font-weight: 500; text-decoration: none; }
.anchor-nav a:hover { border-color: var(--action); color: var(--action); }
.capability { padding: 56px 0; border-bottom: 1px solid var(--border); }
.capability:last-of-type { border-bottom: 0; }
.capability-intro { margin-top: 14px; color: var(--muted); }
.prose .notice { margin-bottom: 16px; }
.prose { max-width: 760px; }
.section-link { margin-top: 28px; }
.prose h2 { margin: 40px 0 12px; font-size: 1.4rem; }
.prose p, .prose li { color: var(--muted); }
.prose p + p { margin-top: 14px; }
.prose ul { padding-left: 20px; margin-top: 10px; display: grid; gap: 6px; }
.notice { padding: 16px 18px; border-radius: var(--radius); background: var(--warning-soft); color: var(--text); border: 1px solid #f3d3a8; }

/* Forms */
.form-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-grid .half { grid-column: span 1; } .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.92rem; }
.field .optional { font-weight: 400; color: var(--subtle); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #7a8899; border-radius: var(--radius);
  font: inherit; font-size: 16px; color: var(--text); background: var(--surface);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.field .error { display: none; margin-top: 6px; color: #b91c1c; font-size: 0.85rem; }
.field.invalid input, .field.invalid select { border-color: #b91c1c; }
.field.invalid .error { display: block; }
.form-note { font-size: 0.82rem; color: var(--subtle); }
.form-status { padding: 14px 16px; border-radius: var(--radius); font-weight: 500; }
.form-status.ok { background: var(--success-soft); color: var(--success); }
.form-status.fail { background: #fcebeb; color: #b91c1c; }
.demo-grid { display: grid; gap: 40px; }
@media (min-width: 960px) { .demo-grid { grid-template-columns: 1fr 1.1fr; gap: 64px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; scroll-behavior: auto !important; }
}
