/* ============================================================
   Arbour Advisory — design system
   "Field ledger": warm paper, forest ink, chainsaw-orange accent.
   Fraunces (display serif) + Archivo (text sans), self-hosted.
   ============================================================ */

@font-face {
  font-family: 'Fraunces';
  src: url('/static/fonts/fraunces-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/static/fonts/archivo-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/static/fonts/archivo-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f6f3ea;
  --paper-deep: #eee9da;
  --card: #fffdf6;
  --ink: #1c2b21;
  --ink-soft: #44544a;
  --forest: #1e4d36;
  --forest-deep: #12281c;
  --moss: #5d7a63;
  --accent: #d4571a;
  --accent-deep: #b04512;
  --gold: #c2953a;
  --line: #ddd5c0;
  --line-soft: #e8e2d2;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --shadow: 0 1px 2px rgba(28,43,33,.05), 0 8px 28px -12px rgba(28,43,33,.18);
  --shadow-lift: 0 2px 4px rgba(28,43,33,.06), 0 18px 44px -16px rgba(28,43,33,.28);
  --radius: 12px;
  --w-wide: 1160px;
  --w-text: 740px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-variation-settings: 'wdth' 100;
  text-rendering: optimizeLegibility;
}
/* faint paper grain */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(28,43,33,.028) 1px, transparent 1px);
  background-size: 22px 22px;
}
body > * { position: relative; z-index: 1; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-variation-settings: 'opsz' 72;
  color: var(--forest-deep);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 640; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 600; margin-top: 2.2em; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); font-weight: 600; margin-top: 1.8em; }
h4 { font-size: 1.1rem; margin-top: 1.5em; }
p { margin: 0 0 1.15em; }
a { color: var(--forest); text-decoration-color: color-mix(in srgb, var(--forest) 34%, transparent); text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--accent-deep); text-decoration-color: currentColor; }
strong { color: var(--forest-deep); }
img { max-width: 100%; height: auto; border-radius: var(--radius); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
::selection { background: color-mix(in srgb, var(--accent) 26%, transparent); }

.tac { text-align: center; }

/* ---------- layout ---------- */
.wrap { max-width: var(--w-wide); margin: 0 auto; padding: 0 clamp(18px, 4vw, 36px); }
.wrap-text { max-width: var(--w-text); margin: 0 auto; padding: 0 clamp(18px, 4vw, 36px); }

/* section label — field-guide index style */
.sec-label {
  display: flex; align-items: center; gap: 12px;
  font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 1.1rem;
}
.sec-label::after { content: ''; height: 1px; flex: 0 0 56px; background: var(--accent); opacity: .5; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-inner { display: flex; align-items: center; gap: 26px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; color: var(--forest-deep); }
.brand-mark { width: 38px; height: 38px; color: var(--forest); flex: 0 0 auto; }
.brand-name { font-family: var(--serif); font-size: 1.32rem; font-weight: 640; letter-spacing: -0.01em; color: var(--forest-deep); white-space: nowrap; }
.foot-wordmark .brand-mark { color: var(--gold); }
.foot-wordmark .brand-name { color: #f5f3e8; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav > .nav-item { position: relative; }
.nav a.nav-link, .nav button.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  font: inherit; font-size: .95rem; font-weight: 550; color: var(--ink);
  background: none; border: 0; cursor: pointer;
  padding: 9px 13px; border-radius: 8px; text-decoration: none;
}
.nav a.nav-link:hover, .nav button.nav-link:hover,
.nav .nav-item:focus-within > .nav-link { background: var(--paper-deep); color: var(--forest-deep); }
.nav .caret { width: 9px; height: 9px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .55; }
.dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 258px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lift); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s, transform .16s, visibility .16s;
}
.nav-item:hover > .dropdown, .nav-item:focus-within > .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown a {
  display: block; padding: 8px 12px; border-radius: 8px;
  font-size: .93rem; font-weight: 500; color: var(--ink); text-decoration: none; line-height: 1.35;
}
.dropdown a:hover { background: var(--paper-deep); color: var(--forest-deep); }
.dropdown .dd-group { padding: 10px 12px 4px; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--moss); }
.dropdown hr { margin: 6px 4px; border-top: 1px solid var(--line-soft); }

