/* Lee Bott — leebott.ca */
:root {
  --bg: #FAF7F2;
  --bg-alt: #F1EBE0;
  --text: #2B2A28;
  --text-muted: #5E5A53;
  --accent: #9C4F2B;
  --accent-dark: #7E3F22;
  --green: #5F7350;
  --line: #DED5C6;
  --white: #FFFFFF;
  --max: 1120px;
  --measure: 68ch;
  --radius: 8px;
  --s1: .5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2.5rem; --s5: 4rem; --s6: 6rem;
  --font-body: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 1.125rem; line-height: 1.65; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; margin: 0 0 var(--s2); text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 7vw, 5rem); letter-spacing: .01em; }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 var(--s2); max-width: var(--measure); text-wrap: pretty; }
.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.section { padding: var(--s5) 0; }
@media (min-width: 768px) { .section { padding: var(--s6) 0; } }
.eyebrow { display: block; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: var(--s1); }
.alt { background: var(--bg-alt); }
.skip { position: absolute; left: var(--s2); top: -4rem; background: var(--text); color: var(--white); padding: .6rem 1rem; border-radius: var(--radius); z-index: 200; }
.skip:focus { top: var(--s2); }

/* Header / nav */
.header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 4.25rem; gap: var(--s2); }
.brand { font-family: var(--font-display); font-size: 1.35rem; color: var(--text); text-decoration: none; display: flex; align-items: baseline; gap: .6rem; }
.brand small { font-family: var(--font-body); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.nav-toggle { display: inline-flex; align-items: center; gap: .5rem; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .9rem; min-height: 44px; font: inherit; font-size: 1rem; color: var(--text); cursor: pointer; }
.nav-toggle .bars { width: 20px; height: 2px; background: currentColor; position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor; }
.nav-toggle .bars::before { top: -6px; } .nav-toggle .bars::after { top: 6px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a { display: block; padding: .5rem .75rem; min-height: 44px; display: flex; align-items: center; color: var(--text); text-decoration: none; font-weight: 600; font-size: 1rem; border-radius: var(--radius); }
.nav a:hover { background: var(--bg-alt); color: var(--accent-dark); }
.nav a.is-tax { color: var(--accent); }
@media (max-width: 1023px) {
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); padding: var(--s2) 0 var(--s3); display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
  .nav a { font-size: 1.15rem; }
}
@media (min-width: 1024px) { .nav-toggle { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .75rem 1.5rem; border-radius: var(--radius); font-weight: 600; font-size: 1.05rem; text-decoration: none; border: 2px solid transparent; transition: background .15s, color .15s; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--white); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--text); }
.btn-secondary:hover { background: var(--text); color: var(--bg); }
.btn-group { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }

/* Hero */
.hero { padding: var(--s4) 0 var(--s5); position: relative; }
.hero .wrap { display: grid; gap: var(--s4); align-items: center; }
@media (min-width: 768px) { .hero .wrap { grid-template-columns: 1.1fr .9fr; gap: var(--s5); } .hero { padding: var(--s5) 0 var(--s6); } }
.hero-kicker { font-size: 1rem; letter-spacing: .14em; text-transform: uppercase; color: var(--green); font-weight: 600; margin-bottom: var(--s2); display: block; }
.hero-tagline { font-family: var(--font-display); font-size: clamp(1.4rem, 2.4vw, 1.75rem); font-style: italic; color: var(--text-muted); max-width: 30ch; }
.hero-photo { border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); aspect-ratio: 900 / 924; max-width: 460px; margin-inline: auto; width: 100%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.field-lines { display: block; width: 100%; height: 40px; color: var(--line); margin-top: var(--s4); }

/* Prose grid */
.two-col { display: grid; gap: var(--s4); }
@media (min-width: 1024px) { .two-col { grid-template-columns: 1fr 2fr; } }
.lead { font-size: 1.3rem; line-height: 1.5; }
.pull { border-top: 2px solid var(--green); padding-top: var(--s2); color: var(--text-muted); font-family: var(--font-display); font-size: 1.3rem; font-style: italic; max-width: 26ch; }

/* Notes */
.note { font-size: .95rem; color: var(--text-muted); border-left: 0; background: var(--bg-alt); padding: var(--s2) var(--s3); border-radius: var(--radius); max-width: none; }
.alt .note { background: var(--white); }

