@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Noto+Serif+JP:wght@300;400;700&family=Playfair+Display:wght@300;400;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --accent-red: #C8243C;
  --accent-red-dark: #a01d30;
  --primary-blue: #2563EB;
  --soft-blue: #D6E4F7;
  --pale-gray: #F5F5F0;
  --text-dark: #1a1a1a;
  --text-gray: #555555;
  --text-light-gray: #888888;
  --white: #ffffff;
  --border-light: rgba(0,0,0,0.08);
  --gold: #B8935A;
  --pink-light: #FFF0F3;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  color: var(--text-dark);
  background: var(--white);
  overflow-x: hidden;
}

/* ==================== ANIMATIONS ==================== */
@keyframes spaceInUp {
  0% { opacity: 1; transform-origin: 50% 0%; transform: scale(0.2) translate(0%, -200%); }
  100% { opacity: 1; transform-origin: 50% 0%; transform: scale(1) translate(0%, 0%); }
}

@keyframes perspectiveRight {
  0%, 100% { transform: perspective(800px) rotateY(0deg); }
  30% { transform: perspective(800px) rotateY(-15deg); }
  60% { transform: perspective(800px) rotateY(10deg); }
}

@keyframes fadeSlideUp {
  from { opacity: 1; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(6px); opacity: 0.5; }
}

.anim-hidden { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.anim-visible { opacity: 1; transform: translateY(0); }

/* ==================== NAV ==================== */
header > nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  width: 100%;
}

.nav-logo {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  letter-spacing: 0.08em;
  color: var(--text-dark);
  text-decoration: none;
}

.nav-logo span {
  color: var(--accent-red);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-gray);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.3s;
}

.nav-links a:hover { color: var(--accent-red); }

.nav-symbol {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: var(--text-light-gray);
  font-weight: 300;
  writing-mode: vertical-rl;
  letter-spacing: 0.1em;
}

.nav-cta {
  background: var(--accent-red);
  color: var(--white) !important;
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  font-size: 0.75rem !important;
  transition: background 0.3s, transform 0.3s !important;
}

.nav-cta:hover {
  background: var(--accent-red-dark) !important;
  color: var(--white) !important;
  transform: translateY(-2px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  transition: all 0.3s;
}
/* ==================== FOOTER RULE ==================== */
footer {
  text-align: center;
  padding: clamp(4rem, 10vh, 8rem) 2rem clamp(2rem, 4vh, 4rem);
  color: var(--text-light-gray);
  font-size: clamp(0.875rem, 2vw, 1rem);
  line-height: 1.8;
  background: var(--white);
  border-top: 1px solid var(--border-light);
}

.footer-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.footer-contact-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-jp-vertical {
  writing-mode: vertical-rl;
  font-family: 'Noto Serif JP', serif;
  font-size: 0.9rem;
  color: var(--text-light-gray);
  letter-spacing: 0.25em;
  line-height: 2;
  height: 220px;
}

.footer-en-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  color: var(--text-light-gray);
  font-style: italic;
  line-height: 2.2;
  text-align: center;
}

.footer-contact-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.875rem, 2vw, 1rem);
  color: var(--text-dark);
  text-decoration: none;
  letter-spacing: 0.08em;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.3s, color 0.3s;
}

.footer-contact-link:hover {
  color: var(--accent-red);
  border-bottom-color: var(--accent-red);
}

.footer-contact-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light-gray);
  margin-top: 0.5rem;
}

.footer-arrow {
  font-size: 0.9rem;
  color: var(--text-light-gray);
}

