:root {
  color-scheme: dark;
  --bg: #09090c;
  --surface: #111116;
  --surface-2: #17171e;
  --text: #f4f3f8;
  --muted: #a8a6b0;
  --line: rgba(255, 255, 255, .12);
  --accent-a: #865dff;
  --accent-b: #397bff;
  --gradient: linear-gradient(120deg, var(--accent-a), var(--accent-b));
  --max: 1180px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
button, a { color: inherit; }
button { font: inherit; }
img { display: block; max-width: 100%; }
a { text-decoration: none; }
:focus-visible { outline: 2px solid #9b82ff; outline-offset: 4px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .65rem 1rem; background: #fff; color: #000; }
.skip-link:focus { top: 1rem; }
.section-shell { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.mobile-only { display: initial; }
.eyebrow, .section-index, .work-kicker { margin: 0; letter-spacing: .16em; color: #aaa6b9; font-size: .78rem; font-weight: 700; }

.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; position: relative; padding-block: 5rem 2rem; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 17% -35% auto auto; width: 90vw; aspect-ratio: 1; border: 1px solid rgba(138, 100, 255, .17); border-radius: 50%; z-index: -1; }
.hero-glow { position: absolute; width: 80vw; height: 55vw; top: 24%; right: -28%; z-index: -2; background: radial-gradient(closest-side, rgba(86, 62, 229, .24), transparent); filter: blur(18px); }
.hero h1 { margin: .85rem 0 1.5rem; font-size: clamp(3.55rem, 18vw, 8.8rem); line-height: .82; letter-spacing: -.075em; font-weight: 800; }
.hero h1 span { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.58); }
.hero-copy { margin: 0; font-size: clamp(1.18rem, 5.6vw, 1.9rem); line-height: 1.55; font-weight: 600; letter-spacing: .02em; }
.hero-footer { margin-top: auto; padding-top: 4rem; display: flex; justify-content: space-between; align-items: end; font-size: .72rem; letter-spacing: .13em; color: var(--muted); }
.hero-footer p { margin: 0; }
.hero-footer span { writing-mode: vertical-rl; }

.about { padding-block: 7rem; border-top: 1px solid var(--line); }
.about-grid { margin-top: 1.5rem; }
.about h2, .works-intro h2 { margin: 0; font-size: clamp(2.5rem, 10vw, 5.5rem); line-height: 1.1; letter-spacing: -.05em; }
.about h2 span { background: var(--gradient); color: transparent; background-clip: text; -webkit-background-clip: text; }
.about-copy { margin-top: 2.2rem; color: #d1cfd7; }
.about-copy p { margin: 0 0 1.25rem; }

.category-nav { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.category-nav a { min-width: 0; padding: 1.5rem .35rem; display: flex; flex-direction: column; align-items: center; text-align: center; transition: background-color .2s ease; }
.category-nav a + a { border-left: 1px solid var(--line); }
.category-nav a:hover { background: rgba(255,255,255,.04); }
.category-icon { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; margin-bottom: .7rem; border-radius: 50%; background: var(--gradient); font-size: .85rem; }
.category-nav strong { font-size: .76rem; letter-spacing: .08em; }
.category-nav small { margin-top: .1rem; color: var(--muted); font-size: .67rem; white-space: nowrap; }

.works-intro { padding-block: 8rem 6rem; }
.works-intro h2 { margin-top: .5rem; }
.work-section { padding-bottom: 8rem; }
.section-heading { padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); }
.section-heading > div { display: flex; align-items: center; gap: .75rem; color: #b8b5c0; letter-spacing: .14em; font-size: .74rem; font-weight: 700; }
.section-heading p { margin: 0; }
.section-heading span { background: var(--gradient); color: transparent; background-clip: text; font-weight: 800; }
.section-heading h2 { margin: .55rem 0 0; font-size: clamp(2rem, 8vw, 4.5rem); line-height: 1.15; letter-spacing: -.04em; }
.work-block { padding-top: 3rem; }
.work-block + .work-block { margin-top: 6rem; padding-top: 4rem; border-top: 1px solid var(--line); }
.work-heading { max-width: 720px; }
.work-heading h3 { margin: .35rem 0 1rem; font-size: clamp(1.65rem, 6.6vw, 3rem); line-height: 1.3; letter-spacing: -.03em; }
.work-heading > p:last-child { margin: 0; color: var(--muted); }

.filter-tabs { display: flex; gap: .5rem; margin: 2rem 0 1.25rem; overflow-x: auto; scrollbar-width: none; }
.filter-tabs button { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: .55rem .85rem; background: transparent; font-size: .72rem; letter-spacing: .08em; cursor: pointer; }
.filter-tabs button span { color: var(--muted); }
.filter-tabs button.is-active { border-color: transparent; background: var(--gradient); }
.filter-tabs button.is-active span { color: #fff; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.gallery-button { display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--surface); cursor: zoom-in; }
.gallery-button img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; }
.photo-grid .gallery-button img { aspect-ratio: 3 / 2; }
.gallery-button[hidden] { display: none; }

.horizontal-gallery { display: flex; gap: .9rem; margin-top: 2rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-inline: contain; padding-bottom: .35rem; }
.horizontal-gallery::-webkit-scrollbar { display: none; }
.horizontal-gallery .gallery-button { flex: 0 0 84%; scroll-snap-align: start; }
.horizontal-gallery .gallery-button img { aspect-ratio: 16 / 10; }
.horizontal-gallery.portrait-gallery .gallery-button { flex-basis: 72%; }
.horizontal-gallery.portrait-gallery .gallery-button img { aspect-ratio: 4 / 5; }

.movie-list { display: grid; gap: 4.5rem; padding-top: 1.5rem; }
.movie-card h3, .app-copy h3 { margin: 0 0 .75rem; font-size: clamp(1.65rem, 6.2vw, 2.7rem); line-height: 1.25; }
.movie-card > p { margin: 0 0 1.5rem; color: var(--muted); }
.video-shell { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: #000; }
.video-shell iframe { width: 100%; height: 100%; border: 0; }
.video-load { width: 100%; height: 100%; border: 0; padding: 0; position: relative; background: #0f0f13; cursor: pointer; }
.video-load img { width: 100%; height: 100%; object-fit: cover; opacity: .74; }
.play-button { position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; width: 4rem; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: var(--gradient); box-shadow: 0 12px 35px rgba(0,0,0,.35); }
.video-fallback { margin: .75rem 0 0; font-size: .85rem; color: var(--muted); }
.video-fallback a { text-decoration: underline; text-underline-offset: .2em; }

.app-list { display: grid; gap: 5rem; padding-top: 1.5rem; }
.app-visual { border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.app-visual img { width: 100%; aspect-ratio: 16 / 11; }
.app-copy { padding-top: 1.4rem; }
.app-copy > p { margin: 0 0 1.5rem; color: var(--muted); }
.external-button { display: inline-flex; justify-content: center; align-items: center; min-height: 3.25rem; padding: .6rem 1.2rem; border-radius: 999px; background: var(--gradient); font-size: .9rem; font-weight: 700; }

.site-footer { padding-block: 2.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .7rem; letter-spacing: .06em; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--text); font-weight: 700; }

.lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 4rem 1rem 1.5rem; border: 0; background: rgba(5,5,8,.96); color: var(--text); }
.lightbox::backdrop { background: rgba(0,0,0,.9); }
.lightbox-close { position: fixed; top: max(1rem, env(safe-area-inset-top)); right: 1rem; z-index: 2; width: 2.75rem; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 50%; background: #17171e; cursor: pointer; font-size: 1.6rem; line-height: 1; }
.lightbox-media { height: calc(100% - 3rem); display: grid; place-items: center; }
.lightbox img { width: auto; max-width: 100%; height: auto; max-height: 100%; object-fit: contain; }
.lightbox p { margin: .75rem 0 0; text-align: center; color: var(--muted); font-size: .85rem; }

@media (width < 720px) {
  .hero {
    min-height: 0;
    padding-block: clamp(2.75rem, 10vw, 4rem) 1.75rem;
    overflow: clip;
  }
  .hero::before { width: min(70vw, 22rem); top: 8%; right: 0; }
  .hero-glow { width: 70vw; height: 48vw; top: 12%; right: 0; }
  .hero h1 {
    margin-bottom: 1.1rem;
    font-size: min(15.5vw, 6rem);
    line-height: .92;
  }
  .hero-footer { margin-top: 1.65rem; padding-top: 0; }
  .hero-footer span { writing-mode: horizontal-tb; }
  .about { padding-block: 3.5rem; }
}

@media (min-width: 720px) {
  .section-shell { width: min(100% - 72px, var(--max)); }
  .mobile-only { display: none; }
  .hero::before { width: min(72vw, 850px); right: -8%; top: 7%; }
  .hero h1 { font-size: clamp(6.5rem, 15vw, 10.4rem); }
  .about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 8vw; align-items: start; }
  .about-copy { margin-top: .25rem; font-size: 1.08rem; }
  .category-nav a { padding: 2rem; }
  .category-nav strong { font-size: .9rem; }
  .category-nav small { font-size: .76rem; }
  .photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
  .horizontal-gallery .gallery-button, .horizontal-gallery.portrait-gallery .gallery-button { flex-basis: calc((100% - 1.8rem) / 3); }
  .movie-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4rem 1.5rem; }
  .movie-card:first-child { grid-column: 1 / -1; }
  .movie-card:first-child .video-shell { max-width: 900px; }
  .app-card { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: center; }
  .app-card:nth-child(even) .app-visual { order: 2; }
  .app-card:nth-child(even) .app-copy { order: 1; }
  .app-copy { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
