/* ============================================================
   CardLedgerAI — Marketing Site Design System
   Concept: "Ledger Navy + Vault Gold" — a financial ledger's
   ink-and-paper trust, with a graded-card gold accent.
   ============================================================ */

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

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role='list'], ol[role='list'] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.15; font-family: var(--font-display); }
p, li, figcaption { text-wrap: pretty; max-width: 68ch; }
::selection { background: color-mix(in oklab, var(--color-accent) 30%, transparent); color: var(--color-text); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: var(--radius-sm); }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; }

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

a, button, [role='button'], input, textarea, select {
  transition: color .18s cubic-bezier(.16,1,.3,1), background .18s cubic-bezier(.16,1,.3,1),
    border-color .18s cubic-bezier(.16,1,.3,1), box-shadow .18s cubic-bezier(.16,1,.3,1), transform .18s cubic-bezier(.16,1,.3,1);
}

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

/* ---------- Design tokens ---------- */
:root, [data-theme='light'] {
  --color-bg: #f6f4ee;
  --color-surface: #ffffff;
  --color-surface-2: #fbfaf6;
  --color-surface-offset: #efeade;
  --color-divider: #e7e1d2;
  --color-border: #ddd5c1;

  --color-text: #161a2c;
  --color-text-muted: #565b74;
  --color-text-faint: #9599ab;
  --color-text-inverse: #f6f4ee;

  --color-ink: #161a2c;
  --color-ink-hover: #262c48;
  --color-accent: #b9862a;
  --color-accent-hover: #9c6f20;
  --color-accent-highlight: #f0e2c2;

  --color-success: #2f7a4d;
  --color-success-highlight: #d8ecdf;
  --color-error: #a12c2c;
  --color-error-highlight: #f2d9d9;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 260 / 0.06);
  --shadow-md: 0 6px 20px oklch(0.2 0.02 260 / 0.08);
  --shadow-lg: 0 16px 40px oklch(0.2 0.02 260 / 0.14);

  --content-default: 1120px;
  --content-narrow: 720px;

  --font-display: 'Cabinet Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Satoshi', 'Segoe UI', sans-serif;
}

[data-theme='dark'] {
  --color-bg: #0c0e18;
  --color-surface: #12141f;
  --color-surface-2: #161927;
  --color-surface-offset: #1a1d2c;
  --color-divider: #262a3c;
  --color-border: #2c3044;

  --color-text: #e9e7db;
  --color-text-muted: #a2a6ba;
  --color-text-faint: #676c82;
  --color-text-inverse: #14162200;

  --color-ink: #e9e7db;
  --color-ink-hover: #ffffff;
  --color-accent: #e0b358;
  --color-accent-hover: #f0c874;
  --color-accent-highlight: #3a3222;

  --color-success: #6bbf8b;
  --color-success-highlight: #1c3327;
  --color-error: #e08787;
  --color-error-highlight: #3a2222;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 20px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
}

/* Type scale */
:root {
  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.9375rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --text-xl: clamp(1.375rem, 1.2rem + 0.9vw, 1.875rem);
  --text-2xl: clamp(1.875rem, 1.4rem + 2vw, 3rem);
  --text-3xl: clamp(2.25rem, 1.2rem + 3.6vw, 4.25rem);

  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--content-default); margin-inline: auto; padding-inline: var(--space-6); }
.wrap-narrow { max-width: var(--content-narrow); margin-inline: auto; padding-inline: var(--space-6); }
section { padding-block: clamp(var(--space-16), 8vw, var(--space-24)); }
.kicker {
  display: inline-block; font-size: var(--text-xs); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--color-accent); margin-bottom: var(--space-3);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--color-bg) 82%, transparent);
  border-bottom: 1px solid var(--color-divider);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); height: 4.5rem; flex-wrap: nowrap; }
.brand { display: flex; align-items: center; gap: var(--space-3); font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); }
.brand svg { width: 30px; height: 30px; color: var(--color-accent); flex-shrink: 0; }
.brand span.tag { display: none; }

.site-nav { display: flex; align-items: center; gap: var(--space-8); }
.site-nav ul { display: flex; gap: var(--space-6); }
.site-nav a {
  font-size: var(--text-sm); font-weight: 500; color: var(--color-text-muted); position: relative; padding-block: var(--space-1);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--color-text); }
