/* demo4.css — the arrangements the library does not have (task 21; bespoke, recorded in decisions.md §4).
   Loaded after styles.css and OUTSIDE every cascade layer, so it wins over the library's layers without a specificity fight.
   It is written on the library's own tokens (palette, spacing, corners, motion, hover) and adds none of its own colours.

   What is here, in order: the type (Sofia Sans at a regular weight, Newsreader italic as the second voice) · the words line ·
   the framed opening · the hung statement · the three doors · the two quotations · the action band · the quiet footer ·
   the header's current-page mark. The five pages share this file; nothing on a page needs a rule that is not in it. */

/* ---- tokens: type and rhythm ---------------------------------------------------------------------------------------- */
:root {
  --f-display: 'Sofia Sans', 'Segoe UI', system-ui, sans-serif;
  --f-voice: 'Newsreader', Georgia, serif;
  --fw-strong: 400;                         /* headlines at a regular weight; the page's weight comes from size and space */
  --fw-card: 600;                           /* the small titles keep a step of weight */
  --t-hero: clamp(40px, 5vw, 72px);
  --t-section: clamp(34px, 3.6vw, 52px);
  --tr-hero: -0.02em;
  --lh-hero: 1.04;
  --lh-section: 1.1;
  --sec-y: 72px;
  --line: var(--pad-x);                     /* the words line: where text starts, apart from the photographs' margin */
}
@media (min-width: 720px)  { :root { --sec-y: 112px; } }
@media (min-width: 1080px) { :root { --line: max(var(--pad-x), 9vw); } }

.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- the header: the current page is marked, and nothing else changes ----------------------------------------------- */
.hd__nav a[aria-current="page"] { color: var(--c-ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }

/* ---- the opening: words on the ground, then one photograph in the margins with nothing on it -------------------------- */
.open { padding-top: var(--space-32); }
.open__words { padding-left: calc(var(--line) - var(--pad-x)); }
.open .h1 { max-width: 15em; text-wrap: balance; }
.open__line { max-width: 34em; margin-top: var(--space-24); }
.open__act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-16) var(--space-32); margin-top: var(--space-32); }
.open__num, .act__num {
  font-family: var(--f-display); font-weight: var(--fw-strong); line-height: 1.05; white-space: nowrap; letter-spacing: -0.01em;
}
.open__num {
  font-size: clamp(30px, 2.6vw, 38px); color: var(--c-ink);
  text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: 0.22em;
  transition: color var(--hover-fast) var(--hover-ease), text-decoration-color var(--hover-fast) var(--hover-ease);
}
@media (hover: hover) { .open__num:hover { text-decoration-color: var(--c-accent-hover); } }
.open__ph { margin: var(--space-32) 0 0; aspect-ratio: 4 / 3; }          /* a <figure> brings 40px side margins of its own */
.open__ph picture, .open__ph img { display: block; width: 100%; height: 100%; }
.open__ph img { object-fit: cover; }
@media (min-width: 720px) { .open { padding-top: var(--space-64); } .open__ph { margin-top: var(--space-48); } }
@media (min-width: 900px) { .open__ph { aspect-ratio: 2.2 / 1; } }

/* ---- the statement: the heading alone at the margin, the words on a line further in ---------------------------------- */
.state__in { display: grid; gap: var(--space-24); }
.state__t { margin: 0; max-width: 34em; font-size: 18px; line-height: 1.7; color: var(--c-muted); }
@media (min-width: 900px) {
  .state__in { grid-template-columns: 5fr 7fr; column-gap: var(--space-48); align-items: start; }
  .state__in .h2 { max-width: 9em; text-wrap: balance; }
  .state__t { padding-top: 0.55em; }
}

/* ---- the three doors: big photographs, each a way in; the words sit under a scrim at the foot -------------------------- */
.doors { display: grid; gap: var(--space-16); }
@media (min-width: 900px) { .doors { grid-template-columns: repeat(3, 1fr); gap: var(--space-24); } }
.door {
  position: relative; isolation: isolate; display: block; overflow: hidden; aspect-ratio: 5 / 4;
  border-radius: var(--r-surface); background-color: var(--c-dark); color: #FFFFFF; text-decoration: none;
}
@media (min-width: 640px) { .door { aspect-ratio: 3 / 2; } }      /* stacked on a tablet: a shorter door */
@media (min-width: 900px) { .door { aspect-ratio: 4 / 5; } }
.door picture, .door img { position: absolute; inset: 0; width: 100%; height: 100%; }
.door img { object-fit: cover; transition: transform var(--hover-slow) var(--hover-ease); }
/* the scrim travels with the words (on .door__words), so a two-line caption on a short phone door is covered as well as a one-line one:
   the palette's own dark, heaviest at the foot, nothing over the rest of the photograph */
