:root {
  color-scheme: dark;
  --ink: #10120e;
  --field: #151812;
  --text: #f1f3e9;
  --quiet: #a5aa9d;
  --line: #363b30;
  --accent: #d1f48b;
  --gutter: clamp(22px, 6.15vw, 108px);
  --mono: "SFMono-Regular", "SF Mono", Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
p, h1, h2, dl, dd { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
::selection { color: var(--ink); background: var(--accent); }

.mono, .eyebrow { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; }
.accent { color: var(--accent); }
.skip-link { position: fixed; z-index: 5; top: 8px; left: 8px; padding: 10px; transform: translateY(-160%); background: var(--accent); color: var(--ink); }
.skip-link:focus { transform: none; }

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  height: 72px;
  padding-inline: var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--ink);
}
.wordmark { display: inline-flex; align-items: center; gap: 12px; font: 600 11px var(--mono); letter-spacing: .13em; white-space: nowrap; }
.wordmark img { width: 30px; height: 30px; }
.wordmark-detail { color: var(--quiet); font-weight: 400; }
.topbar nav { display: flex; align-items: center; gap: clamp(16px, 3.2vw, 48px); white-space: nowrap; }
.topbar nav a { padding-block: 10px; color: #c2c6ba; font-size: 13px; transition: color .2s; }
.topbar nav a:hover { color: var(--accent); }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(850px, calc(100svh - 72px));
  padding: 100px var(--gutter) 125px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-scene { position: absolute; z-index: -2; inset: 0 0 0 15%; overflow: hidden; }
.hero-scene img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 46%; animation: scene-arrive 1.5s ease-out both; }
.hero-scene::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(0deg, var(--ink), #10120e00 28%, #10120e00 85%, #10120e52),
    linear-gradient(90deg, var(--ink) 0%, #10120edb 10%, #10120e54 27%, transparent 45%, #10120e25 100%);
}
.hero-copy { position: relative; max-width: 55%; animation: title-arrive .75s ease-out both; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--accent); }
.signal { flex: 0 0 auto; display: inline-block; width: 6px; height: 6px; background: var(--accent); box-shadow: 0 0 12px #d1f48b66; }
.hero h1 { margin: 15px 0 20px -0.045em; font-size: clamp(94px, 12vw, 192px); font-weight: 780; letter-spacing: -.105em; line-height: 1.02; white-space: nowrap; }
.hero h1 span { color: var(--accent); font-family: var(--mono); font-size: .52em; margin-left: .13em; vertical-align: .08em; }
.hero-role { color: #ecf0e2; font-size: clamp(18px, 2vw, 28px); font-weight: 500; letter-spacing: .045em; }
.role-slash { color: var(--accent); margin-inline: .62em; font-family: var(--mono); font-weight: 400; }
.hero-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 35px; margin-top: 38px; padding: 12px 13px 12px 16px; border: 1px solid #a7b29077; background: #10120eaa; font-size: 13px; transition: background .25s, color .25s, border-color .25s; }
.hero-link span { color: var(--accent); font-size: 17px; line-height: 1; transition: transform .25s; }
.hero-link:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.hero-link:hover span { color: var(--ink); transform: translate(2px, 2px); }

.hero-rules { position: absolute; inset: 36px var(--gutter) 66px; pointer-events: none; color: #ebf4d369; }
.hero-rules i { position: absolute; width: 13px; height: 13px; border-style: solid; border-width: 0; }
.hero-rules i:nth-child(1) { left: 0; top: 0; border-top-width: 1px; border-left-width: 1px; }
.hero-rules i:nth-child(2) { right: 0; top: 0; border-top-width: 1px; border-right-width: 1px; }
.hero-rules i:nth-child(3) { left: 0; bottom: 0; border-bottom-width: 1px; border-left-width: 1px; }
.hero-rules i:nth-child(4) { right: 0; bottom: 0; border-bottom-width: 1px; border-right-width: 1px; }
.hero-footer { position: absolute; bottom: 29px; inset-inline: var(--gutter); display: flex; justify-content: space-between; gap: 14px; color: #ccd0c1; font-size: 10px; }
.hero-frame-divider { color: #88917e; margin-inline: .4em; }
@keyframes scene-arrive { from { transform: scale(1.035); opacity: .55; } to { transform: scale(1); opacity: 1; } }
@keyframes title-arrive { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.section-wrap { width: min(100% - var(--gutter) * 2, 1320px); margin-inline: auto; }
.section-index { display: flex; gap: 12px; align-items: center; width: fit-content; color: #b8bdb0; }
.section-index span:first-child { padding: 4px 7px; border: 1px solid #617048; }
.section-index span:last-child { letter-spacing: .19em; }
.work { padding-block: clamp(90px, 10vw, 164px); }
.project-header, .process-header { display: grid; grid-template-columns: 1.3fr minmax(230px, .7fr); align-items: end; gap: 35px 60px; }
.project-header { margin-block: 38px 43px; }
.project-brand { color: var(--accent); font-family: var(--mono); font-size: clamp(16px, 2.15vw, 30px); font-weight: 650; letter-spacing: .1em; }
.project-header h2, .process-header h2 { margin-top: 12px; font-size: clamp(44px, 6.2vw, 92px); line-height: 1.08; font-weight: 710; letter-spacing: -.075em; }
.project-summary, .process-header p { max-width: 28em; color: #c0c6b8; font-size: clamp(14px, 1.32vw, 18px); line-height: 1.95; text-wrap: pretty; }

.project-reel { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 2.37; padding: 0; overflow: hidden; background: #28231e; border: 1px solid #5b6650; }
.project-reel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 48% center; transition: transform .55s cubic-bezier(.2,.8,.25,1); }
.reel-mask { position: absolute; inset: 0; background: linear-gradient(0deg, #0a0b08b0 0%, transparent 37%, transparent 75%, #0a0b0860 100%); }
.project-reel:hover img { transform: scale(1.035); }
.reel-label { position: absolute; top: 20px; left: 22px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; background: #10120ed9; }
.play-icon { position: relative; display: grid; place-items: center; width: clamp(60px, 7vw, 96px); aspect-ratio: 1; color: var(--ink); background: var(--accent); border: 1px solid var(--accent); border-radius: 50%; transition: transform .25s, background .25s; }
.play-icon svg { margin-left: 3px; }
.project-reel:hover .play-icon { transform: scale(1.08); background: #ecffc5; }
.reel-caption { position: absolute; bottom: 18px; inset-inline: 22px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.project-facts { display: grid; grid-template-columns: 1fr 1.6fr; border-bottom: 1px solid var(--line); }
.project-facts div { display: flex; flex-wrap: wrap; gap: 5px 15px; padding: 18px 0; align-items: baseline; }
.project-facts dt { color: var(--quiet); font-size: 12px; }
.project-facts dd { color: var(--text); font-size: 14px; line-height: 1.6; }

.process { border-block: 1px solid var(--line); padding-block: clamp(82px, 9vw, 145px); background: var(--field); }
.process-header { margin-block: 38px 46px; }
.process-header h2 { margin: 0; font-size: clamp(40px, 5.2vw, 79px); line-height: 1.12; }
.frame-viewer { overflow: hidden; border: 1px solid #535c48; background: #11140e; }
.frame-screen { position: relative; background: #080a07; aspect-ratio: 2.37; overflow: hidden; }
.frame-screen img { width: 100%; height: 100%; object-fit: cover; }
.frame-hud { position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; gap: 10px; padding: 16px 19px; color: #f1f3e9; background: linear-gradient(0deg, #0c0f08df, transparent); }
.frame-hud b { color: var(--accent); }
.frame-controls { padding: 0 clamp(16px, 3vw, 42px) 21px; border-top: 1px solid #535c48; }
.frame-buttons { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.frame-buttons button { display: flex; align-items: center; gap: clamp(6px, 1.2vw, 16px); padding: 15px clamp(7px, 2vw, 20px); border: 0; border-bottom: 2px solid transparent; background: transparent; color: #ced2c5; font-size: 14px; text-align: left; white-space: nowrap; }
.frame-buttons button + button { border-left: 1px solid var(--line); }
.frame-buttons button span { color: var(--quiet); }
.frame-buttons button:hover { background: #1d2417; }
.frame-buttons button[aria-pressed="true"] { border-bottom-color: var(--accent); background: #1f2817; color: var(--accent); }
.frame-buttons button[aria-pressed="true"] span { color: var(--accent); }
.frame-note { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 17px; }
.frame-note p { color: #c3c7ba; font-size: 14px; line-height: 1.75; }
.text-button { min-height: 42px; flex: 0 0 auto; padding: 7px 0 7px 9px; border: 0; background: none; color: var(--accent); font-size: 13px; }
.text-button span { margin-left: 7px; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.frame-credit { margin-top: 13px; color: var(--quiet); }
.frame-credit span { margin-inline: .25em; }

.about { padding-top: clamp(82px, 9vw, 145px); }
.about-body { display: grid; grid-template-columns: 1.3fr minmax(230px, .7fr); gap: 26px 60px; align-items: center; padding-block: 45px clamp(76px, 9vw, 140px); }
.about-body h2 { font-size: clamp(66px, 10vw, 154px); font-weight: 760; line-height: 1; letter-spacing: -.11em; }
.about-body h2 span { margin-left: .15em; font-family: var(--mono); font-size: .65em; }
.about-intro { margin-bottom: 13px; color: var(--text); font-size: clamp(20px, 2.1vw, 29px); font-weight: 600; }
.about-body p + p { max-width: 35em; color: var(--quiet); font-size: 15px; line-height: 1.95; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0 30px; border-top: 1px solid var(--line); color: var(--quiet); }
.footer-divider { margin-inline: .6em; color: var(--accent); }
.footer a { flex: 0 0 auto; padding: 8px 0; font-size: 13px; color: var(--text); }
.footer a:hover, .footer a span { color: var(--accent); }

dialog { width: min(1040px, calc(100% - 36px)); max-height: calc(100% - 36px); padding: 0; border: 1px solid #535c48; background: #13160f; color: var(--text); }
dialog::backdrop { background: #080a06ed; backdrop-filter: blur(6px); }
.player-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 15px 10px 18px; }
.player-head h2 { font-size: clamp(14px, 2vw, 18px); font-weight: 600; }
#close-player { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); background: var(--ink); color: var(--accent); font-size: 26px; line-height: 1; }
#close-player:hover { border-color: var(--accent); }
#film { display: block; width: 100%; max-height: 74dvh; aspect-ratio: 16 / 9; background: black; }
#player-message { padding: 14px 18px; color: var(--quiet); font-size: 13px; }
#player-message a { color: var(--accent); text-decoration: underline; margin-left: .4em; }

@media (max-width: 750px) {
  .topbar { height: 60px; gap: 14px; }
  .wordmark { gap: 8px; }
  .wordmark img { width: 26px; height: 26px; }
  .wordmark-detail { display: none; }
  .topbar nav a { font-size: 12px; }
  .hero { min-height: max(600px, calc(100svh - 60px)); align-items: flex-end; padding-block: 245px 112px; }
  .hero-scene { inset: 0 0 13%; }
  .hero-scene img { object-position: 52% top; }
  .hero-scene::after { background: linear-gradient(0deg, var(--ink), #10120eee 17%, #10120e4d 47%, transparent 65%, #10120e25 100%); }
  .hero-copy { max-width: 100%; }
  .hero h1 { font-size: clamp(80px, 19vw, 132px); margin-block: 12px 13px; }
  .hero-link { margin-top: 24px; }
  .hero-rules { inset-block: 25px 55px; }
  .hero-footer { bottom: 23px; font-size: 9px; letter-spacing: .07em; }
  .hero-frame-divider { margin-inline: .18em; }
  .project-header, .process-header, .about-body { grid-template-columns: 1fr; gap: 20px; }
  .project-header, .process-header { margin-block: 29px 30px; }
  .project-reel, .frame-screen { aspect-ratio: 16 / 10; }
  .reel-label { top: 12px; left: 12px; font-size: 9px; }
  .reel-caption { bottom: 12px; inset-inline: 12px; }
  .project-facts { grid-template-columns: 1fr; padding: 8px 0; }
  .project-facts div { padding: 7px 0; }
  .frame-hud { padding: 11px 12px; }
  .frame-hud .mono { font-size: 9px; }
  .frame-note { align-items: flex-start; flex-direction: column; gap: 6px; }
  .text-button { padding-left: 0; }
  .footer .mono { font-size: 9px; letter-spacing: .07em; }
}

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