@charset "UTF-8";

:root {
  color-scheme: dark;
  --night: #090c15;
  --white: #f0f2f5;
  --muted: #acb7c8;
  --ice: #97edf0;
  --line: #8594b34d;
  --gutter: clamp(24px, 6.2vw, 96px);
  --display: 'Source Han Sans SC', 'Microsoft YaHei', 'Noto Sans CJK SC', system-ui, sans-serif;
  font-family: system-ui, 'Microsoft YaHei', sans-serif;
  background: var(--night);
  color: var(--white);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3 { margin: 0; }
img { display: block; width: 100%; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--ice); outline-offset: 6px; }
.shell { width: min(calc(100% - var(--gutter) * 2), 1320px); margin-inline: auto; }
.skip { position: fixed; z-index: 9; top: 12px; left: 12px; transform: translateY(-150%); padding: 10px; background: var(--night); }
.skip:focus { transform: none; }

.masthead {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  border-bottom: 1px solid #c2cee04d;
}
.wordmark { font: 800 clamp(20px, 2.3vw, 33px)/1 'Arial Narrow', var(--display); letter-spacing: .07em; text-decoration: none; }
.wordmark span { color: var(--ice); margin-left: .075em; }
.masthead nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); }
.masthead nav a { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font-size: 15px; text-decoration: none; }
.masthead nav a:hover, .masthead nav a:focus-visible { color: var(--ice); }
.masthead nav a span { color: var(--ice); }
.rain-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 3px; border: 0; background: transparent; color: var(--white); font: inherit; font-size: 14px; cursor: pointer; }
.rain-toggle[hidden] { display: none; }
.rain-toggle::before { content: ''; width: 6px; height: 6px; border: 1px solid var(--muted); transform: rotate(45deg); }
.rain-toggle[aria-pressed='true']::before { border-color: var(--ice); background: var(--ice); }
.rain-toggle:is(:hover, :focus-visible) { color: var(--ice); }
.rain-toggle:focus-visible { outline: 2px solid var(--ice); outline-offset: 5px; }

