﻿/* Cushing Carpentry. Brand colours are locked; the only extra tones are
   derived from them (lighter/darker beige for the wood, stand-in greens). */
:root {
  --green: #24453A;
  --cream: #F4EFE4;
  --beige: #C9A66B;
  --beige-light: #DCC293;   /* the sign board: beige lifted toward cream */
  --char: rgba(50, 26, 8, .88);  /* burnt-in text on wood, derived from the latewood brown */
  --rule: rgba(36, 69, 58, .22);
  /* photo stand-ins only: delete with .photo once real photos are in */
  --green-2: #2f5447;
  --green-3: #3a5a4f;
  --heading: "Zilla Slab", Georgia, serif;
  --body: "Source Serif 4", Georgia, serif;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1240px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* distance from the wrap's right edge to the window edge, for bleeding photos */
  --bleed: calc(var(--pad) + max(0px, (100vw - var(--max)) / 2));

  /* Real-looking flat-sawn wood, rendered once by brand/wood-generator.html */
  --wood: url("../images/wood.jpg");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--green);
  /* painted-wall texture, multiplied onto the brand cream so the colour stays true */
  background: var(--cream) url("../images/plaster-soft.jpg") 0 0 / 800px 800px;
  background-blend-mode: multiply;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(201, 166, 107, .3);
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--heading); font-weight: 700; line-height: 1.08; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--beige); outline-offset: 3px; }
.on-cream :focus-visible { outline-color: var(--green); }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--cream); color: var(--green); padding: .75rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Header: stays at the top the whole way down ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--green); color: var(--cream);
}
/* soft shadow under the header once you scroll (fades opacity only, cheap to animate) */
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -16px; height: 16px;
  background: linear-gradient(rgba(10, 25, 20, .25), rgba(10, 25, 20, 0));
  opacity: 0; transition: opacity .3s ease; pointer-events: none;
}
.site-header.scrolled::after { opacity: 1; }
.site-header .wrap {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.site-header .logo { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 44px; }
.site-header .logo img { width: clamp(140px, 17vw, 210px); }
/* Wood means "this gets you to Jamie": the header button, the hero button,
   the phone call button and the contact sign are all cut from the same board. */
.wood {
  background: var(--beige-light) var(--wood) 30% 45% / 1600px 520px;
  /* text on wood is burnt in: dark char with a scorched halo that scales with the type */
  color: var(--char);
  text-shadow: 0 0 .03em rgba(40, 18, 4, .8), 0 0 .14em rgba(120, 64, 20, .5), 0 0 .4em rgba(150, 95, 40, .25);
  box-shadow: inset 0 0 0 1px rgba(97, 69, 33, .3), inset 0 -2px 0 rgba(97, 69, 33, .18);
}
.wood h2 { color: inherit; }
/* buttons cut from a thick board: bright top edge, dark underside, soft shadow on the wall */
.header-btn, .btn-wood {
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 214, .6),
    inset 0 0 0 1px rgba(97, 69, 33, .3),
    0 3px 0 #8a6a3c,
    0 10px 16px -8px rgba(8, 20, 15, .55);
}
.header-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 1.15rem;
  font-family: var(--heading); font-weight: 700; font-size: 1.05rem; white-space: nowrap;
  text-decoration: none; border-radius: 3px;
  transition: transform .2s var(--ease), filter .2s ease;
}
@media (hover: hover) {
  .header-btn:hover, .btn-wood:hover { transform: translateY(-2px); filter: brightness(1.06); }
  .big-tel:hover { text-decoration-thickness: .1em; }
  .site-footer a:hover { color: var(--beige); }
  .gallery figure:hover .photo img { transform: scale(1.04); }
}

/* ---------- Phone call bar (phones only) ---------- */

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 1.75rem;
  font-family: var(--heading); font-weight: 700; font-size: 1.25rem;
  text-decoration: none; border-radius: 3px;
  transition: background-color .2s ease, transform .2s var(--ease);
}
.btn-wood { background-position: 70% 60%; padding: 0 2.25rem; }
.btn-wood:active, .header-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 244, 214, .6), inset 0 0 0 1px rgba(97, 69, 33, .3), 0 1px 0 #8a6a3c;
}


