/* --------------------------------------------------
   1. Design tokens / Base
-------------------------------------------------- */
:root {
  --color-accent: #ff003c;
  --color-detail: #ff4200;
  --color-header: #ff4200;
  --color-nav: #4d4d4d;
  --color-text: #050505;
  --color-white: #fff;
  --content-width: 700px;
  --hero-width: 1000px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: #000;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background: #000 url("../img/dshinpan_background.webp") center top / 100% auto fixed no-repeat;
  color: var(--color-text);
  font-family: "M PLUS 1p", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-feature-settings: "palt";
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --------------------------------------------------
   2. Sticky header
-------------------------------------------------- */
.dechauheaderWrapper {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  margin-bottom: 1rem;
}

.dechauheader {
  background: var(--color-header);
}

.dechauheader a {
  display: block;
  padding: 10px;
}

.dechauheader img {
  width: min(80%, 400px);
  margin: 0 auto;
}

.dechauheaderContentsWrapper {
  background: var(--color-nav);
}

.dechauheaderContents {
  display: flex;
  justify-content: space-between;
  width: min(90%, 600px);
  margin: 0 auto;
}

.dechauheaderContents a {
  padding: 0.55em;
  color: var(--color-white);
  font-size: 0.9rem;
  font-weight: 700;
}

/* --------------------------------------------------
   3. Main visual
-------------------------------------------------- */
.mainVisual {
  display: flex;
  justify-content: center;
}

.mainLogo {
  width: min(100%, var(--hero-width));
}

.mainLogoImage {
  height: auto;
  width: 100%;
}

.mainDate {
  position: relative;
  z-index: 1;
  width: min(84%, 620px);
  margin: -5% auto 0;
  padding: 0.6em 1em;
  border: 4px solid var(--color-accent);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--color-text);
  font-size: clamp(1.1rem, 4vw, 2rem);
  font-weight: 900;
  text-align: center;
}

.sampleLabel {
  display: inline-block;
  margin-right: 0.5em;
  padding: 0.2em 0.55em;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 0.55em;
  letter-spacing: 0.08em;
  vertical-align: middle;
}

/* --------------------------------------------------
   4. Main content / Concept
-------------------------------------------------- */
.pageContent {
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
}

.conceptIntro {
  margin: 1.5rem auto 2rem;
  padding: clamp(1.1rem, 4vw, 2rem);
  border: clamp(4px, 0.7vw, 7px) solid var(--color-accent);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.conceptIntro h1 {
  padding-bottom: 0.65em;
  border-bottom: 5px solid var(--color-detail);
  color: var(--color-accent);
  font-size: clamp(1.45rem, 5vw, 2.65rem);
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
}

.conceptIntro ul {
  display: grid;
  gap: 0.65em;
  margin-top: 1em;
  list-style: none;
}

.conceptIntro li {
  position: relative;
  padding-left: 1.45em;
  font-size: clamp(1rem, 3.2vw, 1.75rem);
  font-weight: 900;
  line-height: 1.55;
}

.conceptIntro li::before {
  content: "";
  position: absolute;
  top: 0.52em;
  left: 0.08em;
  width: 0.72em;
  height: 0.72em;
  background: var(--color-detail);
  transform: rotate(45deg);
}

/* --------------------------------------------------
   5. Schedule / Links
-------------------------------------------------- */
.embeddedWrap {
  display: flex;
  margin-bottom: 2rem;
  overflow: hidden;
  border: 2px solid #777;
  border-radius: 10px;
  background: var(--color-white);
}

.embeddedSchedule {
  width: 100%;
  height: 85vh;
  border: 0;
}

.reportBanner {
  display: block;
  max-width: 500px;
  margin: 2rem auto;
}

.reportBanner img,
.backButton img {
  width: 100%;
}

.backButton {
  display: block;
  margin-top: 2rem;
  padding: 10px;
  border-radius: 15px;
  background: var(--color-header);
}

.copyright {
  margin: 20px 0;
  color: var(--color-white);
  font-size: 0.65rem;
  text-align: center;
}

/* --------------------------------------------------
   6. Animation
-------------------------------------------------- */
.fadeInUp {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.fadeInUp.isVisible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------
   7. Responsive
-------------------------------------------------- */
@media (max-width: 600px) {
  body {
    position: relative;
    min-height: 100dvh;
    isolation: isolate;
    background: transparent;
  }

  .dechauheaderContents a {
    font-size: 0.8rem;
  }

  .mainDate {
    margin-top: -3%;
    border-width: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fadeInUp {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Full-screen background movie with a dot screen. */
.backgroundMovie {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: #000 url("../img/dshinpan_background.webp") center / cover no-repeat;
  pointer-events: none;
}

.backgroundMovie video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.backgroundMovie video.isPlaying { opacity: 1; }

/* A crisp dot screen disguises compression without covering the logo or text. */
.backgroundMovie::before,
.backgroundMovie::after {
  content: "";
  position: absolute;
  inset: 0;
}

.backgroundMovie::before {
  background: radial-gradient(circle, rgba(0, 0, 0, 0.85) 0.85px, transparent 1.15px) 0 0 / 3px 3px;
}

.backgroundMovie::after {
  background: radial-gradient(ellipse at 50% 35%, transparent 15%, rgba(0, 0, 0, 0.5) 100%),
    linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.35));
}

/* Opening movie: the LP stays ready underneath the fade. */
body.isIntroPlaying { overflow: hidden; }

.introMovie {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  overflow: hidden;
  background: #000;
  opacity: 1;
  transition: opacity 1s ease;
}

.introMovie[hidden] { display: none; }
.introMovie.isLeaving { opacity: 0; pointer-events: none; }

.introMovie video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (min-width: 601px) {
  .introMovie video {
    width: auto;
    max-width: none;
    height: 100vh;
    height: 100dvh;
  }
}

.introSkip {
  position: absolute;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  padding: 0.7rem 1.2rem;
  border: 1px solid rgba(255, 215, 145, 0.65);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffe3b0;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.introSkip:hover { background: #5f2d08; }
:focus-visible { outline: 3px solid #ffbc4f; outline-offset: 5px; }
#mainContent:focus { outline: none; }

/* Sparks sit above the background and behind all page content. */
.embers {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ember {
  position: absolute;
  bottom: -20px;
  left: var(--x);
  width: var(--size);
  height: calc(var(--size) * 1.7);
  border-radius: 50%;
  background: #ffbd59;
  box-shadow: 0 0 6px 2px #ff650d, 0 0 15px #ed3b00;
  opacity: 0;
  animation: emberRise var(--duration) var(--delay) linear infinite;
}

@keyframes emberRise {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0deg); }
  12%, 65% { opacity: var(--opacity); }
  100% { opacity: 0; transform: translate3d(var(--drift), -110vh, 0) rotate(180deg); }
}

.embers.isPaused .ember { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .backgroundMovie video { visibility: hidden; transition: none; }
  .embers { display: none; }
  .introMovie { transition: none; }
}
