:root {
  --bg: #ffffff;
  --ink: #1d3239;
  --ink-muted: rgba(29, 50, 57, 0.62);
  --ink-faint: rgba(29, 50, 57, 0.12);
  --shell: min(1080px, calc(100% - 3rem));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: "Outfit", "Zen Kaku Gothic New", system-ui, sans-serif;
  --font-jp: "Zen Kaku Gothic New", "Outfit", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
  transition: opacity 0.25s var(--ease);
}

a:hover {
  opacity: 0.68;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero__atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      120% 80% at 50% -10%,
      rgba(29, 50, 57, 0.07),
      transparent 55%
    ),
    radial-gradient(
      70% 50% at 80% 100%,
      rgba(29, 50, 57, 0.045),
      transparent 60%
    ),
    linear-gradient(180deg, #f7fafb 0%, #ffffff 45%, #f4f7f8 100%);
}

.hero__atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  background-size: 180px;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.75rem;
  padding-block: 4rem 3rem;
}

.hero__logo {
  width: min(280px, 58vw);
  height: auto;
  animation: logo-rise 1.35s var(--ease) both;
}

.hero__welcome {
  margin: 0;
  max-width: none;
  font-weight: 200;
  font-size: clamp(0.72rem, 0.35rem + 2.1vw, 1.45rem);
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
  animation: fade-up 1.1s var(--ease) 0.35s both;
}

/* —— Prototypes intro —— */
.prototypes-intro {
  padding: 5.5rem 0 4rem;
  text-align: center;
  background:
    linear-gradient(180deg, transparent, rgba(29, 50, 57, 0.03) 50%, transparent);
}

.prototypes-intro__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.prototypes-intro__subtitle {
  margin: 0 auto;
  max-width: 34rem;
  color: var(--ink-muted);
  font-weight: 300;
  font-size: 1.05rem;
}

/* —— Prototype block —— */
.prototype {
  --proto-bg: #05070f;
  --proto-accent: #c8d2ff;
  background: var(--proto-bg);
  color: var(--proto-accent);
  padding: 5rem 0 6rem;
}

.prototype__inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.prototype__title-logo {
  display: block;
  width: min(520px, 100%);
  margin-inline: auto;
}

.prototype__title-logo img {
  width: 100%;
}

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

.prototype__copy {
  max-width: 38rem;
  margin-inline: auto;
  text-align: center;
}

.prototype__copy p {
  margin: 0 0 1.5rem;
  color: color-mix(in srgb, var(--proto-accent) 88%, white);
  font-weight: 300;
}

.prototype__itch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--proto-accent);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--proto-accent) 45%, transparent);
  padding-bottom: 0.15rem;
}

.prototype__itch:hover {
  opacity: 1;
  border-bottom-color: var(--proto-accent);
}

.prototype__itch span {
  transition: transform 0.3s var(--ease);
}

.prototype__itch:hover span {
  transform: translateX(3px);
}

/* —— Screenshots —— */
.shots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.shots__item {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: #02040a;
  cursor: zoom-in;
  overflow: hidden;
}

.shots__item:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--proto-accent) 55%, transparent);
  outline-offset: 2px;
}

.shots__item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.shots__item:hover img,
.shots__item:focus-visible img {
  transform: scale(1.03);
}

/* —— Lightbox —— */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  appearance: none;
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(5, 7, 15, 0.88);
  cursor: zoom-out;
}

.lightbox__image {
  position: relative;
  z-index: 1;
  max-width: min(1200px, 100%);
  max-height: min(90vh, 100%);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  animation: fade-up 0.35s var(--ease) both;
}

.lightbox__close {
  appearance: none;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(200, 210, 255, 0.35);
  background: transparent;
  color: #c8d2ff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  border-color: #c8d2ff;
  outline: none;
}

body.is-lightbox-open {
  overflow: hidden;
}

/* —— Embed —— */
.prototype__embed-frame {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  aspect-ratio: 16 / 10;
  background: #000;
  overflow: hidden;
}

.prototype__embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.prototype__embed-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s var(--ease);
}

.prototype__play {
  appearance: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  margin: 0;
  border: 0;
  padding: 0;
  background: rgba(5, 7, 15, 0.42);
  color: var(--proto-accent);
  cursor: pointer;
  transition: background 0.3s var(--ease);
}

.prototype__play:hover,
.prototype__play:focus-visible {
  background: rgba(5, 7, 15, 0.28);
  outline: none;
}

.prototype__play-icon {
  width: 4rem;
  height: 4rem;
  border: 1px solid color-mix(in srgb, var(--proto-accent) 55%, transparent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition:
    border-color 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.prototype__play-icon::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.55rem 0 0.55rem 0.95rem;
  border-color: transparent transparent transparent var(--proto-accent);
  margin-left: 0.2rem;
}

.prototype__play:hover .prototype__play-icon,
.prototype__play:focus-visible .prototype__play-icon {
  border-color: var(--proto-accent);
  transform: scale(1.05);
}

.prototype__embed-frame.is-playing .prototype__embed-poster,
.prototype__embed-frame.is-playing .prototype__play {
  opacity: 0;
  pointer-events: none;
}

/* —— Social —— */
.social {
  padding: 5.5rem 0 3.5rem;
  text-align: center;
  background:
    radial-gradient(
      90% 60% at 50% 0%,
      rgba(29, 50, 57, 0.05),
      transparent 65%
    ),
    var(--bg);
}

.social__title {
  margin: 0 0 2rem;
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: 0.03em;
}

.social__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.95rem;
}

.social__list a {
  font-weight: 300;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-bottom: 1px solid var(--ink-faint);
  padding-bottom: 0.12rem;
}

.social__list a:hover {
  opacity: 1;
  border-bottom-color: var(--ink);
}

/* —— Footer —— */
.footer {
  padding: 2rem 0 3rem;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  text-transform: lowercase;
}

/* —— Motion —— */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes logo-rise {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__logo,
  .hero__welcome,
  .reveal,
  .lightbox__image,
  .shots__item img {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 560px) {
  .shots {
    gap: 0.4rem;
  }
}

@media (min-width: 720px) {
  :root {
    --shell: min(1080px, calc(100% - 5rem));
  }

  .prototype {
    padding: 6.5rem 0 7.5rem;
  }

  .prototype__inner {
    gap: 3rem;
  }

  .shots {
    gap: 1rem;
  }

  .social__list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.75rem 2.25rem;
  }
}
