@font-face {
  font-family: "Montserrat";
  src: url("assets/montserrat-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Montserrat", "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: #252525;
  background: #fff;
  --page-gutter: clamp(20px, 5vw, 72px);
}

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

body {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid #555;
  outline-offset: 5px;
}

.site-header {
  border-bottom: 1px solid #eaeaea;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  max-width: 1440px;
  margin-inline: auto;
  padding: 17px var(--page-gutter);
}

.brand {
  display: grid;
  justify-items: start;
  gap: 3px;
}

.brand-name {
  font-size: 1.38rem;
  letter-spacing: .035em;
  line-height: 1.1;
}

.brand-role {
  font-size: .75rem;
  letter-spacing: .06em;
}

.brand-note {
  color: #686868;
  font-size: .75rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px clamp(18px, 3vw, 42px);
  font-size: .875rem;
}

.site-nav a:hover,
.instagram:hover {
  text-decoration: underline;
  text-underline-offset: .25em;
}

.hero {
  max-width: calc(1080px + 2 * var(--page-gutter));
  margin: clamp(28px, 5.5vw, 76px) auto 0;
  padding-inline: var(--page-gutter);
}

.hero-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #f5f5f5;
}

.hero-making,
.hero-finished {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-making,
.hero-finished:not(.is-loaded) {
  visibility: hidden;
}

.hero-snow {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-copy {
  margin-top: clamp(25px, 4vw, 49px);
  text-align: center;
  line-height: 2.35;
}

.hero-copy h1,
.hero-copy p {
  margin: 0;
}

.hero-copy h1 {
  font-size: clamp(1.15rem, 2.3vw, 1.65rem);
  font-weight: 400;
  letter-spacing: .04em;
}

.hero-copy h1 + p {
  margin-top: clamp(1rem, 2.4vw, 1.75rem);
  font-size: clamp(.875rem, 1.7vw, 1rem);
}

.hero-role {
  display: block;
  margin-top: clamp(.875rem, 2.4vw, 1.5rem);
}

.hero-copy .hero-english {
  margin-top: clamp(1.25rem, 3vw, 2.25rem);
  color: #5b5b5b;
  font-size: .875rem;
  line-height: 2.8;
}

.doors {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-items: center;
  gap: 36px clamp(28px, 6vw, 84px);
  max-width: calc(780px + 2 * var(--page-gutter));
  margin: clamp(64px, 10vw, 132px) auto 0;
  padding-inline: var(--page-gutter);
}

.door {
  display: grid;
  justify-items: center;
  gap: 13px;
  width: min(100%, 115px);
  font-size: .9375rem;
}

.door-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 8;
  border: 1px solid #323232;
  background: #fff;
  transition: transform .25s ease, box-shadow .25s ease;
}

.door-frame::after {
  position: absolute;
  top: 50%;
  right: 13%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #111;
  content: "";
  transform: translateY(-50%);
}

.door:hover .door-frame,
.door:focus-visible .door-frame {
  transform: translateY(-4px);
  box-shadow: 0 5px 12px rgb(0 0 0 / 6%);
}

.social {
  margin: clamp(50px, 7vw, 86px) var(--page-gutter);
  text-align: center;
}

.instagram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
}

.instagram-icon {
  flex: none;
}

.site-footer {
  display: grid;
  justify-items: center;
  gap: 40px;
  border-top: 1px solid #eaeaea;
  padding: 36px var(--page-gutter) 26px;
  text-align: center;
}

.site-footer h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
}

.site-footer p,
.site-footer small {
  color: #686868;
  font-size: .8125rem;
}

.site-footer p {
  margin: 9px 0 0;
}

.subpage {
  margin: clamp(64px, 10vw, 132px) var(--page-gutter);
  text-align: center;
}

.subpage h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: .035em;
}

.subpage p {
  margin: 1.25rem 0 0;
  color: #686868;
}

.contact-email-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 1.5rem;
  padding: .5rem 1.25rem;
  border: 1px solid #9a9a9a;
  font-size: .875rem;
}

.contact-email-button:hover {
  background: #f5f5f5;
}

@media (max-width: 640px) {
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .doors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 350px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-media.is-playing .hero-making {
    visibility: visible;
  }

  .hero-media.is-playing .hero-finished {
    animation: finished-crossfade 20s linear infinite;
  }

  .instagram-icon {
    animation: instagram-sway 6s ease-in-out infinite;
  }

  @keyframes finished-crossfade {
    0%, 30% {
      opacity: 0;
      transform: scale(1);
    }

    45% {
      opacity: 1;
    }

    70% {
      opacity: 1;
      transform: scale(1.15);
    }

    100% {
      opacity: 0;
      transform: scale(1.15);
    }
  }

  @keyframes instagram-sway {
    0%, 72%, 100% { transform: rotate(0); }
    79% { transform: rotate(-6deg); }
    88% { transform: rotate(5deg); }
    95% { transform: rotate(-2deg); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .door-frame {
    transition: none;
  }

  .door:hover .door-frame,
  .door:focus-visible .door-frame {
    transform: none;
  }
}
