/* ClearLedger storefront
   Navy, cream, and gold, with Fraunces and Albert Sans — the same system as the workbooks.
   No build step. Edit js/checkout.js to swap payment links. */

:root {
  --navy: #1b365d;
  --navy-deep: #142a4a;
  --navy-soft: #243e68;
  --gold: #c4a35a;
  --gold-hover: #d4b56e;
  --gold-soft: #f4ebd6;
  --cream: #f6f1e7;
  --cream-deep: #efe8d8;
  --ink: #1c1c1c;
  --slate: #5c5a56;
  --muted: #8a8680;
  --line: #e8e4db;
  --white: #ffffff;
  --forest: #2f6b4f;
  --alert: #b5483a;
  --spine: 10px;
  --header-h: 4.25rem;
  --max: 70rem;
  --narrow: 40rem;
  --radius: 1.15rem;
  --radius-sm: 0.7rem;
  --sans: "Albert Sans", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --shadow: 0 1px 0 rgba(27, 54, 93, 0.04), 0 22px 44px -28px rgba(27, 54, 93, 0.4);
  --focus: 0 0 0 3px var(--cream), 0 0 0 5px var(--gold);
}

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces-Regular.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Albert Sans";
  src: url("../fonts/AlbertSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Albert Sans";
  src: url("../fonts/AlbertSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Albert Sans";
  src: url("../fonts/AlbertSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Albert Sans";
  src: url("../fonts/AlbertSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 0 0 var(--spine);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--spine);
  background: var(--gold);
  z-index: 80;
  pointer-events: none;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
a:hover { color: var(--navy-soft); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: var(--spine);
  top: -3rem;
  z-index: 100;
  background: var(--gold);
  color: var(--navy-deep);
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  text-decoration: none;
  border-radius: 0 0 0.4rem 0;
}
.skip:focus { top: 0; }

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  color: var(--cream);
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(196, 163, 90, 0.22);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: min(var(--max), calc(100% - 2.5rem));
}

.brand {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  position: relative;
  padding-bottom: 0.4rem;
  flex-shrink: 0;
}
.brand:hover { color: var(--gold-hover); }
.brand::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 5.6rem;
  height: 2px;
  background: var(--gold);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.35rem;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav a {
  color: var(--cream);
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--white);
  border-bottom-color: var(--gold);
}

/* ----- Hero ----- */
.hero {
  background:
    linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 55%, #1a3358 100%);
  color: var(--cream);
  padding: 4.25rem 0 4.5rem;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.15rem;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.6vw, 4.15rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--white);
  margin: 0 0 1.25rem;
  max-width: 14ch;
}

.hero__lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  color: #e4ddd0;
  max-width: 38rem;
  margin: 0 0 1.9rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 0.9rem;
  margin-bottom: 2.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.78rem 1.35rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn--gold {
  background: var(--gold);
  color: var(--navy-deep);
  border-color: var(--gold);
}
.btn--gold:hover {
  background: var(--gold-hover);
  color: var(--navy-deep);
  border-color: var(--gold-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(246, 241, 231, 0.35);
}
.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--white);
}

.btn--block { width: 100%; }

.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(196, 163, 90, 0.28);
  margin: 0;
  max-width: 52rem;
  list-style: none;
}
.hero__facts li {
  font-size: 0.92rem;
  color: #d9d1c3;
  line-height: 1.45;
  padding-left: 0;
}
.hero__facts strong {
  display: block;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.hero__disclaimer {
  margin: 1.75rem 0 0;
  font-size: 0.88rem;
  color: #d0c8ba;
  max-width: 40rem;
}

/* ----- Sections ----- */
.section { padding: 4.25rem 0 4.5rem; }
.section--cream { background: var(--cream); }
.section--white { background: var(--white); }

#templates, #faq, #contact, #income, #debt, #job {
  scroll-margin-top: calc(var(--header-h) + 0.85rem);
}

.section__kicker {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9a7d36;
}

.section__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0 0 0.7rem;
  line-height: 1.15;
}

.section__intro {
  margin: 0 0 2.4rem;
  color: var(--slate);
  max-width: 40rem;
}

/* ----- Product grid ----- */
.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  min-width: 0;
}

