/* Download page — Albert: Akademia Mistrzów (Fale Loki Koki). Static, no build step.
   An invitation card over the Akademia view between the curtains (the trailer's end card art). */
:root {
  --bordo: #86004f;
  --bordo-deep: #45002a;
  --plum: #2a0a1f;
  --orange: #e9511d;
  --pink: #e83c6a;
  --gold: #ceab5b;
  --gold-light: #f4dc9a;
  --gold-pale: #fbefcf;
  --cream: #fff6e8;
  --ink: #3d0c2c;
  --ink-soft: #6b3a57;
  --display: 'Baloo 2', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font: 400 16px/1.5 var(--body);
  color: var(--ink);
  background: var(--plum);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

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

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------------------------------------------------------------- background */
.bg,
.bg img {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.bg img {
  object-fit: cover;
  object-position: 50% 45%;
}

body::before {
  /* warm the art toward plum at the bottom so the footer reads */
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(42, 10, 31, 0.1), rgba(42, 10, 31, 0.08) 45%, rgba(42, 10, 31, 0.78));
  pointer-events: none;
}

/* ---------------------------------------------------------------- invitation card */
.stage {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 118px 16px 28px;
}

.invite {
  position: relative;
  width: min(100%, 520px);
  padding: 46px clamp(18px, 5vw, 40px) 28px;
  border-radius: 30px;
  text-align: center;
  background:
    radial-gradient(ellipse 90% 40% at 50% 0%, #fffdf7, transparent 70%),
    linear-gradient(to bottom, #fff8ec, #fbe9cf);
  box-shadow:
    inset 0 0 0 2px var(--gold),
    inset 0 0 0 7px #fff8ec,
    inset 0 0 0 8.5px rgba(206, 171, 91, 0.75),
    0 10px 0 rgba(69, 0, 42, 0.35),
    0 34px 70px rgba(42, 10, 31, 0.5);
  animation: card-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* gold sparkles in the corners */
.invite::before,
.invite::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ceab5b' d='M12 0c.8 6.6 5.4 11.2 12 12-6.6.8-11.2 5.4-12 12-.8-6.6-5.4-11.2-12-12C6.6 11.2 11.2 6.6 12 0z'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

.invite::before {
  left: 18px;
  top: 18px;
}

.invite::after {
  right: 18px;
  bottom: 18px;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
}

.invite__ribbon {
  position: absolute;
  top: -19px;
  left: 50%;
  translate: -50% 0;
  margin: 0;
  filter: drop-shadow(0 4px 0 rgba(69, 0, 42, 0.45));
}

.invite__ribbon span {
  display: block;
  padding: 9px 38px 8px;
  font: 800 17px/1 var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-pale);
  background: linear-gradient(to bottom, #a8155f, var(--bordo));
  clip-path: polygon(0 0, 100% 0, calc(100% - 15px) 50%, 100% 100%, 0 100%, 15px 50%);
}

.invite__logo {
  margin: 4px auto 6px;
  width: min(100%, 360px);
}

.invite__logo img {
  filter: drop-shadow(0 8px 14px rgba(69, 0, 42, 0.25));
}

.invite__lead {
  margin: 0 0 6px;
  font: 800 clamp(22px, 5.6vw, 27px) / 1.15 var(--display);
  color: var(--bordo);
  text-wrap: balance;
}

.invite__text {
  margin: 0 auto;
  max-width: 34ch;
  font: 500 16px/1.5 var(--body);
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ---------------------------------------------------------------- download area */
.get {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1.5px dashed rgba(134, 0, 79, 0.22);
}

/* one view per platform: <html data-platform="android|ios|all"> */
[data-for] {
  display: none;
}

html[data-platform='android'] [data-for='android'],
html[data-platform='ios'] [data-for='ios'],
html[data-platform='all'] [data-for='all'] {
  display: block;
}

html[data-platform='android'] [data-store='ios'],
html[data-platform='ios'] [data-store='android'] {
  display: none;
}

.get__title {
  margin: 0 0 14px;
  font: 700 13px/1.2 var(--body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bordo);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 18px;
}

.slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 238px;
  padding: 12px 22px 12px 18px;
  border-radius: 18px;
  text-align: left;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(to bottom, #ff9146, var(--orange));
  box-shadow: 0 5px 0 #a93a0f, 0 12px 24px rgba(42, 10, 31, 0.3);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.store--android {
  background: linear-gradient(to bottom, #ff86a4, var(--pink));
  box-shadow: 0 5px 0 #a8163f, 0 12px 24px rgba(42, 10, 31, 0.3);
}

.store svg {
  width: 32px;
  height: 32px;
  flex: none;
}

.store small {
  display: block;
  font: 600 12.5px/1.2 var(--body);
  opacity: 0.92;
}

.store__name {
  display: block;
  font: 800 22px/1.05 var(--display);
}

.slot.is-live .store:hover,
.slot.is-live .store:focus-visible {
  transform: translateY(-3px) scale(1.02);
}

.slot.is-live .store:active {
  transform: translateY(3px);
}

/* not in the store yet */
.slot:not(.is-live) .store {
  cursor: default;
  filter: grayscale(0.45) brightness(0.96);
  opacity: 0.82;
}

.slot__soon {
  order: 1;
  padding: 3px 14px;
  border-radius: 999px;
  font: 800 12.5px/1.3 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--plum);
  background: linear-gradient(to bottom, var(--gold-light), var(--gold));
  box-shadow: 0 2px 0 rgba(69, 0, 42, 0.3);
}

.slot.is-live .slot__soon {
  display: none;
}

.slot__note {
  order: 2;
  font: 500 13px/1.3 var(--body);
  color: var(--ink-soft);
}

.get__other button {
  margin-top: 12px;
  padding: 8px 10px;
  border: 0;
  background: none;
  font: 600 14.5px/1.3 var(--body);
  color: var(--bordo);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(134, 0, 79, 0.4);
  cursor: pointer;
}

.get__wait {
  margin: 16px auto 0;
  max-width: 36ch;
  font: 500 14px/1.45 var(--body);
  color: var(--ink-soft);
}

.get__wait[hidden] {
  display: none;
}

.qr {
  margin: 18px auto 0;
  max-width: 410px;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(206, 171, 91, 0.6);
  text-align: left;
}

html[data-platform='all'] .qr {
  display: flex;
  align-items: center;
  gap: 14px;
}

.picked-other .qr {
  display: none !important;
}

.qr img {
  width: 116px;
  height: 116px;
  flex: none;
  image-rendering: pixelated;
}

.qr p {
  margin: 0;
  font: 500 14px/1.45 var(--body);
  color: var(--ink-soft);
}

.qr b {
  display: block;
  color: var(--bordo);
}

.invite__more {
  display: inline-block;
  margin-top: 20px;
  font: 700 15px/1.3 var(--body);
  color: #b8400f;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.invite__more::after {
  content: ' →';
}

/* Albert stands on the top edge of the card on phones, beside it on wide screens */
.invite__albert {
  position: absolute;
  right: 10px;
  bottom: calc(100% - 12px);
  width: 78px;
  pointer-events: none;
  filter: drop-shadow(0 8px 10px rgba(42, 10, 31, 0.4));
  animation: bob 4s ease-in-out infinite;
}

@keyframes bob {
  50% {
    translate: 0 -6px;
  }
}

@media (min-width: 900px) {
  .stage {
    padding: 72px 24px 36px;
  }
  .invite {
    width: 600px; /* room for both store buttons side by side */
  }
  .invite__albert {
    right: -184px;
    bottom: 24px;
    width: 196px;
  }
}

/* ---------------------------------------------------------------- footer */
.foot {
  padding: 24px 16px calc(28px + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--cream);
  background: linear-gradient(to bottom, rgba(42, 10, 31, 0.92), var(--plum));
  box-shadow: 0 -1px 0 rgba(244, 220, 154, 0.55);
}

.foot img {
  width: 116px;
  margin: 0 auto 10px;
}

.foot p {
  margin: 0;
  font: 500 13px/1.5 var(--body);
  opacity: 0.85;
}

@media (max-width: 380px) {
  .store {
    min-width: 0;
    width: 100%;
  }
  .slot {
    width: 100%;
  }
  .qr {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .invite,
  .invite__albert {
    animation: none;
  }
}
