/* ============================================================
   MindLedge — mindledge.app
   Design tokens derived from brand assets:
   ink      #282420  (logo charcoal)
   paper    #f7f7f7  (logo off-white)
   gold     #b8862f  (logo gold)
   ============================================================ */

:root {
  --ink: #282420;
  --ink-soft: #4a453f;
  --ink-mute: #6f6a62;
  --paper: #f7f7f7;
  --card: #ffffff;
  --rule: #ddd8d0;        /* ledger rule hairline */
  --rule-soft: #e9e5df;
  --gold: #b8862f;
  --gold-deep: #93691f;
  --gold-wash: #f4ecdd;
  --radius: 14px;
  --radius-lg: 22px;
  --font-display: "Bricolage Grotesque", "Albert Sans", sans-serif;
  --font-body: "Albert Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, "Cascadia Mono", monospace;
  --w-max: 1120px;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: var(--w-max); margin: 0 auto; padding: 0 24px; }

::selection { background: var(--gold-wash); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- eyebrow / mono labels (ledger vernacular) ---------- */
.tab {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.tab::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--gold);
}

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 34px; width: 34px; border-radius: 8px; }
.brand span {
  font-family: var(--font-display);
  font-weight: 700; font-size: 20px; letter-spacing: -0.01em;
}
.brand span em { font-style: normal; color: var(--gold); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  text-decoration: none; font-size: 15px; color: var(--ink-soft);
  transition: color 120ms ease;
}
.nav a:hover { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 15.5px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn:active { transform: translateY(1px); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #3a352f; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-deep); }
.btn-ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-mute); }
.btn[disabled] { opacity: 0.55; cursor: wait; }

/* ---------- hero ---------- */
.hero { padding: 84px 0 72px; overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 56px; align-items: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.2vw, 62px);
  line-height: 1.04; letter-spacing: -0.025em; font-weight: 700;
  margin: 18px 0 20px;
}
.hero h1 .gold { color: var(--gold); }
.hero .lede {
  font-size: 19px; color: var(--ink-soft); max-width: 32em; margin-bottom: 30px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note {
  margin-top: 16px; font-family: var(--font-mono); font-size: 13px;
  color: var(--ink-mute);
}

/* ---------- the ledger (signature element) ---------- */
.ledger {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -30px rgba(40, 36, 32, 0.35);
  overflow: hidden;
}
.ledger-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: var(--ink);
  color: var(--paper);
}
.ledger-head .title {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ledger-head .date { font-family: var(--font-mono); font-size: 13px; color: #b9b3aa; }

.ledger-rows { padding: 6px 0 10px; }
.entry {
  display: grid; grid-template-columns: 64px 1fr auto;
  gap: 14px; align-items: baseline;
  padding: 13px 20px;
  border-bottom: 1px solid var(--rule-soft);
  animation: entry-in 480ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.entry:last-child { border-bottom: 0; }
.entry:nth-child(1) { animation-delay: 150ms; }
.entry:nth-child(2) { animation-delay: 350ms; }
.entry:nth-child(3) { animation-delay: 550ms; }
.entry:nth-child(4) { animation-delay: 750ms; }
.entry:nth-child(5) { animation-delay: 950ms; }
@keyframes entry-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.entry .t { font-family: var(--font-mono); font-size: 13px; color: var(--ink-mute); }
.entry .what { font-size: 15px; }
.entry .what small { display: block; color: var(--ink-mute); font-size: 13.5px; }
.entry .badge {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
}
.badge.filed   { background: var(--gold-wash); color: var(--gold-deep); }
.badge.done    { background: #e8efe4; color: #4c6b3c; }
.badge.waiting { background: #efeae2; color: var(--ink-mute); }

.ledger-foot {
  padding: 12px 20px 16px;
  border-top: 1px dashed var(--rule);
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-mute);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* ---------- sections ---------- */
section { padding: 76px 0; }
section.alt { background: var(--card); border-block: 1px solid var(--rule-soft); }
.sec-head { max-width: 640px; margin-bottom: 48px; }
.sec-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.02em; line-height: 1.12; margin: 14px 0 12px;
}
.sec-head p { color: var(--ink-soft); }

/* ---------- features as ledger lines ---------- */
.features { border-top: 1px solid var(--rule); }
.feature {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 32px; padding: 30px 0;
  border-bottom: 1px solid var(--rule);
}
.feature h3 {
  font-family: var(--font-display); font-size: 21px; letter-spacing: -0.015em;
  font-weight: 600;
}
.feature .k {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--gold-deep);
  letter-spacing: 0.12em; text-transform: uppercase; padding-top: 5px;
}
.feature p { color: var(--ink-soft); max-width: 44em; }

/* ---------- pricing ---------- */
.plans {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px;
  align-items: stretch; max-width: 780px;
}
.plan {
  background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); padding: 30px 28px;
  display: flex; flex-direction: column; gap: 18px;
}
.plan.featured {
  border-color: var(--gold);
  box-shadow: 0 18px 50px -28px rgba(184, 134, 47, 0.55);
  position: relative;
}
.plan.featured::before {
  content: "Most useful";
  position: absolute; top: -12px; left: 26px;
  background: var(--gold); color: #fff;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 4px 12px; border-radius: 999px;
}
.plan .name { font-family: var(--font-display); font-weight: 600; font-size: 19px; }
.plan .price { font-family: var(--font-display); font-size: 42px; font-weight: 700; letter-spacing: -0.03em; }
.plan .price small { font-family: var(--font-body); font-size: 15px; font-weight: 400; color: var(--ink-mute); letter-spacing: 0; }
.plan ul { list-style: none; display: grid; gap: 9px; flex: 1; }
.plan li { padding-left: 24px; position: relative; font-size: 15px; color: var(--ink-soft); }
.plan li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 13px; height: 7px;
  border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg);
}
.plan .btn { width: 100%; }
.pricing-note {
  margin-top: 22px; font-size: 14px; color: var(--ink-mute);
  font-family: var(--font-mono);
}

