/* =========================================================
   VIGNETTE — the page beneath the mask (Figma red build)
   Vivid crimson, slab-serif headings, monospace body.
   ========================================================= */

:root {
  --v-red-bright: #c21414;  /* hero — vivid */
  --v-red: #8e0f0f;
  --v-red-deep: #2a0606;
  --v-ink: #f1e7e3;     /* main text */
  --v-muted: #dcc3be;   /* body copy on red */
  --v-dim: #c3a8a3;     /* dimmed heading words */
  --v-faint: #8a4742;
  --v-orange: #df5a2a;  /* tagline accent */
  --v-rule: rgba(255,255,255,0.22);
  --slab: "Zilla Slab", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  /* display face for the headings — Latin only, so Japanese falls back to mincho */
  --display: "Rye", "Zilla Slab", Georgia, serif;
}

body.vignette {
  /* one continuous background image for the whole page; hero & synopsis sit
     on top, the lower sections (Experience / Trailer / footer) are transparent
     so this same image runs straight down with no section splits */
  background: #190404 url("../assets/img/bg_red.png") center top / 100% 100% no-repeat;
  color: var(--v-ink);
  font-family: var(--mono);
  overflow-x: hidden;
}

/* fade in from black — smooth handoff from the dissolve */
#fade {
  position: fixed; inset: 0; z-index: 100; background: #000;
  pointer-events: none; opacity: 1; transition: opacity 1.6s ease-out;
}
body.ready #fade { opacity: 0; }

::selection { background: #000; color: var(--v-orange); }

/* discreet EN / JA toggle */
.lang-floating {
  position: fixed; top: 1.2rem; right: 1.4rem; z-index: 80;
  display: inline-flex; align-items: center; gap: 0.4rem;
  mix-blend-mode: difference;
}
.lang-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  color: #e6c4bf; font-family: var(--mono); font-size: 0.74rem;
  letter-spacing: 0.06em; transition: color 0.2s;
}
.lang-btn:hover { color: #fff; }
.lang-btn.active { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.lang-sep { color: rgba(255,255,255,0.4); }

.v-label {
  font-family: var(--mono); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.18em; color: var(--v-ink); margin-bottom: 1.4rem;
}

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Hero (single composite image + overlaid copy) ---------- */
.v-hero {
  position: relative; background: #6d0000;
  display: block; line-height: 0;
}
.hero-pic, .hero-img { display: block; width: 100%; }
.hero-img { height: auto; }
.hero-overlay {
  position: absolute; left: 0; right: 0; bottom: 11%;
  z-index: 3; text-align: center; line-height: 1.2;
  padding: 0 1.5rem;
}
.v-hero .tagline {
  margin: 0 0 1.4rem;
  font-family: var(--slab); font-weight: 500;
  font-size: clamp(1.3rem, 2.9vw, 2.1rem); color: var(--v-orange);
  letter-spacing: 0.01em;
  text-shadow: 0 2px 16px rgba(25,0,0,0.7), 0 0 4px rgba(25,0,0,0.55);
}
.v-cta {
  display: inline-block; box-sizing: border-box;
  width: clamp(220px, 21vw, 430px); text-align: center;  /* ~400px at 1920, scales with width */
  border: none; color: #fff; background: #0b0303;
  font-family: var(--mono); font-weight: 500; font-size: 0.84rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 1.15em 2em; border-radius: 2px;
  transition: background 0.25s, box-shadow 0.25s, transform 0.2s;
}
.v-cta:hover { background: #000; box-shadow: 0 0 34px -8px rgba(0,0,0,0.8); transform: translateY(-1px); }
.scroll-hint {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  z-index: 3; line-height: 1;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: rgba(255,255,255,0.6);
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,8px); } }

/* ---------- Generic section ---------- */
.v-section { position: relative; padding: 7rem 0; }
.v-section .container { position: relative; z-index: 2; }
.v-section h2 {
  font-family: var(--display); font-weight: 400;   /* Rye ships one weight — no faux bold */
  font-size: clamp(1.7rem, 3.8vw, 2.7rem); line-height: 1.2; color: var(--v-ink);
}
.v-section h2 .dim,
.lede .dim { color: var(--v-dim); }

/* Synopsis — natural hallway as a masked layer that fades into the red field
   (top & bottom fade to transparent so the continuous body field shows through;
   no hard section seam) */
.v-scenario { background: transparent; }
.v-scenario::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8,3,3,0.5) 0%, rgba(8,3,3,0.1) 26%,
      rgba(8,3,3,0) 55%, rgba(8,3,3,0.2) 90%),
    url("../assets/img/hallway.png") center top / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 64%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 64%, transparent 100%);
}
.v-scenario .lede {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.45rem, 3vw, 2.3rem); line-height: 1.34;
  margin-bottom: 2.8rem; color: var(--v-ink);
}
.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  max-width: 1000px; color: var(--v-muted); font-size: 0.92rem; line-height: 1.9;
}
.two-col > p { margin: 0; padding-right: 3rem; }
.two-col > p + p {
  padding-right: 0; padding-left: 3rem;
  border-left: 1px solid var(--v-rule);
}

