@font-face {
  font-family: "Knock Hand";
  src: url("assets/knock-hand.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fcfbf6;
  --ink: #1f1d1a;
  --muted: #766f63;
  --blue: #2b6cc8;
  --line: #e2ddd1;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
}
a {
  color: inherit;
}
::selection {
  color: var(--paper);
  background: var(--blue);
}
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 8px;
}

.page {
  width: min(1160px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: 36px 60px 26px;
  display: flex;
  flex-direction: column;
}

.header,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header {
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -2px;
}
.brand span {
  display: inline-block;
}
.brand span:nth-child(1) {
  transform: rotate(-11deg);
}
.brand span:nth-child(2) {
  transform: translateY(-3px) rotate(5deg);
}
.brand span:nth-child(3) {
  transform: rotate(-5deg);
}
.brand .brand-dot {
  margin-left: 2px;
  color: var(--blue);
}

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: 1.14fr 1fr;
  align-items: center;
  column-gap: 42px;
  min-height: 660px;
  padding: 40px 0 52px;
}

.intro {
  position: relative;
  z-index: 2;
  padding-bottom: 8px;
  animation: enter 750ms 80ms both;
}
h1 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
  margin: 0 0 32px;
  font-size: clamp(27px, 3.4vw, 43px);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.36;
}
.tape {
  display: block;
  width: max-content;
  max-width: 100%;
  color: var(--paper);
  background: var(--ink);
  padding: 7px 18px 10px;
  border-radius: 1px;
  box-shadow: 0 2px 1px #1f1d1a26;
}
.tape-one {
  transform: rotate(-2deg);
}
.tape-two {
  transform: translateX(9px) rotate(1.2deg);
}
.download-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin-left: 4px;
  text-align: center;
}
.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 58px;
  min-width: 206px;
  padding: 12px 24px;
  border: 0;
  border-radius: 15px;
  background: var(--blue);
  color: var(--paper);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.025em;
  text-decoration: none;
  box-shadow: 0 3px 0 #184782;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}
a.download:hover {
  background: #215cac;
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #184782;
}
a.download:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #184782;
}
.apple {
  font-family: "Helvetica Neue", sans-serif;
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
}
.download-arrow {
  font-size: 23px;
  margin-left: 2px;
  font-weight: 400;
}
.coming-soon {
  cursor: default;
}

