:root {
  --bg: #000;
  --ink: #f3f3f3;
  --muted: rgba(243, 243, 243, 0.72);
  --dim: rgba(243, 243, 243, 0.46);
  --line: rgba(243, 243, 243, 0.12);
  --panel: rgba(17, 17, 17, 0.82);
  --panel-solid: #121212;
  --accent: #d7f26b;
  --danger: #f36c52;
  --shadow: 0 28px 120px rgba(0, 0, 0, 0.48);
  --page-pad: clamp(18px, 4.95vw, 92px);
  --media-gap: clamp(8px, 0.55vw, 10px);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", "Noto Sans SC", "PingFang SC", sans-serif;
  letter-spacing: 0;
}

body.drawer-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

input[type="file"] {
  color: transparent;
}

input[type="file"]::file-selector-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  margin-right: 12px;
  padding: 8px 10px;
}

button {
  color: inherit;
}

.site-header {
  align-items: center;
  background: linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
  display: flex;
  inset: 0 0 auto;
  justify-content: space-between;
  padding: 28px var(--page-pad);
  position: fixed;
  z-index: 20;
}

.brand,
.nav-links,
.site-footer,
.admin-actions,
.form-actions,
.form-row,
.media-status {
  align-items: center;
  display: flex;
}

.brand {
  gap: 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  border: 1px solid var(--line);
  display: grid;
  height: 34px;
  place-items: center;
  width: 34px;
}

.nav-links {
  gap: clamp(16px, 3vw, 34px);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.nav-links a:hover {
  color: var(--ink);
}

.hero {
  min-height: 100svh;
  overflow: hidden;
  position: relative;
}

.hero-media,
.hero-vignette {
  inset: 0;
  position: absolute;
}

.hero-media {
  background: #111;
}

.hero-vignette {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.14) 55%, rgba(0, 0, 0, 0.54)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.08) 44%, rgba(0, 0, 0, 0.86));
  pointer-events: none;
}

