@font-face {
  font-family: "NOVA Hand";
  src: url("assets/Caveat-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "NOVA Text";
  src: url("assets/GolosText-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #f5e9d8;
  --milk: #fff9f0;
  --ink: #552006;
  --sepia: #9a5b22;
  --ochre: #d78b25;
  --shadow: rgba(85, 32, 6, 0.14);
  color-scheme: light;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 280px;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(245, 233, 216, 0.28), rgba(245, 233, 216, 0.28)),
    url("assets/paper-texture.jpg");
  background-repeat: repeat;
  background-size: auto, 160px 160px;
  font-family: "NOVA Text", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

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

.poster {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.poster::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: -1;
  pointer-events: none;
  border: 1.5px solid rgba(85, 32, 6, 0.16);
  border-radius: 21px 15px 24px 17px / 17px 24px 16px 22px;
  transform: rotate(-0.08deg);
}

.poster__head {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(260px, 1fr);
  align-items: center;
  min-height: 118px;
  padding: max(22px, env(safe-area-inset-top)) clamp(28px, 4vw, 72px) 10px;
}

.brand {
  display: block;
  width: clamp(190px, 18vw, 278px);
  line-height: 0;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.opening-note {
  margin: 0;
  padding: 8px 21px 10px;
  border: 2px solid currentColor;
  border-radius: 52% 48% 51% 49% / 44% 55% 45% 56%;
  font-family: "NOVA Hand", cursive;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 650;
  line-height: 1;
  transform: rotate(-1.2deg);
}

.address {
  color: rgba(85, 32, 6, 0.84);
  font-size: clamp(13px, 1.05vw, 16px);
  font-weight: 540;
  line-height: 1.35;
}

.address--desktop {
  max-width: 340px;
  margin: 0 0 0 auto;
  padding-right: 86px;
  text-align: right;
}

.address--mobile {
  display: none;
}

.motion-toggle {
  position: absolute;
  top: max(22px, env(safe-area-inset-top));
  right: clamp(28px, 4vw, 72px);
  min-width: 64px;
  min-height: 38px;
  padding: 7px 12px;
  color: var(--ink);
  background: rgba(255, 249, 240, 0.45);
  border: 1.5px solid rgba(85, 32, 6, 0.4);
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.motion-toggle[aria-pressed="true"] {
  color: var(--milk);
  background: var(--ink);
}

.motion-toggle:focus-visible,
.social:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--ochre);
  outline-offset: 4px;
}

.story {
  position: relative;
  min-height: 0;
}

.speech {
  position: absolute;
  top: 1%;
  left: 50%;
  z-index: 12;
  width: min(740px, 62vw);
  min-height: clamp(92px, 14vh, 154px);
  display: grid;
  place-items: center;
  padding: 17px clamp(28px, 4vw, 54px) 22px;
  background: rgba(255, 249, 240, 0.52);
  border: 3px solid var(--ink);
  border-radius: 49% 51% 46% 54% / 54% 45% 55% 46%;
  transform: translateX(-50%) rotate(-0.35deg);
  box-shadow: 0 12px 30px rgba(85, 32, 6, 0.04);
}

.speech::after {
  content: "";
  position: absolute;
  inset: 5px -5px -4px 4px;
  z-index: -1;
  border: 1.5px solid rgba(85, 32, 6, 0.56);
  border-radius: 51% 49% 53% 47% / 46% 56% 44% 54%;
  transform: rotate(0.75deg);
}

.speech p {
  margin: 0;
  font-family: "NOVA Hand", cursive;
  font-size: clamp(35px, 4.1vw, 66px);
  font-weight: 650;
  line-height: 0.94;
  text-align: center;
  text-wrap: balance;
}

.doodle {
  position: absolute;
  z-index: 4;
  width: 54px;
  fill: none;
  stroke: var(--ochre);
  stroke-width: 5;
  stroke-linecap: round;
}

.doodle--star {
  top: 6%;
  left: clamp(32px, 7vw, 130px);
  transform: rotate(6deg);
}

.doodle--rays {
  top: 3%;
  right: clamp(36px, 8vw, 150px);
  transform: rotate(-11deg);
}

.scene {
  position: absolute;
  inset: clamp(120px, 19vh, 190px) 0 0;
  overflow: visible;
}

.figure {
  position: absolute;
  z-index: 5;
  bottom: clamp(5px, 1.4vh, 18px);
  transform-origin: 50% 100%;
  will-change: transform, opacity;
}

.figure__art {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 100%;
  will-change: transform;
  filter: drop-shadow(0 9px 7px rgba(85, 32, 6, 0.05));
}

.figure--walker {
  left: 2%;
  z-index: 8;
  width: clamp(150px, 17vw, 260px);
}

.figure--sipper {
  left: 35.5%;
  z-index: 6;
  width: clamp(108px, 11vw, 176px);
}

.figure--chat {
  right: 2.5%;
  width: clamp(350px, 39vw, 650px);
}

.ground {
  position: absolute;
  right: 3.5%;
  bottom: clamp(2px, 1vh, 12px);
  left: 3.5%;
  z-index: 2;
  height: 16px;
  border-top: 3px solid var(--ink);
  border-radius: 51% 49% 0 0;
  transform: rotate(-0.2deg);
  opacity: 0.72;
}

.ground::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 7%;
  left: 9%;
  border-top: 1px solid rgba(85, 32, 6, 0.5);
  transform: rotate(0.35deg);
}

.neighbor-tag {
  position: absolute;
  right: clamp(20px, 3vw, 54px);
  bottom: 2%;
  z-index: 10;
  margin: 0;
  padding: 6px 18px 8px;
  background: rgba(245, 233, 216, 0.75);
  border: 2px solid currentColor;
  border-radius: 55% 45% 50% 50% / 46% 53% 47% 54%;
  font-family: "NOVA Hand", cursive;
  font-size: clamp(21px, 2vw, 30px);
  font-weight: 650;
  line-height: 1;
  transform: rotate(-1.3deg);
}

.poster__foot {
  position: relative;
  z-index: 30;
  display: grid;
  place-items: center;
  min-height: 96px;
  padding: 12px clamp(24px, 4vw, 72px) max(20px, env(safe-area-inset-bottom));
}

.socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.social {
  min-width: 150px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 19px;
  color: var(--ink);
  background: rgba(255, 249, 240, 0.58);
  border: 2px solid currentColor;
  border-radius: 999px;
  box-shadow: 0 5px 0 rgba(85, 32, 6, 0.12);
  font-size: 15px;
  font-weight: 680;
  line-height: 1;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.social svg {
  width: 22px;
  height: 22px;
  fill: var(--ink);
}

.social--instagram svg {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
}

.social--instagram .social__dot {
  fill: var(--ink);
  stroke: none;
}

.social:hover {
  background: rgba(255, 249, 240, 0.92);
  transform: translateY(-2px) rotate(-0.25deg);
  box-shadow: 0 7px 0 rgba(85, 32, 6, 0.12);
}

.social:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(85, 32, 6, 0.12);
}

@media (max-width: 760px) {
  .poster::before {
    inset: 5px;
    border-radius: 14px 10px 16px 12px;
  }

  .poster__head {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 91px;
    padding: max(13px, env(safe-area-inset-top)) 16px 4px;
  }

  .brand {
    width: clamp(154px, 44vw, 196px);
  }

  .opening-note {
    margin-top: -2px;
    padding: 3px 12px 5px;
    border-width: 1.5px;
    font-size: clamp(17px, 5vw, 22px);
  }

  .address--desktop {
    display: none;
  }

  .motion-toggle {
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
    min-width: 50px;
    min-height: 32px;
    padding: 5px 9px;
    font-size: 10px;
  }

  .speech {
    top: 1%;
    width: calc(100% - 28px);
    min-height: clamp(82px, 15vh, 116px);
    padding: 13px 20px 17px;
    border-width: 2px;
  }

  .speech p {
    font-size: clamp(30px, 9.3vw, 44px);
    line-height: 0.94;
  }

  .doodle {
    width: 34px;
    stroke-width: 5;
  }

  .doodle--star {
    top: 29%;
    left: 8px;
  }

  .doodle--rays {
    top: 27%;
    right: 8px;
  }

  .scene {
    inset: clamp(94px, 17vh, 130px) 0 0;
  }

  .figure--walker {
    left: -2%;
    width: clamp(112px, 35vw, 160px);
  }

  .figure--sipper {
    left: 20%;
    z-index: 4;
    width: clamp(78px, 24vw, 112px);
  }

  .figure--chat {
    right: -10%;
    width: clamp(235px, 72vw, 340px);
  }

  .figure {
    bottom: clamp(48px, 8.6vh, 72px);
  }

  .ground {
    right: 4%;
    bottom: clamp(45px, 8.1vh, 68px);
    left: 4%;
    border-width: 2px;
  }

  .neighbor-tag {
    display: none;
  }

  .poster__foot {
    min-height: 104px;
    align-content: start;
    gap: 6px;
    padding: 7px 12px max(13px, env(safe-area-inset-bottom));
  }

  .socials {
    width: 100%;
    gap: 8px;
  }

  .social {
    min-width: 0;
    min-height: 48px;
    flex: 1 1 0;
    gap: 7px;
    padding: 9px 12px;
    font-size: 14px;
    box-shadow: 0 4px 0 rgba(85, 32, 6, 0.12);
  }

  .social svg {
    width: 20px;
    height: 20px;
  }

  .address--mobile {
    display: block;
    margin: 0;
    font-size: 11px;
    line-height: 1.25;
    text-align: center;
  }
}

@media (max-width: 350px) {
  .poster__head {
    min-height: 78px;
    padding-top: max(8px, env(safe-area-inset-top));
  }

  .brand {
    width: 140px;
  }

  .opening-note {
    font-size: 16px;
  }

  .motion-toggle {
    top: max(8px, env(safe-area-inset-top));
    right: 9px;
  }

  .speech {
    width: calc(100% - 20px);
    min-height: 74px;
    padding: 10px 15px 13px;
  }

  .speech p {
    font-size: clamp(27px, 9.2vw, 34px);
  }

  .scene {
    top: 86px;
  }

  .poster__foot {
    min-height: 92px;
    padding-top: 4px;
  }

  .social {
    min-height: 44px;
    padding: 8px 9px;
    font-size: 13px;
  }

  .social svg {
    width: 18px;
    height: 18px;
  }

  .address--mobile {
    font-size: 10px;
  }
}

@media (max-height: 620px) {
  .poster__head {
    min-height: 72px;
    padding-top: max(7px, env(safe-area-inset-top));
  }

  .brand {
    width: 138px;
  }

  .opening-note {
    font-size: 16px;
  }

  .speech {
    min-height: 70px;
    padding-top: 8px;
    padding-bottom: 11px;
  }

  .speech p {
    font-size: clamp(26px, 7.8vh, 34px);
  }

  .scene {
    inset: 76px 0 0;
  }

  .poster__foot {
    min-height: 86px;
  }

  .social {
    min-height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-toggle {
    display: none;
  }

  .social {
    transition: none;
  }
}
