/* v14 Pro League Passport: the cover (landing), checkpoint pages (intro), stamp pages (between), the gate. */

/* ================= landing: the cover ================= */
.pg--landing { align-items: end; padding-bottom: calc(var(--sb) + 26px); }
.land { width: 100%; max-width: 420px; display: grid; justify-items: center; gap: 26px; animation: landIn .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes landIn { from { opacity: 0; transform: translateY(24px); } }
.cover-wrap { position: relative; width: 206px; aspect-ratio: 5 / 7; perspective: 1300px; animation: float 5s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(-3deg) translateY(-6px); } }
.cover, .datapage { position: absolute; inset: 0; border-radius: 6px 14px 14px 6px; }
.datapage {
  background: var(--g-rose) no-repeat center / 360px, var(--g-wave) repeat, linear-gradient(170deg, var(--paper), var(--paper2));
  padding: 14px 12px 10px; display: grid; grid-template-rows: auto 1fr auto; color: var(--ink); box-shadow: 0 30px 50px rgba(0, 0, 0, .5);
}
.dp-top { display: flex; justify-content: space-between; font: 700 9px/1 var(--sans); letter-spacing: .2em; color: var(--visa); }
.dp-body { display: grid; grid-template-columns: 62px 1fr; gap: 10px; align-items: center; }
.dp-photo { width: 62px; height: 76px; border-radius: 4px; background: linear-gradient(#dfe6ef, #c3cede); color: rgba(24, 33, 59, .45); display: grid; place-items: end center; overflow: hidden; }
.dp-photo svg { width: 52px; }
.datapage dl { margin: 0; font: 600 11px/1.25 var(--sans); }
.datapage dt { font: 700 8px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.datapage dd { margin: 2px 0 0; font-family: var(--serif); font-size: 13px; }
.mrz--dp { font-size: 6.4px; }
.cover {
  transform-origin: left center; transform-style: preserve-3d; transition: transform 1.05s cubic-bezier(.6, 0, .2, 1);
  background: var(--g-gold) center / 230% no-repeat, radial-gradient(circle at 28% 18%, #24407a 0%, #12244a 55%, #0b1733 100%);
  box-shadow: inset 7px 0 10px -4px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(212, 175, 90, .3), 0 30px 50px rgba(0, 0, 0, .55);
}
.cover::after { content: ''; position: absolute; inset: 10px; border: 1px solid rgba(212, 175, 90, .35); border-radius: 4px 10px 10px 4px; pointer-events: none; }
.cover-face { position: absolute; inset: 0; display: grid; justify-items: center; align-content: center; gap: 10px; backface-visibility: hidden; padding: 18px; text-align: center; }
.cover-wrap.is-open { animation: none; transform: rotate(-2deg) scale(1.04); transition: transform .6s ease; }
.cover-wrap.is-open .cover { transform: rotateY(-168deg); }
.foil, .cover-k, .cover-t, .cover-s {
  background: linear-gradient(100deg, #b8913f 0%, #f6e2a4 35%, #c99d45 50%, #f6e2a4 65%, #b8913f 100%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 2.6s ease .8s both;
}
@keyframes shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
.cover-k { font: 700 10.5px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; }
.cover-t { font: 700 22px/1 var(--serif); letter-spacing: .2em; margin-left: .2em; }
.cover-s { font: 600 9.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; }
.cover-chip { color: var(--gold); width: 34px; margin-top: 6px; opacity: .9; }
.crest { display: block; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .4)); }
.land-copy { text-align: center; color: #fff; display: grid; gap: 14px; width: 100%; }
.land-copy .h1 { text-shadow: 0 2px 20px rgba(0, 0, 0, .5); }
.land-copy .lead { margin: 0; }
.land-pros { margin: 0; font: 700 11.5px/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.land-err { margin: 0; color: #ffd8d4; font: 600 15px/1.4 var(--sans); }
#startBtn.is-ready { animation: pulse 1.2s ease-in-out .4s 2; }
@media (min-width: 900px) {
  .pg--landing { align-items: center; }
  .land { max-width: 1000px; grid-template-columns: 340px 1fr; gap: 80px; align-items: center; }
  .cover-wrap { width: 300px; }
  .cover-t { font-size: 34px; }
  .land-copy { text-align: left; justify-items: start; max-width: 480px; }
  .land-copy .btn { max-width: 380px; }
}
@media (max-height: 700px) and (max-width: 899px) { .cover-wrap { width: 160px; } .land { gap: 18px; } .h1 { font-size: 29px; } }

/* ================= checkpoint page (intro) ================= */
.pg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 30px; }
.pg-slot { width: 52px; flex: none; }
.how { list-style: none; padding: 0; margin: 16px 0 14px; display: grid; gap: 9px; }
.how li { display: flex; align-items: center; gap: 12px; font: 600 16px/1.25 var(--sans); animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(.25s + var(--d) * .12s); }
.how li small { display: inline-block; min-width: 18px; color: var(--visa); font: 800 13px/1 var(--mono); }
.how-ic { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--navy); box-shadow: 0 0 0 1.5px rgba(24, 33, 59, .18); }
.how-ic svg { width: 22px; height: 22px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.pros { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.visa-photo { margin: 0; display: flex; gap: 9px; align-items: center; min-width: 0; }
.visa-photo img { width: 50px; height: 50px; object-fit: cover; border-radius: 5px; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); flex: none; filter: saturate(.85) contrast(1.05); }
.visa-photo figcaption { min-width: 0; display: grid; gap: 1px; }
.visa-photo b { font: 700 14.5px/1.2 var(--serif); }
.visa-photo span { font: 500 11.5px/1.25 var(--sans); color: var(--muted); }
.bigslot { display: none; }
.declare { position: relative; background: rgba(255, 255, 255, .62); border: 1.5px solid var(--line); border-radius: 16px; padding: 16px 14px 12px; }
.declare-k { margin: 0; font: 800 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #9b2c2c; }
.declare-q { margin: 6px 0 12px; font: 700 20px/1.2 var(--serif); }
.picks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pick {
  min-height: 52px; border-radius: 12px; border: 1.5px solid rgba(24, 33, 59, .24); background: #fff; color: var(--navy); cursor: pointer;
  font: 700 22px/1 var(--serif); box-shadow: 0 2px 0 rgba(24, 33, 59, .12); transition: transform .12s ease, background .2s ease, opacity .3s ease;
}
.pick:active { transform: scale(.92); }
.pick.is-picked { background: var(--navy); color: var(--gold-hi); border-color: var(--navy); transform: scale(1.06); }
.declare.is-done .pick:not(.is-picked) { opacity: .35; }
.declare-hint { margin: 10px 0 0; text-align: center; font: 600 13px/1.3 var(--sans); color: var(--muted); }
.declared {
  position: absolute; right: 12px; top: -18px; display: grid; justify-items: center; padding: 5px 12px 6px; border: 3.5px double var(--visa); border-radius: 8px;
  color: var(--visa); background: rgba(246, 241, 228, .85); font-family: var(--stampf); text-transform: uppercase; letter-spacing: .08em; --r: -9deg;
  opacity: 0; filter: url(#inkf); pointer-events: none;
}
.declared.is-on { animation: slam .45s cubic-bezier(.3, 1.4, .5, 1) forwards; }
.declared span { font-size: 11px; }
.declared b { font-size: 30px; line-height: .95; }
@media (min-width: 900px) {
  .pg-slot { display: none; }
  .bigslot { display: block; width: 190px; margin: 0 auto 26px; }
  .leaf--r { display: flex; flex-direction: column; justify-content: center; }
  .declare { padding: 22px 20px 16px; }
  .declare-q { font-size: 24px; }
  .pick { min-height: 58px; }
}

/* ================= a stamp lands (between) ================= */
.pg--between .leaf--l { text-align: center; }
.pg--between .pg-head { justify-content: center; }
.bigstamp { width: min(176px, 46vw); margin: 6px auto 0; opacity: 0; --r: -11deg; }
.bigstamp.is-slam { animation: slam .5s cubic-bezier(.3, 1.4, .5, 1) .25s forwards; }
.bigstamp.is-slam .stamp { animation: inkSpread .5s ease .1s both; }
@keyframes inkSpread { from { filter: blur(1.5px); } }
.pg--between .lead b { color: var(--visa); }
.leaf--r { display: flex; flex-direction: column; gap: 16px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.row3-i { display: grid; justify-items: center; gap: 4px; }
.row3-i svg { width: 74px; }
.row3-i .stamp { --r: -8deg; transform: rotate(var(--r)); }
.row3-i small { font: 700 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.row3-i.is-slam .stamp { animation: slam .5s cubic-bezier(.3, 1.4, .5, 1) 1s both; }
.togo { margin: 0; font: 500 15px/1.45 var(--sans); }
.peek { border-left: 4px solid var(--gold); background: rgba(212, 175, 90, .14); padding: 12px 14px; border-radius: 0 12px 12px 0; }
.peek-k { font: 800 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-lo); }
.peek p { margin: 6px 0 0; font: 600 16px/1.35 var(--serif); }
@media (min-width: 900px) {
  .pg--between .leaf--l { display: flex; flex-direction: column; justify-content: center; }
  .bigstamp { width: 260px; }
  .row3-i svg { width: 110px; }
}

/* ================= the gate: complete your passport ================= */
.envelope {
  position: relative; margin: 12px 0 6px; padding: 16px 12px 16px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(170deg, #fdf9ef, #efe5cc); border: 1px solid var(--line); box-shadow: 0 12px 26px rgba(0, 0, 0, .13);
}
.envelope::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 56%; background: rgba(24, 33, 59, .045); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.envelope .row3-i svg { width: 68px; }
.env-lines { margin: 14px 70px 0 4px; display: grid; gap: 8px; filter: blur(1.2px); }
.env-lines i { display: block; height: 9px; border-radius: 5px; background: rgba(24, 33, 59, .13); }
.env-lines i:nth-child(1) { width: 62%; } .env-lines i:nth-child(2) { width: 78%; } .env-lines i:nth-child(3) { width: 46%; }
.seal {
  position: absolute; right: 12px; bottom: 8px; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; align-content: center; gap: 2px;
  background: radial-gradient(circle at 35% 30%, #e0604f, #a3271b 62%, #7b1a12); color: #fde8da; transform: rotate(-9deg);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .18), inset 0 0 0 4px rgba(255, 255, 255, .12); animation: sealPop .5s cubic-bezier(.3, 1.5, .5, 1) 1.4s both;
}
.seal svg { width: 17px; height: 17px; }
.seal b { font: 800 8.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
@keyframes sealPop { from { opacity: 0; transform: rotate(-9deg) scale(.4); } }
.envelope.is-open .seal { animation: sealOff .6s ease-in forwards; }
@keyframes sealOff { to { opacity: 0; transform: rotate(30deg) scale(1.4) translateY(-20px); } }
.gate { display: grid; gap: 12px; }
.gate .lead { margin: 0; font-weight: 600; }
.fld { display: grid; gap: 6px; }
.fld-k { display: flex; align-items: center; gap: 8px; font: 700 12.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fld-k svg { width: 18px; height: 18px; color: var(--navy); }
.fld input {
  width: 100%; height: 54px; padding: 0 14px; border-radius: 12px; border: 1.5px solid rgba(24, 33, 59, .25); background: #fff; color: var(--ink);
  font: 600 18px/1 var(--sans); outline: none; transition: border-color .15s, box-shadow .15s;
}
.fld input::placeholder { color: rgba(24, 33, 59, .38); }
.fld input:focus { border-color: var(--visa); box-shadow: 0 0 0 4px rgba(31, 79, 156, .16); }
.err { font: 600 13.5px/1.35 var(--sans); color: var(--bad); }
.err:empty { display: none; }
.fld.is-err input { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(179, 38, 30, .12); }
.fld.is-err { animation: shake .36s ease; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.gate .mrz { padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, .5); border: 1px dashed rgba(24, 33, 59, .2); }
.fine { margin: 0; text-align: center; font: 500 12.5px/1.4 var(--sans); color: var(--muted); }
@media (min-width: 900px) {
  .pg--gate .leaf { display: flex; flex-direction: column; justify-content: center; }
  .envelope { padding: 24px 22px; }
  .envelope .row3-i svg { width: 96px; }
  .gate { gap: 14px; }
}
@media (min-width: 900px) { .pg--intro .leaf--l { display: flex; flex-direction: column; justify-content: center; } }
