/* RayBurn Studio website.
   The workshop bench in daylight: warm paper and birch, ink for text, one ember for what burns or is to be clicked,
   a cool blue only for what the camera sees. The richness lives in the bed drawing at the top and in the program's own
   pictures; everything around them stays quiet. Windows' own Segoe UI Variable (the program's face), Cascadia Mono for
   millimetres and keys. The deer on the home page is drawn live with three.js from a CDN; the forum and accounts use
   the service set in site-config.js. Everything else is local. */

:root {
  /* the warm ramp */
  --page: #f7f4ee;
  --card: #fdfbf7;
  --raised: #efe9df;
  --ink: #1f1b16;
  --text-2: #5e554a;
  --muted: #6f675c;
  --hair: rgba(31, 27, 22, .1);
  --hair-strong: rgba(31, 27, 22, .16);

  /* the one accent, and what the camera sees */
  --ember: #c2410c;          /* buttons, links, the active place: 5.2 : 1 with white */
  --ember-deep: #a8380d;
  --ember-line: #e8561a;     /* a cut that is burning, in drawings */
  --char: #7a3413;           /* a cut that has cooled */
  --seen: #2f6da3;

  --text: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", "Noto Sans", Roboto, Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", "Noto Sans", Roboto, Arial, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --wrap: 1200px;
  --gutter: clamp(20px, 4.5vw, 48px);
  --section: clamp(64px, 9vw, 128px);
  --r-control: 8px;
  --r-card: 16px;
  --r-stage: clamp(18px, 2.4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text-2);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, p, figure, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 1.4rem + 4vw, 4.25rem); line-height: 1.04; letter-spacing: -.025em; }
h2 { font-size: clamp(2rem, 1.35rem + 2.2vw, 3rem); line-height: 1.1; letter-spacing: -.02em; }
h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 500; letter-spacing: 0; }
p { text-wrap: pretty; }
strong { font-weight: 600; color: var(--ink); }

a { color: var(--ink); text-decoration-color: var(--ember-line); text-decoration-thickness: 1.5px; text-underline-offset: .3em; transition: text-decoration-color .16s var(--ease); }
a:hover { text-decoration-color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

kbd {
  display: inline-block;
  min-width: 24px;
  padding: 0 6px;
  font: 400 .75rem/22px var(--mono);
  text-align: center;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--hair-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--page);
  border-radius: var(--r-control);
  text-decoration: none;
}
.skip:focus { top: 12px; }
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 238, .84);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--hair);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 500 1.0625rem/1 var(--display);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand img { width: 28px; height: 28px; }
.site-nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); }
.site-nav a:not(.btn) {
  font-size: .9375rem;
  color: var(--text-2);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1.5px solid transparent;
  transition: color .16s var(--ease);
}
.site-nav a:not(.btn):hover { color: var(--ink); }
.site-nav a[aria-current="page"]:not(.btn) { color: var(--ink); border-bottom-color: var(--ember-line); }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  background: var(--ember);
  color: #fff;
  font: 500 1rem/1.2 var(--text);
  text-decoration: none;
  border-radius: var(--r-control);
  box-shadow: 0 1px 2px rgba(31, 27, 22, .12);
  transition: background-color .16s var(--ease), transform .16s var(--ease);
}
.btn:hover { background: var(--ember-deep); }
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-small { min-height: 36px; padding: 0 16px; font-size: .9375rem; }
.btn-big { min-height: 52px; padding: 0 24px; font-size: 1.0625rem; }

.more { display: inline-block; padding: 8px 0; color: var(--ink); }

/* ------------------------------------------------------------------ sections */
.section { padding-block: var(--section); border-top: 1px solid var(--hair); }
.section-panel { background: var(--raised); }
.section-bone { background: var(--card); }

