/* ============================================
   映画『傘少女』公式サイト — 本サイト
   ============================================ */

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(217,138,163,0.15), transparent 60%),
    radial-gradient(ellipse 70% 60% at 100% 30%, rgba(122,90,152,0.1), transparent 60%),
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(139,115,50,0.08), transparent 60%),
    linear-gradient(180deg, #f6efe6 0%, #efe3d3 100%);
  color: #2a2230;
}

/* ========== Header ========== */
#site-header {
  background: transparent;
}
#site-header.is-scrolled {
  background: rgba(246, 239, 230, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(139,115,50,0.1);
}
.nav-link {
  position: relative;
  transition: color 0.3s;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: #8b7332;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s;
}
.nav-link:hover { color: #8b7332; }
.nav-link:hover::after { transform: scaleX(1); }

.hamburger-line {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #2a2230;
  transition: transform 0.3s, opacity 0.3s;
}
.is-open .hamburger-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.is-open .hamburger-line:nth-child(2) { opacity: 0; }
.is-open .hamburger-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

#mobile-menu {
  background: rgba(246, 239, 230, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  border-top: 1px solid rgba(139,115,50,0.15);
}
.mobile-menu-hidden { max-height: 0; }
.mobile-menu-open   { max-height: 600px; }
.mobile-link {
  transition: color 0.3s;
}
.mobile-link:hover { color: #8b7332; }

/* ========== HERO (scattered layout) ========== */
.hero-new {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* Mobile: flex column */
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100svh;
  padding: 90px 24px 60px;
  gap: 28px;
  background:
    radial-gradient(ellipse 70% 50% at 0% 0%, rgba(217,138,163,0.18), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(139,115,50,0.08), transparent 55%),
    linear-gradient(160deg, #f6efe6 0%, #f2e5d6 100%);
}

/* Main visual — mobile: shown inline */
.hero-visual-img {
  width: 80%;
  max-width: 300px;
  border-radius: 4px;
  box-shadow:
    0 30px 60px -20px rgba(42,34,48,0.35),
    0 10px 30px -10px rgba(185,92,123,0.2);
  order: 0;
  flex-shrink: 0;
}

/* Left content block — mobile: centered column */
.hero-left-block {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  order: 1;
}

.hero-movie-label {
  font-size: 14px;
  letter-spacing: 0.4em;
  color: rgba(42,34,48,0.6);
  margin-bottom: -6px;
}

.hero-logo-img {
  width: min(380px, 88%);
}

.hero-subtitle-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: rgba(42,34,48,0.38);
  margin-top: -10px;
}

.hero-salescopy-img {
  display: none; /* mobile: hidden（左ブロックから外したため） */
  mix-blend-mode: multiply;
}

.hero-release-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-date-img {
  height: 42px;
  mix-blend-mode: multiply;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-cast-line {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(42,34,48,0.55);
}

.hero-theater-link {
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: rgba(42,34,48,0.55);
  border-bottom: 1px solid rgba(42,34,48,0.25);
  padding-bottom: 1px;
  margin-bottom: 14px;
  text-decoration: none;
  transition: color 0.3s, border-color 0.3s;
}
.hero-theater-link:hover {
  color: #8b7332;
  border-color: #8b7332;
}
.hero-ticket-block {
  width: 100%;
  max-width: 340px;
}

/* Desktop: push ticket block to bottom of sticky column */
@media (min-width: 1024px) {
  .hero-ticket-block {
    margin-top: auto;
    padding-bottom: 48px;
    max-width: 100%;
  }
}

/* Catchcopy vertical text — hidden on mobile */
.hero-catchcopy-img {
  display: none;
}

/* Scroll hint */
.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
  transition: opacity 0.3s;
  order: 2;
  margin-top: 8px;
}
.scroll-hint:hover { opacity: 1; }
.scroll-hint-line {
  display: block;
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, transparent, #8b7332);
  animation: scrollLine 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(0.3); opacity: 0.4; }
  50%      { transform: scaleY(1); opacity: 1; }
}

/* ===== HERO Desktop (1024px+) ===== */
@media (min-width: 1024px) {
  /* flex: left sticky column + right image column */
  .hero-new {
    display: flex;
    align-items: flex-start;
    flex-direction: row;
    padding: 0;
    gap: 0;
    height: auto;
    min-height: 100svh;
    overflow: hidden;
  }

  /* Left block: sticky, stays in view while scrolling past the image */
  .hero-left-block {
    position: sticky;
    top: 0;
    flex-shrink: 0;
    width: 45%;
    height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding-left: 8%;
    padding-top: 28vh;
    text-align: left;
    max-width: none;
    transform: none;
    z-index: 2;
    gap: 20px;
  }

  /* Visual: in-flow on the right, natural height determines section height */
  .hero-visual-img {
    position: relative;
    flex-shrink: 0;
    width: 55%;
    height: auto;
    max-width: none;
    border-radius: 0;
    box-shadow: none;
    order: 2;
    z-index: 1;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%);
    mask-image: linear-gradient(to right, transparent 0%, black 10%);
  }

  .hero-logo-img { width: min(800px, 90%); }
  .hero-date-img { height: 56px; }

  .hero-cta-row { flex-direction: row; }

  /* 縦書きキャッチコピー: ビジュアル左端に縦配置、2倍サイズ */
  .hero-catchcopy-img {
    display: block;
    position: absolute;
    top: 72px;
    left: 47%;
    height: 92vh;
    width: auto;
    mix-blend-mode: multiply;
    z-index: 2;
    opacity: 0.85;
  }

  /* 横書き広告コピー: ビジュアル中央揃え、1.5倍サイズ・下端 */
  .hero-salescopy-img {
    display: none;
  }

  /* widget/banner 幅を揃える（JS で banner を widget 幅に合わせる） */
  .hero-ticket-block { width: 100%; }
  .hero-ticket-block a { display: block; }

  /* Scroll hint: fixed to viewport bottom while in hero */
  .scroll-hint {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    order: unset;
    margin-top: 0;
  }
}

