/* APP FEATURES: bento of four live illustrations */
.app {
  padding-block: clamp(56px, 6.5vh, 100px);
  background:
    radial-gradient(40% 50% at 100% 0%, rgba(166, 210, 43, .14), transparent 70%),
    radial-gradient(45% 55% at 0% 100%, rgba(11, 143, 227, .10), transparent 70%),
    var(--sky);
  overflow: clip;
}
.app__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: clamp(270px, 34vh, 340px) clamp(320px, 40vh, 410px); gap: 16px;
}
.app__head { grid-column: span 5; display: grid; align-content: center; gap: 18px; padding-right: clamp(8px, 2vw, 32px); }

.tile {
  position: relative; display: flex; flex-direction: column; overflow: hidden; isolation: isolate;
  padding: clamp(22px, 2.2vw, 30px); border-radius: var(--r); background: var(--paper);
  box-shadow: 0 1px 0 rgba(18, 26, 58, .06), 0 30px 60px -40px rgba(18, 26, 58, .35);
}
.tile--offers { grid-column: span 7; flex-direction: row; align-items: stretch; gap: clamp(16px, 2vw, 28px); }
.tile--sec, .tile--save, .tile--gift { grid-column: span 4; }
.tile h3 { font-size: clamp(1.3rem, 1.6vw, 1.6rem); margin-bottom: 8px; }
.tile p { font-size: 1rem; line-height: 1.5; color: #3a4266; }
.tile.on-ink { background: var(--ink); }
.tile.on-ink p { color: #c9d1ea; }
.tile__txt { position: relative; z-index: 2; }
.tile__art { position: relative; flex: 1; min-height: 0; margin-bottom: 16px; }

/* ---------- offers: a deck of tickets that deals itself ---------- */
.tile--offers .tile__txt { flex: 0 0 38%; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.tile__stat { display: grid; gap: 2px; }
.tile__stat b { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 5vw, 4.6rem); line-height: .95; letter-spacing: -.03em; color: var(--ink); }
.tile__stat span { font-weight: 700; font-size: 1rem; color: var(--blue-text); }
.tile--offers::before { /* map grid texture behind the deck */
  content: ""; position: absolute; inset: 0 0 0 38%; z-index: -1; opacity: .55;
  background-image: linear-gradient(var(--sky-2) 1px, transparent 1px), linear-gradient(90deg, var(--sky-2) 1px, transparent 1px);
  background-size: 28px 28px; -webkit-mask-image: radial-gradient(closest-side, #000, transparent); mask-image: radial-gradient(closest-side, #000, transparent);
}
.deck { position: relative; flex: 1; min-width: 0; perspective: 900px; }
.ticket {
  --c: var(--orange);
  position: absolute; left: 43%; top: 61%; width: min(340px, 88%); height: 120px; margin: -60px 0 0 calc(min(340px, 88%) / -2);
  display: flex; background: var(--paper); border-radius: var(--r-sm);
  box-shadow: 0 0 0 1px rgba(18, 26, 58, .08), 0 18px 32px -18px rgba(18, 26, 58, .45);
  transform-origin: 50% 120%; will-change: transform;
}
.ticket--lime { --c: var(--lime-deep); }
.ticket--blue { --c: var(--blue); }
.ticket__ph { flex: 0 0 96px; position: relative; overflow: hidden; }
.ticket__ph img { width: 100%; height: 100%; object-fit: cover; }
.ticket__ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 60%, rgba(18, 26, 58, .2)); }
.ticket__body {
  flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 16px 0 18px;
  border-left: 2px dashed #d3dcea; position: relative;
}
.ticket__body::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; margin-left: 6px; background: var(--c); }
.ticket__body small { font-size: .84rem; font-weight: 700; color: var(--grey); line-height: 1.2; }
.ticket .nw { white-space: nowrap; }
.ticket__body strong { font-family: var(--display); font-weight: 700; font-size: 1.16rem; line-height: 1.15; color: var(--ink); }
.ticket__new { position: absolute; right: -8px; top: -12px; padding: 5px 11px; background: var(--orange); color: var(--ink); border-radius: var(--r-sm); font-weight: 800; font-size: .82rem; box-shadow: 0 6px 14px -6px rgba(18, 26, 58, .5); }

