/* George's Shoe & Skate Repair: shared system. Page stylesheets add to this and never restate it. */

/* TOKENS: palette, fonts, measures. Use the variables; never lighten --straw. --head-h is kept live by site.js. */
:root {
  --straw: #F6DE83;
  --ink: #302706;
  --teal: #006B64;
  --bar: 0.5625rem;
  --display: 'Allerta Stencil', 'Trebuchet MS', 'Arial Narrow', sans-serif;
  --text: 'Cabin', 'Gill Sans', 'Trebuchet MS', sans-serif;
  --pad: clamp(1rem, 3.2vw, 2.75rem);
  --gap: clamp(1.25rem, 2.4vw, 2.25rem);
  --sect: clamp(2.5rem, 9vh, 6.5rem);
  --head-h: 3.75rem;
  --quick: 90ms;
}

/* BASE: Cabin ships at weight 400 only, so nothing on this site is bold. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--straw); color: var(--ink); font: 400 1.0625rem/1.55 var(--text); }
img, video, svg { display: block; max-width: 100%; height: auto; }
p, ul, ol, dl { margin: 0 0 1.1em; }
strong, b, th, dt { font-weight: 400; }
button { font: inherit; color: inherit; }
address { font-style: normal; }

/* HEADINGS: Allerta Stencil 400, sentence case, natural spacing. h1 tops out at 2.25rem, h2 at 1.9rem, h3 1.3rem. */
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.18; margin: 0 0 0.6em; letter-spacing: normal; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
h2 { font-size: clamp(1.55rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.3rem; }

/* LINKS: text links are teal and underlined; .link-plain is the ink version (directions link). */
a { color: var(--teal); text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; transition: color var(--quick) linear; }
a:hover { color: var(--ink); }
.link-plain { color: var(--ink); display: inline-flex; align-items: center; min-height: 2.75rem; }
.link-plain:hover { color: var(--teal); }
:focus-visible { outline: 0.1875rem solid var(--teal); outline-offset: 0.2rem; }

/* CONTROLS: unboxed underlined text buttons, .ctl; the chosen one carries aria-pressed="true"; row them in .ctl-row. */
.ctl-row { display: flex; flex-wrap: nowrap; gap: 0 1.5rem; overflow-x: auto; scrollbar-width: none; }
.ctl { background: none; border: 0; padding: 0; min-height: 2.75rem; cursor: pointer; font-size: 1.0625rem; white-space: nowrap; text-decoration: underline dotted; text-decoration-thickness: 0.1em; text-underline-offset: 0.3em; }
.ctl:hover { color: var(--teal); }
.ctl[aria-pressed="true"] { text-decoration-style: solid; text-decoration-thickness: 0.16em; }

/* UTILITIES: .sr hides text visually; .bar is a standalone 9px teal block-start bar. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bar { display: block; height: var(--bar); background: var(--teal); border: 0; margin: 0 0 1.25rem; }

/* SKIP LINK: .skip, appears on focus. */
.skip { position: absolute; left: -999rem; top: 0.5rem; z-index: 50; background: var(--ink); color: var(--straw); padding: 0.75rem 1rem; }
.skip:focus { left: 0.5rem; }

/* CHROME: .top wraps the consent strip and the contents line; sticky on desktop only. */
.top { position: relative; z-index: 20; background: var(--straw); }
.head { display: flex; flex-direction: column; padding: 0.25rem var(--pad) 0; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; flex: none; color: var(--ink); text-decoration: none; font-size: 1rem; white-space: nowrap; }
.brand:hover span { text-decoration: underline; }
.brand__mark { width: 2.3rem; height: auto; flex: none; }

/* CONTENTS LINE: .contents, the numbered nav joined by dotted leaders; the active step is underlined. */
.contents { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.contents::-webkit-scrollbar, .ctl-row::-webkit-scrollbar { display: none; }
.contents ul { display: flex; list-style: none; margin: 0; padding: 0; white-space: nowrap; }
.contents li { display: flex; align-items: center; flex: 1 1 auto; }
.contents li::before { content: ""; flex: 1; min-width: 0.6rem; margin-inline: 0.35rem; border-bottom: 0.125rem dotted var(--ink); opacity: 0.6; }
.contents li:first-child { flex: none; }
.contents li:first-child::before { display: none; }
.contents a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink); text-decoration: none; font-size: 1rem; }
.contents a:hover { text-decoration: underline; text-underline-offset: 0.3em; }
.contents a[aria-current] { text-decoration: underline; text-decoration-thickness: 0.14em; text-underline-offset: 0.3em; }
.contents a:focus-visible { outline-offset: -0.15rem; }

