/* ==========================================================================
   Charp Craftsmen — clean, minimal, measured.
   ========================================================================== */

:root {
  --paper: #f3f2ef;
  --paper-2: #ebe9e4;
  --ink: #161616;
  --ink-2: #4a4a48;
  --ink-3: #8b8a86;
  --line: rgba(22, 22, 22, 0.12);
  --line-strong: rgba(22, 22, 22, 0.85);
  --pink: #f17aa9;
  --pink-ink: #c9447c; /* pink dark enough for small text on paper */

  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  /* Largest headlines: Centrifuge (Midwest Type) via the Adobe Fonts kit in index.html */
  --f-headline: "centrifuge", var(--f-display);
  --f-body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --header-h: 64px;
  --gutter: clamp(20px, 4vw, 56px);
  --rail: 220px;          /* right column reserved for the page index */
  --maxw: 1240px;

  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6' fill='none' stroke='%23161616'/%3E%3C/svg%3E");
  --grain-filter: none;
  color-scheme: light;
}

/* Dark theme: follows the device unless the header toggle picked one (data-theme on <html>) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
      --paper: #121212;
      --paper-2: #1c1c1b;
      --ink: #f1efe9;
      --ink-2: #b8b6b0;
      --ink-3: #7c7a75;
      --line: rgba(241, 239, 233, 0.11);
      --line-strong: rgba(241, 239, 233, 0.75);
      --pink-ink: #f590b8; /* lighter pink for small text on dark */
      --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6' fill='none' stroke='%23f1efe9'/%3E%3C/svg%3E");
      --grain-filter: invert(1);
      color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121212;
  --paper-2: #1c1c1b;
  --ink: #f1efe9;
  --ink-2: #b8b6b0;
  --ink-3: #7c7a75;
  --line: rgba(241, 239, 233, 0.11);
  --line-strong: rgba(241, 239, 233, 0.75);
  --pink-ink: #f590b8; /* lighter pink for small text on dark */
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6' fill='none' stroke='%23f1efe9'/%3E%3C/svg%3E");
  --grain-filter: invert(1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--pink); color: var(--ink); }

.mono {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.small { font-size: 11px; }

/* --------------------------------------------------------------------------
   Grid lines — fixed vertical column guides behind the content
   -------------------------------------------------------------------------- */
.grid-lines {
  position: fixed;
  inset: 0 var(--rail) 0 0;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  pointer-events: none;
  z-index: 0;
}
.grid-lines span { border-left: 1px solid var(--line); }
.grid-lines span:last-child { border-left: 1px solid var(--line); position: absolute; right: var(--gutter); top: 0; bottom: 0; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-strong);
}
.brand img { width: clamp(200px, 24vw, 320px); }
.header-meta { display: flex; align-items: center; gap: 28px; }
.header-meta .mono { white-space: nowrap; }
.header-meta .theme-toggle { order: 2; margin-right: -12px; } /* sits beside the quote button, like ArtCraft */
.header-meta .btn { order: 3; }
.header-nav { display: flex; gap: 28px; margin-right: auto; margin-left: clamp(24px, 4vw, 64px); }
.header-nav a {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.header-nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.header-nav a.is-current { color: var(--ink); border-bottom-color: var(--pink); }
.header-meta a.mono { text-decoration: none; }
.header-meta a.mono:hover { color: var(--pink-ink); }

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 26px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--pink); color: var(--ink); border-color: var(--pink); }
.btn--sm { padding: 10px 16px; font-size: 11px; }

.link {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.link:hover { color: var(--pink-ink); }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
main { position: relative; z-index: 1; }

.section {
  position: relative;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-right: max(var(--rail), calc((100vw - var(--maxw) - var(--gutter) * 2 - var(--rail)) / 2 + var(--rail)));
  margin-left: max(0px, calc((100vw - var(--maxw) - var(--gutter) * 2 - var(--rail)) / 2));
  padding: clamp(96px, 14vh, 168px) var(--gutter);
  border-top: 1px solid var(--line);
}
.section:first-child { border-top: 0; }

.section-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(48px, 7vh, 88px);
  color: var(--ink-2);
}
.section-tag span { color: var(--ink); }
.section-tag::before {
  content: "";
  width: 9px; height: 9px;
  border: 1px solid var(--ink);
  background: var(--pink);
  margin-right: 6px;
}

