/* The Works page's paper and ink; the worlds carry the colour. */
:root {
  --paper: #f5f3ef;
  --paper-deep: #ebe8e2;
  --ink: #1c1d20;
  --muted: #686a6f;
  --line: #d8d4cc;
  --amber: #b27a2c;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: #14161a; }
html.on-landing { scroll-snap-type: y mandatory; }
body { margin: 0; color: var(--ink); font: 15px/1.55 var(--sans); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* One canvas for every world, behind the page. Sections are windows onto it. */
#worlds { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; }

/* ------------------------------------------------------------------ header */
.sitebar {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gutter) 28px;
  color: var(--paper);
  /* Deep enough behind the nav for 4.5:1 over the palest sky (the poppies'). */
  background: linear-gradient(rgba(12, 13, 16, .66), rgba(12, 13, 16, .4) 55%, rgba(12, 13, 16, 0));
  text-shadow: 0 1px 10px rgba(0, 0, 0, .35);
  pointer-events: none;
}
.sitebar > * { pointer-events: auto; }
.wordmark { font: 26px/1 var(--serif); text-decoration: none; }
.sitebar nav { display: flex; gap: clamp(14px, 3vw, 26px); font-size: 13px; letter-spacing: .04em;
               padding: 7px 14px; margin: -7px -14px -7px 0; border-radius: 999px;
               background: rgba(12, 13, 16, .3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
body.on-paper .sitebar nav { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.sitebar nav a { text-decoration: none; opacity: .92; }
.sitebar nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.sitebar nav .soon { opacity: .6; cursor: default; }


/* ----------------------------------------------------------------- landing */
.land {
  position: relative; z-index: 1;
  height: 100vh; height: 100svh;
  scroll-snap-align: start; scroll-snap-stop: always;
  overflow: hidden; cursor: grab;
  touch-action: pan-y;            /* vertical swipes scroll; sideways ones look around */
  user-select: none; -webkit-user-select: none;
}
.land.dragging { cursor: grabbing; }
.land .poster {
  pointer-events: none; -webkit-user-drag: none;
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none;
  transition: opacity .6s var(--ease);
}
.land.live .poster { opacity: 0; }
.land::after {                    /* a quiet floor under the caption */
  content: ""; position: absolute; inset: auto 0 0 0; height: 40%; pointer-events: none;
  background: linear-gradient(rgba(12, 13, 16, 0), rgba(12, 13, 16, .5));
}
.land .caption {
  position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter);
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--paper); pointer-events: none;
}
.land h2 { margin: 0; font: clamp(44px, 7vw, 96px)/.95 var(--serif); font-weight: 400; letter-spacing: -.01em;
           text-shadow: 0 1px 24px rgba(0, 0, 0, .35); }
.land h2 small { display: block; margin-top: 10px; font: 500 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.cta {
  pointer-events: auto; text-decoration: none;
  font: 500 13px/1 var(--sans); letter-spacing: .04em;
  padding: 13px 20px; border-radius: 999px; background: var(--paper); color: var(--ink);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  transition: transform .3s var(--ease);
}
.cta:hover { transform: translateY(-1px); }
.land .hint {
  position: absolute; z-index: 2; right: var(--gutter); top: calc(64px + env(safe-area-inset-top, 0px)); margin: 0;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--paper);
  padding: 7px 12px; border-radius: 999px; background: rgba(12, 13, 16, .35); backdrop-filter: blur(6px);
  transition: opacity .6s var(--ease);
}
html.looked .land .hint { opacity: 0; }

/* ----------------------------------------------------------------- product */
#product { position: relative; z-index: 1; }
body.on-paper .sitebar { color: var(--ink); text-shadow: none; background: linear-gradient(rgba(245, 243, 239, .92), rgba(245, 243, 239, 0)); }

/* The entry follows the scroll: a tall section with the stage pinned in it. */
.reveal { position: relative; height: 420vh; }
.reveal[data-still] { height: auto; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.reveal[data-still] .stage { position: relative; }
.stage .entry { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; }
.cue {
  position: absolute; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  margin: 0; padding: 8px 14px; border-radius: 999px; pointer-events: none;
  font: 500 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #fff;
  background: rgba(12, 13, 16, .32); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}
.cue span { display: inline-block; margin-left: 6px; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(3px); } }
.reveal[data-still] .cue { display: none; }
@media (prefers-reduced-motion: reduce) { .cue span { animation: none; } }
.wall { position: absolute; inset: 0; background: var(--paper); opacity: 0; }

/* The picture: no frame, just a soft shadow once it settles on the wall. */
.frame { position: absolute; opacity: 0; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.frame.pinned { cursor: pointer; }
.pic { position: relative; width: 100%; height: 100%; overflow: hidden; outline: none; }
.pic img { position: absolute; max-width: none; display: block; pointer-events: none; -webkit-user-drag: none; }

.steps {
  position: absolute; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: auto auto auto; justify-content: center; align-items: center; gap: 6px 14px;
  visibility: hidden; opacity: 0;
}
.steps .count { grid-column: 1 / -1; text-align: center; margin: 0; font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.thumbs { display: flex; gap: 8px; }
.thumb { padding: 3px; border: 1px solid transparent; border-radius: 4px; background: none; cursor: pointer; line-height: 0; }
.thumb span { display: block; background-repeat: no-repeat; border-radius: 2px; opacity: .72; transition: opacity .2s; }
.thumb:hover span, .thumb[aria-current="true"] span { opacity: 1; }
.thumb[aria-current="true"] { border-color: var(--ink); }
.steps .prev, .steps .next {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper);
  font: 16px/1 var(--sans); color: var(--ink); cursor: pointer;
}
.steps .prev:hover, .steps .next:hover { border-color: var(--ink); }

/* Details: facts, then the action. */
.details {
  background: var(--paper); position: relative; min-height: 100vh; min-height: 100svh; align-content: center; align-items: center;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px);
  padding: clamp(56px, 9vw, 120px) max(var(--gutter), calc((100vw - 1120px) / 2));
}
.details .over { margin: 0 0 12px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.details h1 { margin: 0 0 20px; font: clamp(48px, 6vw, 80px)/.95 var(--serif); font-weight: 400; letter-spacing: -.01em; }
.details .note { margin: 0; max-width: 46ch; font: 21px/1.45 var(--serif); color: var(--ink); }
.details dl { margin: 0 0 28px; border-top: 1px solid var(--line); }
.details dl div { display: grid; grid-template-columns: 9em 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.details dt { color: var(--muted); font-size: 13px; }
.details dd { margin: 0; font-size: 15px; }
/* Facts Sam has not confirmed: dashed, and said in words. */
.tbc { outline: 1px dashed var(--amber); outline-offset: 3px; color: #7a5a2b; border-radius: 2px; }
dd.tbc { justify-self: start; padding: 0 4px; font-size: 13px; }
.tbc-inline { border-bottom: 1px dashed var(--amber); }
.details .note.tbc { color: #7a5a2b; font-size: 17px; padding: 4px 8px; }
.enquire {
  display: inline-block; text-decoration: none; padding: 16px 26px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font: 500 14px/1 var(--sans); letter-spacing: .03em;
}
.enquire:hover { background: #000; }
.details .small { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

.nextwork {
  position: relative; display: block; height: 100vh; height: 100svh; overflow: hidden;
  text-decoration: none; color: var(--paper); background: #14161a;
}
.nextwork img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: transform 1.2s var(--ease), opacity .6s; }
.nextwork:hover img { transform: scale(1.02); opacity: 1; }
.nextwork::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(12, 13, 16, .15), rgba(12, 13, 16, .55)); }
.nextwork .words { position: absolute; z-index: 1; left: var(--gutter); bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
                   display: grid; gap: 14px; }
.nextwork .label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.nextwork .title { font: clamp(44px, 7vw, 96px)/1 var(--serif); }

@media (max-width: 760px) {
  .land .caption { flex-direction: column; align-items: flex-start; }
  .details { grid-template-columns: 1fr; }
  .details dl div { grid-template-columns: 7em 1fr; }
  .thumbs { gap: 2px; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: auto; }
  .steps .prev, .steps .next { display: none; }   /* swipe the picture, or tap a thumbnail */
}
@media (prefers-reduced-motion: reduce) {
  html.on-landing { scroll-snap-type: y proximity; }
  .land .hint { display: none; }
  .land { cursor: default; }
}
