@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/barlow-condensed-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #202137;
  background: #f8f8fb;
  --accent: #5b419f;
  --ink: #202137;
  --muted: #505466;
  --page-inset: clamp(20px, 4.4vw, 76px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
button, a { font: inherit; color: inherit; }
button { cursor: pointer; }
a { text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
p, h1, h2, figure { margin: 0; }
svg { display: block; }
.symbols, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.shell { height: 100dvh; display: grid; grid-template-rows: clamp(54px, 8.1dvh, 76px) minmax(0, 1fr); }
.topbar { display: flex; align-items: center; padding-inline: var(--page-inset); background: #fff; border-bottom: 1px solid #e1e1ec; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 30px/1 "Barlow Condensed", sans-serif; letter-spacing: .01em; }
.brand img { width: 39px; height: 39px; }
.brand-domain { color: var(--accent); }

.showcase {
  --image-share: 63.6%;
  --selector-accent: #6149a5;
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding-bottom: clamp(20px, 5dvh, 54px);
  background-image:
    linear-gradient(to right, #dfe2ef70 1px, transparent 1px),
    linear-gradient(to bottom, #dfe2ef70 1px, transparent 1px);
  background-size: 23px 23px;
}
.showcase[data-project="network"] {
  --accent: #126660;
}
.feature {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, var(--image-share)) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
.stage {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  min-height: 0;
  --board-top: 65%;
}
.artwork {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.stage-board {
  position: absolute;
  inset: var(--board-top) 4% 0 7px;
  isolation: isolate;
  background: linear-gradient(116deg, var(--stage-tint), var(--stage-shade));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%);
  transition: opacity .44s ease;
}
.stage-board::before,
.stage-board::after {
  content: "";
  position: absolute;
  inset: 0;
}
.stage-board::before {
  background-image: var(--stage-image);
  background-size: cover;
  background-position: center 40%;
  filter: blur(12px);
  opacity: .19;
  transform: scale(1.06);
}
.stage-board::after {
  background: radial-gradient(circle, var(--stage-line) 1px, transparent 1.35px) right top / 13px 13px;
  mask-image: linear-gradient(90deg, transparent 8%, #000 75%);
}
.stage-board[data-layer="canvas"] {
  --stage-tint: #e8e2f3;
  --stage-shade: #dbd1ed;
  --stage-line: #f5f0ff;
  --stage-image: url("assets/mukuro-future.webp");
}
.stage-board[data-layer="network"] {
  --stage-tint: #dcece8;
  --stage-shade: #c9e3dc;
  --stage-line: #ecfbf7;
  --stage-image: url("assets/lambo-future.webp");
}
.stage-board, .poster {
  opacity: 0;
  pointer-events: none;
}
.showcase[data-project="canvas"] [data-layer="canvas"],
.showcase[data-project="network"] [data-layer="network"] {
  opacity: 1;
}
.poster {
  position: absolute;
  inset: 0;
  transform: translateX(calc(-1 * clamp(18px, 4.4vw, 72px)));
  transition: opacity .48s ease, transform 1.45s cubic-bezier(.15, .55, .32, 1);
}
.showcase[data-project="canvas"] .poster[data-layer="canvas"],
.showcase[data-project="network"] .poster[data-layer="network"] {
  transform: translateX(0);
  transition-delay: .08s;
}
.poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}
.stage-marker {
  position: absolute;
  top: var(--board-top);
  right: calc(4% - clamp(18px, 1.72vw, 28px));
  width: clamp(12px, 1.28vw, 21px);
  height: clamp(12px, 1.28vw, 21px);
  background: #000;
}
.stage-brand {
  position: absolute;
  z-index: 1;
  bottom: clamp(14px, 3.52dvh, 34px);
  left: clamp(12px, 3.54vw, 60px);
  color: #4e4a61;
  font: 800 clamp(12px, 1.92dvh, 15px)/1 "Barlow Condensed", sans-serif;
  letter-spacing: .18em;
  word-spacing: .12em;
  writing-mode: vertical-rl;
  white-space: nowrap;
  pointer-events: none;
}
.video-trigger {
  position: absolute;
  z-index: 1;
  top: calc(var(--board-top) - clamp(32px, 6.1dvh, 54px));
  right: calc(4% + clamp(24px, 3vw, 54px));
  display: grid;
  gap: 5px;
  min-width: clamp(96px, 9.9vw, 168px);
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
}
.video-frame {
  --frame-cut: 14px;
  isolation: isolate;
  position: relative;
  display: grid;
  min-height: clamp(48px, 8.9dvh, 72px);
  place-items: center;
  background: #f8f8fb65;
  clip-path: polygon(0 0, calc(100% - var(--frame-cut)) 0, 100% var(--frame-cut), 100% 100%, 0 100%);
}
.video-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: currentColor;
  clip-path: polygon(evenodd, 0 0, calc(100% - var(--frame-cut)) 0, 100% var(--frame-cut), 100% 100%, 0 100%, 0 0, 1.5px 1.5px, 1.5px calc(100% - 1.5px), calc(100% - 1.5px) calc(100% - 1.5px), calc(100% - 1.5px) calc(var(--frame-cut) + .6px), calc(100% - var(--frame-cut) - .6px) 1.5px, 1.5px 1.5px);
}
.video-frame svg { width: 22px; height: 22px; fill: currentColor; }
.video-label {
  justify-self: end;
  padding: 2px 5px;
  background: #f8f8fbe8;
  font-size: 13px;
  font-weight: 700;
}
.video-trigger:hover { color: var(--accent); }
.video-trigger:focus-visible { outline-offset: 4px; }

.editorial {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  width: 100%;
  max-width: calc(460px + var(--page-inset));
  padding: clamp(27px, 5.1dvh, 59px) var(--page-inset) 16px 16px;
  text-align: right;
}
.editorial h1 {
  font-size: clamp(38px, 4.7vw, 80px);
  letter-spacing: -.04em;
  line-height: 1.06;
  font-weight: 800;
  text-wrap: balance;
}
@media (min-width: 601px) {
  .showcase[data-project="network"] .editorial h1 { font-size: clamp(32px, 3.75vw, 62px); }
}
.project-subtitle {
  margin-top: 10px;
  color: var(--accent);
  font: 800 clamp(18px, 1.7vw, 27px)/1.1 "Barlow Condensed", sans-serif;
  letter-spacing: .06em;
}
.domain {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.5vw, 27px);
  margin-top: clamp(16px, 3.5dvh, 38px);
  color: var(--muted);
  font-size: 14px;
}
.domain::after { content: ""; width: clamp(26px, 4.4vw, 72px); height: 1.5px; background: var(--accent); transform: rotate(-29deg); }
.description { margin: clamp(8px, 1.6dvh, 14px) 0 0 auto; max-width: 26em; color: var(--muted); font-size: clamp(16px, 1.16vw, 19px); line-height: 1.72; }
.actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 18px; margin-top: clamp(15px, 4dvh, 36px); }
.primary { display: inline-flex; align-items: center; gap: 7px; min-height: 43px; padding: 0 13px; border: 1px solid currentColor; color: var(--accent); background: #fff; font-size: 14px; font-weight: 700; }
.primary:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
.primary:focus-visible { outline-offset: 3px; }
.primary svg, .close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.detail-button { background: transparent; border: 0; min-height: 40px; padding: 0 2px; font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
.detail-button:hover { color: var(--accent); }

.catalog { width: var(--image-share); display: flex; justify-content: flex-end; padding-inline: 16px 3.2%; padding-top: 9px; }
.project-list { display: flex; gap: clamp(10px, 1.4vw, 20px); }
.project-select {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 106px;
  padding: 3px 3px 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
  font-size: 13px;
}
.project-select:hover { color: var(--selector-accent); }
.project-select[aria-pressed="true"] { color: var(--selector-accent); font-weight: 700; }
.project-thumb {
  display: block;
  width: clamp(44px, 7dvh, 64px);
  height: clamp(44px, 7dvh, 64px);
  object-fit: contain;
  border-radius: 5px;
  opacity: .8;
}
.project-select[aria-pressed="true"] .project-thumb { opacity: 1; outline: 2px solid var(--selector-accent); outline-offset: 2px; }
.project-select:hover .project-thumb { opacity: 1; }

dialog { width: min(560px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 0; color: var(--ink); background: #fff; }
dialog::backdrop { background: #171a2cc2; }
.dialog-inner { position: relative; padding: clamp(22px, 5vw, 38px); }
.dialog-inner h2 { padding-right: 42px; margin-bottom: 10px; font-size: 30px; }
.dialog-inner p, .dialog-inner li { color: var(--muted); line-height: 1.6; }
.dialog-inner ul { padding-left: 1.2em; margin: 14px 0 20px; }
.dialog-inner li + li { margin-top: 5px; }
.close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 38px; height: 38px; background: #f1f2f7; border: 0; }

@media (max-width: 880px) and (min-width: 601px) {
  .showcase { --image-share: 56%; }
  .editorial { padding-right: 22px; }
}
@media (min-width: 881px) {
  .poster[data-layer="canvas"] img { object-fit: cover; object-position: center top; }
}
@media (max-width: 600px) {
  .showcase { padding-bottom: clamp(10px, 2dvh, 19px); }
  .feature { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .stage { grid-column: 1; grid-row: 1; }
  .stage-brand { display: none; }
  .stage-marker { width: 9px; height: 9px; right: calc(4% - 4px); }
  .video-trigger { top: auto; bottom: 8px; right: 5%; min-width: 70px; gap: 2px; }
  .video-frame { --frame-cut: 8px; min-height: 38px; }
  .video-label { font-size: 12px; }
  .poster img { object-fit: cover; object-position: center 24%; }
  .editorial { grid-column: 1; grid-row: 2; justify-self: stretch; max-width: none; padding: 11px 16px 0; text-align: left; }
  .editorial h1 { font-size: clamp(27px, 5.6dvh, 43px); }
  .project-subtitle { margin-top: 3px; font-size: 16px; }
  .domain { justify-content: flex-start; margin-top: 7px; font-size: 13px; }
  .domain::after { display: none; }
  .description { margin: 5px 0 0; font-size: 14px; line-height: 1.45; }
  .actions { justify-content: flex-start; margin-top: 7px; }
  .primary { min-height: 37px; }
  .catalog { width: 100%; justify-content: center; }
}
@media (max-height: 510px) {
  .shell { grid-template-rows: 46px minmax(0, 1fr); }
  .brand img { width: 32px; height: 32px; }
  .showcase { padding-bottom: 5px; }
  .editorial { padding-top: 11px; padding-bottom: 0; }
  .editorial h1 { font-size: clamp(25px, 7dvh, 40px); }
  .project-subtitle, .domain, .description, .actions { margin-top: 5px; }
  .description { font-size: 14px; line-height: 1.4; }
  .primary, .detail-button { min-height: 33px; }
  .project-thumb { width: 37px; height: 37px; }
  .video-frame { min-height: 33px; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-board, .poster { transition: none; }
}