/* SPLIT: .split holds two equal halves; .split__held is the reading pane (sticky on desktop), .split__run scrolls; .split__foot pins a last item to the pane's bottom. */
.split { display: grid; grid-template-columns: minmax(0, 1fr); }
.split__held { display: flex; flex-direction: column; padding: var(--pad) var(--pad) 1rem; background: var(--straw); min-width: 0; }
.split__run { padding: 1rem var(--pad) var(--pad); min-width: 0; }
.split__foot { margin-top: auto; }

/* BAND: .band is a full-width section outside the split, with the page's side padding. */
.band { padding: 0 var(--pad) var(--sect); }

/* BLOCK: .block starts every major block with the 9px teal bar across its content width. */
.block { border-top: var(--bar) solid var(--teal); padding: 1.25rem 0 var(--sect); }
.block:last-child { padding-bottom: var(--gap); }

/* PAGE OPENING (held pane): .quote the owner line, .sign the small signature h1, .step the step label, .where the location line, .lede the first sentence. */
.quote { font-family: var(--display); font-size: 2.15rem; line-height: 1.15; margin: 0 0 1.5rem; text-wrap: balance; }
.quote::before { content: "\201C"; }
.quote::after { content: "\201D"; }
.sign { font-size: 1.55rem; margin: 0 0 0.35rem; }
.step { display: block; font-family: var(--text); font-size: 1rem; margin: 0 0 0.5rem; }
.where { margin: 0 0 0.5rem; }
.lede { font-size: 1.2rem; line-height: 1.45; max-width: 34rem; }

/* THE DEVICE, worn/sound pair: .pair with two children (.pair__worn left, .pair__sound right), each headed by .pair__head; .pair--bare drops the bar, .pair--stack stacks on phones. */
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gap); row-gap: 1rem; border-top: var(--bar) solid var(--teal); padding-top: 1rem; margin: 0 0 var(--gap); }
.pair--bare { border-top: 0; padding-top: 0; }
.pair__head { font-family: var(--display); font-size: 1.3rem; line-height: 1.18; margin: 0 0 0.4em; }
.pair ul { list-style: none; margin: 0; padding: 0; }
.pair li { padding-block: 0.2rem; }
.pair p:last-child { margin-bottom: 0; }

/* FIGURE: .shot is a square-cornered still life (1:1); .shot--tall 4:5, .shot--wide 3:2, .shot--first fills the first window on desktop; caption is .shot__cap. */
.shot { position: relative; margin: 0 0 var(--gap); }
.shot img, .shot video { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 0; }
.shot--tall img, .shot--tall video { aspect-ratio: 4 / 5; }
.shot--wide img, .shot--wide video { aspect-ratio: 3 / 2; }
.shot__cap { font-size: 0.95rem; padding-top: 0.6rem; max-width: 34rem; }

/* STAMP: .stamp is the round teal mail-in sticker (link to dropoff.html#mail-in), rotated six degrees; inside a caption-less .shot it sits in the lower outside corner; .stamp--flat is unrotated. */
.stamp { display: grid; place-items: center; width: 6.75rem; aspect-ratio: 1; padding: 0.5rem; border-radius: 50%; background: var(--teal); color: var(--straw); font-family: var(--display); font-size: 0.9rem; line-height: 1.15; text-align: center; text-decoration: none; transform: rotate(6deg); transition: background-color var(--quick) linear; }
.stamp:hover { background: var(--ink); color: var(--straw); }
.shot .stamp { position: absolute; right: 0.75rem; bottom: 0.75rem; }
.stamp--flat { transform: none; }

