.landing main { padding: 0; }

/* The landing is full-bleed, so moving the whole thing would drag the artwork off
   its own black backing and show a seam. The camera is applied to layers INSIDE
   the stage instead: each quadrant clips its own contents, so a letter can travel
   as far as it likes and the clip edge never moves. Different distances per layer
   is what makes it read as depth rather than as a slide. */
.landing #main { transform: none; }
.landing .site-foot { position: relative; z-index: 30; }

.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: #000;
  overflow: hidden;
}

.quad {
  position: absolute;
  inset: 0;
  display: block;
  color: var(--paper);
  text-decoration: none;
  transition: filter var(--fast) linear;
}
.quad:hover { text-decoration: none; }

.quad--sentai { clip-path: polygon(0 0, 54% 0, 50% 50%, 0 54%); }
.quad--ongaku { clip-path: polygon(54% 0, 100% 0, 100% 46%, 50% 50%); }
.quad--manga  { clip-path: polygon(0 54%, 50% 50%, 46% 100%, 0 100%); }
.quad--anime  { clip-path: polygon(50% 50%, 100% 46%, 100% 100%, 46% 100%); }

/* The fill is a separate layer so it can scale without breaking the clip tiling. */
.quad__fill {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 120% at 50% 50%, rgba(255,255,255,0.10), transparent 60%),
    repeating-linear-gradient(135deg, #0d0d0d 0 22px, #131313 22px 44px);
  transform: scale(1);
  transition: transform var(--slow) var(--ease-slam), background-color var(--slow) linear;
}
.quad:hover .quad__fill,
.quad:focus-visible .quad__fill {
  transform: scale(1.06);
  background-color: var(--quad-accent);
  background-blend-mode: multiply;
}

.quad__letter {
  position: absolute;
  font-family: var(--display);
  font-size: clamp(9rem, 26vw, 22rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 3px rgba(255, 255, 255, 0.14);
  transition: color var(--slow) var(--ease-slam), -webkit-text-stroke-color var(--fast) linear;
  pointer-events: none;
}
.quad:hover .quad__letter,
.quad:focus-visible .quad__letter {
  color: var(--quad-accent);
  -webkit-text-stroke-color: rgba(0, 0, 0, 0.55);
}

.quad__label {
  position: absolute;
  display: grid;
  gap: var(--s1);
  /* The panel's clip-path cuts anything crossing its diagonal, so the label must be
     bounded and allowed to wrap. Without this a long tagline runs under the diagonal
     and gets sliced off. */
  max-width: min(38vw, 420px);
  --tilt: 0deg;
  transform: skewX(var(--skew)) rotate(var(--tilt)) translateY(14px);
  opacity: 0;
  transition: opacity var(--fast) linear, transform var(--slow) var(--ease-slam);
  pointer-events: none;
}
.quad:hover .quad__label,
.quad:focus-visible .quad__label {
  opacity: 1;
  transform: skewX(var(--skew)) rotate(var(--tilt)) translateY(0);
}

.quad__name {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  background: var(--paper);
  color: var(--ink);
  padding: 0 var(--s3);
  justify-self: start;
}
.quad__tagline {
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  padding: var(--s1) var(--s3);
  justify-self: start;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.35;
}
.quad__name { max-width: 100%; overflow-wrap: break-word; }

/* Per-quadrant placement of the letter and the label.

   The cross is deliberately skewed; top vertex 54%, right vertex 46%; so the four wedges
   are NOT mirror images, and each has a different amount of room before its diagonal. Every
   label is pushed as deep toward the centre as its own wedge allows; that asymmetry is what
   makes the composition feel kinetic instead of grid-like. Measured limits:

     sentai  bottom edge runs 54% -> 51% across the label's span, so it may reach ~47vh
     ongaku  bottom edge runs 50% -> 46%, the tightest wedge, so it may reach ~42vh
     manga   top edge runs 54% -> 51%, so the label must start below ~57vh
     anime   top edge runs 50% -> 46%, so the label may start at ~52vh

   Each value below sits inside its own limit with roughly 3vh of slack. Do not flatten these
   to one number; that is safe but visually dead, and it is not necessary. */
.quad--sentai .quad__letter { top: 6vh;  left: 6vw; }
.quad--sentai .quad__label  { top: 34vh; left: 7vw;  --tilt: -2.5deg; }
.quad--ongaku .quad__letter { top: 6vh;  right: 6vw; }
.quad--ongaku .quad__label  { top: 29vh; right: 6vw; text-align: right; justify-items: end; --tilt: 2deg; }
.quad--manga  .quad__letter { bottom: 6vh; left: 6vw; }
.quad--manga  .quad__label  { bottom: 30vh; left: 5vw; --tilt: 2.5deg; }
.quad--anime  .quad__letter { bottom: 6vh; right: 6vw; }
.quad--anime  .quad__label  { bottom: 35vh; right: 7vw; text-align: right; justify-items: end; --tilt: -2deg; }

/* Break the stacked look: each tagline steps off its name by a different amount. */
.quad--sentai .quad__tagline { margin-left: var(--s4); }
.quad--ongaku .quad__tagline { margin-right: var(--s5); }
.quad--manga  .quad__tagline { margin-left: var(--s5); }
.quad--anime  .quad__tagline { margin-right: var(--s3); }

/* Letters drift off their corner too, so the four quadrants never read as a grid. */
/* The tilt is a custom property rather than a transform so the shared rule below
   can compose it with the camera offset; two transform declarations would simply
   overwrite one another. */
.quad--sentai .quad__letter { --letter-tilt: -4deg; }
.quad--ongaku .quad__letter { --letter-tilt: 3deg; }
.quad--manga  .quad__letter { --letter-tilt: 2deg; }
.quad--anime  .quad__letter { --letter-tilt: -3deg; }

/* Furthest layer, so it moves most. Clipped by its quadrant on every side. */
.quad__letter {
  transform: rotate(var(--letter-tilt, 0deg))
             translate3d(calc(var(--cam-x) * -18px), calc(var(--cam-y) * -18px), 0);
}
/* The logo sits nearest the viewer and drifts with the pointer rather than against
   it, which is what separates it from the plate behind. */
.stage__core img {
  transform: translate3d(calc(var(--cam-x) * 7px), calc(var(--cam-y) * 7px), 0);
}
@media (prefers-reduced-motion: reduce) {
  .quad__letter { transform: rotate(var(--letter-tilt, 0deg)); }
  .stage__core img { transform: none; }
}

/* Siblings fade back while one quadrant is active. */
.stage.is-focused .quad { filter: grayscale(1) brightness(0.35); }
.stage.is-focused .quad.is-active { filter: none; }

.stage__core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(150px, 17vw, 250px);
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 0 26px rgba(0, 0, 0, 0.95));
  animation: core-in 900ms var(--ease-slam) both;
}
.stage__core img { width: 100%; display: block; }