.door::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-color: rgba(var(--c-dark-rgb), 0); transition: background-color var(--hover-slow) var(--hover-ease);
}
.door__words {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: var(--space-64) var(--space-24) var(--space-24);
  background: linear-gradient(to top, rgba(var(--c-dark-rgb), .92) 0%, rgba(var(--c-dark-rgb), .84) 50%, rgba(var(--c-dark-rgb), 0) 100%);
}
.door__t { margin: 0; font-family: var(--f-display); font-weight: var(--fw-strong); font-size: var(--t-sm-heading); line-height: 1.1; letter-spacing: -0.01em; color: #FFFFFF; }
.door__l { margin: var(--space-8) 0 0; font-size: var(--t-body); line-height: 1.45; color: rgba(255, 255, 255, .92); }
.door:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 4px; }
@media (hover: hover) {
  .door:hover img { transform: scale(var(--zoom-img)); }
  .door:hover::before { background-color: rgba(var(--c-dark-rgb), .22); }
}
@media (prefers-reduced-motion: reduce) { .door:hover img { transform: none; } }

/* ---- two big quotations, no cards ------------------------------------------------------------------------------------ */
.says__row, .says__note { padding-inline: calc(var(--line) - var(--pad-x)); }
.says__row { display: grid; gap: var(--space-48); }
@media (min-width: 800px) { .says__row { grid-template-columns: 1fr 1fr; gap: var(--space-64); } }
.sayn { margin: 0; }
.sayn blockquote { margin: 0; font-family: var(--f-voice); font-style: italic; font-weight: 400; font-size: clamp(24px, 2.3vw, 32px); line-height: 1.35; letter-spacing: -0.005em; color: var(--c-ink); }
.sayn blockquote p { margin: 0; }
.sayn figcaption { margin-top: var(--space-24); font-size: var(--t-body-sm); line-height: 1.5; color: var(--c-muted); }
.sayn figcaption b { font-weight: var(--fw-card); color: var(--c-ink); }
.says__note { margin: var(--space-48) 0 0; font-family: var(--f-voice); font-style: italic; font-size: 15px; line-height: 1.5; color: var(--c-muted); }

