/* ==========================================================================
   Jerry Rigged — styles
   Concept: a fix-it shop's paperwork and hardware. The navigation is a pipe
   with zip ties cinched round it, each tie carrying a tag; the hero is a
   repaired garden gate with the work order hanging from its latch.
   Order: fonts → tokens → base → components → header → sections → pages →
   consent → utilities → motion → print
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: 'Bree Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/bree-serif-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Istok Web';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/istok-web-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Istok Web';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/istok-web-700.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  /* Paper and ink */
  --paper: #f4efe4;
  --paper-deep: #e8dfcb;
  --card: #fbf8f1;
  --ink: #1f242b;
  --ink-soft: #4b535e;
  --line: #c9bca1;

  /* Hardware */
  --tag: #f0d58c;
  --tag-edge: #b8973f;
  --tie: #1b1d21;
  --steel: #8d97a1;
  --steel-light: #dfe4e8;
  --steel-dark: #56606b;
  --caution: #f2c230;

  /* Accents */
  --rust: #9e3c18;
  --blue: #234a96;
  --blue-deep: #183670;
  --box: #7a2416;
  --box-deep: #5b190e;
  --on-dark: #f7f1e4;

  /* Type */
  --font-head: 'Bree Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Istok Web', 'Segoe UI', Arial, sans-serif;
  --fs-small: 0.9375rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --fs-h2: clamp(1.9rem, 1.25rem + 2.5vw, 3.1rem);
  --fs-h1: clamp(2.35rem, 1.2rem + 4.6vw, 5rem);

  /* Space and shape */
  --gutter: clamp(16px, 4vw, 40px);
  --wrap: min(1200px, 100% - 2 * var(--gutter));
  --space-s: clamp(0.75rem, 0.6rem + 0.5vw, 1rem);
  --space-m: clamp(1.25rem, 1rem + 1vw, 2rem);
  --space-l: clamp(2.5rem, 1.8rem + 3vw, 4.5rem);
  --space-xl: clamp(4rem, 2.8rem + 5vw, 7.5rem);
  --radius: 6px;
  --shadow: 0 1px 0 rgba(31, 36, 43, 0.08), 0 10px 24px -14px rgba(31, 36, 43, 0.45);
  --header-h: 68px;
}

@media (min-width: 1180px) {
  :root { --header-h: 92px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
}

body.nav-open { overflow: hidden; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.12;
  text-wrap: balance;
}

p, li, dd { text-wrap: pretty; }
p { margin: 0 0 1em; }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }

img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

[tabindex="-1"]:focus { outline: none; }

[hidden] { display: none; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--on-dark);
  border-radius: var(--radius);
  font-weight: 700;
}
.skip-link:focus { top: 12px; color: var(--on-dark); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap { width: var(--wrap); margin-inline: auto; }

/* ---------- Components ---------- */

/* Buttons: one height everywhere, so rows of them line up. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0 1.25em;
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font: 700 1rem/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn:active { transform: translateY(1px); }

.btn-plain {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-plain:hover { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }

/* Section label: a small manila tag, the same family as the nav tags. */
.sec-tag {
  position: relative;
  display: inline-block;
  margin: 0 0 var(--space-s);
  padding: 4px 14px 4px 26px;
  background: var(--tag);
  color: var(--ink);
  font: 700 0.875rem/1.5 var(--font-body);
  letter-spacing: 0.04em;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
}
.sec-tag::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--tag-edge);
}

.sec-head { max-width: 46rem; margin-bottom: var(--space-l); }
.sec-head h2 { font-size: var(--fs-h2); }
.sec-head p:not(.sec-tag) { margin-top: var(--space-s); color: var(--ink-soft); font-size: var(--fs-lead); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s;
}
.site-header.is-scrolled { box-shadow: 0 8px 20px -16px rgba(31, 36, 43, 0.6); }

.header-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: var(--wrap);
  height: var(--header-h);
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { font: 1.25rem/1 var(--font-head); }
.brand-name small {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font: 700 0.6875rem/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btn-book { flex: none; min-height: 44px; padding: 0 0.85em; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: 700 0.9375rem/1 var(--font-body);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--paper-deep); }

