/* ===== CSS Variables ===== */
:root {
  --bg:           #ffffff;
  --bg-soft:      #fafafa;
  --bg-section:   #f5f5f3;
  --bg-dark:      #0a1a14;
  --bg-card-dark: #122010;
  --ink:          #1a1a1a;
  --ink-strong:   #0a0a0a;
  --ink-soft:     #666666;
  --ink-mute:     #999999;
  --ink-inv:      #ffffff;
  --accent:       #1a3a2a;
  --accent-deep:  #0a2818;
  --accent-warm:  #8a7a5a;
  --line:         #e5e5e3;
  --line-soft:    #f0f0ee;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-weight: 300;
}

/* ===== Hero Slideshow ===== */
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.5s ease;
}
.hero-slide.active { opacity: 1; }

/* ===== Brand Flip Animation — "ひっくり返す" ===== */
@keyframes flipReveal {
  0%   { transform: rotateX(90deg) translateY(-10px); opacity: 0; }
  55%  { transform: rotateX(-8deg) translateY(2px);   opacity: 1; }
  100% { transform: rotateX(0deg)  translateY(0);     opacity: 1; }
}
.flip-text {
  display: inline-block;
  color: var(--accent);
  animation: flipReveal 0.9s cubic-bezier(.22,.68,0,1.2) 1.3s both;
  transform-origin: center top;
}

/* ===== Hero text entrance ===== */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-label { animation: heroIn 0.9s ease 0.4s both; }
.hero-title { animation: heroIn 0.9s ease 0.65s both; }
.hero-sub   { animation: heroIn 0.9s ease 0.9s both; }
.hero-btns  { animation: heroIn 0.9s ease 1.1s both; }

/* ===== Scroll fade-up ===== */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: 0.10s; }
.delay-2 { transition-delay: 0.20s; }
.delay-3 { transition-delay: 0.30s; }
.delay-4 { transition-delay: 0.40s; }
.delay-5 { transition-delay: 0.50s; }
.delay-6 { transition-delay: 0.60s; }

/* ===== Header ===== */
#site-header {
  transition: background-color 0.35s ease, backdrop-filter 0.35s ease;
}
#site-header.scrolled {
  background-color: rgba(10, 26, 20, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ink-strong);
  color: var(--ink-inv);
  border: 1px solid var(--ink-strong);
  font-family: 'Noto Serif JP', serif;
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  min-height: 44px;
  padding: 0 2rem;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
  text-decoration: none;
}
.btn-primary:hover {
  background-color: transparent;
  color: var(--ink-strong);
  transform: translateY(-1px);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: 'Noto Serif JP', serif;
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  min-height: 44px;
  padding: 0 2rem;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
  text-decoration: none;
}
.btn-outline:hover {
  background-color: var(--ink);
  color: var(--ink-inv);
  transform: translateY(-1px);
}
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ink-inv);
  color: var(--ink-strong);
  border: 1px solid var(--ink-inv);
  font-family: 'Noto Serif JP', serif;
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  min-height: 44px;
  padding: 0 2rem;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
  text-decoration: none;
}
.btn-light:hover {
  background-color: transparent;
  color: var(--ink-inv);
  transform: translateY(-1px);
}

/* ===== Section label ===== */
.section-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  letter-spacing: 0.22em;
  color: var(--ink-mute);
  font-size: 0.78rem;
  text-transform: uppercase;
}

/* ===== Service cards ===== */
.service-card {
  background-color: var(--bg-card-dark);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.service-card img {
  transition: transform 0.5s ease;
}
.service-card:hover img {
  transform: scale(1.05);
}

/* ===== Stats ===== */
.stat-number {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  color: var(--ink-strong);
  line-height: 1;
  font-weight: 400;
}

/* ===== Reverse arrow decoration ===== */
.brand-reverse {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--accent-warm);
  font-weight: 300;
}

/* ===== Mobile menu ===== */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
#mobile-menu.open {
  max-height: 600px;
}

/* ===== Business card label: Noto Sans JP for lining numerals ===== */
.service-card .section-label {
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 300;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

/* ===== Image micro-shadow ===== */
.about-img {
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.08));
}

/* ===== Nav Dropdown ===== */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 240px;
  background-color: #ffffff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 100;
}
.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: 0.7rem 1.25rem;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--ink);
  letter-spacing: 0.04em;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
  text-decoration: none;
}
.nav-dropdown a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
  background-color: var(--bg-soft);
}

/* ===== Mobile dropdown accordion ===== */
.mobile-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-dropdown.open {
  max-height: 400px;
}
.mobile-dropdown-toggle svg {
  transition: transform 0.25s ease;
}
.dropdown-open .mobile-dropdown-toggle svg {
  transform: rotate(180deg);
}

/* ===== FAQ Accordion ===== */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-answer.open {
  max-height: 600px;
}
.faq-toggle svg {
  transition: transform 0.25s ease;
}
.faq-item.open .faq-toggle svg {
  transform: rotate(180deg);
}

/* ===== Responsive ===== */
@media (max-width: 360px) {
  .hero-title { font-size: 2rem; }
}
@media (max-width: 640px) {
  .stat-number { font-size: 2.5rem; }
}
