@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 800;
  font-stretch: 125%;
  font-display: swap;
  src: url("../assets/archivo-latin-800-expanded.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #d50108;
  --btn-bg: #ffffff;
  --btn-text: #d50108;
  --text: #ffffff;
  box-sizing: border-box;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #d50108; }
}

:root[data-theme="dark"] { --bg: #d50108; }
* { box-sizing: border-box; }

html,
body {
  margin: 0;
  background: var(--bg) url("../assets/bg.jpg") center / cover no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: "Archivo", "Arial Black", Helvetica, Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 800;
  overflow-x: hidden;
}

.page {
  --w: 100vw;
  --drop: 4%;
  --zoom: 1.04;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  background: var(--bg);
  overflow: hidden;
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("../assets/last.jpg") center bottom / cover no-repeat;
  transform: translateY(var(--drop)) scale(var(--zoom));
  transform-origin: 50% 100%;
}

.page.playing::before { background-image: url("../assets/first.jpg"); }
.page.static::before { background-image: url("../assets/last.jpg"); }

.page > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transform: translateY(var(--drop)) scale(var(--zoom));
  transform-origin: 50% 100%;
}

.page.playing > video { opacity: 1; }
.page.static > video { display: none; }

@media (min-aspect-ratio: 4/5) {
  .page {
    --w: min(100vw, calc((100svh - 48px) * 9 / 16));
    position: relative;
    inset: auto;
    width: var(--w);
    height: calc(100svh - 48px);
    min-height: 0;
    margin: 24px auto;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(60, 0, 0, .45);
  }
}

main {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(7svh, 36px) 24px calc(24px + env(safe-area-inset-bottom, 0px));
  gap: 6svh;
}

@media (min-aspect-ratio: 4/5) {
  main { padding-top: 7%; gap: 5%; }
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(calc(var(--w) * .58), 300px);
}

.bird { width: 23%; height: auto; margin-bottom: 5%; }
.word { width: 100%; display: flex; align-items: center; justify-content: center; gap: 3.2%; }
.word img { height: auto; display: block; }
.w1 { width: 43.8%; }
.w2 { width: 53%; }

.bird,
.word img {
  opacity: 0;
  animation: appear .55s ease-out forwards;
}

.bird {
  animation-name: pop;
  animation-timing-function: cubic-bezier(.3, 1.6, .5, 1);
  animation-duration: .6s;
  animation-delay: .2s;
}

.w1,
.w2 { animation-delay: .2s; }

.page:not(.playing):not(.static) .bird,
.page:not(.playing):not(.static) .word img,
.page:not(.playing):not(.static) .links { animation-play-state: paused; }

@keyframes appear {
  from { opacity: 0; transform: scale(.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pop {
  from { opacity: 0; transform: scale(.5); }
  to { opacity: 1; transform: scale(1); }
}

.links {
  width: min(calc(var(--w) * .72), 320px);
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  opacity: 0;
  animation: fade .6s ease-out .2s forwards;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.note {
  font-style: italic;
  margin: 0 0 calc(3svh + 6px);
  text-align: center;
  color: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  font-stretch: 100%;
  text-shadow: 0 1px 8px rgba(120, 0, 0, .45);
}

.note br { display: block; content: ""; margin-bottom: 6px; }

a.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--btn-bg);
  color: var(--btn-text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: 16px;
  padding: 17px 20px;
  border-radius: 999px;
  transition: transform .15s;
}

a.btn:active { transform: scale(.97); }
a.btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
a.btn svg { width: 22px; height: 22px; fill: currentColor; flex: none; }

@media (prefers-reduced-motion: reduce) {
  .bird,
  .word img,
  .links { animation: none; opacity: 1; }
}