/* The icon is a zip tie: strap plus square head. */
.nav-toggle-icon {
  position: relative;
  width: 20px;
  height: 14px;
  border: 3px solid var(--ink);
  border-radius: 8px;
}
.nav-toggle-icon::after {
  content: '';
  position: absolute;
  right: -6px;
  top: -6px;
  width: 7px;
  height: 7px;
  background: var(--ink);
  border-radius: 1px;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon { border-radius: 2px; width: 14px; }

/* The pipe and its tags — mobile first: an upright pipe inside a drop-down panel. */
.pipe-nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  overflow-y: auto;
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.pipe-nav.is-open { display: block; }

.pipe {
  position: relative;
  width: var(--wrap);
  margin: 0 auto;
  padding: 28px 0 40px 52px;
  list-style: none;
}
/* The pipe itself: galvanized steel with a highlight down one side. */
.pipe::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 16px;
  background: linear-gradient(90deg, var(--steel-dark), var(--steel-light) 40%, var(--steel) 75%, var(--steel-dark));
}

.pipe li { position: relative; margin: 0 0 14px; }
/* Zip tie across the pipe, tail cut short. */
.pipe li::before {
  content: '';
  position: absolute;
  left: -46px;
  top: 50%;
  width: 26px;
  height: 7px;
  margin-top: -3.5px;
  background: var(--tie);
  border-radius: 2px;
}
.pipe li::after {
  content: '';
  position: absolute;
  left: -22px;
  top: 50%;
  width: 22px;
  height: 2px;
  margin-top: -1px;
  background: var(--tie);
}

.pipe a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 22px 8px 34px;
  background: var(--tag);
  color: var(--ink);
  font: 1.375rem/1.2 var(--font-head);
  text-decoration: none;
  white-space: nowrap;
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%);
  transition: background-color 0.2s, transform 0.25s;
}
.pipe a::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--tag-edge);
}
.pipe a:hover { background: #f6e2a9; }
.pipe a[aria-current] { background: var(--rust); color: var(--on-dark); }

@media (max-width: 379px) {
  .brand-name { display: none; }
}

@media (max-width: 559px) {
  .brand-name small { display: none; }
}

@media (max-width: 479px) {
  .nav-toggle { padding: 0; justify-content: center; }
  .nav-toggle [data-nav-label] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

/* Wide screens: the pipe runs across the header and the tags hang from it. */
@media (min-width: 1180px) {
  .nav-toggle { display: none; }
  .header-bar { gap: 24px; }

  .pipe-nav,
  .pipe-nav.is-open {
    display: block;
    position: static;
    overflow: visible;
    background: none;
    border: 0;
  }

  .pipe {
    display: flex;
    gap: 14px;
    width: auto;
    margin: 0;
    padding: 0 18px;
    height: var(--header-h);
  }
  .pipe::before {
    left: 0;
    right: 0;
    top: 12px;
    bottom: auto;
    width: auto;
    height: 14px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--steel-dark), var(--steel-light) 40%, var(--steel) 75%, var(--steel-dark));
  }

  .pipe li { margin: 0; padding-top: 32px; }
  .pipe li::before {
    left: 50%;
    top: 7px;
    width: 8px;
    height: 24px;
    margin: 0 0 0 -4px;
  }
  .pipe li::after {
    left: 50%;
    top: 29px;
    width: 2px;
    height: 8px;
    margin: 0 0 0 -1px;
  }

  .pipe a {
    min-height: 44px;
    padding: 16px 16px 6px;
    font-size: 1.0625rem;
    clip-path: polygon(0 9px, 9px 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
    transform: rotate(-2deg);
    transform-origin: 50% 0;
  }
  .pipe li:nth-child(even) a { transform: rotate(2deg); }
  .pipe li a:hover,
  .pipe li a[aria-current] { transform: rotate(0deg) translateY(2px); }
  .pipe a::before {
    left: 50%;
    top: 5px;
    margin: 0 0 0 -4px;
  }
}

/* ---------- Hero: the gate and its work order ---------- */
.hero {
  padding: var(--space-l) 0;
  overflow: hidden;
}
.hero-title {
  max-width: 15ch;
  margin-bottom: var(--space-m);
  font-size: var(--fs-h1);
}
.hero-title span { color: var(--rust); }

.hero-grid {
  display: grid;
  gap: var(--space-l);
  align-items: start;
}

.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; }

