@import url("https://fonts.googleapis.com/css2?family=M+PLUS+1p:wght@400;700;800;900&family=WDXL+Lubrifont+JP+N&display=swap");

:root {
  --font-japanese: "Hiragino Sans", "Yu Gothic", Meiryo, "Noto Sans CJK JP", sans-serif;
  --font-copy: "M PLUS 1p", var(--font-japanese);
  --font-display: "WDXL Lubrifont JP N", var(--font-japanese);
}

.about,
.mail-section {
  font-family: var(--font-copy);
}

.mail-section > h2,
.week__header h3,
.mail-card h4 {
  font-family: var(--font-display);
}

.about {
  --about-yellow: #ffe548;
  padding: clamp(2rem, 3.8vw, 3.5rem) 1rem clamp(3rem, 5vw, 4.5rem);
  background: var(--about-yellow);
  color: #161412;
  text-align: center;
}

.about::before {
  position: absolute;
  inset: 0;
  background: url("../assets/images/stars/background-stars-static.png") no-repeat center / min(94%, 85rem) auto;
  /* Fade out the static tile before a section edge can cut through a star. */
  mask-image:
    linear-gradient(transparent 8px, #000 34px, #000 calc(100% - 34px), transparent calc(100% - 8px)),
    linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px), transparent);
  mask-composite: intersect;
  pointer-events: none;
  content: "";
}

.about__sheet {
  max-width: 51rem;
  margin-inline: auto;
  filter: drop-shadow(4px 5px 0 #171717);
}

.about__paper {
  --fold-width: clamp(2.25rem, 5.8vw, 5.25rem);
  --fold-height: calc(var(--fold-width) * 109 / 140);
  position: relative;
  padding: clamp(1.25rem, 2vw, 1.85rem) clamp(1rem, 3.6vw, 3.25rem) var(--fold-height);
  border: 3px solid #161412;
  background: #fffdfa;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--fold-height)), calc(100% - var(--fold-width)) 100%, 0 100%);
}

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

.about__heading {
  display: grid;
  place-items: center;
  margin-inline: auto;
}

.about__heading > * { grid-area: 1 / 1; }
.about__heading h2,
.about__heading h3 { position: relative; }

.about__heading--intro { width: min(100%, 25rem); }
.about__heading--intro h2 { width: 58.5%; }
.about__deco { align-self: start; margin-top: 2%; }

.about__copy {
  margin-top: 1.1rem;
  padding: clamp(1rem, 2vw, 1.8rem) clamp(.4rem, 2vw, 1.75rem) .5rem;
  border-top: 2px solid #222;
}

.about__copy,
.about__panel {
  font-size: clamp(.875rem, 1.12vw, 1.025rem);
  font-weight: 800;
  line-height: 1.8;
  line-break: strict;
  overflow-wrap: anywhere;
}

.about__copy > p { letter-spacing: -.03em; text-wrap: pretty; }
.about__copy p + p { margin-top: .7em; }
.about__copy strong {
  color: #f86882;
  font-family: var(--font-copy);
  font-size: 1.16em;
  font-weight: 900;
  -webkit-text-stroke: 0.8px #111111;
  paint-order: fill stroke;
}

.about__label {
  width: min(100%, 15rem);
  margin-inline: auto;
  font-weight: 900;
}

.about__label--festival {
  margin-top: 1.2rem;
  font-size: min(1.17em, 4.85vw);
}

.about__label--festival span {
  padding-inline: .28rem;
  white-space: nowrap;
}

.about__panel {
  margin-top: 1.35rem;
  padding: clamp(.9rem, 2.2vw, 1.75rem);
  background: radial-gradient(#dedbd1 .65px, transparent .75px) 0 0 / 5px 5px, #fffdfa;
}

.about__festival > p { letter-spacing: -.03em; text-wrap: pretty; }

.about__banner-link {
  display: block;
  margin: 1.25rem auto 0;
}

.about__banner {
  display: block;
  width: 100%;
  margin: 0;
  border: 1px solid #222;
  box-shadow: 2px 3px #222;
}

.about__heading--recruit {
  width: min(100%, 30rem);
  margin-bottom: 1rem;
}

.about__heading--recruit h3 { width: 44%; }

.about__recruit {
  background-image: radial-gradient(#dedbd1 .95px, transparent 1.08px);
  background-size: 6px 6px;
}

.about__email {
  display: block;
  margin: .9rem auto;
}

.about__email picture { display: block; }
.about__email img { width: 100%; }
.about__label--form { margin-top: 1rem; }

.about__corner {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: var(--fold-width);
}

@media (max-width: 600px) {
  .about {
    padding: clamp(3.2rem, 16.5vw, 5rem) .85rem clamp(3.5rem, 17.5vw, 5.2rem) .7rem;
  }

  .about::before {
    --sp-stars: url("../assets/images/stars/background-stars-static.png");
    background-image: var(--sp-stars), var(--sp-stars);
    background-repeat: repeat-y;
    background-size: 165% auto;
    background-position: left .75rem, right 2.1rem;
  }


  .about__paper {
    --fold-width: clamp(2rem, 10vw, 3rem);
    padding: clamp(1.35rem, 6.7vw, 1.9rem) clamp(.7rem, 3.5vw, 1.25rem) var(--fold-height);
  }

  .about__heading--intro { max-width: 18rem; }
  .about__heading--intro h2 { width: 56%; }

  .about__copy {
    margin-top: 1.2rem;
    padding: 1.35rem clamp(.45rem, 2.6vw, .9rem) .6rem;
  }

  .about__copy,
  .about__panel {
    font-size: clamp(.875rem, 3.9vw, 1.05rem);
    line-height: 1.92;
    text-wrap: pretty;
  }

  .about__copy p + p { margin-top: .9em; }
  .about__copy strong { font-size: 1.18em; }

  .about__label { width: min(100%, clamp(12rem, 61vw, 16rem)); }
  .about__label--festival { margin-top: 1.6rem; }

  .about__panel {
    margin-top: 1.65rem;
    padding: 1.2rem clamp(.4rem, 2vw, .75rem) 1.55rem;
  }

  .about__banner { margin-top: 1.45rem; }
  .about__heading--recruit { margin-bottom: 1.3rem; }
  .about__heading--recruit h3 { width: 45%; }
  .about__recruit > p:not(.about__label) { font-size: clamp(.78rem, 3.55vw, .95rem); }
  .about__email { margin: 1.15rem clamp(-.65rem, -2.2vw, -.4rem); }
  .about__label--form { margin-top: 1.4rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .about__heading--intro.is-visible h2 { animation: about-title-in 650ms ease-out both; }
  .about__heading--intro.is-visible .about__deco { animation: about-deco-shake 650ms 180ms ease-in-out both; }
  .about__heading--recruit.is-visible .about__recruit-stars { animation: about-stars-twinkle 2.8s ease-in-out 2; }
}

@keyframes about-title-in {
  0% { opacity: 0; transform: translateY(.6rem) rotate(-3deg); }
  58% { opacity: 1; transform: translateY(0) rotate(2deg); }
  80% { transform: rotate(-1deg); }
  100% { transform: rotate(0); }
}

@keyframes about-deco-shake {
  0%, 100% { transform: rotate(0); }
  24%, 72% { transform: rotate(-1.75deg); }
  48% { transform: rotate(1.75deg); }
}

@keyframes about-stars-twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