.h2 {
  font-family: var(--f-headline);
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  margin: 0 0 32px;
}
.h2--wide { max-width: 14ch; margin-bottom: clamp(48px, 7vh, 80px); }
.h3, h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0 0 12px;
}
p { margin: 0 0 1em; color: var(--ink-2); max-width: 60ch; }

.cols {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(40px, 6vw, 96px);
}
.cols > *, .row > * { min-width: 0; }

/* Dimension lines: |←—— label ——→| */
.dim { color: var(--ink-3); }
.dim--h {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: clamp(72px, 10vh, 120px);
}
.dim--h::before, .dim--h::after {
  content: "";
  flex: 1;
  height: 9px;
  border-left: 1px solid var(--ink-3);
  background: linear-gradient(var(--ink-3), var(--ink-3)) center / 100% 1px no-repeat;
}
.dim--h::after { border-left: 0; border-right: 1px solid var(--ink-3); }

/* --------------------------------------------------------------------------
   00 — Hero
   -------------------------------------------------------------------------- */
.hero { padding-top: clamp(72px, 12vh, 140px); min-height: calc(100vh - var(--header-h)); }
.hero__grid {
  display: grid;
  grid-template-columns: 3fr 1fr;
  align-items: end;
  gap: 48px;
  container-type: inline-size;
}
.hero__grid > * { min-width: 0; }
.hero__title {
  font-family: var(--f-headline);
  font-weight: 700;
  /* Centrifuge is wide: size so "CRAFTSMANSHIP" (~8.8em) fills the 3fr column */
  font-size: min(calc((100cqi - 48px) * 0.75 / 9), 132px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0;
}
.hero__title em {
  font-style: normal;
  color: var(--pink);
  -webkit-text-stroke: 0;
}
.hero__aside { position: relative; padding-bottom: 8px; }
.lede { font-size: 18px; color: var(--ink-2); margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }

/* --------------------------------------------------------------------------
   01 — About
   -------------------------------------------------------------------------- */
.badge { width: min(100%, 240px); }
.badge--on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge--on-light { display: none; }
  :root:not([data-theme="light"]) .badge--on-dark { display: block; }
}
:root[data-theme="dark"] .badge--on-light { display: none; }
:root[data-theme="dark"] .badge--on-dark { display: block; }

/* Theme toggle (header) */
.theme-toggle {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  padding: 0;
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.theme-toggle:hover { background: var(--ink); color: var(--paper); }
.theme-toggle:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
.is-dark .theme-toggle .icon-sun { display: block; }
.is-dark .theme-toggle .icon-moon { display: none; }
.specs {
  margin: 48px 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line-strong);
}
.specs div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.specs div:nth-child(odd) { padding-right: 24px; }
.specs dt { color: var(--ink-3); margin-bottom: 4px; }
.specs dd { margin: 0; font-family: var(--f-display); font-size: 22px; font-weight: 600; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   02 — Services: bordered cells, like a cut list
   -------------------------------------------------------------------------- */
.service-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line);
}
.service-grid li {
  position: relative;
  padding: 72px 28px 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  transition: background 0.2s;
}
.service-grid li:hover { background: var(--paper-2); }
.service-grid li::after {   /* corner crop mark */
  content: "";
  position: absolute;
  right: -5px; bottom: -5px;
  width: 9px; height: 9px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 1px 100% no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 100% 1px no-repeat;
  z-index: 1;
}
.service-grid .idx { position: absolute; top: 22px; left: 28px; color: var(--ink-3); }
.service-grid p { font-size: 16px; margin: 0; }

/* --------------------------------------------------------------------------
   03 — Process: a horizontal measured line with stations
   -------------------------------------------------------------------------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
}
.steps::before { /* the tape */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 18px;
  border-top: 1px solid var(--line-strong);
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 100%) 0 0 / calc(100% / 32) 6px repeat-x,
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 100%) 0 0 / calc(100% / 8) 12px repeat-x;
}
.steps li { padding: 48px 28px 0 0; position: relative; }
.steps li::before {
  content: "";
  position: absolute;
  top: -5px; left: -4px;
  width: 9px; height: 9px;
  background: var(--pink);
  border: 1px solid var(--ink);
}
.steps .mono { display: block; color: var(--ink-3); margin-bottom: 16px; }
.steps p { font-size: 16px; }

