@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/Fredoka-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

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

@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/Nunito-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/Nunito-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #12324d;
  --blue: #b8eaf5;
  --deep-blue: #173858;
  --green: #71b66a;
  --green-light: #a6d876;
  --cream: #fff9e6;
  --yellow: #ffd548;
  --coral: #ee6e72;
  --aqua: #70d0d0;
  font-family: "Nunito", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--green);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--green);
}

body.is-locked {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

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

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.visually-hidden,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: max(10px, env(safe-area-inset-top));
  left: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 4px 18px #12324d33;
}

.entry-screen {
  position: fixed;
  z-index: 20;
  inset: 0;
  overflow: hidden;
  padding: max(12px, env(safe-area-inset-top)) 0 max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #b8eaf5 0%, #d9f4f6 49%, #a6d876 100%);
  opacity: 1;
  transform: translateY(0);
  transition: transform 880ms cubic-bezier(.72, 0, .24, 1), opacity 620ms ease;
  isolation: isolate;
}

.entry-screen::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse at 48% 44%, #fff9e68a 0, transparent 42%), linear-gradient(115deg, transparent 0 28%, #ffffff20 48%, transparent 66%);
  content: "";
  pointer-events: none;
}

.entry-screen.is-opening {
  opacity: .98;
  transform: translateY(-102%);
}

.entry-scene {
  position: relative;
  width: min(100%, 430px);
  height: 100%;
  min-height: 560px;
  max-height: 1040px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 0;
}

.entry-landscape {
  position: absolute;
  z-index: -1;
  inset: -1px 0;
  width: 100%;
  height: calc(100% + 2px);
  overflow: visible;
}

.entry-hill--back {
  fill: #71b66a;
}

.entry-hill--front {
  fill: #8dcc6c;
}

.entry-path {
  fill: none;
  stroke: #f1d483;
  stroke-width: 26;
  stroke-linecap: round;
}

.entry-path-dashes {
  fill: none;
  stroke: #fff9e6;
  stroke-width: 3;
  stroke-dasharray: 2 15;
  stroke-linecap: round;
  animation: path-travel 13s linear infinite;
}

.entry-sun {
  fill: #ffd548;
  opacity: .94;
  transform-box: fill-box;
  transform-origin: center;
  animation: sun-breathe 4.8s ease-in-out infinite;
}

.entry-star {
  fill: var(--coral);
  transform-box: fill-box;
  transform-origin: center;
  animation: star-twinkle 3.2s ease-in-out infinite;
}

.entry-star--two {
  fill: var(--yellow);
  animation-delay: -1.3s;
}

.entry-content {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  max-height: inherit;
  margin: 0 auto;
}

.entry-logo {
  position: absolute;
  top: clamp(28px, 5.4vh, 62px);
  left: 50%;
  display: block;
  width: clamp(165px, 56vw, 232px);
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 3px 0 #fff9e699);
  animation: logo-float 4.2s ease-in-out infinite;
}

.entry-copy {
  position: absolute;
  z-index: 2;
  top: clamp(130px, 20.5vh, 198px);
  left: 0;
  width: 100%;
  color: var(--ink);
  text-align: center;
}

.entry-eyebrow,
.entry-age,
.entry-date,
.entry-hint {
  margin: 0;
  font-size: clamp(10px, 2.7vw, 12px);
  font-weight: 800;
  letter-spacing: .16em;
}

.entry-eyebrow {
  color: #173858;
}

.entry-copy h1 {
  margin: 4px 0 0;
  color: var(--deep-blue);
  font-family: "Fredoka", sans-serif;
  font-size: clamp(46px, 14vw, 64px);
  font-weight: 700;
  line-height: .98;
  text-shadow: 2px 3px 0 var(--cream), -2px -2px 0 var(--cream), 0 5px 12px #12324d16;
}

.entry-age {
  margin-top: 8px;
  font-size: clamp(11px, 3vw, 14px);
}

.entry-date {
  margin-top: 8px;
  color: #174569;
  font-size: clamp(10px, 2.7vw, 12px);
}

.entry-cast {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.entry-cast::before {
  position: absolute;
  right: 15%;
  bottom: 12%;
  left: 15%;
  height: 22%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #fff9e685, #fff9e600 70%);
  content: "";
}

.entry-mateo,
.entry-bluey,
.entry-bingo {
  position: absolute;
  display: block;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px #12324d24);
}

.entry-mateo {
  z-index: 2;
  right: 9%;
  bottom: 20%;
  width: min(41%, 174px);
  max-height: 37%;
  animation: mateo-arrive 820ms 200ms cubic-bezier(.2,.8,.25,1) both;
}

.entry-bluey {
  z-index: 3;
  bottom: 20%;
  left: 4%;
  width: min(44%, 183px);
  max-height: 34%;
  transform-origin: 50% 95%;
  animation: bluey-hop 2.9s 720ms ease-in-out infinite;
}

.entry-bingo {
  z-index: 4;
  right: 0;
  bottom: 23%;
  width: min(27%, 108px);
  max-height: 22%;
  transform-origin: 65% 95%;
  animation: bingo-kite-dance 3.1s 600ms ease-in-out infinite;
}

.entry-actions {
  position: absolute;
  z-index: 7;
  right: 0;
  bottom: max(39px, 6.4vh);
  left: 0;
  display: grid;
  justify-items: center;
  gap: 11px;
}

.open-button {
  display: inline-flex;
  min-width: 225px;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 11px 22px;
  border: 2px solid var(--cream);
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .09em;
  box-shadow: 0 6px 0 #0c2941, 0 10px 24px #12324d28, inset 0 1px 0 #ffffff3d;
  transition: transform 170ms ease, box-shadow 170ms ease, background-color 170ms ease;
}

.open-button:hover {
  background: #1c496d;
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #0c2941, 0 14px 25px #12324d32, inset 0 1px 0 #ffffff3d;
}

.open-button:active {
  transform: translateY(3px) scale(.985);
  box-shadow: 0 2px 0 #0c2941, 0 5px 15px #12324d22;
}

.open-paw {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
}

.entry-music-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid #12324d32;
  border-radius: 999px;
  background: #fff9e6b8;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  transition: background-color 180ms ease, transform 180ms ease;
}

