/* ============================================================
   M2U (Moon to you) — Teaser Site
   ============================================================ */

:root {
  --bg: #04060d;
  --bg-2: #090d1a;
  --panel: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.1);
  --ink: #e9edf5;
  --sub: #98a1b3;
  --moon: #f3ecd9;
  --gold: #d8c9a3;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --latin: "Outfit", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  background:
    radial-gradient(1200px 800px at 78% -10%, rgba(120, 140, 200, 0.10), transparent 60%),
    radial-gradient(900px 700px at 12% 30%, rgba(80, 95, 150, 0.07), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 60%, #060912 100%);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.serif { font-family: var(--serif); }

/* ---------- starfield ---------- */
#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(4, 6, 13, 0.85), rgba(4, 6, 13, 0));
  backdrop-filter: blur(2px);
}
.brand img { display: block; opacity: 0.95; }
.global-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 34px);
  font-family: var(--latin);
  font-size: 12px;
  letter-spacing: 0.18em;
}
.global-nav a {
  color: var(--sub);
  text-decoration: none;
  transition: color 0.3s;
}
.global-nav a:hover { color: var(--ink); }
.global-nav .contact-link {
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
}
@media (max-width: 640px) {
  .global-nav a:not(.contact-link) { display: none; }
}

main { position: relative; z-index: 1; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.moon-wrap {
  position: absolute;
  top: 8%;
  right: 4%;
  width: min(56vmin, 600px);
  aspect-ratio: 1;
  z-index: 0;
  will-change: transform;
}
.moon {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-image: url("/img/moon.jpg");
  background-size: 104% 104%;
  background-position: 50% 46%;
  box-shadow:
    inset -26px -34px 80px rgba(10, 12, 30, 0.55),
    inset 12px 14px 44px rgba(255, 255, 255, 0.14),
    0 0 70px rgba(243, 236, 217, 0.30),
    0 0 220px rgba(243, 236, 217, 0.14);
  animation: moon-float 9s ease-in-out infinite alternate;
}

@keyframes moon-float {
  from { transform: translateY(-10px); }
  to   { transform: translateY(12px); }
}

/* capsule drifting toward the moon */
.capsule-wrap {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(46vw, 480px);
  z-index: 0;
  pointer-events: none;
}
.capsule-track { width: 100%; display: block; }
.track-line {
  stroke: rgba(216, 201, 163, 0.28);
  stroke-width: 1;
  stroke-dasharray: 0.012 0.02;
  stroke-linecap: round;
}
.capsule { fill: rgba(233, 237, 245, 0.32); animation: capsule-drift 14s ease-in-out infinite alternate; }
.capsule line { stroke: rgba(4, 6, 13, 0.55); stroke-width: 1.4; }
@keyframes capsule-drift {
  from { transform: translate(52px, 292px) rotate(28deg); }
  to   { transform: translate(66px, 278px) rotate(20deg); }
}
@media (max-width: 720px) {
  .capsule-wrap { width: 66vw; opacity: 0.75; }
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 140px 24px 120px;
  max-width: 860px;
}
.kicker {
  font-family: var(--latin);
  font-size: 11px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--sub);
  margin: 0 0 26px;
}
.hero-logo svg {
  width: min(64vw, 340px);
  display: block;
  margin: 0 auto 30px;
}
.logo-stroke {
  stroke: var(--ink);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.logo-two { stroke: var(--gold); }
.logo-moon { fill: var(--gold); }
.hero-copy {
  font-size: clamp(22px, 4.4vw, 34px);
  font-weight: 600;
  letter-spacing: 0.14em;
  margin: 0 0 18px;
}
.hero-sub {
  color: var(--sub);
  font-size: clamp(13px, 2.4vw, 15px);
  line-height: 2.2;
  margin: 0 0 36px;
}
.hero-sub strong { color: var(--ink); font-weight: 500; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-family: var(--latin);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-decoration: none;
  padding: 13px 30px;
  border-radius: 999px;
  transition: all 0.35s ease;
}
.btn-ghost {
  color: var(--bg);
  background: linear-gradient(180deg, #fdf9ec, #d9d2bd);
  box-shadow: 0 0 30px rgba(243, 236, 217, 0.22);
}
.btn-ghost:hover { box-shadow: 0 0 46px rgba(243, 236, 217, 0.42); transform: translateY(-1px); }
.btn-line { color: var(--ink); border: 1px solid var(--line); }
.btn-line:hover { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.05); }
.btn-lg { font-size: 14px; padding: 16px 40px; }

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  z-index: 2;
}
.scroll-cue span {
  position: absolute;
  top: 7px; left: 50%;
  width: 3px; height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.6);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- sections ---------- */