/* ---------- Photo stand-ins (delete once real photos arrive) ---------- */
.photo {
  background: var(--green-3); color: var(--cream);
  display: flex; align-items: flex-end; overflow: hidden;
  padding: 1rem 1.1rem; font-size: .95rem; line-height: 1.35;
}
.photo span { max-width: 22rem; opacity: .9; }
/* Real photos: an <img> inside the same box fills it */
.photo:has(img) { padding: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }

/* ---------- Hero ---------- */
.hero { background: var(--green); color: var(--cream); overflow-x: clip; }
.hero .wrap {
  min-height: calc(100svh - var(--header-h));
  display: grid; gap: 1.5rem; grid-template-rows: auto minmax(28svh, 1fr);
  padding-top: 1.25rem;
}
.hero-text { display: grid; gap: 1.1rem; align-content: start; }
.hero h1 { font-size: clamp(2.6rem, 5.8vw, 5.6rem); line-height: 1; letter-spacing: -.015em; max-width: 14ch;  overflow-wrap: break-word; hyphens: auto; }
.hero .lede { font-size: clamp(1.3rem, 2.3vw, 1.85rem); line-height: 1.4; max-width: 28ch; }
.hero .btn-wood { justify-self: start; margin-top: .4rem; }
/* the photo runs to the window edges and sits on the bottom of the green band */
.hero .photo { background: var(--green-2); margin-inline: calc(-1 * var(--pad)); }

/* ---------- Sections ---------- */
section:not(.hero) { padding-block: clamp(2rem, 4.5vw, 3.5rem); }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.25rem); color: var(--green); margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }

/* What I do: a compact strip, three short columns */
section.what { padding-block: clamp(2rem, 4vw, 3rem) clamp(1rem, 2vw, 1.5rem); }
.what .wrap { display: grid; gap: 1rem 3rem; }
.what h2 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.25rem); }
.services { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.services li { padding-block: .9rem; border-top: 1px solid var(--rule); display: grid; gap: .2rem; }
.services li:first-child { border-top: 2px solid var(--green); }
.services h3 { font-size: 1.55rem; font-weight: 700; }
.services p { font-size: 1.1rem; }

/* Work gallery: three rows */
section.work { padding-top: clamp(.75rem, 2vw, 1.5rem); }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem .75rem; }
.gallery > .feature, .gallery > .w5, .gallery > .clip-item, .gallery > .full { grid-column: 1 / -1; }
.gallery figure { margin: 0; display: grid; gap: .5rem; align-content: start; }
.gallery .photo { aspect-ratio: 4 / 3; border-radius: 2px; box-shadow: 0 18px 24px -18px rgba(36, 69, 58, .6), 0 2px 0 rgba(36, 69, 58, .12); }
.gallery figcaption { font-size: .95rem; line-height: 1.45; max-width: 44ch; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.pair figure { gap: .35rem; }
.pair .photo { aspect-ratio: 4 / 5; }
.pair-label { font-family: var(--heading); font-weight: 700; font-size: 1rem; }

/* About */
.about { background: var(--green); color: var(--cream); }
.about h2 { color: var(--cream); }
.about .wrap { display: grid; gap: 2.5rem; isolation: isolate; }
.about .photo {
  background: var(--green-2); aspect-ratio: 4 / 3;
  position: relative; overflow: visible; margin-right: 12px;
  --frame: 12px;
}
/* offset beige frame behind Jamie's photo, like a moulding set back from the opening */
.about .photo::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border: 4px solid var(--beige); transform: translate(var(--frame), var(--frame));
}
.about-text { display: grid; gap: 1rem; align-content: center; max-width: 40ch; font-size: 1.15rem; }

