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

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 ========== */
.hero {
  min-height: 100vh;
}
.hero-ambient {
  z-index: 0;
}

.hero-title span {
  display: inline-block;
  animation: heroCharIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-title span:nth-child(1) { animation-delay: 0.2s; }
.hero-title span:nth-child(2) { animation-delay: 0.45s; }
.hero-title span:nth-child(3) { animation-delay: 0.7s; }
@keyframes heroCharIn {
  from { opacity: 0; transform: translateY(28px) rotate(-4deg); }
  to   { opacity: 1; transform: translateY(0) rotate(0); }
}

/* Poster */
.hero-poster {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 707/1000;
  animation: posterFloat 7s ease-in-out infinite;
}
@keyframes posterFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-10px) rotate(-0.4deg); }
}
.hero-poster-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  box-shadow:
    0 40px 80px -30px rgba(42,34,48,0.45),
    0 20px 40px -15px rgba(185,92,123,0.3);
}
.hero-poster-frame {
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(139,115,50,0.4);
  border-radius: 2px;
  pointer-events: none;
  z-index: 3;
}
.hero-poster-frame::before,
.hero-poster-frame::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid #8b7332;
}
.hero-poster-frame::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.hero-poster-frame::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.hero-poster-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(217,138,163,0.35), transparent 70%);
  filter: blur(30px);
  z-index: 1;
  pointer-events: none;
  animation: glowPulse 5s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

.hero-strip {
  position: absolute;
  top: 0; bottom: 0;
  right: -10px;
  width: 110px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
  opacity: 0.55;
  z-index: 1;
}
.hero-strip-track {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: stripScroll 40s linear infinite;
}
.hero-strip-track img {
  width: 110px;
  height: 140px;
  object-fit: cover;
  border-radius: 2px;
  filter: saturate(0.9);
}
@keyframes stripScroll {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

/* Scroll hint */
.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
  transition: opacity 0.3s;
}
.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; }
}

/* ========== 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);
}

/* ========== NEWS ticker ========== */
.news-ticker-track {
  animation: tickerScroll 50s linear infinite;
}
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.news-ticker:hover .news-ticker-track { animation-play-state: paused; }

.news-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: color 0.3s;
}
.news-ticker-item:hover { color: #8b7332; }
.news-ticker-item:hover .news-ticker-title { text-decoration: underline; text-underline-offset: 3px; }
.news-ticker-date {
  color: #8b7332;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  letter-spacing: 0.08em;
}
.news-ticker-divider {
  color: rgba(139, 115, 50, 0.4);
  font-size: 8px;
}

/* ========== Intro / photo tilt ========== */
.marker-gold {
  background: linear-gradient(transparent 55%, rgba(217,138,163,0.4) 55%);
  padding: 0 2px;
  font-weight: 500;
}
.intro-photo {
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 18px 35px -20px rgba(42,34,48,0.35);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.intro-photo img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  transition: transform 1.5s ease;
}
.intro-photo:hover img { transform: scale(1.08); }
.tilt-left  { transform: rotate(-1.5deg); }
.tilt-right { transform: rotate(1.5deg); }
.tilt-up    { transform: translateY(-10px); }
.tilt-left:hover, .tilt-right:hover, .tilt-up:hover { transform: rotate(0deg) translateY(-12px); }

/* ========== STORY ========== */
.story-float {
  position: absolute;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 20px 40px -20px rgba(42,34,48,0.4);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}
.story-float-1 {
  width: 240px; height: 320px;
  top: 10%; left: -80px;
  transform: rotate(-5deg);
}
.story-float-2 {
  width: 200px; height: 260px;
  bottom: 12%; right: -60px;
  transform: rotate(6deg);
}
@media (max-width: 768px) {
  .story-float-1 { width: 140px; height: 180px; left: -60px; opacity: 0.3; }
  .story-float-2 { width: 120px; height: 160px; right: -40px; opacity: 0.3; }
}

.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 ========== */
.cast-block {
  position: relative;
}
.cast-photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 25px 50px -20px rgba(42,34,48,0.5);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.cast-photo-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,0.4);
  margin: 10px;
  z-index: 2;
  pointer-events: none;
}
.cast-photo-frame img {
  transition: transform 1.5s ease;
}
.cast-photo-frame:hover img { transform: scale(1.06); }
.cast-role-tag {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: #8b7332;
  background: #f6efe6;
  padding: 6px 18px;
  border: 1px solid rgba(139,115,50,0.3);
  border-radius: 999px;
  white-space: nowrap;
}