@media (min-width: 1280px) {
  .hero-left-block { padding-left: 9%; }
}

/* ========== Reveal Animation ========== */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Intro ========== */
.marker-gold {
  background: linear-gradient(transparent 55%, rgba(217,138,163,0.4) 55%);
  padding: 0 2px;
  font-weight: 500;
}

/* ========== STORY ========== */
.tilt-left  { transform: rotate(-1.5deg); }
.tilt-right { transform: rotate(1.5deg); }

.story-lead-img img {
  transition: transform 8s ease;
}
.story-lead-img:hover img {
  transform: scale(1.04);
}

/* ========== Trailer ========== */
.trailer-wrap {
  position: relative;
}
.corner {
  position: absolute;
  width: 24px; height: 24px;
  border: 1px solid #8b7332;
  opacity: 0.7;
  transition: all 0.5s;
}
.corner-tl { top: -8px; left: -8px; border-right: none; border-bottom: none; }
.corner-tr { top: -8px; right: -8px; border-left: none; border-bottom: none; }
.corner-bl { bottom: -8px; left: -8px; border-right: none; border-top: none; }
.corner-br { bottom: -8px; right: -8px; border-left: none; border-top: none; }
.group:hover .corner { width: 36px; height: 36px; }

/* ========== Cast (new card layout) ========== */
.cast-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 24px;
  max-width: 780px;
  margin: 0 auto;
}
@media (max-width: 640px) {
  .cast-card-grid { gap: 24px 28px; justify-items: center; }
  .cast-card { min-width: 0; width: 100%; }
  .cast-card:hover { transform: none; }
  .cast-circle {
    width: clamp(52px, 14vw, 66px);
    height: clamp(52px, 14vw, 66px);
    clip-path: circle(50%);
    contain: paint;
  }
  /* チンダイ: モーダルと同じ +5px オフセットに統一 */
  .cast-card[data-cast="chindai"] .cast-circle img { left: calc(50% + 5px) !important; }
  .cast-char-name { font-size: 11px; letter-spacing: 0.05em; }
  .cast-char-sub  { font-size: 10px; letter-spacing: 0.1em; }
  .cast-char-role { font-size: 6px; letter-spacing: 0; }
  .cast-cv-name { font-size: 10px; letter-spacing: 0.05em; }
}

.cast-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}
.cast-card:hover { transform: translateY(-8px); }

.cast-circle {
  width: clamp(120px, 22vw, 200px);
  height: clamp(120px, 22vw, 200px);
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 3px solid rgba(255,255,255,0.9);
  box-shadow:
    0 12px 32px -10px rgba(42,34,48,0.3),
    0 0 0 1px rgba(139,115,50,0.15);
  background: #fff;
  flex-shrink: 0;
  transform: translateZ(0);
}
.cast-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cast-char-name {
  font-size: clamp(14px, 2.5vw, 20px);
  font-weight: 500;
  color: #2a2230;
  letter-spacing: 0.1em;
  margin-top: 4px;
}
.cast-char-sub {
  font-size: 11px;
  color: rgba(42,34,48,0.45);
  letter-spacing: 0.2em;
  margin-top: -4px;
}
.cast-char-role {
  font-size: 10px;
  color: rgba(42,34,48,0.5);
  letter-spacing: 0.15em;
  margin-top: 2px;
}
.cast-cv-label {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: rgba(42,34,48,0.6);
  margin-top: 4px;
}
.cast-cv-name {
  font-size: clamp(12px, 2vw, 15px);
  color: rgba(42,34,48,0.75);
  letter-spacing: 0.15em;
}

