/* ===================================================
   PORT CLUB — Kyonan, Chiba
   Design: Natural & Japanese Modern (和モダン)
   =================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Zen+Old+Mincho:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --color-deep-navy: #1B2838;
  --color-ocean: #4A7C8F;
  --color-ocean-light: #6BA3B5;
  --color-sand: #C4956A;
  --color-sand-light: #D4B08C;
  --color-cream: #F7F4F0;
  --color-warm-white: #FDFCFA;
  --color-text: #2C2C2C;
  --color-text-light: #6B6B6B;
  --color-border: #E0DCD7;
  --color-moss: #7B8F6B;

  --font-sans: 'Zen Old Mincho', 'Georgia', serif;
  --font-serif: 'Zen Old Mincho', 'Georgia', serif;
  --font-display: 'EB Garamond', 'Cormorant Garamond', 'Zen Old Mincho', serif;

  --max-width: 1200px;
  --section-padding: 100px 0;
  --transition: 0.3s ease;
}

/* --- Opening Animation (hero-integrated) --- */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-deep-navy);
  z-index: 3;
  opacity: 1;
  transition: opacity 1.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.hero.is-reveal .hero__overlay {
  opacity: 0;
}

/* Per-character logo entrance — waits for .is-ready */
.hero__title-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(32px);
}
.hero.is-ready .hero__title-char {
  animation: charFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.1s + var(--i) * 0.1s);
}

@keyframes charFadeUp {
  0% {
    opacity: 0;
    transform: translateY(32px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Top page: header hidden until scroll */
.header--hidden {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.header--hidden.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-warm-white);
  line-height: 1.8;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-ocean);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-sand);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.section-title {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 0.5em;
  color: var(--color-deep-navy);
}

.section-title-en {
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-align: center;
  color: var(--color-ocean);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 2.5em;
  font-weight: 400;
}

.section-lead {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3em;
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 2;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-padding);
}

.section--cream {
  background-color: var(--color-cream);
}

.section--navy {
  background-color: var(--color-deep-navy);
  color: #fff;
}

.section--navy .section-title {
  color: #fff;
}

.section--navy .section-title-en {
  color: var(--color-sand-light);
}

.section--navy .section-lead {
  color: rgba(255,255,255,0.7);
}

/* --- Header / Navigation --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

.header--scrolled {
  background: rgba(253, 252, 250, 0.96);
  backdrop-filter: blur(10px);
}

.header::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 6' preserveAspectRatio='none'%3E%3Cpath d='M0,3 C150,6 300,0 450,3 C600,6 750,0 900,3 C1050,6 1200,0 1200,3 L1200,6 L0,6 Z' fill='%234A7C8F' opacity='0.3'/%3E%3C/svg%3E") repeat-x;
  background-size: 600px 6px;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: headerWaveScroll 8s linear infinite;
}

.header--scrolled::after {
  opacity: 1;
}

@keyframes headerWaveScroll {
  0%   { background-position-x: 0; }
  100% { background-position-x: 600px; }
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
}

.header__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.08em;
  transition: color var(--transition);
}

.header--scrolled .header__logo {
  color: var(--color-deep-navy);
}

.header__logo span {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  font-weight: 300;
  opacity: 0.7;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.06em;
  transition: color var(--transition);
  position: relative;
}

.header--scrolled .nav__link {
  color: var(--color-text);
}

.nav__link:hover {
  color: var(--color-sand);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-sand);
  transition: width var(--transition);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__lang {
  font-size: 0.75rem;
  padding: 4px 12px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  color: rgba(255,255,255,0.85);
  transition: all var(--transition);
}

.header--scrolled .nav__lang {
  border-color: var(--color-border);
  color: var(--color-text);
}

.nav__lang:hover {
  background: var(--color-sand);
  border-color: var(--color-sand);
  color: #fff;
}

/* Mobile menu */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: all var(--transition);
}

