/* ===========================
   MBBS — Claude HP Design
   =========================== */

:root {
  --green:  #1A3A2A;
  --green-light: #224a36;
  --green-dark:  #0f2318;
  --gold:   #C9A84C;
  --gold-light: #e0c070;
  --blue:   #1E3A6E;
  --ivory:  #F5F0E8;
  --ivory-dim: #c8c0ae;
  --font-ja: 'Hiragino Mincho ProN', 'Yu Mincho', Georgia, serif;
  --font-en: 'Cormorant Garamond', 'Garamond', Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--green);
  color: var(--ivory);
  font-family: var(--font-ja);
  line-height: 1.8;
  padding-top: 46px;
}

/* ── HERO ── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 24px;
  justify-content: flex-start;
  background:
    radial-gradient(circle at 50% 4%, rgba(120, 255, 170, 0.68) 0%, rgba(92, 255, 151, 0.4) 14%, rgba(18, 105, 58, 0.16) 28%, rgba(0, 0, 0, 0) 48%),
    radial-gradient(circle at 24% 8%, rgba(72, 255, 149, 0.38) 0%, rgba(50, 198, 105, 0.2) 16%, rgba(0, 0, 0, 0) 38%),
    radial-gradient(circle at 78% 7%, rgba(95, 255, 163, 0.34) 0%, rgba(33, 160, 84, 0.18) 16%, rgba(0, 0, 0, 0) 36%),
    linear-gradient(180deg, rgba(46, 255, 138, 0.14) 0%, rgba(46, 255, 138, 0.04) 18%, rgba(0, 0, 0, 0) 36%),
    linear-gradient(to bottom, #000 0%, #000 85%, var(--green) 100%);
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect width="4" height="4" fill="none"/><rect x="0" y="0" width="1" height="1" fill="%23ffffff08"/></svg>');
  pointer-events: none;
}

.hero-logo {
  width: min(640px, 95vw);
  margin-bottom: 20px;
  border-radius: 40px;
  filter: drop-shadow(0 0 64px rgba(201,168,76,0.2));
  animation: fadeUp 1.2s ease both;
}

.hero-tagline {
  font-size: clamp(1.2rem, 3.5vw, 2.2rem);
  color: var(--ivory);
  letter-spacing: 0.05em;
  line-height: 1.6;
  margin-top: -60px;
  margin-bottom: 180px;
  text-shadow:
    0 0 10px rgba(102, 255, 163, 0.32),
    0 0 24px rgba(72, 255, 149, 0.22),
    0 0 44px rgba(32, 196, 99, 0.16);
  animation:
    fadeUp 1.2s ease 0.3s both,
    neonPulse 2.8s ease-in-out 1.5s infinite;
}

.hero-tagline em {
  display: block;
  font-style: normal;
  color: var(--gold);
  font-size: 0.6em;
  letter-spacing: 0.3em;
  margin-top: 24px;
}

.scroll-hint {
  position: absolute;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: calc(clamp(1.2rem, 3.5vw, 2.2rem) * 0.6);
  letter-spacing: 0.2em;
  animation: pulse 2.5s infinite;
}

.scroll-hint::after {
  content: '';
  display: block;
  width: 1px;
  height: 32px;
  background: var(--gold);
  margin: 6px auto 0;
  opacity: 0.6;
}

/* ── TOPBAR ── */
.topbar {
  text-align: center;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(201,168,76,0.2);
  background: var(--green-dark);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.topbar-symbol {
  height: 28px;
  width: auto;
  object-fit: contain;
  opacity: 0.92;
}
.topbar-brand-text {
  font-family: var(--font-en);
  font-size: clamp(0.62rem, 1.4vw, 0.78rem);
  letter-spacing: 0.18em;
  color: var(--ivory-dim);
  text-transform: uppercase;
  transition: color 0.3s;
}
.topbar-brand:hover .topbar-brand-text {
  color: var(--gold);
}

@keyframes topbarGlow {
  0%, 100% {
    text-shadow:
      0 0 8px rgba(92, 255, 151, 0.8),
      0 0 20px rgba(72, 255, 149, 0.5),
      0 0 40px rgba(46, 255, 138, 0.3);
  }
  50% {
    text-shadow:
      0 0 12px rgba(138, 255, 186, 1),
      0 0 30px rgba(92, 255, 151, 0.8),
      0 0 60px rgba(46, 255, 138, 0.5);
  }
}

/* ── MBBS LINK ── */
.mbbs-link {
  position: absolute;
  bottom: 24px;
  left: 50%;
  display: inline-block;
  transform: translateX(-50%);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  letter-spacing: 0.25em;
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid rgba(92,255,151,0.4);
  white-space: nowrap;
  text-shadow:
    0 0 8px rgba(92, 255, 151, 0.7),
    0 0 20px rgba(72, 255, 149, 0.4),
    0 0 40px rgba(46, 255, 138, 0.2);
  transition: color 0.3s, border-color 0.3s, text-shadow 0.3s, letter-spacing 0.3s, transform 0.3s;
}

.mbbs-link:hover,
.mbbs-link:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
  letter-spacing: 0.35em;
  text-shadow:
    0 0 10px rgba(201, 168, 76, 0.9),
    0 0 24px rgba(201, 168, 76, 0.6),
    0 0 48px rgba(201, 168, 76, 0.4);
  transform: translateX(-50%) scale(1.08);
}

