/* ManaWorth: shared styles for manaworth.com and getmanaworth.com.
   Tokens match the ManaWorth design system (parchment, vault, brass). */

@font-face { font-family: "Libre Caslon Text"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/caslon-700.woff2") format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/caslon-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/plex-mono-500.woff2") format("woff2"); }

:root {
  --surface: #F4EFE4;
  --surface-raised: #FFFDF8;
  --ink: #1B2233;
  --muted: #5B6472;
  --hairline: #D8CFBD;
  --vault: #14213D;
  --brass: #B8892B;
  --oxblood: #7A2E2A;
  --verified: #2F6B4F;
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius-sm: 2px; --radius-md: 4px; --radius-lg: 8px;
  --wrap: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--ink); font: 400 16px/24px var(--sans); }
img, svg { display: block; max-width: 100%; }
a { color: var(--vault); text-decoration-color: var(--brass); text-underline-offset: 3px; }
a:hover { color: var(--oxblood); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0 0 16px; text-wrap: balance; }
h1 { font-size: 36px; line-height: 42px; }
h2 { font-size: 24px; line-height: 30px; }
h3 { font-size: 18px; line-height: 24px; }
p { margin: 0 0 16px; }
.display { font-size: clamp(36px, 6vw, 56px); line-height: 1.07; }
.mono, .figure { font-family: var(--mono); font-weight: 500; }
.label { font: 600 12px/16px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.caption { font-size: 13px; line-height: 18px; color: var(--muted); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface-raised); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { background: var(--vault); color: var(--surface); border-bottom: 3px solid var(--brass); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--surface); text-decoration: none; }
.brand:hover { color: var(--surface); }
.brand-name { font: 700 24px/1 var(--serif); }
.nav { display: flex; gap: 24px; flex-wrap: wrap; }
.nav a { color: var(--surface); text-decoration: none; font-weight: 600; font-size: 14px; letter-spacing: .02em; padding: 4px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--brass); border-bottom-color: var(--brass); }

/* Hero band */
.hero { background: var(--vault); color: var(--surface); padding: 64px 0 72px; }
.hero h1 { color: var(--surface); }
.hero .lede { font-size: 18px; line-height: 28px; max-width: 640px; color: #DCD5C6; }
.hero .label { color: var(--brass); }
.hero .rule { height: 1px; background: rgba(216,207,189,.35); margin: 24px 0; max-width: 640px; }

section { padding: 56px 0; }
section + section { border-top: 1px solid var(--hairline); }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 16px/1 var(--sans); padding: 14px 20px; border-radius: var(--radius-md); border: 1px solid transparent; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--oxblood); color: var(--surface); }
.btn-primary:hover { background: #63241f; color: var(--surface); }
.btn-vault { background: var(--vault); color: var(--surface); }
.btn-vault:hover { background: #0d172c; color: var(--surface); }
.btn-ghost { background: transparent; color: var(--surface); border-color: rgba(244,239,228,.5); }
.btn-ghost:hover { border-color: var(--brass); color: var(--brass); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.signup { background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 24px; }
.signup label.field-label { display: block; font-weight: 600; margin-bottom: 8px; }
.signup .row { display: flex; gap: 8px; flex-wrap: wrap; }
.signup input[type=email] { flex: 1 1 240px; font: 400 16px/24px var(--sans); padding: 11px 12px; border: 1px solid #b9ae98; border-radius: var(--radius-md); background: #fff; color: var(--ink); }
.signup input[type=email]:focus { border-color: var(--vault); outline: 2px solid var(--brass); outline-offset: 0; }
.signup .check { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 15px; }
.signup .check input { margin-top: 5px; width: 16px; height: 16px; accent-color: var(--vault); }
.signup .fine { margin: 16px 0 0; font-size: 13px; line-height: 18px; color: var(--muted); }
.signup .error { display: none; margin: 12px 0 0; color: var(--oxblood); font-weight: 600; }
.signup .error.show { display: block; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Ledger list */
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
.ledger li { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--hairline); }
.ledger .num { font-family: var(--mono); font-weight: 500; color: var(--muted); }
.ledger h3 { margin: 0 0 4px; }
.ledger p { margin: 0; color: var(--muted); }
@media (max-width: 640px) { .ledger li { grid-template-columns: 48px 1fr; } .ledger li > :last-child { grid-column: 2; } }

.check-list { list-style: none; padding: 0; margin: 0 0 24px; }
.check-list li { position: relative; padding: 0 0 12px 28px; }
.check-list li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 12px; height: 6px; border-left: 2px solid var(--verified); border-bottom: 2px solid var(--verified); transform: rotate(-45deg); }

.grid-2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 32px; } }

.panel { background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 24px; }
.panel .label { display: block; margin-bottom: 8px; }
.panel h3 { margin-bottom: 8px; }
.panel p:last-child { margin-bottom: 0; }

/* Companion cover (typographic, no card art) */
.cover { background: var(--vault); color: var(--surface); border-radius: var(--radius-lg); padding: 32px 28px; aspect-ratio: 8.5 / 11; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid #0d172c; box-shadow: 8px 8px 0 var(--hairline); max-width: 330px; margin: 0 auto; }
.cover .label { color: var(--brass); }
.cover h2 { color: var(--surface); font-size: 30px; line-height: 36px; margin: 16px 0 0; }
.cover .cover-rule { height: 1px; background: var(--brass); margin: 20px 0; }
.cover .cover-foot { display: flex; justify-content: space-between; align-items: flex-end; font-family: var(--mono); font-size: 13px; color: #DCD5C6; }
.cover .cover-foot strong { color: var(--brass); font-weight: 500; }

.badge { display: inline-block; font: 500 12px/1 var(--mono); padding: 6px 8px; border-radius: var(--radius-sm); border: 1px solid var(--hairline); color: var(--muted); background: var(--surface-raised); }
.badge.free { border-color: var(--verified); color: var(--verified); }

.notice { border-left: 3px solid var(--brass); padding: 4px 0 4px 16px; color: var(--muted); font-size: 14px; line-height: 20px; }

/* Legal / prose */
.prose { max-width: 720px; }
.prose h2 { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--hairline); font-size: 22px; }
.prose ul { padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; }
.prose th, .prose td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.prose th { font-weight: 600; }
.prose code { font-family: var(--mono); font-size: 14px; }
.effective { font-family: var(--mono); font-size: 14px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding: 40px 0 48px; margin-top: 24px; font-size: 14px; line-height: 20px; color: var(--muted); }
.site-footer .foot-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--ink); }
.site-footer p { margin: 0 0 8px; max-width: 760px; }
.site-footer .tag { font: 500 13px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.hero .signup { margin-top: 24px; color: var(--ink); }
@media (max-width: 860px) { .hide-sm { display: none; } }