.header--scrolled .nav__toggle span {
  background: var(--color-deep-navy);
}

/* --- Hero --- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--color-deep-navy);
  z-index: 0;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(27, 40, 56, 0.1);
  z-index: 1;
}

/* Hero video background */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Animated wave effect */
.hero__wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  z-index: 1;
}

.hero__wave svg {
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero__content {
  position: relative;
  z-index: 4;
  max-width: 800px;
  padding: 0 24px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35), 0 1px 3px rgba(0,0,0,0.2);
}

.hero__subtitle {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  margin-bottom: 24px;
  opacity: 0.8;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  line-height: 1.1;
}

.hero__tagline {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  opacity: 0.85;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero__cta {
  display: inline-block;
  padding: 14px 40px;
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  transition: all var(--transition);
}

.hero__cta:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
  color: #fff;
}

/* --- Concept Section --- */
.concept {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.concept__image {
  aspect-ratio: 4/3;
  background: var(--color-cream);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.concept__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Concept image slider */
.concept-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.concept-slider__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.concept-slider__img.is-active {
  opacity: 1;
}

.concept__text h2 {
  font-size: 1.6rem;
  margin-bottom: 1em;
  color: var(--color-deep-navy);
}

.concept__text p {
  color: var(--color-text-light);
  font-size: 0.92rem;
  line-height: 2.2;
  margin-bottom: 1.2em;
}

/* Concept reversed layout (image right, text left) */
.concept--reverse {
  direction: rtl;
}
.concept--reverse > * {
  direction: ltr;
}
.concept--reverse .concept__text {
  text-align: left;
}

/* --- Facilities --- */
.facilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.facility-card {
  text-align: center;
  padding: 40px 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
  transition: transform var(--transition), box-shadow var(--transition);
}

.facility-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.facility-card__image {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 20px;
}

.facility-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.facility-card:hover .facility-card__image img {
  transform: scale(1.05);
}

.facility-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  background: var(--color-cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.facility-card__title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin-bottom: 0.8em;
  color: var(--color-deep-navy);
}

.facility-card__text {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.9;
}

/* --- Activity Section --- */
.activity-highlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.activity-highlight__image {
  aspect-ratio: 16/10;
  background: var(--color-cream);
  border-radius: 16px;
  overflow: hidden;
  position: sticky;
  top: 100px;
}

.activity-highlight__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-highlight__content h3 {
  font-size: 1.4rem;
  color: var(--color-deep-navy);
  margin-bottom: 0.8em;
}

.activity-highlight__content p {
  font-size: 0.92rem;
  color: var(--color-text-light);
  line-height: 2;
  margin-bottom: 1.5em;
}

/* Schedule & Details */
.detail-block {
  background: var(--color-cream);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 20px;
}

.detail-block__title {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-ocean);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.detail-block__list {
  list-style: none;
}

.detail-block__list li {
  font-size: 0.9rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.detail-block__list li:last-child {
  border-bottom: none;
}

.detail-block__list li span {
  color: var(--color-text-light);
  font-size: 0.85rem;
}

.detail-block p {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

/* CTA button */
.btn-primary {
  display: inline-block;
  padding: 16px 48px;
  background: var(--color-ocean);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.btn-primary:hover {
  background: var(--color-deep-navy);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(27, 40, 56, 0.3);
}

.btn-outline {
  display: inline-block;
  padding: 14px 40px;
  border: 1px solid var(--color-ocean);
  color: var(--color-ocean);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  border-radius: 24px;
  transition: all var(--transition);
}

.btn-outline:hover {
  background: var(--color-ocean);
  color: #fff;
}

/* --- Gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.gallery-grid__item {
  aspect-ratio: 1;
  background: var(--color-cream);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: opacity var(--transition);
}

.gallery-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-grid__item:hover img {
  transform: scale(1.05);
}

.gallery-grid__item:hover {
  opacity: 0.92;
}

.gallery-grid__item:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
}

/* --- FAQ --- */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item__question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 24px 40px 24px 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  position: relative;
  line-height: 1.6;
}

.faq-item__question::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--color-ocean);
  transition: transform var(--transition);
}

.faq-item.is-open .faq-item__question::after {
  content: '−';
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.is-open .faq-item__answer {
  max-height: 300px;
  padding-bottom: 24px;
}

.faq-item__answer p {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.9;
}

/* --- Access --- */
.access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.access-info h3 {
  font-size: 1.1rem;
  color: var(--color-deep-navy);
  margin-bottom: 1em;
  margin-top: 2em;
}

.access-info h3:first-child {
  margin-top: 0;
}

.access-info p {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 2;
}

.access-info address {
  font-style: normal;
  font-size: 0.92rem;
  line-height: 2;
}

.access-map {
  aspect-ratio: 1;
  background: var(--color-cream);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 0.85rem;
  position: sticky;
  top: 100px;
  overflow: hidden;
}

.access-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 16px;
}

/* --- Contact Form --- */
.contact-form {
  max-width: 640px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-text);
}

.form-group label .required {
  color: var(--color-sand);
  font-size: 0.75rem;
  margin-left: 4px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-text);
  background: #fff;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-ocean);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* --- Group Facilities --- */
.group-card {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 32px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
  transition: transform var(--transition);
}

.group-card:hover {
  transform: translateY(-2px);
}

.group-card__image {
  width: 200px;
  flex-shrink: 0;
  aspect-ratio: 4/3;
  background: var(--color-cream);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.group-card__text h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5em;
  color: var(--color-deep-navy);
}

.group-card__text p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

/* --- Footer --- */
.footer {
  background: var(--color-deep-navy);
  color: rgba(255,255,255,0.6);
  padding: 60px 0 32px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer__brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #fff;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer__brand span {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  opacity: 0.6;
  margin-top: 4px;
}

.footer__desc {
  font-size: 0.8rem;
  line-height: 1.9;
}

.footer__heading {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
}

.footer__links {
  list-style: none;
}

.footer__links li {
  margin-bottom: 10px;
}

.footer__links a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--color-sand-light);
}