/* ── DIVIDER ── */
.divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 0 auto 48px;
}

/* ── TRINITY (三本柱) ── */
#trinity {
  padding: 100px 24px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.section-label {
  font-size: clamp(0.72rem, 2.1vw, 1.32rem);
  letter-spacing: 0.35em;
  color: var(--gold);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--ivory);
  margin-bottom: 64px;
  font-weight: 400;
}

.trinity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2px;
}

.trinity-card {
  background: var(--green-light);
  padding: 56px 36px;
  position: relative;
  transition: background 0.4s;
}

.trinity-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
}

.trinity-card:hover { background: #264a38; }
.trinity-card:hover::before { transform: scaleX(1); }

.trinity-kanji {
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 20px;
  display: block;
  letter-spacing: 0.1em;
}

.trinity-en {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--ivory-dim);
  text-transform: uppercase;
  margin-bottom: 24px;
  display: block;
}

.trinity-copy {
  font-size: 0.95rem;
  color: var(--ivory);
  line-height: 2;
}

.trinity-link {
  display: inline-block;
  margin-top: 28px;
  padding: 6px 10px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #f3d98a;
  border-bottom: 1px solid transparent;
  border-radius: 999px;
  background: rgba(201, 168, 76, 0.08);
  box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.12);
  transition:
    border-color 0.3s,
    transform 0.3s,
    text-shadow 0.3s,
    background-color 0.3s,
    box-shadow 0.3s;
  text-decoration: none;
}

.trinity-link:hover,
.trinity-link:focus-visible {
  border-color: var(--gold);
  transform: scale(1.18);
  background: rgba(201, 168, 76, 0.14);
  box-shadow:
    0 0 0 1px rgba(201, 168, 76, 0.28),
    0 0 20px rgba(92, 255, 151, 0.14);
  text-shadow:
    0 0 10px rgba(138, 255, 186, 0.46),
    0 0 24px rgba(92, 255, 151, 0.28);
}

/* ── SYMBOL BREAK ── */
.symbol-break {
  text-align: center;
  padding: 60px 24px;
}

.symbol-break__lead {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(1.1rem, 2.8vw, 1.9rem);
  letter-spacing: 0.18em;
  text-shadow:
    0 0 10px rgba(128, 255, 185, 0.42),
    0 0 24px rgba(72, 255, 149, 0.3),
    0 0 48px rgba(34, 210, 108, 0.18);
  animation: leadGlow 3.8s ease-in-out infinite;
}

.symbol-break img {
  width: min(120px, 30vw);
  opacity: 0.82;
  filter:
    drop-shadow(0 0 18px rgba(201,168,76,0.36))
    drop-shadow(0 0 28px rgba(82,255,156,0.18));
  animation: symbolBreath 4.8s ease-in-out infinite;
}

.symbol-break__text {
  margin: 18px 0 0;
  color: var(--gold);
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  letter-spacing: 0.22em;
  text-transform: none;
  text-shadow:
    0 0 10px rgba(201, 168, 76, 0.24),
    0 0 24px rgba(88, 255, 163, 0.14);
  animation: symbolTextGlow 4.8s ease-in-out infinite;
}