/* --------------------------------------------------------------------------
   04 — Gallery (grid is generated from media/gallery/)
   -------------------------------------------------------------------------- */
.gallery-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: end;
  margin-bottom: clamp(40px, 6vh, 64px);
}
.gallery-head .h2 { margin: 0; }
.gallery-head p { margin: 0; }

.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line);
}
.gallery li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gallery figure { margin: 0; padding: 16px; }
.gallery__open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--paper-2);
  cursor: zoom-in;
  overflow: hidden;
}
.gallery__open img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(.2,.7,.2,1);
}
.gallery__open:hover img { transform: scale(1.03); }
.gallery__open:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
.gallery figcaption { display: flex; gap: 14px; padding-top: 14px; color: var(--ink-3); }
.gallery figcaption span { color: var(--ink); flex-shrink: 0; }

.gallery > li.is-hidden { display: none; }
.gallery-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
}
.gallery-more[hidden] { display: none; }
.gallery-more .mono { color: var(--ink-3); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.gallery-empty {
  border: 1px dashed var(--ink-3);
  padding: clamp(48px, 8vh, 96px) 32px;
  text-align: center;
}
.gallery-empty p { margin-left: auto; margin-right: auto; }

.follow-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  flex-wrap: wrap;
  margin-top: clamp(40px, 6vh, 64px);
  padding: 32px 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}
.follow-cta .mono { color: var(--ink-3); margin: 0 0 8px; }
.follow-cta__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(26px, 2.8vw, 38px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}
.btn__icon { width: 18px; height: 18px; flex-shrink: 0; }