.site-nav a[aria-current="page"]::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--color-accent); border-radius: var(--radius-full);
}
.nav-actions { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
.menu-toggle { display: none; width: 40px; height: 40px; border-radius: var(--radius-md); align-items: center; justify-content: center; flex-shrink: 0; }
.menu-toggle svg { width: 20px; height: 20px; }
.brand { flex-shrink: 0; min-width: 0; }
.brand span.brandtext { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-size: var(--text-sm); font-weight: 600; padding: .7rem 1.35rem; border-radius: var(--radius-full);
  white-space: nowrap; line-height: 1;
}
.btn-primary { background: var(--color-ink); color: var(--color-text-inverse); box-shadow: var(--shadow-sm); }
[data-theme='dark'] .btn-primary { color: #0c0e18; }
.btn-primary:hover { background: var(--color-ink-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--color-accent); color: #1a1305; }
.btn-accent:hover { background: var(--color-accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }
.btn-ghost:hover { border-color: var(--color-text-muted); background: var(--color-surface); }
.btn-sm { padding: .5rem 1rem; font-size: var(--text-xs); }
.theme-btn {
  width: 40px; height: 40px; border-radius: var(--radius-full); border: 1px solid var(--color-border);
  display: inline-flex; align-items: center; justify-content: center; color: var(--color-text-muted);
}
.theme-btn:hover { color: var(--color-text); border-color: var(--color-text-muted); }
.theme-btn svg { width: 18px; height: 18px; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(var(--space-20), 10vw, var(--space-32)) clamp(var(--space-16), 6vw, var(--space-20)); position: relative; overflow: clip; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--space-16); align-items: center; }
.hero h1 { font-size: var(--text-3xl); font-weight: 650; letter-spacing: -0.01em; max-width: 15ch; }
.hero .lede { font-size: var(--text-lg); color: var(--color-text-muted); margin-top: var(--space-6); max-width: 46ch; }
.hero-actions { display: flex; gap: var(--space-4); margin-top: var(--space-10); flex-wrap: wrap; }
.hero-trust { margin-top: var(--space-10); display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-xs); color: var(--color-text-faint); }
.hero-trust .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-success); }

.hero-visual {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); padding: var(--space-6); position: relative;
}
.mock-row { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-2); border-bottom: 1px solid var(--color-divider); font-size: var(--text-sm); }
.mock-row:last-child { border-bottom: none; }
.mock-card { display: flex; align-items: center; gap: var(--space-3); }
.mock-thumb { width: 34px; height: 46px; border-radius: 4px; background: linear-gradient(155deg, var(--color-accent-highlight), var(--color-surface-offset)); border: 1px solid var(--color-border); }
.mock-name strong { display: block; font-size: var(--text-sm); }
.mock-name span { color: var(--color-text-faint); font-size: var(--text-xs); }
.mock-badge { font-size: var(--text-xs); font-weight: 600; padding: .2rem .55rem; border-radius: var(--radius-full); }
.mock-badge.verified { background: var(--color-success-highlight); color: var(--color-success); }
.mock-badge.unverified { background: var(--color-accent-highlight); color: var(--color-accent-hover); }
.mock-value { font-family: var(--font-display); font-weight: 600; }
.mock-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--space-3); }
.mock-header span { font-size: var(--text-xs); color: var(--color-text-faint); text-transform: uppercase; letter-spacing: .06em; }
.mock-header strong { font-family: var(--font-display); font-size: var(--text-xl); }
.mock-gain { color: var(--color-success); font-size: var(--text-xs); font-weight: 600; }

/* ---------- Logo strip / trust bar ---------- */
.trust-bar { border-top: 1px solid var(--color-divider); border-bottom: 1px solid var(--color-divider); padding-block: var(--space-8); }
.trust-bar .wrap { display: flex; flex-wrap: wrap; gap: var(--space-8); justify-content: space-between; align-items: center; }
.trust-item { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-sm); color: var(--color-text-muted); }
.trust-item svg { width: 18px; height: 18px; color: var(--color-accent); flex-shrink: 0; }

/* ---------- Section headers ---------- */
.section-head { max-width: 640px; margin-bottom: var(--space-12); }
.section-head h2 { font-size: var(--text-2xl); font-weight: 600; letter-spacing: -0.01em; }
.section-head p { margin-top: var(--space-4); color: var(--color-text-muted); font-size: var(--text-lg); }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.feature-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);
}
.feature-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--color-accent-highlight);
  color: var(--color-accent-hover); display: flex; align-items: center; justify-content: center;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: var(--text-lg); font-weight: 600; }
