/* Brushline Sample Painting Co. The Finish Notebook. System fonts only. */
:root {
  --ink: #1A1210;
  --accent: #9A3412;
  --accent-hover: #7C2D12;
  --on-accent: #ffffff;
  --band: #F3DED2;
  --chalk: #F5F1E8;
  --paper: #ffffff;
  --serif: Georgia, serif;
  --sans: Arial, sans-serif;
  --rule: rgba(26, 18, 16, 0.22);
  --margin: 11rem;
  --max: 74rem;
  /* Aliases so existing rules pick up the refresh without a rewrite. */
  --plum: var(--accent);
  --on-plum: var(--on-accent);
  --clay: var(--accent);
  --sage: var(--band);
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--chalk); color: var(--ink); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
  padding-bottom: 0;
}
h1, h2, h3, .wordmark .wm-name { font-family: var(--serif); font-weight: 500; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2.25rem, 5vw, 4rem); margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.625rem); margin: 0 0 0.75rem; }
h3 { font-size: 1.375rem; margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; max-width: 42rem; }
a { color: var(--plum); text-decoration: underline; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 3px var(--paper); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--paper); padding: 0.6rem 1rem; z-index: 50; }
.skip:focus { top: 1rem; }
main:focus { outline: none; }

/* Sample disclosure */
.sample-banner {
  margin: 0; max-width: none; padding: 0.6rem 1.25rem; text-align: center;
  background: var(--accent); color: var(--on-accent); font-size: 1rem; line-height: 1.4;
}

/* Header */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem;
  max-width: var(--max); margin: 0 auto; padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.wordmark { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); margin-right: auto; }
.wm-name { font-size: 1.9rem; letter-spacing: 0.06em; }
.wm-desc { font-size: 0.95rem; }
.site-header nav ul, .site-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; }
.site-header nav a:hover { border-bottom-color: var(--accent); }
.site-header nav a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 700; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0.55rem 1.15rem;
  font: 700 1rem/1.2 var(--sans); border-radius: 3px; cursor: pointer; text-decoration: none; border: 2px solid var(--plum);
}
.btn-primary { background: var(--plum); color: var(--on-plum); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary { background: var(--paper); color: var(--plum); }
.btn-secondary:hover { background: var(--chalk); }
.btn-quiet { background: transparent; color: var(--plum); border-color: transparent; padding-left: 0; text-decoration: underline; text-underline-offset: 0.2em; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Notebook sections: margin note column plus reading column */
main { display: block; }
.sec {
  display: grid; grid-template-columns: var(--margin) minmax(0, 1fr); gap: 0 2.5rem;
  max-width: var(--max); margin: 0 auto; padding: 3.5rem 1.5rem;
  border-top: 1px solid var(--rule);
}
.sec > .sec-body { grid-column: 2; min-width: 0; }
.margin-note {
  grid-column: 1; margin: 0.4rem 0 0; font: 700 0.85rem/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
  padding-top: 0.6rem; border-top: 3px solid var(--clay); align-self: start;
}
.band-sage { background: var(--sage); max-width: none; }
.band-sage > .sec-body { max-width: calc(var(--max) - var(--margin) - 5.5rem); }
.band-sage { padding-left: max(1.5rem, calc((100% - var(--max)) / 2 + 1.5rem)); padding-right: max(1.5rem, calc((100% - var(--max)) / 2 + 1.5rem)); }
.eyebrow, .kicker { font: 700 0.95rem/1.3 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.75rem; }
.lede { font-size: 1.2rem; }
.support { font-style: italic; }

/* Placeholders */
.ph { margin: 0; }
.ph-surface {
  position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--ink); border-radius: 2px;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(26, 18, 16, 0.06) 14px 15px),
    linear-gradient(180deg, #efe6d8, #e6d9c8);
  display: flex; align-items: flex-end; justify-content: flex-start;
}
.ph-slot { font: 700 0.85rem/1 var(--sans); letter-spacing: 0.08em; padding: 0.5rem 0.6rem; background: var(--paper); border-top: 1px solid var(--ink); border-right: 1px solid var(--ink); }
.ph-label { font-size: 0.98rem; font-weight: 700; padding-top: 0.45rem; }
/* Derived files are already the safe crop. contain shows that whole crop at every frame size. */
.ph-surface img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.ph.wide .ph-surface img { object-fit: contain; }
.ph[data-slot="H1"] img, .ph[data-concept-slot="H1"] img { object-position: center 85%; }
.ph-license { font-size: 0.95rem; font-weight: 700; margin: 0.35rem 0 0; max-width: 42rem; }
.ph.tall .ph-surface { aspect-ratio: 3 / 4; }
.ph.wide .ph-surface { aspect-ratio: 16 / 7; }

/* Home hero: offset headline column with tall image slot */
.hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); border-top: 0; padding-top: 4rem; }
.hero > .sec-body { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 3rem; align-items: end; }
.hero .hero-text { padding-left: var(--margin); padding-bottom: 2rem; }