@keyframes core-in {
  from { transform: translate(-50%, -50%) scale(0.4) rotate(-70deg); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
}

.stage__hint {
  position: absolute;
  bottom: var(--s3);
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  margin: 0;
  font-family: var(--display);
  letter-spacing: 0.4em;
  font-size: 0.75rem;
  color: var(--paper-dim);
  pointer-events: none;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* Tablet: 2x2 grid of slanted tiles instead of the cross. */
@media (max-width: 900px) {
  .stage { height: auto; display: grid; grid-template-columns: 1fr 1fr; }
  .quad {
    position: relative;
    inset: auto;
    min-height: 42vh;
    clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%) !important;
    border: 2px solid #000;
  }
  /* Letter parked on the right as a watermark, out of the label's way. Scoped per
     quadrant for the same specificity reason as the labels below. */
  .quad__letter { position: absolute; }
  .quad--sentai .quad__letter,
  .quad--ongaku .quad__letter,
  .quad--manga  .quad__letter,
  .quad--anime  .quad__letter {
    top: 50%;
    bottom: auto;
    left: auto;
    right: var(--s4);
    transform: translateY(-50%) rotate(var(--letter-tilt, 0deg));
  }
  /* `top: auto` is load-bearing. Each quadrant sets its own `top` for the desktop
     composition, and an absolutely positioned box with both `top` and `bottom` set
     has its height stretched between them; with top at 34vh inside a panel only
     30vh tall that resolves to zero, and the name and tagline spilled out past the
     panel's clip-path where nothing was visible at all. */
  .quad__label  { position: absolute; max-width: calc(100% - 2 * var(--s3));
                  opacity: 1; transform: skewX(var(--skew)); text-align: left; justify-items: start; }
  /* Repeated per quadrant because the desktop placement is written that way, and a
     media query grants no extra specificity; `.quad__label` alone loses to
     `.quad--sentai .quad__label` no matter where it sits. */
  .quad--sentai .quad__label,
  .quad--ongaku .quad__label,
  .quad--manga  .quad__label,
  .quad--anime  .quad__label {
    top: auto;
    bottom: var(--s4);
    left: var(--s3);
    right: auto;
    text-align: left;
    justify-items: start;
    --tilt: 0deg;
  }
  /* The stepped tagline offsets are a desktop flourish; here they only eat width. */
  .quad__tagline { margin-left: 0 !important; margin-right: 0 !important; }
  .stage__core { width: 120px; }
  .stage__hint { display: none; }
}

/* Phone: single column stack. */
@media (max-width: 560px) {
  .stage { grid-template-columns: 1fr; }
  .quad { min-height: 30vh; }
  .stage__core { display: none; }
}