/* Contact: a wooden sign */
.contact .wrap { display: grid; justify-items: center; }
section.contact { padding-block: clamp(2rem, 4vw, 3.25rem); }
.sign {
  width: min(100%, 50rem);
  display: grid; gap: .35rem; justify-items: center; text-align: center;
  padding: clamp(1.5rem, 3.5vw, 2.5rem) clamp(1.25rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2rem);
  background-position: center;
  border-radius: 4px;
  /* a routed edge and a little weight, so it reads as a board */
  box-shadow:
    inset 0 0 0 1px rgba(97, 69, 33, .25),
    inset 0 0 0 7px rgba(244, 239, 228, .18),
    inset 0 0 0 8px rgba(97, 69, 33, .2),
    0 22px 40px -24px rgba(36, 69, 58, .55);
}
.sign h2 { margin: 0 0 .1rem; font-size: clamp(1.1rem, 4.6vw, 2.7rem); line-height: 1.2; }
/* the number and the email are the same size, and fill the board */
.big-tel, .sign-email {
  font-family: var(--heading); font-weight: 700;
  font-size: clamp(1.1rem, 4.6vw, 2.7rem); line-height: 1.2; white-space: nowrap;
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: underline; text-decoration-color: var(--char);
  text-decoration-thickness: .05em; text-underline-offset: .16em;
  transition: text-decoration-thickness .2s ease;
}
.sign-email { margin-top: .15rem; }

/* Footer: small and centred */
.site-footer { background: var(--green); color: var(--cream); padding-block: 1.75rem; font-size: .9rem; line-height: 1.5; }
.site-footer .wrap { display: grid; justify-items: center; gap: .35rem; text-align: center; }
.site-footer img { width: 56px; height: auto; margin-bottom: .5rem; }
.site-footer a { text-decoration-color: rgba(244, 239, 228, .4); text-underline-offset: .2em; display: inline-flex; align-items: center; min-height: 44px; }
.site-footer p { opacity: .85; }

/* ---------- Phones ---------- */
@media (max-width: 599px) {
  :root { --header-h: 60px; }
  .site-header .logo img { width: 132px; }
  .hero .wrap { min-height: calc(100svh - var(--header-h)); }
  .hero .btn-wood { justify-self: stretch; }
  .sign { width: 100%; }
}
@media (max-width: 360px) {
  .header-btn { padding: 0 .8rem; font-size: 1rem; }
}

/* ---------- Tablet and up ---------- */
@media (min-width: 768px) {
  .what .wrap { grid-template-columns: minmax(10rem, 14rem) 1fr; align-items: start; }
  .services { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .services li, .services li:first-child { border-top: 2px solid var(--green); padding-block: .9rem 0; }
  .gallery { gap: 2.25rem 1.25rem; }
  .gallery figcaption { font-size: 1rem; }
  .about .photo { aspect-ratio: 4 / 5; width: min(100%, 26rem); }
}

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1.2fr 1fr; grid-template-rows: 1fr;
    gap: clamp(2rem, 5vw, 5rem); padding-top: var(--pad);
  }
  .hero-text { gap: 1.6rem; align-content: center; padding-bottom: var(--pad); }
  .hero .photo { margin: 0 calc(-1 * var(--bleed)) 0 0; }

  .gallery { grid-template-columns: repeat(12, 1fr); gap: 2.75rem 1.5rem; }
  .gallery > li { grid-column: span 4; }
  .gallery > .feature { grid-column: span 7; }
  .gallery > .w5 { grid-column: span 5; }
  .gallery > .full { grid-column: 1 / -1; }
  .gallery > .w5 .photo, .gallery > .feature .photo { aspect-ratio: auto; height: clamp(18rem, 30vw, 25rem); }
  .pair .photo { aspect-ratio: 16 / 9; }

  .about .wrap { grid-template-columns: auto 1fr; gap: clamp(3rem, 7vw, 7rem); align-items: center; }
  /* small enough that the whole photo fits on screen at once */
  .about .photo {
    --frame: 24px;
    width: min(26rem, calc((100svh - var(--header-h) - 6rem) * 4 / 5));
    align-self: start; margin-right: 24px;
  }
}