.footer__sns {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.footer__sns a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  transition: all var(--transition);
}

.footer__sns a:hover {
  background: var(--color-sand);
  border-color: var(--color-sand);
  color: #fff;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.mt-60 { margin-top: 60px; }
.mb-20 { margin-bottom: 20px; }

/* ===================================================
   ANIMATIONS & PLAYFUL EFFECTS
   =================================================== */

/* --- Scroll-triggered animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slide from left */
.slide-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.slide-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide from right */
.slide-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.slide-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale up */
.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.scale-in.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children animation */
.stagger-children.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.stagger-children > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.stagger-children > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.15s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.25s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.35s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.45s; }

/* --- Hero text entrance (opening sequence) --- */
/* Title: handled by per-character .hero__title-char animations (0.4s + i*0.1s) */
/* Chars finish at ~0.4 + 7*0.1 + 0.6 = 1.7s */
/* Overlay fades at ~2.6s via JS (symbolic pause after logo) */
/* Other text appears after video is revealed (~3.8s+) */

.hero__content .hero__subtitle {
  opacity: 0;
  transform: translateY(20px);
}
.hero.is-ready .hero__content .hero__subtitle {
  animation: heroFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 3.5s forwards;
}

.hero__content .hero__tagline {
  opacity: 0;
  transform: translateY(20px);
}
.hero.is-ready .hero__content .hero__tagline {
  animation: heroFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 3.8s forwards;
}