/* Tax */
.stat-grid { display: grid; gap: var(--s3); margin: var(--s4) 0; }
@media (min-width: 768px) { .stat-grid { grid-template-columns: 3fr 2fr; } }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3) var(--s3); display: flex; flex-direction: column; gap: var(--s1); }
.stat-big { font-family: var(--font-display); font-size: clamp(1.9rem, 4.5vw, 3.2rem); line-height: 1.1; color: var(--text); }
.stat-big .arrow { color: var(--accent); margin: 0 .2em; }
.stat-big strong { color: var(--accent); font-weight: 500; }
.stat-label { font-size: .95rem; color: var(--text-muted); max-width: none; margin: 0; }
.stat-src { font-size: .9rem; margin: 0; }
.stat-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.stat-pair .stat-big { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.facts { list-style: none; padding: 0; margin: var(--s3) 0; display: grid; gap: var(--s2); }
@media (min-width: 768px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.facts li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s2) var(--s3); font-size: 1rem; }
.facts li b { display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; }
.facts li a { font-size: .9rem; }
.chart-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3); margin: var(--s4) 0; }
.chart-wrap svg { width: 100%; height: auto; display: block; }
.chart-title { font-weight: 600; margin: 0 0 var(--s1); font-size: 1.05rem; }
.chart-cap { font-size: .9rem; color: var(--text-muted); margin: var(--s1) 0 0; max-width: none; }
.table-wrap { overflow-x: auto; margin: var(--s3) 0; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: 1rem; min-width: 640px; }
caption { text-align: left; padding: var(--s2) var(--s3); font-weight: 600; caption-side: top; }
th, td { padding: .85rem var(--s3); text-align: right; border-top: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
thead th { font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; white-space: normal; }
tbody tr:last-child td { font-weight: 600; background: var(--bg-alt); }
.method { font-size: .95rem; color: var(--text-muted); }
details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); margin: var(--s3) 0; }
summary { padding: var(--s2) var(--s3); cursor: pointer; font-weight: 600; min-height: 44px; }
details ul { margin: 0; padding: 0 var(--s3) var(--s3) var(--s3); list-style: none; display: grid; gap: .5rem; }
details a { word-break: break-word; }

/* Source links */
.src-list { list-style: none; padding: 0; margin: var(--s3) 0 0; display: grid; gap: var(--s2); }
@media (min-width: 768px) { .src-list { grid-template-columns: repeat(2, 1fr); } }
.src-list a { display: flex; flex-direction: column; gap: .2rem; padding: var(--s2) var(--s3); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); min-height: 44px; }
.src-list a:hover { border-color: var(--accent); }
.src-list a span { font-size: .85rem; color: var(--text-muted); word-break: break-all; }
.src-list a strong { color: var(--accent); font-weight: 600; }

/* Priorities */
.cards { display: grid; gap: var(--s3); margin-top: var(--s3); }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3); }
.card h3 { margin-bottom: var(--s1); }
.card p { margin: 0; }
.card a { display: inline-block; margin-top: var(--s2); font-weight: 600; }
.card.first { border-top: 4px solid var(--accent); }

/* Why */
.why .wrap { max-width: 44rem; }
.why p { font-size: 1.3rem; }
.sig { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-top: var(--s3); }

/* Contact */
.contact-grid { display: grid; gap: var(--s4); }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); font-size: 1.1rem; }
.contact-list span { display: block; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
.placeholder { font-family: ui-monospace, monospace; background: var(--bg-alt); padding: .15em .4em; border-radius: 4px; }
form { display: grid; gap: var(--s2); }
label { font-weight: 600; font-size: 1rem; display: grid; gap: .35rem; }
input, textarea { font: inherit; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--text); width: 100%; min-height: 48px; }
textarea { min-height: 8rem; resize: vertical; }
.form-status { font-size: .95rem; color: var(--text-muted); min-height: 1.5em; margin: 0; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: var(--s4) 0; font-size: 1rem; color: var(--text-muted); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: space-between; align-items: flex-start; }
.footer strong { color: var(--text); font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; display: block; }
.footer p { margin: 0; }
.footer a { color: var(--text-muted); }
.disclaimer { font-style: italic; }

/* Multi-page additions */
.nav a[aria-current="page"] { background: var(--bg-alt); color: var(--accent-dark); }
.footer-links { margin-top: var(--s2); font-size: .9rem; }
.legal { max-width: 44rem; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
.legal h2 { font-size: 1.45rem; margin-top: var(--s4); }
.page-title { font-size: clamp(2rem, 4vw, 2.75rem); }
