@font-face {
  font-family: "Dela Gothic One";
  src: url("./assets/fonts/dela-gothic-one.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --page-width: 1440;
  --header-height: 96px;
  --glass: rgba(255, 255, 255, 0.5);
  --white: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--white);
  background: #0878cf;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
}

.page {
  position: relative;
  width: 100%;
  min-height: 200vw;
  max-height: 2880px;
  overflow: clip;
  background-image: url("./assets/background.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
}

.hero {
  position: relative;
  height: clamp(820px, 62.5vw, 900px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-plane {
  position: absolute;
  top: 6%;
  width: clamp(190px, 24vw, 346px);
  aspect-ratio: 1.14;
  transition: opacity 260ms ease, transform 360ms cubic-bezier(.22,1,.36,1);
}

.hero-plane-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-plane-fallback {
  object-fit: contain;
}
.is-scrolled .hero-plane { opacity: 0; transform: translateY(-12px) scale(.94); }

.hero-title {
  position: absolute;
  top: 42%;
  left: 50%;
  width: min(48vw, 691px);
  min-width: 340px;
  margin: 0;
  transform: translateX(-50%);
  color: #fff;
  font-family: "Dela Gothic One", "Hiragino Kaku Gothic ProN", sans-serif;
  font-weight: 400;
  line-height: 0.87;
  letter-spacing: -0.09em;
  text-align: left;
  transition: opacity 220ms ease, transform 220ms ease;
}

.title-small {
  display: block;
  margin: 0 0 0.15em 0.08em;
  font-size: clamp(25px, 4.45vw, 64px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

.title-large {
  display: block;
  font-size: clamp(102px, 15.75vw, 227px);
  white-space: nowrap;
  transform: scaleX(.78);
  transform-origin: left center;
}

.work-grid {
  position: relative;
  z-index: 2;
  width: calc(100% - 6.667vw);
  height: 70.556vw;
  max-height: 1016px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.667vw, 24px);
}

.tile {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: clamp(12px, 1.111vw, 16px);
  background: var(--glass);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.tile-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.tile.is-playing .tile-video { opacity: 1; }
.tile:focus-visible {
  outline: 3px solid rgba(255,255,255,.92);
  outline-offset: 3px;
}
.tile-a { grid-column: 1; grid-row: 1 / span 2; }
.tile-b { grid-column: 1; grid-row: 3; }
.tile-c { grid-column: 1; grid-row: 4; }
.tile-d { grid-column: 2; grid-row: 1; }
.tile-e { grid-column: 2; grid-row: 2; }
.tile-f { grid-column: 2; grid-row: 3 / span 2; }

.compact-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  height: var(--header-height);
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-18px);
  transition: opacity 260ms ease, transform 360ms cubic-bezier(.22,1,.36,1), background 260ms ease;
}
.compact-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  text-decoration: none;
  font-size: clamp(14px, 1.3vw, 20px);
  font-family: "Dela Gothic One", "Hiragino Kaku Gothic ProN", sans-serif;
  font-weight: 400;
  letter-spacing: -0.06em;
  text-shadow: 0 1px 12px rgba(0,65,130,.18);
}
.compact-logo img { width: 29px; height: 29px; object-fit: contain; }
.is-scrolled .compact-header { opacity: 1; transform: translateY(0); pointer-events: auto; }
.is-scrolled .hero-title { opacity: 0; transform: translate(-50%, -18px) scale(.98); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 820px) {
  :root { --header-height: 70px; }
  .page {
    min-height: 2600px;
    max-height: none;
    background-size: auto 2600px;
    background-position: 50% top;
  }
  .hero { height: clamp(680px, 96svh, 760px); }
  .hero-plane { top: 6%; width: min(55vw, 240px); }
  .hero-title { top: 43%; width: min(86vw, 420px); min-width: 0; }
  .title-small { font-size: clamp(24px, 7vw, 34px); }
  .title-large { font-size: clamp(92px, 27vw, 132px); }
  .work-grid {
    width: calc(100% - 32px);
    height: auto;
    max-height: none;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 14px;
    padding-bottom: 32px;
  }
  .tile { grid-column: 1 !important; grid-row: auto !important; min-height: 220px; }
  .tile-a, .tile-f { min-height: 420px; }
  .compact-logo img { width: 25px; height: 25px; }
}

@media (max-width: 420px) {
  .hero { height: 670px; }
  .hero-plane { top: 6%; width: min(58vw, 225px); }
  .hero-title { top: 43%; }
  .tile { min-height: 200px; }
  .tile-a, .tile-f { min-height: 340px; }
}

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