/* =========================================================
   Brook Panel Path — Shared Stylesheet
   静水の小径 — quiet water, wooden panels, winding paths
   ========================================================= */

html {
  scroll-behavior: smooth;
}

body {
  background-color: #F7F3EA;
  color: #2B2B26;
  font-family: 'Zen Old Mincho', serif;
  overflow-x: hidden;
}

::selection {
  background: #8AA6A0;
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #F1ECE0; }
::-webkit-scrollbar-thumb { background: #9AA98C; border-radius: 10px; }

/* =========================================================
   Typography helpers
   ========================================================= */
.font-display { font-family: 'Fraunces', serif; }
.font-jpheading { font-family: 'Shippori Mincho B1', serif; }
.font-jpbody { font-family: 'Zen Old Mincho', serif; }
.font-ui { font-family: 'Zen Kaku Gothic New', sans-serif; }

.tracking-jp { letter-spacing: 0.18em; }

/* =========================================================
   Navigation
   ========================================================= */
#site-nav {
  transition: background-color .5s ease, box-shadow .5s ease, padding .4s ease, backdrop-filter .5s ease;
  background: transparent;
}
#site-nav.nav-scrolled {
  background: rgba(247, 243, 234, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 8px 30px -12px rgba(43,43,38,0.18);
}
#site-nav .nav-link {
  position: relative;
  padding-bottom: 4px;
}
#site-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0%;
  height: 1px;
  background: currentColor;
  transition: width .35s ease;
}
#site-nav .nav-link:hover::after,
#site-nav .nav-link.active::after {
  width: 100%;
}
#site-nav .nav-link.active {
  opacity: 1;
  font-weight: 600;
}

.nav-light .nav-ink { color: #F7F3EA; }
.nav-dark .nav-ink { color: #2B2B26; }

/* mobile menu */
#mobile-menu {
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
#mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: currentColor;
  margin: 5px 0;
  transition: transform .35s ease, opacity .35s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =========================================================
   Buttons
   ========================================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 2.1rem;
  background: linear-gradient(120deg, #5B8AA6, #6E8F6B);
  color: #fdfbf6;
  border-radius: 999px;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: .85rem;
  letter-spacing: .12em;
  box-shadow: 0 12px 28px -12px rgba(91,138,166,0.55);
  transition: transform .45s cubic-bezier(.22,1,.36,1), box-shadow .45s ease, filter .45s ease;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px -12px rgba(91,138,166,0.65);
  filter: brightness(1.05);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 2.05rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: .85rem;
  letter-spacing: .12em;
  transition: background .4s ease, color .4s ease, transform .45s cubic-bezier(.22,1,.36,1);
  backdrop-filter: blur(6px);
}
.btn-outline:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.16);
}

.btn-arrow { transition: transform .4s cubic-bezier(.22,1,.36,1); }
.btn-primary:hover .btn-arrow,
.btn-outline:hover .btn-arrow { transform: translateX(5px); }

/* =========================================================
   Glass panels
   ========================================================= */
.glass-panel {
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 20px 60px -25px rgba(43,43,38,0.35);
}

.glass-dark {
  background: rgba(20, 26, 22, 0.35);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.18);
}

/* =========================================================
   Reveal on scroll
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity 1.1s cubic-bezier(.22,1,.36,1), transform 1.1s cubic-bezier(.22,1,.36,1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .12s; }
.reveal-delay-2 { transition-delay: .24s; }
.reveal-delay-3 { transition-delay: .36s; }
.reveal-delay-4 { transition-delay: .48s; }

/* =========================================================
   Image treatments — water shimmer / reveal
   ========================================================= */
.img-frame {
  position: relative;
  overflow: hidden;
}
.img-frame img {
  transition: transform 1.4s cubic-bezier(.22,1,.36,1), filter 1s ease;
}
.img-frame:hover img {
  transform: scale(1.07);
}
.img-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.35) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 1.1s ease;
  pointer-events: none;
}
.img-frame:hover::after {
  transform: translateX(120%);
}

/* =========================================================
   Floating leaves + drifting mist
   ========================================================= */
.leaves-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
}
.leaf {
  position: absolute;
  top: -8%;
  opacity: .75;
  animation-name: leafFall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}
.leaf svg { display: block; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15)); }