.card__media {
  background: var(--navy-deep);
  aspect-ratio: 1;
  overflow: hidden;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  padding: 1.35rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.card__format {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.card__price {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0 0 0.65rem;
}

.card__desc {
  margin: 0 0 1rem;
  color: var(--slate);
  font-size: 0.98rem;
  flex: 0 0 auto;
}

.card__includes {
  margin: 0 0 1.05rem;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--ink);
}
.card__includes li {
  position: relative;
  padding: 0.18rem 0 0.18rem 1.05rem;
}
.card__includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.5rem;
  height: 1.5px;
  background: var(--gold);
}

.card__note {
  margin: 0 0 1.15rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.card__cta { margin-top: auto; }

.checkout-note {
  margin: 0.6rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  text-align: center;
}

/* ----- FAQ ----- */
.faq {
  max-width: 44rem;
  padding-bottom: 0.25rem;
}

details.faq-item {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}
details.faq-item:last-of-type { border-bottom: 1px solid var(--line); }

.faq-item summary {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  line-height: 1.35;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--gold);
  width: 1.25rem;
  text-align: center;
}
.faq-item[open] summary::after { content: "\2013"; }
.faq-item .faq-item__body {
  margin: 0.7rem 0 0.25rem;
  color: var(--slate);
  max-width: 60ch;
}
.faq-item .faq-item__body p { margin: 0 0 0.7rem; }
.faq-item .faq-item__body p:last-child { margin-bottom: 0; }
.faq-item a { color: var(--navy); font-weight: 500; }

/* ----- Contact band ----- */
.contact-band {
  background: var(--navy);
  color: var(--cream);
  padding: 3.25rem 0;
}
.contact-band h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  color: var(--white);
  margin: 0 0 0.6rem;
}
.contact-band p {
  margin: 0 0 1rem;
  color: #d9d1c3;
  max-width: 36rem;
}
.contact-band a.email {
  color: #e0c57a;
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(224, 197, 122, 0.55);
}
.contact-band a.email:hover {
  color: #f0d789;
  border-bottom-color: #f0d789;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--navy-deep);
  color: #b7b0a4;
  padding: 1.75rem 0;
  font-size: 0.88rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1.5rem;
}
.site-footer .brand {
  color: var(--gold);
  font-size: 0.7rem;
  padding-bottom: 0.35rem;
}
.site-footer .brand::after { width: 4.8rem; height: 1.5px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.15rem;
}
.footer-links a {
  color: #d9d1c3;
  text-decoration: none;
}
.footer-links a:hover { color: var(--white); }
.site-footer small { color: #8e887c; }

/* ----- Legal / inner pages ----- */
.page-hero {
  background: var(--navy);
  color: var(--cream);
  padding: 2.5rem 0 2.25rem;
}
.page-hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--white);
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
  line-height: 1.15;
}
.page-hero p {
  margin: 0;
  color: #c9c2b6;
  font-size: 0.95rem;
}

.legal {
  width: min(var(--narrow), calc(100% - 2.5rem));
  margin: 2.75rem auto 4.5rem;
  color: var(--ink);
}
.legal h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--navy);
  margin: 2rem 0 0.55rem;
  letter-spacing: -0.015em;
}
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--slate); }
.legal p { margin: 0 0 0.9rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.legal li { margin: 0.25rem 0; }
.legal a { font-weight: 500; }

/* 404 */
.empty {
  text-align: left;
  padding: 5rem 0 6rem;
  width: min(var(--narrow), calc(100% - 2.5rem));
  margin-inline: auto;
}
.empty h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: var(--navy);
  margin: 0 0 0.7rem;
}
.empty p { color: var(--slate); margin: 0 0 1.5rem; }

/* ----- Responsive ----- */
@media (max-width: 64rem) {
  .products {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }
  .card {
    display: grid;
    grid-template-columns: minmax(14rem, 38%) 1fr;
  }
  .card__media {
    aspect-ratio: auto;
    min-height: 100%;
  }
  .card__media img {
    height: 100%;
    object-fit: cover;
  }
}

@media (max-width: 40rem) {
  :root { --spine: 6px; }
  body { padding-left: var(--spine); }
  .wrap,
  .site-header .wrap,
  .legal,
  .empty { width: min(var(--max), calc(100% - 1.5rem)); }
  .hero { padding: 2.75rem 0 3rem; }
  .hero h1 { max-width: none; }
  .hero__facts { grid-template-columns: 1fr; gap: 1rem; }
  .section { padding: 3rem 0 3.25rem; }
  .card {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
  }
  .card__media { aspect-ratio: 1; }
  .nav { gap: 0.25rem 0.9rem; font-size: 0.85rem; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
