/* ==========================================================================
   Rn クラン ホームページ
   トークン: 深宇宙ネイビー × ネビュラパープル、マイクラのインベントリスロットを
   宇宙船のUIパネルに転生させたのが今回のシグネチャー要素。
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  /* Color */
  --bg: #0a0b1e;
  --bg-soft: #0d0f24;
  --panel: #14162e;
  --panel-2: #1b1e3d;
  --slot: #10122a;
  --accent-purple: #9b6bff;
  --accent-purple-soft: #7c5cff;
  --accent-pink: #e2a6ff;
  --accent-gold: #ffd166;
  --text: #f2eefc;
  --text-muted: #a9a3c9;
  --text-dim: #726c94;
  --border: #2c2f57;
  --border-glow: rgba(155, 107, 255, 0.55);
  --online: #4ade80;

  /* Type */
  --font-display: 'Press Start 2P', monospace;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 14px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* ---------- starfield backdrop ---------- */
.starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1.5px 1.5px at 10% 20%, #fff 100%, transparent 100%),
    radial-gradient(1px 1px at 80% 10%, #fff 100%, transparent 100%),
    radial-gradient(1.5px 1.5px at 60% 70%, #fff 100%, transparent 100%),
    radial-gradient(1px 1px at 30% 85%, #fff 100%, transparent 100%),
    radial-gradient(1px 1px at 90% 60%, #fff 100%, transparent 100%),
    radial-gradient(1.5px 1.5px at 45% 40%, #fff 100%, transparent 100%),
    radial-gradient(1px 1px at 20% 55%, #fff 100%, transparent 100%),
    radial-gradient(1px 1px at 70% 90%, #fff 100%, transparent 100%),
    var(--bg);
  background-repeat: repeat;
  background-size: 600px 600px;
  opacity: 0.6;
}

.nebula {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 1400px;
  height: 1400px;
  z-index: -1;
  background: radial-gradient(circle, rgba(155,107,255,0.20) 0%, rgba(155,107,255,0.08) 35%, transparent 65%);
  filter: blur(10px);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .nebula { animation: drift 40s ease-in-out infinite alternate; }
}
@keyframes drift {
  from { transform: translateX(-54%) translateY(0); }
  to   { transform: translateX(-46%) translateY(40px); }
}

/* ---------- layout helpers ---------- */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }
@media (max-width: 640px) { section { padding: 64px 0; } }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-pink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-gold);
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(255,209,102,0.25);
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  margin-bottom: 16px;
}

.section-lede {
  color: var(--text-muted);
  max-width: 620px;
  font-size: 1.02rem;
  margin-bottom: 48px;
}

a { color: inherit; text-decoration: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
}
.btn:hover { transform: translateY(-2px); }

.btn-discord {
  background: linear-gradient(135deg, #7c5cff, #9b6bff);
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
}
.btn-discord:hover { box-shadow: 0 12px 28px rgba(124, 92, 255, 0.5); }

.btn-line {
  background: #06c755;
  color: #fff;
  box-shadow: 0 8px 24px rgba(6, 199, 85, 0.25);
}
.btn-line:hover { box-shadow: 0 12px 28px rgba(6, 199, 85, 0.4); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent-purple); }

/* ---------- header / nav ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 11, 30, 0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
}
.nav-brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.nav-links a:hover { color: var(--accent-pink); }
.nav-cta { display: flex; gap: 10px; }

.nav-toggle { display: none; }

@media (max-width: 800px) {
  .nav-links { display: none; }
  .nav-cta .btn-line { display: none; }
}

/* ---------- hero ---------- */
.hero {
  padding: 88px 0 60px;
  text-align: center;
  position: relative;
}
.hero-logo {
  width: 168px;
  height: 168px;
  margin: 0 auto 28px;
  border-radius: 28px;
  box-shadow: 0 0 0 1px var(--border-glow), 0 20px 60px rgba(155,107,255,0.35);
}
.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  line-height: 1.25;
  margin-bottom: 20px;
}
.hero h1 span { color: var(--accent-pink); }
.hero-sub {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 1.06rem;
}
.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 9px 18px;
  border-radius: 999px;
}
.status-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 8px var(--online);
  flex-shrink: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .status-dot { animation: pulse 2s ease-in-out infinite; }
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---------- inventory-slot signature panel ---------- */
.slot {
  background: var(--slot);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.03),
    inset 0 2px 0 rgba(255,255,255,0.04),
    inset 0 -2px 0 rgba(0,0,0,0.4);
  position: relative;
}
.slot::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-sm);
  padding: 1px;
  background: linear-gradient(135deg, var(--border-glow), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.slot:hover::after { opacity: 1; }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }

.about-card {
  padding: 28px;
}
.about-card .icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2);
  border-radius: var(--radius-sm);
  font-size: 1.3rem;
  margin-bottom: 18px;
}
.about-card h3 {
  font-size: 1.08rem;
  margin-bottom: 10px;
}
.about-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* ---------- members ---------- */
.member-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .member-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .member-grid { grid-template-columns: 1fr; } }

.member-card {
  padding: 22px 18px;
  text-align: center;
}
.member-avatar {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--accent-purple-soft), #4c3aa8);
  color: #fff;
  border: 1px solid var(--border-glow);
}
.member-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}
.member-handle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.member-role {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--accent-pink);
  border: 1px solid var(--border);
}
.member-role.admin {
  color: var(--accent-gold);
  border-color: rgba(255,209,102,0.4);
}

/* Discord widget panel (live online status) */
.widget-panel {
  margin-top: 28px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.widget-panel .label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.widget-panel .count {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--online);
}
#widget-online-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.online-chip {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.online-chip::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--online);
}

/* ---------- recruit ---------- */
.recruit {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 800px) { .recruit { grid-template-columns: 1fr; } }

.recruit-list {
  list-style: none;
}
.recruit-list li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.96rem;
}
.recruit-list li:last-child { border-bottom: none; }
.recruit-list .mark {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--accent-gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}
.recruit-list strong { color: var(--text); font-weight: 600; }

.recruit-panel {
  padding: 28px;
}
.recruit-panel h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.recruit-panel p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 22px;
}
.recruit-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.recruit-actions .btn { justify-content: center; }

/* ---------- gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

.gallery-item {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  background: var(--slot);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-empty {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-align: center;
  padding: 10px;
}
.gallery-empty .plus {
  font-size: 1.6rem;
  color: var(--border);
}

/* ---------- youtube ---------- */
.yt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
@media (max-width: 700px) { .yt-grid { grid-template-columns: 1fr; } }

.yt-card {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.yt-card .yt-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: #ff3b3b1a;
  color: #ff5c5c;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.yt-card h3 { font-size: 1rem; margin-bottom: 4px; }
.yt-card p { font-size: 0.85rem; color: var(--text-dim); font-family: var(--font-mono); }
.yt-card .arrow { margin-left: auto; color: var(--text-dim); }

.yt-members-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.yt-members {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.yt-chip {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.yt-chip:hover { border-color: var(--accent-purple); color: var(--text); }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 28px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
}
.footer-brand img { width: 30px; height: 30px; border-radius: 6px; }
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--accent-pink); }
.footer-note {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