.btn {
  display: inline-block; background: var(--accent); color: #fff !important;
  font-weight: 640; font-size: .98rem; letter-spacing: .01em;
  padding: 12px 22px; border-radius: 10px; border: 0; cursor: pointer;
  text-decoration: none !important; box-shadow: 0 6px 18px -8px rgba(212,87,26,.65);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: var(--accent-deep); transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(176,69,18,.6); }
.btn.btn-ghost { background: transparent; color: var(--forest-deep) !important; box-shadow: none; border: 1.5px solid var(--forest); }
.btn.btn-ghost:hover { background: var(--forest); color: #fff !important; }
.btn.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
.btn-row, .btn-wrap { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.4rem 0; }
.head-cta { white-space: nowrap; }

.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-burger span { display: block; width: 24px; height: 2.2px; border-radius: 2px; background: var(--forest-deep); margin: 5px 0; transition: transform .2s, opacity .2s; }

@media (max-width: 1023px) {
  /* backdrop-filter would make the header the containing block for the
     fixed-position mobile nav — keep the header opaque instead */
  .site-head { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-burger { display: block; }
  .nav {
    display: none; position: fixed; inset: 72px 0 0 0; z-index: 55;
    background: var(--paper); overflow-y: auto; padding: 14px 18px 48px;
    flex-direction: column; align-items: stretch; gap: 0;
  }
  .nav.open { display: flex; }
  .nav .nav-item { border-bottom: 1px solid var(--line-soft); }
  .nav a.nav-link, .nav button.nav-link { width: 100%; justify-content: space-between; padding: 14px 6px; font-size: 1.05rem; }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 10px 10px; display: none; }
  .nav-item.open > .dropdown { display: block; }
  body.nav-locked { overflow: hidden; }
  .head-cta { display: none; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--forest-deep); color: #eef0e6; }
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .3;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(194,149,58,.34), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(30,77,54,.9), transparent 55%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(48px, 8vw, 96px) 0; }
.hero h1 { color: #f8f6ec; font-size: clamp(2.3rem, 5vw, 3.7rem); font-weight: 620; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero .lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: #cfd8c8; max-width: 56ch; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 1.6rem; font-size: .84rem; font-weight: 600; letter-spacing: .04em; color: #b9c7b4; }
.hero-badges span { display: inline-flex; align-items: center; gap: 7px; }
.hero-badges span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.hero-media { position: relative; }
.hero-media img { width: 100%; border-radius: 16px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); }
/* tree-ring decoration */
.rings { position: absolute; width: 220px; height: 220px; right: -60px; bottom: -60px; opacity: .5; pointer-events: none; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-media { order: -1; } }

/* page hero (interior pages) */
.page-hero { background: linear-gradient(180deg, var(--paper-deep), var(--paper)); border-bottom: 1px solid var(--line); padding: clamp(34px, 6vw, 64px) 0 clamp(26px, 4vw, 44px); }
.page-hero h1 { margin-bottom: .35em; }
.page-hero .lede { font-size: 1.14rem; color: var(--ink-soft); max-width: 62ch; margin: 0; }
.crumbs { font-size: .82rem; font-weight: 600; letter-spacing: .05em; color: var(--moss); margin-bottom: 1rem; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--accent-deep); }
.crumbs .sep { margin: 0 7px; opacity: .5; }

