/* brine.co.nz on kit v2 (13 Oct night). Brine's own: paper, ink and carbon blue, the red full stop, Inter Tight with IBM Plex Mono
   for figures and step numbers (Brine's docket, kept small). Everything else is the kit. */
:root {
  --paper: #f3f4f0; --stone: #e3e5df; --ink: #101820; --on-ink: #f3f4f0;
  --muted-paper: #4f5a61; --muted-ink: #a3abb0;
  --accent: #2340c8; --accent-on-ink: #8fa2ff; --stop: #d7261e;
  --logo-ar: 3.832;                                   /* the wordmark, 316 x 83 */
  --logo-h: 30px; --logo-h-top: clamp(34px, 3.3vw, 50px);
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  /* the demo's own names (showcase/phone.css) */
  --sans: var(--font); --carbon: var(--accent); --white: #fff; --rule: #9aa3a8; --muted: var(--muted-paper);
}
:root[data-tone='ink'] { --muted: var(--muted-ink); }
:root.is-mid { --muted: var(--fg); }   /* after the line above, or it undoes the kit's mid-blend rule */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* the wordmark is inline SVG in the header colour, its full stop always red */
.b-header .b-logo { min-height: 44px; display: flex; align-items: center; }   /* a 30px wordmark still gets a full-size tap */
.b-logo svg { display: block; height: var(--logo-h); width: auto; transition: height .6s var(--ease); }
.b-header.is-over .b-logo svg { height: var(--logo-h-top);  }
.b-menu .b-logo svg { height: 30px; }
/* Hero (James, 14 Oct: ideas 18 and 7 together): paper, the line low on the left with the trade turning over in blue, Brine's red full stop
   set big on the right. On a first visit the load-in's own stop flies across and becomes it (brine.js), then it opens onto the work, and
   only then does the header's logo get its red stop. */
.b-hero--stop { background: var(--paper); color: var(--ink); }
.b-hero--stop::after { content: none; }
.b-hero--stop .b-hero__words { inset: 0; padding: clamp(96px, 13svh, 150px) var(--gutter) clamp(18px, 2.4vw, 34px); display: grid;
  grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto; row-gap: clamp(22px, 3vw, 40px); align-items: center;
  /* the film's square (--fw) beside the words, which sit in the middle of the screen's height */
  --fw: min(36vw, calc(100svh - 300px)); column-gap: clamp(40px, 5vw, 96px); }