/* The tag hangs from the latch, which sits 60% across the drawing. */
.order-tag {
  --tag-w: min(330px, 78%);
  position: relative;
  width: var(--tag-w);
  margin: 0 0 0 calc(60% - var(--tag-w) / 2);
  padding: 30px 22px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  clip-path: polygon(0 22px, 22px 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  transform-origin: 50% -14px;
  animation: tag-sway 6s ease-in-out infinite;
}
/* Eyelet; the string above it is drawn in the SVG. */
.order-tag::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 10px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 3px var(--steel);
}
.order-tag-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
  font: 1.25rem/1 var(--font-head);
}
.order-tag-head span {
  font: 700 0.75rem/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.order-tag dl { margin: 0; }
.order-tag dl div {
  display: grid;
  grid-template-columns: 5.6em 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: var(--fs-small);
  line-height: 1.4;
}
.order-tag dt {
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.order-tag dd { margin: 0; }
.order-tag .stamp {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  border: 2px solid var(--rust);
  border-radius: 3px;
  color: var(--rust);
  font: 1rem/1.2 var(--font-head);
  transform: rotate(-3deg);
}

.hero-copy .lead { font-size: var(--fs-lead); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: var(--space-m) 0; }
.hero-hours {
  margin: 0;
  padding-top: var(--space-s);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: var(--fs-small);
}
.hero-hours strong { color: var(--ink); }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .hero-art { grid-column: 1; grid-row: 1; }
  .hero-copy { grid-column: 2; grid-row: 1; padding-top: var(--space-l); }
}

/* ---------- The fix list: a small-parts cabinet ---------- */
.fixes { padding: var(--space-xl) 0; background: var(--paper-deep); }

.cabinet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 10px;
  margin: 0;
  padding: 10px;
  list-style: none;
  background: var(--steel-dark);
  border-radius: 8px;
  box-shadow: inset 0 0 0 4px #49525c, var(--shadow);
}

.drawer {
  position: relative;
  padding: 18px 20px 22px;
  background: linear-gradient(180deg, #fdfbf6, var(--card));
  border-radius: 4px;
  box-shadow: inset 0 -5px 0 rgba(31, 36, 43, 0.1);
}
/* Label holder with the drawer number. */
.drawer-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 2px solid var(--steel);
  border-radius: 3px;
  background: var(--card);
}
.drawer-label span {
  color: var(--rust);
  font: 700 0.875rem/1 var(--font-body);
}
.drawer h3 { font-size: var(--fs-h3); }
.drawer p { margin: 0; color: var(--ink-soft); font-size: var(--fs-small); }
/* Drawer pull. */
.drawer::after {
  content: '';
  display: block;
  width: 56px;
  height: 8px;
  margin: 16px auto 0;
  border-radius: 0 0 8px 8px;
  background: var(--steel);
}

/* ---------- Done right: hack versus fix ---------- */
.right { padding: var(--space-xl) 0; }

