/* =====================================================================
   IN POSITION — 80s hard-rock theme engine
   Shared by index / band / gallery / merch. Zero build step.
   Palette derived from images/in-position-logo.png
   ===================================================================== */

/* ---- 1. Palette & tokens (task 2.1) --------------------------------- */
:root {
  --void:        #050505;   /* background */
  --void-2:      #0d0d10;   /* raised panels */
  --blood:       #c4231f;   /* primary red accent (logo lettering) */
  --blood-lit:   #ff3b30;   /* hot red for glow */
  --chrome:      #e8e8e8;   /* steel / body text highlight */
  --chrome-dim:  #9aa0a6;   /* muted steel */
  --neon-cyan:   #00e5ff;   /* grid + electric accents */
  --neon-purple: #b026ff;   /* stage-light glow (Törnbotten) */
  --ink:         #c7ccd1;   /* default body text */

  --edge:        rgba(232,232,232,0.14);   /* hairline steel borders */
  --panel:       rgba(20,20,26,0.72);

  --shadow-blood: 0 0 18px rgba(196,35,31,0.55);
  --shadow-cyan:  0 0 18px rgba(0,229,255,0.55);

  --maxw: 1160px;
  --nav-h: 64px;

  --font-display: "Metal Mania", "Impact", "Haettenschweiler", sans-serif;
  --font-head:    "Oswald", "Arial Narrow", system-ui, sans-serif;
  --font-body:    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---- 2. Reset & base ------------------------------------------------ */
* { box-sizing: border-box; }
img { max-width: 100%; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

/* The neon grid + scanlines live behind everything (fixed, non-scrolling) */
body::before,   /* grid  (task 2.3) */
body::after {   /* scan  (task 2.4) */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ---- 3. Neon perspective grid (task 2.3) ---------------------------- */
body::before {
  background:
    /* horizon glow */
    radial-gradient(120% 60% at 50% 100%, rgba(176,38,255,0.20), transparent 60%),
    radial-gradient(90% 50% at 50% 100%, rgba(0,229,255,0.14), transparent 55%),
    /* the grid lines */
    linear-gradient(to right,  rgba(0,229,255,0.22) 1px, transparent 1px) 0 0 / 60px 60px,
    linear-gradient(to bottom, rgba(0,229,255,0.14) 1px, transparent 1px) 0 0 / 60px 60px;
  background-color: var(--void);
  /* tilt the floor toward a vanishing point, anchored bottom */
  transform: perspective(340px) rotateX(68deg) scale(2.4);
  transform-origin: 50% 100%;
  bottom: -10%;
  top: auto;
  height: 62%;
  opacity: 0.55;
  animation: grid-run 7s linear infinite;
  -webkit-mask-image: linear-gradient(to top, #000 5%, transparent 92%);
          mask-image: linear-gradient(to top, #000 5%, transparent 92%);
}

@keyframes grid-run {
  from { background-position: 0 0, 0 0, 0 0px,  0 0px; }
  to   { background-position: 0 0, 0 0, 0 60px, 0 60px; }
}

/* ---- 4. Scanline / CRT overlay (task 2.4) --------------------------- */
body::after {
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0)      0px,
    rgba(0,0,0,0)      2px,
    rgba(0,0,0,0.16)   3px,
    rgba(0,0,0,0.16)   4px
  );
  mix-blend-mode: multiply;
  opacity: 0.5;
  animation: flicker 4.5s steps(60) infinite;
}

@keyframes flicker {
  0%, 96%, 100% { opacity: 0.5; }
  97%           { opacity: 0.38; }
  98%           { opacity: 0.6; }
}

/* keep real content above the effect layers */
.page, .site-nav, .site-footer { position: relative; z-index: 1; }

/* ---- 5. Layout helpers ---------------------------------------------- */
.page { max-width: var(--maxw); margin: 0 auto; padding: 0 20px 90px; }
.section { padding: 62px 0 8px; }
.center { text-align: center; }

/* ---- 6. Typography (task 2.2 + 2.5 chrome headings) ----------------- */
h1, h2, h3 { font-family: var(--font-head); letter-spacing: .04em; margin: 0 0 .5em; }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: .95;
  text-transform: uppercase;
}

/* chrome-red heading: steel body + blood edge + electric glow (task 2.5) */
.chrome-red {
  background: linear-gradient(180deg, #fff 0%, var(--chrome) 34%, var(--blood) 62%, #7c0f0d 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  text-shadow: 0 2px 0 rgba(0,0,0,0.4);
  filter: drop-shadow(0 0 14px rgba(196,35,31,0.5));
}

.section-title {
  font-size: clamp(2rem, 6vw, 3.4rem);
  text-align: center;
  margin-bottom: .1em;
}

.kicker {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .34em;
  color: var(--neon-cyan);
  font-size: .82rem;
  text-shadow: var(--shadow-cyan);
}

a { color: var(--neon-cyan); text-decoration: none; }
a:hover { color: #fff; }

/* ---- 7. Crosshair motif (task 2.5) ---------------------------------- */
/* Reusable ⌖ target used for bullets, active nav, card hovers */
.crosshair {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05em; height: 1.05em;
  border: 1.5px solid var(--blood);
  border-radius: 50%;
  position: relative;
  flex: none;
}
.crosshair::before,
.crosshair::after {
  content: ""; position: absolute; background: var(--blood);
}
.crosshair::before { width: 150%; height: 1.5px; left: -25%; }
.crosshair::after  { height: 150%; width: 1.5px; top: -25%; }
.crosshair > i {           /* red centre dot */
  width: .28em; height: .28em; border-radius: 50%;
  background: var(--blood-lit); box-shadow: var(--shadow-blood); z-index: 1;
}

/* ---- 8. Lightning divider (task 2.5) -------------------------------- */
.bolt-divider {
  border: 0;
  height: 34px;
  margin: 40px auto;
  width: 100%;
  max-width: 520px;
  background:
    linear-gradient(90deg, transparent, var(--chrome-dim) 46%, transparent 54%) center/100% 2px no-repeat;
  position: relative;
  opacity: .8;
}
.bolt-divider::after {
  content: "⚡";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: var(--chrome);
  text-shadow: var(--shadow-cyan);
  background: var(--void);
  width: 44px; margin: 0 auto;
}

/* ---- 9. Buttons / CTA (task 2.5 glow) ------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .95rem;
  color: var(--chrome);
  padding: 14px 30px;
  border: 1.5px solid var(--blood);
  background: linear-gradient(180deg, rgba(196,35,31,.18), rgba(0,0,0,.2));
  border-radius: 3px;
  cursor: pointer;
  transition: box-shadow .2s, transform .1s, background .2s, color .2s;
}
.btn:hover {
  color: #fff;
  background: linear-gradient(180deg, rgba(196,35,31,.42), rgba(0,0,0,.2));
  box-shadow: var(--shadow-blood), inset 0 0 12px rgba(196,35,31,.3);
}
.btn:active { transform: translateY(1px); }

.btn-cyan { border-color: var(--neon-cyan); }
.btn-cyan:hover { box-shadow: var(--shadow-cyan), inset 0 0 12px rgba(0,229,255,.3); }

/* pulsing hero CTA */
.btn-pulse { animation: pulse 2.1s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(196,35,31,0); }
  50%      { box-shadow: var(--shadow-blood), inset 0 0 14px rgba(196,35,31,.35); }
}

/* ---- 10. Navigation (task 3.1 / 3.2) -------------------------------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 18px;
  padding: 0 20px;
  background: rgba(5,5,5,.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--edge);
}
.nav-logo { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.nav-logo img { height: 40px; width: auto; filter: drop-shadow(0 0 6px rgba(196,35,31,.5)); }
.nav-logo b {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .22em;
  color: var(--chrome); font-size: .82rem;
}
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .16em;
  font-size: .82rem; color: var(--chrome-dim);
  padding: 10px 14px; border-radius: 3px;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav-links a .crosshair { display: none; }
.nav-links a.active { color: var(--chrome); text-shadow: var(--shadow-blood); }
.nav-links a.active .crosshair { display: inline-flex; }   /* ⌖ marks the active page */

.nav-toggle { display: none; }   /* mobile hamburger */

/* ---- 11. Footer (task 3.3) ------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--edge);
  margin-top: 60px;
  padding: 34px 20px 46px;
  text-align: center;
  color: var(--chrome-dim);
  font-size: .9rem;
}
.site-footer .display { font-size: 1.4rem; color: var(--chrome); }
.site-footer a { font-weight: 600; }

/* ---- 12. Cards (shared: teasers, members, merch) -------------------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 6px;
  overflow: hidden;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(196,35,31,.6);
  box-shadow: var(--shadow-blood);
}
/* crosshair reticle that appears on card hover */
.card .reticle {
  position: absolute; top: 12px; right: 12px;
  opacity: 0; transform: scale(.6); transition: opacity .18s, transform .18s;
  color: var(--blood); font-size: 1.1rem;
}
.card:hover .reticle { opacity: 1; transform: scale(1); }

/* ---- 13. Hero (task 4.1) -------------------------------------------- */
.hero {
  min-height: calc(100vh - var(--nav-h));
  width: 100%; max-width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 22px; padding: 40px 0;
}
.hero > * { max-width: 100%; }
.hero-logo {
  width: min(560px, 82vw);
  filter: drop-shadow(0 0 26px rgba(196,35,31,.45));
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-10px);} }
.hero-tagline {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .22em;
  color: var(--chrome); font-size: clamp(.85rem, 2.4vw, 1.15rem);
  max-width: 30ch;
}
.hero-sub { color: var(--chrome-dim); max-width: 40ch; margin: 0 auto; }

/* ---- 14. LIVE strip (task 4.3) -------------------------------------- */
.live {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 26px; align-items: center;
  background: var(--panel); border: 1px solid var(--edge);
  border-left: 3px solid var(--blood); border-radius: 6px; overflow: hidden;
}
.live img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 240px; }
.live-body { padding: 30px; }
.live-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .2em;
  color: var(--blood-lit); font-weight: 700; font-size: .8rem;
}
.live-badge .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--blood-lit);
  box-shadow: var(--shadow-blood); animation: pulse 1.4s infinite;
}