.hero-copy {
  bottom: clamp(76px, 11vw, 150px);
  left: var(--page-pad);
  max-width: min(780px, calc(100vw - 36px));
  position: absolute;
  z-index: 2;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 16px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
figure {
  margin-top: 0;
}

h1 {
  font-size: clamp(72px, 16vw, 220px);
  line-height: 0.82;
  margin-bottom: 22px;
}

h2 {
  font-size: clamp(38px, 7vw, 96px);
  line-height: 0.92;
  margin-bottom: 0;
}

h3 {
  font-size: clamp(22px, 3vw, 40px);
  line-height: 0.98;
  margin-bottom: 0;
}

.hero-copy p:last-child,
.work-intro p,
.drawer-copy p,
.panel-heading p {
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.55;
}

.hero-copy p:last-child {
  max-width: 620px;
}

.scroll-cue {
  align-items: center;
  bottom: 34px;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  font-weight: 800;
  gap: 14px;
  left: var(--page-pad);
  position: absolute;
  text-transform: uppercase;
  z-index: 2;
}

.scroll-cue span:last-child {
  background: var(--accent);
  display: block;
  height: 1px;
  width: 72px;
}

.work-intro {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  padding: clamp(36px, 6vw, 70px) var(--page-pad);
}

.work-intro p {
  margin-bottom: 0;
  max-width: 980px;
}

.section {
  padding: clamp(70px, 10vw, 140px) var(--page-pad);
}

.section-heading {
  display: grid;
  gap: 2px;
  justify-content: start;
  margin-bottom: clamp(22px, 3vw, 42px);
}

.motion-grid {
  display: grid;
  gap: clamp(72px, 11vw, 170px);
}

.work-card,
.still-card {
  background: transparent;
  border: 0;
  cursor: pointer;
  display: grid;
  gap: 14px;
  margin: 0;
  min-width: 0;
  outline: none;
  padding: 0;
}

.work-card.long-video {
  display: grid;
  gap: 14px;
  width: 100%;
}

.work-group {
  display: grid;
  gap: 24px;
}

.tile-media,
.mosaic-media,
.still-media,
.drawer-media {
  background: #111;
  overflow: hidden;
  position: relative;
}

.long-media {
  background: #050505;
  max-height: 86vh;
}

.group-heading {
  display: grid;
  gap: 0;
  max-width: 720px;
}

.group-heading p,
.group-heading span {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
  margin: 0;
}

.group-heading h3 {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}

.mosaic-wall {
  display: grid;
  gap: var(--media-gap);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 4fr 3fr;
  height: min(44vw, 800px);
}

.mosaic-wall.free-board {
  height: min(56vw, 920px);
  min-height: 520px;
  position: relative;
}

.mosaic-card,
.masonry-card {
  cursor: pointer;
  display: grid;
  gap: 8px;
  outline: none;
  position: relative;
}

.mosaic-card .mosaic-media,
.mosaic-card .placeholder-art {
  height: 100%;
  width: 100%;
}

.mosaic-card .placeholder-art strong {
  display: none;
}

.free-card {
  position: absolute;
}

.free-card .mosaic-media {
  aspect-ratio: auto !important;
  height: 100%;
}

.tile-caption {
  align-items: baseline;
  color: var(--ink);
  display: flex;
  font-size: 12px;
  font-weight: 800;
  gap: 12px;
  justify-content: space-between;
  text-transform: uppercase;
}

.tile-caption.compact,
.mosaic-card .tile-caption {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.tile-caption span,
.still-card figcaption span {
  color: var(--dim);
  font-size: 12px;
  font-weight: 800;
  margin: 0;
}

.tile-caption strong {
  font-size: clamp(18px, 2vw, 28px);
  text-align: right;
}

.stills-section {
  border-top: 1px solid var(--line);
}

.video-masonry,
.masonry-grid {
  columns: 3 260px;
  column-gap: var(--media-gap);
}

.masonry-card,
.still-card {
  break-inside: avoid;
  margin-bottom: var(--media-gap);
}

.masonry-card {
  display: inline-grid;
  width: 100%;
}

.still-card figcaption {
  color: var(--ink);
  display: flex;
  font-size: 16px;
  font-weight: 800;
  gap: 12px;
  justify-content: space-between;
}

.mosaic-overflow {
  margin-top: var(--media-gap);
}

.media-video,
.media-image,
.placeholder-art {
  display: block;
  height: 100%;
  pointer-events: none;
  width: 100%;
}

.video-shell {
  display: block;
  height: 100%;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.video-shell .media-video {
  inset: 0;
  position: absolute;
}

.video-controls {
  align-items: center;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
  bottom: 0;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(80px, 1fr) auto minmax(46px, 84px);
  left: 0;
  opacity: 0;
  padding: 34px 12px 10px;
  pointer-events: none;
  position: absolute;
  right: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 2;
}

.video-shell:hover .video-controls,
.video-shell:focus-within .video-controls {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.video-control-button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  min-height: 28px;
  min-width: 48px;
  padding: 6px 8px;
}

.video-progress,
.video-volume {
  accent-color: var(--ink);
  cursor: pointer;
  min-width: 0;
}

.drawer .media-video,
.drawer .media-image {
  pointer-events: auto;
}

.placeholder-art {
  background:
    linear-gradient(135deg, transparent 0 42%, rgba(255, 255, 255, 0.12) 42% 46%, transparent 46% 100%),
    radial-gradient(circle at 18% 22%, color-mix(in srgb, var(--placeholder-accent) 80%, white 10%), transparent 18rem),
    linear-gradient(120deg, var(--placeholder-dark), #050505 58%, var(--placeholder-accent));
  overflow: hidden;
  position: relative;
}

.placeholder-art::after {
  animation: scan 4.6s linear infinite;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 22px,
    rgba(255, 255, 255, 0.14) 22px 24px
  );
  content: "";
  inset: -20%;
  position: absolute;
  transform: rotate(-10deg);
}

.placeholder-art span {
  background: var(--accent);
  position: absolute;
}

.placeholder-art span:nth-child(1) {
  height: 58%;
  left: 12%;
  top: 18%;
  width: 16%;
}

.placeholder-art span:nth-child(2) {
  background: rgba(242, 239, 231, 0.7);
  bottom: 14%;
  height: 12%;
  right: 10%;
  width: 52%;
}

.placeholder-art span:nth-child(3) {
  border: 1px solid rgba(242, 239, 231, 0.7);
  height: 66%;
  right: 18%;
  top: 14%;
  width: 32%;
}

.placeholder-art strong {
  bottom: 18px;
  color: rgba(242, 239, 231, 0.82);
  font-size: clamp(18px, 3vw, 44px);
  left: 18px;
  line-height: 0.95;
  max-width: 72%;
  position: absolute;
  z-index: 1;
}

.hero .placeholder-art strong {
  display: none;
}

.drawer {
  background: rgba(13, 13, 13, 0.96);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto auto;
  height: 100svh;
  max-width: 1080px;
  overflow: auto;
  position: fixed;
  right: 0;
  top: 0;
  transform: translateX(104%);
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
  width: min(94vw, 1080px);
  z-index: 40;
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer-scrim {
  background: rgba(0, 0, 0, 0.58);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 260ms ease;
  z-index: 35;
}

.drawer-scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-close {
  background: rgba(8, 8, 8, 0.62);
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  height: 42px;
  position: absolute;
  right: 18px;
  text-transform: uppercase;
  top: 18px;
  width: 86px;
  z-index: 3;
}

.drawer-copy {
  padding: clamp(28px, 5vw, 54px);
}

.drawer-media {
  aspect-ratio: 16 / 9;
  margin: clamp(52px, 6vw, 74px) clamp(18px, 4vw, 54px) 0;
}

.drawer-copy h2 {
  margin-bottom: 24px;
}

.drawer-text {
  display: grid;
  gap: 12px;
  margin-bottom: 34px;
}

.drawer-text p {
  margin: 0;
}

.drawer-section-title {
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
  padding-top: 22px;
  text-transform: uppercase;
}

.drawer-stills {
  display: grid;
  gap: clamp(10px, 1.5vw, 18px);
  grid-template-columns: 1fr;
  margin-top: 18px;
}

.drawer-stills:empty {
  display: none;
}

.drawer-block {
  margin: 0;
}

.drawer-block-image img {
  background: #111;
  display: block;
  height: auto;
  width: 100%;
}

.drawer-block-image figcaption {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin-top: 10px;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  justify-content: space-between;
  padding: 22px clamp(18px, 4vw, 64px);
}

.button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 12px 15px;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.04);
}

.button.danger {
  border-color: color-mix(in srgb, var(--danger) 65%, transparent);
  color: var(--danger);
}

.admin-page {
  background: #0b0b0b;
}

.admin-header {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 44px) clamp(18px, 4vw, 48px);
}

.admin-header h1 {
  font-size: clamp(38px, 6vw, 82px);
  margin: 0;
}

.admin-actions {
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-shell {
  display: grid;
  gap: 18px;
  padding: 22px clamp(18px, 4vw, 48px) 60px;
}

.admin-panel {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  padding: clamp(18px, 3vw, 28px);
}

.panel-heading {
  align-items: start;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.panel-heading h2 {
  font-size: clamp(26px, 3vw, 44px);
}

.panel-heading p {
  font-size: 14px;
  margin: 0;
  max-width: 440px;
}

.settings-form,
.project-form {
  display: grid;
  gap: 14px;
}

.settings-form {
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.2fr) minmax(220px, 0.6fr);
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

input,
textarea,
select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--ink);
  outline: none;
  padding: 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(215, 242, 107, 0.62);
}

select option {
  background: #151515;
}

.editor-layout {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
}

.project-list {
  border: 1px solid var(--line);
  max-height: calc(100svh - 180px);
  overflow: auto;
  position: sticky;
  top: 18px;
}

.project-list-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  display: grid;
  gap: 6px;
  padding: 14px;
  text-align: left;
  width: 100%;
}

