/* 06 · GTAmex · a side quest: the game I built with APEX in co-op.
   Title-screen palette (sunset pink → violet), a HUD that fills as you scroll
   (wanted stars, cash), the drone flight on a framed screen, and a mission-select
   grid of 3 s clips and stills.
   No overlay sits on the footage beyond the grid's corner brackets and the fade
   under each name: the CRT scanlines that used to cover the section were taken
   off on the user's note - they read as degraded video. */
.gta {
  --pink: #ff3d8b; --violet: #8a3cff; --sunset: #ffb347; --cash: #7ed957; --hud: #0a0a0f;
  overflow: clip; isolation: isolate;
  background:
    radial-gradient(90% 55% at 70% 0%, rgba(255, 61, 139, .16), transparent 62%),
    radial-gradient(70% 45% at 10% 18%, rgba(138, 60, 255, .14), transparent 60%),
    var(--ink);
}
.gta .eyebrow { color: var(--pink); }

/* the approach: the drone flight on a framed screen. It carries no overlay of its
   own; the only effect is the glow behind it, which is the video's own colour. */
.gta__flight { position: relative; z-index: 4; margin: 0 0 clamp(60px, 8vw, 110px); }
.gta__glow {
  position: absolute; left: -4%; top: -6%; width: 108%; height: 112%; pointer-events: none;
  filter: blur(64px) saturate(1.8) brightness(1.1); opacity: .6;
}
.gta__screen {
  position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: var(--hud);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 40px 90px rgba(0, 0, 0, .4);
}
.gta__drone { width: 100%; height: 100%; object-fit: cover; display: block; }
.gta__screen .tile__tag { top: 20px; left: 22px; }
.gta__bar { position: absolute; left: 20px; right: 20px; bottom: 16px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.gta__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--sunset)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform .26s linear; }

/* the synthwave floor behind the logo */
.gta__floor {
  position: absolute; left: -20%; right: -20%; top: 55%; height: 460px; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 61, 139, .35) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(0deg, rgba(255, 61, 139, .35) 1px, transparent 1px) 0 0 / 64px 64px;
  transform: perspective(360px) rotateX(62deg); transform-origin: 50% 0;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%); mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}

/* title row: logo on the left, the HUD on the right */
.gta__top { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 30px 50px; margin-bottom: clamp(40px, 6vw, 80px); }
.gta__logo { position: relative; margin: 0; display: flex; align-items: center; line-height: .8; }
.gta__A {
  font-size: clamp(8rem, 19vw, 17rem); font-weight: 800; letter-spacing: -.08em; padding: 0 .06em .04em .72em;
  background: linear-gradient(170deg, #ff7ab8 0%, var(--pink) 30%, var(--violet) 72%, #3b2bff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 18px 50px rgba(255, 61, 139, .35));
}
.gta__words {
  position: absolute; left: 0; top: 50%; z-index: 1; transform: translateY(-46%); display: grid;
  font-size: clamp(2.4rem, 5.6vw, 5.2rem); font-weight: 800; letter-spacing: -.055em; line-height: .8; color: #fff;
  text-shadow: 0 3px 0 rgba(0, 0, 0, .55), 0 0 30px rgba(0, 0, 0, .35);
}
.gta__words span:nth-child(2) { padding-left: .08em; }

.gta__hud { display: grid; justify-items: end; gap: 14px; font-family: var(--mono); }
.gta__stars { display: flex; gap: 6px; }
.gta__stars i {
  width: clamp(26px, 2.6vw, 36px); aspect-ratio: 1; background: rgba(236, 229, 214, .14);
  clip-path: polygon(50% 0%, 61.8% 35%, 98% 35%, 68.5% 57%, 79.5% 91%, 50% 70%, 20.5% 91%, 31.5% 57%, 2% 35%, 38.2% 35%);
  transition: background .25s, transform .35s var(--ease);
}
.gta__stars i.is-on { background: var(--sunset); transform: scale(1.12); }
.gta__stars.is-max i { animation: gta-siren .5s steps(1) infinite; }
.gta__stars.is-max i:nth-child(even) { animation-delay: .25s; }
@keyframes gta-siren { 0% { background: #ff4b4b; } 50% { background: #4b8bff; } }
.gta__cash { margin: 0; font-size: clamp(1.6rem, 2.8vw, 2.6rem); font-weight: 600; color: var(--cash); letter-spacing: .02em; line-height: 1; text-shadow: 0 2px 0 #0b2b07, 0 0 24px rgba(126, 217, 87, .35); }
.gta__party { display: flex; gap: 8px; margin: 0; }
.gta__party span {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 5px; border: 1px solid var(--line-2); border-radius: 999px;
  font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cream-2); background: rgba(10, 10, 15, .6);
}
.gta__party b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--pink); color: #fff; font-size: .56rem; }
.gta__party span:last-child b { background: var(--gold); color: var(--ink); }
.gta__party img { width: 22px; height: 22px; border-radius: 50%; }

/* the REC dot: all a clip or a still carries on top (the mission number, timer and
   title that sat beside it were taken off on the user's note). It blinks on
   footage and holds on a still. */
.tile__tag { position: absolute; top: 14px; left: 16px; z-index: 2; display: block; line-height: 0; pointer-events: none; }
.tile__tag i { display: block; width: 9px; height: 9px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 0 2px rgba(0, 0, 0, .3), 0 0 12px #ff3b3b; animation: gta-rec 1.2s steps(1) infinite; }
.tile--snap .tile__tag i { animation: none; }
@keyframes gta-rec { 50% { opacity: 0; } }

/* the mission-select grid */
.gta__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(130px, 14.5vw, 270px); grid-auto-flow: dense; gap: clamp(10px, 1.1vw, 16px); }
.tile {
  --c: var(--pink);
  position: relative; grid-column: span 4; overflow: hidden; margin: 0; border-radius: 14px; background: var(--hud);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 60px rgba(0, 0, 0, .45);
  transition: box-shadow .4s var(--ease), translate .5s var(--ease);
}
.tile > img, .tile > video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.1s var(--ease); }
.tile::after { /* corner brackets (the vignette is ::before) */
  content: ""; position: absolute; inset: 10px; z-index: 2; pointer-events: none; border-radius: 6px;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / 18px 2px no-repeat, linear-gradient(var(--c), var(--c)) 0 0 / 2px 18px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 18px 2px no-repeat, linear-gradient(var(--c), var(--c)) 100% 0 / 2px 18px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 18px 2px no-repeat, linear-gradient(var(--c), var(--c)) 0 100% / 2px 18px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 18px 2px no-repeat, linear-gradient(var(--c), var(--c)) 100% 100% / 2px 18px no-repeat;
  opacity: .8; transition: inset .4s var(--ease), opacity .4s;
}
.tile::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 30%, transparent 58%, rgba(0, 0, 0, .75)); }
.tile:hover { box-shadow: 0 0 0 2px var(--c), 0 30px 80px rgba(0, 0, 0, .55), 0 0 60px color-mix(in srgb, var(--c) 35%, transparent); translate: 0 -4px; z-index: 2; }
.tile:hover > img, .tile:hover > video { transform: scale(1.06); }
.tile:hover::after { inset: 6px; opacity: 1; }