.section { padding: clamp(90px, 14vw, 160px) 0; position: relative; }
.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.045) 50%, rgba(255, 255, 255, 0.022));
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.section-inner { max-width: 980px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }
.section-kicker {
  font-family: var(--latin);
  font-size: 11px;
  letter-spacing: 0.42em;
  color: var(--gold);
  margin: 0 0 18px;
}
.section-title {
  font-size: clamp(28px, 5.4vw, 44px);
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0.08em;
  margin: 0 0 34px;
}
.lead {
  color: var(--sub);
  max-width: 720px;
  font-size: clamp(14px, 2.2vw, 15.5px);
  margin: 0 0 26px;
}
.lead .em { color: var(--ink); background: linear-gradient(transparent 65%, rgba(216, 201, 163, 0.35) 65%); }
.sp { display: none; }
@media (max-width: 560px) { .sp { display: block; } }

/* pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 54px;
}
@media (max-width: 800px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 28px 30px;
  transition: transform 0.4s ease, border-color 0.4s ease, background 0.4s ease;
}
.pillar:hover { transform: translateY(-4px); border-color: rgba(216, 201, 163, 0.4); background: rgba(216, 201, 163, 0.05); }
.pillar-no {
  font-family: var(--latin);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin: 0 0 14px;
}
.pillar h3 { font-size: 19px; font-weight: 600; letter-spacing: 0.1em; margin: 0 0 14px; }
.pillar p { color: var(--sub); font-size: 13.5px; margin: 0; }

/* timeline */
.timeline {
  list-style: none;
  margin: 60px 0 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, rgba(216, 201, 163, 0.55), rgba(216, 201, 163, 0.08));
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 18px 0 18px 40px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 2px; top: 28px;
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(216, 201, 163, 0.7);
  background: var(--bg);
  box-shadow: 0 0 12px rgba(216, 201, 163, 0.35);
}
.tl-when {
  font-family: var(--latin);
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--gold);
}
.tl-what { color: var(--ink); font-size: 14.5px; }
@media (max-width: 560px) {
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
}

