/* ============================================
   きみ夏宵あそび - Global Styles
   Summer Night Festival Design System
============================================ */

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

:root {
  /* Color Palette */
  --c-night:    #03020E;
  --c-navy:     #08103A;
  --c-deep:     #0E1B5A;
  --c-purple:   #7B4EA8;
  --c-violet:   #9B72CF;
  --c-pink:     #E07898;
  --c-coral:    #E8765A;
  --c-gold:     #F0BE50;
  --c-yellow:   #F5DF70;
  --c-white:    #FFF8F0;
  --c-dim:      rgba(255,248,240,0.6);

  /* Gradients */
  --grad-logo:  linear-gradient(135deg, #9B72CF, #E07898, #E8765A, #F0BE50);
  --grad-night: linear-gradient(180deg, #03020E 0%, #08103A 50%, #0E1B5A 100%);
  --grad-glow:  radial-gradient(ellipse at center, rgba(155,114,207,0.3) 0%, transparent 70%);

  /* Typography */
  --font-ja:    'Noto Serif JP', serif;
  --font-ja-sans: 'Noto Sans JP', sans-serif;
  --font-en:    'Cinzel', serif;

  /* Spacing */
  --nav-h: 72px;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--c-night);
  color: var(--c-white);
  font-family: var(--font-ja-sans);
  font-weight: 300;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--c-navy); }
::-webkit-scrollbar-thumb { background: var(--c-purple); border-radius: 2px; }

/* ── Navigation ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  transition: background 0.5s, backdrop-filter 0.5s;
}
#navbar.scrolled {
  background: rgba(3,2,14,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(155,114,207,0.2);
}
.nav-logo img {
  height: 48px;
  filter: drop-shadow(0 0 8px rgba(155,114,207,0.6));
}
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  color: var(--c-dim);
  text-decoration: none;
  font-family: var(--font-en);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--grad-logo);
  transform: scaleX(0);
  transition: transform 0.3s;
}
.nav-links a:hover { color: var(--c-white); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ── Hamburger toggle (mobile only / CSS-only) ── */
.nav-toggle { display: none; }
.nav-burger { display: none; }

/* ── Section Base ── */
section {
  position: relative;
  padding: 100px 40px;
}
.section-title {
  text-align: center;
  margin-bottom: 60px;
}
.section-title .en {
  font-family: var(--font-en);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--c-gold);
  display: block;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.section-title .ja {
  font-family: var(--font-ja);
  font-size: 2.2rem;
  background: var(--grad-logo);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Divider ── */
.divider {
  width: 60px; height: 1px;
  background: var(--grad-logo);
  margin: 20px auto;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: 40px;
  font-family: var(--font-ja-sans);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--grad-logo);
  color: var(--c-night);
  font-weight: 500;
  box-shadow: 0 4px 24px rgba(224,120,152,0.4);
}
.btn-primary:hover { box-shadow: 0 8px 32px rgba(224,120,152,0.6); }

.btn-outline {
  background: transparent;
  color: var(--c-white);
  border: 1px solid rgba(155,114,207,0.5);
}
.btn-outline:hover {
  background: rgba(155,114,207,0.1);
  border-color: var(--c-violet);
}

/* ── Cards ── */
.glass-card {
  background: rgba(14,27,90,0.4);
  border: 1px solid rgba(155,114,207,0.2);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(155,114,207,0.5);
  box-shadow: 0 8px 40px rgba(123,78,168,0.25);
}

/* ── Footer ── */
footer {
  background: var(--c-night);
  border-top: 1px solid rgba(155,114,207,0.15);
  padding: 48px 40px;
  text-align: center;
}
footer p {
  color: rgba(255,248,240,0.35);
  font-size: 0.8rem;
  line-height: 2;
}

/* ── Fade-in animation (GSAP target) ── */
.reveal { opacity: 0; transform: translateY(30px); }

/* ── Responsive ── */
@media (max-width: 768px) {
  #navbar { padding: 0 20px; }
  section { padding: 70px 20px; }
  .section-title .ja { font-size: 1.6rem; }

  /* navbar 自体は常に薄背景にしてメニュー展開時の視認性を確保 */
  #navbar {
    background: rgba(3,2,14,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(155,114,207,0.2);
  }

  /* ハンバーガーボタン表示 */
  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 11px;
    border: 1px solid rgba(155,114,207,0.35);
    border-radius: 10px;
    background: rgba(3,2,14,0.5);
    cursor: pointer;
    z-index: 101;
  }
  .nav-burger span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--c-white);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  /* メニュー本体：ドロップダウン化 */
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(3,2,14,0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(155,114,207,0.25);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }
  .nav-links li {
    width: 100%;
    text-align: center;
    border-top: 1px solid rgba(155,114,207,0.1);
  }
  .nav-links a {
    display: block;
    padding: 16px;
    font-size: 0.8rem;
  }
  .nav-links a::after { display: none; }

  /* 開閉 */
  .nav-toggle:checked ~ .nav-links {
    max-height: 80vh;
    overflow-y: auto;
  }
  /* ハンバーガー → ✕ */
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
