:root {
  color-scheme: light;
  --paper: #f7f7f5;
  --ink: #080808;
  --lime: #e7f53d;
  --ease: cubic-bezier(.2,.75,.25,1);
  font-family: Arial, Helvetica, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; scroll-snap-type: y mandatory; }
body { margin: 0; min-height: 100vh; background: var(--paper); overflow-x: hidden; scroll-snap-type: y mandatory; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.view { display: none; }
.view.is-active { display: block; }
.snap-panel { scroll-snap-align: start; scroll-snap-stop: always; }
.pill-button {
  display: inline-flex; justify-content: center; align-items: center;
  min-height: 66px; padding: 10px 25px; border: 0; border-radius: 999px;
  background: #050505; color: #fff; font-size: clamp(17px, 1.95vw, 37px);
  font-weight: 700; letter-spacing: .035em; line-height: 1; white-space: nowrap;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.pill-button:hover, .pill-button:focus-visible { transform: scale(1.075); background: var(--lime); color: #080808; outline: none; }
.home-return {
  position: fixed; z-index: 30; top: 24px; left: clamp(20px, 3vw, 54px);
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 17px;
  border-radius: 999px; background: #080808; color: #fff; font-size: 12px;
  font-weight: 700; letter-spacing: .08em; opacity: 0; visibility: hidden;
  transform: translateY(-8px); transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.home-return span:first-child { font-size: 17px; line-height: .8; }
.home-return.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.home-return:hover, .home-return:focus-visible { background: var(--lime); color: var(--ink); outline: none; }
body[data-route="detail"] .home-return { left: auto; right: clamp(20px, 3vw, 54px); }
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: var(--paper); }
.hero-reference { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-top-mask { position: absolute; z-index: 1; inset: 0 0 auto; height: 25%; background: var(--paper); }
.hero-name { position: absolute; z-index: 2; top: 11.9%; left: 5.6%; margin: 0; font-size: clamp(27px, 2.7vw, 52px); font-weight: 700; letter-spacing: .005em; }
.hero-nav { position: absolute; z-index: 2; top: 11.4%; right: 8.25%; display: flex; align-items: center; gap: clamp(15px, 1.65vw, 32px); }
.hero-nav .pill-button { min-height: 66px; padding-inline: clamp(17px, 1.4vw, 27px); }

.video-chapter {
  position: relative; display: grid; place-items: center; width: 100%;
  height: 100svh; min-height: 560px; padding: 70px 24px; background: #fff; overflow: hidden;
}
.chapter-kicker, .chapter-bottom {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 14px;
  margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .11em;
}
.chapter-kicker { top: 31px; left: clamp(22px, 4vw, 72px); }
.chapter-kicker span { color: #888; }
.chapter-video { max-width: min(84vw, 1160px); max-height: 77vh; width: auto; height: auto; object-fit: contain; border-radius: 23px; background: #f4f4f2; box-shadow: 0 18px 54px #00000019; }
.chapter-bottom { right: clamp(22px, 4vw, 72px); bottom: 32px; left: clamp(22px, 4vw, 72px); justify-content: space-between; }
.chapter-bottom a { display: flex; align-items: center; gap: 12px; }
.chapter-bottom a:hover { color: #657000; }

.projects-view { min-height: 100svh; padding: 14px clamp(16px, 1.7vw, 32px) 28px; background: #fff; }
.projects-header { height: 58px; display: flex; align-items: center; justify-content: space-between; }
.brand-mark { font-size: clamp(30px, 3.2vw, 55px); font-weight: 900; letter-spacing: -.1em; line-height: .8; }
.projects-header-right { display: flex; align-items: center; gap: 26px; }
.micro-label, .eyebrow, .projects-footnote { font-size: 9px; font-weight: 700; letter-spacing: .11em; }
.projects-header .pill-button { min-height: 41px; padding: 10px 20px; font-size: 15px; }
.projects-intro { display: flex; align-items: end; justify-content: space-between; margin: 16px 0 19px; }
.eyebrow { margin: 0 0 6px; color: #727272; }
.projects-intro h1 { margin: 0; font-size: clamp(27px, 3.3vw, 52px); line-height: .95; font-weight: 600; letter-spacing: -.055em; }
.projects-intro h1 span { display: inline-block; margin-left: 13px; vertical-align: top; font-size: 11px; font-weight: 500; letter-spacing: 0; color: #858585; }
.project-grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  grid-template-rows: minmax(0, 1.1fr) minmax(0, .9fr); gap: 15px;
  width: 100%; height: clamp(540px, 72vh, 930px);
  transition: grid-template-columns .48s var(--ease), grid-template-rows .48s var(--ease);
}
.project-card {
  position: relative; display: block; min-width: 0; min-height: 0; overflow: hidden;
  padding: 0; border: 1px solid #e9e9e9; border-radius: 19px; background: #ededeb;
  text-align: left; color: #080808; isolation: isolate;
}
.project-card-one { grid-area: 1 / 1; border: 4px solid var(--lime); box-shadow: 0 0 0 1px #c8d629, 0 6px 24px #bdc72e45; }
.project-card-two { grid-area: 1 / 2; background: #d2d2d0; }
.project-card-three { grid-area: 2 / 1; background: #090909; color: #f7f7f5; }
.project-card-four { grid-area: 2 / 2; background: #e6f33b; }
.project-grid:has(.project-card-one:hover) { grid-template-columns: 1.32fr .68fr; grid-template-rows: 1.32fr .68fr; }
.project-grid:has(.project-card-two:hover) { grid-template-columns: .68fr 1.32fr; grid-template-rows: 1.32fr .68fr; }
.project-grid:has(.project-card-three:hover) { grid-template-columns: 1.32fr .68fr; grid-template-rows: .68fr 1.32fr; }
.project-grid:has(.project-card-four:hover) { grid-template-columns: .68fr 1.32fr; grid-template-rows: .68fr 1.32fr; }
.project-card:focus-visible { outline: 3px solid #111; outline-offset: 3px; }
.poster, .card-video { position: absolute; inset: 0; width: 100%; height: 100%; }
.poster { display: flex; align-items: center; justify-content: center; transition: opacity .25s ease; }
.poster-one { background: #dadbd6; }
.poster-one img { height: 88%; max-width: 85%; width: auto; object-fit: contain; border-radius: 10px; }
.poster-note { position: absolute; top: 20px; left: 20px; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.poster-kicker { position: absolute; top: 20px; left: 21px; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.poster strong { font-size: clamp(42px, 7vw, 120px); line-height: .77; font-weight: 800; letter-spacing: -.085em; }
.poster-two { background: #d2d2d0; }
.poster-two strong { color: #111; }
.poster-symbol { position: absolute; right: 6%; bottom: 1%; font-size: clamp(100px, 17vw, 275px); line-height: .8; font-weight: 400; }
.poster-two .poster-symbol { color: #e7f53d; }
.poster-three { background-color: #080808; background-image: radial-gradient(#999 1px, transparent 1.5px); background-size: 34px 34px; color: #f6f6f3; justify-content: flex-start; padding-left: 8%; }
.poster-three strong { font-size: clamp(44px, 6vw, 96px); }
.poster-three .poster-symbol { color: #b7b7b7; font-size: 70px; right: 8%; top: 12%; bottom: auto; }
.poster-four { background: #e6f33b; justify-content: flex-start; padding-left: 8%; }
.poster-four strong { font-size: clamp(45px, 6.7vw, 110px); }
.poster-four .poster-symbol { color: #101010; font-size: clamp(80px, 12vw, 180px); }
.card-video { z-index: 1; object-fit: contain; opacity: 0; background: transparent; transition: opacity .25s ease; }
.project-card.is-playing .card-video { opacity: 1; }
.project-card.is-playing .poster { opacity: 0; }
.best-badge {
  position: absolute; z-index: 3; top: 16px; right: 16px; display: inline-flex;
  align-items: center; gap: 7px; padding: 8px 11px; border-radius: 999px;
  background: var(--lime); color: #080808; font-size: 9px; font-weight: 800; letter-spacing: .08em;
}
.best-badge svg { width: 15px; height: 15px; fill: currentColor; }
.project-card-footer {
  position: absolute; z-index: 3; right: 17px; bottom: 16px; left: 17px;
  display: flex; justify-content: space-between; gap: 12px; font-size: 9px;
  font-weight: 700; letter-spacing: .11em; text-shadow: 0 1px 8px #ffffff6b;
}
.project-card-three .project-card-footer { color: #fff; text-shadow: 0 1px 8px #000; }
.project-card-four .project-card-footer { color: #111; }
.projects-footnote { display: flex; gap: 8px; margin: 13px 1px 0; color: #777; }
.projects-footnote span { color: #c9d524; }

.detail-view { position: relative; display: grid; place-items: center; width: 100%; min-height: 100svh; padding: 88px 24px 35px; background: #fff; }
.detail-contact { position: absolute; z-index: 2; top: 28px; left: clamp(20px, 3vw, 54px); min-height: 44px; padding: 10px 21px; font-size: 15px; }
.detail-video { display: block; max-width: min(86vw, 1500px); max-height: 78vh; width: auto; height: auto; border-radius: 26px; background: #f1f1ef; box-shadow: 0 18px 54px #0000001c; }

@media (max-width: 760px) {
  html, body { scroll-snap-type: y proximity; }
  .hero { min-height: 620px; }
  .hero-top-mask { height: 22%; }
  .hero-name { top: 6%; left: 5%; font-size: clamp(25px, 6vw, 36px); }
  .hero-nav { top: 13%; right: 5%; left: 5%; justify-content: flex-end; gap: 9px; }
  .hero-nav .pill-button { min-height: 43px; padding: 9px 14px; font-size: clamp(13px, 3.4vw, 17px); }
  .projects-view { padding: 12px 13px 20px; }
  .projects-header-right { gap: 10px; }
  .micro-label { display: none; }
  .projects-intro { margin-top: 25px; }
  .project-grid { height: auto; grid-template-columns: 1fr; grid-template-rows: none; gap: 11px; }
  .project-card { grid-area: auto !important; height: clamp(290px, 64vh, 500px); }
  .project-grid:has(.project-card:hover) { grid-template-columns: 1fr; grid-template-rows: none; }
  .poster strong { font-size: clamp(58px, 16vw, 104px); }
  .poster-three strong, .poster-four strong { font-size: clamp(54px, 14vw, 88px); }
  .projects-footnote { margin-top: 12px; }
  .chapter-video { max-width: 88vw; max-height: 72vh; }
  .detail-video { max-width: 90vw; max-height: 72vh; border-radius: 18px; }
  .home-return { top: 15px; left: 14px; }
  body[data-route="detail"] .home-return { right: 14px; }
  .detail-contact { top: 16px; left: 14px; min-height: 40px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Keep the return control clear of the project mark and chapter labels. */
body[data-route="projects"] .home-return { top: 21px; left: clamp(115px, 10vw, 172px); }
body[data-route="home"] .home-return { top: 23px; right: clamp(22px, 3vw, 54px); left: auto; }

.hero-top-mask {
  background:
    linear-gradient(180deg, #fff 0%, transparent 100%),
    linear-gradient(90deg, #fdfdfd 0%, #e4e4e4 100%);
}

/* Persistent corner controls; proximity snapping avoids fighting manual scroll. */
:root { --ease: cubic-bezier(.16, 1, .3, 1); }
html { scroll-snap-type: y proximity; }
body { scroll-snap-type: none; }
.snap-panel { scroll-snap-stop: normal; }
.hero-nav {
  right: calc(8.25vw + clamp(160px, 13vw, 250px) + clamp(15px, 1.65vw, 32px));
}
.project-grid {
  transition: grid-template-columns .74s var(--ease), grid-template-rows .74s var(--ease);
}
.poster, .card-video { transition: opacity .42s var(--ease); }
.fixed-contact {
  position: fixed; z-index: 32; top: clamp(18px, 11.4vh, 124px); right: 8.25vw;
  display: inline-flex; justify-content: center; align-items: center;
  min-height: 66px; padding: 10px 25px; border-radius: 999px;
  background: #050505; color: #fff; font-size: clamp(17px, 1.95vw, 37px);
  font-weight: 700; letter-spacing: .035em; line-height: 1; white-space: nowrap;
  transition: transform .74s var(--ease), background .25s var(--ease), color .25s var(--ease), top .3s var(--ease);
}
.fixed-contact:hover, .fixed-contact:focus-visible {
  transform: scale(1.075); background: var(--lime); color: #080808; outline: none;
}
body[data-route="projects"] .fixed-contact,
body[data-route="detail"] .fixed-contact,
body[data-route="home"].is-scrolled .fixed-contact {
  top: 22px; right: clamp(14px, 3vw, 54px);
}
body[data-route="projects"] .home-return,
body[data-route="detail"] .home-return,
body[data-route="home"].is-scrolled .home-return {
  top: 22px; right: auto; left: clamp(14px, 3vw, 54px);
}
.projects-header { position: relative; justify-content: center; }
.projects-header .brand-mark { position: absolute; left: 50%; transform: translateX(-50%); }
.projects-header-right { display: none; }
@media (max-width: 760px) {
  .hero-nav { right: calc(5% + 104px); }
  .fixed-contact {
    top: 13%; right: 5%; min-height: 43px; padding: 9px 14px;
    font-size: clamp(13px, 3.4vw, 17px);
  }
  body[data-route="projects"] .fixed-contact,
  body[data-route="detail"] .fixed-contact,
  body[data-route="home"].is-scrolled .fixed-contact {
    top: 15px; right: 14px;
  }
  body[data-route="projects"] .home-return,
  body[data-route="detail"] .home-return,
  body[data-route="home"].is-scrolled .home-return {
    top: 15px; left: 14px;
  }
}

/* The detail view must stay hidden unless its route is active. */
.view.detail-view { display: none; }
.view.detail-view.is-active { display: grid; }
.detail-contact { display: none; }

/* On the homepage, each wheel gesture advances exactly one full-screen panel. */
html.home-scroll-snap { scroll-snap-type: y mandatory; }
html.home-scroll-snap .snap-panel { scroll-snap-stop: always; }

body[data-route="home"].is-scrolled .chapter-kicker { top: 88px; }

/* Vimeo player frames retain the page's rounded media layout. */
.media-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.chapter-video.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  max-width: none;
  max-height: none;
  width: min(84vw, 1160px, 136.8vh);
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 23px;
  background: #f4f4f2;
  box-shadow: 0 18px 54px #00000019;
}
.chapter-video[data-video="1"] {
  width: min(84vw, 43vh);
  aspect-ratio: 9 / 16;
}
.chapter-video iframe,
.card-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}
.project-card-one .card-video iframe {
  inset: 0 auto auto 50%;
  width: auto;
  height: 100%;
  aspect-ratio: 9 / 16;
  transform: translateX(-50%);
}
.detail-video.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  max-width: none;
  max-height: none;
  width: min(86vw, 1500px, 138.6vh);
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  background: #f1f1ef;
  box-shadow: 0 18px 54px #0000001c;
}
.detail-video[data-video="1"] {
  width: min(86vw, 43.8vh);
  aspect-ratio: 9 / 16;
}
.detail-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
}
@media (max-width: 760px) {
  .chapter-video.media-frame:not([data-video="1"]) { width: min(88vw, 124vh); }
  .chapter-video[data-video="1"] { width: min(88vw, 40.5vh); }
  .detail-video.media-frame:not([data-video="1"]) { width: min(90vw, 128vh); }
  .detail-video[data-video="1"] { width: min(90vw, 40.5vh); border-radius: 18px; }
}
.projects-header .brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
}
.brand-mark img {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
@media (max-width: 760px) {
  .projects-header .brand-mark,
  .brand-mark img {
    width: 48px;
    height: 48px;
  }
}