/* ---- the action band: the page's one coloured band, the only change of ground ---------------------------------------- */
.act { background-color: var(--c-accent); color: var(--c-on-accent); padding-block: var(--space-64); }
@media (min-width: 720px) { .act { padding-block: var(--space-96); } }
.act .h2, .act .lead { color: var(--c-on-accent); }
.act__in { display: grid; gap: var(--space-32); align-items: end; }
@media (min-width: 900px) { .act__in { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-48); } }
.act__num {
  display: inline-block; font-size: var(--t-section); letter-spacing: var(--tr-section); color: var(--c-on-accent);
  text-decoration: none; text-underline-offset: 0.12em;
}
@media (hover: hover) { .act__num:hover { text-decoration: underline; } }
.act__btns { display: flex; flex-wrap: wrap; gap: var(--space-16); margin-top: var(--space-24); }
@media (max-width: 559px) { .act__btns .btn { flex: 1 1 100%; } }
.act .btn { background-color: var(--c-dark); color: #FFFFFF; box-shadow: none; }
.act .btn--ghost { background-color: transparent; color: var(--c-on-accent); box-shadow: inset 0 0 0 2px var(--c-on-accent); }
@media (hover: hover) {
  .act .btn:hover { background-color: var(--c-mid); color: #FFFFFF; }
  .act .btn--ghost:hover { background-color: var(--c-on-accent); color: var(--c-accent); }
}
.act :focus-visible { outline-color: var(--c-on-accent); }

/* ---- the footer on the soft ground, so the page keeps one ground and the band stays the only colour ------------------- */
.foot--soft { background-color: var(--c-alt); }
.foot--soft .foot__contact, .foot--soft .foot__contact a, .foot--soft .foot__contact li.foot__contact-name, .foot--soft p.foot__mark { color: var(--c-ink); }
.foot--soft .foot__contact svg { fill: var(--c-muted); }
.foot--soft .foot__contact .pend { color: var(--c-muted); }
.foot--soft .foot__base { border-top: 0; }
.foot--soft a.foot__top, .foot--soft .foot__small { color: var(--c-muted); }
@media (hover: hover) { .foot--soft a.foot__top:hover { color: var(--c-ink); } }

/* =========================================================================================================================
   The inner pages (Services, Our work, About, Contact). The same tokens, the same words line, the same corners; nothing new in
   colour. On an inner page nothing above the first screen has data-in: the first screen reads at once (output-calibration §2).
   ========================================================================================================================= */

/* a quiet line under a group of sample photographs, in the second voice */
.note { margin: var(--space-32) 0 0; font-family: var(--f-voice); font-style: italic; font-size: 15px; line-height: 1.5; color: var(--c-muted); }

/* ---- the page head: the headline on the words line, then a lead ---------------------------------------------------- */
.pagehead { padding-top: var(--space-48); }
.pagehead__in { padding-left: calc(var(--line) - var(--pad-x)); }
.pagehead .h1 { max-width: 16em; text-wrap: balance; }
.pagehead .lead { max-width: 36em; margin-top: var(--space-24); }
.pagehead + .band { padding-top: var(--space-48); }
@media (min-width: 720px) { .pagehead { padding-top: var(--space-64); } .pagehead + .band { padding-top: var(--space-64); } }

/* ---- Services: one strip per service, a wide photograph and a caption row ----------------------------------------- */
.strips { display: grid; gap: var(--space-48); }
@media (min-width: 720px) { .strips { gap: var(--space-64); } }
.strip { margin: 0; }
.strip__ph { margin: 0; aspect-ratio: 3 / 2; }
@media (min-width: 900px) { .strip__ph { aspect-ratio: 2.2 / 1; } }
.strip__ph picture, .strip__ph img { display: block; width: 100%; height: 100%; }
.strip__ph img { object-fit: cover; }
.strip__cap { display: grid; gap: var(--space-16); margin-top: var(--space-24); }
@media (min-width: 720px) { .strip__cap { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-32); } }
.strip__t { margin: 0; font-family: var(--f-display); font-weight: var(--fw-strong); font-size: var(--t-sm-heading); line-height: 1.1; letter-spacing: -0.01em; color: var(--c-ink); }
.strip__l { margin: var(--space-8) 0 0; max-width: 40em; color: var(--c-muted); }
.smaller { margin: var(--space-64) 0 0; padding-left: calc(var(--line) - var(--pad-x)); max-width: 46em; font-size: 18px; line-height: 1.7; color: var(--c-muted); }
.smaller b { font-weight: var(--fw-card); color: var(--c-ink); }
.smaller + .note { padding-left: calc(var(--line) - var(--pad-x)); margin-top: var(--space-16); }

/* ---- Our work: one job told properly, then the other jobs on a bigger rail ----------------------------------------- */
.onejob figure { margin: 0; }
.onejob__lead { aspect-ratio: 4 / 3; }
@media (min-width: 900px) { .onejob__lead { aspect-ratio: 2 / 1; } }
.onejob__pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-24); margin-top: var(--space-24); }   /* minmax(0,…): an image's own width must not stretch the track */
@media (min-width: 640px) { .onejob__pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.onejob__ph { aspect-ratio: 3 / 2; }
/* the image is taken out of the sizing: the aspect-ratio frame alone sets the box (a percentage height on an image inside an auto-height box can stretch the box) */
.onejob__lead, .onejob__ph { position: relative; min-width: 0; }
.onejob__lead picture, .onejob__lead img, .onejob__ph picture, .onejob__ph img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.onejob__lead img, .onejob__ph img { object-fit: cover; }
.onejob__pair > figure { min-width: 0; }
.onejob__cap { margin-top: var(--space-12); font-size: var(--t-body-sm); line-height: 1.5; color: var(--c-muted); }
.onejob__text { display: grid; gap: var(--space-32); margin-top: var(--space-48); }
@media (min-width: 900px) { .onejob__text { grid-template-columns: minmax(0, 5fr) minmax(0, 2fr); column-gap: var(--space-64); align-items: start; } }
.onejob__meta { margin: var(--space-8) 0 0; font-family: var(--f-voice); font-style: italic; font-size: var(--t-card); color: var(--c-muted); }
.onejob__body { margin: var(--space-24) 0 0; max-width: 34em; font-size: 18px; line-height: 1.7; color: var(--c-muted); }
.onejob__facts { margin: 0; font-weight: var(--fw-card); line-height: 1.5; }
.onejob__side .note { margin-top: var(--space-12); }
.onejob__side .btn { margin-top: var(--space-24); }
/* the rail shows two and a third across on a desktop, so each of a small portfolio's photographs is large */
@media (min-width: 1080px) {
  .band .rail--large > * { flex-basis: calc((min(100cqw, var(--content-max)) - 2 * var(--pad-x) - 2 * var(--grid-gap)) / 2.3); }
}
.rail--large .gallery__cap { padding-top: var(--space-16); }
.rail--large .gallery__cap .h4 { font-size: var(--t-card); }
.rail--large .gallery__meta { font-size: var(--t-body-sm); }
.rail-wrap + .note { margin-top: var(--space-24); }

/* ---- About: the story beside two photographs of unequal size, the words hanging from the foot ---------------------- */
.aboutpair { display: grid; gap: var(--space-32); }
@media (min-width: 900px) { .aboutpair { grid-template-columns: 1fr 1fr; gap: var(--space-64); align-items: stretch; } }
.aboutpair figure { margin: 0; }
.aboutpair__side { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-32); }
.aboutpair__small { width: min(100%, 280px); aspect-ratio: 1; }
.aboutpair__tall { aspect-ratio: 4 / 5; }
.aboutpair picture, .aboutpair img { display: block; width: 100%; height: 100%; }
.aboutpair img { object-fit: cover; }
.story p { margin: 0; max-width: 34em; font-size: 18px; line-height: 1.7; color: var(--c-muted); }
.story p + p { margin-top: var(--space-16); }

