:root {
  --bg: #fff;
  --ink: #1D1D1D;
  --grid-size: 18px;
  --notebook-grid: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 .5H18M.5 0V18' fill='none' stroke='%23bcbcbc' stroke-opacity='.32' stroke-width='1' stroke-dasharray='3 2' shape-rendering='crispEdges'/%3E%3C/svg%3E");
}

@font-face {
  font-family: "JuHandwriting";
  src: url("assets/fonts/MyHandwriting-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

html {
  background-color: var(--bg);
  background-image: var(--notebook-grid);
  background-size: var(--grid-size) var(--grid-size);
}

body {
  background-color: var(--bg);
  background-image: var(--notebook-grid);
  background-size: var(--grid-size) var(--grid-size);
  color: var(--ink);
  font-family: "JuHandwriting", "Trebuchet MS", Arial, sans-serif;
}

.page {
  position: relative;
  height: 100dvh;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background-color: var(--bg);
  background-image: var(--notebook-grid);
  background-size: var(--grid-size) var(--grid-size);
}

.frame {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.frame-top {
  top: 48px;
  left: 30px;
  width: calc(100% - 60px);
  height: 20px;
  object-fit: fill;
}

.frame-bottom {
  bottom: 48px;
  left: 30px;
  width: calc(100% - 60px);
  height: 20px;
  object-fit: fill;
}

.frame-left {
  left: 28px;
  top: 55px;
  width: 13px;
  height: calc(100% - 110px);
  object-fit: fill;
}

.frame-right {
  right: 28px;
  top: 55px;
  width: 13px;
  height: calc(100% - 110px);
  object-fit: fill;
}

.pigeon {
  position: absolute;
  right: clamp(48px, 5.5vw, 86px);
  bottom: clamp(58px, 7vw, 92px);
  z-index: 2;
  display: block;
  width: clamp(62px, 8vw, 108px);
  aspect-ratio: 403 / 327;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.pigeon-click-label {
  position: absolute;
  left: 2%;
  top: -22px;
  z-index: 3;
  display: block;
  color: var(--ink);
  font-family: "JuHandwriting", "Trebuchet MS", Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  opacity: 1;
  transform: rotate(-18deg) translateY(0);
  transform-origin: left bottom;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.pigeon.is-pruu .pigeon-click-label {
  transform: rotate(-18deg) translateY(-2px);
}

.pigeon-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.18s ease;
}

.content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 620px;
  max-width: calc(100vw - 32px);
  transform: translateY(-8px);
  text-align: center;
}

.avatar-wrap {
  position: relative;
  width: 178px;
  margin: 0 auto;
  aspect-ratio: 210 / 239;
}

.avatar {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.2s ease;
}

.avatar-default {
  opacity: 1;
}

.avatar-hover {
  opacity: 0;
}

.avatar-wrap:hover .avatar-default,
.avatar-wrap:focus-within .avatar-default {
  opacity: 0;
}

.avatar-wrap:hover .avatar-hover,
.avatar-wrap:focus-within .avatar-hover {
  opacity: 1;
}

.logo-wrap {
  position: relative;
  display: block;
  margin: -12px auto 0;
  width: 220px;
  aspect-ratio: 429 / 74;
}

.logo {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  touch-action: manipulation;
}

.logo-press-target {
  position: absolute;
  inset: 0;
  display: none;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 18px auto 0;
  width: auto;
  max-width: calc(100vw - 48px);
  color: var(--ink);
  font-family: "JuHandwriting", "Trebuchet MS", Arial, sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
  transform: translateX(18px);
}

.intro-line {
  display: block;
  white-space: nowrap;
}

.intro-compact {
  display: none;
}

.links {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 21px;
  white-space: nowrap;
}

.bullet {
  width: 9px;
  height: 10px;
}

.button-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  text-decoration: none;
  cursor: pointer;
  isolation: isolate;
}

.button-label {
  position: relative;
  z-index: 10;
  display: block;
  color: var(--ink);
  font-family: "JuHandwriting", "Trebuchet MS", Arial, sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
  transition: transform 0.2s ease;
}

.button-link:hover .button-label,
.button-link:focus-visible .button-label {
  transform: scale(1.08);
}

.coming-soon {
  position: fixed;
  z-index: 30;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 118px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--cone-rotation, 0deg)) scale(0.92);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.coming-soon.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(var(--cone-rotation, 0deg)) scale(1);
}

.coming-soon img {
  display: block;
  width: 76px;
  height: auto;
}

