/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: 80px; }
body {
  font-family: 'Noto Sans JP', 'Outfit', sans-serif;
  color: #1a1a1a;
  background: #f5f5f0;
  overflow-x: hidden;
  line-height: 1.8;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== Colors ===== */
:root {
  --blue: #0068B7;
  --blue-dark: #004A8F;
  --blue-light: #C8DFF0;
  --yellow: #F5D623;
  --white: #ffffff;
  --off-white: #f5f5f0;
  --gray: #717171;
  --text: #1a1a1a;
}

/* ===== Inner Wrapper ===== */
.inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.inner.header {
  max-width: 1400px;
}

/* ===== Header ===== */
header {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000;
  padding: 30px 50px;
}

/* Menu Trigger - Text only */
.menu-trigger {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  padding: 0;
  transition: color 0.4s;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5), 0 0 20px rgba(0,0,0,0.15);
}
.menu-trigger:hover { opacity: 0.7; }
header.scrolled .menu-trigger {
  color: #1a1a1a;
  text-shadow: none;
}

/* Fullscreen Nav Overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a1628;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 10vw;
  clip-path: circle(0% at calc(100% - 75px) 42px);
  pointer-events: none;
  transition: clip-path 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}
.nav-overlay.active {
  clip-path: circle(150% at calc(100% - 75px) 42px);
  pointer-events: all;
}
.nav-overlay-close {
  position: absolute;
  top: 28px;
  right: 50px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: color 0.3s;
  padding: 0;
}
.nav-overlay-close:hover { color: #fff; }
.nav-overlay-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nav-overlay-links a {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: #fff;
  padding: 18px 0;
  display: inline-block;
  position: relative;
  opacity: 0;
  transform: translateX(-60px);
  transition: color 0.3s;
}
.nav-overlay-links a::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 14px;
  width: 0;
  height: 2px;
  background: var(--blue);
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.nav-overlay-links a:hover::before { width: 100%; }
.nav-overlay-links a:hover { color: var(--blue); }
.nav-overlay.active .nav-overlay-links a {
  opacity: 1;
  transform: translateX(0);
}
.nav-overlay.active .nav-overlay-links a:nth-child(1) { transition: opacity 0.6s ease 0.3s, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s, color 0.3s; }
.nav-overlay.active .nav-overlay-links a:nth-child(2) { transition: opacity 0.6s ease 0.38s, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.38s, color 0.3s; }
.nav-overlay.active .nav-overlay-links a:nth-child(3) { transition: opacity 0.6s ease 0.46s, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.46s, color 0.3s; }
.nav-overlay.active .nav-overlay-links a:nth-child(4) { transition: opacity 0.6s ease 0.54s, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.54s, color 0.3s; }
.nav-overlay.active .nav-overlay-links a:nth-child(5) { transition: opacity 0.6s ease 0.62s, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.62s, color 0.3s; }
.nav-overlay-sub {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  gap: 40px;
  opacity: 0;
}
.nav-overlay.active .nav-overlay-sub {
  opacity: 1;
  transition: opacity 0.6s ease 0.7s;
}
.nav-overlay-sub a {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  transition: color 0.3s;
}
.nav-overlay-sub a:hover { color: #fff; }

/* ===== Section Common ===== */
.section {
  padding: 120px 40px;
  position: relative;
}
.section > .inner {
  width: 100%;
}
.section-num {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  color: var(--gray);
  letter-spacing: 0.1em;
}
.section-title-en {
  font-family: 'Outfit', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--blue);
  margin: 4px 0;
  letter-spacing: 0.03em;
}
.section-title-ja {
  font-size: 2.8rem;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.03em;
}
.section-header {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 60px;
}
.section-line {
  width: 80px;
  height: 3px;
  background: var(--blue-light);
}

/* ===== Scroll Animation Classes ===== */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1), transform 1s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}
.reveal.from-left {
  transform: translateX(-80px);
}
.reveal.from-right {
  transform: translateX(80px);
}
.reveal.from-scale {
  transform: scale(0.92);
}
.reveal.visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Stagger children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.12s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.24s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.36s; }
.stagger-children .reveal:nth-child(5) { transition-delay: 0.48s; }