/* the kerf: a cut line in ink that ends in the ember, the place the light is now */
.kerf {
  position: relative;
  display: block;
  width: 128px;
  height: 1.5px;
  margin-bottom: 24px;
  border-radius: 1px;
  background: var(--ink);
}
.kerf::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--ember-line);
}
.js .kerf { clip-path: inset(-6px 100% -6px -6px); transition: clip-path .7s var(--ease); }
.js .kerf.is-drawn { clip-path: inset(-6px -6px -6px -6px); }
.head-blue .kerf { background: var(--seen); }

.head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.head h2 + p, .lead { margin-top: 24px; font-size: 1.1875rem; line-height: 1.55; max-width: 60ch; color: var(--text-2); }

.note { color: var(--muted); font-size: .9375rem; line-height: 1.55; max-width: 68ch; }

/* ------------------------------------------------------------------ hero */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(48px, 6vw, 80px); overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}
.hero h1 { max-width: 12.5ch; }
.hero .lead { margin-top: 24px; max-width: 44ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 40px; }
.hero-meta { margin-top: 20px; color: var(--muted); font-size: .9375rem; }

/* the bed, drawn like the program's own canvas: rulers in millimetres, the honeycomb, a birch piece, the cut */
.bed-card {
  padding: 16px 16px 12px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(31, 27, 22, .05), 0 12px 32px rgba(31, 27, 22, .07);
}
.bed { width: 100%; height: auto; overflow: visible; }
.bed text { font: 400 9.5px var(--mono); fill: var(--muted); }
.bed .tick { stroke: var(--muted); stroke-width: 1; stroke-linecap: round; opacity: .55; }
.bed .ln { fill: none; stroke: var(--ink); stroke-width: 1.2; opacity: .28; }
.bed .comb { fill: #e9e5dd; }
.bed .comb-lines { fill: url(#comb); }
.bed .ply { fill: url(#birch); }
.bed .seen { fill: none; stroke: var(--seen); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bed .ghost { fill: none; stroke: var(--ink); stroke-width: 1.1; stroke-linejoin: round; opacity: .28; stroke-dasharray: 3 4; }
.bed .burn { fill: none; stroke: var(--ember-line); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: stroke 1.2s var(--ease); }
.bed.is-cool .burn { stroke: var(--char); }
.bed .travel { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 5; stroke-linecap: round; opacity: 0; }
.bed .ember-halo { fill: var(--ember-line); opacity: .22; }
.bed .ember-core { fill: #fff4e6; stroke: var(--ember-line); stroke-width: 1.2; }
.bed .readout { font-size: 11px; fill: var(--muted); }
.bed .readout tspan { fill: var(--ink); }

/* ------------------------------------------------------------------ pictures */
/* a screenshot of the program */
.shot {
  display: block;
  border: 1px solid var(--hair-strong);
  border-radius: var(--r-card);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(31, 27, 22, .05);
}
.shot img { width: 100%; }
.shot-caption, .plate figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: 12px;
  font-size: .875rem;
  color: var(--muted);
}

/* a moving line drawing from the program's own tooltips (drawn dark; shown here in daylight), 8 x 5 frames */
.plate { min-width: 0; }
.scene {
  aspect-ratio: 12 / 7;
  width: 100%;
  border-radius: var(--r-card);
  background-color: #161816;
  background-repeat: no-repeat;
  background-size: 800% 500%;
  background-position: 0 0;
  filter: invert(1) hue-rotate(180deg) sepia(.12);
  box-shadow: inset 0 0 0 1px rgba(233, 228, 218, .18);
  animation: scene-x calc(var(--dur, 4s) / 5) steps(8) infinite, scene-y var(--dur, 4s) steps(5) infinite;
}
.js .scene { animation-play-state: paused; }
/* the sheet is named in the element's own style; it is fetched only when the plate comes near the screen */
.js .scene:not(.is-near) { background-image: none !important; }
.js .scene.is-playing { animation-play-state: running; }
@keyframes scene-x { to { background-position-x: calc(100% * 8 / 7); } }
@keyframes scene-y { to { background-position-y: calc(100% * 5 / 4); } }

.keys { display: inline-flex; gap: 4px; white-space: nowrap; }

/* ------------------------------------------------------------------ workspace: the program, rising from the hero */
.workspace { padding-block: 0 var(--section); }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.workspace .shot { box-shadow: 0 1px 2px rgba(31, 27, 22, .05), 0 16px 40px rgba(31, 27, 22, .08); }
.workspace .shot-caption { margin-top: 4px; align-items: flex-start; }
.workspace .shot-caption p { max-width: 64ch; font-size: 1rem; color: var(--text-2); }

/* ------------------------------------------------------------------ feature rows */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
}
.feature + .feature { margin-top: clamp(64px, 9vw, 112px); }
.feature-flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.feature-flip .feature-art { order: 2; }
.feature-copy h3 { font-size: clamp(1.5rem, 1.15rem + 1vw, 2rem); font-weight: 400; line-height: 1.15; letter-spacing: -.01em; }
.feature-copy p { margin-top: 16px; max-width: 46ch; }
.feature-copy p + p { margin-top: 12px; }
.feature-copy .note { margin-top: 20px; }
.feature-copy .keys { margin-top: 20px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

/* a grid of small plates, each named and described in a sentence or two */
.plates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(40px, 4vw, 56px) clamp(20px, 3vw, 40px);
}
.plates-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.plates h3 { margin-top: 16px; }
.plates p { margin-top: 8px; font-size: 1rem; line-height: 1.55; }
.plates .keys { margin-top: 12px; }

/* the same plates as a list: a small drawing beside its words (the camera's checks read as a set, not as cards) */
.plates-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 64px); }
.plates-rows .plate {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 8px 20px;
  align-items: start;
  padding-block: 24px;
  border-top: 1px solid var(--hair);
}
.plates-rows h3 { margin-top: 0; }
.plates-rows .scene { grid-row: span 2; }
.plates-rows p { margin-top: 4px; font-size: .9688rem; }

.after-plates { margin-top: clamp(40px, 5vw, 64px); padding-top: 24px; border-top: 1px solid var(--hair); }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 6vw, 96px); align-items: start; }
.split h3 { font-size: clamp(1.5rem, 1.15rem + 1vw, 2rem); font-weight: 400; line-height: 1.15; letter-spacing: -.01em; margin-top: 24px; }
.split p { margin-top: 16px; max-width: 48ch; }
.split .note { margin-top: 16px; }

/* ------------------------------------------------------------------ gallery */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.gallery li:first-child { grid-column: span 2; grid-row: span 2; }
.gallery a { display: block; text-decoration: none; }
.gallery .shot { aspect-ratio: 3 / 2; transition: border-color .16s var(--ease); }
.gallery li:first-child .shot { aspect-ratio: auto; height: calc(100% - 36px); }
.gallery .shot img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.gallery .shot-fit img { object-fit: contain; object-position: center; }
.gallery a:hover .shot, .gallery a:focus-visible .shot { border-color: var(--ember-line); }
.gallery span { display: block; margin-top: 12px; font-size: .875rem; color: var(--muted); }

.lightbox {
  width: min(96vw, 1500px);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  border: 1px solid var(--hair-strong);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(31, 27, 22, .18);
}
.lightbox::backdrop { background: rgba(31, 27, 22, .55); }
.lightbox-stage { display: grid; place-items: center; padding: 16px 16px 0; }
.lightbox-stage img { max-width: 100%; max-height: calc(94vh - 96px); width: auto; height: auto; border-radius: var(--r-control); }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; }
.lightbox-bar p { font-size: .9375rem; color: var(--text-2); }
.lightbox-buttons { display: flex; gap: 8px; }
.lightbox button {
  min-width: 44px;
  min-height: 40px;
  padding: 0 16px;
  font: 400 .9375rem/1 var(--text);
  color: var(--ink);
  background: var(--raised);
  border: 1px solid var(--hair);
  border-radius: var(--r-control);
  cursor: pointer;
  transition: border-color .16s var(--ease);
}
.lightbox button:hover { border-color: var(--hair-strong); }

