/* ===== PALETTE (pulled from your current site) ===== */
:root {
  --bg:        #00001a;   /* navy */
  --page:      #000010;   /* letterbox around the stage */
  --frame:     #335a3a;   /* dark green fill */
  --frame-hi:  #62a855;   /* bright green (tab) */
  --outline:   #a5d6a0;   /* pale green outline */
  --title:     #ffb300;   /* orange title */
  --text:      #ffffff;
}

html, body { margin: 0; height: 100%; background: var(--bg); }
body { display: grid; place-items: center; overflow: hidden; }

/* ===== THE STAGE =====
   Always 16:9, as big as the window allows.
   Everything inside uses ONE coordinate system: 1600 x 900.
   (Same numbers as the SVG viewBox, so frame + content line up.) */
.stage {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  aspect-ratio: 16 / 9;
  background: var(--bg);
  container-type: inline-size;   /* lets us size text with cqw */
  font-family: system-ui, sans-serif;
}

/* ===== FRAME (SVG shapes) ===== */
.frame { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.frame-mobile { display: none; }   /* only shown in portrait, see bottom */

.frame .shape, .frame-mobile .shape {
  stroke: var(--outline);
  stroke-width: 3;
  stroke-linejoin: round;
  fill: var(--frame);
}
.shape.hi     { fill: var(--frame-hi); }   /* bright green bits */
.fade-strip   { fill: url(#fade); stroke: none; }

/* ===== PLACEMENT HELPER =====
   Give any element --x --y --w --h in 1600x900 units. */
.el {
  position: absolute;
  left:   calc(var(--x) * 1% / 16);
  top:    calc(var(--y) * 1% / 9);
  width:  calc(var(--w) * 1% / 16);
  height: calc(var(--h) * 1% / 9);
  box-sizing: border-box;
}

/* ===== TAB LABELS ===== */
.tab-label {
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-style: italic;
  font-size: 3.2cqw;
  color: #c9ccd6;
  text-shadow: 0.15cqw 0.15cqw 0 #1a1a2a;
}

/* ===== CONTENT SLOTS (placeholders for now) ===== */
.slot {
  border: 0.12cqw dashed #ffffff33;
  color: #ffffff66;
  font-size: 1.1cqw;
  display: flex; align-items: center; justify-content: center;
}

/* ===== MEDIA OF THE WEEK ===== */
.display {
  display: flex; flex-direction: column;
  justify-content: center;
  gap: 1cqw;
}
.motw {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
  display: block;
}
.motw-label {
  margin: 0;
  color: #8a8fa3;            /* plain gray, not a heading */
  font-size: 1.2cqw;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: center;
}

/* ===== DESCRIPTION (Melee trophy-blurb style) =====
   Heavy gothic sans, wide tracking, tight lines, white with a hard shadow. */
.desc {
  font-family: "M PLUS 1p", system-ui, sans-serif;
  font-weight: 800;
  font-size: 2cqw;
  line-height: 1.08;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0.1cqw 0.1cqw 0 #000;
  overflow: hidden;
  text-align: right;
}
.desc p { margin: 0 0 0.8em; }

.title {
  display: flex; align-items: center; justify-content: flex-end;
  color: var(--title);
  font-weight: 900;
  font-size: 4.2cqw;
}

/* Info box: pale outline -> thin dark gap -> green inner line */
.info {
  border: 0.35cqw solid var(--outline);
  border-radius: 1.4cqw;
  background: #000010;
  box-shadow:
    inset 0 0 0 0.25cqw #000010,
    inset 0 0 0 0.5cqw  #6f9e6a;
  color: var(--text);
  font-size: 1.8cqw;
  font-weight: 700;

  /* 2x2 grid for the quarters */
  display: grid;
  /* minmax(0, 1fr) = four EQUAL quarters that never grow to fit content
     (plain 1fr lets a big image stretch its row/column) */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows:    repeat(2, minmax(0, 1fr));
  --line: 0.25cqw;     /* cross thickness */
  --inset: 0.5cqw;     /* where the inner green line sits */
}

.info .cell {
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 0.5cqw 1cqw;
  min-width: 0; min-height: 0;
  overflow: hidden;
  font-size: 1.4cqw;
  color: #ffffff55;    /* dim until they're real links */
}

/* links: white text, blue underline, same look in every state
   (:link = unvisited, :visited = clicked before, :hover, :active = mid-click) */
.info .cell a,
.info .cell a:link,
.info .cell a:visited,
.info .cell a:hover,
.info .cell a:active {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: #4a6cff;
  text-decoration-thickness: 0.15em;
  text-underline-offset: 0.15em;
}

/* the image link: no underline, and let it fill the quarter so the img can shrink */
.info .cell a.img-link {
  text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}

/* the image fills its whole quarter, stretched (on purpose) */
.info .cell a.img-link img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: fill;
}

/* images in a quarter shrink to fit it, keeping their shape */
.info .cell img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* the cross: one vertical + one horizontal line, stopping at the inner outline */
.info::before,
.info::after {
  content: "";
  position: absolute;
  background: #6f9e6a;
}
.info::before {   /* vertical */
  left: 50%; top: var(--inset); bottom: var(--inset);
  width: var(--line); transform: translateX(-50%);
}
.info::after {    /* horizontal */
  top: 50%; left: var(--inset); right: var(--inset);
  height: var(--line); transform: translateY(-50%);
}

/* =====================================================================
   PORTRAIT FALLBACK (phones, tall windows)
   Desktop layout above is untouched. Here we:
   - swap the big SVG for the small header SVG (.frame-mobile)
   - draw the right band in CSS (.stage::after)
   - stack the content in one column
   In this block, sizes use vw (1% of screen width), because the stage
   has padding here and cqw would measure the narrower content box.
   ===================================================================== */
@media (max-aspect-ratio: 1/1) {
  body { display: block; overflow: auto; }

  .stage {
    width: 100%;
    aspect-ratio: auto;
    min-height: 100dvh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 4vw;
    padding: 22vw 12vw 8vw 8vw;   /* top: header | right: band | left: stub */
  }

  .frame { display: none; }
  .frame-mobile {
    display: block;
    position: absolute; top: 0; left: 0;
    width: 100%; height: auto;
    z-index: 1;
  }
  .frame-mobile .shape { stroke-width: 1.5; }

  /* right band continues down the page (sits under the header SVG) */
  .stage::after {
    content: "";
    position: absolute;
    top: 26vw; bottom: 0; right: 0;
    width: 7vw;
    box-sizing: border-box;
    background: var(--frame);
    border-left: 0.375vw solid var(--outline);
  }

  /* undo the 1600x900 placement; content just flows */
  .el { position: relative; left: auto; top: auto; width: auto; height: auto; z-index: 2; }

  /* tabs sit on the header SVG (x/y in its 400-unit grid x 0.25vw) */
  .tab-label { position: absolute; height: 9vw; top: 2.5vw; font-size: 7vw; }
  .tab-trophies { left: 2.5vw;  width: 40vw; }
  .tab-gallery  { left: 43.75vw; width: 36vw; }

  .display { gap: 2vw; }
  .motw-label { font-size: 3.5vw; }
  .title   { font-size: 10vw; justify-content: flex-start; }
  .desc    { text-align: left; font-size: 4.6vw; text-shadow: 0.25vw 0.25vw 0 #000; overflow: visible; }
  .slot    { font-size: 3.5vw; }
  .info {
    height: 34vw;          /* fixed so the image has a size to shrink into */
    font-size: 4.5vw;
    border-width: 0.8vw;
    border-radius: 3vw;
    box-shadow:
      inset 0 0 0 0.6vw #000010,
      inset 0 0 0 1.1vw #6f9e6a;
    --line: 0.6vw;
    --inset: 1.1vw;
  }
  .info .cell { padding: 1.5vw 2vw; font-size: 4vw; }
}