@keyframes leafFall {
  0%   { transform: translate(0, -10vh) rotate(0deg); opacity: 0; }
  8%   { opacity: .8; }
  50%  { transform: translate(4vw, 55vh) rotate(180deg); }
  92%  { opacity: .7; }
  100% { transform: translate(-3vw, 115vh) rotate(360deg); opacity: 0; }
}

.mist-layer {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  z-index: 4;
  background:
    radial-gradient(ellipse 60% 40% at 20% 30%, rgba(255,255,255,0.35), transparent 60%),
    radial-gradient(ellipse 50% 35% at 80% 60%, rgba(255,255,255,0.28), transparent 65%),
    radial-gradient(ellipse 40% 30% at 50% 85%, rgba(255,255,255,0.22), transparent 60%);
  animation: mistDrift 26s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}
@keyframes mistDrift {
  0%   { transform: translate(-2%, 0) scale(1); opacity: .85; }
  50%  { transform: translate(2%, -1.5%) scale(1.06); opacity: 1; }
  100% { transform: translate(-1%, 1.5%) scale(1.02); opacity: .9; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero-gradient {
  background: linear-gradient(180deg, rgba(20,24,18,0.15) 0%, rgba(20,24,18,0.15) 40%, rgba(18,22,16,0.68) 100%);
}

.ripple-line {
  stroke-dasharray: 6 10;
  animation: rippleDash 6s linear infinite;
}
@keyframes rippleDash {
  to { stroke-dashoffset: -160; }
}

/* =========================================================
   Cards
   ========================================================= */
.dest-card {
  transition: transform .55s cubic-bezier(.22,1,.36,1), box-shadow .55s ease;
}
.dest-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -25px rgba(43,43,38,0.4);
}

.line-fade {
  background: linear-gradient(90deg, transparent, rgba(43,43,38,0.25), transparent);
  height: 1px;
}

/* =========================================================
   Accordion (FAQ)
   ========================================================= */
.accordion-item .accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .55s cubic-bezier(.22,1,.36,1), opacity .4s ease;
  opacity: 0;
}
.accordion-item.open .accordion-panel {
  opacity: 1;
}
.accordion-item .accordion-icon {
  transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.accordion-item.open .accordion-icon {
  transform: rotate(135deg);
}

/* =========================================================
   Masonry gallery
   ========================================================= */
.masonry {
  column-gap: 1.1rem;
  column-count: 1;
}
@media (min-width: 640px) { .masonry { column-count: 2; } }
@media (min-width: 1024px) { .masonry { column-count: 3; } }
.masonry .masonry-item {
  break-inside: avoid;
  margin-bottom: 1.1rem;
  cursor: zoom-in;
}

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 17, 13, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}
#lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
#lightbox img {
  max-width: 88vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 40px 90px -20px rgba(0,0,0,0.6);
  transform: scale(.96);
  transition: transform .4s ease;
}
#lightbox.open img { transform: scale(1); }

/* =========================================================
   Toast (non-blocking popup, replaces alert)
   ========================================================= */
#toast-stack {
  position: fixed;
  top: 1.4rem;
  right: 1.4rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  max-width: 90vw;
}
.toast {
  min-width: 260px;
  max-width: 340px;
  background: rgba(43,53,42,0.94);
  color: #F7F3EA;
  border-left: 3px solid #8FB08A;
  padding: .9rem 1.2rem;
  border-radius: 6px;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: .84rem;
  line-height: 1.5;
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.5);
  transform: translateX(120%);
  opacity: 0;
  transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .5s ease;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.toast-error { border-left-color: #C98E6B; }

/* =========================================================
   Misc
   ========================================================= */
.bg-noise {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

.divider-wave {
  display: block;
  width: 100%;
  height: auto;
}

.section-label {
  letter-spacing: .35em;
  font-size: .72rem;
  font-family: 'Zen Kaku Gothic New', sans-serif;
}

input:focus, textarea:focus, select:focus { outline: none; }

.form-input {
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(43,43,38,0.18);
  transition: border-color .3s ease, background .3s ease;
}
.form-input:focus {
  border-color: #5B8AA6;
  background: rgba(255,255,255,0.85);
}

/* skeleton lazy fade */
img[loading="lazy"] {
  animation: imgFadeIn .8s ease;
}
@keyframes imgFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