/* LEADER: .leader is a dotted run that fills the space between two things in a flex row. */
.leader { flex: 1 1 1.5rem; min-width: 1.5rem; align-self: baseline; border-bottom: 0.125rem dotted currentColor; opacity: 0.6; }

/* LEDGER: .ledger (ul, ol or dl) of .ledger__row; the first child is the label and grows a dotted leader, the last child is the value. */
.ledger { list-style: none; margin: 0 0 1.1em; padding: 0; }
.ledger__row { display: flex; align-items: baseline; gap: 0.6rem; margin: 0; padding-block: 0.55rem; font-size: 1rem; color: var(--ink); }
.ledger__row > :first-child { flex: 1 1 auto; display: flex; align-items: baseline; gap: 0.6rem; margin: 0; }
.ledger__row > :first-child::after { content: ""; flex: 1; min-width: 1.5rem; border-bottom: 0.125rem dotted currentColor; opacity: 0.6; }
.ledger__row > :last-child { flex: 0 1 auto; max-width: 60%; margin: 0; text-align: right; }

/* SCROLL SPY (site.js): mark chapters with id + data-spy; links with data-spy-link gain .is-current; panels with data-spy-show="id" gain .is-out when not current. */
.is-current { text-decoration: underline; text-decoration-thickness: 0.14em; text-underline-offset: 0.3em; }

/* SWAP: .swap stacks its children in one cell on desktop once script runs (html.spy); the ones marked .is-out are hidden, never overlapped. */
.swap { display: grid; grid-template-columns: minmax(0, 1fr); }

/* REVEAL: .reveal gets .is-seen from site.js as a state hook only; by art direction nothing fades or slides in. */
.reveal, .reveal.is-seen { opacity: 1; transform: none; }

/* HAND-OFF: a.next is the last block of a page, pointing to the next step: label, .leader, destination. */
.next { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; border-top: var(--bar) solid var(--teal); padding: 1.25rem 0 0.5rem; min-height: 2.75rem; font-family: var(--display); font-size: clamp(1.55rem, 2.4vw, 1.9rem); line-height: 1.18; color: var(--ink); text-decoration: none; }
.next:hover { color: var(--teal); }

/* PROSE: .prose sets long reading text (policies, legal) at a readable measure. */
.prose { max-width: 40rem; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.35em; }

/* CONSENT: #consent is a full-width ink strip above the contents line, two equal underlined choices on one tight line. */
#consent { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.25rem; padding: 0.2rem var(--pad) 0.2rem; background: var(--ink); color: var(--straw); font-size: 1rem; line-height: 1.3; }
#consent[hidden] { display: none; }
#consent p { flex: 1 1 100%; margin: 0; padding: 0.1rem 0; }
#consent a { color: var(--straw); }
#consent button { background: none; border: 0; padding: 0; min-height: 2.75rem; cursor: pointer; color: var(--straw); font-size: 1rem; text-decoration: underline; text-decoration-thickness: 0.1em; text-underline-offset: 0.3em; }
#consent button:hover { text-decoration-thickness: 0.18em; }
#consent :focus-visible { outline-color: var(--straw); }

/* FOOTER: .foot is one empty straw field with a single narrow column, .foot__col, at the far right:
   name, address, the four ways to reach the shop, then the privacy controls on one line. */
.foot { display: flex; justify-content: flex-start; padding: var(--sect) var(--pad) 5.5rem; }
.foot__col { width: 100%; border-top: var(--bar) solid var(--teal); padding-top: 1rem; }
.foot__name { font-size: 1.2rem; margin: 0 0 0.5rem; }
.foot address { margin: 0 0 0.75rem; }
.foot address span { display: block; }
.foot ul { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.foot__legal { display: flex; flex-wrap: wrap; gap: 0 1.25rem; align-items: center; }
.foot a, .foot button { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink); overflow-wrap: anywhere; }
.foot a:hover, .foot button:hover { color: var(--teal); }
.foot button { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; }

/* CALL: .call is the one-tap phone strip pinned across the bottom on phones, on its own ink ground,
   the twin of the consent strip and never a floating box over a photograph. */