.ledger { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.ledger li {
  display: grid;
  gap: 6px 28px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.ledger h3 { font-size: var(--fs-h3); }
.ledger p { margin: 0; }
.ledger .hack {
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-color: rgba(158, 60, 24, 0.65);
  text-decoration-thickness: 2px;
}
.ledger .fix { font-weight: 700; }
.ledger .col-label {
  display: block;
  color: var(--ink-soft);
  font: 700 0.75rem/1.4 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.ledger-head { display: none; }

@media (min-width: 820px) {
  .ledger li,
  .ledger-head { grid-template-columns: 12rem 1fr 1fr; align-items: baseline; }
  .ledger-head {
    display: grid;
    gap: 28px;
    padding: 10px 0;
    color: var(--ink-soft);
    font: 700 0.8125rem/1.4 var(--font-body);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .ledger .col-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

/* Where we stop: the permit line. */
.stop {
  position: relative;
  margin-top: var(--space-l);
  padding: var(--space-m) var(--space-m) var(--space-m) calc(var(--space-m) + 18px);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stop::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 14px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: repeating-linear-gradient(-45deg, var(--caution) 0 12px, var(--tie) 12px 24px);
}
.stop h3 { margin-bottom: var(--space-s); font-size: var(--fs-h3); }
.stop ul { margin: 0 0 1em; padding-left: 1.2em; }
.stop li { margin-bottom: 4px; }
.stop p:last-child { margin-bottom: 0; }

/* ---------- How a job runs: along a tape measure ---------- */
.how { padding: var(--space-xl) 0; background: var(--ink); color: var(--on-dark); }
.how .sec-head p:not(.sec-tag) { color: #cfd4da; }
.how .sec-tag::before { background: var(--ink); }

.tape {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 0 0 64px;
  list-style: none;
  counter-reset: inch;
}
/* The blade: yellow with inch and quarter-inch marks. */
.tape::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 44px;
  border-radius: 3px;
  background:
    repeating-linear-gradient(180deg, var(--tie) 0 2px, transparent 2px 16px) right top / 12px 100% no-repeat,
    repeating-linear-gradient(180deg, var(--tie) 0 2px, transparent 2px 64px) right top / 24px 100% no-repeat,
    var(--caution);
}
.tape li {
  position: relative;
  padding: 10px 0 30px;
  counter-increment: inch;
}
.tape li::before {
  content: counter(inch);
  position: absolute;
  left: -58px;
  top: 8px;
  color: var(--tie);
  font: 1.25rem/1 var(--font-head);
}
.tape h3 { margin-bottom: 6px; font-size: var(--fs-h3); color: var(--tag); }
.tape p { margin: 0; max-width: 36rem; color: #dde1e5; }

@media (min-width: 900px) {
  .tape {
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    padding: 64px 0 0;
  }
  .tape::before {
    left: 0;
    right: 0;
    top: 0;
    bottom: auto;
    width: auto;
    height: 44px;
    background:
      repeating-linear-gradient(90deg, var(--tie) 0 2px, transparent 2px 16px) left bottom / 100% 12px no-repeat,
      repeating-linear-gradient(90deg, var(--tie) 0 2px, transparent 2px 64px) left bottom / 100% 24px no-repeat,
      var(--caution);
  }
  .tape li { padding: 0; }
  .tape li::before { left: 6px; top: -56px; }
}

/* ---------- Rates: a receipt ---------- */
.rates { padding: var(--space-xl) 0; }
.rates-grid { display: grid; gap: var(--space-l); align-items: start; }

.receipt {
  position: relative;
  max-width: 30rem;
  padding: 30px 28px 40px;
  background: #fffdf8;
  box-shadow: var(--shadow);
  /* Torn bottom edge. */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), 95% 100%, 90% calc(100% - 10px), 85% 100%, 80% calc(100% - 10px), 75% 100%, 70% calc(100% - 10px), 65% 100%, 60% calc(100% - 10px), 55% 100%, 50% calc(100% - 10px), 45% 100%, 40% calc(100% - 10px), 35% 100%, 30% calc(100% - 10px), 25% 100%, 20% calc(100% - 10px), 15% 100%, 10% calc(100% - 10px), 5% 100%, 0 calc(100% - 10px));
}
.receipt-head {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--line);
  text-align: center;
}
.receipt-head p { margin: 4px 0 0; color: var(--ink-soft); font-size: var(--fs-small); }
.receipt-head strong { display: block; font: 1.5rem/1.2 var(--font-head); color: var(--ink); }
.receipt ul { margin: 0; padding: 0; list-style: none; }
.receipt li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  font-size: var(--fs-small);
}
.receipt li span:first-child { flex: 0 1 auto; }
/* Dotted leader between item and price. */
.receipt li::after {
  content: '';
  order: 1;
  flex: 1 1 24px;
  min-width: 24px;
  border-bottom: 2px dotted var(--line);
}
.receipt li span:last-child { order: 2; font-weight: 700; white-space: nowrap; }
.receipt small { display: block; color: var(--ink-soft); font-size: 0.8125rem; }
.receipt-foot {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 2px dashed var(--line);
  color: var(--ink-soft);
  font-size: 0.875rem;
  text-align: center;
}

.terms-list { margin: 0; padding: 0; list-style: none; }
.terms-list li {
  padding: 14px 0 14px 34px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
/* A screw head as the bullet. */
.terms-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 19px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    linear-gradient(45deg, transparent 44%, var(--steel-dark) 44% 56%, transparent 56%),
    linear-gradient(-45deg, transparent 44%, var(--steel-dark) 44% 56%, transparent 56%),
    var(--steel-light);
  box-shadow: 0 0 0 1.5px var(--steel);
}
.terms-list strong { display: block; }

@media (min-width: 900px) {
  .rates-grid { grid-template-columns: minmax(0, 30rem) minmax(0, 1fr); gap: var(--space-xl); }
}

/* ---------- Where: masking-tape labels ---------- */
.where { padding: var(--space-xl) 0; background: var(--paper-deep); }
.where-group + .where-group { margin-top: var(--space-m); }
.where-group h3 { margin-bottom: 12px; font-size: var(--fs-h3); }
.tape-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tape-labels li {
  padding: 6px 14px;
  background: #efe6c9;
  color: var(--ink);
  font: 1.0625rem/1.4 var(--font-head);
  box-shadow: 0 1px 2px rgba(31, 36, 43, 0.15);
  /* Torn tape ends. */
  clip-path: polygon(0 8%, 3% 0, 97% 4%, 100% 0, 99% 50%, 100% 96%, 96% 100%, 4% 94%, 0 100%, 1% 50%);
  transform: rotate(-1deg);
}
.tape-labels li:nth-child(3n) { transform: rotate(1.2deg); }
.tape-labels li:nth-child(4n) { transform: rotate(-0.4deg); }
.where-note { margin: var(--space-m) 0 0; max-width: 44rem; color: var(--ink-soft); }

/* ---------- Questions: tickets on a spike ---------- */
.questions { padding: var(--space-xl) 0; }
.spike {
  position: relative;
  max-width: 52rem;
  padding-left: 46px;
}
/* The spike: a steel rod on a weighted base. */
.spike::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 10px;
  width: 4px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, var(--steel-dark), var(--steel-light), var(--steel));
}
.spike::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 34px;
  height: 12px;
  border-radius: 4px;
  background: var(--tie);
}