.project-list-item.active {
  background: rgba(215, 242, 107, 0.12);
}

.project-list-item.drag-over,
.content-block-item.drag-over {
  border-color: rgba(215, 242, 107, 0.72);
  background: rgba(215, 242, 107, 0.08);
}

.project-list-item span {
  font-weight: 800;
}

.project-list-item small {
  color: var(--muted);
}

.form-section {
  border: 1px solid var(--line);
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 18px;
}

.form-section legend {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  padding: 0 8px;
}

.canvas-fields[hidden] {
  display: none;
}

[hidden] {
  display: none !important;
}

.content-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.drawer-editor {
  display: grid;
  gap: 14px;
}

.wysiwyg-toolbar {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  padding: 10px;
  position: sticky;
  top: 18px;
  z-index: 3;
}

.wysiwyg-toolbar .button {
  min-height: 36px;
  min-width: 36px;
  padding: 8px 10px;
}

.drawer-page-preview {
  background: #f7f4ee;
  color: #141414;
  min-height: 620px;
  padding: clamp(22px, 4vw, 44px);
}

.drawer-page-meta {
  border-bottom: 1px solid rgba(20, 20, 20, 0.16);
  margin-bottom: 24px;
  padding-bottom: 18px;
}

.drawer-page-meta .eyebrow {
  color: rgba(20, 20, 20, 0.58);
}

.drawer-page-meta h3 {
  color: #141414;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1;
  margin: 0;
}

.content-block-list {
  display: grid;
  gap: 12px;
}

.word-canvas {
  gap: 18px;
}

.content-block-item {
  border: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding: 14px;
}

.word-block {
  background: #fffdf8;
  border: 1px solid rgba(20, 20, 20, 0.12);
  color: #141414;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.word-block.drag-over {
  background: #f0f5d3;
}

