/* ==========================================================================
   Ledgerline — modern landing + auth template
   Rename the brand in the HTML files; colors live in the tokens below.
   ========================================================================== */

:root {
  --bg: #f7f8fa;
  --bg-elev: #ffffff;
  --bg-muted: #eef1f5;
  --text: #0e1116;
  --text-muted: #5b6472;
  --border: #e2e6ec;
  --accent: #3b5bfd;
  --accent-hover: #2f4ae0;
  --accent-soft: rgba(59, 91, 253, 0.1);
  --accent-contrast: #ffffff;
  --warn-bg: #fff7e6;
  --warn-border: #f3d38a;
  --warn-text: #7a5300;
  --c1: #3b5bfd;
  --c2: #13b78a;
  --c3: #f5a524;
  --c4: #a45cf4;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
  --radius: 14px;
  --radius-lg: 22px;
  --max: 1160px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0e14;
    --bg-elev: #121722;
    --bg-muted: #171d2a;
    --text: #e8ecf3;
    --text-muted: #98a2b3;
    --border: #232b3a;
    --accent: #6d86ff;
    --accent-hover: #869bff;
    --accent-soft: rgba(109, 134, 255, 0.14);
    --accent-contrast: #0b0e14;
    --warn-bg: #2a2110;
    --warn-border: #5c4513;
    --warn-text: #f3cf7f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0e14;
  --bg-elev: #121722;
  --bg-muted: #171d2a;
  --text: #e8ecf3;
  --text-muted: #98a2b3;
  --border: #232b3a;
  --accent: #6d86ff;
  --accent-hover: #869bff;
  --accent-soft: rgba(109, 134, 255, 0.14);
  --accent-contrast: #0b0e14;
  --warn-bg: #2a2110;
  --warn-border: #5c4513;
  --warn-text: #f3cf7f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); font-weight: 750; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 650; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--text-muted); }
.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section { padding: 96px 0; }
.section-alt { background: var(--bg-muted); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--text-muted); font-size: 1.075rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .95rem;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-contrast); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }
.btn-sm { height: 38px; padding: 0 16px; font-size: .9rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }

/* Image logo: swap assets/logo.svg (light backgrounds) and
   assets/logo-light.svg (dark backgrounds) for your own files. */
.logo { height: 36px; width: auto; max-width: 180px; object-fit: contain; }
.logo-inverse { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-default { display: none; }
  :root:not([data-theme="light"]) .logo-inverse { display: block; }
}
:root[data-theme="dark"] .logo-default { display: none; }
:root[data-theme="dark"] .logo-inverse { display: block; }
.auth-aside .logo-default { display: none !important; }
.auth-aside .logo-inverse { display: block !important; }
@media (max-width: 420px) { .site-header .logo { height: 30px; max-width: 130px; } }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--c1), var(--c4));
  display: grid; place-items: center;
}
.brand-mark svg { width: 16px; height: 16px; color: #fff; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-grid; place-items: center;
  background: transparent; border: 1px solid var(--border); color: var(--text);
  cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }
.menu-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links, .nav-actions .hide-sm { display: none; }
  .menu-toggle { display: inline-grid; }
  .site-header.open .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--bg-elev); border-bottom: 1px solid var(--border);
    padding: 8px 20px 20px;
  }
  .site-header.open .nav-links li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--border); color: var(--text); }
  .site-header.open .nav-links .mobile-only { display: block; padding-top: 16px; }
}
.mobile-only { display: none; }
@media (max-width: 420px) {
  .nav { gap: 12px; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn-sm { padding: 0 12px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 88px 0 96px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 720px; height: 720px;
  background: radial-gradient(closest-side, var(--accent-soft), transparent);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; position: relative; }
.hero-copy .lead { font-size: 1.2rem; color: var(--text-muted); max-width: 520px; margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px; border-radius: 999px;
  background: var(--bg-elev); border: 1px solid var(--border);
  font-size: .85rem; color: var(--text-muted); margin-bottom: 22px;
}
.pill b { background: var(--accent-soft); color: var(--accent); font-weight: 600; padding: 2px 8px; border-radius: 999px; font-size: .75rem; }
.hero-note { font-size: .85rem; color: var(--text-muted); max-width: 480px; }

/* Portfolio mock card */
.mock {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 26px;
}
.mock-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.mock-head h4 { font-size: 1rem; margin: 0; }
.tag { font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--bg-muted); color: var(--text-muted); }
.tag.ok { background: rgba(19, 183, 138, .12); color: var(--c2); }
.mock-body { display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: center; }
.donut { width: 160px; height: 160px; }
.donut-center { font-size: .75rem; fill: var(--text-muted); }
.donut-big { font-size: 1.05rem; font-weight: 700; fill: var(--text); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; font-size: .92rem; }
.legend .dot { width: 10px; height: 10px; border-radius: 3px; }
.legend .pct { font-variant-numeric: tabular-nums; font-weight: 600; }
.bar-row { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.bar-label { display: flex; justify-content: space-between; font-size: .82rem; color: var(--text-muted); }
.bar { height: 8px; border-radius: 999px; background: var(--bg-muted); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; background: var(--c3); }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding: 56px 0 72px; }
}
@media (max-width: 480px) {
  .mock { padding: 20px; }
  .mock-body { grid-template-columns: 1fr; justify-items: center; }
  .legend { width: 100%; }
}