/* news */
.news-list { list-style: none; margin: 20px 0 0; padding: 0; }
.news-empty { color: var(--sub); font-size: 14px; padding: 24px 0; }
.news-item { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.news-item:first-child { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.news-link {
  display: grid;
  grid-template-columns: 130px 150px 1fr 28px;
  gap: 18px;
  align-items: center;
  padding: 26px 8px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.3s ease, padding-left 0.3s ease;
}
.news-link:hover { background: rgba(255, 255, 255, 0.035); padding-left: 16px; }
.news-date { font-family: var(--latin); font-size: 13px; letter-spacing: 0.08em; color: var(--sub); }
.news-cat {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--gold);
  border: 1px solid rgba(216, 201, 163, 0.4);
  border-radius: 999px;
  padding: 3px 12px;
  justify-self: start;
}
.news-title { font-size: 14.5px; line-height: 1.7; }
.news-arrow { font-family: var(--latin); color: var(--sub); transition: transform 0.3s ease, color 0.3s ease; }
.news-link:hover .news-arrow { transform: translateX(4px); color: var(--gold); }
@media (max-width: 640px) {
  .news-link { grid-template-columns: 1fr 28px; }
  .news-date, .news-cat { grid-column: 1; justify-self: start; display: inline-block; }
  .news-cat { justify-self: start; }
  .news-title { grid-column: 1; }
  .news-arrow { grid-row: 2; }
}

/* partners */
.partners { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 50px; }
@media (max-width: 800px) { .partners { grid-template-columns: 1fr; } }
.partner {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 30px;
  background: var(--panel);
}
.partner-name {
  font-family: var(--latin);
  font-size: 16px;
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  color: var(--ink);
}
.partner-desc { color: var(--sub); font-size: 13.5px; margin: 0; }
.partners-note { color: var(--sub); font-size: 12px; margin-top: 26px; }

/* footer */
.footer { padding: clamp(90px, 13vw, 150px) 0 40px; text-align: center; }
.footer .lead { margin: 0 auto 34px; }
.footer-actions { margin-bottom: 70px; }
.footer-info { color: var(--sub); font-size: 12.5px; line-height: 2.1; }
.footer-note { font-size: 11.5px; opacity: 0.75; }
.footer-credit { font-size: 10.5px; opacity: 0.45; font-family: var(--latin); letter-spacing: 0.04em; }
.footer-bottom {
  margin-top: 60px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.footer-bottom img { opacity: 0.6; }
.footer-bottom small { color: var(--sub); font-family: var(--latin); font-size: 11px; letter-spacing: 0.14em; }

/* ---------- article reader overlay ---------- */
.reader {
  position: fixed;
  inset: 0;
  z-index: 60;
}
.reader[hidden] { display: none; }
.reader-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 11, 0.82);
  backdrop-filter: blur(6px);
}
.reader-panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: clamp(20px, 6vh, 70px) 20px 90px;
}
.reader-body {
  max-width: 720px;
  margin: 0 auto;
  background: rgba(10, 14, 26, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  padding: clamp(28px, 5vw, 56px);
  animation: reader-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes reader-in {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
.reader-close {
  position: fixed;
  top: 22px; right: 26px;
  z-index: 5;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 14, 26, 0.8);
  color: var(--ink);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
}
.reader-close:hover { background: rgba(216, 201, 163, 0.2); border-color: var(--gold); }
.reader-meta { display: flex; gap: 16px; align-items: center; margin: 0 0 16px; }
.reader-date { font-family: var(--latin); font-size: 13px; letter-spacing: 0.1em; color: var(--sub); }
.reader-cat {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--gold);
  border: 1px solid rgba(216, 201, 163, 0.4);
  border-radius: 999px;
  padding: 3px 12px;
}
.reader-title { font-size: clamp(21px, 3.6vw, 28px); font-weight: 600; line-height: 1.7; letter-spacing: 0.05em; margin: 0 0 30px; }

/* markdown body */
.md { color: #cfd5e1; font-size: 14.5px; }
.md h2 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.06em;
  margin: 52px 0 18px;
  padding-left: 14px;
  border-left: 2px solid rgba(216, 201, 163, 0.6);
}
.md h3 { font-size: 16px; color: var(--ink); font-weight: 500; margin: 36px 0 14px; }
.md p { margin: 0 0 20px; }
.md ul { margin: 0 0 20px; padding-left: 8px; list-style: none; }
.md li { padding-left: 20px; position: relative; margin-bottom: 10px; }
.md li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.72em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(216, 201, 163, 0.65);
}
.md strong { color: var(--ink); font-weight: 500; }
.md a { color: var(--gold); }
.md hr { border: none; border-top: 1px solid rgba(255, 255, 255, 0.12); margin: 36px 0; }
.md blockquote {
  margin: 0 0 20px;
  padding: 14px 20px;
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--sub);
}
.md small { color: var(--sub); font-size: 12px; }

/* 管理画面で編集される文言（改行を保持） */
[data-content-key] { white-space: pre-line; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .moon, .capsule, .scroll-cue span { animation: none; }
  html { scroll-behavior: auto; }
}