/* Lightbox */
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 56px clamp(16px, 6vw, 96px);
  border: 0;
  background: rgba(22, 22, 22, 0.94);
  color: var(--paper);
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 160px); object-fit: contain; }
.lightbox figcaption { padding-top: 16px; color: #b9b8b4; }
.lightbox__btn {
  position: absolute;
  background: none;
  border: 1px solid rgba(243, 242, 239, 0.3);
  color: var(--paper);
  cursor: pointer;
  padding: 10px 14px;
  font-size: 18px;
}
.lightbox__btn:hover { border-color: var(--pink); color: var(--pink); }
.lightbox__close { top: 16px; right: 16px; font-size: 11px; }
.lightbox__prev, .lightbox__next { top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }
.lightbox.is-single .lightbox__prev, .lightbox.is-single .lightbox__next { display: none; }

/* --------------------------------------------------------------------------
   05 — Quote form
   -------------------------------------------------------------------------- */
.quote .col-label { position: sticky; top: calc(var(--header-h) + 40px); align-self: start; }
.quote-form fieldset {
  border: 0;
  border-top: 1px solid var(--line-strong);
  margin: 0 0 56px;
  padding: 28px 0 0;
  min-width: 0;
}
.quote-form legend {
  float: left;
  width: 100%;
  margin-bottom: 24px;
  color: var(--ink-2);
}
.quote-form legend + * { clear: both; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { margin-bottom: 24px; }
.field > label:not(.dropzone), .field > .label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.opt { color: var(--ink-3); text-transform: none; letter-spacing: 0; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select, textarea {
  width: 100%;
  padding: 14px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink-3);
  border-radius: 0;
  font: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
textarea { resize: vertical; min-height: 120px; padding: 14px; border: 1px solid var(--ink-3); }
select {
  cursor: pointer;
  background: var(--chevron) right 4px center no-repeat;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 1px 0 0 var(--ink); }
textarea:focus { box-shadow: inset 0 0 0 1px var(--ink); }
.invalid { border-color: var(--pink-ink) !important; box-shadow: 0 1px 0 0 var(--pink-ink) !important; }
textarea.invalid { box-shadow: inset 0 0 0 1px var(--pink-ink) !important; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { cursor: pointer; position: relative; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-block;
  padding: 9px 14px;
  border: 1px solid var(--ink-3);
  font-size: 14px;
  transition: all 0.15s;
}
.chips label:hover span { border-color: var(--ink); }
.chips input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chips input:focus-visible + span { outline: 2px solid var(--pink); outline-offset: 2px; }

/* Timeline readout: a dimension line between start & finish */
/* Reference upload */
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 20px;
  border: 1px dashed var(--ink-3);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--ink); background: var(--paper-2); }
.dropzone.is-over { border-style: solid; }
.dropzone:focus-within { outline: 2px solid var(--pink); outline-offset: 2px; }
.dropzone.is-full { opacity: 0.5; pointer-events: none; }
.dropzone__picker { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone__mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 1px solid var(--ink);
  background: var(--pink);
  font-size: 18px; line-height: 1;
}
.dropzone__text { font-size: 15px; color: var(--ink-2); }
.dropzone__hint { color: var(--ink-3); font-size: 10px; }

.file-list { list-style: none; margin: 0; padding: 0; }
.file-list li {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.file-list .thumb {
  width: 44px; height: 44px;
  object-fit: cover;
  background: var(--paper-2);
  display: grid; place-items: center;
  font-family: var(--f-mono); font-size: 10px; color: var(--ink-3);
}
.file-list .name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .size { display: block; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.06em; color: var(--ink-3); }
.file-list button {
  background: none; border: 0; padding: 6px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); cursor: pointer;
}
.file-list button:hover { color: var(--pink-ink); }
.file-note { margin: 8px 0 0; font-family: var(--f-mono); font-size: 11px; color: var(--pink-ink); min-height: 1em; }

.timeline { margin: 8px 0 28px; }
.timeline__bar {
  position: relative;
  height: 24px;
  background:
    repeating-linear-gradient(90deg, var(--ink-3) 0 1px, transparent 1px 100%) 0 100% / calc(100% / 52) 6px repeat-x;
  border-bottom: 1px solid var(--ink-3);
}
.timeline__bar .fill {
  position: absolute;
  left: 0; bottom: -1px;
  height: 10px;
  width: 0;
  background: var(--pink);
  border: 1px solid var(--ink);
  border-bottom: 0;
  opacity: 0;
  transition: width 0.35s ease, left 0.35s ease, opacity 0.2s;
}
.timeline.has-range .fill { opacity: 1; }
.timeline__bar .cap { display: none; }
.timeline__readout { margin-top: 12px; color: var(--ink-3); }
.timeline.has-range .timeline__readout { color: var(--ink); }
.timeline.is-error .timeline__readout { color: var(--pink-ink); }

.check { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 15px; }
.check input {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; margin: 0;
  border: 1px solid var(--ink-3);
  display: grid; place-content: center;
  cursor: pointer;
}
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ""; width: 8px; height: 8px; background: var(--pink); }

.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.form-error { color: var(--pink-ink); margin: 0; min-height: 1em; }
.form-success { border-top: 1px solid var(--line-strong); padding-top: 28px; }
.form-success .mono { color: var(--pink-ink); }

/* --------------------------------------------------------------------------
   06 — Contact
   -------------------------------------------------------------------------- */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  border-top: 1px solid var(--line-strong);
}
.contact__item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px 24px 40px 0;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.contact__item .mono { color: var(--ink-3); }
.contact__item .big {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(22px, 2.2vw, 32px);
  text-transform: uppercase;
  line-height: 1;
  overflow-wrap: anywhere;
  transition: color 0.15s;
}
.contact__item:hover .big { color: var(--pink-ink); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer, .lightbox {
  /* Always-dark panels: pin the light-theme tokens so they look the same in both themes */
  --paper: #f3f2ef;
  --ink: #161616;
  --pink-ink: #c9447c;
}
.site-footer {
  position: relative;
  z-index: 15; /* slides over the fixed right rail */
  background: var(--ink) url("assets/woodgrain-dark.svg") center / cover no-repeat;
  color: var(--paper);
  padding: clamp(80px, 12vh, 140px) var(--gutter) 40px;
}
.footer-cta {
  display: flex;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-bottom: clamp(64px, 10vh, 112px);
  border-bottom: 1px solid rgba(243, 242, 239, 0.18);
}
.footer-badge { width: clamp(110px, 12vw, 160px); flex-shrink: 0; }
.footer-title {
  font-family: var(--f-headline);
  font-weight: 700;
  font-size: clamp(34px, 4.4vw, 64px);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--paper);
  max-width: none;
  margin: 0 0 28px;
}
.footer-title em { font-style: normal; color: var(--pink); }
.btn--pink { background: var(--pink); color: var(--ink); border-color: var(--pink); }
.btn--pink:hover { background: var(--paper); border-color: var(--paper); }
.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
  padding-top: 28px;
  color: #b9b8b4;
}