.hero__content .hero__cta {
  opacity: 0;
  transform: translateY(20px);
}
.hero.is-ready .hero__content .hero__cta {
  animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 4.1s forwards;
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Animated hero wave --- */
.hero__wave svg path:first-child {
  animation: heroWave1 4s ease-in-out infinite alternate;
  transform-origin: center bottom;
}

.hero__wave svg path:last-child {
  animation: heroWave2 5s ease-in-out infinite alternate;
  transform-origin: center bottom;
}

@keyframes heroWave1 {
  0%   { d: path("M0,64 C400,100 800,20 1200,64 C1600,108 2000,20 2400,64 L2400,120 L0,120 Z"); opacity: 0.5; }
  100% { d: path("M0,72 C400,30 800,90 1200,50 C1600,20 2000,80 2400,56 L2400,120 L0,120 Z"); opacity: 0.6; }
}

@keyframes heroWave2 {
  0%   { d: path("M0,80 C400,110 800,40 1200,80 C1600,120 2000,40 2400,80 L2400,120 L0,120 Z"); }
  100% { d: path("M0,88 C400,50 800,100 1200,70 C1600,40 2000,90 2400,72 L2400,120 L0,120 Z"); }
}

/* --- Section wave dividers --- */
.wave-divider {
  position: relative;
  height: 80px;
  overflow: hidden;
  margin-top: -1px;
}

.wave-divider svg {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100%;
}

.wave-divider svg path {
  animation: waveDividerMorph 6s ease-in-out infinite alternate;
}

.wave-divider--cream svg path { fill: var(--color-cream); }
.wave-divider--white svg path { fill: var(--color-warm-white); }
.wave-divider--navy svg path { fill: var(--color-deep-navy); }

@keyframes waveDividerMorph {
  0%   { d: path("M0,40 C300,80 600,0 900,40 C1200,80 1500,0 1800,40 C2100,80 2400,20 2400,40 L2400,80 L0,80 Z"); }
  100% { d: path("M0,50 C300,10 600,70 900,30 C1200,0 1500,60 1800,30 C2100,10 2400,50 2400,35 L2400,80 L0,80 Z"); }
}

/* --- Parallax image wrapper --- */
.parallax-wrap {
  overflow: hidden;
  border-radius: 16px;
}

.parallax-wrap img {
  transition: transform 0.1s linear;
  will-change: transform;
  transform: scale(1.15);
}

/* --- Magnetic hover on buttons --- */
.btn-primary,
.btn-outline,
.hero__cta {
  position: relative;
  overflow: hidden;
}

.btn-primary::before,
.hero__cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before,
.hero__cta:hover::before {
  width: 300px;
  height: 300px;
}

/* --- Floating decorative elements --- */
.float-element {
  position: absolute;
  pointer-events: none;
  opacity: 0.08;
  animation: float 6s ease-in-out infinite;
}

.float-element:nth-child(2) { animation-delay: -2s; animation-duration: 8s; }
.float-element:nth-child(3) { animation-delay: -4s; animation-duration: 7s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-20px) rotate(5deg); }
}

/* --- Section title animation --- */
.section-title {
  position: relative;
}

.section-title-en {
  position: relative;
}

.section-title-en::before,
.section-title-en::after {
  content: '~';
  display: inline-block;
  margin: 0 12px;
  opacity: 0.4;
  font-weight: 300;
}

/* --- Animated underline for nav --- */
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 1.5px;
  background: var(--color-sand);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1), left 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav__link:hover::after {
  width: 100%;
  left: 0;
}

/* --- Card tilt/depth on hover --- */
.facility-card {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}

.facility-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

/* --- Smooth image reveal on scroll --- */
.reveal-image {
  position: relative;
  overflow: hidden;
}

.reveal-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-cream);
  transform-origin: right;
  transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
}

.reveal-image.is-visible::after {
  transform: scaleX(0);
}

/* --- Header logo animation --- */
.header__logo {
  transition: color var(--transition), transform 0.3s ease;
}

.header__logo:hover {
  transform: scale(1.03);
}

/* --- Smooth page-hero parallax --- */
.page-hero__bg img {
  transition: transform 0.1s linear;
  will-change: transform;
}