/* ---------- faq ---------- */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--rule); padding: 4px 0; }
.faq summary {
  cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 16.5px;
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--font-mono); color: var(--gold-deep);
  font-size: 20px; line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 18px; color: var(--ink-soft); max-width: 46em; }

/* ---------- final cta ---------- */
.cta-final { text-align: center; padding: 90px 0; }
.cta-final h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.02em; margin-bottom: 14px;
}
.cta-final p { color: var(--ink-soft); margin-bottom: 30px; }

/* ---------- footer ---------- */
.site-foot {
  background: var(--ink); color: #b9b3aa; padding: 44px 0 36px;
}
.site-foot .wrap {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  align-items: center;
}
.site-foot img { height: 30px; border-radius: 7px; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a { text-decoration: none; font-size: 14px; transition: color 120ms ease; }
.foot-links a:hover { color: var(--paper); }
.foot-legal { font-family: var(--font-mono); font-size: 12.5px; width: 100%; margin-top: 18px; }

/* ---------- status pages & legal ---------- */
.status-page { min-height: 62vh; display: grid; place-items: center; padding: 80px 24px; }
.status-card {
  max-width: 520px; text-align: center; background: var(--card);
  border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 48px 40px;
}
.status-card .mark { font-size: 46px; margin-bottom: 14px; }
.status-card h1 { font-family: var(--font-display); font-size: 30px; letter-spacing: -0.02em; margin-bottom: 10px; }
.status-card p { color: var(--ink-soft); margin-bottom: 26px; }

.legal { max-width: 760px; padding: 64px 24px; margin: 0 auto; }
.legal h1 { font-family: var(--font-display); font-size: 34px; margin-bottom: 8px; letter-spacing: -0.02em; }
.legal .updated { font-family: var(--font-mono); font-size: 13px; color: var(--ink-mute); margin-bottom: 34px; }
.legal h2 { font-family: var(--font-display); font-size: 21px; margin: 30px 0 10px; }
.legal p, .legal li { color: var(--ink-soft); font-size: 16px; }
.legal ul { padding-left: 22px; margin: 10px 0; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .plans { grid-template-columns: 1fr; max-width: 460px; }
  .feature { grid-template-columns: 1fr; gap: 8px; }
  .nav a:not(.btn) { display: none; }
}