/* Hero background video: black & white, faded so the headline stays on top */
.hero { isolation: isolate; }
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  filter: grayscale(1) contrast(1.15) brightness(1.05);
  mix-blend-mode: multiply;
  opacity: 0.2;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero__video { mix-blend-mode: screen; opacity: 0.22; }
}
:root[data-theme="dark"] .hero__video { mix-blend-mode: screen; opacity: 0.22; }
.intro-go .hero__media { animation: fadeIn 1.4s ease 0.2s both; }
.js-intro:not(.intro-go) .hero__media { opacity: 0; }
/* the video replaces the woodgrain in the hero */
.hero:has(.hero__media)::before { display: none; }

/* Faint woodgrain bleeding in behind the hero's lower edge */
.hero::before {
  content: "";
  position: absolute;
  inset: 40% 0 0;
  background: url("assets/woodgrain.svg") center bottom / cover no-repeat;
  opacity: 0.05;
  filter: var(--grain-filter);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 70%);
  mask-image: linear-gradient(to bottom, transparent, #000 70%);
  pointer-events: none;
  z-index: -1;
}

/* --------------------------------------------------------------------------
   Right rail: scrolling ruler + section index (after getartcraft.com)
   -------------------------------------------------------------------------- */
.side-ruler {
  --unit: 44px;
  position: fixed;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  width: 44px;
  overflow: hidden;
  z-index: 10;
  pointer-events: none;
  border-left: 1px solid var(--line);
}
.side-ruler__track { position: absolute; top: 0; right: 0; left: 0; will-change: transform; }
.side-ruler__track .t {
  position: absolute;
  right: 0;
  height: 1px;
  width: 8px;
  background: var(--ink-3);
}
.side-ruler__track .t--major { width: 16px; background: var(--ink); }
.side-ruler__track .n {
  position: absolute;
  right: 20px;
  transform: translateY(-50%);
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--ink-2);
}
.side-ruler__marker {
  position: absolute;
  top: 28%;
  right: 0;
  width: 100%;
  height: 1px;
  background: var(--pink-ink);
}
.side-ruler__marker span {
  position: absolute;
  right: 4px;
  bottom: 3px;
  font-size: 9px;
  letter-spacing: 0.02em;
  color: var(--pink-ink);
  background: var(--paper);
  padding: 0 2px;
  white-space: nowrap;
}

.page-nav {
  position: fixed;
  right: 64px;
  bottom: 40px;
  z-index: 10;
  text-align: right;
}
.page-nav ol { list-style: none; margin: 0; padding: 0; }
.page-nav a {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-decoration: none;
  color: var(--ink-3);
  padding: 1px 0;
  transition: color 0.2s;
}
.page-nav .num {
  font-size: 10px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s, opacity 0.3s;
}
.page-nav .label {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: font-size 0.35s cubic-bezier(.2,.7,.2,1), letter-spacing 0.35s;
}
.page-nav a:hover { color: var(--ink); }
.page-nav a.is-active { color: var(--ink); padding: 10px 0 8px; }
.page-nav a.is-active .num { max-height: 20px; opacity: 1; margin-bottom: 2px; color: var(--pink-ink); }
.page-nav a.is-active .label { font-size: 44px; letter-spacing: 0.01em; }
.page-nav a:focus-visible { outline: 2px solid var(--pink); outline-offset: 4px; }