.coming-soon span {
  display: block;
  color: var(--ink);
  font-family: "JuHandwriting", "Trebuchet MS", Arial, sans-serif;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: lowercase;
  white-space: nowrap;
  transform: rotate(calc(var(--cone-rotation, 0deg) * -1));
}

.doodle {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 20;
  width: 6px;
  height: 25px;
  border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%;
  opacity: 0;
  pointer-events: none;
  transform-origin: center center;
  transform: translate(-50%, -50%) translate(var(--x), var(--y)) rotate(var(--angle));
  transition: opacity 0.2s ease;
}

.button-link:hover .doodle,
.button-link:focus-visible .doodle {
  opacity: 0.9;
  animation: radialWiggle 0.3s infinite alternate ease-in-out;
}

@keyframes radialWiggle {
  0% {
    transform: translate(-50%, -50%) translate(var(--x), var(--y)) rotate(var(--angle)) scaleY(1);
  }

  50% {
    transform: translate(-50%, -50%) translate(calc(var(--x) * 1.015), calc(var(--y) * 1.015)) rotate(calc(var(--angle) + var(--tilt))) scaleY(1.05);
  }

  100% {
    transform: translate(-50%, -50%) translate(var(--x), var(--y)) rotate(var(--angle)) scaleY(0.9);
  }
}

@media (max-width: 900px) {
  .page {
    height: 100dvh;
    min-height: 100vh;
    place-items: center;
    padding: 0;
    overflow: hidden;
  }

  .frame-left,
  .frame-right {
    display: none;
  }

  .frame-top {
    top: 28px;
    left: 0;
    width: 100%;
  }

  .frame-bottom {
    bottom: 28px;
    left: 0;
    width: 100%;
  }

  .pigeon {
    right: clamp(18px, 5vw, 40px);
    bottom: 48px;
    width: clamp(54px, 12vw, 82px);
  }

  .content {
    width: min(620px, 100vw);
    max-width: 100vw;
    transform: translateY(-10px);
  }

  .avatar-wrap {
    width: clamp(132px, 21vw, 165px);
  }

  .logo-wrap {
    margin-top: -10px;
    width: clamp(185px, 32vw, 220px);
  }

  .intro {
    max-width: calc(100vw - 44px);
    font-size: 20px;
    transform: none;
  }
}

@media (max-width: 900px) and (max-height: 650px) {
  .avatar-wrap {
    width: clamp(120px, 18vw, 145px);
  }

  .logo-wrap {
    margin-top: -8px;
    width: clamp(170px, 28vw, 200px);
  }

  .intro {
    max-width: calc(100vw - 40px);
    font-size: 18px;
  }

  .links {
    margin-top: 14px;
  }
}

@media (max-width: 520px) {
  .page {
    height: 100dvh;
    min-height: 100vh;
    padding: 0;
    place-items: center;
    overflow: hidden;
  }

  .content {
    width: 100vw;
    max-width: 100vw;
    transform: translateY(-18px);
  }

  .pigeon {
    right: max(24px, calc(100vw - 366px));
    bottom: 118px;
    width: 76px;
  }

  .avatar-wrap {
    width: 134px;
  }

  .logo-wrap {
    margin-top: -34px;
    width: min(52vw, 210px);
  }

  .logo-press-target {
    display: block;
  }

  .logo-wrap.is-pressing-logo .logo {
    filter: brightness(0) saturate(100%) invert(55%) sepia(86%) saturate(3475%) hue-rotate(197deg) brightness(102%) contrast(101%);
  }

  .intro {
    margin-top: 8px;
    max-width: calc(100vw - 32px);
    font-size: 14px;
    line-height: 1.05;
    transform: none;
  }

  .intro-desktop {
    display: none;
  }

  .intro-compact {
    display: block;
    white-space: nowrap;
  }

  .links {
    margin-top: 22px;
    gap: 6px;
    transform: scale(0.8);
    transform-origin: center;
  }

  .button-link {
    padding: 6px 8px;
  }

  .button-label {
    font-size: 19px;
  }

  .coming-soon {
    width: 94px;
  }

  .coming-soon img {
    width: 60px;
  }

  .coming-soon span {
    font-size: 17px;
  }
}

@media (max-width: 380px) {
  .intro {
    font-size: 13px;
    line-height: 1.05;
  }

  .intro-desktop {
    display: none;
  }

  .intro-compact {
    display: block;
    white-space: nowrap;
  }

  .button-label {
    font-size: 18px;
  }

  .links {
    transform: scale(0.76);
  }
}