/* ---------- Phone held sideways ---------- */
@media (max-height: 500px) and (min-width: 600px) {
  .hero .wrap { min-height: 0; }
}


/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* on load: the headline slides up (stays visible, so it paints at once), the rest rises in, the photo slides in */
  .hero-text > * { animation: rise .8s var(--ease) both; }
  .hero-text > h1 { animation-name: rise-y; }
  .hero-text > :nth-child(2) { animation-delay: .1s; }
  .hero-text > :nth-child(3) { animation-delay: .2s; }
  .hero-text > :nth-child(4) { animation-delay: .28s; }
  .hero .photo { animation: slide-in 1.1s var(--ease) both; }
  .site-header .wrap > * { animation: fade .6s ease both; }

  /* on scroll (only hidden when the script is running) */
  .js .reveal {
    opacity: 0; transform: translateY(16px);
    transition: opacity .8s ease, transform .8s var(--ease);
  }
  .js .reveal.in { opacity: 1; transform: none; }
  /* the frame slides out from behind Jamie's photo */
  .js .reveal-frame::before { transform: translate(0, 0); opacity: 0; transition: transform 1s var(--ease) .2s, opacity .4s ease .2s; }
  .js .reveal-frame.in::before { transform: translate(var(--frame), var(--frame)); opacity: 1; }
  /* the sign settles like it's being hung */
  .js .sign.reveal { transform: translateY(16px); }
  .js .sign.reveal.in { transform: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise-y { from { transform: translateY(16px); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(48px); } }

@media print {
  .js .reveal, .js .reveal-frame::before { opacity: 1 !important; transform: none !important; }
  .site-header { position: static; }
}

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

/* 404 page */
.notfound .wrap { display: grid; gap: 1rem; }
.notfound h1 { font-size: clamp(2rem, 5vw, 3rem); }
.notfound a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }



/* About: Jamie's name as a sign-off, with a short beige rule */
.signoff {
  font-family: var(--heading); font-weight: 700; font-size: 1.5rem; color: var(--beige);
  display: flex; align-items: center; gap: .75rem; margin-top: .5rem;
}
.signoff::before { content: ""; width: 2.5rem; height: 2px; background: var(--beige); }

/* ---------- Round 6 ---------- */
/* a thin strip of the same wood where the page changes room */
.what, .contact { position: relative; }
.what::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px;
  background: var(--beige-light) var(--wood) 20% 30% / 1600px 520px;
  box-shadow: inset 0 -1px 0 rgba(97, 69, 33, .35);
}

.contact::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background: var(--beige-light) var(--wood) 55% 20% / 1600px 520px;
  box-shadow: inset 0 1px 0 rgba(97, 69, 33, .35);
}

/* Contact: the sign sits on the same plaster-on-cream as the rest of the page */
section.contact {
  padding-block: clamp(2rem, 4vw, 3rem);
}
.contact .sign { box-shadow: inset 0 0 0 1px rgba(97, 69, 33, .25), inset 0 0 0 7px rgba(244, 239, 228, .18), inset 0 0 0 8px rgba(97, 69, 33, .2), 0 26px 50px -14px rgba(0, 0, 0, .65); }