.door-scene {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 550px;
  animation: enter 850ms 180ms both;
}
.door-art {
  width: 100%;
  height: 550px;
  position: relative;
}
.door-button {
  position: absolute;
  bottom: 18px;
  left: 50%;
  width: 252px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translateX(-41%) rotate(2deg);
  transform-origin: 50% 93%;
  cursor: pointer;
  touch-action: manipulation;
  border-radius: 3px;
}
.door-image {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(5px 13px 8px #44372021) drop-shadow(1px 2px 1px #4437201a);
  transition: filter 250ms;
  user-select: none;
}
.door-button:hover .door-image {
  filter: drop-shadow(6px 15px 9px #4437202e) drop-shadow(1px 2px 1px #4437201a);
}
.door-button:focus-visible {
  outline-offset: 4px;
}
.door-number {
  position: absolute;
  top: 1px;
  left: 54%;
  transform: translateX(-50%) rotate(3deg);
  padding: 6px 14px 7px;
  font-size: 12px;
  letter-spacing: 0.12em;
  line-height: 1;
  color: var(--paper);
  background: var(--ink);
  pointer-events: none;
  box-shadow: 0 2px 2px #1f1d1a1a;
}
.knock-words {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.knock-word {
  position: absolute;
  font-weight: 900;
  line-height: 1;
  transform-origin: 65% 70%;
}
.word-one {
  top: 90px;
  left: -25px;
  font-size: 94px;
  transform: rotate(-14deg);
}
.word-two {
  top: 169px;
  left: 39px;
  font-size: 61px;
  transform: rotate(10deg);
}
.word-three {
  top: 223px;
  left: 4px;
  font-size: 37px;
  transform: rotate(-8deg);
  opacity: 0.55;
}
.knock-hint {
  position: absolute;
  right: -12px;
  bottom: 55px;
  display: flex;
  flex-direction: column-reverse;
  gap: 7px;
  align-items: center;
  transform: rotate(8deg);
  margin: 0;
  font-family: "Knock Hand", serif;
  font-size: 19px;
  color: var(--muted);
  pointer-events: none;
}
.hint-arrow {
  font-family: "Knock Hand", serif;
  font-size: 36px;
  line-height: 1;
  transform: rotate(-15deg);
}
.door-reply {
  position: absolute;
  z-index: 4;
  top: 181px;
  right: -27px;
  padding: 10px 18px 12px;
  background: #f3cf75;
  box-shadow: 1px 4px 8px #69572721;
  font-family: "Knock Hand", serif;
  font-size: 24px;
  color: #574323;
  opacity: 0;
  transform: translateY(8px) rotate(6deg);
  transition:
    opacity 240ms ease,
    transform 240ms ease;
  pointer-events: none;
}
.door-reply.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(6deg);
}
.door-reply:empty {
  display: none;
}

.footer {
  position: relative;
  gap: 24px;
  min-height: 32px;
  font-size: 12px;
  color: var(--muted);
}
.credits {
  margin-left: auto;
  text-align: right;
}
.credits summary {
  cursor: pointer;
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.credits summary::-webkit-details-marker {
  display: none;
}
.credits summary::after {
  content: "+";
  font-size: 16px;
}
.credits[open] summary::after {
  content: "−";
}
.credits p {
  position: absolute;
  bottom: 36px;
  right: 0;
  width: min(310px, 85vw);
  margin: 0;
  padding: 17px 20px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: #686155;
  text-align: left;
  font-size: 13px;
  line-height: 1.8;
  z-index: 5;
}
.credits a {
  text-underline-offset: 3px;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(13px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1440px) {
  .page {
    padding-top: 44px;
    padding-bottom: 34px;
  }
  .hero {
    column-gap: 72px;
  }
}

@media (max-width: 850px) {
  .page {
    padding-right: 36px;
    padding-left: 36px;
  }
  .hero {
    column-gap: 20px;
    grid-template-columns: 1.1fr 1fr;
  }
  .door-art {
    transform: scale(0.86);
    transform-origin: center;
  }
  h1 {
    font-size: 30px;
  }
  .tape {
    padding-inline: 12px;
  }
}

@media (max-width: 650px) {
  .page {
    padding: 22px 25px 16px;
  }
  .brand {
    font-size: 23px;
  }
  .hero {
    display: flex;
    flex-direction: column-reverse;
    gap: 4px;
    padding: 16px 0 34px;
    min-height: 0;
  }
  .door-scene {
    min-height: 0;
    height: clamp(285px, 44svh, 370px);
    width: 300px;
    flex-shrink: 0;
  }
  .door-art {
    height: 400px;
    width: 350px;
    transform: scale(0.74);
    transform-origin: center;
  }
  .door-button {
    width: 183px;
    bottom: 13px;
  }
  .door-number {
    top: 3px;
    left: 54%;
  }
  .word-one {
    top: 66px;
    left: 10px;
    font-size: 77px;
  }
  .word-two {
    top: 133px;
    left: 58px;
    font-size: 51px;
  }
  .word-three {
    top: 180px;
    left: 32px;
    font-size: 33px;
  }
  .knock-hint {
    right: 12px;
    bottom: 0;
    font-size: 21px;
  }
  .door-reply {
    top: 133px;
    right: -10px;
  }
  .intro {
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  h1 {
    font-size: clamp(23px, 6.2vw, 30px);
    gap: 9px;
    margin: 0 0 21px;
    align-items: center;
  }
  .tape {
    padding: 5px 12px 7px;
  }
  .tape-two {
    transform: translateX(3px) rotate(1.2deg);
  }
  .download-area {
    text-align: center;
    margin-left: 0;
  }
  .download {
    min-height: 52px;
    min-width: 199px;
    font-size: 16px;
  }
  .footer {
    margin-top: auto;
    font-size: 11px;
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro,
  .door-scene {
    animation: none;
  }
  .download,
  .door-image,
  .door-reply {
    transition: none;
  }
}