/* ------------------------------------------------------------------ closing call */
.closing { padding-block: var(--section); border-top: 1px solid var(--hair); }
.closing-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.closing h2 { max-width: 16ch; }
.closing p { margin-top: 20px; max-width: 50ch; }
.closing .hero-actions { margin-top: 32px; }
.safety {
  margin-top: 28px;
  padding: 12px 16px;
  border-left: 2px solid var(--ember-line);
  background: rgba(194, 65, 12, .06);
  border-radius: 0 var(--r-control) var(--r-control) 0;
  color: var(--ink);
  font-size: .9688rem;
  max-width: 60ch;
}

.site-foot { border-top: 1px solid var(--hair); padding-block: 28px; color: var(--muted); font-size: .9375rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-foot nav { display: flex; gap: 24px; }
.site-foot a { color: var(--text-2); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

/* ------------------------------------------------------------------ features page */
.page-head { padding-block: clamp(48px, 7vw, 96px) clamp(40px, 5vw, 64px); }
.page-head h1 { font-size: clamp(2.25rem, 1.35rem + 3.4vw, 3.75rem); max-width: 16ch; }
.page-head .lead { margin-top: 24px; }
.chapter-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.chapter-nav a {
  padding: 8px 12px;
  font-size: .9375rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-control);
  transition: border-color .16s var(--ease);
}
.chapter-nav a:hover { border-color: var(--hair-strong); }

.chapter { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.chapter-side { position: sticky; top: 96px; }
.chapter-side h2 { font-size: clamp(1.75rem, 1.25rem + 1.6vw, 2.5rem); }
.chapter-side > p { margin-top: 16px; }
.chapter-side .plate, .chapter-side .shot { margin-top: 28px; }
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 48px); }
.tools > div { padding: 20px 0; border-top: 1px solid var(--hair); }
.tools dt { font: 500 1.0625rem/1.35 var(--display); color: var(--ink); }
.tools dd { margin-top: 8px; font-size: .9688rem; line-height: 1.55; }