.b-hero--stop h1 { font-size: clamp(34px, 3.7vw, 88px); max-width: 11.5em; text-shadow: none; padding-bottom: .04em; }
.b-hero--stop .b-hero__base { grid-column: 1 / -1; border-top-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.b-hero--stop :focus-visible { outline-color: var(--accent); box-shadow: none; }
.b-header.is-over { color: var(--ink); background-image: none; }
.b-header.is-over nav { text-shadow: none; }   /* the kit's shade and halo are for white words over a photo */
.b-header.is-over .b-logo svg { filter: none; }
.b-header.is-over :focus-visible { outline-color: var(--accent); box-shadow: none; }
/* the trade: on its own line (a longer word never pushes "built" down a line). The words share one place and take turns: the old one
   lifts away as it fades, the new one rises into place, so only one word ever shows (a sliding strip showed halves of two over the lines
   either side, 14 Oct). brine.js turns it over */
.br-trade { display: inline-grid; color: var(--accent); }
.br-trade__list { display: contents; }
.br-trade__list i { grid-area: 1 / 1; font-style: normal; white-space: nowrap; opacity: 0; transform: translateY(.3em); filter: blur(.03em);
  transition: opacity .55s ease, transform .75s var(--ease), filter .55s ease; }
.br-trade__list i.is-on { opacity: 1; transform: none; filter: none; transition-delay: .18s; }
.br-trade__list i.was-on { opacity: 0; transform: translateY(-.3em); filter: blur(.03em); }
/* The hero's film (James, 14 Oct): the red full stop fades away onto Wrenfield's old logo, which is redrawn sharp, shown at its sizes
   and its colours; a dip through red, and the square is a browser window where their site builds, scrolls down and back up, and rests
   (James 27 Oct: no pointer on Call Tom, no phone). Then it's theirs to try.
   showcase/film.js runs it by adding one class per step (s-logo, s-sharp ... s-done) and the CSS here eases each change. Sized in the
   square's own units (cqw), so it plays the same at any size. */
.br-film { --dev-w: 375px; --dev-h: 720px; position: relative; margin: 0 0 clamp(4px, 1vw, 16px); width: var(--fw, 36vw); min-width: 220px; display: grid; gap: 12px; }
.bf-box { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; container-type: inline-size; background: #e6e8e3; }
.bf-box > * { position: absolute; margin: 0; }
.bf-veil { inset: 0; z-index: 8; background: var(--stop); pointer-events: none; transition: opacity 1.2s cubic-bezier(.4, 0, .2, 1); }
.br-film.s-logo .bf-veil { opacity: 0; }
.br-film.s-dip .bf-veil { opacity: 1; transition-duration: .5s; }
.br-film.s-window .bf-veil { opacity: 0; transition-duration: .9s; }

/* the logo, its sizes and its colours, on a pale ground */
.bf-logo, .bf-new, .bf-skel { pointer-events: none; }   /* only pictures: the faded WRENFIELD still took the taps meant for Get a price under it (round 5) */
.bf-logo { inset: 0; z-index: 2; background: #e6e8e3; transform: scale(1.05); transition: transform 1.8s var(--ease); }
.bf-logo > * { position: absolute; margin: 0; }
.br-film.s-logo .bf-logo { transform: none; }
.br-film.s-window .bf-logo { visibility: hidden; }
.bf-box .bf-old { inset: auto; left: 20cqw; top: 33.6cqw; width: 60cqw; height: auto; image-rendering: pixelated; object-fit: fill; animation: none; clip-path: inset(0); transition: clip-path .9s linear, transform .9s var(--ease-in-out); }
.bf-new { left: 20cqw; top: 37.8cqw; width: 60cqw; height: 14.4cqw; z-index: 6; color: var(--ink); overflow: visible; transform-origin: 0 0; clip-path: inset(0 100% 0 0);
  transition: clip-path .9s linear, transform 1.1s var(--ease-in-out), color .7s ease, opacity .6s ease; }
.bf-name { font: 700 46px 'Antonio', 'Arial Narrow', sans-serif; fill: currentColor; }
.bf-trade { font: 500 13px 'Golos Text', sans-serif; letter-spacing: .3em; fill: currentColor; }
.bf-scan { left: 20cqw; top: 27cqw; width: .45cqw; height: 37cqw; background: var(--accent); box-shadow: 0 0 2.4cqw .6cqw rgb(35 64 200 / .3); opacity: 0; }
.br-film.s-sharp .bf-old { clip-path: inset(0 0 0 100%); }
.br-film.s-sharp .bf-new { clip-path: inset(-20%); }
.br-film.s-sharp .bf-scan { animation: bf-scan .9s linear forwards; }
@keyframes bf-scan { 0% { opacity: 0; transform: none; } 8%, 92% { opacity: 1; } 100% { opacity: 0; transform: translateX(60cqw); } }
.br-film.s-scales .bf-new { transform: translateY(-17cqw); }
.bf-scales { left: 20cqw; right: 20cqw; top: 41cqw; display: flex; align-items: flex-end; gap: 5cqw; }
.bf-scales > span { display: grid; gap: 1.6cqw; opacity: 0; transform: translateY(2.4cqw); transition: opacity .6s ease, transform .8s var(--ease); transition-delay: .6s; }   /* once the logo has moved up out of its way */
.bf-fav svg { display: block; width: 10cqw; height: 10cqw; }
.bf-scales small, .bf-sw span, .bf-sw b { display: block; font: 400 2.5cqw/1 var(--mono); color: #4f5a61; }
.bf-sw b { font: 500 2.7cqw/1 var(--sans); color: #101820; margin-bottom: .9cqw; }   /* the colour's name over its code */
.br-film.s-scales .bf-scales > span { opacity: 1; transform: none; }
.bf-sw { left: 20cqw; top: 66cqw; display: flex; gap: 2.4cqw; }
.bf-sw li { width: 12cqw; opacity: 0; transform: translateY(2.4cqw); transition: opacity .6s ease, transform .8s var(--ease); transition-delay: calc(var(--i) * .14s); }
.bf-sw li::before { content: ''; display: block; height: 9cqw; margin-bottom: 1.4cqw; background: var(--c); box-shadow: inset 0 0 0 1px rgb(16 24 32 / .14); }
.br-film.s-colours .bf-sw li { opacity: 1; transform: none; }

/* the window: a plain bar with the address, and the site inside, laid out at a real width and scaled to fit (film.js) */
.bf-win { inset: 0; z-index: 1; display: grid; grid-template-rows: auto 1fr; background: #fff; }
.bf-bar { position: relative; display: flex; align-items: center; justify-content: center; height: max(26px, 7cqw); background: #eceee9; border-bottom: 1px solid #d5d9d3; }
.bf-url { padding: .5cqw 3cqw; border-radius: 99px; background: #fff; font: 400 max(10px, 2.3cqw)/1.4 var(--font); color: #4f5a61; }
.bf-url::before { content: ''; display: inline-block; width: .8em; height: .62em; margin-right: .5em; border: 1.5px solid currentColor; border-radius: 2px; vertical-align: -.02em; }
.bf-view { position: relative; overflow: hidden; background: #f4f4f1; }
.bf-frame { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; opacity: 0; pointer-events: none; background: #24292f; transition: opacity .8s ease; }
.br-film.s-site .bf-frame { opacity: 1; }
.br-film.s-site .bf-new { opacity: 0; transition-delay: 0s, 0s, 0s, .3s; }
.br-film.is-live:not(.is-touch) .bf-frame, .br-film.is-try .bf-frame { pointer-events: auto; }
.bf-skel { position: absolute; inset: 0; }
.bf-skel i { position: absolute; left: 6cqw; height: 3.2cqw; background: #dfe2dc; transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease-in-out); transition-delay: calc(.35s + var(--i) * .1s); }
.bf-skel i:nth-child(1) { top: 9cqw; width: 22cqw; } .bf-skel i:nth-child(2) { top: 40cqw; width: 62cqw; height: 8cqw; } .bf-skel i:nth-child(3) { top: 50cqw; width: 48cqw; height: 8cqw; }
.bf-skel i:nth-child(4) { top: 64cqw; width: 18cqw; height: 5.4cqw; } .bf-skel i:nth-child(5) { top: 64cqw; left: 27cqw; width: 26cqw; height: 5.4cqw; }
.br-film.s-window .bf-skel i { transform: none; }
.br-film.s-site .bf-skel { opacity: 0; transition: opacity .5s ease .4s; }
.bf-try { position: absolute; left: 50%; top: 50%; z-index: 4; transform: translate(-50%, -50%); min-height: 44px; padding: 0 20px; background: var(--ink); color: var(--on-ink); font: 500 15px var(--font); white-space: nowrap; }

/* under it: what's happening, one line at a time, and a replay at the end */
.br-film figcaption { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 44px; }
.br-steps { display: block; color: var(--muted-paper); transition: opacity .3s ease, transform .4s var(--ease); }
.br-steps.is-out { opacity: 0; transform: translateY(.3em); }
@media (max-width: 599px) { .br-steps { min-height: 2lh; } }   /* two lines kept for it: the end caption's second line moved the window 2.4px in one frame (motion.py, 15 Oct) */
.br-replay { flex: none; min-height: 44px; color: var(--ink); text-decoration: underline; text-underline-offset: .25em; }
.br-replay:hover { color: var(--accent); }

/* the end, still: without a script (the noscript frame), with reduced motion, or after it's played */
html:not(.js) .bf-veil, html:not(.js) .bf-logo, html:not(.js) .bf-new, html:not(.js) .bf-skel, html:not(.js) .bf-frame[data-src] { display: none; }
html:not(.js) .bf-frame { opacity: 1; width: 100%; height: 100%; pointer-events: auto; }
html.intro:not(.br-landed) .br-film { opacity: 0; }
.br-fly { position: fixed; z-index: 203; background: var(--stop); transform-origin: 0 0; pointer-events: none; }
html.js .b-header .br-dot { opacity: 0; transform-box: fill-box; transform-origin: center; }
html.dot-on .b-header .br-dot { opacity: 1; animation: br-stamp .55s var(--ease) both; }
@media (max-width: 899px) { /* phones and tablets held upright: the square above the words */
  .b-hero--stop .b-hero__words { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; align-content: end; padding-top: 80px; row-gap: 18px; }
  .br-film { order: -1; justify-self: start; width: min(78vw, calc(100svh - 440px)); min-width: 170px; margin: 0; gap: 4px; }
  .b-hero--stop .b-hero__base { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { .br-film *, .br-film { transition: none !important; animation: none !important; } }

/* How it works: four rows, a number, a heading, a line */
.b-steps { display: grid; counter-reset: none; }
.b-step { display: grid; grid-template-columns: 4.5em 1fr; column-gap: var(--gutter); padding: 26px 0 30px; border-top: 1px solid color-mix(in srgb, var(--fg) 18%, transparent); }
.b-step__n { font: 400 14px var(--mono); color: var(--muted); padding-top: .6em; grid-row: span 2; }
.b-step__h { font-size: clamp(24px, 2.4vw, 38px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 400; margin-bottom: 10px; }
.b-step p { max-width: 54ch; }
@media (max-width: 599px) { .b-step { grid-template-columns: 2.6em 1fr; } }

/* Price: the two figures set huge, each with its words */
.b-prices { display: grid; gap: clamp(30px, 4vw, 56px); }
.b-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px clamp(18px, 2.4vw, 40px); }
.b-price .b-huge { font-size: clamp(64px, 11vw, 190px); }
.b-price__what { font-size: clamp(18px, 1.6vw, 24px); line-height: 1.35; max-width: 26ch; }
.b-included { columns: 2 26ch; }
.b-included b { font-weight: 500; }

/* Questions: rows that open, a hairline between, a plus that turns */
.b-faq { display: grid; }
.b-q { border-top: 1px solid color-mix(in srgb, var(--fg) 18%, transparent); }
.b-q:last-child { border-bottom: 1px solid color-mix(in srgb, var(--fg) 18%, transparent); }
.b-q summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 64px; padding: 14px 0;
  font-size: clamp(19px, 1.7vw, 26px); letter-spacing: -0.02em; }
.b-q summary::-webkit-details-marker { display: none; }
.b-q__mark { flex: none; width: 16px; height: 16px; position: relative; }
.b-q__mark::before, .b-q__mark::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: currentColor; transition: transform .4s var(--ease); }
.b-q__mark::after { transform: rotate(90deg); }
.b-q[open] .b-q__mark::after { transform: rotate(0); }
.b-q p { max-width: 60ch; padding: 0 0 26px; }
.b-q summary:hover { color: var(--accent); }

/* The form's choices: plain radios on lines */
.b-choice { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.b-choice legend { font-size: 13px; letter-spacing: .02em; color: var(--muted); margin-bottom: 6px; padding: 0; }
.b-choice label { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.b-choice input[type=radio] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.b-choice__text { font: inherit; font-size: 17px; color: inherit; background: transparent; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--fg) 35%, transparent);
  padding: 6px 0 8px; margin: -4px 0 6px 28px; width: calc(100% - 28px); border-radius: 0; }
.b-choice__text:focus { outline: none; border-bottom-color: var(--accent); }
.form-status.ok { color: #1d7a3a; }
.field-error { display: block; margin-top: 4px; }

@media (max-width: 599px) { .b-label, .b-choice legend { font-size: 14px; } }   /* the form's legends too (review 15 Oct) */

/* Terms and Thanks: a plain reading page in the same type */
.b-header--page { position: absolute; background: none; }
.b-doc { padding-top: clamp(120px, 14vw, 200px); }
.b-doc > div { max-width: 68ch; }
.b-doc h1 { font-size: clamp(44px, 7vw, 110px); line-height: .95; letter-spacing: -0.05em; font-weight: 400; margin-bottom: 26px; }
.b-doc h2 { font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -0.02em; font-weight: 500; margin: 52px 0 14px; }
.b-doc p, .b-doc li { margin-bottom: 12px; }
.b-doc ul { list-style: none; padding: 0; }
.b-doc li { padding: 12px 0 12px 22px; border-top: 1px solid color-mix(in srgb, var(--fg) 15%, transparent); position: relative; margin: 0; }
.b-doc li::before { content: ''; position: absolute; left: 2px; top: 1.15em; width: 7px; height: 7px; background: var(--stop); }
.b-doc a { color: var(--accent); }

/* Load-in: the word rises, then its red full stop is set down (pressed in from a little larger, no bounce) before it glides to the corner.
   A brushed stroke suited a painter's splash, a full stop is placed. */
html.intro .b-intro__splash { -webkit-mask-image: none; mask-image: none; transform-origin: 95.4% 80.9%; animation: br-stamp .55s cubic-bezier(.2, .7, .1, 1) 1.05s both; }
@keyframes br-stamp { from { opacity: 0; transform: scale(2.6); } }
/* the word goes from white to ink as the black lifts off the paper, so it lands as the header's own logo */
html.intro .b-intro__letters { animation: b-rise-in .8s var(--ease) .25s both, br-ink 1.1s cubic-bezier(.65, 0, .35, 1) 2.1s forwards; }
@keyframes br-ink { to { filter: brightness(.09); } }
/* the trade fades in where it stands rather than rising from below (risen from below it showed over "built" for a moment) */
html.js .b-hero--stop [data-lines] .wi:has(> .br-trade) { transform: none; opacity: 0; transition: opacity .9s ease; transition-delay: calc(var(--d, 0s) + var(--l, 0) * .085s); }
html.js .b-hero--stop [data-lines].in .wi:has(> .br-trade) { opacity: 1; }
@media (max-width: 599px) { .b-hero__base > :first-child { flex-basis: 100%; } .b-hero__base > :first-child .b-phone-only { text-wrap: balance; } }   /* phones: the price, monthly and GST included, on its own row above the action (review 14 Oct: phones saw only the $500) */

/* Why a website (James 30 Oct, option C chosen 31 Oct): all eight checked figures on one wall, each with its source
   (ops/research/website-numbers.md). One card at a time turns ink, about 6 s each, so the eye moves across the wall, and anyone can
   read any card at their own pace. Pointing at or tabbing into a card lights it and holds the turn, and the Pause button stops it
   (anything changing for over 5 s needs one). Without JS, or with reduced motion, no card turns by itself. brine.js runs the turn */
.br-facts__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 48px; margin-bottom: clamp(28px, 3.4vw, 48px); }
.br-facts__title { margin: 0; font: 700 clamp(44px, 5.6vw, 84px)/1 var(--font); letter-spacing: -0.04em; }
.br-facts__stop { color: var(--stop); }
.br-facts__lede { margin: 0; max-width: 40ch; color: var(--muted); }
.br-facts__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.1vw, 16px); }
.br-fact { display: flex; flex-direction: column; gap: 16px; min-height: clamp(250px, 21vw, 320px); padding: clamp(20px, 2vw, 28px); background: var(--stone); color: var(--ink);
  transition: background-color .5s ease, color .5s ease; }
.br-fact__n { font: 700 clamp(48px, 5vw, 76px)/1 var(--font); letter-spacing: -0.05em; white-space: nowrap; color: var(--ink); transition: color .5s ease; }
.br-fact__t { margin: 0 0 auto; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.35; }
.br-fact__src { align-self: flex-start; font-size: 14px; color: var(--muted-paper); text-underline-offset: .2em; transition: color .5s ease; }
.br-fact__src:hover { color: var(--ink); }
.br-fact__src:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.br-fact.is-on { background: var(--ink); color: var(--on-ink); }
.br-fact.is-on .br-fact__n { color: var(--accent-on-ink); }
.br-fact.is-on .br-fact__src { color: var(--muted-ink); }
.br-fact.is-on .br-fact__src:hover { color: var(--on-ink); }
.br-fact.is-on .br-fact__src:focus-visible { outline-color: var(--accent-on-ink); }
@media (max-width: 1099px) { .br-facts__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .br-fact { min-height: 220px; } }
@media (max-width: 559px) { .br-facts__list { grid-template-columns: 1fr; } .br-fact { min-height: 0; gap: 12px; } .br-fact__n { font-size: 52px; } }
@media (prefers-reduced-motion: reduce) { .br-fact, .br-fact__n, .br-fact__src { transition: none; } }
.br-facts__pause { margin-top: 18px; background: none; border: 0; padding: 6px 0; color: var(--fg); font: inherit; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; min-height: 44px; }
