/* ============================================================
   UE長崎 — トップページ (3D群島)
   ============================================================ */

:root {
  --bg:          #08111f;
  --accent-blue: #7cc7ff;
  --accent-warm: #ffd27a;
  --glass-bg:    rgba(255, 255, 255, 0.08);
  --glass-border:rgba(255, 255, 255, 0.08);
  --text:        #ffffff;
  --text-muted:  rgba(255, 255, 255, 0.6);
  --text-dim:    rgba(255, 255, 255, 0.5);
  --radius-pill: 999px;
  --radius-card: 24px;
  --radius-btn:  14px;
  --transition:  0.45s ease;
  --slide-offset: 18px;
}

/* --- Reset -------------------------------------------------- */

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

/* --- Base --------------------------------------------------- */

body {
  overflow: hidden;
  font-family: "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--text);
}

#bg {
  position: fixed;
  inset: 0;
}

/* --- Top bar ------------------------------------------------ */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  z-index: 10;
}

.logo {
  font-size: 28px;
  font-weight: bold;
}

.connpass {
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

/* --- Overlay / content sections ----------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.content {
  position: absolute;
  left: 60px;
  top: 50%;
  transform: translateY(-50%) translateX(calc(-1 * var(--slide-offset)));
  width: 420px;
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
  pointer-events: none;
}

.content.active {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.content.active[data-island="0"] {
  width: calc(100% - 120px);
  display: flex;
  gap: 48px;
  align-items: center;
}

.top-left {
  flex-shrink: 0;
}

.top-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.top-icon {
  max-width: 400px;
  height: auto;
}

.content.leave-left {
  opacity: 0;
  transform: translateY(-50%) translateX(var(--slide-offset));
}

.content.leave-right {
  opacity: 0;
  transform: translateY(-50%) translateX(calc(-1 * var(--slide-offset)));
}

.content.active a,
.content.active button {
  pointer-events: all;
}

/* --- Typography --------------------------------------------- */

h1 {
  font-size: 84px;
  margin-bottom: 24px;
}

.copy {
  font-size: 42px;
  line-height: 1.5;
}

h2 {
  font-size: 54px;
  margin-bottom: 24px;
}

.content p {
  line-height: 1.8;
  font-size: 18px;
}

/* --- Event card --------------------------------------------- */

.event-card {
  margin-top: 24px;
  padding: 28px;
  border-radius: var(--radius-card);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}

.label {
  color: var(--accent-warm);
  margin-bottom: 12px;
}

.event-card h3 {
  font-size: 36px;
  margin-bottom: 12px;
}

.event-card button {
  margin-top: 20px;
  border: none;
  padding: 16px 20px;
  border-radius: var(--radius-btn);
  background: var(--accent-warm);
  color: #111;
  font-weight: bold;
  cursor: pointer;
}

.past-events-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.05em;
  pointer-events: all;
  transition: color 0.2s;
}

.past-events-link:hover {
  color: var(--text);
}

/* --- Contact links ------------------------------------------ */

.links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.links a {
  color: var(--text);
  text-decoration: none;
  font-size: 24px;
}

/* --- Bottom navigation -------------------------------------- */

.bottom-nav {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  z-index: 20;
}

.bottom-nav button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s, color 0.2s;
}

.bottom-nav button.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent-warm);
}

/* --- Loading screen ----------------------------------------- */

#loading {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.6s ease;
}

#loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-inner {
  display: flex;
  gap: 10px;
}

.loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-blue);
  animation: pulse 1.2s ease-in-out infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40%           { opacity: 1;   transform: scale(1); }
}

/* --- About section ------------------------------------------- */

.about-section {
  width: calc(100% - 120px);
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.about-left {
  width: 320px;
  flex-shrink: 0;
}

.about-right {
  flex: 1;
}

.about-catch {
  font-size: 32px;
  line-height: 1.5;
  margin-top: 16px;
  font-weight: bold;
}

.story-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.story-cards::-webkit-scrollbar {
  width: 4px;
}

.story-cards::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.story-cards::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.story-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.story-number {
  flex-shrink: 0;
  font-size: 28px;
  font-weight: bold;
  color: var(--accent-warm);
  opacity: 0.8;
  line-height: 1;
}

.story-content {
  flex: 1;
}

.story-card h3 {
  font-size: 15px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.story-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.intent {
  font-size: 12px;
  color: var(--text-dim);
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.intent strong {
  color: var(--accent-warm);
}

/* --- Mobile ------------------------------------------------- */

@media (max-width: 768px) {
  .content {
    left: 24px;
    width: calc(100% - 48px);
    top: auto;
    bottom: 120px;
    transform: translateX(calc(-1 * var(--slide-offset)));
  }

  .content.active {
    transform: translateX(0);
  }

  .content.leave-left {
    transform: translateX(var(--slide-offset));
  }

  .content.leave-right {
    transform: translateX(calc(-1 * var(--slide-offset)));
  }

  .content.active[data-island="0"] {
    flex-direction: column;
    width: calc(100% - 48px);
  }

  .top-left {
    width: 100%;
  }

  .top-right {
    justify-content: center;
  }

  .top-icon {
    max-width: 120px;
  }

  .about-section {
    flex-direction: column;
    width: calc(100% - 48px);
  }

  .about-left {
    width: 100%;
  }

  .about-catch {
    font-size: 24px;
  }

  .story-cards {
    grid-template-columns: 1fr;
    max-height: 40vh;
  }

  h1         { font-size: 54px; }
  .copy      { font-size: 28px; }
  h2         { font-size: 38px; }
}