/* ------------------------------------------------------------------ download page */
.download-hero { padding-block: clamp(48px, 7vw, 96px) clamp(56px, 7vw, 96px); }
.download-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.download-hero h1 { font-size: clamp(2.25rem, 1.35rem + 3.4vw, 3.75rem); max-width: 17ch; }
.file-line { margin-top: 16px; color: var(--muted); font-size: .9375rem; }
.file-line code { font: .875rem var(--mono); color: var(--ink); }

.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 6vw, 96px); align-items: start; }
.cols h2 { font-size: clamp(1.75rem, 1.25rem + 1.6vw, 2.5rem); }
.cols h2 + p { margin-top: 20px; }
.cols p + p { margin-top: 12px; }
.cols .plate { margin-top: 28px; max-width: 480px; }
.cols .after { margin-top: 24px; }

.steps { counter-reset: step; margin-top: 24px; display: grid; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 16px 0 16px 48px;
  border-top: 1px solid var(--hair);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 16px;
  width: 28px;
  height: 28px;
  font: 400 .875rem/26px var(--mono);
  text-align: center;
  color: var(--ink);
  border: 1px solid var(--hair-strong);
  border-radius: 50%;
}

.specs { margin-top: 24px; }
.specs > div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 8px 24px; padding: 16px 0; border-top: 1px solid var(--hair); }
.specs dt { color: var(--ink); font-weight: 500; }
.specs dd { font-size: .9688rem; }