/* Planner */
.planner-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; margin-top: 1.5rem; }
.chips { border: 0; margin: 0 0 1.25rem; padding: 0; min-width: 0; }
.chips legend { font-weight: 700; margin-bottom: 0.5rem; padding: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; padding: 0.45rem 0.95rem;
  background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 999px; cursor: pointer;
}
.chip input:checked + span { border: 2px solid var(--ink); font-weight: 700; padding: 0.4rem 0.9rem; }
.chip input:checked + span::before { content: "\2713"; }
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 3px var(--paper); }
.planner-status { font-weight: 700; min-height: 3.1em; }
.planner-sheet { background: var(--paper); border: 1px solid var(--ink); padding: 1.5rem 1.75rem; }
.planner-sheet ol { padding-left: 1.25rem; margin: 0 0 1.25rem; }
.planner-sheet li { margin-bottom: 0.5rem; }
.caution { border-left: 4px solid var(--clay); padding-left: 0.9rem; margin: 0; }

/* Services preview */
.svc-list { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.svc-list li { padding: 1.25rem 1.5rem 1rem 0; }
.svc-list li + li { border-left: 1px solid var(--rule); padding-left: 1.5rem; }

/* Featured rail: staggered editorial */
.rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: 1.5rem; align-items: start; }
.rail-p3, .rail-p5 { margin-top: 0; }
.rail-text { padding-top: 0.75rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.4rem; }
.tags span { font-size: 0.9rem; padding: 0.1rem 0.55rem; border: 1px solid var(--ink); border-radius: 2px; background: var(--paper); }

