/* Hallmark · shape: Trade Ledger · genre: editorial · theme: Vellum (manual pick, indigo ledger colourway; dealt Dose/Manifesto/Atelier, Atelier and Grid already on carpentry sites) · job: hire · draw: manual
 * hero: split stage, head on paper, the field bleeding right · nav: logo, three links, the phone · footer: logo over the partnership line and credits · imagery: photographs (stand-ins in slots) and the hand plane cut out · signature: the hand plane from their logo planing across the blue as you scroll · vellum: indigo ledger, pigment set to their logo blue, fibre 0.14
 * axes: light/blackletter/cool · posture: committed · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 · weakest: E, no photos of Ben's own work online, so stand-ins sit in named slots and the footer says so */
/* waive 23: the hero field and the estimate band are C & B's own logo blue, the brand's one colour, so a full field is the brand, not decoration
 * waive 44c: split stage, the blue field is the hero's visual and bleeds off the right edge by design; the photo and plane sit inside it
 * waive 72: the review rail scrolls sideways on phones, so its edge cuts the next review on purpose
 * waive F4: .btn--light is the same primary recipe inverted for the blue field, never beside the paper primary */
/* answered: photographs keep true colour (Adil's standing rule: colourful sites), warm filter lightened from the theme's default */
@import url("./tokens.css");
@import url("./base.css");

:root { --chrome-h: 128px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 48px; padding: 0 var(--space-lg); border: 1px solid var(--color-ink); border-radius: var(--radius-card); background: transparent; color: var(--color-ink); font: 500 var(--text-md)/1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.btn:hover { background: var(--color-accent-soft); }
.btn:active { background: var(--color-paper-3); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.btn--primary:hover, .btn--primary:active { background: var(--color-accent-deep); border-color: var(--color-accent-deep); }
.btn--light { background: var(--color-accent-ink); border-color: var(--color-accent-ink); color: var(--color-accent); }
.btn--light:hover, .btn--light:active { background: var(--color-accent-soft); }
.link { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; cursor: pointer; transition: text-decoration-color var(--dur-micro) var(--ease-out); }
.link:hover { text-decoration-color: var(--color-accent); }
.link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.pay { white-space: nowrap; display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--space-md); border-radius: var(--radius-card); background: var(--color-accent); color: var(--color-accent-ink); font-weight: 500; font-size: var(--text-sm); text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out); }
.pay:hover, .pay:active { background: var(--color-accent-deep); }
.pay:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md) var(--space-lg); }

/* ---------- chrome ---------- */
.chrome { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: var(--color-paper); border-bottom: 1px solid var(--color-rule); }
.concept { background: var(--color-paper-2); font-size: var(--text-sm); color: var(--color-ink-2); }
.concept .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); min-height: 48px; }
.concept .short { display: none; }
.concept .acts { gap: var(--space-md); flex-wrap: nowrap; }
.nav .container { display: flex; align-items: center; gap: var(--space-xl); min-height: 76px; }
.mark { display: block; flex: none; }
.mark img { width: auto; height: 46px; }
.nav ul { display: flex; gap: var(--space-lg); margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav ul a { font-weight: 600; text-decoration: none; transition: text-decoration-color var(--dur-micro) var(--ease-out); text-decoration-line: underline; text-decoration-color: transparent; text-underline-offset: 0.3em; }
.nav ul a:hover { text-decoration-color: var(--color-accent); }
.nav ul a:focus-visible, .nav__call:focus-visible, .mark:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.nav__call { font: 400 var(--text-xl)/1 var(--font-outlier); color: var(--color-accent); text-decoration: none; font-variant-numeric: tabular-nums; }
.nav__call:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

/* ---------- hero: the split stage ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); min-height: calc(100svh - var(--chrome-h)); background: var(--color-paper); }
.hero__copy { display: flex; flex-direction: column; justify-content: center; gap: var(--space-lg); padding: var(--space-2xl) var(--space-2xl) var(--space-2xl) max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))); }
.hero h1 { font-size: clamp(3rem, 4.6vw + 0.5rem, 6.25rem); line-height: 0.92; max-width: 12ch; color: var(--color-ink); }
.hero .lead { max-width: 38ch; color: var(--color-ink-2); }
.hero .acts { margin-top: var(--space-xs); }

.hero__field { --hp: var(--sc-p, 0); position: relative; overflow: clip; background: var(--color-accent); color: var(--color-accent-ink); min-height: 520px; }
.hero__photo { position: absolute; top: 8%; right: 8%; width: 42%; aspect-ratio: 2 / 3; margin: 0; border-radius: var(--radius-card); transform: translate3d(0, calc(var(--hp) * -7%), 0) scale(calc(1.06 - var(--hp) * 0.06)); transform-origin: 50% 0; will-change: transform; }
.hero__photo > img { object-position: 50% 40%; }
.hero__plane { --travel: -56%; position: absolute; left: 34%; bottom: 7%; width: 64%; height: auto; transform: translate3d(calc(var(--hp) * var(--travel)), 0, 0); will-change: transform; pointer-events: none; z-index: 2; }

/* scrollcraft mechanism, restated here (the engine stylesheet is not linked) */
.js.sc-on .sc-stage { position: sticky; top: var(--chrome-h); height: calc(100svh - var(--chrome-h)); overflow: clip; }
.js.sc-on .sc-stage.hero { min-height: 0; }
.js.sc-on [data-sc-cue] { opacity: 0; }
.js.sc-on [data-sc-in], .js.sc-on [data-sc-stagger] > * { opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity 620ms var(--ease-out), transform 620ms var(--ease-out); }
.js.sc-on [data-sc-in].sc-in, .js.sc-on [data-sc-stagger] > .sc-in { opacity: 1; transform: none; }

/* ---------- the family, in figures ---------- */
.fibre { position: relative; isolation: isolate; background: var(--color-paper-2); }
.fibre::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: var(--fibre); mix-blend-mode: multiply; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='p' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 0.02' numOctaves='4' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.62 0 0 0 0 0.52 0 0 0 0 0.36 0 0 0 0.3 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E"); }
.story { padding-block: var(--section-gap-s); border-top: var(--rule-double) double var(--color-ink); }
.statement { max-width: 30ch; font: 400 var(--text-display-s)/1.04 var(--font-outlier); color: var(--color-ink); text-wrap: balance; }
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-columns); margin: var(--space-3xl) 0 0; padding-top: var(--space-lg); border-top: 1px solid var(--color-rule); }
.figures div { display: flex; flex-direction: column; gap: var(--space-xs); min-width: 0; }
.figures dd { order: -1; margin: 0; font: 600 clamp(3rem, 3.4vw + 1rem, 5rem)/0.92 var(--font-display); color: var(--color-accent); font-variant-numeric: tabular-nums; }
.figures dt { font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-2); max-width: 22ch; }

