/* ============================================================
   ONGROUP — site.css (common across all pages)
   "光を仕込む集団" — black × champagne gold
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* base */
  --black-deep: #0a0a0a;
  --black-pure: #000000;
  --black-raise: #121212;
  --black-line: rgba(255, 215, 0, 0.14);

  /* gold — pure gold #FFD700 for ALL accents + background light */
  --gold: #FFD700;
  --gold-light: #FFD700;
  --gold-deep: #b89b00;

  /* accent (action/hover) — unified to pure gold */
  --neon-red: #FFD700;

  /* neon (reserved for later ONGROUP section) */
  --neon: #39ff14;
  --neon-glow: #00ffaa;

  /* neutrals */
  --white: #ffffff;
  --gray-1: #aaaaaa;
  --gray-2: #888888;
  --gray-3: #666666;

  /* type — mincho / serif system */
  --font-mincho: "Shippori Mincho B1", "Noto Serif JP", serif;  /* max copy, declarations */
  --font-serif: "Noto Serif JP", serif;                          /* headings + body */
  --font-anton: "Anton", sans-serif;                             /* EN display / logo / nav */
  --font-playfair: "Playfair Display", serif;                    /* EN mid-heading */
  --font-cinzel: "Cinzel", serif;                                /* MUSIC label */
  --font-en-body: "Inter", sans-serif;
  --font-num: "Bricolage Grotesque", "Inter", sans-serif;
  /* legacy aliases */
  --font-ja-head: var(--font-mincho);
  --font-ja-body: var(--font-serif);
  --font-en-head: var(--font-anton);

  /* metrics */
  --header-h: 80px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1400px;
}

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

html, body {
  overflow-x: hidden;
  max-width: 100%;
  background: var(--black-deep);
  color: var(--white);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

h1, h2, h3, h4 { word-break: break-word; overflow-wrap: break-word; line-height: 1.16; letter-spacing: 0.01em; }
p { overflow-wrap: break-word; }

::selection { background: var(--gold); color: var(--black-pure); }

/* Page fade in/out transition */
body { opacity: 0; transition: opacity 0.6s var(--ease); }
body.is-ready { opacity: 1; }
body.is-leaving { opacity: 0; }

/* ---------- Shared utility ---------- */
.container { width: min(100% - 48px, var(--maxw)); margin-inline: auto; }

.eyebrow {
  font-family: var(--font-en-body);
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.scrolled {
  background: rgba(10, 10, 10, 0.92);
  border-bottom-color: var(--black-line);
  box-shadow: 0 12px 40px -18px rgba(0, 0, 0, 0.9);
}

.header-inner {
  width: min(100% - 48px, var(--maxw));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* logo */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand__mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1.5px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  font-family: var(--font-en-head);
  font-size: 17px;
  line-height: 1;
  padding-top: 2px;
  transition: box-shadow 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.brand__name {
  font-family: var(--font-anton);
  font-size: 24px;
  letter-spacing: 0.04em;
  color: var(--white);
  transition: color 0.3s var(--ease);
}
.brand:hover .brand__mark { box-shadow: 0 0 18px -2px var(--neon-red); color: var(--neon-red); border-color: var(--neon-red); }
.brand:hover .brand__name { color: var(--neon-red); text-shadow: 0 0 6px var(--neon-red), 0 0 16px rgba(255,215,0,0.6); }

/* center nav */
.main-nav { display: flex; gap: clamp(24px, 2.6vw, 40px); }
.main-nav a {
  position: relative;
  font-family: var(--font-anton);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--white);
  padding: 6px 0;
  transition: color 0.3s var(--ease), text-shadow 0.3s var(--ease);
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--neon-red);
  box-shadow: 0 0 8px var(--neon-red);
  transition: width 0.3s var(--ease);
}
.main-nav a:hover { color: var(--neon-red); text-shadow: 0 0 5px var(--neon-red), 0 0 10px var(--neon-red), 0 0 20px rgba(255,215,0,0.6); }
.main-nav a:hover::after { width: 100%; }
.main-nav a.active { color: var(--neon-red); }
.main-nav a.active::after { width: 100%; background: var(--neon-red); }

/* right cluster */
.header-actions { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }

.lang-switch-link {
  font-family: var(--font-anton);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--white);
  transition: color 0.3s var(--ease);
}
.lang-switch-link:hover { color: var(--neon-red); text-shadow: 0 0 5px var(--neon-red), 0 0 12px rgba(255,215,0,0.6); }

/* hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 30px; height: 22px; justify-content: center; }
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--neon-red); border-radius: 2px; transition: transform 0.35s var(--ease), opacity 0.25s var(--ease); }
body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile menu panel */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(6,6,6,0.97);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0 32px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}
body.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu a {
  font-family: var(--font-en-head);
  font-size: clamp(34px, 11vw, 56px);
  letter-spacing: 0.04em;
  color: var(--white);
  padding: 10px 0;
  border-bottom: 1px solid var(--black-line);
  transition: color 0.3s var(--ease), padding-left 0.3s var(--ease);
}
.mobile-menu a span { display: block; font-family: var(--font-ja-body); font-size: 12px; letter-spacing: 0.02em; color: rgba(255,255,255,0.6); margin-top: 2px; }
.mobile-menu a:hover { color: var(--neon-red); text-shadow: 0 0 5px var(--neon-red), 0 0 12px rgba(255,215,0,0.6); padding-left: 14px; }
.mobile-menu__foot { margin-top: 36px; display: flex; gap: 18px; align-items: center; font-family: var(--font-en-body); font-size: 13px; color: var(--gray-2); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--black-pure);
  border-top: 1px solid var(--black-line);
  padding: clamp(80px, 11vw, 120px) 0 30px;
  text-align: center;
  overflow: hidden;
}
.footer-container {
  max-width: 100%;
  margin-inline: auto;
}

/* 1 — copyright */
.footer-copyright {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(11px, 1vw, 13px);
  color: var(--white);
  margin: 0 0 clamp(56px, 7vw, 80px);
  padding: 0 24px;
}

/* 2 — tagline */
.footer-tagline {
  font-family: var(--font-mincho);
  font-weight: 800;
  font-size: clamp(32px, 5vw, 72px);
  color: var(--white);
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin: 0 0 clamp(44px, 6vw, 60px);
  padding: 0 24px;
}

/* 3 — giant ONGROUP IMPACT (full-bleed to screen edges) */
.footer-impact-wrapper {
  width: 100vw;
  max-width: 100vw;
  margin: 0;
  padding: 40px 16px;
  box-sizing: border-box;
  overflow: hidden;
  text-align: center;
  display: block;
}
.footer-impact {
  font-family: var(--font-anton);
  font-weight: 400;
  font-size: 15vw;
  color: var(--white);
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0;
  padding: 0.2em 0;
  text-align: center;
  white-space: nowrap;
  display: block;
  width: 100%;
  max-width: 100%;
}

/* ============================================================
   GLOBAL LIGHT SYSTEM (lights.js) + Z-INDEX LAYERING
   ============================================================ */
#light-effects {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  width: 100vw;
  height: 100vh;
}
#section-flash {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(60% 50% at 50% 45%, rgba(255,215,0,0.16), transparent 70%);
  opacity: 0;
}
#section-flash.fire { animation: sectionFlash 0.45s ease; }
@keyframes sectionFlash { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 0; } }

.site-header { z-index: 50; }
.to-top { z-index: 55; }
.opening { z-index: 9999; }
main, .site-footer { position: relative; z-index: 10; }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 60px; height: 60px;
  z-index: 80;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--black-pure);
  border: 2px solid var(--neon-red);
  color: var(--neon-red);
  opacity: 0; transform: translateY(16px) scale(0.9);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; visibility: visible; animation: toTopPulse 2s ease-in-out infinite; }
.to-top:hover { transform: scale(1.15); background: var(--neon-red); color: var(--white); animation: toTopPulse 1s ease-in-out infinite; }
.to-top:hover svg { filter: drop-shadow(0 0 4px var(--neon-red)); }
.to-top svg { width: 22px; height: 22px; filter: drop-shadow(0 0 4px var(--neon-red)); }
@keyframes toTopPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255,215,0,0.6), 0 0 24px rgba(255,215,0,0.4), 0 0 48px rgba(255,215,0,0.2); }
  50% { box-shadow: 0 0 24px rgba(255,215,0,1), 0 0 48px rgba(255,215,0,0.7), 0 0 96px rgba(255,215,0,0.4), 0 0 144px rgba(255,215,0,0.2); }
}
@media (prefers-reduced-motion: reduce) {
  .to-top.show, .to-top:hover { animation: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .footer-links { gap: 40px 36px; }
}

@media (max-width: 820px) {
  :root { --header-h: 64px; }
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .brand__name { font-size: 20px; }
}

@media (max-width: 540px) {
  .to-top { width: 56px; height: 56px; right: 18px; bottom: 18px; }
}