/* Process strip */
.strip-band { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.strip { list-style: none; counter-reset: s; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 3px solid var(--ink); }
.strip li { counter-increment: s; padding: 1rem 1rem 0 0; font-size: 1rem; }
.strip li::before { content: counter(s); display: block; font: 500 1.5rem/1 var(--serif); color: var(--plum); margin-bottom: 0.4rem; }
.strip li strong { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 500; }

.closing > .sec-body { background: var(--paper); border: 1px solid var(--ink); padding: 2rem 2.25rem; border-left: 10px solid var(--plum); }
.disclosure > .sec-body { border: 2px solid var(--ink); padding: 1.75rem 2rem; background: var(--paper); }

/* Services */
.intro { border-top: 0; }
.intro > .sec-body { grid-column: 1 / -1; padding-left: calc(var(--margin) + 2.5rem); }
.margin-anchors ul { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.margin-anchors a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.reading > .sec-body { max-width: 46rem; }
.scope { padding-left: 1.2rem; margin: 0 0 1rem; }
.scope li { margin-bottom: 0.35rem; }
.meta { border-top: 1px dotted var(--rule); padding-top: 0.6rem; }
.table-wrap { overflow-x: auto; margin-top: 1rem; border: 1px solid var(--ink); background: var(--paper); }
table { border-collapse: collapse; width: 100%; min-width: 40rem; font-size: 1rem; }
th, td { text-align: left; vertical-align: top; padding: 0.8rem 1rem; border-bottom: 1px solid var(--rule); }
thead th { background: var(--chalk); font-family: var(--serif); font-weight: 500; font-size: 1.05rem; border-bottom: 2px solid var(--ink); }
tbody th { font-family: var(--serif); font-weight: 500; }
.coverage > .sec-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2rem; align-items: center; }
.stamp { display: inline-block; border: 2px solid var(--ink); padding: 0.25rem 0.7rem; font-weight: 700; background: var(--paper); }

/* About */
.manifesto { font-family: var(--serif); font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.45; max-width: 48rem; }
.manifesto-sec { padding-top: 4.5rem; padding-bottom: 4.5rem; }
.commit { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2.5rem; }
.commit li { border-top: 3px solid var(--accent); padding-top: 0.75rem; }

/* Projects */
.shelf { border-top: 0; }
.shelf > .sec-body { grid-column: 1 / -1; }
.filter-shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; padding: 1.5rem; background: var(--sage); margin-top: 1.25rem; }
.filter-shelf .chips { margin: 0; }
.filter-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.count { font-weight: 700; margin: 0; }
#project-grid { padding-top: 2rem; }
#project-grid > .sec-body { grid-column: 1 / -1; }
.entries { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.entry[hidden] { display: none; }
.entry:nth-child(3n + 2) { transform: none; }
.entry-text { padding-top: 0.6rem; }
.empty { border: 2px dashed var(--ink); padding: 1.5rem; background: var(--paper); margin-top: 1rem; }
.empty[hidden] { display: none; }

/* Drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(26, 18, 16, 0.35); z-index: 40; }
.drawer-backdrop[hidden], .drawer[hidden] { display: none; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(34rem, 100%); z-index: 41; overflow-y: auto;
  background: var(--chalk); border-left: 2px solid var(--ink); display: block; max-width: none; margin: 0; padding: 0;
  box-shadow: -8px 0 24px rgba(26, 18, 16, 0.2);
}
.drawer-banner { position: sticky; top: 0; z-index: 1; }
.drawer-inner { padding: 1.5rem 1.75rem calc(2rem + env(safe-area-inset-bottom)); }
.drawer h2 { font-size: 2rem; }
.annot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem 1rem; margin: 1.25rem 0; }
.annot .full { grid-column: 1 / -1; }
.annot dt { font-weight: 700; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; }
.annot dd { margin: 0.2rem 0 0; }
.drawer-note { border-top: 1px solid var(--rule); padding-top: 0.75rem; }
.drawer-open body { overflow: hidden; }

/* Contact */
.contact-layout { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.contact-layout .sec { display: block; padding: 2.5rem 0; max-width: none; border-top: 0; }
.brief { background: var(--paper); border: 1px dashed var(--ink); padding: 1.5rem; display: grid; gap: 1rem; margin: 1.25rem 0 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.field input, .field textarea {
  width: 100%; min-height: 44px; font: 1rem/1.4 var(--sans); padding: 0.6rem 0.75rem;
  color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; background: #ece6d9; border: 1px solid var(--rule); border-radius: 2px; cursor: not-allowed; resize: none;
}
.helper { font-weight: 700; }
.notice { min-height: 1.6em; font-weight: 700; margin: 0.75rem 0 0; }
.card > .sec-body { background: var(--paper); border: 1px solid var(--ink); padding: 1.5rem; }
.contact-side .sec + .sec { padding-top: 0; }
.steps { padding-left: 1.25rem; margin: 0; }
.steps li { margin-bottom: 0.6rem; }

/* Footer */
.site-footer { max-width: var(--max); margin: 2rem auto 0; padding: 2rem 1.5rem 2.5rem; border-top: 6px solid var(--accent); display: grid; gap: 0.75rem; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-disclosure { font-weight: 700; margin: 0; }
.foot-credit { margin: 0; }

/* Mobile call bar: hidden on wide screens */
.mobile-call-bar { display: none; }

@media (max-width: 960px) {
  :root { --margin: 7rem; }
  .hero > .sec-body { grid-template-columns: 1fr; }
  .hero .hero-text { padding-left: 0; }
  .ph.tall .ph-surface { aspect-ratio: 4 / 3; }
  .rail, .entries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail-p3, .rail-p5 { margin-top: 0; }
  .entry:nth-child(3n + 2) { transform: none; }
  .filter-shelf { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 1.0625rem; padding-bottom: calc(6.5rem + env(safe-area-inset-bottom)); }
  h1 { font-size: clamp(2.25rem, 9vw, 2.625rem); }
  h2 { font-size: clamp(1.75rem, 7vw, 2.125rem); }
  .sec { grid-template-columns: 1fr; padding: 2.5rem 1.25rem; }
  .sec > .sec-body { grid-column: 1; }
  .margin-note { grid-column: 1; margin-bottom: 1rem; }
  .intro > .sec-body { padding-left: 0; }
  .hero > .sec-body { gap: 1.5rem; }
  .planner-grid, .svc-list, .rail, .entries, .commit, .strip, .coverage > .sec-body { grid-template-columns: 1fr; }
  .svc-list li + li { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .site-header { padding: 1rem 1.25rem; }
  .header-cta { width: 100%; }
  .contact-layout { padding: 0 1.25rem; }
  .annot { grid-template-columns: 1fr 1fr; }
  .drawer { width: 100%; border-left: 0; }
  .mobile-call-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--paper); border-top: 2px solid var(--ink); padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
  }
  .mobile-call-bar .btn { flex: 1 1 auto; }
  .mobile-call-bar .notice { margin: 0; min-height: 0; flex: 1 1 100%; }
  .mobile-call-bar .notice:empty { display: none; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Heading accent and paint-swatch touches */
.hero h1::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 6px;
  background: var(--accent);
  margin-top: 0.85rem;
}
.swatches, .swatches-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0;
}
.swatches li, .swatches-header span {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 2px;
  border: 1px solid rgba(26, 18, 16, 0.4);
  display: block;
}
.swatches-header {
  margin: 0.45rem 0 0;
}
.swatches-header span {
  width: 1.15rem;
  height: 1.15rem;
}
.swatches li:nth-child(1), .swatches-header span:nth-child(1) { background: #9A3412; }
.swatches li:nth-child(2), .swatches-header span:nth-child(2) { background: #1E3A8A; }
.swatches li:nth-child(3), .swatches-header span:nth-child(3) { background: #166534; }
.swatches li:nth-child(4), .swatches-header span:nth-child(4) { background: #B45309; }
.swatches li:nth-child(5), .swatches-header span:nth-child(5) { background: #F5F1E8; }