/* ---- 15. Member cards (task 5.x) ------------------------------------ */
.member .portrait { aspect-ratio: 3/4; width: 100%; object-fit: cover; display: block;
  filter: grayscale(.25) contrast(1.05); }
.member .portrait-ph {
  aspect-ratio: 3/4; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(196,35,31,.18), transparent 60%),
    repeating-linear-gradient(45deg, #111 0 10px, #0b0b0d 10px 20px);
  color: var(--chrome-dim);
}
.member .portrait-ph .crosshair { width: 46px; height: 46px; border-width: 2px; }
.member .m-body { padding: 16px 18px 20px; }
.member .m-name { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .1em;
  color: var(--chrome); font-size: 1.15rem; margin: 0; }
.member .m-role { color: var(--blood-lit); font-size: .82rem; text-transform: uppercase;
  letter-spacing: .18em; margin: 2px 0 10px; }
.member .m-bio { font-size: .92rem; color: var(--chrome-dim); margin: 0; }

/* ---- 16. Gallery (task 6.x) ----------------------------------------- */
.gallery { columns: 3 240px; column-gap: 16px; }
/* .shot is a <button> so the grid is keyboard-operable; these first two lines
   strip the native button chrome so it renders exactly as the old <div> did. */
.gallery .shot { display: block; width: 100%; padding: 0; background: none;
  font: inherit; color: inherit; text-align: left; appearance: none; -webkit-appearance: none;
  break-inside: avoid; margin: 0 0 16px; position: relative;
  border: 1px solid var(--edge); border-radius: 6px; overflow: hidden; cursor: pointer;
  transition: box-shadow .18s, border-color .18s; }
