/* VIP Inmates — simple app-style home. Black and gold. */
:root {
  --bg: #0e0d0b;
  --card: #1a1915;
  --card-hover: #23211c;
  --line: #2c2a24;
  --ink: #f2f0eb;
  --muted: #a39d92;
  --gold: #d4af37;
  --gold-press: #bf9b2c;
  --on-gold: #14120d;
  --radius: 18px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
a { color: inherit; }
h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.app { max-width: 880px; margin: 0 auto; min-height: 100svh; display: flex; flex-direction: column; padding: 0 20px; padding-bottom: env(safe-area-inset-bottom); }

/* Soft gold light behind the brand */
.glow {
  position: fixed; left: 50%; top: -18vh; width: 120vw; max-width: 1400px; height: 80vh; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.06) 55%, transparent 75%);
  pointer-events: none; z-index: 0; animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: 0.65; transform: translateX(-50%) scale(1.06); } }
.app { position: relative; z-index: 1; }

/* Top bar */
.top { display: flex; justify-content: flex-end; padding: 20px 0 0; }
.top__links { display: flex; gap: 20px; align-items: center; font-size: 15px; }
.top__links a, .top__links button { background: none; border: 0; cursor: pointer; text-decoration: none; color: var(--muted); padding: 6px 0; transition: color 150ms; }
.top__links a:hover, .top__links button:hover { color: var(--ink); }

/* Brand: 3D star + metallic wordmark */
main { flex: 1; }
.brand { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 0 34px; }
.star3d { position: relative; width: clamp(170px, 26vw, 240px); aspect-ratio: 1; cursor: grab; touch-action: manipulation; }
.star3d canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.star3d img { position: absolute; inset: 14%; width: 72%; height: 72%; object-fit: contain; animation: float 4s ease-in-out infinite; }
.star3d.is-3d img { display: none; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-4deg); } }

