:root {
  --bg: #07080a;
  --bg-raised: #0e1013;
  --text: #ebe8e1;
  --muted: #7d828a;
  --faint: #3b3f45;
  --line: rgba(235, 232, 225, 0.08);
  --neon: #ff2d55;
  --neon-glow: rgba(255, 45, 85, 0.45);
  --cyan: #3ef2ff;
  --display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid var(--neon); outline-offset: 4px; }
::selection { background: var(--neon); color: var(--bg); }

.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); position: relative; }
.mono { font: 400 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.jp { font-family: var(--jp); }
.neon { color: var(--neon); }

/* background: grid, scanlines, grain */
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 85%);
  opacity: 0.6;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.18) 0 1px, transparent 1px 3px);
  opacity: 0.35;
}
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 91; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* header */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; padding: 18px 0;
  background: linear-gradient(180deg, rgba(7,8,10,.9), rgba(7,8,10,0));
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { display: flex; align-items: center; gap: 10px; font: 600 15px/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; }
.wordmark .seal {
  display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--neon);
  color: var(--neon); font: 700 15px/1 var(--jp); box-shadow: 0 0 12px var(--neon-glow), inset 0 0 8px rgba(255,45,85,.2);
}
.site-header nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.site-header nav a { font: 400 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); transition: color .3s; }
.site-header nav a span { font-family: var(--jp); color: var(--faint); margin-right: 6px; transition: color .3s; }
.site-header nav a:hover, .site-header nav a:hover span { color: var(--neon); }
.clock { font: 400 11px/1 var(--mono); color: var(--muted); letter-spacing: .08em; }
.clock i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--neon); margin-right: 8px; box-shadow: 0 0 8px var(--neon); animation: blink 1.6s steps(1) infinite; vertical-align: 1px; font-style: normal; }
@keyframes blink { 50% { opacity: .2; } }

/* hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: 120px 0 clamp(40px, 7vh, 80px); overflow: hidden; }
.kanji {
  position: absolute; right: calc(var(--gutter) + 1vw); top: 50%; transform: translateY(-54%);
  writing-mode: vertical-rl; white-space: nowrap; font: 900 clamp(130px, 21vw, 340px)/0.9 var(--jp); letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1px rgba(255,45,85,.55); pointer-events: none; user-select: none;
  text-shadow: 0 0 40px rgba(255,45,85,.12);
}
.kanji .fill { color: var(--neon); -webkit-text-stroke: 0; text-shadow: 0 0 30px var(--neon-glow); }
.vertical-note {
  position: absolute; left: calc(var(--gutter) - 4px); top: 120px; writing-mode: vertical-rl;
  font: 400 12px/1 var(--jp); letter-spacing: .4em; color: var(--muted);
}
.hero .wrap { position: relative; }
.hero-meta { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-meta b { color: var(--text); font-weight: 400; }
.hero h1 {
  font: 600 clamp(54px, 11vw, 176px)/0.86 var(--display); letter-spacing: -0.045em; text-transform: uppercase;
  margin: 0 0 clamp(28px, 5vh, 48px); position: relative;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: inline-block; }
.hero h1 .outline { color: transparent; -webkit-text-stroke: 1.5px var(--text); }
.glitch { position: relative; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none; opacity: 0;
}
.glitch::before { color: var(--neon); transform: translate(-3px, 0); mix-blend-mode: screen; }
.glitch::after { color: var(--cyan); transform: translate(3px, 0); mix-blend-mode: screen; }
.glitch.on::before, .glitch.on::after { animation: glitch .35s steps(2) 2; }
@keyframes glitch {
  0% { clip-path: inset(10% 0 70% 0); opacity: .85; } 25% { clip-path: inset(60% 0 10% 0); }
  50% { clip-path: inset(30% 0 45% 0); } 75% { clip-path: inset(80% 0 5% 0); } 99% { clip-path: inset(0 0 90% 0); opacity: .85; } 100% { opacity: 0; }
}
.hero-foot {
  display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 32px; align-items: end;
  border-top: 1px solid var(--line); padding-top: 22px; position: relative;
}
.hero-foot::before { content: ""; position: absolute; left: 0; top: -1px; width: 72px; height: 1px; background: var(--neon); box-shadow: 0 0 10px var(--neon); }
.hero-foot p { margin: 0; color: var(--muted); font-size: 17px; max-width: 460px; }
.hero-foot p strong { color: var(--text); font-weight: 500; }
.hero-foot .tag { font: 400 clamp(20px, 2vw, 26px)/1.2 var(--display); letter-spacing: -0.01em; }
.hero-foot .tag em { font-style: normal; color: var(--neon); }

/* HUD corner brackets */
.hud { position: relative; }
.hud::before, .hud::after, .hud > .c1, .hud > .c2 {
  content: ""; position: absolute; width: 14px; height: 14px; border: 0 solid var(--neon); pointer-events: none; z-index: 2;
}
.hud::before { left: -1px; top: -1px; border-left-width: 1px; border-top-width: 1px; }
.hud::after { right: -1px; top: -1px; border-right-width: 1px; border-top-width: 1px; }
.hud > .c1 { left: -1px; bottom: -1px; border-left-width: 1px; border-bottom-width: 1px; }
.hud > .c2 { right: -1px; bottom: -1px; border-right-width: 1px; border-bottom-width: 1px; }