/* Section header reveal */
.section-header .section-line {
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.section-header.visible .section-line {
  transform: scaleX(1);
}
.section-header .section-num,
.section-header .section-title-en,
.section-header .section-title-ja {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.section-header.visible .section-num { opacity: 1; transform: none; transition-delay: 0.2s; }
.section-header.visible .section-title-en { opacity: 1; transform: none; transition-delay: 0.35s; }
.section-header.visible .section-title-ja { opacity: 1; transform: none; transition-delay: 0.5s; }

/* Legacy fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Common Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Page Hero (Shared Base) ===== */
.page-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  padding: 80px 40px;
  background: linear-gradient(135deg, #0a1628 0%, #0d2847 100%);
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(0,104,183,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(245,214,35,0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* Hero content — supports both BEM (__) and hyphen (-) variants */
.page-hero__content,
.page-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 40px;
  animation: fadeInUp 1s ease-out;
}
.page-hero__title,
.page-hero-title-en {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  margin: 0 0 12px;
}
/* Safety: override any section-title color inside hero */
.page-hero .section-title-en,
.page-hero .section-title-ja {
  color: #fff;
}

.page-hero__subtitle,
.page-hero-title-ja,
.page-hero p {
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.05em;
  margin: 0;
}

/* Page Hero — Responsive */
@media (max-width: 768px) {
  .page-hero {
    min-height: 35vh;
    padding: 60px 20px;
  }
  .page-hero__title,
  .page-hero-title-en {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }
}
@media (max-width: 480px) {
  .page-hero {
    min-height: 30vh;
    padding: 50px 16px;
  }
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}
.breadcrumb__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 40px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  font-size: 0.8rem;
}
.breadcrumb__link {
  color: var(--blue);
  transition: opacity 0.2s;
}
.breadcrumb__link:hover {
  opacity: 0.7;
}
.breadcrumb__sep {
  margin: 0 8px;
  color: var(--gray);
  font-size: 0.75rem;
}
.breadcrumb__current {
  color: #666;
}
@media (max-width: 768px) {
  .breadcrumb__inner { padding: 10px 20px; font-size: 0.75rem; }
}

/* ===== Footer ===== */
footer {
  background: var(--blue);
  color: #fff;
  padding: 70px 40px 40px;
  position: relative;
}
footer .inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-brand {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}
.footer-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}
.footer-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
}
.footer-info-row .material-icons {
  font-size: 1.1rem;
  opacity: 0.7;
}
.footer-info-row a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-links {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.2);
  margin-bottom: 40px;
}
.footer-links a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.8);
  transition: color 0.3s;
}
.footer-links a:hover { color: #fff; }
.footer-copy {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
}
.footer-top-btn {
  position: absolute;
  right: 40px;
  bottom: 40px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.footer-top-btn:hover { background: rgba(255,255,255,0.25); }
.footer-top-btn .material-icons { color: #fff; font-size: 1.4rem; }

/* ===== Floating CTA ===== */
.floating-cta {
  position: fixed;
  bottom: 35px;
  right: 35px;
  background: var(--blue);
  color: #fff;
  padding: 15px 32px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 10px 35px rgba(0,104,183,0.35);
  z-index: 999;
  transition: transform 0.3s, box-shadow 0.3s, opacity 0.4s;
  cursor: pointer;
  border: none;
  opacity: 0;
  pointer-events: none;
}
.floating-cta.show {
  opacity: 1;
  pointer-events: auto;
}
.floating-cta:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 45px rgba(0,104,183,0.45);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  header { padding: 14px 20px; }
  nav a:not(.nav-btn) { display: none; }
  .section { padding: 60px 20px; }
  .youtube-section { padding: 60px 20px; }
  .section-header { margin-bottom: 40px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero { height: 100svh; }
  .hero-bg { background-size: cover; background-position: center center; }
  .hero-content { padding: 80px 20px 0; }
  .hero-vertical-text { font-size: 1.6rem; }
  .hero-scroll { bottom: 20px; }
  .about .inner { flex-direction: column; gap: 24px; }
  .about-left { flex: auto; }
  .about-vertical { display: none; }
  .about-text { font-size: 1rem; margin-bottom: 24px; line-height: 1.9; }
  .service .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .service-cards { grid-template-columns: 1fr; }
  .flow .inner { padding-left: 0; padding-right: 0; }
  .flow-vertical-text { display: none; }
  .flow-steps { margin-left: 0; gap: 50px; margin-right: 0; }
  .flow-step { gap: 16px; }
  .flow-step::before { left: 25px; top: 58px; width: 40px; height: 50px; border-radius: 0 0 0 40px; }
  .flow-step-icon { width: 50px; height: 50px; }
  .flow-step-icon .material-icons { font-size: 24px; }
  .company-greeting { flex-direction: column; align-items: center; text-align: center; }
  .company-photo img { width: 180px; height: 230px; }
  .company-info-bar { grid-template-columns: 1fr; }
  .company-info-item { border-right: none; border-bottom: 1px solid rgba(0,104,183,0.08); }
  .company-info-item:last-child { border-bottom: none; }
  .access { padding: 60px 20px; }
  .access-inner { grid-template-columns: 1fr; gap: 30px; }
  .access-map { aspect-ratio: 16 / 9; }
  footer { padding: 50px 20px 30px; }
  .footer-links { gap: 20px; }
  .footer-copy { flex-basis: 100%; }
  .floating-cta { font-size: 0.8rem; padding: 12px 20px; bottom: 16px; right: 16px; }
  .floating-cta .material-icons { font-size: 1rem; }
  .youtube-section { padding: 60px 20px; }
  .youtube-header { margin-bottom: 30px; }
  .youtube-header .section-title-en { font-size: 1.5rem; }
}