/* ── PHILOSOPHY ── */
#philosophy {
  padding: 100px 24px;
  background: var(--green-dark);
  text-align: center;
}

.philosophy-inner {
  max-width: 720px;
  margin: 0 auto;
}

.philosophy-desc {
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  line-height: 2.2;
  color: var(--ivory-dim);
  margin-bottom: 48px;
}

.philosophy-quote {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 2.4;
  color: var(--ivory);
  margin-bottom: 48px;
}

.philosophy-quote strong {
  color: var(--gold);
  font-weight: 400;
}

.philosophy-name {
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  color: var(--ivory-dim);
}

/* ── BOOKS ── */
#books {
  padding: 100px 24px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.books-note {
  font-size: 0.9rem;
  color: var(--ivory-dim);
  letter-spacing: 0.08em;
  line-height: 2;
  margin-bottom: 48px;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 48px;
  margin-top: 56px;
}

.book-item {
  text-decoration: none;
  color: var(--ivory);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: transform 0.3s;
}

.book-item:hover {
  transform: translateY(-6px);
}

.book-item img {
  width: 100%;
  max-width: 220px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  border: 1px solid rgba(201,168,76,0.2);
}

.book-item:hover img {
  box-shadow: 0 12px 40px rgba(201,168,76,0.25);
  border-color: rgba(201,168,76,0.5);
}

.book-title {
  font-size: 1rem;
  color: var(--gold);
  letter-spacing: 0.08em;
}

.book-sub {
  font-size: 0.75rem;
  color: var(--ivory-dim);
  letter-spacing: 0.05em;
  line-height: 1.8;
}

/* ── SERVICES ── */
#services {
  padding: 100px 24px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 56px;
}

.service-btn {
  display: block;
  padding: 36px 24px;
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--ivory);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  line-height: 1.8;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.service-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(201,168,76,0.07);
  opacity: 0;
  transition: opacity 0.3s;
}

.service-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.service-btn:hover::after { opacity: 1; }

.service-btn-en {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--ivory-dim);
  margin-top: 8px;
  text-transform: uppercase;
}

/* ── FAQ ── */
#faq {
  padding: 100px 24px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.faq-list {
  margin-top: 56px;
  text-align: left;
}

.faq-item {
  border-bottom: 1px solid rgba(201,168,76,0.2);
}

.faq-q {
  padding: 24px 0;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: var(--ivory);
  letter-spacing: 0.06em;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.3s;
}

.faq-q::after {
  content: '+';
  color: var(--gold);
  font-size: 1.4rem;
  font-weight: 300;
  flex-shrink: 0;
  margin-left: 16px;
  transition: transform 0.3s;
}

.faq-item[open] .faq-q {
  color: var(--gold);
}

.faq-item[open] .faq-q::after {
  transform: rotate(45deg);
}

.faq-q::-webkit-details-marker { display: none; }

.faq-a {
  padding: 0 0 28px;
  font-size: clamp(0.82rem, 1.8vw, 0.95rem);
  color: var(--ivory-dim);
  line-height: 2.2;
  letter-spacing: 0.04em;
}

/* ── LINKS BAR ── */
.links-bar {
  padding: 60px 24px;
  text-align: center;
  border-top: 1px solid rgba(201,168,76,0.15);
}

.links-btn {
  display: inline-block;
  padding: 20px 48px;
  border: 1px solid rgba(201,168,76,0.5);
  color: var(--ivory);
  text-decoration: none;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  letter-spacing: 0.12em;
  line-height: 1.8;
  transition: all 0.3s;
}

.links-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,168,76,0.06);
}

.links-btn-en {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--ivory-dim);
  margin-top: 4px;
  text-transform: uppercase;
}

/* ── FOOTER ── */
footer {
  padding: 60px 24px;
  text-align: center;
  border-top: 1px solid rgba(201,168,76,0.2);
}

.footer-logo {
  width: min(340px, 78vw);
  margin-bottom: 8px;
  opacity: 0.85;
}