/* sections */
section { padding: clamp(96px, 15vh, 170px) 0; position: relative; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: clamp(36px, 6vh, 64px); border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.section-head h2 { margin: 0; display: flex; align-items: baseline; gap: 18px; font: 600 clamp(34px, 5vw, 64px)/1 var(--display); letter-spacing: -0.035em; text-transform: uppercase; }
.section-head h2 .jp { white-space: nowrap; font-size: 0.42em; font-weight: 500; color: var(--neon); letter-spacing: .1em; }

/* work index */
.index { list-style: none; margin: 0; padding: 0; }
.index li { position: relative; border-bottom: 1px solid var(--line); }
.row {
  position: relative; display: grid; grid-template-columns: 70px 1.3fr 90px 1fr 150px; gap: 20px; align-items: center;
  padding: clamp(20px, 3vh, 30px) 12px; color: var(--muted); overflow: hidden; isolation: isolate;
}
.row::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(255,45,85,.16), rgba(255,45,85,0) 70%);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
a.row:hover::before { transform: scaleX(1); }
.row .num { font: 400 12px/1 var(--mono); color: var(--neon); }
.row .name { font: 600 clamp(28px, 4vw, 52px)/1 var(--display); letter-spacing: -0.035em; text-transform: uppercase; color: var(--text); }
.row .jp { font-size: 15px; color: var(--muted); letter-spacing: .15em; }
.row .kind { font-size: 14px; }
.row .status { font: 400 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-align: right; }
.row .status.live { color: var(--text); }
.row .status.live::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--neon); margin-right: 8px; box-shadow: 0 0 8px var(--neon); animation: blink 1.6s steps(1) infinite; }
.row.dim .name { color: transparent; -webkit-text-stroke: 1px var(--faint); }
a.row:hover .name { color: var(--neon); text-shadow: 0 0 24px var(--neon-glow); }

.preview { position: fixed; left: 0; top: 0; z-index: 40; width: 300px; aspect-ratio: 4 / 3; pointer-events: none; opacity: 0; transform: scale(.85); }
.preview .frame { position: absolute; inset: 0; overflow: hidden; border: 1px solid rgba(255,45,85,.5); }
.preview img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.1) contrast(1.05); }
.preview .frame::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.25) 0 1px, transparent 1px 3px); }
.preview .mono { position: absolute; left: 0; top: -20px; color: var(--neon); }

