/* Frontier Haven — shared styles.
   Layout: the wood-burned sign sits on a walnut band; every page below it is a
   left heading rail beside a reading column, in the sign's sepia palette. */
:root {
  --bg: #F4ECDF;          /* parchment */
  --surface: #FBF6EE;
  --ink: #2A1D12;         /* walnut ink */
  --muted: #6A5540;
  --line: #DCCBB2;
  --wood: #4A3020;        /* walnut band */
  --on-wood: #F4E8D4;
  --on-wood-muted: #CDB797;
  --accent: #8A4B1F;      /* saddle leather, links */
  --gold: #9A6A22;        /* the sign's leaf gold */
  --display: "Zilla Slab", "Rockwell", Georgia, serif;
  --body: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #18110B; --surface: #22180F; --ink: #F0E5D3; --muted: #BEA88A; --line: #3B2C1F;
    --wood: #2E2014; --on-wood: #F4E8D4; --on-wood-muted: #C9B293;
    --accent: #E3AC6E; --gold: #D9A85A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #18110B; --surface: #22180F; --ink: #F0E5D3; --muted: #BEA88A; --line: #3B2C1F;
  --wood: #2E2014; --on-wood: #F4E8D4; --on-wood-muted: #C9B293;
  --accent: #E3AC6E; --gold: #D9A85A;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 1.125rem; line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(100% - 2 * var(--gutter), 1120px); margin-inline: auto; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 20; }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding-block: 10px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.05; }
.brand b { font-family: var(--display); font-weight: 700; font-size: 1.4rem; letter-spacing: 0.04em; text-transform: uppercase; }
.brand span { font-family: var(--display); font-weight: 500; font-size: 0.95rem; color: var(--muted); }
.top-phone { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nav { width: 100%; display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: 1rem; padding-bottom: 2px; }
.nav a { color: var(--ink); text-decoration: none; white-space: nowrap; padding-block: 4px; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--gold); font-weight: 600; }
@media (min-width: 980px) {
  .top .wrap { flex-wrap: nowrap; }
  .nav { width: auto; order: 2; flex-wrap: nowrap; }
  .top-phone { order: 3; }
}

/* Sign hero (home page) */
.sign-band { background: var(--wood); }
.sign-band .wrap { padding-block: clamp(16px, 3vw, 36px); }
.sign { width: 100%; max-width: 1040px; margin-inline: auto; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }

.intro .wrap { padding-block: clamp(36px, 6vw, 72px); display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 36px clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .intro .wrap { grid-template-columns: minmax(0, 1fr); } }
.intro-text { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.eyebrow { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
h1 { font-weight: 700; font-size: clamp(2.1rem, 5vw, 3.6rem); max-width: 18ch; }
.lede { font-size: clamp(1.15rem, 2vw, 1.3rem); max-width: 58ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; }
.btn { display: inline-block; background: var(--wood); color: var(--on-wood); border: 1px solid var(--gold); font-weight: 600; text-decoration: none; padding: 12px 22px; border-radius: 4px; }
.btn:hover { filter: brightness(1.18); }
.callline strong { font-variant-numeric: tabular-nums; }

.ledger { margin: 0; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--gold); padding: 6px 22px; }
.ledger div { display: flex; justify-content: space-between; gap: 16px; padding-block: 13px; border-bottom: 1px solid var(--line); }
.ledger div:last-child { border-bottom: 0; }
.ledger dt { color: var(--muted); font-size: 1rem; }
.ledger dd { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.15rem; text-align: right; font-variant-numeric: tabular-nums; }

/* Inner page header */
.page-head { background: var(--wood); color: var(--on-wood); }
.page-head .wrap { padding-block: clamp(36px, 6vw, 64px); display: flex; flex-direction: column; gap: 14px; }
.page-head .eyebrow { color: var(--on-wood-muted); }
.page-head h1 { max-width: 22ch; }
.page-head .lede { color: var(--on-wood-muted); }

/* Sections */
.section { border-bottom: 1px solid var(--line); }
.section .wrap { padding-block: clamp(40px, 6vw, 76px); display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 24px clamp(28px, 5vw, 72px); }
@media (max-width: 860px) { .section .wrap { grid-template-columns: minmax(0, 1fr); } }
.rail { display: flex; flex-direction: column; gap: 10px; align-self: start; }
.rail h2 { font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.15rem); }
.rail p { color: var(--muted); font-size: 1rem; }
.col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.col > p { max-width: 65ch; }

.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 26px 30px; margin: 0; padding: 0; list-style: none; }
.three li { border-top: 3px solid var(--wood); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.three h3 { font-size: 1.3rem; font-weight: 600; }
.three p { font-size: 1.0625rem; }

.checks { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 34px; }
.checks li { padding: 12px 0 12px 30px; border-bottom: 1px solid var(--line); position: relative; min-width: 0; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 1.2em; width: 12px; height: 7px; border-left: 3px solid var(--gold); border-bottom: 3px solid var(--gold); transform: rotate(-45deg); }

.note { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); padding: 18px 20px; max-width: 65ch; display: flex; flex-direction: column; gap: 8px; }
.note h3 { font-size: 1.2rem; font-weight: 600; }
.note p { font-size: 1.0625rem; }

