/* Layout: matches magic-phil.com. White header with the Magic-Phil wordmark and red links, red and purple glitter bands, cream content bands, yellow buttons with a hard black shadow, section titles between yellow rules. */
:root {
  --paper: #ffffff;
  --cream: #fff1cc;
  --red: #d21719;
  --red-link: #e62614;
  --purple: #781fd4;
  --yellow: #ffe16b;
  --gold: #ffd84d;
  --lime: #a5e35a;
  --ink: #111111;
  --muted: #4a4040;
  --line: #ecdcae;
  --head: "League Spartan", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --btn: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { background: var(--cream); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; }
h1, h2, h3 { font-family: var(--head); font-weight: 800; text-wrap: balance; margin: 0; line-height: 1.05; }
p { margin: 0; }
.g { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.in { max-width: 1120px; margin: 0 auto; }
.glow { color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.35), 0 0 18px rgba(0,0,0,.25); }
.red-bg { background: var(--red) url("/assets/redglitter.webp") center / cover; }
.purple-bg { background: var(--purple) url("/assets/purpleglitter.webp") center / cover; }

/* Section title between yellow rules, as on magic-phil.com */
.ttl { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; text-align: center; }
.ttl::before, .ttl::after { content: ""; height: 6px; background: var(--yellow); border-radius: 3px; }
.ttl h2 { font-size: clamp(30px, 4.2vw, 46px); }
.sub { text-align: center; font-weight: 700; font-size: 18px; max-width: 60ch; margin: 10px auto 0; }

.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--yellow); color: var(--ink); border: 0; border-radius: 6px; padding: 9px 20px; font-family: var(--btn); font-weight: 700; font-size: 19px; text-decoration: none; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }


/* Header */
header.site { background: var(--paper); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
header.site .in { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 20px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img.wm { height: 64px; width: auto; display: block; }
.brand img.hd { height: 50px; width: auto; display: block; }
nav { display: flex; gap: 4px 22px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
nav a { font-family: var(--body); font-weight: 700; font-size: 17px; color: var(--red-link); text-decoration: none; padding: 4px 2px; border-bottom: 3px solid transparent; }
nav a.on { color: var(--purple); border-bottom-color: var(--yellow); }
nav a:hover { color: var(--purple); }
nav a:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }

/* Hero */
.hero { overflow: hidden; position: relative; }
.hero .in { display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: end; gap: 24px; }
.hero-txt { padding-block: 52px 56px; display: grid; gap: 16px; justify-items: start; }
.frame { background: var(--purple) url("/assets/purpleglitter.webp") center / cover; border: 5px solid var(--gold); border-radius: 10px; padding: 14px 24px 16px; box-shadow: 0 0 0 3px #b8860b, 0 10px 24px rgba(0,0,0,.3); }
.frame h1 { font-size: clamp(40px, 6vw, 70px); }
.hero p { font-size: 19px; font-weight: 700; max-width: 46ch; }
.hero .img { display: block; width: 100%; height: auto; }

/* Bands */
section.band { padding-block: 60px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 32px; }
.step { background: var(--paper); border: 4px solid var(--red); border-radius: 4px; overflow: hidden; display: grid; align-content: start; }
.step:nth-child(2) { border-color: var(--purple); }
.step .bar { background: var(--red); color: #fff; font-family: var(--head); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 20px; padding: 10px 16px 7px; display: flex; gap: 10px; align-items: center; }
.step:nth-child(2) .bar { background: var(--purple); }
.step .bar span { background: var(--yellow); color: var(--ink); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; letter-spacing: 0; flex: none; }
.step p { padding: 14px 16px 18px; color: var(--muted); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 26px 0 26px; }
.filters button { font-family: var(--btn); font-weight: 700; font-size: 15px; border: 0; background: var(--paper); color: var(--ink); border-radius: 6px; padding: 6px 16px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.filters button[aria-pressed="true"] { background: var(--yellow); }
.filters button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.vault { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.tile { background: var(--paper); border: 5px solid var(--red); text-decoration: none; color: inherit; display: grid; box-shadow: 0 8px 18px rgba(0,0,0,.25); transition: transform .15s ease; }
.tile.p { border-color: var(--purple); }
.tile:hover { transform: translateY(-3px) rotate(-.6deg); }
.tile:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }
.tile .thumb { aspect-ratio: 4/3; position: relative; overflow: hidden; background: #fff; }
.tile .thumb img.art { position: absolute; left: 16%; top: 12%; width: 68%; height: 78%; object-fit: contain; }
.tile .badge { position: absolute; top: 8px; right: 8px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 1px 8px 1px 6px; display: flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 800; }
.tile .badge.open { background: var(--lime); }
.tile .num { position: absolute; top: 8px; left: 8px; width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); display: grid; place-items: center; font-family: var(--head); font-weight: 900; font-size: 17px; padding-top: 2px; }
.tile .lbl { background: var(--red); color: #fff; padding: 9px 10px 8px; text-align: center; display: grid; gap: 4px; justify-items: center; }
.tile.p .lbl { background: var(--purple); }
.tile b { font-family: var(--head); font-weight: 800; font-size: 19px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.1; }
.wandrow { display: flex; gap: 3px; align-items: center; }
.wand { width: 6px; height: 16px; border-radius: 2px; border: 1px solid #111; background: linear-gradient(180deg, #fff 0 18%, #111 18% 82%, #fff 82%); }
.wand.off { opacity: .3; }
.wandrow span { font-size: 12px; font-weight: 800; margin-left: 6px; letter-spacing: .04em; }

.where { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 44px; align-items: center; }
.cardback { aspect-ratio: 63/88; max-width: 280px; width: 100%; justify-self: center; background: #0a3a5c; border-radius: 16px; box-shadow: 6px 6px 0 var(--ink), 0 20px 40px -18px rgba(0,0,0,.5); color: #fff; display: grid; justify-items: center; align-content: space-between; padding: 18px 16px; text-align: center; transform: rotate(-3deg); }
.cardback img { width: 46%; }
.cardback h3 { color: #ffe14d; font-size: 22px; }
.cardback .qr { width: 104px; height: 104px; background: #fff; border: 3px solid #12c4f4; border-radius: 10px; display: grid; place-items: center; }
.cardback .code { width: 100%; background: linear-gradient(180deg, #ffe14d, #ffb400); color: #0a3a5c; border: 2px solid #fff; border-radius: 10px; padding: 4px 0 6px; position: relative; }
.cardback .code span { display: block; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.cardback .code b { font-family: var(--head); font-weight: 900; font-size: 28px; letter-spacing: .12em; }
.cardback .code::after { content: "Here!"; position: absolute; right: -58px; top: 50%; transform: translateY(-50%) rotate(6deg); background: var(--yellow); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); font-family: var(--btn); font-weight: 700; font-size: 16px; padding: 2px 10px; border-radius: 6px; }
.cardback small { color: #12c4f4; font-weight: 900; font-size: 11px; }
.where h2 { color: var(--red); font-size: clamp(30px, 4vw, 44px); }
.where .lead { font-weight: 700; margin: 10px 0 20px; }
.faq { display: grid; gap: 12px; }
details { border: 3px solid var(--purple); border-radius: 6px; background: var(--paper); padding: 0 18px; }
summary { cursor: pointer; font-weight: 800; color: var(--purple); padding-block: 13px; font-size: 17px; }
summary:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
details p { padding-bottom: 16px; color: var(--muted); }

.elc { background: var(--paper); padding-block: 44px; }
.elc .in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px 32px; }
.elc img { width: 220px; max-width: 100%; height: auto; display: block; }
.elc h2 { font-size: clamp(30px, 3.8vw, 42px); }
.elc h2 em { font-style: normal; color: var(--red); }
.elc h2 span { color: var(--purple); }
.elc p { font-weight: 700; margin-top: 6px; }

footer { color: #fff; padding-block: 40px; text-align: center; }
footer .in { display: grid; gap: 12px; justify-items: center; }
footer h2 { font-size: 40px; }
footer p { font-weight: 700; max-width: 52ch; }
footer small { font-size: 12px; font-weight: 700; opacity: .9; }

/* Trick page */
.crumbs { font-size: 14px; font-weight: 700; padding-block: 18px 0; }
.crumbs a { color: var(--red-link); text-decoration: none; }
.trick-head { display: flex; gap: 14px 24px; align-items: end; justify-content: space-between; flex-wrap: wrap; padding-block: 10px 24px; }
.trick-head h1 { font-size: clamp(38px, 5.4vw, 60px); color: var(--red); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { font-family: var(--head); font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px 4px; border-radius: 4px; background: var(--purple); color: #fff; }
.chip.lv { background: var(--red); }
.trick-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; padding-bottom: 60px; }
.stagebox { border: 6px solid var(--gold); box-shadow: 0 0 0 3px #b8860b, 0 14px 30px rgba(0,0,0,.3); border-radius: 10px; overflow: hidden; aspect-ratio: 16/9; position: relative; }
.stagebox > img.bg { position: absolute; right: 2%; bottom: 0; height: 104%; width: auto; }
.locked .bg { opacity: .35; filter: blur(3px); }
.lockpanel { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; }
.lockcard { background: var(--paper); border-radius: 8px; padding: 22px; width: min(400px, 100%); display: grid; gap: 12px; text-align: center; box-shadow: 6px 6px 0 var(--ink); }
.lockcard h2 { font-size: 30px; color: var(--purple); }
.lockcard p { color: var(--muted); font-size: 15px; }
.lockcard .btn { justify-self: center; }
.digits { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.digits input { width: 100%; min-width: 0; height: 54px; text-align: center; font-family: var(--head); font-weight: 800; font-size: 28px; color: var(--ink); border: 3px solid var(--purple); border-radius: 8px; background: var(--paper); font-variant-numeric: tabular-nums; padding-top: 4px; }
.digits input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(255,225,107,.9); }
.digits.bad input { border-color: var(--red); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.err { color: var(--red); font-size: 14px; font-weight: 800; min-height: 1.3em; }
.hint { font-size: 13px; color: var(--muted); }
.player img.prod { position: absolute; left: 7%; bottom: 10%; width: 30%; height: 62%; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.player .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 86px; height: 86px; border-radius: 50%; border: 0; background: var(--yellow); display: grid; place-items: center; cursor: pointer; box-shadow: 5px 5px 0 var(--ink); }
.player .play:focus-visible { outline: 4px solid #fff; outline-offset: 4px; }
.player .bar { position: absolute; left: 16px; right: 16px; bottom: 14px; height: 7px; background: rgba(255,255,255,.35); border-radius: 999px; overflow: hidden; }
.player .bar i { display: block; height: 100%; width: 0; background: var(--yellow); }
.player.playing .bar i { animation: prog 20s linear forwards; }
.player.playing .play { opacity: 0; pointer-events: none; }
.player .cap { position: absolute; top: 14px; left: 16px; background: rgba(255,255,255,.92); border-radius: 6px; padding: 2px 10px; font-size: 13px; font-weight: 800; }
@keyframes prog { to { width: 100%; } }
.soon .msg { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; gap: 6px; padding: 20px; }
.soon .msg b { font-family: var(--head); font-weight: 800; font-size: 34px; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.soon .msg span { color: #fff; font-weight: 700; max-width: 40ch; }
.soon .bg { opacity: .3; }
.ok { background: var(--lime); color: var(--ink); font-weight: 800; padding: 10px 14px; border-radius: 6px; margin-bottom: 18px; box-shadow: 4px 4px 0 var(--ink); }
.chapters { margin-top: 26px; display: grid; gap: 10px; }
.chapters h3 { font-size: 28px; color: var(--purple); }
.chapters ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: c; }
.chapters li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--paper); border-radius: 6px; padding: 10px 14px; counter-increment: c; }
.chapters li::before { content: counter(c); width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font-family: var(--head); font-weight: 900; padding-top: 2px; }
.chapters li span { font-weight: 700; }
.chapters li time { font-size: 13px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.side { display: grid; gap: 18px; }
.box { border: 4px solid var(--red); background: var(--paper); display: grid; }
.box:nth-child(even) { border-color: var(--purple); }
.box h3 { background: var(--red); color: #fff; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; padding: 9px 14px 6px; }
.box:nth-child(even) h3 { background: var(--purple); }
.box > :not(h3) { margin: 12px 14px 14px; }
.box ul { padding-left: 20px; color: var(--muted); display: grid; gap: 3px; }
.box .who { display: flex; gap: 10px; align-items: center; }
.box .who img { width: 54px; height: auto; flex: none; }
.boxshot img { width: calc(100% - 28px); height: auto; display: block; }
.next { display: grid; gap: 8px; }
.next a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; border: 2px solid var(--line); border-radius: 6px; padding: 6px 10px; }
.next a:hover { border-color: var(--purple); color: var(--purple); }
.next a .sw { width: 42px; height: 42px; display: grid; place-items: center; flex: none; }
.next a .sw img { width: 36px; height: 36px; object-fit: contain; }

@media (max-width: 1060px) {
  header.site .in { grid-template-columns: 1fr; justify-items: start; }
  nav { justify-content: flex-start; }
}
@media (max-width: 980px) {
  .vault { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trick-grid { grid-template-columns: 1fr; }
  .elc .in { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}
@media (max-width: 760px) {
  .hero .in { grid-template-columns: 1fr; }
  .hero-txt { padding-block: 32px 0; justify-items: center; text-align: center; }
  .hero .img { width: 260px; margin: 0 auto; }
  .steps { grid-template-columns: 1fr; }
  .where { grid-template-columns: 1fr; }
  .brand img.wm { height: 46px; }
  .brand img.hd { height: 38px; }
  nav { gap: 2px 14px; }
  nav a { font-size: 15px; }
    section.band { padding-block: 44px; }
  .cardback .code::after { display: none; }
  .ttl { grid-template-columns: 24px auto 24px; gap: 10px; }
}
@media (max-width: 460px) {
  .vault { grid-template-columns: 1fr 1fr; gap: 14px; }
  .tile { border-width: 4px; }
  .tile b { font-size: 15px; }
  .digits input { height: 46px; font-size: 22px; }
  .lockcard { padding: 14px; }
  .stagebox.locked { aspect-ratio: auto; }
  .stagebox.locked .lockpanel { position: relative; padding: 16px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .player.playing .bar i { width: 40%; }
}

/* Production additions */
.c-red { color: var(--red); }
.c-purple { color: var(--purple); }
.cardimg { width: 100%; max-width: 280px; height: auto; justify-self: center; transform: rotate(-3deg); filter: drop-shadow(6px 6px 0 var(--ink)); }
.stagebox.video { background: #000; }
.stagebox.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stagebox.loading .bg { opacity: .35; filter: blur(3px); }
.btn:disabled { opacity: .7; cursor: progress; }