.hero {
  --hero-height: clamp(580px, 94svh, 990px);
  position: relative;
  min-height: var(--hero-height);
  display: grid;
  isolation: isolate;
  background: var(--night);
  overflow: clip;
}
.stage, .rain, .stage-shade, .stage-light, .stage-trace { position: absolute; inset: 0; }
.stage { z-index: -1; overflow: hidden; }
.stage img { width: 100%; height: 100%; object-fit: cover; object-position: 64% 48%; }
.rain { width: 100%; height: 100%; pointer-events: none; }
.stage-shade {
  background:
    linear-gradient(0deg, #090c15 0%, #090c1536 8%, transparent 28%),
    linear-gradient(180deg, #090c15ba, transparent 25%),
    linear-gradient(90deg, #090c15d6 0%, #1010214d 25%, #10102115 60%, transparent);
}
.stage-light {
  background: radial-gradient(ellipse 280px 230px at var(--spot-x, 70%) var(--spot-y, 40%), #79bdf243, transparent 84%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity .22s ease-out;
}
.hero[data-lit] .stage-light { opacity: 1; }
.stage-trace { opacity: 0; transform-origin: 12% 100%; }
.scan-start .stage-trace {
  background: linear-gradient(160deg, transparent 48%, #b8faff6b 49.8%, #caeffa13 50.3%, transparent 51%);
  animation: sweep .55s ease-out both;
}
@keyframes sweep {
  0% { transform: translateY(27%); opacity: 0; }
  27% { opacity: .6; }
  100% { transform: translateY(-29%); opacity: 0; }
}

.hero-content {
  position: relative;
  min-height: var(--hero-height);
  display: flex;
  align-items: flex-end;
  padding-top: 90px;
  padding-bottom: clamp(58px, 12svh, 142px);
}
.hero-title { position: relative; z-index: 1; }
.hero h1 { font: 850 clamp(80px, 12vw, 198px)/.86 var(--display); letter-spacing: -.11em; margin-left: -.065em; text-shadow: 0 8px 35px #090b1499; }
.hero h1 span { display: block; margin: .56em 0 0 .37em; color: #d6e3ef; font-size: .31em; font-weight: 650; line-height: 1.08; letter-spacing: .27em; }
.hero-cut { position: absolute; left: 0; bottom: 27px; right: 0; height: 32px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); pointer-events: none; }
.hero-cut::after { content: ''; position: absolute; left: 0; bottom: -1px; width: min(24vw, 330px); height: 2px; background: linear-gradient(90deg, var(--ice), #97edf020); }
.enter {
  display: inline-flex;
  align-items: center;
  gap: clamp(22px, 4vw, 55px);
  min-height: 49px;
  margin-top: clamp(27px, 5svh, 56px);
  padding: 0 15px 0 19px;
  border: 1px solid #adc0d680;
  background: #0d1424a6;
  text-decoration: none;
  font-size: 15px;
  font-weight: 680;
  transition: border-color .18s, background-color .18s;
}
.enter span:last-child { color: var(--ice); font-size: 21px; }
.enter:hover { border-color: var(--ice); background: #243247; }

.work { position: relative; padding-block: clamp(43px, 7vw, 98px); scroll-margin: 18px; }
.work-heading { display: flex; align-items: center; gap: 20px; margin-bottom: clamp(22px, 3.5vw, 45px); }
.work-heading::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.work h2 { font: 760 clamp(38px, 5.5vw, 78px)/1 var(--display); letter-spacing: -.04em; }
.signal-track { position: absolute; inset: 16px 0 auto; height: 2px; transform: scaleX(0); transform-origin: left; background: var(--ice); opacity: 0; }
.firing .signal-track { animation: charge .65s ease-out both; }
@keyframes charge {
  0% { transform: scaleX(0); opacity: 0; }
  15% { opacity: .78; }
  75% { transform: scaleX(1); opacity: .8; }
  100% { transform: scaleX(1); opacity: 0; }
}
.project {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(255px, 38vw, 425px);
  overflow: hidden;
  border: 1px solid #a66d837d;
  background: #201021;
  text-decoration: none;
}
.project-visual { position: absolute; z-index: -1; inset: 0; background: linear-gradient(122deg, #211321 0 43%, #5a263c 43.1% 68%, #28152c 68.1%); }
.project-visual img { width: 100%; height: 100%; object-fit: contain; object-position: right center; transition: transform .32s ease-out; }
.project-visual::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, #170f1d 2%, #170f1dda 23%, #1e14238a 45%, #1e142306 73%); }
.project-copy { padding: clamp(24px, 4.6vw, 68px); }
.project h3 { font: 800 clamp(36px, 6.3vw, 86px)/1.06 var(--display); letter-spacing: -.048em; }
.project-open { display: inline-block; margin-top: 19px; color: #e7cbd4; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.project:is(:hover, :focus-visible) { border-color: #c2859a; }
.project:hover .project-visual img { transform: scale(1.028); }
.firing .project { animation: contact .45s .24s ease-out both; }
@keyframes contact { from { border-color: var(--ice); } to { border-color: #a66d837d; } }

.site-footer { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); padding-block: 21px 35px; color: var(--muted); font-size: 12px; }
.site-footer a { text-underline-offset: 4px; }

@media (min-width: 681px) {
  .hero-content { align-items: flex-start; padding-top: max(116px, calc(var(--hero-height) * .22)); }
}

@media (min-width: 681px) and (min-aspect-ratio: 2/1) {
  .stage img {
    max-width: calc(var(--hero-height) * 1.95);
    margin-inline: auto;
    object-position: center 54%;
    mask-image: linear-gradient(90deg, transparent, black 8% 92%, transparent);
  }
}

@media (max-width: 680px), (max-aspect-ratio: 3/2) {
  .stage img {
    translate: 0 18px;
    mask-image: linear-gradient(180deg, transparent, black 42px);
  }
}

@media (max-width: 680px) {
  .masthead { height: 58px; }
  .masthead nav a { font-size: 14px; }
  .hero { --hero-height: clamp(540px, 89svh, 790px); }
  .stage img { object-position: 72% 34%; }
  .stage-shade { background: linear-gradient(180deg, #090c15aa 0%, transparent 23%), linear-gradient(0deg, #090c15 0%, #090c15be 19%, #090c1540 45%, transparent 66%); }
  .hero h1 { font-size: clamp(75px, 16.5vw, 109px); }
  .hero-content { padding-bottom: 57px; }
  .hero h1 span { font-size: .34em; }
  .hero-cut { bottom: 19px; height: 20px; }
  .enter { margin-top: 24px; }
  .project { min-height: 315px; }
  .project-visual img { object-fit: cover; object-position: center 30%; }
  .project-visual::after { background: linear-gradient(0deg, #170f1d 2%, #170f1dcf 33%, #1e14231c 72%); }
}

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