/* 09 — One membership. VIP access. (Agent CLOSE)
   Holographic VIP trading card: tilt + foil + glare driven by CSS vars that
   09-membership.js writes on .mem-stage (--rx --ry --mx --my --px --py --hyp). */
.mem { padding: clamp(72px, 9vw, 128px) 0; background: #050a13; overflow: hidden; overflow: clip; isolation: isolate;
  border-top: 1px solid rgba(153,44,255,.18); }
.mem-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.mem-bg-gold { position: absolute; right: 4%; top: 50%; width: 760px; height: 760px; transform: translate(0,-50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(212,161,61,.16), rgba(153,44,255,.08) 38%, transparent 66%); }
.mem-bg-grid { position: absolute; left: -10%; right: -10%; bottom: -8%; height: 55%; opacity: .5;
  background-image: linear-gradient(rgba(153,44,255,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(153,44,255,.22) 1px, transparent 1px);
  background-size: 64px 64px; transform: perspective(700px) rotateX(64deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%); mask-image: linear-gradient(180deg, transparent, #000 60%); }

.mem-grid { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr) 320px; gap: 40px 44px; align-items: center; }

/* copy */
.mem-title { font-size: clamp(40px, 3.7vw, 56px); margin-bottom: 20px; }
.mem-line { display: block; overflow: hidden; padding-bottom: .04em; }
.mem-line > span { display: inline-block; }
.mem-gold { background: linear-gradient(100deg, #b8862f 0%, #f7d98a 42%, #fff4cc 50%, #d4a13d 62%, #9b7024 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mem-body { font-family: var(--f-ui); font-size: clamp(17px, 1.35vw, 20px); line-height: 1.35; color: var(--text-2); margin: 0 0 26px; max-width: 380px; }
.mem-cta { min-height: 48px; }

/* 4 benefit tiles */
.mem-tiles { list-style: none; margin: 0; padding: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
  border-radius: 16px; border: 1px solid #2a3048; position: relative;
  background: linear-gradient(160deg, rgba(20,26,48,.72), rgba(7,14,25,.72)); box-shadow: 0 30px 80px -40px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.04);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.mem-tile { position: relative; display: flex; align-items: center; gap: 20px; padding: 26px 22px; border-radius: 12px; transition: background .35s var(--ease-out); }
.mem-tile:nth-child(odd)::after { content: ''; position: absolute; right: 0; top: 18%; bottom: 18%; width: 1px; background: linear-gradient(180deg, transparent, #262f47, transparent); }
.mem-tile:nth-child(n+3)::before { content: ''; position: absolute; left: 8%; right: 8%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, #262f47, transparent); }
.mem-tile:hover { background: radial-gradient(ellipse at 20% 50%, rgba(153,44,255,.16), transparent 70%); }
.mem-icon { flex: 0 0 58px; width: 58px; height: 58px; color: var(--purple); display: grid; place-items: center; border-radius: 50%;
  filter: drop-shadow(0 0 10px rgba(153,44,255,.35)); transition: transform .5s var(--ease-out), filter .35s, color .35s; }
.mem-icon svg { width: 100%; height: 100%; }
.mem-tile:hover .mem-icon { transform: scale(1.08) rotate(-6deg); color: #b45cff; filter: drop-shadow(0 0 16px rgba(153,44,255,.7)); }
.mem-tile-text { font: 400 16px/1.3 var(--f-ui); color: #afb6cb; }
.mem-tile-text strong { display: block; font: 700 19px/1.15 var(--f-ui); color: var(--text); margin-bottom: 6px; letter-spacing: .005em; }
.mem-amount { color: var(--lime); font-weight: 700; white-space: nowrap; }

/* ---------- the card ---------- */
.mem-stage { --rx: 5deg; --ry: -14deg; --mx: 32%; --my: 22%; --px: .32; --py: .22; --hyp: .45; --flip: 0deg;
  position: relative; perspective: 1200px; display: flex; flex-direction: column; align-items: center; }
.mem-halo { position: absolute; left: 50%; top: 45%; width: 150%; aspect-ratio: 1; border-radius: 50%; z-index: 0; pointer-events: none;
  transform: translate(calc(-50% + (var(--px) - .5) * 40px), calc(-50% + (var(--py) - .5) * 40px));
  background: radial-gradient(circle, rgba(232,180,80,.30), rgba(153,44,255,.16) 40%, transparent 68%); filter: blur(6px); }
.mem-card { position: relative; z-index: 1; width: 100%; max-width: 320px; aspect-ratio: 5 / 7; cursor: pointer; border-radius: 18px; outline: none;
  transform-style: preserve-3d; transform: translate3d(0, calc(var(--lift, 0) * 1px), calc(var(--depth, 0) * 1px)) rotateX(var(--rx)) rotateY(var(--ry)); will-change: transform; -webkit-tap-highlight-color: transparent; }
.mem-card:focus-visible { box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--lime); }
.mem-card-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.2,1.2,.3,1); }
.mem-card.is-flipped .mem-card-inner { transform: rotateY(180deg); }
.mem-face { position: absolute; inset: 0; border-radius: 18px; overflow: hidden; isolation: isolate; -webkit-backface-visibility: hidden; backface-visibility: hidden;
  box-shadow: 0 40px 70px -30px rgba(0,0,0,.95), 0 0 0 1px rgba(212,161,61,.55), 0 0 60px -10px rgba(212,161,61,.28); }
.mem-front { background:
    radial-gradient(ellipse at 22% 4%, rgba(226,170,64,.50), transparent 58%),
    radial-gradient(ellipse at 96% 100%, rgba(153,44,255,.26), transparent 55%),
    linear-gradient(150deg, #33281a 0%, #17130e 46%, #080c16 100%); }
.mem-back { transform: rotateY(180deg); background:
    radial-gradient(ellipse at 80% 0%, rgba(153,44,255,.40), transparent 60%),
    radial-gradient(ellipse at 0% 100%, rgba(212,161,61,.22), transparent 55%),
    linear-gradient(160deg, #1b1233 0%, #0d0b1c 50%, #070b15 100%); }
.mem-face > span { position: absolute; inset: 0; pointer-events: none; }

/* hexagon emboss (P2E brand) */
.mem-hex { opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cpath fill='none' stroke='%23e6b451' stroke-width='1' d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/svg%3E");
  background-size: 28px 49px; background-position: calc(var(--px) * -14px) calc(var(--py) * -14px);
  -webkit-mask-image: radial-gradient(ellipse at 50% 42%, #000 20%, transparent 78%); mask-image: radial-gradient(ellipse at 50% 42%, #000 20%, transparent 78%); }
.mem-hex-back { opacity: .2; filter: hue-rotate(220deg) saturate(1.4); }

/* rainbow foil: shifts with the angle, strongest away from centre */
.mem-holo { z-index: 3; mix-blend-mode: color-dodge; opacity: calc(.08 + var(--hyp) * .5);
  background-image:
    repeating-linear-gradient(118deg, #e8589f 0%, #e8c25a 3.2%, #6fe8b4 6.4%, #5ab8e8 9.6%, #a66be8 12.8%, #e8589f 16%),
    repeating-linear-gradient(28deg, rgba(0,0,0,.6) 0 1.2%, rgba(255,255,255,.3) 2%, rgba(0,0,0,.6) 2.8%);
  background-size: 200% 200%, 160% 160%;
  background-position: calc(var(--px) * 100%) calc(var(--py) * 100%), calc(100% - var(--px) * 100%) calc(var(--py) * 60%);
  background-blend-mode: overlay; filter: brightness(.56) contrast(1.3) saturate(1.1);
  -webkit-mask-image: linear-gradient(118deg, transparent 8%, #000 30%, #000 70%, transparent 92%); mask-image: linear-gradient(118deg, transparent 8%, #000 30%, #000 70%, transparent 92%);
  -webkit-mask-size: 200% 200%; mask-size: 200% 200%; -webkit-mask-position: calc(var(--px) * 100%) 0; mask-position: calc(var(--px) * 100%) 0; }
.mem-holo-back { opacity: calc(.14 + var(--hyp) * .4); }
/* glitter around the light */
.mem-sparkle { z-index: 4; mix-blend-mode: color-dodge; opacity: calc(var(--hyp) * .9);
  background-image: radial-gradient(circle, rgba(255,240,200,.95) 0 .8px, transparent 1.4px), radial-gradient(circle, rgba(200,170,255,.9) 0 .7px, transparent 1.3px);
  background-size: 19px 23px, 31px 29px; background-position: calc(var(--px) * 30px) calc(var(--py) * 24px), calc(var(--px) * -22px) calc(var(--py) * -30px);
  -webkit-mask-image: radial-gradient(circle at var(--mx) var(--my), #000 0, transparent 42%); mask-image: radial-gradient(circle at var(--mx) var(--my), #000 0, transparent 42%); }
/* specular glare following the cursor */
.mem-glare { z-index: 6; mix-blend-mode: overlay; opacity: calc(.45 + var(--hyp) * .45);
  background: radial-gradient(farthest-corner circle at var(--mx) var(--my), rgba(255,255,255,.85) 0%, rgba(255,255,255,.22) 22%, rgba(0,0,0,.5) 95%); }
.mem-frame { z-index: 5; inset: 12px !important; border-radius: 11px; border: 1px solid rgba(226,176,76,.55);
  box-shadow: inset 0 0 0 4px rgba(10,10,14,.35), inset 0 0 0 5px rgba(226,176,76,.18); }

/* front content */
.mem-front-content { z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 36px 18px 30px; }
.mem-crown { width: 84px; height: auto; color: #e0ad48; margin-bottom: 12px; filter: drop-shadow(0 0 10px rgba(224,173,72,.55)); overflow: visible; }
.mem-word { display: block; font-family: var(--f-display); font-weight: 700; line-height: .9; letter-spacing: .015em;
  background: linear-gradient(100deg, #9b7024 0%, #d9a843 calc(var(--mx) - 28%), #fff1c2 var(--mx), #e2b04c calc(var(--mx) + 20%), #8a6322 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)); }
.mem-word-p2e { font-size: 70px; }
.mem-word-vip { font-size: 128px; margin-top: -2px; }
.mem-lines { display: flex; flex-direction: column; gap: 3px; margin-top: 18px; font: 700 14px/1.05 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: #d9a846; }

/* back content */
.mem-back-content { z-index: 2; display: flex; flex-direction: column; padding: 34px 28px 28px; gap: 16px; }
.mem-back-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.mem-crown-sm { width: 40px; margin: 0 0 4px; }
.mem-back-title { font: 800 34px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; color: #f2cf7a; }
.mem-back-sub { font: 600 12px/1.2 var(--f-ui); letter-spacing: .24em; text-transform: uppercase; color: #b7a3e6; }
.mem-perks { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.mem-perk { display: flex; gap: 11px; align-items: flex-start; font: 500 15px/1.28 var(--f-ui); color: var(--text-2); }
.mem-perk i { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; margin-top: 0;
  background: var(--lime); color: var(--lime-ink); box-shadow: 0 0 14px rgba(208,250,0,.45); }
.mem-back-foot { margin-top: auto; text-align: center; font: 700 13px/1 var(--f-display); letter-spacing: .3em; text-transform: uppercase; color: #d9a846; }

.mem-shadow { width: 70%; height: 26px; margin-top: 22px; border-radius: 50%; background: radial-gradient(ellipse, rgba(0,0,0,.8), transparent 70%);
  transform: translateX(calc(var(--ry) * -1.2)) scaleX(calc(1 - var(--hyp) * .15)); filter: blur(4px); order: 3; }
.mem-hint { order: 4; margin: 10px 0 0; font: 600 11px/1 var(--f-ui); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); opacity: .75; }
.mem-hint-touch { display: none; }
@media (hover: none), (pointer: coarse) { .mem-hint-fine { display: none; } .mem-hint-touch { display: inline; } }
.mem-stage.is-touch .mem-hint-fine { display: none; } .mem-stage.is-touch .mem-hint-touch { display: inline; }

/* ---------- entrance (only when JS arms it; ?static / reduced = final state) ---------- */
.mem.is-armed .mem-line > span { transform: translateY(105%); }
.mem.is-armed .mem-icon svg * { stroke-dasharray: 1; stroke-dashoffset: 1; }
.mem.is-armed .mem-tile { opacity: 0; transform: translateY(24px); }
.mem.is-armed.is-in .mem-line > span { transform: none; transition: transform 1.1s cubic-bezier(.16,1,.3,1); }
.mem.is-armed.is-in .mem-line:nth-child(2) > span { transition-delay: .12s; }
.mem.is-armed.is-in .mem-tile { opacity: 1; transform: none; transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); }
.mem.is-armed.is-in .mem-tile:nth-child(2) { transition-delay: .1s; }
.mem.is-armed.is-in .mem-tile:nth-child(3) { transition-delay: .2s; }
.mem.is-armed.is-in .mem-tile:nth-child(4) { transition-delay: .3s; }
.mem.is-armed.is-in .mem-icon svg * { stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s cubic-bezier(.65,0,.35,1) .35s; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .mem-grid { grid-template-columns: minmax(0, 1fr) 290px; }
  .mem-copy { grid-column: 1 / -1; }
  .mem-body { max-width: 620px; }
}
@media (max-width: 767px) {
  .mem { padding: 64px 0 56px; }
  .mem-grid { grid-template-columns: 1fr; gap: 30px; }
  .mem-title { font-size: 42px; margin-bottom: 14px; }
  .mem-body { font-size: 17px; margin-bottom: 20px; }
  .mem-tiles { padding: 4px; }
  .mem-tile { flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 14px; }
  .mem-icon { flex-basis: 46px; width: 46px; height: 46px; }
  .mem-tile-text { font-size: 14px; }
  .mem-tile-text strong { font-size: 16px; }
  .mem-amount { white-space: normal; }
  .mem-stage { padding-top: 6px; }
  .mem-card { max-width: 272px; }
  .mem-word-p2e { font-size: 60px; }
  .mem-word-vip { font-size: 108px; }
  .mem-back-content { padding: 28px 22px 22px; gap: 12px; }
  .mem-back-title { font-size: 30px; }
  .mem-perk { font-size: 14px; }
  .mem-bg-gold { right: -40%; top: 78%; }
}
@media (prefers-reduced-motion: reduce) { .mem-card-inner { transition: none; } }
