/* Pasley Home Services. Colours from the business card: safety yellow and black. */
:root {
  --yellow: #FFC800;
  --black: #000000;
  --white: #FFFFFF;
  --paper: #E4E2DD;
  --stone: #3A3A3A;
  --display: Archivo, Arial, sans-serif;
  --body: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
  --hand: Caveat, 'Segoe Print', cursive;
  --spine: 76px;
  --foot: 96px;              /* one foot of tape */
  --gutter: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--black); color: var(--black); font-family: var(--body); font-size: 1.125rem; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; } /* allowed: image containment */
a { color: var(--black); }
a:hover { color: var(--stone); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
h1, h2 { font-family: var(--display); font-stretch: 112%; font-weight: 900; margin: 0; }
h2 { font-size: clamp(2rem, 1.5rem + 2vw, 3.25rem); line-height: 1; }
p { margin: 0; }

.skip { position: absolute; left: -999px; top: 0; background: var(--yellow); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---- frame: tape spine down the left edge ---- */
.frame { display: flex; align-items: stretch; background: var(--paper); min-height: 100vh; }
.frame__main { flex: 1 1 0; min-width: 0; }
.spine {
  flex: 0 0 var(--spine); position: relative; overflow: hidden;
  background-color: var(--yellow); border-right: 3px solid var(--black);
  background-image:
    repeating-linear-gradient(180deg, var(--black) 0 2px, transparent 2px var(--foot)),
    repeating-linear-gradient(180deg, var(--black) 0 2px, transparent 2px calc(var(--foot) / 2)),
    repeating-linear-gradient(180deg, var(--black) 0 1px, transparent 1px calc(var(--foot) / 8));
  background-size: 40px 100%, 26px 100%, 14px 100%;
  background-repeat: repeat-y;
  background-position: right top, right top, right top;
}
.spine__feet { position: absolute; inset: 0 auto auto 0; display: flex; flex-direction: column; font-family: var(--display); font-weight: 800; font-size: 0.9rem; }
.spine__feet span { flex: 0 0 var(--foot); height: var(--foot); padding: 4px 0 0 8px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); } /* allowed: the page container */

/* ---- header ---- */
.top { background: var(--black); color: var(--white); }
.top__inner { padding-top: 18px; padding-bottom: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.brand { color: var(--yellow); text-decoration: none; font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: 1.5rem; }
.brand:hover { color: var(--yellow); }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 3rem; width: auto; }
.top nav { display: flex; flex-wrap: wrap; gap: 28px; font-weight: 600; }
.top nav a { color: var(--white); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.top nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.top nav a.nav-cta { color: var(--yellow); }

/* ---- hero + page heads ---- */
.hero, .pagehead { background: var(--black); color: var(--white); position: relative; overflow: hidden; }
.hero__logo { position: absolute; top: 50%; right: 0; transform: translateY(-50%); width: 72%; opacity: 0.32; pointer-events: none; }
.hero__inner { position: relative; padding-top: 72px; padding-bottom: 104px; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(2.1rem, 1.2rem + 5vw, 5.5rem); line-height: 0.95; overflow-wrap: break-word; hyphens: auto; }
.pagehead .wrap { padding-top: 56px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 18px; }
.pagehead h1 { font-size: clamp(2.5rem, 1.7rem + 3vw, 4.5rem); line-height: 0.95; }
.h1__place { display: block; font-size: 0.45em; font-stretch: 100%; color: var(--yellow); margin-top: 10px; }
.hero__lede { font-size: 1.35rem; }
.crumb a { color: var(--yellow); font-weight: 700; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { text-decoration: none; font-weight: 700; padding: 12px 20px; min-height: 44px; display: inline-flex; align-items: center; }
.btn--solid { background: var(--yellow); color: var(--black); border: 2px solid var(--yellow); }
.btn--solid:hover { color: var(--black); background: var(--white); border-color: var(--white); }
.btn--line { border: 2px solid var(--yellow); color: var(--yellow); }
.btn--line:hover { color: var(--black); background: var(--yellow); }

/* ---- content blocks ---- */
.block { padding: 64px 0 24px; display: flex; flex-direction: column; gap: 20px; }
.block:last-child { padding-bottom: 80px; }
.big { font-size: 1.3rem; }
.tag { display: flex; align-items: center; gap: 12px; margin-left: calc(var(--gutter) * -1); }
.tag__line { width: var(--gutter); height: 3px; background: var(--black); }
.tag__label { background: var(--black); color: var(--yellow); font-family: var(--display); font-weight: 800; font-size: 0.9rem; padding: 2px 10px; }

/* recent work: offset, slightly tilted prints with a measured caption */
.pieces { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
.piece { text-decoration: none; grid-column: span 4; }
.piece:nth-child(5n+1) { grid-column: 1 / span 7; transform: rotate(-1deg); }
.piece:nth-child(5n+2) { grid-column: 8 / span 5; margin-top: 64px; transform: rotate(1.5deg); }
.piece:nth-child(5n+3) { grid-column: 2 / span 4; margin-top: -24px; transform: rotate(0.5deg); }
.piece:nth-child(5n+4) { grid-column: 6 / span 4; margin-top: 24px; transform: rotate(-1.5deg); }
.piece:nth-child(5n+5) { grid-column: 10 / span 3; margin-top: -40px; transform: rotate(1deg); }
.piece figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.piece img { border: 6px solid var(--white); box-shadow: 0 2px 0 var(--black); }
.piece:hover img, .piece:focus-visible img { border-color: var(--yellow); }
.measure { display: flex; align-items: center; gap: 8px; font-family: var(--hand); font-size: 1.6rem; line-height: 1; }
.measure__end { width: 2px; height: 14px; background: var(--black); }
.measure__line { flex: 1 1 20px; height: 2px; background: var(--black); }

/* before / after */
.ba { position: relative; aspect-ratio: 16 / 7; overflow: hidden; border: 3px solid var(--black); background: var(--stone); }
.ba img { width: 100%; height: 100%; object-fit: cover; }
.ba__after { position: absolute; inset: 0; }
.ba__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.ba::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--split); width: 4px; margin-left: -2px; background: var(--yellow); }
.ba__control { display: flex; align-items: center; gap: 16px; font-weight: 700; }
.ba__control input { flex: 1 1 auto; min-height: 44px; accent-color: var(--yellow); }

/* project page */
.facts { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 0; border-top: 3px solid var(--black); padding-top: 16px; }
.facts dt { font-family: var(--display); font-weight: 800; font-size: 0.9rem; }
.facts dd { margin: 0; font-size: 1.2rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; border: 6px solid var(--white); box-shadow: 0 2px 0 var(--black); }
.next { padding: 8px 0 80px; font-weight: 700; font-size: 1.2rem; }

/* questions */
.faq { display: flex; flex-direction: column; border-top: 3px solid var(--black); }
.faq details { border-bottom: 1px solid var(--black); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.2rem; display: flex; justify-content: space-between; gap: 16px; min-height: 44px; align-items: center; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] .plus { transform: rotate(45deg); }
.plus { font-family: var(--display); font-weight: 900; }
.faq details p { margin-top: 10px; }

/* contact */
.contact { background: var(--yellow); }
.contact__inner { padding-top: 72px; padding-bottom: 72px; display: flex; flex-wrap: wrap; gap: 40px; }
.contact__text { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.strong { font-weight: 700; }
.reach { flex: 2 1 460px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 16px; align-content: center; }
.reach__btn { display: flex; flex-direction: column; gap: 4px; padding: 20px 24px; background: var(--black); color: var(--yellow); text-decoration: none; min-height: 44px; overflow-wrap: anywhere; }
.reach__btn:hover, .reach__btn:focus-visible { color: var(--white); }
.reach__label { font-weight: 700; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; }
.reach__value { font-weight: 700; font-size: 1.35rem; }
.form { flex: 2 1 460px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.form input, .form textarea { font: inherit; font-weight: 400; padding: 12px; border: 2px solid var(--black); background: var(--white); min-height: 44px; }
.form textarea { resize: vertical; }
.form__full { grid-column: 1 / -1; }
.form button { font: inherit; font-weight: 700; background: var(--black); color: var(--yellow); border: 0; padding: 14px 28px; min-height: 44px; cursor: pointer; }
.form button:hover { color: var(--white); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* footer */
.foot { background: var(--black); color: var(--white); }
.foot__inner { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 1rem; }
.foot__name { font-family: var(--display); font-stretch: 125%; font-weight: 900; color: var(--yellow); }

/* status pages (thanks / error) */
.status { padding: 72px 0 96px; display: flex; flex-direction: column; gap: 20px; }

/* ---- phones ---- */
@media (max-width: 720px) { /* allowed: breakpoint, not a width constraint */
  :root { --spine: 34px; --gutter: 16px; }
  .spine { background-size: 18px 100%, 12px 100%, 7px 100%; }
  .spine__feet { font-size: 0.7rem; }
  .spine__feet span { padding-left: 3px; }
  .hero__logo { width: 120%; right: -20%; }
  .pieces { grid-template-columns: 1fr; }
  .piece, .piece:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
  .ba { aspect-ratio: 4 / 3; }
}