/* featured */
.feature { padding-top: 0; }
.feature-media { aspect-ratio: 16 / 9; background: var(--bg-raised); border: 1px solid var(--line); }
.feature-media .inner { position: absolute; inset: 0; overflow: hidden; }
.feature-media img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; }
.feature-media .inner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,8,10,.1) 30%, rgba(7,8,10,.92) 100%), repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
}
.feature-top, .feature-caption { position: absolute; left: 0; right: 0; z-index: 1; display: flex; justify-content: space-between; gap: 16px; padding: clamp(16px, 3vw, 32px); }
.feature-top { top: 0; }
.feature-caption { bottom: 0; align-items: flex-end; }
.feature-caption h3 { margin: 6px 0 0; font: 600 clamp(40px, 7vw, 104px)/0.88 var(--display); letter-spacing: -0.045em; text-transform: uppercase; }
.feature-caption .jp { font-size: clamp(14px, 1.4vw, 18px); letter-spacing: .3em; color: var(--neon); writing-mode: vertical-rl; }
.feature-body { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 6vw, 96px); margin-top: clamp(28px, 5vh, 48px); }
.feature-body p { margin: 0; color: var(--muted); font-size: 17px; max-width: 520px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); align-self: start; }
.facts div { background: var(--bg); padding: 14px 16px; }
.facts b { display: block; font: 500 24px/1.1 var(--display); letter-spacing: -0.02em; margin-top: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 20px;
  font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--line); position: relative; overflow: hidden; isolation: isolate;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: color .35s var(--ease), border-color .35s, box-shadow .35s;
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--neon); transform: translateX(-101%); transition: transform .45s var(--ease); }
.btn:hover::before { transform: none; }
.btn.solid { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.solid:hover { color: var(--text); }
.btn.off { color: var(--faint); pointer-events: none; }

/* studio */
.definition { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 6vw, 96px); align-items: start; }
.definition .big-jp { white-space: nowrap; font: 900 clamp(96px, 14vw, 200px)/0.9 var(--jp); color: var(--neon); text-shadow: 0 0 40px var(--neon-glow); writing-mode: vertical-rl; letter-spacing: -0.02em; }
.definition .reading { font: 400 13px/1.8 var(--mono); color: var(--muted); margin-bottom: 18px; }
.definition .reading b { color: var(--text); font-weight: 400; }
.definition p.big { font: 500 clamp(28px, 3.8vw, 54px)/1.1 var(--display); letter-spacing: -0.03em; margin: 0; max-width: 900px; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: clamp(56px, 9vh, 104px); }
.principles div { background: var(--bg); padding: clamp(20px, 2.4vw, 32px); }
.principles .jp { color: var(--neon); font-size: 13px; letter-spacing: .2em; }
.principles h3 { font: 600 22px/1.15 var(--display); letter-spacing: -0.02em; text-transform: uppercase; margin: 12px 0 10px; }
.principles p { margin: 0; color: var(--muted); font-size: 15px; }

/* contact */
.contact { padding-bottom: clamp(64px, 10vh, 120px); }
.contact .mail {
  display: inline-block; margin-top: 20px; font: 600 clamp(34px, 7.4vw, 120px)/1 var(--display); letter-spacing: -0.045em;
  text-transform: lowercase; overflow-wrap: anywhere; transition: color .3s, text-shadow .3s;
}
.contact .mail em { font-style: normal; color: var(--neon); }
.contact .mail:hover { color: var(--neon); text-shadow: 0 0 30px var(--neon-glow); }

footer { border-top: 1px solid var(--line); padding: 24px 0 36px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer nav { display: flex; gap: 24px; }
footer a:hover { color: var(--neon); }

/* entrance states only with JS + motion */
.js [data-reveal] { opacity: 0; transform: translateY(24px); }
.js .hero h1 .line > span { transform: translateY(105%); }
.js .hero-foot, .js .hero-meta, .js .site-header, .js .kanji, .js .vertical-note { opacity: 0; }
.js .index .row { opacity: 0; }
.js .feature-media .inner { clip-path: inset(0 100% 0 0); }

@media (max-width: 900px) {
  .row { grid-template-columns: 44px 1fr auto; gap: 14px; padding-left: 4px; padding-right: 4px; }
  .row .jp, .row .kind { display: none; }
  .hero-foot { grid-template-columns: 1fr; gap: 18px; }
  .feature-body, .definition { grid-template-columns: 1fr; }
  .definition .big-jp { writing-mode: horizontal-tb; }
  .principles { grid-template-columns: 1fr; }
  .preview, .vertical-note, .clock { display: none; }
  .kanji { filter: opacity(.45); top: 38%; }
}
@media (max-width: 520px) {
  .site-header nav a span { display: none; }
  .hero h1 { font-size: 15.5vw; }
  .feature-media { aspect-ratio: 4 / 5; }
  .facts b { font-size: 19px; }
  .facts div { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .clock i, .row .status.live::before { animation: none; }
  .glitch.on::before, .glitch.on::after { animation: none; opacity: 0; }
  .row::before, .btn::before { transition: none; }
}