/* ---------- security: the member card locks ---------- */
.sec-art { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; perspective: 900px; }
.mcard {
  position: relative; width: min(250px, 80%); aspect-ratio: 1.586; padding: 14px 16px; overflow: hidden;
  border-radius: var(--r-sm); background: linear-gradient(135deg, #ffffff 0%, #eef3f9 100%); color: var(--ink);
  box-shadow: 0 30px 50px -24px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .5);
  transform-style: preserve-3d;
}
.mcard__top { display: flex; align-items: center; justify-content: space-between; }
.mcard__top img { width: 50px; height: auto; }
.mcard__top b { font-family: var(--display); font-weight: 750; font-size: .95rem; letter-spacing: .02em; }
.mcard__chip { position: absolute; left: 16px; top: 46%; width: 38px; height: 28px; border-radius: 0 6px 0 0; background: linear-gradient(rgba(18, 26, 58, .35), rgba(18, 26, 58, .35)) 0 7px / 100% 1px no-repeat, linear-gradient(rgba(18, 26, 58, .35), rgba(18, 26, 58, .35)) 0 20px / 100% 1px no-repeat, linear-gradient(135deg, #f7c35a, #d9860c); }
.mcard__line { position: absolute; left: 16px; height: 8px; background: #c6d0e0; border-radius: 2px; }
.mcard__line--a { bottom: 34px; width: 52%; }
.mcard__line--b { bottom: 18px; width: 34%; background: #dbe2ee; }
.mcard__scan { position: absolute; left: 0; right: 0; top: 0; height: 26%; background: linear-gradient(180deg, transparent, rgba(166, 210, 43, .35) 80%, var(--lime) 100%); opacity: 0; pointer-events: none; }
.mcard__lock { position: absolute; right: 14px; bottom: 12px; width: 40px; height: 46px; display: grid; place-items: center; color: var(--ink); }
.mcard__lock svg { width: 30px; height: 34px; overflow: visible; }
.lock__shackle { transform-box: view-box; }
.sec-art__status {
  position: relative; white-space: nowrap; overflow: clip; clip-path: inset(0 round 0 14px 0 0);
  display: inline-grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px;
  padding: 7px 14px; border-radius: var(--r-sm); background: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  font-size: .9rem; font-weight: 700; color: #fff;
}
.sec-art__status i { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); transition: background-color .3s; }
.sec-art__status .st { grid-area: 1 / 2; transition: opacity .2s, transform .35s cubic-bezier(.22,.8,.2,1); }
.sec-art__status .st--ok { transition-delay: .18s; }
.sec-art__status .st--check { opacity: 0; transform: translateY(110%); }
.tile--sec.is-checking .st--check { transition-delay: .18s; }
.tile--sec.is-checking .st--ok { transition-delay: 0s; transform: translateY(-110%); }
.tile--sec.is-checking .sec-art__status i { background: var(--orange); }
.tile--sec.is-checking .st--check { opacity: 1; transform: none; }
.tile--sec.is-checking .st--ok { opacity: 0; }
.tile--sec::before { /* faint shield of rings behind the card */
  content: ""; position: absolute; left: 50%; top: 38%; width: 420px; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(166, 210, 43, .16), transparent 70%);
}

/* ---------- savings: a chart that keeps a running tally ---------- */
.save-art { display: flex; align-items: flex-end; }
.chart { width: 100%; height: 100%; overflow: visible; }
.chart__grid line { stroke: #e3e9f2; stroke-width: 1; stroke-dasharray: 3 5; }
.chart__base { stroke: #c9d3e2; stroke-width: 2; }
.chart__bar { fill: var(--blue); transition: fill .35s var(--ease); }
.tile--save.is-live .chart__bar:not(.is-on) { fill: #d9e6f4; }
.chart__line { stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart__dot { fill: var(--lime); stroke: var(--ink); stroke-width: 3; }
.save-art__tag {
  position: absolute; right: 0; top: 0; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px;
  border-radius: var(--r-sm); background: var(--ink); color: #fff; font-size: .88rem; font-weight: 700;
}
.save-art__tag i { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.6 3.6 7.4-8.2' fill='none' stroke='%23121a3a' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }

/* ---------- gift cards: tilt, glare, pick a value ---------- */
.tile--gift { background: linear-gradient(160deg, #fff 30%, #fdf3e2 100%); }
.gift-art { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 1.6vw, 24px); }
.gift__stage { flex: 1; min-width: 0; max-width: 250px; perspective: 800px; }
.gcard {
  position: relative; width: 100%; aspect-ratio: 1.586; overflow: hidden; border-radius: var(--r-sm); color: #fff;
  background: linear-gradient(135deg, #1c2550 0%, #121a3a 100%);
  box-shadow: 0 28px 40px -22px rgba(18, 26, 58, .7); transform-style: preserve-3d; will-change: transform;
}
.gcard__bands { position: absolute; inset: -20%; background:
  linear-gradient(115deg, transparent 38%, var(--orange) 38% 48%, transparent 48%),
  linear-gradient(115deg, transparent 50%, var(--lime) 50% 60%, transparent 60%),
  linear-gradient(115deg, transparent 62%, var(--blue) 62% 72%, transparent 72%);
  opacity: .95; transform: translateX(var(--bx, 0%)); }
.gcard__logo { position: absolute; left: 12px; top: 12px; width: 50px; height: 50px; display: grid; place-items: center; background: #fff; border-radius: 0 10px 0 0; }
.gcard__logo img { width: 40px; height: auto; }
.gcard__label { position: absolute; left: 14px; bottom: 12px; font-weight: 700; font-size: .9rem; letter-spacing: .02em; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.gcard__val { position: absolute; right: 14px; top: 10px; height: 1.15em; overflow: clip; font-family: var(--display); font-weight: 800; font-size: clamp(1.7rem, 2.3vw, 2.2rem); line-height: 1.15; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.gcard__amt { display: block; }
.gcard__glare { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay; background: radial-gradient(50% 60% at var(--gx, 30%) var(--gy, 20%), rgba(255, 255, 255, .75), transparent 70%); }
.gift__pick { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; flex: none; }
.gift__pick legend { padding: 0; margin-bottom: 8px; font-size: .8rem; font-weight: 700; color: var(--grey); text-transform: uppercase; letter-spacing: .06em; }
.gift__pick label { position: relative; cursor: pointer; }
.gift__pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.gift__pick span {
  display: grid; place-items: center; min-width: 76px; min-height: 44px; padding: 0 16px; border-radius: var(--pill);
  box-shadow: inset 0 0 0 2px #cfd8e6; font-weight: 800; font-size: 1rem; background: #fff;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), color .3s;
}
.gift__pick label:hover span { box-shadow: inset 0 0 0 2px var(--ink); }
.gift__pick input:checked + span { background: var(--ink); color: var(--lime); box-shadow: none; }
.gift__pick input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- smaller screens: rows that each fit ---------- */
@media (max-width: 1100px) {
  .app__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .app__head { grid-column: 1 / -1; padding: 0 0 8px; }
  .tile--offers { grid-column: 1 / -1; min-height: 300px; }
  .tile--sec, .tile--save { grid-column: span 1; min-height: 360px; }
  .tile--gift { grid-column: 1 / -1; min-height: 320px; }
}
@media (max-width: 640px) {
  .app__grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .app__head, .tile--offers, .tile--sec, .tile--save, .tile--gift { grid-column: 1; }
  .app { padding-block: 72px; }
  .tile--offers { flex-direction: column-reverse; min-height: 0; }
  .tile--offers .tile__txt { flex: none; }
  .tile--offers::before { inset: 0 0 40% 0; }
  .deck { flex: none; height: 200px; }
  .tile--sec, .tile--save { min-height: 0; }
  .tile__art { flex: none; height: 210px; }
  .gift-art { height: auto; flex-wrap: wrap; padding-top: 4px; }
  .gift__stage { flex: 1 1 100%; max-width: 280px; }
  .gift__pick { grid-template-columns: repeat(3, auto); justify-content: center; }
  .gift__pick legend { text-align: center; width: 100%; }
}

/* static fan for no-JS and reduced motion (JS takes over the transforms) */
.ticket:nth-child(1) { z-index: 6; }
.ticket:nth-child(2) { z-index: 5; transform: translate(14px, -12px) rotate(3.5deg) scale(.96); }
.ticket:nth-child(3) { z-index: 4; transform: translate(28px, -24px) rotate(7deg) scale(.92); }
.ticket:nth-child(4) { z-index: 3; transform: translate(42px, -36px) rotate(10.5deg) scale(.88); }
.ticket:nth-child(n+5) { z-index: 1; opacity: 0; }