.tile__name {
  position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 2; margin: 0;
  font-size: clamp(.92rem, 1.35vw, 1.35rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; text-transform: uppercase; color: #fff;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}
.tile__name small { display: block; margin-bottom: 6px; font-family: var(--mono); font-size: .58rem; font-weight: 400; letter-spacing: .2em; color: var(--c); text-shadow: none; }
.tile:hover .tile__name { animation: gta-glitch .45s steps(2) 1; }
@keyframes gta-glitch {
  0% { text-shadow: 3px 0 0 var(--pink), -3px 0 0 #3bd6ff, 2px 2px 0 #000; transform: translateX(2px); }
  50% { text-shadow: -3px 0 0 var(--pink), 3px 0 0 #3bd6ff, 2px 2px 0 #000; transform: translateX(-2px); }
  100% { transform: none; }
}

/* the layout: a big title screen, a tall chase, a panoramic garage, a cinematic finale */
.tile--title { grid-column: span 8; grid-row: span 2; }
.tile--tall { grid-row: span 2; }
.tile--wide { grid-column: span 8; }
.tile--big { grid-column: 5 / span 8; grid-row: span 2; } /* the dining hall, mirrored against the title screen */
.tile--finale { grid-column: 1 / -1; grid-row: span 2; }
.tile:nth-child(3n + 2) { --c: #3bd6ff; }
.tile:nth-child(3n) { --c: var(--cash); }
.tile.tile--title { --c: var(--sunset); }
.tile.tile--finale { --c: #ff3b3b; }
.tile__start {
  position: absolute; left: 50%; bottom: 9%; z-index: 2; transform: translateX(-50%); margin: 0; white-space: nowrap;
  font-family: var(--mono); font-weight: 600; font-size: clamp(.7rem, 1.1vw, .95rem); letter-spacing: .4em; text-transform: uppercase; color: #fff;
  padding: 10px 18px 10px 24px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 4px; background: rgba(10, 10, 15, .55);
  animation: gta-rec 1.1s steps(1) infinite;
}

/* mission passed: the send-off into the thank-you */
.gta__passed { display: grid; justify-items: center; gap: 4px; margin: clamp(60px, 9vw, 120px) 0 0; text-align: center; }
.gta__passed p { margin: 0; font-weight: 800; text-transform: uppercase; line-height: .9; }
.gta__passed-big {
  font-size: clamp(2.6rem, 7.4vw, 7rem); letter-spacing: -.04em; color: var(--sunset);
  text-shadow: 3px 3px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 0 60px rgba(255, 179, 71, .35);
}
.gta__passed-sub { font-size: clamp(1.2rem, 2.4vw, 2.2rem); letter-spacing: .02em; color: #fff; text-shadow: 2px 2px 0 #000, -1px -1px 0 #000; }
.gta__passed-sub b { color: var(--cash); }

@media (prefers-reduced-motion: no-preference) {
  .gta__floor { animation: gta-drive 1.4s linear infinite; }
  @keyframes gta-drive { to { background-position: 0 64px, 0 64px; } }
}
@media (prefers-reduced-motion: reduce) {
  .tile__tag i, .tile__start, .gta__stars.is-max i { animation: none; }
}
@media (max-width: 900px) {
  .gta__hud { justify-items: start; }
  .gta__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(110px, 30vw, 240px); }
  .tile { grid-column: span 1; }
  .gta__screen { border-radius: 16px; }
  .tile--title, .tile--wide, .tile--big, .tile--finale { grid-column: 1 / -1; }
  .tile--tall, .tile--finale { grid-row: span 1; }
  .tile__name { font-size: .85rem; }
  .tile__name small { display: none; }
}
