:root {
  --bg: #f6f2ea;
  --bg-soft: #ebe4d5;
  --paper: #fbfaf5;
  --ink: #171717;
  --soft: #4a4740;
  --muted: #8a8378;
  --line: #d8d0bf;
  --accent: #171717;
  --warm: #b98a52;
  --pad-x: clamp(20px, 5vw, 78px);
  --max: 1240px;
  --serif: "Noto Serif SC", "Songti SC", serif;
  --serif-en: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", "Noto Sans SC", "PingFang SC", sans-serif;
  --ease: cubic-bezier(.22, .9, .34, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(23,23,23,.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23,23,23,.025) 1px, transparent 1px);
  background-size: 7vw 7vw;
}
a { color: inherit; text-decoration: none; }
img, video, iframe { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
::selection { background: var(--ink); color: var(--bg); }

.cursor {
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
  transform: translate3d(calc(var(--cx, 50vw) - 50%), calc(var(--cy, 50vh) - 50%), 0);
  transition: width .24s var(--ease), height .24s var(--ease), opacity .24s var(--ease);
  mix-blend-mode: difference;
}
body.is-hovering .cursor { width: 48px; height: 48px; }

.nav {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 24px var(--pad-x);
  transition: padding .35s var(--ease), background .35s var(--ease), border .35s var(--ease);
}
.nav.is-scrolled {
  padding-top: 14px;
  padding-bottom: 14px;
  background: rgba(246, 242, 234, .86);
  border-bottom: 1px solid rgba(216, 208, 191, .72);
}
.nav__brand {
  display: grid;
  gap: 2px;
  min-width: 190px;
}
.nav__brand span {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .18em;
}
.nav__brand small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.nav__links {
  display: flex;
  gap: clamp(16px, 3vw, 42px);
  color: var(--soft);
  font-size: 13px;
  letter-spacing: .14em;
}
.nav__links a {
  position: relative;
  transition: color .25s var(--ease), transform .25s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease);
}
.nav__links a:hover { color: var(--ink); transform: translateY(-2px); }
.nav__links a:hover::after { transform: scaleX(1); }

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 132px var(--pad-x) 84px;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(230px, .65fr);
  gap: clamp(42px, 7vw, 100px);
  align-items: end;
}
.eyebrow {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .35em;
  text-transform: uppercase;
}
.hero__title {
  margin: 0;
  display: grid;
  gap: 6px;
  line-height: .9;
}
.hero__title span {
  font-family: var(--serif);
  font-size: clamp(58px, 10.8vw, 156px);
  font-weight: 600;
  letter-spacing: .04em;
}
.hero__title em {
  color: var(--soft);
  font-family: var(--serif-en);
  font-size: clamp(42px, 7.2vw, 104px);
  font-style: italic;
  font-weight: 500;
  letter-spacing: .03em;
}
.hero__slogan {
  margin: 38px 0 0;
  color: var(--soft);
  font-family: var(--serif);
  font-size: clamp(16px, 1.6vw, 22px);
  letter-spacing: .22em;
}
.hero__card {
  display: grid;
  gap: 22px;
  justify-items: end;
  text-align: right;
}
.hero__card span {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 12px 34px;
  font-family: var(--serif-en);
  font-size: clamp(56px, 8vw, 118px);
  line-height: 1;
}
.hero__card p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  letter-spacing: .16em;
}
.scroll-cue {
  position: absolute;
  left: var(--pad-x);
  bottom: 40px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .32em;
}
.scroll-cue::after {
  content: "";
  display: inline-block;
  width: 60px;
  height: 1px;
  margin-left: 14px;
  vertical-align: middle;
  background: var(--muted);
  transform-origin: left;
  animation: linePulse 2.2s var(--ease) infinite;
}
@keyframes linePulse {
  0%, 100% { transform: scaleX(.2); opacity: .45; }
  50% { transform: scaleX(1); opacity: 1; }
}

.section-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(90px, 12vw, 150px) var(--pad-x) 54px;
  display: flex;
  align-items: flex-end;
  gap: 28px;
  border-top: 1px solid var(--line);
}
.section-head > span {
  color: var(--muted);
  font-family: var(--serif-en);
  font-style: italic;
  letter-spacing: .18em;
}
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(32px, 4.8vw, 58px);
  font-weight: 600;
  letter-spacing: .16em;
  line-height: 1.1;
}
.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: var(--serif-en);
  font-size: 17px;
  font-style: italic;
  letter-spacing: .2em;
}