.keybox {
  margin-top: 28px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-card);
}
.section-bone .keybox { background: var(--page); }
.keybox h3 { font-size: 1.125rem; }
.keybox p { margin-top: 8px; }
.keybox .btn { margin-top: 16px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1040px) {
  .plates-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery li:first-child { grid-column: span 3; grid-row: auto; }
  .gallery li:first-child .shot { height: auto; }
  .plates-rows { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .hero-grid, .feature, .closing-grid, .download-grid, .chapter, .cols, .split { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 14ch; }
  .feature-flip .feature-art { order: 0; }
  .feature-copy p { max-width: 60ch; }
  .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plates-rows { grid-template-columns: minmax(0, 1fr); }
  .chapter-side { position: static; }
  .chapter-side .plate { max-width: 480px; }
  .closing-art { max-width: 480px; }
}
@media (max-width: 620px) {
  body { font-size: 1rem; }
  h1 { font-size: 2.5rem; }
  .site-nav .nav-extra { display: none; }
  .plates, .plates-4, .pair, .tools { grid-template-columns: minmax(0, 1fr); }
  .plates-rows .plate { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .plates-rows .scene { grid-row: auto; max-width: 360px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery li:first-child { grid-column: span 2; }
  .hero-actions .btn, .closing .btn, .download-hero .btn { width: 100%; }
  .specs > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .head h2 + p, .lead { font-size: 1.0625rem; }
  .bed-card { padding: 12px 8px 8px; }
  .lightbox-bar { flex-direction: column; align-items: stretch; }
  .lightbox-buttons { justify-content: space-between; }
}
@media (max-width: 400px) {
  .brand { gap: 8px; font-size: 1rem; }
  .brand img { width: 24px; height: 24px; }
  .site-nav { gap: 16px; }
  .site-nav a:not(.btn) { font-size: .875rem; }
  .btn-small { padding: 0 12px; font-size: .875rem; }
}

/* ------------------------------------------------------------------ calm mode */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene {
    animation: none;
    /* a telling frame from the middle of the loop: column 7, row 3 */
    background-position: calc(100% * 6 / 7) calc(100% * 2 / 4);
  }
  .js .kerf { clip-path: none; transition: none; }
  .btn, .gallery .shot, .bed .burn, a { transition: none; }
}

@media print {
  .site-head, .lightbox { display: none; }
  body { background: #fff; color: #000; }
  .scene { filter: none; }
}


/* ================================================================== the deer stage (home page) */
.stage-hero { padding: clamp(10px, 1.4vw, 20px) clamp(10px, 1.4vw, 20px) 0; }
.stage {
  position: relative;
  isolation: isolate;
  height: min(calc(100svh - 84px), 940px);
  min-height: 560px;
  border-radius: var(--r-stage);
  overflow: hidden;
  background: #e8e2d8;
}
.stage > canvas, .stage-still {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: -1;
}
.stage-still { object-fit: cover; object-position: 70% 50%; }
.stage.is-live .stage-still { opacity: 0; }
.stage-copy {
  position: absolute;
  left: clamp(20px, 5vw, 80px);
  bottom: clamp(28px, 7vh, 88px);
  max-width: min(560px, 46%);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 .8125rem/1 var(--mono);
  color: var(--text-2);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ember-line); box-shadow: 0 0 0 4px rgba(232, 86, 26, .18); }
.stage-copy h1 { margin-top: 18px; font-size: clamp(2.6rem, 1.2rem + 4.6vw, 5.6rem); line-height: .98; letter-spacing: -.035em; max-width: 11ch; }
.stage-copy .lead { margin-top: 22px; max-width: 40ch; color: var(--text-2); }
.stage-copy .hero-actions { margin-top: 32px; }
.stage-tag {
  position: absolute;
  right: clamp(16px, 2.4vw, 32px);
  bottom: clamp(16px, 2.4vw, 28px);
  display: flex;
  gap: 6px;
  font: 400 .75rem/1 var(--mono);
  color: var(--text-2);
}
.stage-tag span { padding: 7px 10px; border-radius: 999px; background: rgba(253, 251, 247, .72); border: 1px solid var(--hair); }

.btn { border-radius: 999px; }
.btn-ghost { background: rgba(253, 251, 247, .7); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair-strong); }
.btn-ghost:hover { background: var(--card); }

@media (max-width: 760px) {
  .stage { height: auto; min-height: 0; padding-top: 112vw; }
  .stage > canvas, .stage-still { height: 112vw !important; bottom: auto; }
  .stage-still { object-position: 76% 50%; }
  .stage-copy { position: relative; left: auto; bottom: auto; max-width: none; padding: 0 20px 28px; }
  .stage-tag { display: none; }
}

/* the big sentence under the stage */
.statement { padding-block: clamp(72px, 11vw, 160px) clamp(40px, 6vw, 80px); }
.big-say {
  font: 400 clamp(2.1rem, 1rem + 4.4vw, 5.2rem)/1.02 var(--display);
  letter-spacing: -.035em;
  color: var(--ink);
  max-width: 17ch;
  text-wrap: balance;
}
.big-say em { font-style: normal; color: var(--ember); }
.js .big-say .w { opacity: .14; transition: opacity .5s var(--ease); }
.js .big-say .w.on { opacity: 1; }
.statement .hero-meta { margin-top: 28px; }

/* menu words roll up on hover */
.roll { display: inline-block; position: relative; overflow: hidden; vertical-align: bottom; line-height: 1.25; }
.roll::after { content: attr(data-roll); position: absolute; left: 0; top: 100%; color: var(--ink); }
.roll { transition: transform .38s var(--ease); }
.site-nav a:hover .roll, .site-nav a:focus-visible .roll { transform: translateY(-100%); }
.site-nav a:not(.btn) { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
@media (max-width: 600px) {
  .site-nav { gap: 14px; }
  .site-nav a[href="features.html"] { display: none; }
  .brand span { font-size: 1rem; }
}
@media (max-width: 440px) { .brand span { display: none; } }
.nav-account .avatar { width: 24px; height: 24px; font-size: .6875rem; }

/* rounder pictures, as the stage */
.workspace .shot { border-radius: var(--r-stage); }

@media (prefers-reduced-motion: reduce) {
  .roll, .js .big-say .w { transition: none; }
  .js .big-say .w { opacity: 1; }
}

/* ================================================================== forum and account */
.page-head { padding-block: clamp(48px, 7vw, 96px) clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4.4rem); letter-spacing: -.03em; }
.page-head p { margin-top: 18px; max-width: 58ch; font-size: 1.125rem; }
.panel {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-stage);
  padding: clamp(20px, 3vw, 36px);
}
.forum-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; padding-bottom: var(--section); }
.cats { display: grid; gap: 4px; }
.cats button {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border: 0; border-radius: 12px; background: none; cursor: pointer;
  font: 500 .9688rem/1.3 var(--text); color: var(--text-2); text-align: start;
}
.cats button:hover { background: var(--raised); color: var(--ink); }
.cats button[aria-pressed="true"] { background: var(--ink); color: var(--page); }
.cats small { font: 400 .75rem var(--mono); opacity: .7; }
.threads { display: grid; }
.thread {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; padding: 18px 4px;
  border-top: 1px solid var(--hair); text-decoration: none; color: inherit;
}
.thread:first-child { border-top: 0; }
.thread:hover h3 { color: var(--ember); }
.thread h3 { font-size: 1.125rem; font-weight: 500; transition: color .16s var(--ease); }
.thread p, .meta { font-size: .875rem; color: var(--muted); }
.thread .count { grid-row: span 2; align-self: center; font: 400 .8125rem var(--mono); color: var(--text-2); }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.toolbar h2 { font-size: 1.5rem; }
.post { padding: 22px 0; border-top: 1px solid var(--hair); }
.post:first-of-type { border-top: 0; }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-body { margin-top: 10px; white-space: pre-wrap; color: var(--ink); }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--raised); color: var(--ink); font: 600 .8125rem var(--text); flex: none; object-fit: cover; }
.field { display: grid; gap: 6px; margin-top: 16px; }
.field label { font-size: .875rem; color: var(--ink); font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--hair-strong); border-radius: 12px;
  background: #fff; color: var(--ink); font: 400 1rem/1.4 var(--text);
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.btn-google { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair-strong); width: 100%; }
.btn-google:hover { background: var(--raised); }
.btn-google svg { width: 18px; height: 18px; }
.or { display: flex; align-items: center; gap: 12px; margin: 22px 0 4px; color: var(--muted); font-size: .8125rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.msg { margin-top: 14px; font-size: .9375rem; }
.msg:empty { display: none; }
.msg.bad { color: #a8380d; }
.msg.good { color: #2d6a3a; }
.auth-wrap { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: stretch; padding-bottom: var(--section); }
.auth-art { position: relative; border-radius: var(--r-stage); overflow: hidden; background: #e8e2d8; min-height: 420px; }
.auth-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--raised); }
.tabs button { border: 0; background: none; padding: 8px 16px; border-radius: 999px; font: 500 .9375rem var(--text); color: var(--text-2); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(31, 27, 22, .1); }
.empty { padding: 36px 4px; color: var(--muted); }
.notice { padding: 16px 18px; border-radius: 14px; background: var(--raised); color: var(--text-2); font-size: .9375rem; }
@media (max-width: 860px) {
  .forum-grid, .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
}

/* ================================================================== the shop */
.buy-panel .price { display: grid; gap: 6px; margin-top: 14px; }
.buy-panel .price span { font: 600 clamp(2.2rem, 1.6rem + 2vw, 3rem)/1 var(--text); letter-spacing: -.02em; color: var(--ink); min-height: 1em; }
.buy-panel .price small { font-size: .875rem; color: var(--muted); }
.ticks { list-style: none; margin: 22px 0 6px; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; color: var(--text-2); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 6px; border: solid var(--ember); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.buy-steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin: 0; padding: 0; }
.buy-steps li { counter-increment: s; border-top: 1px solid var(--hair-strong); padding-top: 18px; }
.buy-steps li::before { content: "0" counter(s); font: 400 .8125rem var(--mono); color: var(--muted); }
.buy-steps h3 { margin-top: 10px; font-size: 1.25rem; }
.buy-steps p { margin-top: 8px; color: var(--text-2); }
.licences { padding-bottom: var(--section); }
.lic { padding: 22px 0; border-top: 1px solid var(--hair); }
.lic-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
.lic-head h3 { font-size: 1.125rem; font-weight: 500; }
.lic-key { margin-top: 12px; padding: 14px 16px; border-radius: 12px; background: var(--raised); font: 400 .875rem/1.6 var(--mono); color: var(--ink); white-space: pre-wrap; word-break: break-all; user-select: all; }
.lic .form-actions { margin-top: 12px; }
.lic-move { margin-top: 14px; }
.lic-move summary { cursor: pointer; font-weight: 500; color: var(--ink); }
.key-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.field input.mono { font-family: var(--mono); text-transform: uppercase; letter-spacing: .02em; }
.field input.mono::placeholder { text-transform: none; }
@media (max-width: 760px) {
  .buy-steps, .key-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) { .site-nav a.nav-buy { display: none; } }

/* ================================================================== clips that play under the pointer */
.clips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px); }
.clip-wide { grid-column: 1 / -1; }
.clip-media {
  position: relative;
  border-radius: var(--r-stage);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--hair-strong);
  box-shadow: 0 1px 2px rgba(31, 27, 22, .05), 0 18px 44px rgba(31, 27, 22, .07);
  cursor: pointer;
}
.clip-media video { display: block; width: 100%; height: auto; }
.clip-media::after {
  content: "";
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(31, 27, 22, .78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M7 5l8 5-8 5z' fill='%23fff'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.clip-media.is-playing::after { opacity: 0; }
.clip figcaption { margin-top: 18px; }
.clip h3 { font-size: clamp(1.25rem, 1.05rem + .6vw, 1.6rem); font-weight: 400; letter-spacing: -.01em; }
.clip p { margin-top: 8px; max-width: 52ch; }
.news { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; margin-top: clamp(56px, 7vw, 96px); padding-top: 32px; border-top: 1px solid var(--hair); }
.news h3 { font-size: 1.0625rem; font-weight: 600; }
.news p { margin-top: 6px; font-size: .9375rem; line-height: 1.5; }
.closing-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 42%; border-radius: var(--r-stage); }
@media (max-width: 900px) { .news { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .clips, .news { grid-template-columns: minmax(0, 1fr); } }