.footer-copy {
  margin-top: 0;
  font-size: 0.75rem;
  color: var(--ivory-dim);
  letter-spacing: 0.15em;
  line-height: 2;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

@keyframes neonPulse {
  0%, 100% {
    text-shadow:
      0 0 10px rgba(102, 255, 163, 0.24),
      0 0 24px rgba(72, 255, 149, 0.16),
      0 0 44px rgba(32, 196, 99, 0.1);
  }
  50% {
    text-shadow:
      0 0 14px rgba(138, 255, 186, 0.48),
      0 0 34px rgba(92, 255, 151, 0.34),
      0 0 68px rgba(46, 255, 138, 0.24);
  }
}

@keyframes symbolBreath {
  0%, 100% {
    transform: scale(1);
    filter:
      drop-shadow(0 0 18px rgba(201,168,76,0.3))
      drop-shadow(0 0 28px rgba(82,255,156,0.14));
  }
  50% {
    transform: scale(1.09);
    filter:
      drop-shadow(0 0 24px rgba(201,168,76,0.44))
      drop-shadow(0 0 42px rgba(110,255,176,0.28));
  }
}

@keyframes symbolTextGlow {
  0%, 100% {
    opacity: 0.82;
    text-shadow:
      0 0 10px rgba(201, 168, 76, 0.2),
      0 0 24px rgba(88, 255, 163, 0.1);
  }
  50% {
    opacity: 1;
    text-shadow:
      0 0 14px rgba(201, 168, 76, 0.34),
      0 0 30px rgba(110, 255, 176, 0.2);
  }
}

@keyframes leadGlow {
  0%, 100% {
    opacity: 0.86;
    text-shadow:
      0 0 10px rgba(128, 255, 185, 0.34),
      0 0 24px rgba(72, 255, 149, 0.24),
      0 0 48px rgba(34, 210, 108, 0.14);
  }
  50% {
    opacity: 1;
    text-shadow:
      0 0 14px rgba(164, 255, 206, 0.52),
      0 0 34px rgba(92, 255, 151, 0.34),
      0 0 60px rgba(46, 255, 138, 0.22);
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .trinity-grid { grid-template-columns: 1fr; gap: 1px; }
  .services-grid { grid-template-columns: 1fr; }
}

/* ── HAMBURGER BUTTON ── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-open {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-open span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--gold);
  transition: background 0.3s;
  box-shadow: 0 0 6px rgba(201,168,76,0.5);
}
.nav-open:hover span {
  background: var(--gold-light);
}

/* ── OVERLAY NAV ── */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 18, 12, 0.96);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  overflow-y: auto;
}
.nav-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.nav-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  color: var(--ivory-dim);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s;
}
.nav-close:hover { color: var(--gold); }

.nav-links {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav-links li {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.nav-overlay.is-open .nav-links li:nth-child(1) { opacity:1; transform:none; transition-delay:0.08s; }
.nav-overlay.is-open .nav-links li:nth-child(2) { opacity:1; transform:none; transition-delay:0.14s; }
.nav-overlay.is-open .nav-links li:nth-child(3) { opacity:1; transform:none; transition-delay:0.20s; }
.nav-overlay.is-open .nav-links li:nth-child(4) { opacity:1; transform:none; transition-delay:0.26s; }
.nav-overlay.is-open .nav-links li:nth-child(5) { opacity:1; transform:none; transition-delay:0.32s; }
.nav-overlay.is-open .nav-links li:nth-child(6) { opacity:1; transform:none; transition-delay:0.38s; }
.nav-overlay.is-open .nav-links li:nth-child(7) { opacity:1; transform:none; transition-delay:0.44s; }

.nav-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 40px;
  text-decoration: none;
  border-bottom: 1px solid rgba(201,168,76,0.12);
  transition: border-color 0.3s;
}
.nav-links a:hover { border-bottom-color: rgba(201,168,76,0.5); }

.nav-en {
  font-family: var(--font-en);
  font-size: clamp(0.7rem, 1.4vw, 0.82rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
}
.nav-ja {
  font-family: var(--font-ja);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  letter-spacing: 0.14em;
  color: var(--ivory);
  transition: color 0.3s;
}
.nav-links a:hover .nav-ja { color: var(--gold-light); }