/* height:auto is required, not cosmetic — an item carrying width/height
   attributes would otherwise take height as a presentational hint and stretch.
   With it, those attributes reserve the slot's height while the poster loads. */
.gallery .shot img { width: 100%; height: auto; display: block; }
.gallery .shot:hover { border-color: var(--neon-cyan); box-shadow: var(--shadow-cyan); }
.gallery .shot:focus-visible { outline: 2px solid var(--neon-cyan); outline-offset: 3px; }

/* Video items: poster + play badge. The badge is decorative — the button
   itself is the control, so it must never swallow the click. */
.gallery .shot.is-video .play-badge {
  position: absolute; inset: 0; margin: auto; pointer-events: none;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--chrome); background: rgba(5,5,5,.55);
  color: var(--chrome); font-size: 1.15rem; line-height: 1;
  padding-left: 4px; /* optical centring of the ▶ glyph */
  box-shadow: 0 0 18px rgba(0,0,0,.6);
  transition: border-color .18s, color .18s, box-shadow .18s;
}
.gallery .shot.is-video:hover .play-badge,
.gallery .shot.is-video:focus-visible .play-badge {
  border-color: var(--neon-cyan); color: var(--neon-cyan); box-shadow: var(--shadow-cyan);
}
.gallery .shot.placeholder {
  cursor: default; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center;
  color: var(--chrome-dim); font-family: var(--font-head); letter-spacing: .2em; font-size: .72rem;
  text-transform: uppercase;
  background: repeating-linear-gradient(45deg, #0c0c0f 0 12px, #08080a 12px 24px);
}
.gallery .shot.placeholder:hover { border-color: var(--edge); box-shadow: none; }
.gallery .shot .ph-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* Lightbox (task 6.2) */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,.9); padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox .lb-stage { display: flex; align-items: center; justify-content: center; }
.lightbox img, .lightbox video, .lightbox .lb-frame {
  border: 2px solid var(--neon-cyan);
  box-shadow: var(--shadow-cyan), 0 0 60px rgba(0,229,255,.25);
}
/* <img> and <video> have intrinsic dimensions, so max-* is enough and portrait
   clips size correctly. An <iframe> has none, hence the explicit box below. */