.ticket {
  position: relative;
  margin-bottom: 12px;
  background: var(--card);
  border-left: 3px dashed var(--line);
  box-shadow: var(--shadow);
}
.ticket:nth-child(odd) { transform: rotate(-0.4deg); }
.ticket:nth-child(even) { transform: rotate(0.4deg); }
/* Hole where the spike goes through. */
.ticket::before {
  content: '';
  position: absolute;
  left: -38px;
  top: 22px;
  width: 26px;
  height: 4px;
  background: var(--steel);
}
.ticket summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  padding: 14px 20px;
  font: var(--fs-h3)/1.3 var(--font-head);
  cursor: pointer;
  list-style: none;
}
.ticket summary::-webkit-details-marker { display: none; }
.ticket summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font: 700 1.125rem/1 var(--font-body);
}
.ticket[open] summary::after { content: '–'; }
.ticket summary:hover { color: var(--blue); }
.ticket-body { padding: 0 20px 18px; color: var(--ink-soft); }
.ticket-body p:last-child { margin-bottom: 0; }

/* ---------- Book: the work-order form ---------- */
.book { padding: var(--space-xl) 0; background: var(--paper-deep); }

.work-order {
  max-width: 62rem;
  margin: 0 auto;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 4px;
  /* A carbon copy peeking out underneath. */
  box-shadow: 8px 8px 0 -2px #e3e9f5, 8px 8px 0 0 var(--blue);
}
.wo-head {
  display: grid;
  gap: 8px 24px;
  padding: 18px 22px;
  border-bottom: 2px solid var(--ink);
  background: var(--tag);
}
.wo-head h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
.wo-head p { margin: 0; font-size: var(--fs-small); }
.wo-head a { color: var(--ink); font-weight: 700; }
.wo-contact { display: flex; flex-wrap: wrap; gap: 4px 18px; }

@media (min-width: 820px) {
  .wo-head { grid-template-columns: 1fr auto; align-items: end; }
  .wo-contact { flex-direction: column; text-align: right; }
}

.wo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

