/* ==========================================================
   Enhanced Scroll — fade-ins, parallax depth, horizontal
   Loads after css/animations.css. All classes prefixed `es-`
   so they never collide with existing animation system.
   ========================================================== */

/* ---------- Reveal-on-scroll (auto-tagged) ---------- */
.es-reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1.05s cubic-bezier(.2,.7,.2,1), transform 1.05s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.es-reveal.es-in { opacity: 1; transform: none; }

.es-reveal-up    { transform: translateY(48px); }
.es-reveal-left  { transform: translateX(-56px); }
.es-reveal-right { transform: translateX(56px); }
.es-reveal-zoom  { transform: scale(.92); }
.es-reveal-blur  { filter: blur(8px); }
.es-reveal.es-in.es-reveal-blur { filter: blur(0); }

/* Stagger inside a group — set on parent */
.es-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.es-stagger.es-in > * { opacity: 1; transform: none; }
.es-stagger.es-in > *:nth-child(1) { transition-delay: .04s; }
.es-stagger.es-in > *:nth-child(2) { transition-delay: .12s; }
.es-stagger.es-in > *:nth-child(3) { transition-delay: .20s; }
.es-stagger.es-in > *:nth-child(4) { transition-delay: .28s; }
.es-stagger.es-in > *:nth-child(5) { transition-delay: .36s; }
.es-stagger.es-in > *:nth-child(6) { transition-delay: .44s; }
.es-stagger.es-in > *:nth-child(7) { transition-delay: .52s; }
.es-stagger.es-in > *:nth-child(8) { transition-delay: .60s; }
.es-stagger.es-in > *:nth-child(n+9) { transition-delay: .68s; }

/* ---------- Parallax depth layers ---------- */
.es-parallax { will-change: transform; }
/* Hero background moves slower — depth illusion */
.hero-main .hero-bg-image,
.page-hero .page-hero-bg,
.hero-bg-image.es-parallax-bg { will-change: transform; }

/* ---------- Decorative drifting marks ---------- */
.es-drift {
  position: absolute;
  pointer-events: none;
  user-select: none;
  font-family: 'Shippori Mincho', 'Noto Serif JP', serif;
  color: rgba(201, 162, 39, 0.06);
  font-weight: 300;
  z-index: 1;
  letter-spacing: 0.2em;
  white-space: nowrap;
  will-change: transform;
}
.es-drift--xl { font-size: clamp(8rem, 22vw, 22rem); line-height: .9; }
.es-drift--lg { font-size: clamp(5rem, 12vw, 14rem); line-height: .9; }
.es-drift--md { font-size: clamp(3rem, 7vw, 8rem); line-height: .9; }

.es-drift-stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* ---------- Horizontal scroll track ---------- */
.es-h-stage {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 0 6vw 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,162,39,0.4) transparent;
}
.es-h-stage::-webkit-scrollbar { height: 6px; }
.es-h-stage::-webkit-scrollbar-track { background: transparent; }
.es-h-stage::-webkit-scrollbar-thumb { background: rgba(201,162,39,0.35); border-radius: 3px; }

.es-h-track {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
  width: max-content;
}

.es-h-stage > * { scroll-snap-align: start; }

/* Hint badge on the right showing it scrolls horizontally */
.es-h-hint {
  position: absolute;
  right: 4vw; top: -3.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: .85rem;
  color: rgba(201,162,39,0.65);
  letter-spacing: 0.1em;
  pointer-events: none;
  z-index: 5;
}
.es-h-hint::after {
  content: '';
  width: 38px; height: 1px;
  background: linear-gradient(to right, rgba(201,162,39,0.6), transparent);
  animation: es-hint-shift 2s ease-in-out infinite;
}
@keyframes es-hint-shift {
  0%, 100% { transform: translateX(0); opacity: .8; }
  50%      { transform: translateX(8px); opacity: .3; }
}

/* Horizontal photo card */
.es-h-photo {
  flex: 0 0 clamp(220px, 28vw, 380px);
  aspect-ratio: 3/4;
  background: #0a0604;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,162,39,0.12);
}
.es-h-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1), filter .8s ease;
  filter: brightness(.85) saturate(1.05);
}
.es-h-photo:hover img { transform: scale(1.06); filter: brightness(1) saturate(1.15); }
.es-h-photo .es-h-num {
  position: absolute;
  top: 12px; left: 14px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.4rem;
  color: rgba(201,162,39,0.9);
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
  z-index: 2;
}
.es-h-photo .es-h-cap {
  position: absolute;
  left: 14px; right: 14px; bottom: 12px;
  font-family: 'Shippori Mincho', serif;
  font-size: .78rem;
  color: rgba(255,255,255,0.85);
  letter-spacing: .08em;
  z-index: 2;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
}
.es-h-photo:hover .es-h-cap { opacity: 1; transform: none; }

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  .es-reveal, .es-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    filter: none !important;
  }
  .es-parallax { transform: none !important; }
  .es-drift { display: none; }
  .es-h-hint { display: none; }
}

/* ---------- Hero entrance + idle motion ---------- */
.es-hero-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(70%) rotate(-4deg);
  filter: blur(12px);
  will-change: transform, opacity, filter;
}
.es-hero-char.es-in {
  opacity: 1;
  transform: none;
  filter: blur(0);
  transition:
    opacity 1.2s cubic-bezier(.2,.7,.2,1),
    transform 1.4s cubic-bezier(.2,.7,.2,1),
    filter 1.2s cubic-bezier(.2,.7,.2,1);
}
.es-hero-fade {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.4s cubic-bezier(.2,.7,.2,1), transform 1.4s cubic-bezier(.2,.7,.2,1);
}
.es-hero-fade.es-in { opacity: 1; transform: none; }