/* ---- Contact: the number as large as the headline, the form hung on the words line ------------------------------- */
.pagehead__num {
  display: inline-block; margin-top: var(--space-24); white-space: nowrap;
  font-family: var(--f-display); font-weight: var(--fw-strong); font-size: var(--t-hero); line-height: 1.04; letter-spacing: var(--tr-hero); color: var(--c-ink);
  text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 3px; text-underline-offset: 0.16em;
  transition: text-decoration-color var(--hover-fast) var(--hover-ease);
}
@media (hover: hover) { .pagehead__num:hover { text-decoration-color: var(--c-accent-hover); } }
.hung { display: grid; gap: var(--space-32); }
@media (min-width: 900px) { .hung { grid-template-columns: 5fr 7fr; column-gap: var(--space-48); align-items: start; } }
.hung .head { margin-bottom: 0; }
.hung .quote { max-width: 640px; }
.ways3 { display: grid; gap: var(--space-48); }
@media (min-width: 900px) { .ways3 { grid-template-columns: repeat(3, 1fr); gap: var(--space-48); } }
.ways3 h2 { margin: 0; }
.ways3 p { margin-top: var(--space-8); color: var(--c-muted); font-size: var(--t-body-sm); }
.ways3 .hours { margin-top: var(--space-12); }
.ways3 .btn { margin-top: var(--space-16); }

/* the number on an inner page's first screen on a phone: the header carries it from 960px, the page head carries it below */
.pagehead__call {
  display: inline-block; margin-top: var(--space-16); font-family: var(--f-display); font-size: 26px; line-height: 1.1; color: var(--c-ink); white-space: nowrap;
  text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: 0.22em;
  transition: text-decoration-color var(--hover-fast) var(--hover-ease);
}
@media (hover: hover) { .pagehead__call:hover { text-decoration-color: var(--c-accent-hover); } }
@media (min-width: 960px) { .pagehead__call { display: none; } }

/* ---- the number is a placeholder, not a link: no underline, no hover, no pointer (task 21, Danny 2026-10-05) ------------------ */
span.open__num, span.pagehead__num, span.pagehead__call { text-decoration: none; }
span.act__num:hover { text-decoration: none; }
span.hd__call { cursor: default; }
@media (hover: hover) { .hd span.hd__call:hover { color: var(--c-ink); } }

/* The way back to webhatcher's homepage, in the sample-page notice bar (added for the webhatcher copy only).
   The bar stays with the reader: sticky, one fixed height, above the page's own header, which now sticks
   just below it. The full message shows only where it fits on one line; elsewhere a short one does. */
:root { --notice-h: 52px; }
.notice {
  position: sticky; top: 0; z-index: 60;
  box-sizing: border-box; height: var(--notice-h); padding-block: 0;
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.notice > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice__short { display: inline; }
.notice__full { display: none; }
@media (min-width: 1320px) { .notice__short { display: none; } .notice__full { display: inline; } }
.notice__home {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 16px 0 12px;
  border: 1.5px solid rgba(255, 255, 255, .7); border-radius: 999px;
  color: #FFFFFF; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color 200ms ease-out;
}
.notice__home svg { width: 16px; height: 16px; fill: currentColor; }
.notice__home:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
@media (hover: hover) { .notice__home:hover { background-color: rgba(255, 255, 255, .16); } }
.hd { top: var(--notice-h); }
.band, .bleed, .hero { scroll-margin-top: calc(var(--hd-h) + var(--notice-h) + var(--space-12)); }