/* Experience — transparent: the body background image shows through */
.v-exp { background: transparent; }
/* staircase: each item begins below where the previous ended, sides alternate */
.exp-grid { margin-top: 3.5rem; }
.exp-item {
  border-left: 1px solid var(--v-rule); padding-left: 1.6rem;
  width: min(30rem, 48%);
}
.exp-item + .exp-item { margin-top: 3.5rem; }
.exp-item:nth-child(even) { margin-left: auto; }   /* 02 → right */
.exp-item .num {
  font-family: var(--display); font-weight: 400; font-size: 2.6rem;
  line-height: 1; color: rgba(241,231,227,0.6);
}
.exp-item h3 {
  font-family: var(--display); font-weight: 400; font-size: 1.45rem;
  line-height: 1.3; margin: 0.4rem 0 0.9rem; color: var(--v-ink);
}
.exp-item p { color: var(--v-muted); font-size: 0.9rem; line-height: 1.85; }

/* Trailer — heading left, transparent (shares the continuous body field) */
.v-trailer {
  background: transparent;
  text-align: left;
}
.video-frame {
  position: relative; margin: 3rem auto 0; max-width: 880px; aspect-ratio: 16 / 9;
  border: 1px solid rgba(255,255,255,0.18); border-radius: 3px; overflow: hidden;
  background: #160202; box-shadow: 0 30px 80px -40px rgba(0,0,0,0.85);
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.play {
  position: absolute; inset: 0; margin: auto;
  width: 80px; height: 80px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.7); background: rgba(20,2,2,0.4);
  display: grid; place-items: center; transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}
.play:hover { transform: scale(1.08); background: rgba(40,4,4,0.65); box-shadow: 0 0 40px -6px rgba(0,0,0,0.8); }
.play svg { width: 26px; height: 26px; fill: #fff; margin-left: 4px; }
.video-frame.playing .play { display: none; }

/* 002 — Exhibition: a window you step through */
.v-exhibit .container { text-align: center; }
.v-exhibit h2 { margin-bottom: 0.9rem; }
.v-exhibit .exhibit-lede {
  color: var(--v-muted); font-size: 0.92rem; line-height: 1.9;
  max-width: 46ch; margin: 0 auto 2.2rem;
}
body.lang-ja .v-exhibit .exhibit-lede { font-family: "Noto Serif JP", serif; }

/* how the hall works — said here, so entering is one click */
.exhibit-guide {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 0.8rem 3rem; margin: 0 auto 2.4rem;
}
.exhibit-guide span { display: block; }
.exhibit-guide b {
  display: block; font-family: var(--mono); font-weight: 500;
  font-size: 0.6rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--v-faint);
}
.exhibit-guide i {
  display: block; margin-top: 0.3rem; font-style: normal;
  font-family: var(--mono); font-size: 0.78rem; color: var(--v-muted);
}
body.lang-ja .exhibit-guide b,
body.lang-ja .exhibit-guide i { font-family: "Noto Serif JP", serif; letter-spacing: 0.08em; }

.exhibit-note {
  margin: 1.1rem 0 0; font-family: var(--mono);
  font-size: 0.66rem; letter-spacing: 0.1em; color: var(--v-faint);
}
body.lang-ja .exhibit-note { font-family: "Noto Serif JP", serif; }

@media (max-width: 860px) {
  .exhibit-guide { gap: 0.9rem 1.6rem; margin-bottom: 1.8rem; }
  .exhibit-guide i { font-size: 0.72rem; }
}

/* the window: a lit doorway cut into the page */
.exhibit-door {
  display: block; position: relative; width: min(760px, 100%);
  margin: 0 auto; padding: 0; border: none; background: #0a0303;
  cursor: pointer; overflow: hidden; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.14), 0 40px 90px -30px rgba(0,0,0,0.95);
  transition: box-shadow 0.5s ease, transform 0.5s ease;
  -webkit-tap-highlight-color: transparent;
}
.exhibit-door img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 10;
  object-fit: cover; object-position: center 45%;
  filter: brightness(0.82) saturate(0.95);
  transform: scale(1.02);
  transition: transform 1.1s cubic-bezier(.2,.7,.2,1), filter 0.7s ease;
}
/* darkness at the edges — you are looking in from outside */
.door-veil {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(75% 60% at 50% 48%, rgba(0,0,0,0) 30%, rgba(10,3,3,0.75) 80%, rgba(10,3,3,0.95) 100%);
  transition: opacity 0.7s ease;
}
.door-cta {
  position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  font-family: var(--mono); font-size: 0.76rem; font-weight: 500;
  letter-spacing: 0.28em; text-transform: uppercase; color: #fff;
  padding: 0.85em 2.4em; background: rgba(6,2,2,0.72);
  border: 1px solid rgba(255,255,255,0.28); border-radius: 2px;
  backdrop-filter: blur(3px);
  transition: background 0.35s, border-color 0.35s, letter-spacing 0.5s;
  white-space: nowrap;
}
body.lang-ja .door-cta { font-family: "Noto Serif JP", serif; letter-spacing: 0.2em; }

