/*
 * dt_theme.css — the cinematic grade.
 *
 * STAND-IN STRUCTURE. The brief says keep cardshop's token architecture and
 * replace every value. That file is not here yet, so the six colour tokens
 * below are declared in a plain :root; when the zips arrive they move into
 * the existing structure unchanged, and this file's component rules are
 * mapped onto its names. Nothing below hard-codes a colour except the
 * studio's white board and the letterbox black, and both say why.
 *
 * Order of the three registers, which is the whole look: the GRADE is the
 * base (tokens, light, grain), editorial TYPE sits on it, MOTION reveals it.
 */

/* Fonts are self-hosted, not fetched from Google: no third-party request
   before first paint, nothing to break if that service is slow, and no
   visitor data sent anywhere. Both are OFL; the licences sit beside them.
   font-display: swap so text is readable before the faces arrive. */
@font-face { font-family: 'Antonio'; font-weight: 700; font-display: swap; src: url(../fonts/antonio-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-weight: 400; font-display: swap; src: url(../fonts/source-sans-3-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-weight: 600; font-display: swap; src: url(../fonts/source-sans-3-latin-600-normal.woff2) format('woff2'); }
/* Card faces: used only inside card designs and the studio, never for the
   site's own type, which stays two faces. */
@font-face { font-family: 'Cormorant Garamond'; font-weight: 600; font-display: swap; src: url(../fonts/cormorant-garamond-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 500; font-style: italic; font-display: swap; src: url(../fonts/cormorant-garamond-latin-500-italic.woff2) format('woff2'); }
@font-face { font-family: 'Pinyon Script'; font-weight: 400; font-display: swap; src: url(../fonts/pinyon-script-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'DM Mono'; font-weight: 400; font-display: swap; src: url(../fonts/dm-mono-latin-400-normal.woff2) format('woff2'); }

:root {
  --c-void:  #07070A;  /* the page — blacker than any UI grey */
  --c-stage: #0E0E13;  /* a panel lifted off the void */
  --c-key:   #F5C06A;  /* warm key light: foil, edges, the one live thing */
  --c-fill:  #1E4A52;  /* teal shadow fill — stops the black reading as dead */
  --c-ink:   #F2EFE9;  /* type, slightly warm, never pure white */
  --c-mut:   #8A8578;  /* secondary type */

  /* Projection black, darker than the void, so the bars read as the edge
     of the frame rather than as more page. Not a seventh brand colour. */
  --c-bar: #000;

  --f-display: 'Antonio', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --f-read: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --f-serif: 'Cormorant Garamond', Georgia, serif;
  --f-script: 'Pinyon Script', 'Snell Roundhand', cursive;
  --f-mono: 'DM Mono', ui-monospace, Menlo, monospace;

  --bar-t: 52px;
  --bar-b: 30px;
  --gutter: clamp(16px, 4vw, 48px);

  --ease: cubic-bezier(.16, 1, .3, 1);
  --t-reveal: 700ms;
  --t-image: 500ms;
  --t-lens: 400ms;
  --t-hover: 150ms;   /* fast: a hover is a reply to a person */

  --line: rgba(242, 239, 233, .12);
  color-scheme: dark;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--c-void); }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--c-void);
  color: var(--c-ink);
  font: 400 17px/1.6 var(--f-read);
  padding: var(--bar-t) 0 var(--bar-b);
  overflow-x: hidden;   /* full-bleed sections must never cost a sideways scroll */
  -webkit-font-smoothing: antialiased;
}

/* The grain. One fixed element, an SVG noise filter, 3% opacity. It is the
   single thing that stops a dark site looking like a dark admin panel.
   It does not move, so it stays on under prefers-reduced-motion. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

a { color: inherit; }
.link { color: var(--c-ink); text-decoration-color: var(--c-mut); text-underline-offset: 4px; transition: text-decoration-color var(--t-hover); }
.link:hover { text-decoration-color: var(--c-key); }

:focus-visible { outline: 1px solid var(--c-key); outline-offset: 3px; }

/* ---------- the letterbox ---------- */
/* Real bars, fixed, so the page scrolls behind them like film through a
   gate. They are the frame, so they carry almost nothing. */

.bar {
  position: fixed;
  left: 0; right: 0;
  z-index: 40;
  background: var(--c-bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
}
.bar-top { top: 0; height: var(--bar-t); }
.bar-bottom {
  bottom: 0; height: var(--bar-b);
  font: 600 11px/1 var(--f-read);
  letter-spacing: .2em;
  color: var(--c-mut);
}
.bar-bottom .tc { font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.mark {
  font: 700 18px/1 var(--f-display);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
}
.bar-nav { display: flex; gap: 24px; }
.bar-nav a {
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; color: var(--c-mut);
  transition: color var(--t-hover);
}
.bar-nav a:hover { color: var(--c-ink); }

/* ---------- the hero: 2.39:1 ---------- */

.hero { width: 100%; }
.frame {
  position: relative;
  aspect-ratio: 2.39 / 1;
  max-height: calc(100svh - var(--bar-t) - var(--bar-b));
  margin: 0 auto;
  overflow: hidden;
  /* The lighting rig: warm key from the left, teal fill from the right,
     void everywhere the light does not reach. */
  background:
    radial-gradient(60% 90% at 18% 40%, rgba(245, 192, 106, .16), transparent 70%),
    radial-gradient(50% 80% at 92% 70%, color-mix(in srgb, var(--c-fill) 55%, transparent), transparent 75%),
    var(--c-void);
}
.frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.scene {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  perspective: 1400px;
}

/* ---------- the card shot ----------
   A card lit from one side in a near-black room. Each design brings its
   own paper, ink and accent (--paper, --ink, --accent) and its own faces and
   layout; the LIGHT is the same for every one — warm key from the left,
   falling off to shadow on the right — so twenty-five palettes still read
   as one film. Not a UI card: the shadow under it is a cast shadow on the
   table, part of the photograph.

   Sizes inside the card are in cqw (percent of the card's own width), so a
   card is the same design at any size: hero, catalogue strip or phone. */

.card-shot {
  position: relative;
  width: min(34%, 520px);
  aspect-ratio: var(--ratio);
  container-type: inline-size;
  transform: rotateX(16deg) rotateZ(-6deg);
  background: var(--paper, #F1ECE1);
  color: var(--ink, #1A1A1A);
}
/* The printed area. cqw units only resolve INSIDE the container, never on
   the container itself (there they fall back to the viewport and a card's
   padding balloons), so the margin lives on this inner layer. One column,
   exactly its width: a self-sizing grid track would shrink to the
   headline's narrowest form and stack it one letter per line. */
.card-shot .in {
  position: absolute; inset: 8cqw;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  z-index: 2;
}
.card-shot.is-tall   { width: auto; height: 76%; transform: rotateX(10deg) rotateZ(-4deg); }
.card-shot.is-square { width: auto; height: 68%; transform: rotateX(12deg) rotateZ(-5deg); }

/* The light, laid over paper and print alike. */
.card-shot::before {
  content: "";
  position: absolute; inset: 0; z-index: 3;
  pointer-events: none;
  background: linear-gradient(105deg, rgba(255, 238, 210, .20) 0%, rgba(255, 238, 210, .04) 30%, rgba(0, 0, 0, .10) 60%, rgba(4, 10, 14, .48) 100%);
  border-left: 1px solid rgba(255, 228, 180, .55);
  border-top: 1px solid rgba(255, 228, 180, .18);
}
.card-shot::after {
  content: "";
  position: absolute; left: 6%; right: -4%; bottom: -12%; height: 20%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .9), transparent);
  filter: blur(10px);
  z-index: -1;
}

.card-shot .hl, .card-shot .sub { position: relative; z-index: 2; overflow-wrap: break-word; }
.card-shot .hl { line-height: .95; }
.card-shot .sub { font-size: 3.6cqw; line-height: 1.3; opacity: .85; }
.card-shot .deco { position: absolute; z-index: 1; pointer-events: none; }

/* Faces. Five for the cards; the site itself still uses only two. */
.f-display .hl { font: 700 13cqw/0.92 var(--f-display); text-transform: uppercase; letter-spacing: .01em; }
.f-sans    .hl { font: 600 9cqw/1 var(--f-read); letter-spacing: -.01em; }
.f-serif   .hl { font: 600 11cqw/1 var(--f-serif); letter-spacing: -.005em; }
.f-script  .hl { font: 400 12.5cqw/1.05 var(--f-script); }
.f-mono    .hl { font: 400 7.2cqw/1.1 var(--f-mono); letter-spacing: -.02em; }
.f2-display .sub { font-family: var(--f-display); text-transform: uppercase; letter-spacing: .14em; }
.f2-sans    .sub { font-family: var(--f-read); letter-spacing: .06em; text-transform: uppercase; font-size: 3cqw; font-weight: 600; }
.f2-serif   .sub { font-family: var(--f-serif); font-style: italic; font-size: 4.2cqw; }
.f2-mono    .sub { font-family: var(--f-mono); font-size: 3cqw; letter-spacing: .02em; }

/* Print effects. */
.fx-foil .hl {
  background: linear-gradient(100deg,
    color-mix(in srgb, var(--accent) 55%, #000) 0%,
    color-mix(in srgb, var(--accent) 35%, #fff) 24%,
    var(--accent) 42%,
    color-mix(in srgb, var(--accent) 60%, #000) 66%,
    var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.fx-emboss .hl, .fx-emboss .sub {
  color: var(--paper);
  text-shadow: -1px -1px 0 rgba(255, 255, 255, .7), 1px 1px 1px rgba(0, 0, 0, .28);
  opacity: 1;
}

/* Layouts. */
.l-centre .in, .l-frame .in, .l-split .in { align-content: center; justify-items: center; text-align: center; gap: 3cqw; }
.l-frame .in { inset: 12cqw; }
.l-left .in   { align-content: end; justify-items: start; text-align: left; gap: 2.5cqw; }
.l-corner .in { grid-template-rows: 1fr auto; text-align: left; }
.l-corner .hl  { align-self: start; max-width: 85%; }
.l-corner .sub { justify-self: end; text-align: right; max-width: 60%; }

.l-frame .deco { inset: 5cqw; border: max(1px, .5cqw) solid var(--accent); }
.fx-foil.l-frame .deco { border-color: color-mix(in srgb, var(--accent) 85%, #fff); }
.fx-emboss.l-frame .deco { border-color: var(--paper); box-shadow: -1px -1px 0 rgba(255,255,255,.7), 1px 1px 1px rgba(0,0,0,.25), inset -1px -1px 0 rgba(255,255,255,.7), inset 1px 1px 1px rgba(0,0,0,.25); }

/* Band: headline above, a full-bleed band across, the small line on it. */
.l-band .in { inset: 0; grid-template-rows: 60% 20% 20%; }
.l-band .hl { display: grid; place-items: center; padding: 0 8cqw; text-align: center; }
.l-band .deco { left: 0; right: 0; top: 60%; height: 20%; background: var(--accent); }
.fx-foil.l-band .deco { background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 60%, #000), color-mix(in srgb, var(--accent) 40%, #fff) 30%, var(--accent) 55%, color-mix(in srgb, var(--accent) 65%, #000)); }
.l-band .sub { display: grid; place-items: center; color: var(--paper); opacity: 1; text-align: center; padding: 0 6cqw; }

.l-split .deco { top: 0; bottom: 0; right: 0; width: 50%; background: var(--accent); }
.is-tall.l-split .deco, .is-square.l-split .deco { width: auto; left: 0; top: 50%; }

/* ---------- editorial type ---------- */

.title, .buy, .tiers, .empty, .cart, .admin-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.title { padding-top: clamp(40px, 7vw, 96px); }

.eyebrow {
  display: flex; flex-wrap: wrap; gap: 0 14px;
  margin: 0 0 14px;
  font-size: 12px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--c-mut);
}
.eyebrow > * + *::before { content: "·"; margin-right: 14px; display: inline-block; text-decoration: none; }

/* Condensed caps, 56–120px, tight. Headlines only — never anything that
   has to be read in more than one glance. */
.display {
  margin: 0;
  font: 700 clamp(56px, 10.5vw, 120px)/.9 var(--f-display);
  letter-spacing: -.012em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.display-sm {
  margin: 0 0 24px;
  font: 700 clamp(28px, 4vw, 44px)/1 var(--f-display);
  letter-spacing: .01em;
  text-transform: uppercase;
}
.line {
  max-width: 44ch;
  margin: 20px 0 0;
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.45;
  color: var(--c-mut);
}

/* Tabular, lining figures for every number that sits in a column. Right
   alignment plus two decimals on every price is what puts the decimal
   points on one vertical line. */
.num, .price, .prices td, .specs td {
  font-variant-numeric: tabular-nums lining-nums;
}

/* ---------- buy ---------- */

.buy {
  display: grid;
  gap: 48px;
  padding-top: clamp(48px, 7vw, 96px);
}
@media (min-width: 900px) {
  .buy { grid-template-columns: 1.1fr 1fr; gap: 96px; }
}
.about p { margin: 0 0 32px; max-width: 54ch; }

.specs, .prices { width: 100%; border-collapse: collapse; }
.specs th, .specs td, .prices th, .prices td {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 400;
}
.specs th { color: var(--c-mut); width: 40%; }
.specs td { text-align: right; }
.prices th {
  font-size: 12px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--c-mut);
}
.prices .num { text-align: right; }
.prices td { font-size: 19px; }

.order { display: grid; gap: 18px; align-content: start; }
.order label { display: grid; gap: 6px; }
.order label span {
  font-size: 12px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--c-mut);
}
select {
  appearance: none;
  width: 100%;
  padding: 14px 44px 14px 14px;
  font: inherit;
  color: var(--c-ink);
  background:
    linear-gradient(45deg, transparent 50%, var(--c-mut) 50%) right 20px center / 6px 6px no-repeat,
    linear-gradient(-45deg, transparent 50%, var(--c-mut) 50%) right 14px center / 6px 6px no-repeat,
    var(--c-stage);
  border: 1px solid var(--line);
  border-radius: 0;
  transition: border-color var(--t-hover);
}
select:hover { border-color: var(--c-mut); }

.price {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 14px 0 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.price output { font: 600 clamp(34px, 4vw, 44px)/1 var(--f-read); letter-spacing: -.01em; }
.price small { color: var(--c-mut); font-size: 15px; }

.btn {
  display: block;
  padding: 18px 20px;
  font: 700 17px/1 var(--f-display);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: background-color var(--t-hover), border-color var(--t-hover), color var(--t-hover);
}
/* The key colour on a control means one thing: you can press this. */
.btn-key { background: var(--c-key); color: var(--c-void); }
.btn-key:hover { background: #FFD58F; }
.btn-quiet { background: transparent; color: var(--c-ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--c-key); }

/* ---------- tiers ---------- */

.tiers { padding-top: clamp(64px, 8vw, 120px); padding-bottom: clamp(64px, 8vw, 120px); }
@media (min-width: 900px) { .tiers .prices { max-width: 640px; } }

/* ---------- full-bleed break ---------- */

.break {
  display: grid;
  gap: 40px;
  align-items: center;
  padding: clamp(56px, 8vw, 112px) var(--gutter);
  background:
    radial-gradient(70% 120% at 100% 0%, color-mix(in srgb, var(--c-fill) 40%, transparent), transparent 70%),
    var(--c-stage);
}
@media (min-width: 900px) {
  .break { grid-template-columns: 1fr 1fr; padding-left: max(var(--gutter), calc((100% - 1200px) / 2 + var(--gutter))); padding-right: max(var(--gutter), calc((100% - 1200px) / 2 + var(--gutter))); }
}
.break-copy p { margin: 0; max-width: 46ch; color: var(--c-mut); }
.sheet-diagram { width: min(100%, 440px); margin: 0; }   /* figure has 40px side margins by default */
.sheet {
  position: relative;
  aspect-ratio: var(--sw) / var(--sh);
  border: 1px dashed var(--c-mut);
}
.sheet-diagram figcaption {
  display: flex; justify-content: space-between;
  margin-top: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--c-mut);
  font-variant-numeric: tabular-nums;
}
.sheet-diagram figcaption b { color: var(--c-key); font-weight: 600; }
.trim {
  position: absolute;
  inset: calc(var(--b) / var(--sh) * 100%) calc(var(--b) / var(--sw) * 100%);
  border: 1px solid var(--c-key);
}

/* ---------- shared bits ---------- */

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 60; background: var(--c-key); color: var(--c-void); padding: 8px 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.count {
  display: inline-block; min-width: 18px; margin-left: 4px; padding: 2px 5px;
  background: var(--c-key); color: var(--c-void);
  font-size: 11px; font-weight: 600; letter-spacing: 0; text-align: center;
  font-variant-numeric: tabular-nums;
}
.flash {
  max-width: 1200px; margin: 0 auto; padding: 14px var(--gutter);
  color: var(--c-ink); border-bottom: 1px solid var(--line);
}
.note { margin: 6px 0 0; font-size: 15px; color: var(--c-mut); }
/* A refusal is the most useful message on its page, so it reads as type,
   not as an alarm box: one warm rule down the side, words in ink. */
.refusal {
  margin: 16px 0; padding: 12px 0 12px 16px;
  border-left: 2px solid var(--c-key);
  color: var(--c-ink);
}
.refusal p { margin: 0 0 6px; }

.display-md {
  margin: 0;
  font: 700 clamp(40px, 6vw, 84px)/.92 var(--f-display);
  letter-spacing: -.005em; text-transform: uppercase;
}
.display-xs {
  margin: 0 0 14px;
  font: 700 22px/1.1 var(--f-display);
  letter-spacing: .04em; text-transform: uppercase;
}

/* Inputs share the select's register: stage panel, hairline, no radius. */
input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input:not([type]), input[inputmode], textarea {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  color: var(--c-ink);
  background: var(--c-stage);
  border: 1px solid var(--line);
  border-radius: 0;
  transition: border-color var(--t-hover);
}
input:hover, textarea:hover { border-color: var(--c-mut); }
textarea { resize: vertical; line-height: 1.5; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
input[type="color"] {
  width: 44px; height: 32px; padding: 0; border: 1px solid var(--line);
  background: none; cursor: pointer;
}
input[type="file"] { width: 100%; padding: 18px 14px; background: var(--c-stage); border: 1px dashed var(--c-mut); color: var(--c-mut); }
input[type="range"] { width: 100%; accent-color: var(--c-key); }
.has-error input, .has-error textarea { border-color: var(--c-key); }
label em { font-style: normal; font-size: 14px; color: var(--c-key); }
.back { justify-self: start; margin-top: 4px; }

/* ---------- catalogue ---------- */


.title + .reel-row { margin-top: clamp(48px, 7vw, 96px); }

/* Each card a full-bleed row: shot and copy, alternating sides. */
.reel-row {
  display: grid;
  text-decoration: none;
  border-top: 1px solid var(--line);
}
.reel-shot { position: relative; aspect-ratio: 2.39 / 1; overflow: hidden;
  background:
    radial-gradient(60% 90% at 20% 40%, rgba(245, 192, 106, .12), transparent 70%),
    radial-gradient(50% 80% at 90% 70%, color-mix(in srgb, var(--c-fill) 45%, transparent), transparent 75%),
    var(--c-void);
}
.reel-copy { padding: 32px var(--gutter) 56px; }
.reel-copy .line { margin-top: 14px; }
.from { margin: 18px 0 0; color: var(--c-ink); }
.from .num { color: var(--c-key); }
.reel-row .display-md { transition: color var(--t-hover); }
.reel-row:hover .display-md { color: var(--c-key); }
@media (min-width: 900px) {
  .reel-row { grid-template-columns: 1.4fr 1fr; align-items: center; }
  .reel-row.is-flip .reel-shot { order: 2; }
  .reel-copy { padding: 48px clamp(32px, 5vw, 80px); }
}
.reel-shot .card-shot { width: min(38%, 420px); }
.reel-shot .card-shot.is-tall, .reel-shot .card-shot.is-square { width: auto; height: 74%; }

/* ---------- cart, checkout ---------- */

.cart { padding-top: 32px; padding-bottom: 96px; }
.cart-item { display: flex; gap: 16px; align-items: center; }
.thumb { width: 96px; height: auto; background: #fff; display: block; flex: none; }
.cart-lines td { vertical-align: middle; }
.prices tfoot th, .prices tfoot td { border-bottom: 0; padding-top: 18px; }
.prices .total { font-size: 26px; font-weight: 600; }
.x {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--c-mut);
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px;
  transition: color var(--t-hover);
}
.x:hover { color: var(--c-ink); }
.checkout { margin-top: 32px; max-width: 360px; margin-left: auto; }
.summary { align-self: start; }
.studio-sum {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  margin: 8px 0 0; padding-top: 16px; border-top: 1px solid var(--line);
  color: var(--c-mut);
}
.studio-sum strong { font-size: 26px; color: var(--c-ink); font-weight: 600; }
.buy .sheet-diagram { align-self: start; }

/* ---------- studio ---------- */

.studio { max-width: 1400px; margin: 0 auto; padding: 20px var(--gutter) 48px; }
.studio-bar { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.studio-bar .eyebrow { margin: 0; }
.studio-main { display: grid; gap: 20px; }
@media (min-width: 1000px) {
  .studio-main { grid-template-columns: 170px 1fr 260px; align-items: start; }
}
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 1000px) { .tools { flex-direction: column; } }
.tool {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px;
  font: 600 13px/1 var(--f-read); letter-spacing: .08em; text-transform: uppercase;
  color: var(--c-ink); background: var(--c-stage);
  border: 1px solid var(--line); border-radius: 0;
  cursor: pointer;
  transition: border-color var(--t-hover), color var(--t-hover);
}
.tool:hover:not(:disabled) { border-color: var(--c-key); }
.tool:disabled { color: var(--c-mut); opacity: .5; cursor: default; }
.tool-colour input { width: 32px; height: 22px; }

.board-wrap { min-width: 0; }
/* The board. WHITE in every theme, by rule, not taste: this rectangle is
   printed on paper, and a dark board lies about what the customer gets.
   Deliberately a literal, not a token, so no theme change can reach it. */
.board {
  position: relative;
  /* As wide as the column, but never taller than the screen: the width is
     capped by the height left over, times the sheet's own proportions, so
     the board keeps its true shape instead of being squashed. */
  width: min(100%, calc((100svh - var(--bar-t) - var(--bar-b) - 200px) * var(--rw) / var(--rh)));
  aspect-ratio: var(--rw) / var(--rh);
  margin: 0 auto;
  background: #FFFFFF;
}
.board canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.board [data-guides] { touch-action: none; cursor: default; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 12px 0 0; font-size: 13px; color: var(--c-mut); }
.legend span { display: inline-block; width: 22px; height: 0; }
.k-cut { border-top: 2px dashed #B0761E; }
.k-safe { border-top: 2px dotted var(--c-fill); margin-left: 12px; }

.props { display: grid; gap: 14px; align-content: start; }
.props label { display: grid; gap: 6px; }
.props label span, .props-title {
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--c-mut);
}
.props-title { margin: 0; }
.props [hidden] { display: none; }
[data-text-props] { display: grid; gap: 14px; }
.props label.tool-colour { display: flex; justify-content: space-between; align-items: center; }

.studio-done {
  display: grid; gap: 12px;
  max-width: 420px; margin: 28px 0 0 auto;
}

/* ---------- admin ---------- */

.admin .bar-nav { gap: 18px; }
.admin-page { padding-top: 32px; padding-bottom: 96px; }
.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
.admin-head .display-sm { margin: 0; }
.admin-head .eyebrow { margin-bottom: 8px; }
.inline { display: flex; gap: 10px; align-items: center; }
.inline select { width: auto; min-width: 220px; }
.inline .btn { padding: 14px 18px; }
.admin-table td, .admin-table th { padding-right: 16px; }
.admin-table td { font-size: 16px; }
.status { font-size: 13px; letter-spacing: .06em; color: var(--c-mut); }
.status.s-paid { color: var(--c-key); }
.status.s-cancelled { text-decoration: line-through; }
.admin-grid { display: grid; gap: 48px; }
@media (min-width: 1000px) { .admin-grid { grid-template-columns: 1fr 320px; } }
.line-item { display: grid; gap: 24px; padding: 0 0 40px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
@media (min-width: 700px) { .line-item { grid-template-columns: 280px 1fr; } }
.thumb-lg { width: 100%; height: auto; background: #fff; display: block; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.actions .btn { padding: 14px 18px; font-size: 15px; }
.address { line-height: 1.5; }
.history { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--c-mut); }
.history li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.history .num { color: var(--c-ink); margin-right: 8px; }
.admin-form { display: grid; gap: 18px; max-width: 760px; }
.admin-form label { display: grid; gap: 6px; }
.admin-form label > span { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--c-mut); }
.admin-form .row { display: grid; gap: 18px; }
@media (min-width: 700px) { .admin-form .row { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
.admin-form .btn { justify-self: start; min-width: 200px; }
.narrow { max-width: 520px; }
.narrow .order { margin-top: 32px; }
.admin-page .display-xs { margin-top: 40px; }
@media (max-width: 700px) {
  .admin-table thead { display: none; }
  .admin-table tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .admin-table td { border: 0; padding: 2px 0; text-align: left; }
}

.empty { padding-top: 96px; padding-bottom: 96px; }

/* The lens: the studio opens by the page closing down around it. */
.lens {
  position: fixed; inset: 0; z-index: 45;
  background: var(--c-void);
  clip-path: circle(0 at var(--x, 50%) var(--y, 50%));
  transition: clip-path var(--t-lens) var(--ease);
  pointer-events: none;
}
.lens.open { clip-path: circle(150% at var(--x, 50%) var(--y, 50%)); }

/* ---------- motion ---------- */
/* Hidden states exist only when JS is running AND motion is allowed, so
   with either missing the page simply reads, fully visible. */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(28px); }
  .js .reveal.in {
    opacity: 1; transform: none;
    transition: opacity var(--t-reveal) var(--ease), transform var(--t-reveal) var(--ease);
  }
  .js .fade-in { opacity: 0; transform: scale(1.02); }
  .js .fade-in.in {
    opacity: 1; transform: none;
    transition: opacity var(--t-image) ease-out, transform var(--t-image) ease-out;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}

/* ---------- small screens ---------- */

@media (max-width: 600px) {
  :root { --bar-t: 46px; --bar-b: 26px; }
  .bar-nav { gap: 16px; }
  .card-shot { width: 46%; }
  .card-shot.is-tall, .card-shot.is-square { width: auto; height: 76%; }
  .bar-bottom .reel { max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Order numbers are read aloud over the phone and typed into searches; in a
   condensed caps face 0 and O look alike, so they use the reading face. */
.order-id { font-family: var(--f-read); font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums slashed-zero; }

/* ---------- collections ---------- */

.cat-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; }
.cat-nav a {
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--c-mut); text-decoration: none; transition: color var(--t-hover);
}
.cat-nav a:hover { color: var(--c-ink); }

.cat { padding: clamp(56px, 8vw, 112px) 0 0; scroll-margin-top: var(--bar-t); }
.cat-head { max-width: 1200px; margin: 0 auto 28px; padding: 0 var(--gutter); }
.cat-head .line { margin: 12px 0 14px; }

/* The strip: frames separated by thin black gutters, like a contact sheet. */
.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 2px;
  background: var(--c-bar);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
@media (max-width: 899px) { .strip { grid-auto-columns: 72%; } }
.strip-item {
  scroll-snap-align: start;
  display: block;
  text-decoration: none;
  background: var(--c-void);
  padding-bottom: 20px;
}
.strip-shot {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background:
    radial-gradient(70% 60% at 15% 35%, rgba(245, 192, 106, .13), transparent 70%),
    radial-gradient(60% 60% at 95% 85%, color-mix(in srgb, var(--c-fill) 50%, transparent), transparent 75%),
    var(--c-void);
}
.strip-shot .card-shot { width: 72%; }
.strip-shot .card-shot.is-tall { width: auto; height: 62%; }
.strip-shot .card-shot.is-square { width: 58%; height: auto; }
.strip-name {
  margin: 16px 18px 2px;
  font: 700 22px/1.05 var(--f-display); letter-spacing: .02em; text-transform: uppercase;
  transition: color var(--t-hover);
}
.strip-item:hover .strip-name { color: var(--c-key); }
.strip-from { margin: 0 18px; color: var(--c-ink); font-size: 15px; }
.strip-from span { color: var(--c-mut); }

.related { padding: clamp(64px, 8vw, 112px) 0 0; }
.related .cat-head { margin-bottom: 24px; }

.style-set { border: 1px solid var(--line); padding: 20px; margin: 0; display: grid; gap: 18px; }
.style-set legend { padding: 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--c-mut); }
.swatch input[type="color"] { width: 100%; height: 46px; }
.style-preview { position: relative; aspect-ratio: 2.39 / 1; overflow: hidden;
  background: radial-gradient(60% 90% at 20% 40%, rgba(245, 192, 106, .12), transparent 70%), var(--c-void); }
.style-preview .card-shot { width: 40%; }
.style-preview .card-shot.is-tall, .style-preview .card-shot.is-square { width: auto; height: 76%; }
