﻿/* =========================================================
   Interactive & Elegant Motions for Sapporo CC Silver Week LP
   ========================================================= */

/* Smooth page scrolling */
html {
  scroll-behavior: smooth;
}

/* 1. Hero Section Entrance & Ken Burns Motion */
.hero {
  overflow: hidden;
}

.hero-media img {
  transform: scale(1.02);
  animation: heroKenBurns 22s cubic-bezier(0.25, 1, 0.5, 1) infinite alternate;
  will-change: transform;
}

@keyframes heroKenBurns {
  0% {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  50% {
    transform: scale(1.07) translate3d(-0.8%, -0.5%, 0);
  }
  100% {
    transform: scale(1.04) translate3d(0.6%, 0.4%, 0);
  }
}

/* Hero elements staggered entrance */
@keyframes heroFadeUp {
  0% {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes heroFadeDown {
  0% {
    opacity: 0;
    transform: translate3d(0, -16px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes heroBadgePop {
  0% {
    opacity: 0;
    transform: scale(0.82) rotate(-4deg);
  }
  70% {
    transform: scale(1.03) rotate(0.5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.hero-kicker {
  animation: heroFadeDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero-copy h1 {
  animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.hero-subtitle {
  animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.hero-description {
  animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.52s both;
}

.hero-actions {
  animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.64s both;
}

.hero-facts {
  animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.76s both;
}

.hero-badge {
  animation: heroBadgePop 1s cubic-bezier(0.16, 1, 0.3, 1) 0.85s both;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.hero-badge:hover {
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

/* 2. Header Polish & Underline Effect */
.site-header {
  transition: background-color 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease, padding 0.35s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 6px 24px rgba(24, 36, 31, 0.08);
}

.header-nav a {
  position: relative;
  transition: color 0.25s ease;
}

.header-nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #9d292e;
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), left 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 1px;
}

.header-nav a:hover::after {
  width: 100%;
  left: 0;
}

/* 3. Prize Showcase Luxury Shimmer & Tilt */
.prize-showcase {
  background: linear-gradient(180deg, #f7f4ec 0%, #f1ede1 100%);
}

.prize-frame {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  transform-style: preserve-3d;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  perspective: 1200px;
}

/* Diagonal luxury shimmer sweep */
.prize-frame::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -120%;
  width: 70%;
  height: 200%;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.04) 30%,
    rgba(255, 255, 255, 0.38) 50%,
    rgba(255, 255, 255, 0.04) 70%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(26deg);
  pointer-events: none;
  z-index: 3;
  animation: prizeLuxuryShine 7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes prizeLuxuryShine {
  0%, 60% {
    left: -120%;
  }
  80%, 100% {
    left: 220%;
  }
}

.prize-frame:hover {
  box-shadow: 0 32px 84px rgba(24, 36, 31, 0.22);
}

.prize-chip {
  cursor: default;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.25s ease,
              border-color 0.25s ease,
              box-shadow 0.25s ease,
              color 0.25s ease;
}

.prize-chip:hover {
  transform: translateY(-4px) scale(1.06);
  background-color: #ffffff;
  border-color: #9d292e;
  box-shadow: 0 6px 16px rgba(157, 41, 46, 0.16);
  color: #9d292e;
}

.prize-call {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease,
              background-color 0.3s ease;
}

.prize-call span {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.prize-call:hover span {
  transform: translateX(5px);
}

/* 4. Course Cards Luxury Interaction */
.course-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 54px rgba(24, 36, 31, 0.14);
}

.course-photo {
  overflow: hidden;
}

.course-photo img {
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

.course-card:hover .course-photo img {
  transform: scale(1.08);
}

.course-cta span {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.course-card:hover .course-cta span {
  transform: translateX(6px);
}

/* 5. Overview Autumn Clubhouse Hover Depth */
.overview-main.overview-autumn {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.overview-main.overview-autumn:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 72px rgba(27, 38, 33, 0.18);
}

/* 6. Flow Steps Interaction */
.flow-step {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
}

.flow-step:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(24, 36, 31, 0.09);
  border-color: #9d292e;
}

.flow-step .flow-no {
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
}

.flow-step:hover .flow-no {
  transform: scale(1.15);
  color: #9d292e;
}

/* 7. Buttons Polish */
.btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.26s ease,
              background-color 0.26s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn span {
  display: inline-block;
  transition: transform 0.26s ease;
}

.btn:hover span {
  transform: translateY(2px);
}

/* 8. Floating Back to Top Button */
.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #183b30;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 24px rgba(24, 36, 31, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease;
}

.back-to-top.is-shown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #9d292e;
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 12px 30px rgba(157, 41, 46, 0.32);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
}

.back-to-top:hover svg {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .back-to-top {
    right: 20px;
    bottom: 84px; /* avoid overlapping mobile call bar */
    width: 42px;
    height: 42px;
  }
}

/* Accessibility: Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero-media img {
    animation: none !important;
  }
  .prize-frame::before {
    animation: none !important;
    display: none !important;
  }
}