.exhibit-door:hover img,
.exhibit-door:focus-visible img { transform: scale(1.09); filter: brightness(1) saturate(1); }
.exhibit-door:hover .door-veil,
.exhibit-door:focus-visible .door-veil { opacity: 0.55; }
.exhibit-door:hover .door-cta,
.exhibit-door:focus-visible .door-cta {
  background: rgba(6,2,2,0.9); border-color: rgba(255,255,255,0.6); letter-spacing: 0.34em;
}
.exhibit-door:focus-visible { outline: 1px solid var(--v-orange); outline-offset: 4px; }

/* stepping through: the window swallows the screen */
.exhibit-door.entering { transform: scale(1.04); box-shadow: 0 0 0 1px rgba(255,255,255,0.3), 0 0 140px 20px rgba(0,0,0,0.9); }
.exhibit-door.entering img { transform: scale(1.35); filter: brightness(1.1); }
.exhibit-door.entering .door-veil { opacity: 0; }
.exhibit-door.entering .door-cta { opacity: 0; }

/* ---- the hall itself, over the page ---- */
.exhibit-stage {
  position: fixed; inset: 0; z-index: 200; background: #000;
  opacity: 0; pointer-events: none; transition: opacity 0.55s ease;
}
.exhibit-stage.open { opacity: 1; pointer-events: auto; }
.exhibit-stage iframe { width: 100%; height: 100%; border: 0; display: block; }
.exhibit-close {
  position: absolute; top: 1rem; right: 1.2rem; z-index: 2;
  background: rgba(6,2,2,0.6); border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.85); cursor: pointer; border-radius: 2px;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; padding: 0.7em 1.4em; backdrop-filter: blur(4px);
}
.exhibit-close:hover { color: #fff; border-color: rgba(255,255,255,0.6); }
.exhibit-close:focus-visible { outline: 1px solid var(--v-orange); outline-offset: 2px; }
body.lang-ja .exhibit-close { font-family: "Noto Serif JP", serif; }
body.exhibit-open { overflow: hidden; }

@media (max-width: 860px) {
  .door-cta { bottom: 1.1rem; font-size: 0.68rem; padding: 0.8em 1.8em; letter-spacing: 0.2em; }
  .exhibit-door img { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  .exhibit-door, .exhibit-door img, .door-veil, .door-cta, .exhibit-stage { transition: none; }
  .exhibit-door.entering img { transform: scale(1.02); }
}

/* Footer */
.v-foot {
  background: transparent; color: var(--v-faint);
  padding: 3.5rem 0; text-align: center; font-size: 0.82rem;
}
.v-foot a { color: var(--v-muted); }
.v-foot a:hover { color: var(--v-orange); }
.v-foot .small { font-size: 0.72rem; color: #8a514c; margin-top: 0.8rem; line-height: 1.7; }

/* ---------- Japanese typography ---------- */
/* Rye has no Japanese glyphs — JA keeps mincho, and its original weight */
body.lang-ja .v-section h2,
body.lang-ja .v-scenario .lede,
body.lang-ja .exp-item h3,
body.lang-ja .v-hero .tagline { font-family: "Noto Serif JP", serif; font-weight: 600; }
body.lang-ja .two-col,
body.lang-ja .exp-item p,
body.lang-ja .v-foot { font-family: "Noto Serif JP", serif; }

@media (max-width: 860px) {
  /* The art stays full-bleed with the words over it. On a phone the hero is
     only ~210px tall, and the overlay sat at 11% while the scroll cue sat at
     1.6rem — practically the same line, so they collided. Lift the overlay
     and shrink the button so each has its own room. */
  .hero-overlay { bottom: 24%; padding: 0 1rem; }
  .v-hero .tagline { font-size: 1.05rem; margin-bottom: 0.9rem; }
  .v-hero .v-cta {
    width: auto; font-size: 0.7rem; letter-spacing: 0.12em; padding: 0.95em 1.7em;
  }
  .scroll-hint { bottom: 0.7rem; font-size: 0.6rem; letter-spacing: 0.24em; }

  .two-col { grid-template-columns: 1fr; gap: 2.4rem; }
  .two-col > p { padding-right: 0; }
  .two-col > p + p { padding-left: 0; border-left: none; }
  .exp-item { width: auto; margin-left: 0; }
  .exp-item + .exp-item { margin-top: 2.4rem; }
  .v-scenario { background-attachment: scroll; }
  .v-section { padding: 5rem 0; }
}
