/* Prism Labs design system (vault: Prism Labs Website Design System — 2026-09-26; tokens from
   prism-labs-site/src/style.css). Fonts are the self-hosted Noto files kept with the crop lab. */
@font-face { font-family: "Noto Serif Display Variable"; src: url("crop-studio/brand/noto-serif-display.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Noto Serif Variable"; src: url("crop-studio/brand/noto-serif.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Noto Sans Display Variable"; src: url("crop-studio/brand/noto-sans-display.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Noto Sans Mono Variable"; src: url("crop-studio/brand/noto-sans-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #000; --ink: #fff; --soft: #c9c9c9; --muted: #8d8d8d; --line: #262626; --panel: #0b0b0b;
  --serif: "Noto Serif Display Variable", Georgia, serif; --serif-text: "Noto Serif Variable", Georgia, serif;
  --sans: "Noto Sans Display Variable", system-ui, sans-serif; --mono: "Noto Sans Mono Variable", ui-monospace, monospace;
  --gutter: clamp(16px, 5vw, 96px); --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); overflow-x: hidden; }
img, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #000; padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }

/* type */
.display { font: 400 clamp(2.75rem, 6.4vw, 6.25rem)/1 var(--serif); letter-spacing: -.02em; margin: 0; }
.eyebrow { font: 500 .8125rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 1.4em; }
.lead { font-size: clamp(1.0625rem, 1.5vw, 1.375rem); line-height: 1.5; color: var(--soft); max-width: 46ch; margin: 0; }
.note { color: var(--muted); font-size: .9375rem; margin: 14px 0 0; }

/* header (as the site) */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 24px; padding: 14px var(--gutter);
  transition: background .4s var(--ease), border-color .4s var(--ease), transform .5s var(--ease); border-bottom: 1px solid transparent; }
.site-header.scrolled { background: rgba(0, 0, 0, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--line); }
.site-header.hide { transform: translateY(-100%); }
.brand { flex: none; } .brand img { height: 40px; width: auto; }
.nav { display: flex; gap: clamp(16px, 2.4vw, 36px); margin-left: auto; }
.nav a { text-decoration: none; font-size: .9375rem; color: var(--soft); position: relative; padding: 6px 0; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: #fff; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.nav a:hover, .nav a:focus-visible { color: #fff; }
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.menu { display: none; margin-left: auto; width: 44px; height: 44px; background: none; border: 1px solid var(--line); border-radius: 50%; position: relative; flex: none; }
.menu span { position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; transition: transform .4s var(--ease), top .4s var(--ease); }
.menu span:first-child { top: 17px; } .menu span:last-child { top: 25px; }
.menu[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font: 500 .9375rem/1 var(--sans); padding: 14px 22px; border-radius: 999px; border: 1px solid #fff; white-space: nowrap; transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease); }
.btn-solid { background: #fff; color: #000; } .btn-solid:hover { background: transparent; color: #fff; }
.btn-line { background: transparent; color: #fff; border-color: #444; } .btn-line:hover { border-color: #fff; }
.header-cta { white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2em; }

/* hero */
.page-hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: end; padding: 150px var(--gutter) clamp(40px, 5vw, 64px);
  background: radial-gradient(ellipse at 25% 0%, #141414, transparent 60%); }

/* study: stage + panel */
.study { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); margin: 0 var(--gutter); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stage { position: relative; min-height: max(560px, min(80svh, 820px)); overflow: hidden; background: radial-gradient(ellipse at 50% 44%, #171717 0%, #080808 60%, #020202 100%); }
#viewport { position: absolute; inset: 0; }
#viewport canvas { touch-action: none; }
#beauty { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #050505; }
.stage-top { position: absolute; top: 24px; left: 28px; right: 28px; display: flex; justify-content: space-between; align-items: center; gap: 16px; z-index: 2; }
.stage-top .eyebrow { margin: 0; }
.switch { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(0, 0, 0, .55); }
.switch button { border: 0; background: transparent; color: var(--soft); border-radius: 999px; padding: 9px 16px; font-size: .875rem; }
.switch button.active { background: #fff; color: #000; }
#loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font: 500 .8125rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; z-index: 1; pointer-events: none; }
#loading[hidden] { display: none; }
.stage-caption { position: absolute; left: 28px; right: 28px; bottom: 84px; display: flex; justify-content: space-between; align-items: end; gap: 18px; pointer-events: none; z-index: 2; }
.stage-caption h2 { font: 400 1.75rem/1.2 var(--serif-text); margin: 0 0 6px; }
.stage-caption p { font-size: .875rem; color: var(--muted); margin: 0; }
#hint { font-size: .8125rem; color: var(--muted); text-align: right; }
.stage-tools { position: absolute; left: 28px; right: 28px; bottom: 24px; display: flex; gap: 8px; z-index: 2; }
.stage-tools button { border: 1px solid #383838; color: var(--soft); border-radius: 999px; background: #0b0b0b; padding: 9px 14px; font-size: .8125rem; }
.stage-tools button:hover { color: #fff; border-color: #fff; }

.panel { border-left: 1px solid var(--line); background: var(--panel); padding: 28px; display: flex; flex-direction: column; }
.panel-heading .eyebrow { margin-bottom: 14px; }
.panel-heading h2 { font: 400 1.75rem/1.2 var(--serif-text); margin: 0 0 10px; }
.panel-heading p:last-child { font-size: .9375rem; color: var(--soft); margin: 0 0 22px; }
.control-section { padding: 20px 0; border-top: 1px solid var(--line); }
.control-section h3 { font: 400 1.25rem/1.2 var(--serif-text); margin: 0 0 16px; }
.control-section h3 span { float: right; font: .75rem/1.6 var(--mono); color: var(--muted); }
.field { margin: 0 0 16px; }
.field label, .field .label { display: flex; justify-content: space-between; font-size: .8125rem; color: var(--soft); margin-bottom: 9px; }
.field output { font: .8125rem var(--mono); color: #fff; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg button { border: 1px solid #383838; background: transparent; color: var(--soft); border-radius: 999px; padding: 10px 8px; font-size: .875rem; transition: border-color .3s var(--ease), background .3s var(--ease), color .3s var(--ease); }
.seg button:hover { border-color: #fff; color: #fff; }
.seg button.selected { background: #fff; border-color: #fff; color: #000; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: #3a3a3a; border-radius: 2px; }
input[type="range"]::-moz-range-track { height: 2px; background: #3a3a3a; border-radius: 2px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -7px; border-radius: 50%; background: #fff; border: 0; }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: .9375rem; }
.toggle-row small { display: block; color: var(--muted); font-size: .8125rem; }
#motion { width: 44px; height: 24px; border-radius: 999px; border: 1px solid #444; background: transparent; position: relative; flex: none; padding: 0; }
#motion span { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .3s var(--ease), background .3s var(--ease); }
#motion[aria-checked="true"] { border-color: #fff; }
#motion[aria-checked="true"] span { transform: translateX(20px); background: #fff; }
.panel-foot { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }
.panel-foot p { font-size: .8125rem; color: var(--muted); margin: 0 0 16px; }
.panel-foot strong { color: var(--soft); font-weight: 500; }
.panel-actions { display: grid; gap: 8px; margin-bottom: 14px; }
.panel-actions .btn { width: 100%; }
#control-note { margin: 0; }

/* footer (as the site) */
.site-footer { border-top: 1px solid var(--line); padding: clamp(48px, 7vw, 96px) var(--gutter) 28px; margin-top: clamp(64px, 9vw, 120px); }
.foot-top { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(120px, 1fr)); gap: 40px; }
.foot-brand img { height: 52px; width: auto; margin-left: -4px; }
.foot-brand p { color: var(--muted); margin: 14px 0 0; font-family: var(--serif-text); font-size: 1.25rem; }
.site-footer h4 { font: 500 .75rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.site-footer nav a { display: block; text-decoration: none; color: var(--soft); padding: 5px 0; transition: color .3s, transform .3s var(--ease); }
.site-footer nav a:hover { color: #fff; transform: translateX(4px); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(40px, 6vw, 80px); padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.foot-bottom a { text-decoration: none; }

/* source photograph */
dialog { max-width: min(760px, calc(100vw - 32px)); max-height: 90vh; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); padding: 22px; }
dialog::backdrop { background: rgba(0, 0, 0, .8); backdrop-filter: blur(6px); }
dialog img { max-height: 70vh; margin: 0 auto; border-radius: 6px; }
dialog p { color: var(--muted); font-size: .875rem; margin: 14px 0 0; }
#close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid #444; background: #000; font-size: 1.25rem; line-height: 1; }

@media (min-width: 861px) and (max-width: 1240px) { .site-header { gap: 16px; } .nav { gap: 14px; } .nav a { font-size: .875rem; } .header-cta { padding: 12px 16px; font-size: .875rem; } }
@media (max-width: 1100px) { .nav a:nth-child(n+7) { display: none; } }
@media (max-width: 860px) {
  .nav { position: fixed; inset: 0; background: #000; flex-direction: column; justify-content: center; align-items: flex-start; padding: var(--gutter); gap: 8px; margin: 0; transform: translateY(-100%); visibility: hidden; transition: transform .6s var(--ease), visibility 0s linear .6s; z-index: -1; }
  .nav.open { transform: none; visibility: visible; transition: transform .6s var(--ease), visibility 0s; }
  .nav a, .nav a:nth-child(n+7) { display: block; font: 400 2.25rem/1.2 var(--serif); color: #fff; }
  .menu { display: block; } .header-cta { display: none; }
  .page-hero { grid-template-columns: 1fr; padding-top: 110px; gap: 20px; }
  .study { grid-template-columns: 1fr; margin: 0; }
  .stage { height: 72svh; min-height: 480px; }
  .panel { border-left: 0; border-top: 1px solid var(--line); padding: 24px var(--gutter); }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .stage-top { left: 16px; right: 16px; top: 16px; } .stage-top .eyebrow { display: none; }
  .stage-caption { left: 16px; right: 16px; bottom: 76px; display: block; } #hint { display: block; text-align: left; margin-top: 6px; }
  .stage-tools { left: 16px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