/* ---------- the work, as rows ---------- */
.work { padding-block: var(--section-gap); }
.work h2 { margin-bottom: var(--space-2xl); }
.rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--color-ink); }
.row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: var(--gap-columns); align-items: center; padding-block: var(--space-lg); border-bottom: 1px solid var(--color-rule); min-height: 132px; }
.row h3 { font: 600 clamp(1.9rem, 1.6vw + 1rem, 2.75rem)/0.98 var(--font-display); letter-spacing: var(--tracking-display); max-width: 18ch; }
.row p { color: var(--color-ink-2); max-width: 38ch; }
.row__ph { grid-column: 3; aspect-ratio: 4 / 3; margin: 0; border-radius: var(--radius-card); }

/* ---------- reviews, a sideways rail ---------- */
.reviews { display: flex; flex-direction: column; justify-content: center; gap: var(--space-2xl); padding-block: var(--section-gap-s); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; }
.reviews__head h2 { max-width: 16ch; }
.rev-rail { display: flex; gap: var(--gap-columns); width: max-content; padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))); }
.rev-rail:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
.rev { flex: none; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-xl); width: clamp(17rem, 30vw, 28rem); min-height: 20rem; margin: 0; padding: var(--space-lg) 0 0; border-top: 1px solid var(--color-ink); scroll-snap-align: start; }
.rev blockquote { margin: 0; font: 400 clamp(1.75rem, 1.2vw + 1.1rem, 2.5rem)/1.08 var(--font-outlier); color: var(--color-ink); }
.rev figcaption { display: flex; flex-direction: column; gap: var(--space-2xs); font-size: var(--text-sm); color: var(--color-muted); }
.rev figcaption b { font-weight: 600; color: var(--color-accent); }
.rev--end { justify-content: center; align-items: flex-start; border-top-color: var(--color-rule); }
.js.sc-on .sc-stage.reviews { overflow: clip; }