/* ---------- sections ---------- */
.section { padding: clamp(44px, 7vw, 84px) 0; }
.section.alt { background: var(--paper-deep); border-block: 1px solid var(--line-soft); }
.section.dark { background: var(--forest-deep); color: #dfe5d5; }
.section.dark h2, .section.dark h3 { color: #f5f3e8; }
.section-intro { max-width: 62ch; color: var(--ink-soft); font-size: 1.1rem; margin-bottom: 2.2rem; }
.section.dark .section-intro { color: #b9c7b4; }

/* card grids */
.grid { display: grid; gap: 18px; }
.grid.g2 { grid-template-columns: repeat(2, 1fr); }
.grid.g3 { grid-template-columns: repeat(3, 1fr); }
.grid.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid.g3, .grid.g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid.g2, .grid.g3, .grid.g4 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card h3 { margin-top: 0; font-size: 1.28rem; }
.card p { color: var(--ink-soft); font-size: .98rem; flex: 1; }
.card .card-link { font-weight: 650; font-size: .95rem; text-decoration: none; color: var(--accent-deep); }
.card .card-link::after { content: ' →'; transition: margin-left .15s; }
.card:hover .card-link::after { margin-left: 4px; }
.card-index { font-family: var(--serif); font-size: .95rem; font-weight: 600; color: var(--gold); letter-spacing: .06em; margin-bottom: 10px; }

/* checklist */
ul.checklist { list-style: none; padding: 0; margin: 1.2rem 0; }
ul.checklist li { position: relative; padding: 6px 0 6px 34px; }
ul.checklist li::before {
  content: ''; position: absolute; left: 0; top: 11px; width: 20px; height: 20px;
  border-radius: 50%; background: color-mix(in srgb, var(--forest) 14%, transparent);
}
ul.checklist li::after {
  content: ''; position: absolute; left: 6px; top: 16px; width: 8px; height: 5px;
  border-left: 2.2px solid var(--forest); border-bottom: 2.2px solid var(--forest);
  transform: rotate(-45deg);
}
.section.dark ul.checklist li::before { background: rgba(194,149,58,.2); }
.section.dark ul.checklist li::after { border-color: var(--gold); }

/* ---------- article ---------- */
.article-shell { display: grid; grid-template-columns: minmax(0, 1fr) 264px; gap: clamp(28px, 4vw, 56px); align-items: start; padding: clamp(34px, 5vw, 56px) 0 72px; }
.article-shell.no-toc { grid-template-columns: minmax(0, 1fr); max-width: calc(var(--w-text) + 72px); margin: 0 auto; }
.article-body { max-width: var(--w-text); min-width: 0; }
.toc { position: sticky; top: 96px; border-left: 2px solid var(--line); padding-left: 18px; font-size: .9rem; }
.toc-title { font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--moss); margin-bottom: .8rem; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0 0 .55rem; line-height: 1.45; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover, .toc a.active { color: var(--accent-deep); }
@media (max-width: 1000px) { .article-shell { grid-template-columns: 1fr; } .toc { display: none; } }

.byline { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .88rem; color: var(--moss); border-bottom: 1px solid var(--line); padding-bottom: 1.1rem; margin-bottom: 1.8rem; }
.byline strong { color: var(--forest-deep); }

.article-body table, .table-scroll table, .content table { border-collapse: collapse; width: 100%; margin: 1.6rem 0; font-size: .94rem; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table-scroll { overflow-x: auto; margin: 1.6rem 0; border-radius: var(--radius); }
.table-scroll table { margin: 0; }
th { background: var(--forest); color: #f2f4ea; text-align: left; font-weight: 640; padding: 11px 14px; font-size: .88rem; letter-spacing: .02em; }
td { padding: 10px 14px; border-top: 1px solid var(--line-soft); vertical-align: top; }
tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--paper-deep) 55%, var(--card)); }

blockquote { margin: 1.8rem 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--gold); font-family: var(--serif); font-size: 1.12rem; font-style: italic; color: var(--ink-soft); }

.panel {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 10px; padding: 18px 22px; margin: 1.6rem 0; box-shadow: var(--shadow);
}
p.panel { color: var(--ink); }

/* FAQ */
details.faq { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin: 0 0 10px; box-shadow: var(--shadow); overflow: hidden; }
details.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 20px; font-weight: 640; color: var(--forest-deep); font-size: 1.02rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: ''; flex: 0 0 auto; width: 10px; height: 10px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg); transition: transform .2s; margin-top: -4px;
}
details.faq[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
details.faq .faq-a { padding: 0 20px 16px; color: var(--ink-soft); }
details.faq .faq-a p:last-child { margin-bottom: 0; }

/* CTA + author blocks from articles */
.cta-block {
  background: var(--forest-deep); color: #e8ecdd; border-radius: var(--radius);
  padding: 28px 30px; margin: 2.2rem 0; box-shadow: var(--shadow-lift);
  background-image: radial-gradient(600px 300px at 110% -30%, rgba(194,149,58,.28), transparent 60%);
}
.cta-block h3, .cta-block h4, .cta-block strong { color: #f8f6ec; margin-top: 0; }
.cta-block a:not(.btn) { color: var(--gold); }
.cta-block p:last-child { margin-bottom: 0; }
.author-box {
  display: block; background: var(--paper-deep); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; margin: 2.4rem 0 0; font-size: .95rem; color: var(--ink-soft);
}
.author-box strong { color: var(--forest-deep); }
.related-link { background: var(--paper-deep); border-radius: 10px; padding: 12px 18px; font-size: .95rem; }

/* ---------- blog cards ---------- */
.post-card { text-decoration: none; color: inherit; }
.post-card .card { height: 100%; }
.post-card .post-date { font-size: .8rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.post-card h3 { font-size: 1.16rem; line-height: 1.3; }

/* ---------- forms ---------- */
form { margin: 1.2rem 0; }
label { display: block; font-size: .88rem; font-weight: 650; color: var(--forest-deep); margin: 0 0 5px; }
input[type=text], input[type=email], input[type=tel], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 9px;
  padding: 11px 13px; margin-bottom: 14px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px color-mix(in srgb, var(--forest) 16%, transparent); }
textarea { min-height: 120px; resize: vertical; }
button[type=submit] { font: inherit; }
.form-note { font-size: .85rem; color: var(--moss); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.form-status { font-weight: 650; margin-top: 6px; }
.form-status.ok { color: var(--forest); }
.form-status.err { color: var(--accent-deep); }

/* ---------- testimonials ---------- */
.quote-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.quote-card p { font-family: var(--serif); font-size: 1.06rem; font-style: italic; color: var(--ink); }
.quote-card cite { display: block; font-style: normal; font-size: .88rem; font-weight: 650; color: var(--moss); margin-top: 10px; }

/* ---------- footer ---------- */
.site-foot { background: var(--forest-deep); color: #b9c7b4; margin-top: 72px; position: relative; overflow: hidden; }
.site-foot::before {
  content: ''; position: absolute; right: -140px; top: -140px; width: 480px; height: 480px; opacity: .1;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at center, transparent 0 14px, #c2953a 14px 15.5px);
}
.foot-grid { position: relative; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding: 56px 0 40px; }
.site-foot h4 { color: #f5f3e8; font-family: var(--sans); font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 14px; }
.site-foot a { color: #cfd8c8; text-decoration: none; }
.site-foot a:hover { color: var(--gold); }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 9px; font-size: .93rem; }
.foot-brand img { height: 46px; filter: brightness(0) invert(1); opacity: .92; }
.foot-brand p { font-size: .93rem; margin-top: 14px; max-width: 34ch; }
.foot-legal { position: relative; border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0 26px; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: .84rem; justify-content: space-between; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- misc ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--forest-deep); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

.designed-page :is(h1,h2,h3) { font-family: var(--serif); }
.contained-page { max-width: 900px; margin: 0 auto; padding: clamp(30px, 5vw, 56px) 0 72px; }

/* content column fallback grids from converted pages */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin: 1.6rem 0; }
.col > :first-child { margin-top: 0; }

/* print */
@media print { .site-head, .site-foot, .toc, .cta-block { display: none; } }
