@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/inter-regular.ttf') format('truetype');
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/assets/inter-black.ttf') format('truetype');
}

:root {
  color-scheme: light;
  font-family: Inter, Arial, sans-serif;
  color: #080808;
  background: #fdfcf8;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }

.page {
  position: relative;
  min-height: 560px;
  min-height: max(560px, 100svh);
  display: grid;
  grid-template-rows: 1fr 150px;
  padding: 0 48px 24px;
}

.intro {
  align-self: center;
  text-align: center;
  padding-top: 82px;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(64px, 5.6vw, 80px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.06em;
  padding-right: 0.06em;
}

.perch { position: relative; display: inline-block; }

.bird {
  position: absolute;
  width: 0.45em;
  min-width: 28px;
  aspect-ratio: 1161 / 1355;
  left: 50%;
  bottom: calc(100% - 0.18em);
  transform: translateX(-50%);
  image-rendering: pixelated;
  pointer-events: none;
}

.bird img { display: block; width: 100%; height: auto; }
.bird-head { display: none; position: absolute; inset: 0; transform-origin: 44% 44%; }
.bird-head img { clip-path: inset(0 0 55% 0); }
.bird-eyelid, .pet-eyelid {
  display: none;
  position: absolute;
  background: linear-gradient(var(--fur) 0 48%, var(--eye, #482509) 48% 65%, var(--fur) 65%);
}
.bird-eyelid { left: 31.8%; top: 29.8%; width: 8.8%; height: 10.9%; --fur: #7aacf5; --eye: #112344; }
.dog-eye-left, .dog-eye-right { top: 32.5%; width: 2.6%; height: 5%; --fur: #efad65; }
.dog-eye-left { left: 29.1%; }
.dog-eye-right { left: 36.8%; }
.cat-eye-left, .cat-eye-right { top: 49.3%; width: 2.7%; height: 4.6%; }
.cat-eye-left { left: 66.3%; --fur: #ffc47f; }
.cat-eye-right { left: 73%; --fur: #ffe1ae; }
.intro p {
  margin: 0;
  color: #77797c;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.035em;
}

.footer { position: relative; }

.contact {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  color: #37393b;
  font-size: 11px;
  line-height: 1.5;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  white-space: nowrap;
  padding: 14px 6px;
}

.contact:hover { color: #000; }
.contact:focus-visible { outline: 2px solid #37393b; outline-offset: 6px; border-radius: 2px; }

.pets {
  position: absolute;
  width: 170px;
  aspect-ratio: 3 / 2;
  bottom: -2px;
  right: -18px;
  image-rendering: pixelated;
  pointer-events: none;
}

.pets img { display: block; width: 100%; height: auto; }
.pet-sprite, .bird-sprite {
  display: none;
  position: absolute;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}
.pet-sprite {
  left: 6%; top: 1%; width: 84%; height: 88%;
  background-size: 300% 200%;
}
.bird-sprite {
  left: -6%; top: 3%; width: 112%; height: 96%;
  background-size: 300% 100%;
}
.pet-sprite[data-frame="1"] { background-position: 50% 0; }
.pet-sprite[data-frame="2"] { background-position: 100% 0; }
.pet-sprite[data-frame="3"] { background-position: 0 100%; }
.pet-sprite[data-frame="4"] { background-position: 50% 100%; }
.pet-sprite[data-frame="5"] { background-position: 100% 100%; }
.bird-sprite[data-frame="0"] { background-position: 0 0; }
.bird-sprite[data-frame="1"] { background-position: 50% 0; }
.bird-sprite[data-frame="2"] { background-position: 100% 0; }

@media (prefers-reduced-motion: no-preference) {
  .bird[data-motion="blink"] .bird-eyelid { display: block; animation: blink 240ms steps(1) both; }
  .bird[data-motion="tilt"] .bird-base { clip-path: inset(43% 0 0 0); }
  .bird[data-motion="tilt"] .bird-head { display: block; animation: bird-tilt 1000ms ease-in-out both; }
  .pets[data-motion="dog-blink"] :is(.dog-eye-left, .dog-eye-right) { display: block; animation: blink 300ms steps(1) both; }
  .pets[data-motion="cat-blink"] :is(.cat-eye-left, .cat-eye-right) { display: block; animation: blink 650ms steps(1) both; }
  .pets[data-animal="dog"] .pets-base {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 43% 100%, 43% 52%, 50% 52%);
  }
  .pets[data-animal="dog"] .pet-sprite {
    display: block;
    clip-path: polygon(0 0, 54% 0, 54% 62%, 43% 62%, 43% 100%, 0 100%);
  }
  .pets[data-animal="cat"] .pets-base {
    clip-path: polygon(0 0, 60% 0, 60% 62%, 63% 62%, 63% 100%, 0 100%);
  }
  .pets[data-animal="cat"] .pet-sprite { display: block; clip-path: inset(0 0 0 64%); }
  .bird[data-motion="flutter"] .bird-base { visibility: hidden; }
  .bird[data-motion="flutter"] .bird-sprite { display: block; }
  .bird[data-motion="hop"] { animation: bird-hop 1250ms ease-in-out both; }
  .bird[data-motion="flutter"] { animation: bird-hover 1300ms ease-in-out both; }
}
@keyframes blink {
  0%, 75%, 100% { opacity: 0; }
  15% { opacity: 1; }
}
@keyframes bird-tilt {
  0%, 100% { transform: rotate(0); }
  25%, 65% { transform: rotate(-10deg); }
}
@keyframes bird-hop {
  0%, 100% { transform: translateX(-50%); }
  15% { transform: translateX(-50%) translateY(1px) scaleY(.94); }
  38% { transform: translateX(-50%) translateY(-13px) rotate(-5deg); }
  65% { transform: translateX(-50%) translateY(1px) scaleY(.95); }
  80% { transform: translateX(-50%) translateY(-2px); }
}
@keyframes bird-hover {
  0%, 100% { transform: translateX(-50%); }
  25%, 70% { transform: translateX(-50%) translateY(-4px); }
}
@media (max-width: 600px) {
  .page {
    min-height: max(500px, 100svh);
    grid-template-rows: 1fr 125px;
    padding: 0 24px max(22px, env(safe-area-inset-bottom));
  }
  .intro { padding-top: 22px; }
  h1 { font-size: 54px; margin-bottom: 16px; }
  .bird { bottom: calc(100% - 0.22em); }
  .intro p { font-size: 14px; line-height: 1.5; }
  .intro p span { display: block; }
  .contact { left: 15%; transform: none; bottom: 13px; }
  .pets { width: 135px; right: -15px; bottom: -2px; }
}

@media (max-width: 350px) {
  .page { padding-inline: 18px; }
  .contact { left: 3%; }
  .pets { width: 120px; }
}