/* Floating call button (phones and small tablets only) */
.call-now { display: none; }
@media (max-width: 760px) {
  .call-now {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 18; /* above the footer (15), below the header (20) */
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px 12px 14px;
    background: var(--pink);
    color: #161616;
    border: 1px solid #161616;
    font-family: var(--f-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 3px 3px 0 #161616;
    transition: transform 0.15s, box-shadow 0.15s;
  }
  .call-now:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #161616; }
  .call-now svg { width: 16px; height: 16px; }
  .intro-go .call-now { animation: fadeUp 0.5s ease 0.9s both; }
  .js-intro:not(.intro-go) .call-now { opacity: 0; }
  /* leave room so the last bit of the footer isn't covered */
  .site-footer { padding-bottom: 88px; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1480px) {
  .header-meta span.mono { display: none; } /* license no. — still in the About specs and footer */
}

@media (max-width: 1240px) {
  .header-meta .mono { display: none; }
}

@media (max-width: 1100px) {
  /* Narrow rail: ruler stays, index becomes a column of section numbers */
  :root { --rail: 84px; }
  .page-nav { right: 50px; bottom: 32px; }
  .page-nav a { align-items: center; padding: 3px 0; }
  .page-nav .label {
    font-size: 0;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    letter-spacing: 0.06em;
  }
  .page-nav .num { max-height: none; opacity: 1; overflow: visible; font-size: 11px; color: var(--ink-3); }
  .page-nav a:hover .num { color: var(--ink); }
  .page-nav a.is-active { padding: 8px 0 3px; flex-direction: column-reverse; gap: 8px; }
  .page-nav a.is-active .num { color: var(--pink-ink); margin: 0; }
  .page-nav a.is-active .label { font-size: 20px; }
}

@media (max-width: 760px) {
  :root { --header-h: 100px; }
  .site-header { flex-wrap: wrap; height: auto; min-height: var(--header-h); padding-top: 12px; padding-bottom: 0; row-gap: 8px; }
  .header-nav {
    order: 3;
    width: calc(100% + var(--gutter) * 2);
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
    border-top: 1px solid var(--line);
  }
  .header-nav::-webkit-scrollbar { display: none; }
  .header-nav a { padding: 10px 0; white-space: nowrap; font-size: 11px; }
}

@media (max-width: 560px) {
  /* Phone: slim tick-only ruler, index collapses to a current-section chip */
  :root { --rail: 28px; }
  .side-ruler { width: 24px; }
  .side-ruler__track .n { display: none; }
  .side-ruler__marker span { display: none; }
  .page-nav {
    right: 36px;
    bottom: 16px;
    background: var(--ink);
    padding: 8px 14px;
  }
  .page-nav li:not(:has(.is-active)) { display: none; }
  .page-nav a.is-active { color: var(--paper); padding: 0; flex-direction: row; gap: 10px; align-items: baseline; }
  .page-nav a.is-active .label { font-size: 16px; writing-mode: horizontal-tb; transform: none; }
  .page-nav a.is-active .num { color: var(--pink); }
}

@media (max-width: 860px) {
  .hero__grid, .cols { grid-template-columns: 1fr; }
  .hero__title { font-size: min(calc(100cqi / 9), 96px); }
  .hero { min-height: auto; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .gallery-head { grid-template-columns: 1fr; gap: 16px; }
  .steps::before { display: none; }
  .steps li { border-top: 1px solid var(--line-strong); }
  .quote .col-label { position: static; }
  .contact__grid { grid-template-columns: 1fr; }
  .grid-lines { grid-template-columns: repeat(2, 1fr); }
  .grid-lines span:nth-child(n+3):not(:last-child) { display: none; }
}

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .brand img { width: min(160px, 42vw); }
  .site-header { flex-wrap: wrap; column-gap: 10px; }
  .header-meta { gap: 8px; }
  .header-meta .theme-toggle { margin-right: 0; width: 32px; height: 32px; }
  .footer-cta { flex-direction: column; align-items: flex-start; }
  .service-grid, .steps, .row, .specs { grid-template-columns: 1fr; }
  .row { gap: 0; }
  .specs div:nth-child(odd) { padding-right: 0; }
  .btn--sm { padding: 9px 10px; font-size: 10px; letter-spacing: 0.06em; }
}

/* --------------------------------------------------------------------------
   Load animation (hero + header). .js-intro hides; .intro-go plays.
   -------------------------------------------------------------------------- */
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.04em; margin-bottom: -0.04em; }
.hero__title .line > * { display: inline-block; }

@keyframes rise   { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawX  { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes tickIn { from { transform: scale(0) rotate(-90deg); } to { transform: none; } }

.js-intro .hero__title .line > *,
.js-intro .hero .section-tag,
.js-intro .hero__aside > *,
.js-intro .dim--h > span,
.js-intro .site-header .brand,
.js-intro .header-nav a,
.js-intro .header-meta > *,
.js-intro .page-nav li { opacity: 0; }
.js-intro .hero__title .line > * { opacity: 1; transform: translateY(105%); }
.js-intro .dim--h::before, .js-intro .dim--h::after { transform: scaleX(0); }

.intro-go .hero__title .line > * { animation: rise 0.9s cubic-bezier(.2,.75,.15,1) both; }
.intro-go .hero__title .line:nth-child(1) > * { animation-delay: 0.10s; }
.intro-go .hero__title .line:nth-child(2) > * { animation-delay: 0.20s; }
.intro-go .hero__title .line:nth-child(3) > * { animation-delay: 0.30s; }

.intro-go .site-header .brand { animation: fadeIn 0.6s ease both; }
.intro-go .header-nav a, .intro-go .header-meta > * { animation: fadeUp 0.5s ease both; animation-delay: calc(0.05s + var(--i, 0) * 0.05s); }
.intro-go .hero .section-tag { animation: fadeIn 0.5s ease 0.05s both; }
.intro-go .hero .section-tag::before { animation: tickIn 0.5s cubic-bezier(.2,.75,.15,1) 0.05s both; }
.intro-go .hero__aside > * { animation: fadeUp 0.7s cubic-bezier(.2,.75,.15,1) both; }
.intro-go .hero__aside > :nth-child(1) { animation-delay: 0.55s; }
.intro-go .hero__aside > :nth-child(2) { animation-delay: 0.68s; }
.intro-go .dim--h::before, .intro-go .dim--h::after { animation: drawX 0.9s cubic-bezier(.65,0,.35,1) 0.7s both; }
.intro-go .dim--h::before { transform-origin: right; }
.intro-go .dim--h::after { transform-origin: left; }
.intro-go .dim--h > span { animation: fadeIn 0.5s ease 1.2s both; }
.intro-go .page-nav li { animation: fadeUp 0.45s ease both; animation-delay: calc(0.4s + var(--i, 0) * 0.04s); }

/* Scroll reveals: script.js tags elements with data-reveal and adds .is-in when they enter view */
.js-intro [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(.2,.75,.15,1);
  transition-delay: calc(var(--d, 0) * 70ms);
}
.js-intro [data-reveal="wipe"] {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.9s cubic-bezier(.65,0,.35,1);
}
.js-intro [data-reveal].is-in { opacity: 1; transform: none; clip-path: inset(0 0 -10% 0); }
.js-intro .section-tag[data-reveal]::before { transform: scale(0) rotate(-90deg); transition: transform 0.5s cubic-bezier(.2,.75,.15,1) 0.15s; }
.js-intro .section-tag[data-reveal].is-in::before { transform: none; }
.js-intro .steps::before { transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(.65,0,.35,1); }
.js-intro .steps.is-in::before { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  .js-intro .hero__title .line > * { transform: none; }
  .js-intro .dim--h::before, .js-intro .dim--h::after { transform: none; }
  .js-intro .hero__title .line > *, .js-intro .hero .section-tag, .js-intro .hero__aside > *,
  .js-intro .dim--h > span, .js-intro .site-header .brand, .js-intro .header-nav a,
  .js-intro .header-meta > *, .js-intro .page-nav li { opacity: 1; animation: none !important; }
  .js-intro [data-reveal], .js-intro [data-reveal="wipe"] { opacity: 1; transform: none; clip-path: none; }
  .js-intro .section-tag[data-reveal]::before, .js-intro .steps::before { transform: none; }
  .js-intro .call-now { opacity: 1; animation: none !important; }
  .js-intro .hero__media { opacity: 1; animation: none !important; }
}

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

/* Netlify honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