/* Page links on the home page */
.explore { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 560px) { .explore { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .explore { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.explore a { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; text-decoration: none; color: var(--ink); min-width: 0; }
.explore a:hover { border-color: var(--gold); }
.explore b { font-family: var(--display); font-size: 1.3rem; font-weight: 600; line-height: 1.15; }
.explore span { font-size: 1rem; color: var(--muted); }
.explore i { font-style: normal; font-weight: 600; color: var(--accent); font-size: 1rem; margin-top: auto; }

/* Care scale */
.scale { display: flex; flex-direction: column; gap: 14px; }
.scale-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
@media (max-width: 640px) { .scale-levels { grid-template-columns: minmax(0, 1fr); } }
.scale-levels div { padding: 14px 16px 16px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.scale-levels div:first-child { border-left: 0; padding-left: 0; }
@media (max-width: 640px) { .scale-levels div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } }
.scale-levels h3 { font-size: 1.25rem; font-weight: 600; }
.scale-levels p { font-size: 1rem; color: var(--muted); }
.scale-bar { position: relative; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--line), var(--gold)); }
.scale-caption { display: flex; justify-content: space-between; gap: 12px; font-size: 0.9375rem; color: var(--muted); }
.scale-caption b { color: var(--ink); }

/* Staff */
.staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; }
.person { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.portrait { aspect-ratio: 4 / 5; max-width: 100%; background: var(--surface); border: 2px dashed var(--line); display: flex; align-items: flex-end; padding: 12px; font-size: 0.8125rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.person h3 { font-size: 1.35rem; font-weight: 600; }
.role { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.person p { font-size: 1.0625rem; }
.fill { color: var(--muted); font-style: italic; }

/* Photos */
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.photo { aspect-ratio: 4 / 3; max-width: 100%; border: 2px dashed var(--line); background: var(--surface); display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; gap: 2px; }
.photo b { font-size: 0.8125rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.photo span { font-size: 1rem; }
.sign-small { border-radius: 4px; border: 1px solid var(--line); }

.places { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px 30px; }
.places div { border-top: 1px solid var(--line); padding-top: 12px; min-width: 0; }
.places dt { font-family: var(--display); font-weight: 600; font-size: 1.45rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.places dd { margin: 4px 0 0; color: var(--muted); font-size: 1.0625rem; }

/* Steps */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 14px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.steps li:first-child { padding-top: 0; }
.steps li::before { content: counter(step); grid-row: span 2; font-family: var(--display); font-weight: 700; font-size: 2.4rem; line-height: 1; color: var(--gold); }
.steps h3 { font-size: 1.3rem; font-weight: 600; }
.steps p { max-width: 60ch; grid-column: 2; }

/* Payment */
.pay { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.pay > div { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--gold); padding: 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pay h3 { font-size: 1.4rem; font-weight: 600; }
.pay p { font-size: 1.0625rem; }
.tag { align-self: flex-start; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; background: var(--wood); color: var(--on-wood); padding: 3px 9px; border-radius: 3px; }

/* FAQ */
.faq { display: flex; flex-direction: column; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 17px 34px 17px 0; font-family: var(--display); font-weight: 600; font-size: 1.25rem; line-height: 1.25; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.6rem; font-weight: 500; color: var(--gold); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 20px; max-width: 65ch; }

/* Visit band + contact */
.visit { background: var(--wood); color: var(--on-wood); }
.visit .wrap { padding-block: clamp(40px, 6vw, 76px); display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px clamp(28px, 5vw, 72px); }
.visit h2 { font-weight: 700; font-size: clamp(2rem, 4.2vw, 2.9rem); max-width: 14ch; }
.visit .lead { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.visit .lead p { color: var(--on-wood-muted); max-width: 44ch; }
.contact { display: flex; flex-direction: column; min-width: 0; }
.row { border-top: 1px solid var(--on-wood-muted); padding-block: 16px; display: flex; flex-direction: column; gap: 6px; }
.row .k { font-size: 0.8125rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--on-wood-muted); }
.row .v { font-family: var(--display); font-weight: 600; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.2; font-variant-numeric: tabular-nums; user-select: all; overflow-wrap: anywhere; }
.row .tools { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; font-size: 1rem; }
.visit a { color: var(--on-wood); }
.visit .btn { background: var(--on-wood); color: var(--wood); }
.visit :focus-visible { outline-color: var(--on-wood); }
.copy { font: inherit; font-size: 0.9375rem; font-weight: 600; color: var(--on-wood); background: transparent; border: 1px solid var(--on-wood-muted); border-radius: 4px; padding: 6px 12px; cursor: pointer; }
.copy:hover { border-color: var(--on-wood); }

/* Footer */
footer { background: var(--bg); }
footer .wrap { padding-block: 30px 44px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px 32px; color: var(--muted); font-size: 0.9375rem; }
footer b { display: block; font-family: var(--display); font-size: 1.1rem; color: var(--ink); margin-bottom: 4px; }
footer nav { display: flex; flex-direction: column; gap: 2px; }
footer a { color: var(--muted); }

/* Photo galleries */
.gallery { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .gallery.g2, .gallery.g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .gallery.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 560px) and (max-width: 899px) { .gallery.g3 figure:first-child { grid-column: 1 / -1; } }
figure { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; background: var(--surface); }
figcaption { font-size: 0.9375rem; color: var(--muted); }
.lead-photo .wrap { padding-block: clamp(24px, 4vw, 40px) 0; }
.lead-photo figure img { aspect-ratio: 16 / 7; object-position: center 60%; }
.section .ledger { max-width: 520px; }