.word { display: flex; flex-direction: column; align-items: center; margin-top: -6px; line-height: 1; font-family: Montserrat, Inter, sans-serif; }
.word__vip, .word__inm {
  background: linear-gradient(100deg, #8a6417 0%, #f6dc8a 18%, #c8962c 34%, #fff1c2 50%, #b8862a 66%, #f3d27a 82%, #8a6417 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s linear infinite; filter: drop-shadow(0 2px 0 #4a3408) drop-shadow(0 10px 24px rgba(212, 175, 55, 0.25));
}
@keyframes shine { to { background-position: -250% 0; } }
.word__vip { font-size: clamp(64px, 11vw, 112px); font-weight: 900; font-style: italic; letter-spacing: -0.02em; padding: 0 0.08em; }
.word__inm { font-size: clamp(16px, 2.4vw, 24px); font-weight: 800; letter-spacing: 0.42em; margin-top: 4px; padding-left: 0.42em; }
.brand__line { margin-top: 18px; color: var(--muted); font-size: 17px; max-width: 34ch; }

/* Service tiles */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-bottom: 40px; perspective: 900px; }
.tile {
  --mx: 50%; --my: 0%;
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; text-align: left; text-decoration: none;
  border: 0; border-radius: 22px; padding: 22px 20px 20px; min-height: 172px; cursor: pointer; isolation: isolate;
  background:
    radial-gradient(240px circle at var(--mx) var(--my), rgba(244, 214, 128, 0.14), transparent 60%),
    linear-gradient(160deg, #1f1d18, #141310);
  transform-style: preserve-3d; transition: transform 200ms var(--ease), box-shadow 200ms;
  -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 230, 160, 0.10);
}
.tile::before { /* gold edge that brightens near the pointer */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: -1; pointer-events: none;
  background: radial-gradient(300px circle at var(--mx) var(--my), rgba(244, 214, 128, 0.85), rgba(212, 175, 55, 0.18) 45%, rgba(212, 175, 55, 0.10));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.tile:hover { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(212, 175, 55, 0.25), inset 0 1px 0 rgba(255, 230, 160, 0.14); }
.tile:active { transform: scale(0.97) !important; }

/* Gold coin icons, like the originals */
.coin {
  position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background:
    radial-gradient(circle at 32% 26%, #fff6d0 0%, #f2d27a 18%, transparent 46%),
    conic-gradient(from 200deg, #b8862a, #f6dc8a, #c8962c, #fff1c2, #a87a22, #e9c565, #b8862a);
  box-shadow:
    inset 0 0 0 3px rgba(255, 240, 190, 0.55), inset 0 -6px 10px rgba(90, 60, 10, 0.55), inset 0 6px 8px rgba(255, 250, 230, 0.5),
    0 8px 18px rgba(0, 0, 0, 0.5), 0 0 24px rgba(212, 175, 55, 0.22);
  transform-style: preserve-3d; transition: transform 700ms var(--ease);
}
.coin svg { position: relative; z-index: 1; width: 32px; height: 32px; fill: #2a2110; filter: drop-shadow(0 1px 0 rgba(255, 240, 190, 0.6)); }
.coin::after { /* light sweep across the coin */
  content: ""; position: absolute; inset: 0; border-radius: 50%; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.7) 48%, transparent 60%) no-repeat;
  background-size: 250% 100%; background-position: 150% 0; animation: sweep 5s ease-in-out infinite; animation-delay: var(--sd, 0s);
}
@keyframes sweep { 0%, 70% { background-position: 150% 0; } 100% { background-position: -100% 0; } }
.tile:hover .coin, .tile:focus-visible .coin { transform: rotateY(360deg); }
.tile:nth-child(2) .coin { --sd: 0.6s; } .tile:nth-child(3) .coin { --sd: 1.2s; } .tile:nth-child(4) .coin { --sd: 1.8s; }
.tile:nth-child(5) .coin { --sd: 2.4s; } .tile:nth-child(6) .coin { --sd: 3s; }
.tile__text { display: flex; flex-direction: column; gap: 2px; margin-top: auto; }
.tile__name { font-weight: 700; font-size: 19px; letter-spacing: -0.01em; color: var(--ink); }
.tile__sub { color: var(--muted); font-size: 14px; }

/* Messages: the main action */
.grid > .tile:last-child { display: none; } /* Help lives in the top bar */
.tile--hero { grid-column: 1; grid-row: span 2; flex-direction: column; align-items: flex-start; min-height: 360px; gap: 22px; padding: 28px;
  background:
    radial-gradient(320px circle at var(--mx) var(--my), rgba(255, 240, 190, 0.35), transparent 60%),
    linear-gradient(120deg, #a87a22, #e2b84a 30%, #f6dc8a 50%, #d4a537 70%, #9b701c);
  background-size: auto, 200% 100%;
}
@keyframes hero-shift { to { background-position: 0 0, 100% 0; } }
.tile--hero::before { display: none; }
.tile--hero .coin { width: 76px; height: 76px; background: radial-gradient(circle at 32% 26%, #3a2f18, #14110a 70%);
  box-shadow: inset 0 0 0 3px rgba(255, 220, 130, 0.6), inset 0 -6px 10px rgba(0, 0, 0, 0.6), 0 10px 22px rgba(70, 45, 0, 0.45); }
.tile--hero .coin svg { fill: #f2d27a; width: 38px; height: 38px; filter: none; }
.tile--hero .tile__text { margin-top: auto; }
.tile--hero .tile__name { color: #17130a; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.tile--hero .tile__sub { color: rgba(23, 19, 10, 0.75); font-size: 15px; }
.tile__go { position: absolute; top: 24px; right: 24px; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 24px;
  background: #17130a; color: #f2d27a; transition: transform 200ms var(--ease); }
.tile--hero:hover .tile__go { transform: translateX(4px); }

.foot { display: flex; gap: 20px; padding: 20px 0 28px; color: var(--muted); font-size: 14px; justify-content: center; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* entrance */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.brand { animation: rise 700ms var(--ease) both; }
.tile { animation: rise 700ms var(--ease) both; }
.tile:nth-child(2) { animation-delay: 180ms; } .tile:nth-child(3) { animation-delay: 240ms; }
.tile:nth-child(4) { animation-delay: 300ms; } .tile:nth-child(5) { animation-delay: 360ms; } .tile:nth-child(6) { animation-delay: 420ms; }
.tile--hero { animation: rise 700ms var(--ease) 120ms both, hero-shift 8s ease-in-out 1s infinite alternate; }

/* Panels */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 40; opacity: 0; transition: opacity 220ms ease; }
.scrim.on { opacity: 1; }
.sheet {
  position: fixed; z-index: 50; left: 50%; top: 50%; width: min(520px, calc(100% - 32px)); max-height: min(86svh, 760px); overflow: auto;
  transform: translate(-50%, -46%) scale(0.98); opacity: 0;
  background: #161511; border-radius: 22px; padding: 22px 22px 26px;
  transition: transform 260ms var(--ease), opacity 200ms ease;
}
.sheet.on { transform: translate(-50%, -50%); opacity: 1; }
.sheet__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheet__head h2 { font-size: 22px; letter-spacing: -0.02em; }
.x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--card-hover); font-size: 24px; line-height: 1; cursor: pointer; transition: transform 140ms var(--ease); }
.x:active { transform: scale(0.92); }
.sheet__lead { color: var(--muted); margin-bottom: 18px; }
.sheet__note { color: var(--muted); font-size: 14px; margin-top: 16px; }

.plans { display: grid; gap: 10px; }
.plan {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; text-decoration: none;
  background: var(--card); border-radius: 14px; padding: 16px 18px; transition: background-color 150ms, transform 140ms var(--ease);
}
.plan:hover { background: var(--card-hover); }
.plan:active { transform: scale(0.98); }
.plan b { display: block; font-weight: 600; }
.plan small { color: var(--muted); font-size: 14px; }
.plan strong { font-size: 20px; font-variant-numeric: tabular-nums; color: var(--gold); }
.plan--best { box-shadow: inset 0 0 0 2px var(--gold); }

.lookup { display: flex; gap: 10px; }
.lookup input {
  flex: 1; min-width: 0; height: 52px; border-radius: 14px; border: 2px solid var(--line); background: var(--card);
  color: var(--ink); padding: 0 16px; font: inherit; font-size: 18px; letter-spacing: 0.02em;
}
.lookup input:focus { border-color: var(--gold); outline: none; }
.btn {
  height: 52px; padding: 0 22px; border-radius: 14px; border: 0; background: var(--gold); color: var(--on-gold);
  font-weight: 600; cursor: pointer; transition: background-color 150ms, transform 140ms var(--ease);
}
.btn:hover { background: var(--gold-press); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; }
.result:empty { display: none; }
.result { margin-top: 16px; background: var(--card); border-radius: 14px; padding: 18px; }
.result h3 { margin: 0 0 10px; font-size: 17px; }
.result dl { margin: 0 0 10px; display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; }
.result dt { color: var(--muted); }
.result dd { margin: 0; font-weight: 600; }
.result p { color: var(--muted); font-size: 14px; }

.stores { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.store {
  display: flex; align-items: center; gap: 12px; text-decoration: none; background: var(--ink); color: #0e0d0b;
  border-radius: 14px; padding: 12px 16px; font-weight: 600; font-size: 18px; transition: transform 140ms var(--ease), opacity 150ms;
}
.store:hover { opacity: 0.9; }
.store:active { transform: scale(0.97); }
.store svg { width: 26px; height: 26px; fill: currentColor; flex: none; }
.store span { line-height: 1.15; }
.store small { display: block; font-size: 12px; font-weight: 500; }

details { background: var(--card); border-radius: 14px; padding: 14px 18px; }
details + details { margin-top: 8px; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--gold); font-size: 20px; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details p { margin-top: 8px; color: var(--muted); }

/* Phone: two columns of tiles, panels slide up from the bottom */
@media (max-width: 640px) {
  .app { padding: 0 16px; }
  .top { padding: 16px 0; }
  .intro { padding: 14px 0 22px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { min-height: 156px; padding: 16px 14px 14px; border-radius: 20px; }
  .coin { width: 54px; height: 54px; } .coin svg { width: 27px; height: 27px; }
  .tile__name { font-size: 16px; }
  .tile__sub { font-size: 13px; }
  .tile--hero { grid-column: 1 / -1; grid-row: auto; flex-direction: row; align-items: center; min-height: 108px; padding: 18px; gap: 16px; }
  .tile--hero .tile__text { margin-top: 0; }
  .tile__go { position: static; margin-left: auto; }
  .tile--hero .coin { width: 62px; height: 62px; } .tile--hero .coin svg { width: 31px; height: 31px; }
  .tile--hero .tile__name { font-size: 22px; }
  .tile__go { width: 44px; height: 44px; }
  .brand { padding-bottom: 24px; }
  .brand__line { font-size: 16px; }
  .grid > .tile:last-child { display: none; } /* Help stays in the top bar */
  .sheet {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 88svh; border-radius: 22px 22px 0 0;
    transform: translateY(100%); opacity: 1; padding-bottom: calc(26px + env(safe-area-inset-bottom));
  }
  .sheet.on { transform: translateY(0); }
  .sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: #3a372f; margin: -8px auto 14px; }
  .stores { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet, .scrim, .tile, .plan, .coin { transition: none; }
  .glow, .coin::after, .word__vip, .word__inm, .tile--hero, .star3d img, .brand, .tile { animation: none !important; }
}
/* Original VIP logo with real depth */
.logo3d {
  --rx: 0deg; --ry: 0deg;
  position: relative; margin: 18px 0 0; width: min(440px, 82vw); aspect-ratio: 806 / 492; perspective: 1100px; cursor: pointer;
}
.logo3d__body {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 500ms cubic-bezier(0.23, 1, 0.32, 1);
}
.logo3d.is-tracking .logo3d__body { animation-play-state: paused; transition-duration: 120ms; }
@keyframes logo-sway {
  0%, 100% { transform: rotateX(var(--rx)) rotateY(calc(var(--ry) - 14deg)) translateY(0); }
  50% { transform: rotateX(calc(var(--rx) + 4deg)) rotateY(calc(var(--ry) + 14deg)) translateY(-8px); }
}
.logo3d img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; }
/* the gold edge: darker copies stepped back in depth */
.logo3d__layer { transform: translateZ(calc(var(--i) * -1.4px)); filter: brightness(calc(0.9 - var(--i) * 0.045)) sepia(0.4) saturate(1.4); }
.logo3d__layer:first-child { filter: brightness(0.12); transform: translateZ(-22px) translateY(6px); opacity: 0.8; } /* soft shadow */
.logo3d__face { transform: translateZ(1px); filter: drop-shadow(0 0 18px rgba(212, 175, 55, 0.35)); }
/* light sweep, only on the logo's own shape */
.logo3d__shine {
  position: absolute; inset: 0; transform: translateZ(2px); pointer-events: none;
  -webkit-mask: url(vip-logo-trim.png) center / contain no-repeat; mask: url(vip-logo-trim.png) center / contain no-repeat;
  background: linear-gradient(110deg, transparent 38%, rgba(255, 252, 235, 0.95) 48%, rgba(255, 236, 170, 0.6) 52%, transparent 62%) no-repeat;
  background-size: 300% 100%; background-position: 130% 0; mix-blend-mode: screen;
  animation: logo-shine 4.5s ease-in-out infinite 0.8s;
}
@keyframes logo-shine { 0%, 55% { background-position: 130% 0; } 100% { background-position: -40% 0; } }
.logo3d.is-pop .logo3d__body { animation: logo-pop 900ms cubic-bezier(0.23, 1, 0.32, 1); }
@keyframes logo-pop { from { transform: rotateY(-360deg) scale(0.92); } to { transform: rotateY(0) scale(1); } }
/* twinkles around the star */
.logo3d__sparks i {
  position: absolute; width: 10px; height: 10px; pointer-events: none;
  background: radial-gradient(circle, #fff7d6 0 18%, transparent 20%), conic-gradient(from 45deg, transparent 0 20%, #ffe9a6 22% 28%, transparent 30% 45%, #ffe9a6 47% 53%, transparent 55% 70%, #ffe9a6 72% 78%, transparent 80% 95%, #ffe9a6 97%);
  border-radius: 50%; opacity: 0; animation: twinkle 3.2s ease-in-out infinite;
}
.logo3d__sparks i:nth-child(1) { left: 6%; top: 8%; animation-delay: 0.2s; }
.logo3d__sparks i:nth-child(2) { left: 30%; top: -4%; animation-delay: 1.1s; width: 14px; height: 14px; }
.logo3d__sparks i:nth-child(3) { left: 2%; top: 58%; animation-delay: 2s; }
.logo3d__sparks i:nth-child(4) { right: 6%; top: 18%; animation-delay: 0.7s; width: 12px; height: 12px; }
.logo3d__sparks i:nth-child(5) { right: 14%; bottom: 2%; animation-delay: 1.6s; }
.logo3d__sparks i:nth-child(6) { left: 46%; bottom: -2%; animation-delay: 2.5s; width: 8px; height: 8px; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.3) rotate(0); } 45% { opacity: 1; transform: scale(1.2) rotate(45deg); } 60% { opacity: 0; } }
.brand__line { margin-top: 26px; }
@media (prefers-reduced-motion: reduce) {
  .logo3d__body, .logo3d__shine, .logo3d__sparks i { animation: none !important; }
}

/* Background in the style Edwin chose: navy curves, carbon band, gold lines */
body {
  background: #05070c url(bg-wide.jpg) center / cover no-repeat fixed;
}
.glow { display: none; }
.tile:not(.tile--hero) { background:
    radial-gradient(240px circle at var(--mx) var(--my), rgba(244, 214, 128, 0.14), transparent 60%),
    linear-gradient(160deg, rgba(30, 36, 50, 0.82), rgba(10, 13, 20, 0.88)); }
@media (max-width: 640px) {
  body { background: #05070c url(bg-phone.jpg) center top / cover no-repeat; background-attachment: scroll; }
  body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: #05070c url(bg-phone.jpg) center / cover no-repeat; }
}

.linkbtn { background: none; border: 0; padding: 0; color: var(--gold); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