.feature-card p { color: var(--color-text-muted); font-size: var(--text-sm); }
.feature-card .status { font-size: var(--text-xs); font-weight: 600; padding: .2rem .6rem; border-radius: var(--radius-full); width: fit-content; }
.status.live { background: var(--color-success-highlight); color: var(--color-success); }
.status.build { background: var(--color-accent-highlight); color: var(--color-accent-hover); }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); counter-reset: step; }
.step { position: relative; padding-top: var(--space-10); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; color: var(--color-accent);
  display: block; margin-bottom: var(--space-3);
}
.step h3 { font-size: var(--text-base); font-weight: 600; margin-bottom: var(--space-2); }
.step p { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--color-ink); color: var(--color-text-inverse); border-radius: var(--radius-xl);
  padding: clamp(var(--space-10), 5vw, var(--space-16)); text-align: center;
}
[data-theme='dark'] .cta-band { background: var(--color-surface); border: 1px solid var(--color-border); }
.cta-band h2 { font-size: var(--text-2xl); font-weight: 600; }
.cta-band p { color: color-mix(in oklab, var(--color-text-inverse) 70%, transparent); margin: var(--space-4) auto 0; }
[data-theme='dark'] .cta-band p { color: var(--color-text-muted); }
.cta-band .hero-actions { justify-content: center; margin-top: var(--space-8); }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); align-items: stretch; }
.price-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-6);
}
.price-card.featured { border-color: var(--color-accent); box-shadow: var(--shadow-lg); position: relative; }
.price-card.featured::before {
  content: 'Most popular'; position: absolute; top: -13px; left: var(--space-8); background: var(--color-accent);
  color: #1a1305; font-size: var(--text-xs); font-weight: 700; padding: .25rem .75rem; border-radius: var(--radius-full);
}
.price-card h3 { font-size: var(--text-lg); font-weight: 600; }
.price-card .price { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 600; }
.price-card .price span { font-size: var(--text-sm); font-weight: 400; color: var(--color-text-muted); font-family: var(--font-body); }
.price-card ul { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-2); flex: 1; }
.price-card li { display: flex; gap: var(--space-3); font-size: var(--text-sm); color: var(--color-text-muted); align-items: flex-start; }
.price-card li svg { width: 16px; height: 16px; color: var(--color-success); flex-shrink: 0; margin-top: 3px; }
.price-note { font-size: var(--text-xs); color: var(--color-text-faint); text-align: center; margin-top: var(--space-8); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: var(--space-3); max-width: var(--content-narrow); margin-inline: auto; }
.faq-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-5) var(--space-6); }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: var(--text-base); display: flex; justify-content: space-between; align-items: center; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.4rem; color: var(--color-accent); font-weight: 400; }
.faq-item[open] summary::after { content: '–'; }
.faq-item p { margin-top: var(--space-3); color: var(--color-text-muted); font-size: var(--text-sm); }

/* ---------- About / values ---------- */
.about-hero { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: center; }
.value-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.value-card { padding: var(--space-6); border-left: 2px solid var(--color-accent); }
.value-card h3 { font-size: var(--text-base); font-weight: 600; margin-bottom: var(--space-2); }
.value-card p { font-size: var(--text-sm); color: var(--color-text-muted); }

.contact-panel {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl);
  padding: var(--space-10); display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-10);
}
.contact-info h3 { font-size: var(--text-xl); font-weight: 600; margin-bottom: var(--space-4); }
.contact-info p { color: var(--color-text-muted); font-size: var(--text-sm); margin-bottom: var(--space-6); }
.contact-row { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-sm); margin-bottom: var(--space-3); }
.contact-row svg { width: 18px; height: 18px; color: var(--color-accent); flex-shrink: 0; }
.contact-form { display: flex; flex-direction: column; gap: var(--space-4); }
.contact-form label { font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); margin-bottom: var(--space-1); display: block; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: .7rem .9rem; border-radius: var(--radius-md); border: 1px solid var(--color-border);
  background: var(--color-surface-2); font-size: var(--text-sm); color: var(--color-text);
}
.contact-form textarea { resize: vertical; min-height: 100px; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--color-accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--color-divider); padding-block: var(--space-12); }
.footer-grid { display: flex; justify-content: space-between; gap: var(--space-10); flex-wrap: wrap; }
.footer-brand .brand { margin-bottom: var(--space-3); }
.footer-brand p { font-size: var(--text-sm); color: var(--color-text-faint); max-width: 32ch; }
.footer-cols { display: flex; gap: var(--space-16); }
.footer-col h4 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-faint); margin-bottom: var(--space-4); }
.footer-col a { display: block; font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-3); }
.footer-col a:hover { color: var(--color-text); }
.footer-bottom { margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--color-divider); display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--color-text-faint); flex-wrap: wrap; gap: var(--space-3); }

/* ---------- Page header (interior pages) ---------- */
.page-hero { padding-block: clamp(var(--space-16), 7vw, var(--space-20)) var(--space-10); text-align: center; }
.page-hero h1 { font-size: var(--text-2xl); font-weight: 600; max-width: 22ch; margin-inline: auto; }
.page-hero p { font-size: var(--text-lg); color: var(--color-text-muted); max-width: 52ch; margin: var(--space-5) auto 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .about-hero { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .contact-panel { grid-template-columns: 1fr; }

  .menu-toggle { display: inline-flex; }
  .site-nav { position: fixed; inset: 4.5rem var(--space-4) auto; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--space-6); flex-direction: column; align-items: stretch; gap: var(--space-6); transform: translateY(-8px); opacity: 0; pointer-events: none; z-index: 50; }
  .site-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav ul { flex-direction: column; gap: var(--space-4); }
  .nav-actions .btn-ghost { display: none; }
}
@media (max-width: 480px) {
  .nav-actions .btn-accent { padding-inline: .9rem; font-size: var(--text-xs); }
  .brand { font-size: var(--text-base); }
}
@media (max-width: 620px) {
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; }
  .footer-cols { gap: var(--space-10); }
}