/* --- Animated gradient for hero overlay --- */
.hero__bg::after {
  background:
    linear-gradient(180deg, rgba(27, 40, 56, 0.2) 0%, rgba(27, 40, 56, 0.5) 100%),
    radial-gradient(ellipse at 30% 70%, rgba(196, 149, 106, 0.1) 0%, transparent 60%);
  animation: gradientShift 10s ease-in-out infinite alternate;
}

@keyframes gradientShift {
  0%   { opacity: 0.9; }
  100% { opacity: 1; }
}

/* --- Detail block hover --- */
.detail-block {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-block:hover {
  transform: translateX(4px);
  box-shadow: -4px 0 0 var(--color-ocean);
}

/* --- FAQ smooth open --- */
.faq-item__answer {
  transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1), padding 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Footer wave top --- */
.footer {
  position: relative;
}

.footer__wave {
  position: absolute;
  top: -60px;
  left: 0;
  width: 100%;
  height: 60px;
  overflow: hidden;
}

.footer__wave svg {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100%;
}

.footer__wave svg path {
  animation: footerWaveMorph 7s ease-in-out infinite alternate;
}

@keyframes footerWaveMorph {
  0%   { d: path("M0,20 C400,50 800,0 1200,30 C1600,60 2000,10 2400,30 L2400,60 L0,60 Z"); }
  100% { d: path("M0,30 C400,5 800,45 1200,15 C1600,0 2000,40 2400,20 L2400,60 L0,60 Z"); }
}

/* --- Scroll progress bar --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-ocean), var(--color-sand));
  z-index: 1001;
  transform-origin: left;
  transform: scaleX(0);
  transition: none;
}

/* --- Responsive --- */
@media (max-width: 968px) {
  .nav {
    display: none;
  }

  /* When menu is open, expand header to full screen and remove backdrop-filter
     (backdrop-filter / transform create a containing block that traps position:fixed children) */
  .header.menu-open {
    height: 100vh;
    height: 100dvh;
    background: rgba(27, 40, 56, 0.97) !important;
    backdrop-filter: none !important;
  }
  .header.menu-open::after {
    display: none;
  }

  .nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: transparent;
    justify-content: center;
    align-items: center;
    gap: 28px;
    z-index: 1;
    animation: navFadeIn 0.3s ease;
  }

  @keyframes navFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .nav.is-open .nav__link {
    color: #fff;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
  }

  .nav.is-open .nav__link::after {
    display: none;
  }

  .nav.is-open .nav__lang {
    color: #fff;
    border-color: rgba(255,255,255,0.5);
    margin-top: 8px;
  }

  .nav__toggle {
    display: block;
    z-index: 2;
    position: relative;
  }

  /* Hamburger → X animation */
  .nav__toggle.is-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav__toggle.is-active span:nth-child(2) {
    opacity: 0;
  }
  .nav__toggle.is-active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  .nav__toggle.is-active span {
    background: #fff !important;
  }

  .concept,
  .activity-highlight,
  .access-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Reverse layout resets to normal stacking on mobile */
  .concept--reverse {
    direction: ltr;
  }
  .concept--reverse > * {
    direction: ltr;
  }

  /* Concept 2 spacing on mobile */
  .concept + .concept {
    margin-top: 56px !important;
  }

  .activity-highlight__image,
  .access-map {
    position: static;
  }

  .facilities-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid__item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 16/9;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .group-card {
    flex-direction: column;
  }

  .group-card__image {
    width: 100%;
  }

  :root {
    --section-padding: 64px 0;
  }

  .hero__title {
    font-size: clamp(2.2rem, 8vw, 3.5rem);
    letter-spacing: 0.04em;
  }

  .hero__tagline {
    font-size: 0.88rem;
    letter-spacing: 0.06em;
  }

  .hero__subtitle {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
  }

  .hero__cta {
    padding: 12px 32px;
    font-size: 0.8rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .concept__text h2 {
    font-size: 1.3rem;
  }

  .concept__text p {
    font-size: 0.85rem;
    line-height: 2;
  }

  .page-hero {
    padding: 120px 0 60px;
  }

  .page-hero--with-bg {
    padding: 140px 0 70px;
  }

  .page-hero h1 {
    font-size: 2rem;
  }
}

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }

  .detail-block {
    padding: 20px;
  }

  .access-grid {
    gap: 24px;
  }

  .hero__title {
    font-size: clamp(1.8rem, 10vw, 2.8rem);
    letter-spacing: 0.02em;
  }

  .hero__content {
    padding: 0 16px;
  }

  .concept__image {
    aspect-ratio: 16/10;
  }

  .section-lead {
    font-size: 0.82rem;
    line-height: 1.9;
  }

  .page-hero {
    padding: 100px 0 48px;
  }

  .page-hero--with-bg {
    padding: 120px 0 56px;
  }

  .page-hero h1 {
    font-size: 1.6rem;
  }
}