.rich-text {
  background: transparent;
  border: 0;
  color: #141414;
  line-height: 1.55;
  min-height: 120px;
  outline: none;
  padding: 18px;
}

.rich-text:empty::before {
  color: rgba(20, 20, 20, 0.38);
  content: attr(data-placeholder);
}

.rich-text p,
.rich-text ul,
.rich-text ol {
  margin: 0 0 0.9em;
}

.rich-caption {
  color: rgba(20, 20, 20, 0.62);
  font-size: 13px;
  line-height: 1.45;
  min-height: 28px;
  outline: none;
  padding: 0 18px 16px;
}

.rich-caption:empty::before {
  color: rgba(20, 20, 20, 0.34);
  content: attr(data-placeholder);
}

.block-tools {
  background: rgba(20, 20, 20, 0.04);
  border-bottom: 1px solid rgba(20, 20, 20, 0.1);
  justify-content: space-between;
  padding: 8px;
}

.block-tools .button,
.block-drag {
  background: #fffdf8;
  border: 1px solid rgba(20, 20, 20, 0.14);
  color: #141414;
  min-height: 32px;
  padding: 6px 10px;
}

.block-drag {
  cursor: grab;
  font-size: 12px;
  font-weight: 800;
}

.block-drag:active {
  cursor: grabbing;
}

.word-image-picker {
  cursor: pointer;
  display: grid;
  gap: 8px;
  padding: 18px 18px 0;
}

.word-image-picker input {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.word-image-frame {
  background: #ededed;
  border: 1px dashed rgba(20, 20, 20, 0.24);
  display: grid;
  min-height: 260px;
  place-items: center;
}

.word-image-frame img {
  display: block;
  max-height: 560px;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.word-image-empty,
.word-image-action,
.word-empty {
  color: rgba(20, 20, 20, 0.5);
}

.word-image-action {
  font-size: 12px;
  font-weight: 800;
}

.layout-board {
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    #070707;
  background-size: 10% 10%;
  border: 1px solid var(--line);
  height: 260px;
  position: relative;
}

.layout-frame {
  background: rgba(215, 242, 107, 0.16);
  border: 1px solid rgba(215, 242, 107, 0.82);
  cursor: grab;
  min-height: 20px;
  min-width: 20px;
  position: absolute;
}

.layout-frame:active {
  cursor: grabbing;
}

.content-block-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.content-block-head strong {
  font-size: 13px;
}

.form-row {
  gap: 14px;
}

.form-row > label {
  flex: 1;
}

.toggles label {
  align-items: center;
  display: flex;
  gap: 10px;
}

.toggles input {
  width: auto;
}

.media-status {
  border: 1px solid var(--line);
  color: var(--muted);
  flex-wrap: wrap;
  font-size: 13px;
  gap: 12px;
  padding: 12px;
}

.upload-progress {
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 12px;
}

.upload-progress-bar {
  background: rgba(255, 255, 255, 0.08);
  height: 8px;
  overflow: hidden;
}

.upload-progress-bar span {
  background: var(--accent);
  display: block;
  height: 100%;
  transition: width 160ms ease;
  width: 0%;
}

.upload-progress p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.empty-note {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.screenshot-list {
  display: grid;
  gap: 8px;
}

.screenshot-list-item {
  align-items: center;
  border: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(90px, 0.18fr) minmax(0, 1fr) auto;
  padding: 10px;
}

.screenshot-list-item span {
  font-size: 13px;
  font-weight: 800;
}

.screenshot-list-item small {
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-actions {
  flex-wrap: wrap;
  gap: 10px;
}

@keyframes scan {
  from {
    transform: translateX(-8%) rotate(-10deg);
  }

  to {
    transform: translateX(8%) rotate(-10deg);
  }
}

@media (max-width: 980px) {
  .mosaic-wall {
    height: auto;
  }

  .masonry-grid {
    column-count: 2;
  }

  .settings-form,
  .editor-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header,
  .admin-header,
  .panel-heading,
  .section-heading,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .site-header {
    position: absolute;
  }

  .nav-links {
    gap: 18px;
  }

  h1 {
    font-size: clamp(64px, 24vw, 112px);
  }

  .mosaic-wall {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .masonry-grid {
    column-count: 1;
  }

  .drawer {
    width: 100vw;
  }

  .drawer-stills {
    grid-template-columns: 1fr;
  }

  .drawer-stills img:nth-child(3n + 1) {
    grid-column: auto;
  }

  .form-row {
    align-items: stretch;
    flex-direction: column;
  }
}

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