.comment-box {
  position: relative;
  padding: 28px 24px 24px 48px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(139,115,50,0.2);
  border-radius: 2px;
  backdrop-filter: blur(4px);
}
.quote-mark {
  position: absolute;
  top: 8px;
  left: 18px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 48px;
  line-height: 1;
  color: #d98aa3;
  opacity: 0.6;
}

/* Sub Cast */
.sub-cast { text-align: center; }
.sub-cast-photo {
  overflow: hidden;
  aspect-ratio: 3/4;
  border-radius: 2px;
  box-shadow: 0 15px 30px -18px rgba(42,34,48,0.4);
  background: #efe3d3;
  position: relative;
}
.sub-cast-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease;
}
.sub-cast-photo:hover img { transform: scale(1.05); }
.sub-cast-photo-text {
  background: linear-gradient(135deg, rgba(217,138,163,0.08), rgba(139,115,50,0.06));
  border: 1px solid rgba(139,115,50,0.2);
}

/* ========== Gallery ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 110px;
  gap: 8px;
}
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 130px;
    gap: 6px;
  }
}
.gallery-item {
  overflow: hidden;
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  background: #efe3d3;
  box-shadow: 0 10px 25px -15px rgba(42,34,48,0.35);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s ease, filter 0.4s;
}
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(217,138,163,0.2), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item:hover::after { opacity: 1; }

/* Dynamic spans (desktop) */
@media (min-width: 769px) {
  .gi-1  { grid-column: span 3; grid-row: span 3; }
  .gi-2  { grid-column: span 3; grid-row: span 2; }
  .gi-3  { grid-column: span 2; grid-row: span 2; }
  .gi-4  { grid-column: span 2; grid-row: span 2; }
  .gi-5  { grid-column: span 2; grid-row: span 3; }
  .gi-6  { grid-column: span 2; grid-row: span 2; }
  .gi-7  { grid-column: span 2; grid-row: span 2; }
  .gi-8  { grid-column: span 2; grid-row: span 2; }
  .gi-9  { grid-column: span 3; grid-row: span 2; }
  .gi-10 { grid-column: span 3; grid-row: span 2; }
  .gi-11 { grid-column: span 3; grid-row: span 2; }
  .gi-12 { grid-column: span 3; grid-row: span 2; }
}
@media (max-width: 768px) {
  .gi-1 { grid-column: span 2; grid-row: span 2; }
  .gi-5 { grid-column: span 2; }
  .gi-10 { grid-column: span 2; }
}

/* ========== Staff ========== */
.staff-card {
  padding: 28px 16px;
  text-align: center;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(139,115,50,0.2);
  border-radius: 2px;
  transition: transform 0.5s, box-shadow 0.5s;
}
.staff-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px -15px rgba(42,34,48,0.3);
}
.staff-label {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: #8b7332;
  margin-bottom: 10px;
}
.staff-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 22px;
  font-weight: 500;
  color: #2a2230;
}
.staff-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: rgba(42,34,48,0.5);
  margin-top: 4px;
}

.credits-box {
  padding: 36px 28px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(139,115,50,0.2);
  border-radius: 2px;
}
.credit-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(139,115,50,0.15);
}
.credit-row dt {
  flex-shrink: 0;
  width: 140px;
  font-family: 'Noto Serif JP', serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #8b7332;
}
.credit-row dd {
  flex: 1;
  font-family: 'Noto Serif JP', serif;
  color: #2a2230;
}

/* ========== Info ========== */
.info-release {
  padding: 40px 20px;
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, rgba(255,255,255,0.8), rgba(255,255,255,0.3));
  border: 1px solid rgba(139,115,50,0.2);
  border-radius: 4px;
}

/* ========== 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); }
}

/* ========== 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; }

/* Lightbox */
#lightbox { transition: opacity 0.35s; }
#lightbox.is-open { display: flex; }
#lightbox.is-open #lightbox-img {
  animation: lbIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes lbIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(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);
}