.lightbox img, .lightbox video { max-width: 92vw; max-height: 86vh; }
.lightbox video { display: block; background: #000; }
/* calc(86vh * 16/9) is the width at which a 16:9 box is exactly 86vh tall, so
   min() picks whichever of the width and height limits binds first — matching
   the max-width/max-height pair the img and video get. Spelled as calc rather
   than the equivalent 152.9vh so the relationship to 86vh stays visible. */
.lightbox .lb-frame { aspect-ratio: 16/9; width: min(92vw, calc(86vh * 16 / 9)); }
.lightbox .lb-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.lightbox .lb-close {
  position: absolute; top: 20px; right: 26px; font-size: 2rem; color: var(--chrome);
  background: none; border: 0; cursor: pointer; line-height: 1; z-index: 1;
}
.lightbox .lb-close:hover { color: var(--blood-lit); }
.lightbox .lb-close:focus-visible { outline: 2px solid var(--neon-cyan); outline-offset: 3px; }

/* ---- 17. Merch (task 7.x) ------------------------------------------- */
.merch .m-thumb { aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 3.4rem; background:
    radial-gradient(circle at 50% 45%, rgba(0,229,255,.12), transparent 62%),
    repeating-linear-gradient(45deg, #101014 0 12px, #0a0a0d 12px 24px); }
.merch .p-body { padding: 16px 18px 20px; text-align: center; }
.merch .p-name { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .1em;
  color: var(--chrome); font-size: 1.02rem; margin: 0 0 4px; }
.merch .p-price { color: var(--blood-lit); font-weight: 700; margin: 0 0 14px; letter-spacing: .04em; }
.merch-note { text-align: center; color: var(--chrome-dim); margin-top: 30px; font-size: .95rem; }
.merch-note strong { color: var(--chrome); }

/* ---- 18. Intro copy blocks ----------------------------------------- */
.lede { max-width: 62ch; margin: 0 auto 8px; text-align: center; color: var(--chrome-dim); }

/* ---- 19. Responsive (task 2.7 / 10) --------------------------------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .live { grid-template-columns: 1fr; }
  .live img { min-height: 200px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-logo b { display: none; }
  .nav-toggle {
    display: inline-flex; margin-left: auto; background: none; border: 1px solid var(--edge);
    color: var(--chrome); border-radius: 4px; padding: 6px 10px; cursor: pointer; font-size: 1rem;
  }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(5,5,5,.97); border-bottom: 1px solid var(--edge);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links a { padding: 14px 20px; border-top: 1px solid var(--edge); }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .gallery { columns: 2 140px; }
  .hero-tagline { letter-spacing: .12em; }
}

/* ---- 20. Reduced motion (task 2.6 / 9) ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, body::before, body::after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .hero-logo { transform: none; }
}