/* ---------- Published clipping: "A little history", after the gallery ---------- */
.clip { margin: 0; width: min(100%, 22rem); display: grid; gap: 1.1rem; justify-items: center; }
.clip-page {
  position: relative; display: block; transform: rotate(-1.2deg);
  background: #fff; padding: 6px;
  box-shadow: 0 1px 0 rgba(36, 69, 58, .12), 0 22px 34px -16px rgba(36, 69, 58, .55), 0 6px 10px -6px rgba(36, 69, 58, .35);
  transition: transform .35s var(--ease);
}
/* tape holding it up */
.clip-page::before, .clip-page::after {
  content: ""; position: absolute; top: -12px; width: 78px; height: 24px;
  background: rgba(201, 166, 107, .7); box-shadow: 0 1px 2px rgba(36, 69, 58, .25);
}
.clip-page::before { left: 8%; transform: rotate(-6deg); }
.clip-page::after { right: 8%; transform: rotate(5deg); }
.clip-page img { width: 100%; height: auto; }
.clip figcaption { font-size: 1rem; line-height: 1.45; max-width: 30ch; }
.clip cite { font-style: italic; }
@media (hover: hover) { .clip-page:hover { transform: rotate(0deg) translateY(-3px); } }
.clip-item { display: grid; justify-items: center; align-content: center; gap: 1.5rem; }
.clip-item h3 { margin: 0; font-size: clamp(1.5rem, 2.4vw, 2rem); text-align: center; }
@media (min-width: 900px) {
  .gallery > .w5 { grid-column: span 7; }
  .gallery > .clip-item { grid-column: 8 / span 5; grid-row: 1 / span 2; }
  .clip { width: min(100%, 26rem); }
}

/* ---------- When you text me ---------- */
section.steps { padding-block: clamp(2rem, 4vw, 3rem) 0; }
.steps h2 { margin-bottom: 1.25rem; }
.steps ol { margin: 0; padding: 0; list-style: none; counter-reset: s; max-width: 46rem; }
.steps li { counter-increment: s; display: flex; gap: .9rem; font-size: 1.05rem; line-height: 1.5; padding-block: .6rem; border-bottom: 1px solid rgba(36, 69, 58, .18); break-inside: avoid; }
.steps li::before { content: counter(s) "."; font-family: var(--heading); font-weight: 700; min-width: 1.4rem; }

/* About: text runs across, not down */
@media (min-width: 900px) {
  .about-text { max-width: none; align-content: center; }
  .about-cols { display: block; column-count: 2; column-gap: 2.5rem; }
  .about-cols p { margin: 0 0 1rem; }
  .about-cols p:last-child { margin-bottom: 0; }
}

/* About: the photo rises out of the top of the green; equal green below it */
@media (min-width: 900px) {
  section.about { padding-block: 1.5rem 3rem; } /* 24px of green above the photo = 24px below its frame */
  .about .photo { margin-top: 0; }
}
.about-cols { display: grid; gap: 1rem; }

/* Phones: bigger text on the sign (the email is the longest line, so the size is set to just fit it) */
@media (max-width: 599px) {
  .sign { padding-inline: .9rem; }
  .sign h2, .big-tel, .sign-email { font-size: clamp(1.1rem, 5.8vw, 2.7rem); }
}

/* Sign: lines sit closer together (tap area kept by padding) */
.sign { gap: 0; padding-block: clamp(1.1rem, 2.6vw, 1.75rem); }
.sign h2 { margin: 0; line-height: 1.1; padding-block: .15em; }
.big-tel, .sign-email { min-height: 0; line-height: 1.1; padding-block: .3em; margin-top: 0; }

section.steps { padding-block: clamp(2rem, 4vw, 3rem); }

/* Wood strips between rooms: around About, and above the footer. None between Contact and the steps. */
.contact::after { content: none; }
.about, .steps { position: relative; }
.about::before, .about::after, .steps::after {
  content: ""; position: absolute; left: 0; right: 0; height: 8px;
  background: var(--beige-light) var(--wood) 40% 60% / 1600px 520px;
}
.about::before { top: 0; box-shadow: inset 0 -1px 0 rgba(97, 69, 33, .35); background-position: 70% 70%; }
.about::after { bottom: 0; box-shadow: inset 0 1px 0 rgba(97, 69, 33, .35); background-position: 55% 20%; }
.steps::after { bottom: 0; box-shadow: inset 0 1px 0 rgba(97, 69, 33, .35); }