/* Each field is a box on the form, label in its top corner. */
.box {
  display: flex;
  flex-direction: column;
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  margin: 0 -1px 0 0;
}
.box-wide { grid-column: 1 / -1; }
.box label,
.box legend {
  padding: 0;
  color: var(--ink-soft);
  font: 700 0.8125rem/1.4 var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.box .req { color: var(--rust); }
.box .choice {
  color: var(--ink);
  font: 1rem/1.4 var(--font-body);
  letter-spacing: 0;
  text-transform: none;
}
.box .hint {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.box input,
.box select,
.box textarea {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-bottom: 2px solid var(--steel);
  border-radius: 3px 3px 0 0;
  background: #f5f1e6;
  color: var(--ink);
  font: 1.0625rem/1.4 var(--font-body);
}
.box textarea { min-height: 132px; resize: vertical; }
.box input:focus-visible,
.box select:focus-visible,
.box textarea:focus-visible { outline-offset: 0; border-bottom-color: var(--blue); }
.box [aria-invalid="true"] { border-bottom-color: var(--rust); background: #f8e9e2; }

.field-error {
  min-height: 0;
  margin: 4px 0 0;
  color: var(--rust);
  font-size: 0.875rem;
  font-weight: 700;
}
.field-error:empty { display: none; }

fieldset.box { min-width: 0; margin: 0 -1px 0 0; border-top: 0; border-left: 0; }
fieldset.box legend { float: left; width: 100%; }
.choices {
  clear: both;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-top: 8px;
}
.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 1rem;
  cursor: pointer;
}
.choice input { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--blue); }

.wo-foot {
  display: grid;
  gap: 14px;
  padding: 18px 22px 22px;
}
.wo-foot p { margin: 0; color: var(--ink-soft); font-size: var(--fs-small); }
.wo-foot .btn { justify-self: start; }

.form-status { padding: 12px 14px; border-radius: var(--radius); font-size: var(--fs-small); }
.form-status:empty { display: none; }
.form-status.is-success { background: #e2ecdc; color: #23421c; }
.form-status.is-error { background: #f8e2da; color: #6f2410; }

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

/* ---------- Footer: the toolbox lid ---------- */
.site-footer {
  position: relative;
  margin-top: 0;
  padding: var(--space-l) 0 var(--space-m);
  background: var(--box);
  color: var(--on-dark);
  border-top: 6px solid var(--box-deep);
}
/* Handle on the lid. */
.site-footer::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -46px;
  width: 180px;
  height: 40px;
  margin-left: -90px;
  border: 10px solid var(--box-deep);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: var(--tag); }
.site-footer :focus-visible { outline-color: var(--tag); }

.foot-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  padding-bottom: var(--space-m);
  border-bottom: 1px solid rgba(247, 241, 228, 0.3);
}
.foot-brand p { margin: 0; }
.foot-name { font: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem)/1.1 var(--font-head); }
.foot-reach { display: flex; flex-wrap: wrap; gap: 6px 24px; font-weight: 700; }
.foot-reach a { display: inline-flex; align-items: center; min-height: 44px; }

.foot-facts {
  margin: var(--space-m) 0;
  max-width: 54rem;
  color: #eadfd0;
  font-size: var(--fs-small);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-small);
}
.foot-links a,
.foot-links button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.foot-links button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--on-dark);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.foot-links button:hover { color: var(--tag); }
.foot-links li:last-child { margin-left: auto; color: #eadfd0; }

/* ---------- Pages: legal documents on a clipboard ---------- */
.doc-page { padding: var(--space-l) 0 var(--space-xl); }
.clipboard {
  position: relative;
  max-width: 54rem;
  margin: 30px auto 0;
  padding: clamp(14px, 2.5vw, 28px);
  background: #9c7148;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
/* The clip. */
.clipboard::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -22px;
  width: 150px;
  height: 46px;
  margin-left: -75px;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, var(--steel-light), var(--steel) 60%, var(--steel-dark));
  box-shadow: 0 3px 6px rgba(31, 36, 43, 0.35);
}
.sheet {
  padding: clamp(28px, 4vw, 56px) clamp(18px, 4vw, 56px);
  background: #fffdf8;
  border-radius: 4px;
}
.sheet h1 { margin-bottom: 8px; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); }
.sheet .updated { color: var(--ink-soft); font-size: var(--fs-small); }
.sheet .intro { font-size: var(--fs-lead); }
.sheet h2 {
  margin: 2.2em 0 0.6em;
  padding-top: 0.8em;
  border-top: 1px dashed var(--line);
  font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem);
}
.sheet h3 { margin: 1.6em 0 0.5em; font-size: 1.25rem; }
.sheet ul { padding-left: 1.25em; }
.sheet li { margin-bottom: 0.45em; }
.sheet address { font-style: normal; }