/* Background slow Ken Burns drift — applied only after hero parallax is set */
.hero-main .hero-bg-image,
.hero-main .hero-video-container,
.hero-main .hero-slideshow-container {
  animation: es-kenburns 28s ease-in-out infinite alternate;
}
@keyframes es-kenburns {
  0%   { transform: scale(1.04) translate3d(0, 0, 0); }
  50%  { transform: scale(1.1) translate3d(-1.2%, -0.8%, 0); }
  100% { transform: scale(1.06) translate3d(1%, 0.6%, 0); }
}

/* When parallax is active on the same node, JS sets transform inline.
   Move the Ken Burns onto an inner pseudo-wrapper so transforms compose. */
.hero-main .hero-bg-image.es-parallax {
  animation: none;
}
.hero-main .hero-bg-image.es-parallax::after {
  content: '';
  position: absolute; inset: 0;
  background: inherit;
  background-size: cover;
  background-position: center;
  animation: es-kenburns 28s ease-in-out infinite alternate;
  pointer-events: none;
}

/* Floating scroll indicator pulse */
.hero-scroll-indicator {
  animation: es-float 3.2s ease-in-out infinite;
}
@keyframes es-float {
  0%, 100% { transform: translateY(0); opacity: .85; }
  50%      { transform: translateY(8px); opacity: 1; }
}

/* Subtle ambient orb drift behind hero */
.hero-main::before {
  content: '';
  position: absolute;
  width: 60vmin; height: 60vmin;
  left: 10%; top: 30%;
  background: radial-gradient(circle, rgba(201,162,39,0.10), transparent 70%);
  filter: blur(40px);
  animation: es-orb 14s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
}
@keyframes es-orb {
  0%   { transform: translate3d(-10%, -5%, 0) scale(1); }
  50%  { transform: translate3d(20%, 15%, 0) scale(1.2); }
  100% { transform: translate3d(-5%, 10%, 0) scale(0.95); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-main .hero-bg-image,
  .hero-main .hero-video-container,
  .hero-main .hero-slideshow-container,
  .hero-scroll-indicator,
  .hero-main::before { animation: none !important; }
  .es-hero-char, .es-hero-fade {
    opacity: 1 !important; transform: none !important; filter: none !important;
  }
}

/* Mobile — soften horizontal nudge, keep effects */
@media (max-width: 640px) {
  .es-h-photo { flex-basis: 70vw; }
  .es-drift--xl { font-size: clamp(6rem, 30vw, 14rem); }
}

/* ---------- Live page notice ---------- */
.live-notice-section { padding-bottom: 3rem; }
.live-notice {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem clamp(1.5rem, 4vw, 3rem);
  background: linear-gradient(180deg, rgba(20,12,6,0.7), rgba(10,6,3,0.7));
  border: 1px solid rgba(201,162,39,0.22);
  border-radius: 4px;
  position: relative;
}
.live-notice::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -50%);
  width: 60px; height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,162,39,0.6), transparent);
}
.live-notice-title {
  font-family: 'Shippori Mincho', 'Noto Serif JP', serif;
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  color: rgba(232, 215, 165, 0.95);
  text-align: center;
  letter-spacing: 0.08em;
  margin: 0 0 1.8rem;
  font-weight: 500;
}
.live-notice-list {
  list-style: none;
  padding: 0; margin: 0 0 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.live-notice-list li {
  position: relative;
  padding-left: 1.4rem;
  color: rgba(230, 222, 200, 0.88);
  font-size: 0.92rem;
  line-height: 1.85;
  letter-spacing: 0.04em;
  font-family: 'Shippori Mincho', 'Noto Serif JP', serif;
}
.live-notice-list li::before {
  content: '・';
  position: absolute;
  left: 0; top: 0;
  color: rgba(201,162,39,0.8);
  font-weight: 600;
}
.live-notice-foot {
  margin: 1.6rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px dashed rgba(201,162,39,0.18);
  text-align: center;
  font-family: 'Shippori Mincho', 'Noto Serif JP', serif;
  color: rgba(230, 222, 200, 0.85);
  font-size: 0.88rem;
  line-height: 2;
  letter-spacing: 0.06em;
}
@media (max-width: 640px) {
  .live-notice { padding: 1.8rem 1.2rem; }
  .live-notice-list li { font-size: 0.85rem; padding-left: 1.1rem; }
}

/* ---------- Contact booking blocks ---------- */
.contact-booking {
  margin: 0 0 3rem;
  padding: 2.2rem clamp(1.4rem, 4vw, 2.4rem);
  background: linear-gradient(180deg, rgba(20,12,6,0.55), rgba(10,6,3,0.55));
  border: 1px solid rgba(201,162,39,0.22);
  border-radius: 8px;
  position: relative;
}
.contact-booking::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -50%);
  width: 70px; height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,162,39,0.6), transparent);
}
.contact-booking-block + .contact-booking-block { margin-top: 1.6rem; }
.contact-booking-title {
  font-family: 'Shippori Mincho', 'Noto Serif JP', serif;
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  color: rgba(232, 215, 165, 0.95);
  letter-spacing: 0.06em;
  margin: 0 0 0.9rem;
  font-weight: 500;
}
.contact-booking-text {
  font-family: 'Shippori Mincho', 'Noto Serif JP', serif;
  color: rgba(230, 222, 200, 0.88);
  font-size: 0.92rem;
  line-height: 2;
  letter-spacing: 0.04em;
  margin: 0;
}
.contact-booking-divider {
  margin: 1.6rem 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,162,39,0.25), transparent);
}
@media (max-width: 640px) {
  .contact-booking { padding: 1.6rem 1.2rem; }
  .contact-booking-text { font-size: 0.86rem; }
}