.entry-music-button span {
  color: #315e7c;
  font-size: 17px;
}

.entry-music-button:hover {
  background: var(--cream);
  transform: translateY(-1px);
}

.entry-hint {
  position: absolute;
  right: 0;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 0;
  color: #12324db5;
  font-size: 9px;
  text-align: center;
}

.invitation {
  min-height: 100vh;
  padding: 0;
  background: var(--green);
  opacity: 0;
  transition: opacity 600ms ease;
}

.invitation.is-visible {
  opacity: 1;
}

.invite-shell {
  width: min(100%, 430px);
  margin: 0 auto;
}

.master-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 390 / 4800;
  overflow: hidden;
}

.master-art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.master-action {
  position: absolute;
  z-index: 3;
  display: block;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: transparent;
  outline-offset: 2px;
  touch-action: manipulation;
}

.master-action--calendar {
  top: 32.72%;
  left: 18.7%;
  width: 62.6%;
  height: 2.25%;
}

.master-action--location {
  top: 53.04%;
  left: 26.2%;
  width: 48%;
  height: 1.36%;
}

.master-action--whatsapp {
  top: 89.58%;
  left: 9%;
  width: 82%;
  height: 4.45%;
}

.master-action:focus-visible {
  outline: 3px solid var(--cream);
  box-shadow: 0 0 0 5px var(--deep-blue), 0 0 20px #12324d70;
}

.motion-trigger {
  position: absolute;
  z-index: 1;
  right: 0;
  left: 0;
  height: 1px;
  pointer-events: none;
}

.music-toggle {
  position: fixed;
  z-index: 35;
  right: max(14px, env(safe-area-inset-right));
  top: max(10px, env(safe-area-inset-top));
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #fff9e6;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  cursor: pointer;
  font-size: 25px;
  box-shadow: 0 3px 12px #12324d33;
  transition: transform 180ms ease, background-color 180ms ease;
}

.music-toggle:hover {
  background: #1c496d;
  transform: scale(1.06);
}

.music-toggle[aria-expanded="true"] {
  background: var(--coral);
  color: var(--ink);
}

.music-drawer {
  position: fixed;
  z-index: 34;
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(74px + env(safe-area-inset-bottom));
  width: min(92vw, 370px);
  animation: drawer-arrive 260ms cubic-bezier(.2,.8,.25,1) both;
}

body.is-locked .music-drawer {
  bottom: calc(84px + env(safe-area-inset-bottom));
}

.music-panel {
  padding: 14px 14px 11px;
  border: 2px solid var(--deep-blue);
  border-radius: 20px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 12px 32px #12324d40;
}

.music-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.music-heading h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .13em;
}

.music-heading p {
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.music-close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid #12324d2b;
  border-radius: 50%;
  background: #ffffffa6;
  color: var(--ink);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.music-player {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  border: 1px solid #12324d20;
  border-radius: 15px;
  background: #fffdf4;
}

.music-playback {
  display: flex;
  width: 86px;
  min-height: 58px;
  flex: 0 0 86px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  border-radius: 13px;
  background: var(--ink);
  color: var(--cream);
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}

.music-playback span:first-child {
  font-size: 21px;
  line-height: 1;
}

.music-playback:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.music-track {
  min-width: 0;
  flex: 1;
}

.music-seek {
  display: block;
  width: 100%;
  min-height: 30px;
  margin: 0;
  accent-color: var(--coral);
  cursor: pointer;
}

.music-seek:disabled {
  cursor: default;
}

.music-times {
  display: flex;
  justify-content: space-between;
  color: #12324db0;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.music-status {
  min-height: 18px;
  margin: 8px 2px 0;
  color: #12324db5;
  font-size: 11px;
  font-weight: 700;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

@keyframes path-travel {
  to { stroke-dashoffset: -170; }
}

@keyframes sun-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes star-twinkle {
  0%, 100% { opacity: .78; transform: scale(.88) rotate(-5deg); }
  50% { opacity: 1; transform: scale(1.12) rotate(8deg); }
}

@keyframes logo-float {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -3px); }
}

@keyframes mateo-arrive {
  from { opacity: 0; transform: translateY(11px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bluey-hop {
  0%, 100% { transform: translateY(0) rotate(0); }
  36% { transform: translateY(-11px) rotate(-1.5deg); }
  70% { transform: translateY(1px) rotate(.8deg); }
}

@keyframes bingo-kite-dance {
  0%, 100% { transform: translateY(0) rotate(0); }
  42% { transform: translateY(-6px) rotate(2deg); }
  72% { transform: translateY(1px) rotate(-1.3deg); }
}

@keyframes drawer-arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-height: 680px) {
  .entry-logo { top: 22px; width: clamp(150px, 43vw, 190px); }
  .entry-copy { top: 104px; }
  .entry-copy h1 { font-size: clamp(42px, 11vw, 54px); }
  .entry-mateo { bottom: 19%; max-height: 29%; }
  .entry-bluey { bottom: 19%; max-height: 28%; }
  .entry-bingo { bottom: 23%; max-height: 18%; }
  .entry-actions { bottom: max(35px, 5.3vh); gap: 7px; }
  .open-button { min-height: 50px; }
  .entry-music-button { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .entry-screen.is-opening {
    transform: none;
    opacity: 0;
  }
}