/* ---------- estimate, on the field ---------- */
.estimate { --color-focus: var(--color-accent-ink); background: var(--color-accent); color: var(--color-accent-ink); padding-block: var(--section-gap); }
.estimate .container { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-3xl) var(--gap-columns); align-items: start; }
.estimate h2 { color: var(--color-accent-ink); margin-bottom: var(--space-xl); }
.cells { display: flex; flex-wrap: wrap; margin: 0; padding: 0; border: 0; }
.cells legend { margin-bottom: var(--space-sm); font-weight: 500; }
.cells input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cells label { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--space-lg); margin: 0 -1px -1px 0; border: 1px solid color-mix(in oklab, var(--color-accent-ink) 45%, transparent); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.cells label:hover { background: color-mix(in oklab, var(--color-accent-ink) 12%, transparent); }
.cells input:checked + label { background: var(--color-accent-ink); color: var(--color-accent); border-color: var(--color-accent-ink); }
.cells input:focus-visible + label { outline: 2px solid var(--color-focus); outline-offset: 2px; position: relative; z-index: 1; }
.chosen { margin: var(--space-xl) 0; font: 600 var(--text-section)/0.95 var(--font-display); max-width: 18ch; }
.inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); margin-bottom: var(--space-lg); }
.inputs label { display: flex; flex-direction: column; gap: var(--space-xs); font-size: var(--text-sm); font-weight: 500; }
.inputs input { min-height: 48px; padding: 0 var(--space-sm); border: 1px solid color-mix(in oklab, var(--color-accent-ink) 60%, transparent); border-radius: var(--radius-card); background: transparent; color: var(--color-accent-ink); transition: border-color var(--dur-micro) var(--ease-out); }
.inputs input:hover { border-color: var(--color-accent-ink); }
.inputs input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.estimate__direct { display: flex; flex-direction: column; gap: var(--space-md); padding-top: var(--space-sm); }
.estimate__direct a { color: inherit; text-decoration-color: color-mix(in oklab, var(--color-accent-ink) 50%, transparent); }
.estimate__direct a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.big-tel { font: 400 clamp(2.5rem, 3vw + 1rem, 4rem)/1 var(--font-outlier); text-decoration: none; font-variant-numeric: tabular-nums; }
.estimate__direct p { max-width: 34ch; color: color-mix(in oklab, var(--color-accent-ink) 85%, transparent); }

/* ---------- footer and concept note ---------- */
.foot { padding-block: var(--space-3xl) var(--space-2xl); }
.foot .container { display: grid; gap: var(--space-md); }
.foot img { width: 180px; height: auto; margin-bottom: var(--space-sm); }
.foot p { color: var(--color-ink-2); }
.foot .credits { font-size: var(--text-sm); color: var(--color-muted); max-width: 90ch; }
.foot a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.dj { background: var(--color-paper-2); border-top: 1px solid var(--color-rule); padding-block: var(--space-2xl); }
.dj .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-lg); }
.dj h2 { font-size: var(--text-display-s); }
.dj p { margin-top: var(--space-xs); color: var(--color-ink-2); }

dialog { max-width: min(32rem, calc(100% - 2 * var(--space-md))); padding: 0; border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-paper); color: var(--color-ink); }
dialog::backdrop { background: color-mix(in oklab, var(--color-ink) 55%, transparent); }
.dlg { position: relative; display: grid; gap: var(--space-md); padding: var(--space-xl); }
.dlg h3 { padding-right: var(--space-xl); font-size: var(--text-xl); }
.dlg .acts { margin-top: var(--space-sm); }
.x { position: absolute; top: var(--space-sm); right: var(--space-sm); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--radius-card); background: none; color: var(--color-ink); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.x:hover, .x:active { background: var(--color-paper-2); }
.x:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 0; }
.x svg { width: 20px; height: 20px; }

/* ---------- smaller screens ---------- */
@media (max-width: 60rem) {
  .hero-act, .rev-act { height: auto !important; }
  .reviews, .js.sc-on .sc-stage.reviews { overflow: visible; scroll-snap-type: none; }
  .rev-rail { transform: none !important; width: auto; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); padding-inline: var(--gutter); }
  .rev { min-height: 0; }
  .js.sc-on .sc-stage, .sc-stage { position: relative; top: auto; height: auto; }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero__copy { padding: var(--space-2xl) var(--gutter) var(--space-xl); }
  .hero__field { --hp: var(--m-p, 0); min-height: 0; aspect-ratio: 4 / 4.4; }
  .hero__photo { width: 50%; right: 7%; }
  .hero__plane { --travel: -40%; width: 70%; left: 27%; bottom: 6%; }
  .nav ul { display: none; }
  .nav__call { margin-left: auto; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-xl); }
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .row h3 { grid-column: 1 / -1; }
  .row p { grid-column: 1; }
  .row__ph { grid-column: 2; }
  .estimate .container { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 40rem) {
  .concept p { display: none; }
  .concept .container { justify-content: flex-end; }
  .concept .container { min-height: 44px; }
  .pay { min-height: 32px; padding: 0 var(--space-sm); }
  .nav .container { min-height: 64px; gap: var(--space-md); }
  .mark img { height: 38px; }
  .nav__call { font-size: var(--text-lg); }
  .hero h1 { font-size: clamp(2.75rem, 11vw, 3.5rem); }
  .row { grid-template-columns: minmax(0, 1fr); }
  .figures dd { font-size: 2.6rem; }
  .row p, .row__ph { grid-column: 1; }
  .inputs { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__photo, .hero__plane { transform: none; }
  .js.sc-on [data-sc-in], .js.sc-on [data-sc-stagger] > * { transform: none; }
}