/* "When you text me": same compact scale as "What I do" */
.steps h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-bottom: .75rem; }
.steps ol { max-width: 40rem; }
.steps li { font-size: 1rem; padding-block: .45rem; gap: .75rem; }
section.steps { padding-block: clamp(1.5rem, 3vw, 2.25rem); }

/* One heading size for the section titles */
.what h2, .work h2, .about h2, .steps h2, .clip-item h3 { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.15; }
.clip-item { gap: 2.25rem; }
/* "When you text me" sits a little closer to the sign */
section.contact { padding-bottom: 1.25rem; }
section.steps { padding-top: .75rem; }

/* "When you text me": centred under the sign */
.steps .wrap { display: grid; justify-items: center; }
.steps h2 { text-align: center; }
.steps ol { width: min(100%, 40rem); margin-inline: auto; }

/* Wide screens: the sign on the left, "When you text me" on the right */
@media (min-width: 900px) {
  .reach { display: grid; grid-template-columns: 1fr 1fr; align-items: center; max-width: 1240px; margin-inline: auto; }
  .reach section { padding-block: clamp(2rem, 4vw, 3rem); }
  .reach .wrap { padding-inline: var(--pad); }
  .reach .contact .wrap { justify-items: start; }
  .reach .sign { width: 100%; }
  .reach .big-tel, .reach .sign-email, .reach .sign h2 { font-size: clamp(1.1rem, 2.4vw, 2rem); }
  .reach .steps .wrap { justify-items: start; }
  .reach .steps h2 { text-align: left; }
  .reach .steps ol { margin-inline: 0; width: 100%; max-width: none; }
}

@media (min-width: 900px) {
  .reach { max-width: none; margin-inline: 0; }
  /* each half lines up with the 1240px page grid, and the wood strip runs the full width underneath */
  .reach .contact .wrap { margin-left: auto; margin-right: 0; width: 100%; max-width: calc(var(--max) / 2); }
  .reach .steps .wrap { margin-right: auto; margin-left: 0; width: 100%; max-width: calc(var(--max) / 2); }
  .reach .contact::after { content: ""; }
  .reach .steps li { font-size: .95rem; }
}
@media (min-width: 900px) {
  .reach { align-items: stretch; }
  .reach section { display: grid; align-content: center; }
  .reach .steps .wrap { padding-right: 0; }
}

/* Wide screens: one single strip under both halves (no join in the middle) */
@media (min-width: 900px) {
  .reach { position: relative; }
  .reach .contact::after, .reach .steps::after { content: none; }
  .reach::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
    background: var(--beige-light) var(--wood) 40% 60% / 1600px 520px;
    box-shadow: inset 0 1px 0 rgba(97, 69, 33, .35);
  }
}

/* Gallery: square tiles, two across on phones; on wide screens four photos in a 2x2 beside the clipping */
.gallery .photo { aspect-ratio: 1 / 1; }
@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(12, 1fr); }
  .gallery > li { grid-column: span 4; }
  .gallery > .clip-item { grid-column: 9 / span 4; grid-row: 1 / span 2; }
  .clip { width: 100%; }
}

/* Hero photo starts right under the header (no green band above it) */
@media (min-width: 900px) {
  .hero .wrap { padding-top: 0; }
  .hero-text { padding-top: var(--pad); }
}

/* About portrait: always portrait, never crops the head on phones */
.about .photo:has(img) { aspect-ratio: 4 / 5; }
.about .photo img { object-position: 50% 15%; }
@media (max-width: 767px) { .about .photo:has(img) { width: min(100%, 22rem); } }

/* Phones: a shorter crop, head and chest only, so the page isn't so long */
@media (max-width: 767px) {
  .about .photo:has(img) { aspect-ratio: 4 / 3; width: 100%; }
  .about .photo img { object-position: 50% 0%; }
}

.about picture { display: contents; }

/* hero: keep the side table in frame when the photo box is narrow */
.hero .photo img { object-position: 35% 50%; }