/* Tables stack into label/value blocks on narrow screens. */
.data-table { width: 100%; margin: 1em 0 1.5em; border-collapse: collapse; font-size: var(--fs-small); }
.data-table caption { margin-bottom: 8px; text-align: left; font-weight: 700; }
.data-table th,
.data-table td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table thead th { background: var(--paper-deep); }

@media (max-width: 719px) {
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .data-table tr { display: block; margin-bottom: 14px; border: 1px solid var(--line); }
  .data-table td { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; border: 0; border-bottom: 1px solid var(--paper-deep); }
  .data-table td::before { content: attr(data-label); font-weight: 700; color: var(--ink-soft); }
}

/* 404 */
.lost { padding: var(--space-xl) 0; }
.lost-inner { display: grid; gap: var(--space-l); align-items: center; }
.lost h1 { font-size: var(--fs-h1); margin-bottom: var(--space-s); }
.lost .lead { font-size: var(--fs-lead); max-width: 32rem; }
.lost svg { max-width: 360px; }
.lost-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--space-m); }
@media (min-width: 820px) {
  .lost-inner { grid-template-columns: 1fr 1fr; }
}

/* ---------- Consent banner and dialog ---------- */
.consent {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 50;
  width: min(44rem, 100% - 24px);
  padding: 20px 22px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-top: 10px solid var(--tag);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px -18px rgba(31, 36, 43, 0.7);
  transform: translateX(-50%);
}
.consent-title { margin-bottom: 8px; font-size: 1.375rem; }
.consent-text { font-size: var(--fs-small); }
.consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.consent-btn {
  flex: 1 1 9rem;
  min-height: 46px;
  padding: 0 16px;
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font: 700 1rem/1 var(--font-body);
  cursor: pointer;
}
.consent-btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.consent-link {
  min-height: 46px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--ink);
  font: 700 1rem/1 var(--font-body);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.consent-link:hover { color: var(--blue); }

.consent-dialog {
  width: min(36rem, 100% - 24px);
  max-height: calc(100% - 24px);
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
}
.consent-dialog::backdrop { background: rgba(31, 36, 43, 0.6); }
.consent-dialog-inner { padding: 24px; }
.consent-categories { margin: 16px 0; padding: 0; list-style: none; }
.consent-category { padding: 14px 0; border-top: 1px solid var(--line); }
.consent-category h3 { font-size: 1.125rem; }
.consent-category p { margin: 6px 0 0; color: var(--ink-soft); font-size: var(--fs-small); }
.consent-category-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.consent-always { color: var(--ink-soft); font-size: 0.875rem; font-weight: 700; }
.consent-btn-save { flex-basis: 100%; background: var(--ink); border-color: var(--ink); }
.consent-btn-save:hover { background: #000; border-color: #000; }

.consent-switch { position: relative; display: inline-flex; min-width: 56px; min-height: 44px; align-items: center; cursor: pointer; }
.consent-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.consent-switch-track {
  position: relative;
  width: 52px;
  height: 28px;
  border-radius: 14px;
  background: var(--steel-dark);
  transition: background-color 0.2s;
}
.consent-switch-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.consent-switch input:checked + .consent-switch-track { background: var(--blue); }
.consent-switch input:checked + .consent-switch-track::after { transform: translateX(24px); }
.consent-switch input:focus-visible + .consent-switch-track { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- Utilities ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Motion ---------- */
@keyframes tag-sway {
  0%, 100% { transform: rotate(-1.6deg); }
  50% { transform: rotate(1.6deg); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .site-footer,
  .consent,
  .skip-link { display: none; }
  body { background: #fff; }
  .clipboard { padding: 0; background: none; box-shadow: none; }
  .clipboard::before { display: none; }
}