.about__grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(80px, 10vw, 130px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
  gap: clamp(34px, 7vw, 94px);
  align-items: start;
}
.about__copy {
  display: grid;
  gap: 24px;
  color: var(--soft);
  font-size: clamp(15px, 1.25vw, 18px);
}
.about__copy p { margin: 0; }
.skill-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
}
.skill-strip span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  color: var(--soft);
  font-size: 12px;
  letter-spacing: .08em;
  background: rgba(255,255,255,.32);
}
.uni-card {
  margin: 0;
  display: grid;
  gap: 18px;
}
.uni-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(.88) contrast(.98);
}
.uni-card figcaption {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

.contents {
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding: 84px 0;
  overflow: hidden;
  background: #f8f6f1;
}
.contents__top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--pad-x);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .34em;
}
.contents__rail {
  display: flex;
  gap: clamp(18px, 3vw, 44px);
  padding: 118px var(--pad-x) 54px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.contents__rail::-webkit-scrollbar { height: 7px; }
.contents__rail::-webkit-scrollbar-thumb { background: var(--ink); }
.index-card {
  position: relative;
  flex: 0 0 clamp(240px, 27vw, 430px);
  min-height: clamp(320px, 42vw, 520px);
  padding: 24px;
  scroll-snap-align: center;
  background: var(--theme, var(--paper));
  border: 1px solid rgba(23,23,23,.18);
  overflow: hidden;
  display: grid;
  align-content: end;
  transition: transform .55s var(--ease), filter .55s var(--ease);
}
.index-card:nth-child(2n) { margin-top: 58px; }
.index-card:hover {
  transform: translateY(-18px) scale(1.045);
  filter: saturate(1.04);
}
.index-card::before {
  content: attr(data-no);
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 2;
  padding: 6px 11px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.index-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.42));
}
.index-card__visual {
  position: absolute;
  inset: 0;
  opacity: .78;
}
.index-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 28px;
}
.index-card__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(23,23,23,.1);
  font-family: var(--serif-en);
  font-size: clamp(80px, 14vw, 220px);
  font-style: italic;
}
.index-card__text {
  position: relative;
  z-index: 2;
  color: #fff;
  text-shadow: 0 1px 14px rgba(0,0,0,.38);
}
.index-card__text h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.15;
}
.index-card__text p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

.category-jump {
  max-width: var(--max);
  margin: 0 auto 34px;
  padding: 0 var(--pad-x);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.category-jump a {
  border: 1px solid var(--line);
  padding: 9px 14px;
  color: var(--soft);
  font-size: 12px;
  letter-spacing: .12em;
  transition: background .28s var(--ease), color .28s var(--ease), transform .28s var(--ease);
}
.category-jump a:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }

.work-section {
  position: relative;
  padding: clamp(82px, 11vw, 145px) var(--pad-x);
  background: linear-gradient(90deg, color-mix(in srgb, var(--theme, #d8cbb8) 58%, #f6f2ea), var(--bg));
  border-top: 1px solid var(--line);
}
.work-section__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr);
  gap: clamp(34px, 7vw, 94px);
  align-items: center;
}
.work-section:nth-child(even) .work-section__inner {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
}
.work-section:nth-child(even) .work-copy { grid-column: 2; }
.work-section:nth-child(even) .work-media { grid-column: 1; grid-row: 1; }
.work-copy .work-no {
  color: var(--ink);
  font-family: var(--serif-en);
  font-size: clamp(58px, 8vw, 110px);
  font-style: italic;
  line-height: .9;
}
.work-copy .work-type {
  margin: 16px 0 10px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.work-copy h3 {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-size: clamp(34px, 5.2vw, 72px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: .04em;
}
.work-copy p {
  margin: 0;
  color: var(--soft);
  font-size: clamp(14px, 1.18vw, 17px);
}
.work-media {
  display: grid;
  gap: 18px;
}
.media-feature {
  min-height: clamp(300px, 44vw, 560px);
  border: 1px solid rgba(23,23,23,.18);
  background: rgba(255,255,255,.22);
  overflow: hidden;
}
.media-feature img,
.media-feature video,
.media-feature iframe {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: contain;
}
.media-feature iframe { border: 0; background: #000; }
.media-embed {
  position: relative;
  background:
    linear-gradient(180deg, rgba(0,0,0,.03), rgba(0,0,0,.32)),
    var(--poster),
    linear-gradient(135deg, color-mix(in srgb, var(--theme, #d8cbb8) 78%, #fff), #f8f6f1 72%);
  background-size: cover;
  background-position: center;
  transform: translateY(12px) scale(.985);
  opacity: .78;
  transition: opacity .7s var(--ease), transform .75s var(--ease), filter .75s var(--ease);
}
.media-embed.is-media-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.media-embed.has-poster {
  filter: saturate(.92) contrast(.98);
}
.media-embed.no-poster::before {
  content: "VIDEO";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(23,23,23,.12);
  font-family: var(--serif-en);
  font-size: clamp(58px, 9vw, 140px);
  font-style: italic;
  letter-spacing: .08em;
}
.embed-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: linear-gradient(180deg, rgba(23,23,23,.08), rgba(23,23,23,.22));
  color: #fff;
  text-align: center;
  cursor: pointer;
  transition: background .3s var(--ease), transform .3s var(--ease), backdrop-filter .3s var(--ease);
}
.media-embed.no-poster .embed-play {
  color: var(--ink);
  background: rgba(246,242,234,.24);
}
.embed-play span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.embed-play strong {
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.8);
  font-size: 13px;
  letter-spacing: .08em;
  background: rgba(23,23,23,.14);
}
.media-embed.no-poster .embed-play strong {
  border-color: rgba(23,23,23,.38);
  background: rgba(255,255,255,.32);
}
.media-embed:hover .embed-play {
  background: rgba(23,23,23,.32);
}
.media-embed.no-poster:hover .embed-play {
  background: rgba(246,242,234,.38);
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.media-tile {
  position: relative;
  min-height: 190px;
  border: 1px solid rgba(23,23,23,.16);
  background: rgba(255,255,255,.26);
  overflow: hidden;
}
.media-tile img,
.media-tile video,
.media-tile iframe {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: contain;
}
.media-tile iframe { border: 0; background: #000; }
.video-label {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  background: rgba(246,242,234,.9);
  padding: 5px 9px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
}
.empty-cover {
  height: 100%;
  min-height: inherit;
  display: grid;
  place-items: center;
  padding: 28px;
  color: rgba(23,23,23,.36);
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 70px);
  text-align: center;
}

.gamejam__body {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(82px, 11vw, 140px);
}
.gamejam__body > p {
  width: min(760px, 100%);
  color: var(--soft);
  margin: 0 0 34px;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.contact {
  min-height: 78svh;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 100px var(--pad-x);
  text-align: center;
  background: var(--ink);
  color: var(--bg);
}
.contact h2 {
  width: min(900px, 100%);
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(38px, 6.2vw, 86px);
  font-weight: 500;
  line-height: 1.12;
}
.contact__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 34px;
  color: rgba(246,242,234,.74);
  font-size: 13px;
  letter-spacing: .12em;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .72s var(--ease), transform .82s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@supports not (background: color-mix(in srgb, white, black)) {
  .work-section { background: var(--bg-soft); }
}

@media (max-width: 880px) {
  .cursor { display: none; }
  .nav { align-items: flex-start; }
  .nav__links { gap: 14px; font-size: 11px; }
  .hero__grid,
  .about__grid,
  .work-section__inner,
  .work-section:nth-child(even) .work-section__inner {
    grid-template-columns: 1fr;
  }
  .work-section:nth-child(even) .work-copy,
  .work-section:nth-child(even) .work-media {
    grid-column: auto;
    grid-row: auto;
  }
  .hero__card { justify-items: start; text-align: left; }
  .contents__rail { padding-top: 70px; }
  .video-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .nav { padding: 18px 16px; }
  .nav__links a:nth-child(2),
  .nav__links a:nth-child(4) { display: none; }
  .hero,
  .section-head,
  .about__grid,
  .gamejam__body,
  .category-jump,
  .work-section {
    padding-left: 16px;
    padding-right: 16px;
  }
  .hero__title span { font-size: clamp(44px, 14vw, 76px); }
  .hero__title em { font-size: clamp(36px, 13vw, 68px); }
  .contents__top { padding-left: 16px; padding-right: 16px; letter-spacing: .16em; }
  .media-grid { grid-template-columns: 1fr; }
}