/* --- Cancel Policy table --- */
.cancel-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 0.85rem;
}

.cancel-table th,
.cancel-table td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.cancel-table th {
  font-weight: 500;
  color: var(--color-text);
  background: rgba(0,0,0,0.02);
}

.cancel-table td {
  color: var(--color-text-light);
}

/* --- Decorative Elements --- */
.divider {
  width: 40px;
  height: 1px;
  background: var(--color-sand);
  margin: 0 auto;
}

.divider--left {
  margin: 0;
}

/* Page hero (sub pages) */
.page-hero {
  padding: 160px 0 80px;
  background: var(--color-deep-navy);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero--with-bg {
  padding: 180px 0 100px;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(27, 40, 56, 0.6);
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.page-hero p {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  opacity: 0.6;
}

/* Notice/Alert box */
.notice {
  padding: 20px 24px;
  background: rgba(196, 149, 106, 0.08);
  border-left: 3px solid var(--color-sand);
  border-radius: 0 12px 12px 0;
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.8;
  margin-top: 16px;
}

.notice strong {
  color: var(--color-text);
}

/* ====== Infinite Carousel ====== */
.carousel-wrapper {
  overflow: hidden;
  width: 100%;
  position: relative;
  padding: 10px 0;
}

.carousel-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: carouselScroll 40s linear infinite;
}

.carousel-track:hover {
  animation-play-state: paused;
}

.carousel-card {
  flex-shrink: 0;
  width: 280px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.carousel-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.carousel-card__image {
  width: 100%;
  height: 160px;
  overflow: hidden;
  position: relative;
}

.carousel-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.carousel-card:hover .carousel-card__image img {
  transform: scale(1.08);
}

.carousel-card__body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

.carousel-card__label {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-deep-navy);
  line-height: 1.4;
}

.carousel-card__desc {
  font-size: 0.8rem;
  color: var(--color-text-light);
  line-height: 1.8;
  flex-grow: 1;
}

.carousel-card__link {
  font-size: 0.78rem;
  color: var(--color-ocean);
  letter-spacing: 0.05em;
  font-weight: 500;
}

@keyframes carouselScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
  .carousel-card {
    width: 240px;
  }
  .carousel-card__image {
    height: 130px;
  }
  .carousel-card__body {
    padding: 16px 18px 20px;
  }
  .carousel-track {
    gap: 14px;
  }
}

/* ====== Floating Reservation Button ====== */
.floating-cta {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.floating-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.floating-cta a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--color-deep-navy);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  border-radius: 40px;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(27, 40, 56, 0.3);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.floating-cta a:hover {
  background: var(--color-ocean);
  box-shadow: 0 6px 30px rgba(74, 124, 143, 0.4);
  transform: translateY(-2px);
}
.floating-cta svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .floating-cta {
    bottom: 16px;
    right: 16px;
    left: 16px;
  }
  .floating-cta a {
    justify-content: center;
    width: 100%;
    padding: 14px 20px;
  }
}