.call { display: flex; align-items: center; justify-content: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 23; min-height: 2.75rem; padding: 0.2rem var(--pad); background: var(--ink); color: var(--straw); font-size: 1rem; text-decoration: underline; text-decoration-thickness: 0.1em; text-underline-offset: 0.3em; }
.call:hover { color: var(--straw); text-decoration-thickness: 0.18em; }
.call:focus-visible { outline-color: var(--straw); outline-offset: -0.25rem; }

/* OFFER BAR: #promo rests below the bottom edge and arrives as #promo.is-in; teal ground, stacked above the call strip. */
#promo { display: flex; align-items: center; gap: 0.25rem 1rem; flex-wrap: wrap; position: fixed; left: 0; bottom: 3.5rem; z-index: 24; max-width: 100%; padding: 0.35rem 0.5rem 0.35rem 1rem; background: var(--teal); color: var(--straw); font-size: 1rem; line-height: 1.35; transform: translateY(calc(100% + 3.5rem)); opacity: 0; transition: transform 140ms linear, opacity 140ms linear; }
#promo[hidden] { display: none; }
#promo.is-in { transform: none; opacity: 1; }
#promo p { flex: 1 1 12rem; margin: 0; }
#promo a { color: var(--straw); display: inline-flex; align-items: center; min-height: 2.75rem; }
#promo button { background: none; border: 0; width: 2.75rem; height: 2.75rem; cursor: pointer; color: var(--straw); font-size: 1.4rem; line-height: 1; }
#promo :focus-visible { outline-color: var(--straw); }

/* PHONE (below 820px): two-column pairs marked .pair--stack fall into one column; the footer clears the call strip. */
@media (max-width: 51.24rem) {
  .pair--stack { grid-template-columns: minmax(0, 1fr); }
  .foot { padding-bottom: 6rem; }
}

/* DESKTOP (820px and up): the split holds, the contents line sticks, the footer column moves to the far right. */
@media (min-width: 51.25rem) {
  html { scroll-padding-top: calc(var(--head-h) + 1rem); }
  .top { position: sticky; top: 0; }
  .head { flex-direction: row; align-items: center; padding: 0.25rem var(--pad); }
  .contents li:first-child { flex: 1 1 auto; }
  .contents li:first-child::before { display: block; }
  .contents li::before { min-width: 1.5rem; margin-inline: 0.75rem; }

  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split__held { position: sticky; top: var(--head-h); align-self: start; min-height: calc(100vh - var(--head-h)); min-height: calc(100svh - var(--head-h)); padding: var(--pad); }
  .split__run { padding: var(--pad); }

  .quote { font-size: 2.9rem; }
  .shot--first img, .shot--first video { aspect-ratio: auto; height: calc(100vh - var(--head-h) - var(--pad) * 2); height: calc(100svh - var(--head-h) - var(--pad) * 2); min-height: 22rem; }
  .stamp { width: 7.75rem; padding: 0.9rem; font-size: 1rem; }
  .shot .stamp { right: 1.25rem; bottom: 1.25rem; }

  .spy .swap > * { grid-area: 1 / 1; }
  .spy .swap > .is-out { visibility: hidden; }

  .foot { justify-content: flex-end; padding-bottom: var(--pad); }
  .foot__col { width: 17rem; }
  .foot a, .foot button { min-height: 2.25rem; }
  .call { display: none; }
  #promo { max-width: 30rem; bottom: 0; transform: translateY(100%); }
}

/* REDUCED MOTION: the few colour transitions and the offer's arrival are removed. */
@media (prefers-reduced-motion: reduce) {
  a, .stamp, #promo { transition: none; }
}

/* A page never scrolls sideways. */
html, body { overflow-x: clip; }
/* Past a full-HD window the whole page grows with the window - type, gaps and pictures
   together - so a very wide screen (or a page zoomed far out) shows the same composition,
   not a small column of text lost in an enormous picture. */
@media (min-width: 1921px) { html { font-size: calc(100vw / 120); } }
/* What can be pressed in the chrome lies above the page: a huge headline's line box reaching
   into the navigation must not swallow the clicks meant for the links. */
header a, header button, nav a, nav button { position: relative; z-index: 2; }
/* A visitor who asked the system for less motion gets none, whatever a page forgot. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