/* Supporting cast list */
.sub-cast-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(139,115,50,0.1);
}
.sub-cast-role {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(42,34,48,0.55);
}
.sub-cast-actor {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: rgba(42,34,48,0.75);
}
.staff-compact-romaji {
  display: block;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(42,34,48,0.4);
  margin-top: 1px;
}

/* ========== Cast Modal ========== */
.cast-modal-hidden  { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.35s, visibility 0.35s; }
.cast-modal-visible { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.35s; }

.cast-modal-content {
  background: #f6efe6;
  border-radius: 4px;
  padding: 40px 32px 36px;
  max-width: 520px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 30px 80px -20px rgba(42,34,48,0.5);
  animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes modalIn {
  from { transform: scale(0.92) translateY(16px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.cast-modal-close-btn {
  position: absolute;
  top: -44px;
  right: 0;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s;
  padding: 4px;
}
.cast-modal-close-btn:hover { color: #d98aa3; }
@media (max-width: 640px) {
  .cast-modal-close-btn {
    top: 10px;
    right: 10px;
    color: rgba(42,34,48,0.6);
    background: rgba(246,239,230,0.9);
    border-radius: 50%;
    padding: 7px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
  }
  .cast-modal-content { padding: 48px 20px 28px; }
}

.cast-modal-circle-wrap {
  width: 120px;
  height: 120px;
  min-width: 120px;
  min-height: 120px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 3px solid rgba(255,255,255,0.9);
  box-shadow: 0 8px 24px -8px rgba(42,34,48,0.3);
  background: #fff;
  transform: translateZ(0);
}
.cast-modal-circle-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.cast-modal-comment-box {
  position: relative;
  margin-top: 20px;
  padding: 28px 20px 20px 44px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(139,115,50,0.2);
  border-radius: 2px;
  text-align: left;
}
.cast-modal-quote {
  position: absolute;
  top: 6px;
  left: 14px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 44px;
  line-height: 1;
  color: #d98aa3;
  opacity: 0.55;
}

/* ========== Staff (compact) ========== */
.staff-compact-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 32px;
  max-width: 680px;
  margin: 0 auto;
}
.staff-compact-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.staff-compact-label {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #8b7332;
}
.staff-compact-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 14px;
  font-weight: 500;
  color: #2a2230;
  letter-spacing: 0.08em;
}

/* ========== Particle ========== */
#particles { overflow: hidden; }
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: floatUp linear infinite;
  opacity: 0;
}
@keyframes floatUp {
  0%   { opacity: 0; transform: translateY(0) translateX(0) scale(0.5); }
  10%  { opacity: 0.75; }
  90%  { opacity: 0.75; }
  100% { opacity: 0; transform: translateY(-110vh) translateX(40px) scale(1); }
}

/* ========== Trailer Modal ========== */
#trailer-modal { transition: opacity 0.4s, visibility 0.4s; }
#trailer-modal.modal-hidden  { opacity: 0; visibility: hidden; pointer-events: none; }
#trailer-modal.modal-visible { opacity: 1; visibility: visible; pointer-events: auto; }
#trailer-modal .relative.z-10 { transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s; }
#trailer-modal.modal-hidden  .relative.z-10 { transform: scale(0.92); opacity: 0; }
#trailer-modal.modal-visible .relative.z-10 { transform: scale(1); opacity: 1; }

/* ========== Scrollbar ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f6efe6; }
::-webkit-scrollbar-thumb { background: rgba(139,115,50,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139,115,50,0.5); }

/* ========== Shadows ========== */
.shadow-2xl {
  box-shadow:
    0 25px 55px -12px rgba(42, 34, 48, 0.28),
    0 0 80px -20px rgba(217, 138, 163, 0.15),
    0 0 120px -40px rgba(122, 90, 152, 0.1);
}

/* ========== Gallery Strip ========== */
.gallery-strip { background: transparent; }
.gallery-track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: gallery-scroll 65s linear infinite;
}
.gallery-img {
  height: 220px;
  width: auto;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}
@keyframes gallery-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ========== Gallery Modal ========== */
.gallery-modal-hidden  { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.3s, visibility 0.3s; }
.gallery-modal-visible { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.3s, visibility 0.3s; }
#gallery-modal-img { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); transform: scale(0.95); }
.gallery-modal-visible #gallery-modal-img { transform: scale(1); }
