/* Odd Lot — a fictional studio. Two grounds (black room, paper table), one structural blue, one red that means "start here". */
:root {
  --black: #0c0c0d; --paper: #f1eee7; --ink: #121212; --blue: #1d3ed6; --red: #e2261c;
  --mute-d: #a29e96; --mute-l: #6c6962;
  --display: 'Syne', 'Arial Black', sans-serif; --text: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --g: clamp(16px, 4.4vw, 72px);
  color-scheme: dark light;
}
html { background: var(--black); }
body { background: var(--black); color: var(--paper); font: 400 16px/1.5 var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; }
h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--paper); color: var(--ink); padding: 10px 14px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 1.5px solid var(--blue); outline-offset: 3px; }

/* The cap word: the studio's one switch device. A word in the display face, inside a line of the text face. */
.cap { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: .84em; letter-spacing: .01em; }

/* The frame label every artboard carries */
.board-label { font: 500 12px/1.2 var(--text); letter-spacing: .03em; color: var(--mute-d); margin: 0 0 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- instruments ---------------- */
.chrome { position: fixed; z-index: 40; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 16px var(--g); pointer-events: none; color: var(--paper); background: var(--slate, transparent); }
/* the slate has its own ground wherever content scrolls under it: the ground of the scene beneath, plus a hairline */
[data-slate="on"] .chrome { box-shadow: 0 1px 0 color-mix(in srgb, currentColor 16%, transparent); }
.chrome > * { pointer-events: auto; }
[data-ground="light"] .chrome { color: var(--ink); }
.crumb { display: flex; align-items: baseline; gap: .55em; min-width: 0; }
.wordmark { font: 800 19px/1 var(--display); letter-spacing: -.01em; text-decoration: none; }
.crumb-path { font: 500 13px/1 var(--text); opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cta { position: relative; display: inline-flex; align-items: center; background: var(--red); color: #fff; border: 0; border-radius: 0; font: 500 15px/1 var(--text); padding: 14px 18px; text-decoration: none; cursor: pointer; }
.cta .hd { position: absolute; width: 8px; height: 8px; box-sizing: border-box; background: #fff; border: 1.5px solid var(--blue); opacity: 0; pointer-events: none; }
.cta .hd:nth-of-type(1) { left: -8px; top: -8px; } .cta .hd:nth-of-type(2) { right: -8px; top: -8px; }
.cta .hd:nth-of-type(3) { right: -8px; bottom: -8px; } .cta .hd:nth-of-type(4) { left: -8px; bottom: -8px; }
.cta:focus-visible { outline: 1.5px solid var(--blue); outline-offset: 4px; }
.cta:focus-visible .hd { opacity: 1; }

.status { position: fixed; z-index: 40; left: calc(var(--g) - 8px); bottom: calc(10px + var(--safe-bottom)); font: 500 13px/1.3 var(--text); color: var(--paper); background: var(--black); padding: 5px 8px; margin: 0; max-width: calc(100vw - 2 * var(--g)); }
[data-ground-low="light"] .status { color: var(--ink); background: var(--paper); }
.status .time { font-variant-numeric: tabular-nums; }
.status .idle:not([hidden]) { display: block; }

.ctl { background: transparent; color: inherit; border: 1px solid currentColor; border-radius: 0; font: 500 12px/1 var(--text); padding: 8px 11px; min-height: 32px; cursor: pointer; }
.ctl[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ---------------- 1 · hero ---------------- */
.hero .frame { background: var(--black); color: var(--paper); }
.name { position: absolute; left: var(--g); right: var(--g); top: 10vh; height: 66vh; font: 800 13vw/1 var(--display); color: var(--paper); }
.loader { position: absolute; pointer-events: none; display: none; }
.js .loader { display: flex; }
.reel { position: absolute; z-index: 2; right: var(--g); top: 31vh; width: calc(51vh * .8); }
.board { position: relative; aspect-ratio: 4 / 5; overflow: clip; background: #1b1b1d; }
.slides > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lightband { position: absolute; top: -12%; bottom: -12%; left: 0; width: 80%; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(90deg, transparent 0, rgba(70, 105, 255, .25) 22%, rgba(170, 190, 255, .8) 42%, #fff 50%, rgba(170, 190, 255, .8) 58%, rgba(70, 105, 255, .25) 78%, transparent 100%);
  transform: translateX(-140%) skewX(-14deg); }
.reel-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.reel-caption { font: 500 14px/1.2 var(--text); color: var(--paper); min-width: 0; flex: 1 0 100%; }
.reel-ctl { display: flex; gap: 6px; flex: none; }
.reel-ctl .prev, .reel-ctl .next { font-size: 16px; width: 34px; padding: 0; }
.hero-copy { position: absolute; left: var(--g); bottom: calc(8vh + var(--safe-bottom)); width: min(31rem, 40vw); }
.lede { font: 400 clamp(17px, 1.4vw, 21px)/1.38 var(--text); color: var(--paper); }
.see { display: inline-block; margin-top: 16px; font: 500 15px/1 var(--text); text-underline-offset: 4px; }

/* ---------------- 2 · index ---------------- */
.index .frame { background: var(--paper); color: var(--ink); padding: 15vh var(--g) 14vh; }
.index-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.label { font: 500 13px/1.2 var(--text); letter-spacing: .12em; text-transform: uppercase; }
.hint { font: 400 14px/1.3 var(--text); color: var(--mute-l); }
.rows { list-style: none; margin: 3vh 0 0; padding: 0; border-top: 1px solid var(--ink); }
.row { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) minmax(13rem, 20rem) 3.5rem; align-items: center; column-gap: 1rem; padding: 2vh 0 2.2vh; border-bottom: 1px solid var(--ink); text-decoration: none; color: var(--ink); }
.row .no { font: 500 13px/1 var(--text); align-self: start; padding-top: .9em; }
.row .t { font: 800 clamp(40px, 6.6vw, 116px)/1 var(--display); letter-spacing: -.035em; white-space: nowrap; }
.row .meta { display: grid; font: 400 14px/1.4 var(--text); }
.row .client { font-weight: 600; }
.row .seen { justify-self: end; font: 600 10px/1 var(--text); letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--blue); padding: 5px 6px; visibility: hidden; }
.row.is-seen .seen { visibility: visible; }
.row .thumb { display: none; }
.row:focus-visible { outline-offset: 6px; }
@media (hover: hover) and (pointer: fine) { .js .rows, .js .rows .row { cursor: none; } }

.preview { position: fixed; z-index: 30; left: 0; top: 0; width: clamp(220px, 21vw, 340px); pointer-events: none; visibility: hidden; }
.preview .board-label { color: var(--mute-l); }
.pv-board { position: relative; aspect-ratio: 4 / 5; overflow: clip; }
.pv-board > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.chip { position: fixed; z-index: 31; left: 0; top: 0; background: var(--red); color: #fff; font: 600 12px/1 var(--text); padding: 8px 10px; pointer-events: none; visibility: hidden; white-space: nowrap; }

.sheet { position: fixed; z-index: 45; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom)); display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); padding: 10px; }
.sheet[hidden] { display: none; }
.sheet-art { position: relative; aspect-ratio: 4 / 5; overflow: clip; }
.sheet-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sheet-label { font: 500 13px/1.3 var(--text); margin-bottom: 10px; }
.sheet .cta { min-height: 44px; }

/* ---------------- 3 · statement ---------------- */
.statement .frame { background: var(--paper); color: var(--ink); display: grid; align-content: center; padding: 0 var(--g); }
.say { font: 500 clamp(26px, 3.45vw, 60px)/1.13 var(--text); letter-spacing: -.017em; max-width: 21.5em; margin-left: calc(4.5rem + 1rem); text-wrap: pretty; }

/* ---------------- 4 · facts ---------------- */
.facts .frame { background: var(--paper); color: var(--ink); padding: 6vh var(--g) 16vh; }
.figures { list-style: none; margin: 0; padding: 3vh 0 0; display: grid; grid-template-columns: auto auto 1fr; column-gap: 8vw; row-gap: 3vw; border-top: 1px solid var(--ink); }
.figures li { display: grid; align-content: start; gap: .5rem; }
.num { display: block; font: 800 clamp(64px, 7.6vw, 140px)/.9 var(--display); letter-spacing: -.04em; }
.what { font: 500 16px/1.3 var(--text); }
.small { font: 400 13px/1.4 var(--text); color: var(--mute-l); margin-top: 2.4vh; }
.quote { margin: 11vh 0 0 calc(4.5rem + 1rem); max-width: 34rem; }
.quote blockquote { font: 600 clamp(24px, 2.5vw, 40px)/1.16 var(--display); letter-spacing: -.02em; }
.quote figcaption { font: 400 14px/1.4 var(--text); margin-top: 1.2em; color: var(--mute-l); }

/* ---------------- 5 · enquiry ---------------- */
.enquiry .frame { background: var(--black); color: var(--paper); padding: 16vh var(--g) 12vh; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 5vw; align-items: start; }
.yours { position: sticky; top: 14vh; }
.yours .board-label { margin-bottom: 18px; }   /* clear of the board's crop marks */
.yours-board { position: relative; aspect-ratio: 16 / 11; background: var(--blue); }
.yours-title { position: absolute; left: 4%; right: 4%; top: 50%; height: 84%; transform: translateY(-50%); font: 800 6vw/1 var(--display); color: #fff; }
/* while the visitor is titling it, the card is the selected artboard */
.enquiry.is-setting .yours-board { outline: 1.5px solid #fff; outline-offset: 6px; }
.big { font: 800 clamp(48px, 6.6vw, 118px)/.92 var(--display); letter-spacing: -.035em; margin-bottom: .32em; }
.offer { font: 400 18px/1.48 var(--text); max-width: 33em; color: #dcd8cf; }

/* The brief is a job ticket laid on the studio's paper table: ruled rows numbered like the index, crop marks at
 * its corners, the working title typed in the studio's display face, the red button its one accent. */
.crop::before { content: ""; position: absolute; inset: calc(-1 * var(--co, 14px)); pointer-events: none; --cm: rgba(241, 238, 231, .55); --cl: calc(var(--co, 14px) - 5px);
  background:
    linear-gradient(var(--cm), var(--cm)) 0 var(--co, 14px) / var(--cl) 1px no-repeat, linear-gradient(var(--cm), var(--cm)) var(--co, 14px) 0 / 1px var(--cl) no-repeat,
    linear-gradient(var(--cm), var(--cm)) 100% var(--co, 14px) / var(--cl) 1px no-repeat, linear-gradient(var(--cm), var(--cm)) calc(100% - var(--co, 14px) + 1px) 0 / 1px var(--cl) no-repeat,
    linear-gradient(var(--cm), var(--cm)) 0 calc(100% - var(--co, 14px)) / var(--cl) 1px no-repeat, linear-gradient(var(--cm), var(--cm)) var(--co, 14px) 100% / 1px var(--cl) no-repeat,
    linear-gradient(var(--cm), var(--cm)) 100% calc(100% - var(--co, 14px)) / var(--cl) 1px no-repeat, linear-gradient(var(--cm), var(--cm)) calc(100% - var(--co, 14px) + 1px) 100% / 1px var(--cl) no-repeat; }
.form, .sent { position: relative; background: var(--paper); color: var(--ink); }
.form { margin-top: 5vh; display: grid; padding: 4px clamp(18px, 2.2vw, 32px) 28px; counter-reset: row; }
.form[hidden] { display: none; }
.field { position: relative; display: grid; gap: 8px; border: 0; border-bottom: 1px solid var(--ink); padding: 18px 0 20px 2.6rem; margin: 0; min-width: 0; counter-increment: row; }
.field::after { content: counter(row, decimal-leading-zero) / ""; position: absolute; left: 0; top: 20px; font: 500 13px/1 var(--text); }
/* focus: the row is selected the way the index selects a title, a blue box with handles */
.field::before { content: ""; position: absolute; inset: 6px -10px 6px calc(2.6rem - 12px); border: 1.5px solid var(--blue); pointer-events: none; visibility: hidden;
  background: linear-gradient(var(--blue), var(--blue)) 0 0 / 7px 7px no-repeat, linear-gradient(var(--blue), var(--blue)) 100% 0 / 7px 7px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 0 100% / 7px 7px no-repeat, linear-gradient(var(--blue), var(--blue)) 100% 100% / 7px 7px no-repeat; }
.field:focus-within::before { visibility: visible; }
.field > label, legend { font: 500 14px/1.2 var(--text); padding: 0; }
input[type="text"], input[type="email"], textarea { width: 100%; box-sizing: border-box; background: transparent; border: 0; border-bottom: 1.5px solid rgba(18, 18, 18, .38); border-radius: 0; color: var(--ink); font: 400 20px/1.3 var(--text); padding: 8px 0 10px; outline: none; caret-color: var(--red); }
#f-title { font: 800 clamp(22px, 1.9vw, 30px)/1.2 var(--display); text-transform: uppercase; letter-spacing: -.01em; }
textarea { resize: vertical; min-height: 3.2em; }
.form input, .form textarea { scroll-margin-top: calc(var(--chrome-h, 76px) + 48px); }   /* focus never lands under the slate */
input[type="text"]:focus-visible, input[type="email"]:focus-visible, textarea:focus-visible { border-bottom: 3px solid var(--ink); padding-bottom: 8.5px; outline: none; }
.form ::selection { background: var(--blue); color: #fff; }
.help { font: 400 13px/1.4 var(--text); color: var(--mute-l); }
.err { font: 500 13px/1.4 var(--text); color: #b3261e; }
[aria-invalid="true"] { border-bottom-color: #b3261e !important; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { float: left; width: 100%; margin-bottom: 4px; }
.chips label { position: relative; }
.chips input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chips span { display: inline-block; border: 1px solid rgba(18, 18, 18, .45); padding: 11px 14px; font: 500 15px/1 var(--text); }
.chips input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.chips input:focus-visible + span { outline: 1.5px solid var(--ink); outline-offset: 3px; }
.cta-send { justify-self: start; font-size: 17px; padding: 18px 24px; margin-top: 26px; }
.assure { font: 400 14px/1.4 var(--text); color: var(--mute-l); margin-top: 16px; }
.assure a { color: var(--ink); text-underline-offset: 3px; }
.sent { margin-top: 5vh; font: 600 clamp(22px, 2.2vw, 32px)/1.25 var(--display); padding: 26px clamp(18px, 2.2vw, 32px) 28px; }
.sent:focus { outline: none; }
.sent small { display: block; margin-top: 14px; font: 400 14px/1.4 var(--text); color: var(--mute-l); }

/* ---------------- 6 · credits ---------------- */
.credits .frame { background: var(--black); color: var(--paper); padding: 4vh 0 12vh; }
.marq { height: clamp(220px, 36vh, 400px); font: 800 20vh/1 var(--display); color: var(--paper); }
.fine { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 3vw; padding: 5vh var(--g) 0; font: 400 13px/1.5 var(--text); color: var(--mute-d); }
.fine a { color: var(--paper); }
.fine-ctl { display: grid; gap: 10px; justify-items: start; }

/* ---------------- the work ---------------- */
.cases { background: var(--paper); color: var(--ink); }
.case { --cg: var(--ink); --ci: var(--paper); }
.case .card { min-height: 100vh; min-height: 100svh; box-sizing: border-box; background: var(--cg); color: var(--ci); padding: 84px var(--g) 9vh; display: grid; grid-template-rows: auto 1fr auto; }
.case .card .board-label { color: inherit; opacity: .75; }
.case-title { font: 800 clamp(56px, 11vw, 200px)/.95 var(--display); letter-spacing: -.035em; height: 56vh; align-self: center; position: relative; }
.case-what { font: 500 16px/1.3 var(--text); }
.case .back-top { justify-self: start; font: 500 14px/1 var(--text); margin-bottom: 2vh; text-underline-offset: 3px; }
.work { background: var(--wg, #1c1c1c); padding: 10vh var(--g); display: grid; place-items: center; min-height: 100vh; min-height: 100svh; box-sizing: border-box; }
.art { position: relative; width: min(82vw, 64vh); aspect-ratio: 4 / 5; }
.art > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3vw; padding: 9vh var(--g) 6vh; background: var(--paper); color: var(--ink); }
.notes dt { font: 600 12px/1.2 var(--text); letter-spacing: .12em; text-transform: uppercase; }
.notes dd { margin: .7em 0 0; font: 400 clamp(18px, 1.55vw, 24px)/1.36 var(--text); }
.case-nav { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding: 4vh var(--g) 12vh; background: var(--paper); border-top: 1px solid var(--ink); margin: 0 var(--g); padding-left: 0; padding-right: 0; }
.case-nav a { font: 800 clamp(22px, 2.5vw, 40px)/1.1 var(--display); letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.case-nav .next::after { content: " →"; }
.case-nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.js .cases { position: fixed; inset: 0; z-index: 35; overflow-y: auto; overscroll-behavior: contain; visibility: hidden; background: var(--paper); scroll-snap-type: y proximity; }
.js .case .card, .js .case .work { scroll-snap-align: start; }
.js .cases.is-open { visibility: visible; }
.js .case { display: none; }
.js .case.is-current { display: block; }
html.case-open { overflow: hidden; }

/* ---------------- phone ---------------- */
@media (max-width: 760px) {
  .chrome { padding: 12px 16px; }
  .wordmark { font-size: 17px; }
  .crumb-path { display: none; }
  .cta-top { padding: 12px 14px; font-size: 14px; }
  .status, [data-ground-low="light"] .status { left: 12px; font-size: 12px; background: none; padding: 0; }
  .status .clock { display: none; }
  .status .idle:not([hidden]) { background: var(--paper); color: var(--ink); padding: 8px 10px; border: 1px solid var(--ink); }
  .hero[data-scene], .reel-ready:not(.reduced-motion) .hero[data-scene] { min-height: 0; }
  .hero > .frame { position: relative; height: auto; min-height: 100svh; padding: 76px 16px calc(64px + var(--safe-bottom)); box-sizing: border-box; display: flex; flex-direction: column; }
  .name { position: relative; left: auto; right: auto; top: auto; height: 31vh; flex: none; order: 1; }
  .hero-copy { position: relative; left: auto; bottom: auto; width: auto; margin-top: 2vh; order: 2; }
  .reel { position: relative; right: auto; top: auto; width: 66vw; margin: 5vh 0 0 auto; order: 3; }
  .index .frame { padding: 11vh 16px 10vh; }
  /* the work is seen at rest: each row carries its artefact as a thumbnail at the right edge */
  .row { position: relative; grid-template-columns: 2.2rem minmax(0, 1fr) 72px; row-gap: 6px; padding: 16px 0 18px; }
  .row .t { font-size: 9vw; grid-column: 2 / 4; }
  .row .meta { grid-column: 2; grid-row: 2; font-size: 13px; }
  .row .thumb { display: block; grid-column: 3; grid-row: 2; align-self: start; position: relative; width: 72px; height: 72px; overflow: clip; }
  .row .thumb > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  .row .seen { position: absolute; right: 4px; bottom: 22px; }
  .row .no { padding-top: .5em; }
  .statement .frame { padding: 0 16px; }
  .say { font-size: 7.1vw; margin-left: 0; }
  .facts .frame { padding: 4vh 16px 12vh; }
  .figures { grid-template-columns: 1fr; gap: 4vh; }
  .num { font-size: 26vw; }
  .quote { margin-left: 0; }
  .enquiry .frame { grid-template-columns: 1fr; padding: 12vh 16px 10vh; gap: 6vh; }
  .yours { position: relative; top: auto; }
  /* the top CTA would only repeat the form: it steps aside while the enquiry is on screen */
  .at-enquiry .cta-top { visibility: hidden; }
  /* while the working title is being typed, the card pins under the slate as a mini card (~30vh) */
  .enquiry.is-setting .yours { position: sticky; top: var(--chrome-h, 62px); z-index: 6; background: var(--black); box-shadow: 0 0 0 16px var(--black); }
  .enquiry.is-setting #f-title { scroll-margin-top: calc(var(--chrome-h, 62px) + 34vh + 40px); }
  .form { padding: 2px 14px 22px; }
  #f-title { font-size: 18px; }
  .crop { --co: 10px; }
  .credits .frame { padding-bottom: calc(12vh + var(--safe-bottom)); }
  .marq { height: 30vh; }
  .fine { grid-template-columns: 1fr; padding: 4vh 16px 0; }
  .case .card { padding: 72px 16px 5vh; }
  .case-title { height: 42vh; }
  .notes { grid-template-columns: 1fr; padding: 7vh 16px 4vh; gap: 4vh; }
  .case-nav { margin: 0 16px; padding-bottom: calc(12vh + var(--safe-bottom)); }
  .work { padding: 7vh 16px; }
}

/* ---------------- the accessible cut ---------------- */
.reduced-motion .hero > .frame { min-height: 100vh; }