.footer-divider {
  width: 40px;
  height: 1px;
  background: var(--border-light);
  margin: 1rem auto;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-nav a {
  font-size: 0.78rem;
  color: var(--text-light-gray);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.3s;
}

.footer-nav a:hover { color: var(--accent-red); }

.footer-legal {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.footer-legal a {
  font-size: 0.72rem;
  color: var(--text-light-gray);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-legal a:hover { color: var(--accent-red); }

.footer-info {
  font-size: 0.75rem;
  color: var(--text-light-gray);
  line-height: 1.9;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-dark);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.footer-copyright {
  font-size: 0.72rem;
  color: var(--text-light-gray);
  letter-spacing: 0.08em;
  margin-top: 2rem;
}

/* ==================== MAP / ACCESS ==================== */
.access-section {
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 4rem);
  background: var(--pale-gray);
}

.access-inner {
  display: flex;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: flex-start;
}

.access-info { flex: 1; }
.access-info h3 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.access-detail {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border-light);
}

.access-icon {
  width: 36px;
  height: 36px;
  background: var(--pink-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

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

.access-detail p strong {
  font-size: 0.72rem;
  display: block;
  letter-spacing: 0.1em;
  color: var(--accent-red);
  margin-bottom: 0.2rem;
}

.access-map {
  flex: 1.2;
  border-radius: 16px;
  overflow: hidden;
  min-height: 320px;
  background: #e0e0e0;
  position: relative;
}

.map-placeholder {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
}

.map-overlay {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: var(--accent-red);
  color: white;
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: background 0.3s;
}

.map-overlay:hover { background: var(--accent-red-dark); }

/* ==================== MOBILE CTA BAR ==================== */
.mobile-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border-light);
  display: none;
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.mobile-cta-inner {
  display: flex;
}

.mobile-cta-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
  text-decoration: none;
  gap: 0.2rem;
  transition: background 0.2s;
}

.mobile-cta-btn:first-child {
  background: var(--accent-red);
  color: white;
}

.mobile-cta-btn:last-child {
  background: var(--primary-blue);
  color: white;
}

.mobile-cta-btn:hover { opacity: 0.9; }

.mobile-cta-icon { font-size: 1.2rem; }
.mobile-cta-text { font-size: 0.65rem; letter-spacing: 0.05em; font-weight: 700; }

/* ==================== COOKIE CONSENT ==================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(26,26,26,0.97);
  color: rgba(255,255,255,0.9);
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  z-index: 9999;
  backdrop-filter: blur(4px);
  flex-wrap: wrap;
}

.cookie-text {
  font-size: 0.8rem;
  line-height: 1.6;
  flex: 1;
  min-width: 200px;
}

.cookie-text a {
  color: rgba(255,255,255,0.7);
  text-decoration: underline;
  transition: color 0.3s;
}

.cookie-text a:hover { color: white; }

.cookie-btn {
  background: var(--accent-red);
  color: white;
  border: none;
  padding: 0.6rem 1.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Noto Sans JP', sans-serif;
  transition: background 0.3s;
}

.cookie-btn:hover { background: var(--accent-red-dark); }

/* ==================== MOBILE MENU ==================== */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background: var(--white);
  z-index: 2000;
  padding: 5rem 2rem 2rem;
  box-shadow: -5px 0 30px rgba(0,0,0,0.1);
  transition: right 0.4s ease;
  overflow-y: auto;
}

.mobile-menu.open { right: 0; }

.mobile-menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
}

.mobile-menu nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-menu nav ul li a {
  display: block;
  padding: 1rem 0;
  font-size: 1rem;
  color: var(--text-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
  letter-spacing: 0.05em;
  transition: color 0.3s, padding-left 0.3s;
}

.mobile-menu nav ul li a:hover {
  color: var(--accent-red);
  padding-left: 1rem;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1999;
  display: none;
}

.mobile-menu-overlay.open { display: block; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-steps { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .flow-steps::before { display: none; }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-mascot { position: static; transform: none; margin-top: 1rem; }
}

@media (max-width: 768px) {
  header > nav { padding: 1rem 1.5rem; }
  /* nav-links display fix removed */
  .nav-symbol { display: none; }
  .hamburger { display: flex; }

  .hero-inner { flex-direction: column; }
  .hero-left { padding: 2rem 1.5rem 1rem; }
  .hero-right {
    width: 100%;
    min-height: 280px;
    order: -1;
    height: 280px;
  }
  .hero-letter { font-size: 8rem; }
  .hero-vert-text { display: none; }
  .hero-scroll { bottom: 1rem; left: 1.5rem; }
  .hero-contact-btn { display: none; }

  .philosophy::before { font-size: 5rem; }
  .philosophy-label { display: none; }

  .cards-grid { grid-template-columns: 1fr; }
  .mascot-wrap { display: none; }

  .doctor-inner { flex-direction: column; }
  .doctor-img-wrap { width: 100%; max-width: 300px; margin: 0 auto; }

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

  .testimonials-grid { grid-template-columns: 1fr; }

  .facility-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .facility-img-large { min-height: 260px; grid-row: span 1; }

  .access-inner { flex-direction: column; }

  .cta-section::before { font-size: 5rem; }

  .mobile-cta-bar { display: flex; }
  body { padding-bottom: 65px; }

  .bar-wrapper { padding-right: 0; }
  .stats-mascot { transform: none; }

  .footer-jp-vertical { height: 160px; }
}

@media (max-width: 480px) {
  .flow-steps { grid-template-columns: 1fr; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .cookie-banner { flex-direction: column; align-items: flex-start; }
}