/* ---------- Trust strip ---------- */
.strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-elev); }
.strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-item { padding: 26px 20px; display: flex; gap: 12px; align-items: center; font-size: .92rem; font-weight: 500; }
.strip-item + .strip-item { border-left: 1px solid var(--border); }
.strip-item svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
@media (max-width: 860px) {
  .strip-inner { grid-template-columns: 1fr 1fr; }
  .strip-item:nth-child(3) { border-left: 0; }
  .strip-item:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* ---------- Feature cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: 1fr 1fr; } .grid-2 { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 620px) { .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.card p { color: var(--text-muted); margin: 0; font-size: .96rem; }
.card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 28px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-size: .85rem; font-weight: 700; color: var(--accent); margin-bottom: 14px; letter-spacing: .05em;
}
.steps p { color: var(--text-muted); margin: 0; font-size: .96rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Checklist ---------- */
.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist svg { width: 20px; height: 20px; color: var(--c2); flex: none; margin-top: 3px; }

.panel {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow);
}
.fee-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.fee-table th, .fee-table td { text-align: left; padding: 14px 0; border-bottom: 1px solid var(--border); }
.fee-table th { font-weight: 500; color: var(--text-muted); }
.fee-table td { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.fee-table tr:last-child th, .fee-table tr:last-child td { border-bottom: 0; }
.fine { font-size: .82rem; color: var(--text-muted); margin-top: 14px; margin-bottom: 0; }

/* ---------- Risk banner ---------- */
.risk {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text);
  border-radius: var(--radius); padding: 22px 24px;
}
.risk svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.risk h3 { margin-bottom: 6px; font-size: 1rem; color: inherit; }
.risk p { margin: 0; font-size: .95rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 22px;
}
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 0; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 10px; height: 10px; flex: none;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details p { color: var(--text-muted); padding-bottom: 20px; margin: 0; }

/* ---------- CTA ---------- */
.cta {
  border-radius: var(--radius-lg); padding: 64px 40px; text-align: center;
  background: linear-gradient(135deg, var(--c1), var(--c4));
  color: #fff; position: relative; overflow: hidden;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.85); max-width: 520px; margin: 0 auto 28px; font-size: 1.075rem; }
.cta .btn-primary { background: #fff; color: #1b1f2b; }
.cta .btn-primary:hover { background: #eef1ff; color: #1b1f2b; }
@media (max-width: 620px) { .cta { padding: 48px 22px; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 64px 0 36px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-grid h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--text); }
.footer-grid a:hover { color: var(--accent); }
.footer-grid .brand { margin-bottom: 14px; }
.footer-legal { border-top: 1px solid var(--border); padding-top: 28px; color: var(--text-muted); font-size: .82rem; display: grid; gap: 12px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Auth pages
   ========================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #1a2350, #3b2a6b 60%, #512f86);
  color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-aside .brand, .auth-aside .brand:hover { color: #fff; }
.auth-aside .brand-mark { background: rgba(255,255,255,.18); }
.auth-aside h2 { color: #fff; max-width: 420px; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.auth-aside p { color: rgba(255,255,255,.78); max-width: 420px; }
.auth-aside .checklist svg { color: #7ff0cf; }
.auth-aside .checklist li { color: rgba(255,255,255,.9); }
.auth-aside small { color: rgba(255,255,255,.6); font-size: .8rem; }
.auth-aside::after {
  content: ""; position: absolute; right: -160px; bottom: -160px; width: 420px; height: 420px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 0 0 60px rgba(255,255,255,.03), 0 0 0 120px rgba(255,255,255,.02);
}
.auth-main { display: flex; flex-direction: column; padding: 32px 20px; }
.auth-top { display: flex; justify-content: space-between; align-items: center; max-width: 440px; width: 100%; margin: 0 auto; }
.auth-top .brand { visibility: hidden; }
.auth-form-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 0 16px; }
.auth-form { width: 100%; max-width: 440px; }
.auth-form h1 { font-size: 1.9rem; margin-bottom: 8px; }
.auth-form > p { color: var(--text-muted); margin-bottom: 28px; }
.auth-foot { text-align: center; font-size: .82rem; color: var(--text-muted); margin-top: 24px; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-top .brand { visibility: visible; }
}

.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 8px; }
.label-row a { font-size: .85rem; font-weight: 500; }
.input {
  width: 100%; height: 48px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text);
  font: inherit; font-size: .98rem;
  transition: border-color .15s, box-shadow .15s;
}
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.input::placeholder { color: var(--text-muted); opacity: .7; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 48px; }
.reveal {
  position: absolute; right: 6px; top: 6px; width: 36px; height: 36px;
  border: 0; background: transparent; color: var(--text-muted); cursor: pointer; border-radius: 8px;
  display: grid; place-items: center;
}
.reveal svg { width: 18px; height: 18px; }
.hint { font-size: .8rem; color: var(--text-muted); margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; font-weight: 400; color: var(--text-muted); margin-bottom: 14px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.divider { display: flex; align-items: center; gap: 14px; color: var(--text-muted); font-size: .82rem; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.switch { text-align: center; font-size: .92rem; color: var(--text-muted); margin-top: 22px; }
.notice {
  display: none; margin-top: 16px; padding: 14px 16px; border-radius: 12px;
  background: var(--accent-soft); color: var(--text); font-size: .9rem;
}
.notice.show { display: block; }
