/* Rase — shared styles (rase.jp / mod.rase.jp)
   Default: dark (near-black indigo) + mint. Light is opt-in via the toggle.
   Flat colours only. Motion respects prefers-reduced-motion. */
:root {
  --bg: #0E0D1B;
  --panel: #17152B;
  --text: #F4F3FF;
  --sub: #BDB9DC;
  --line: #2B2850;
  --accent: #4FD1C5;
  --accent-ink: #4FD1C5;
  --btn-text: #0E0D1B;
  --danger: #FF6B6B;
}
:root[data-theme="light"] {
  --bg: #F4F3FF;
  --panel: #FFFFFF;
  --text: #1E1B3A;
  --sub: #4A4670;
  --line: #CFCBEB;
  --accent-ink: #086158;
  --btn-text: #1E1B3A;
  --danger: #B42318;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  animation: page-in .5s ease both;
}
a { color: var(--accent-ink); }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 40px; }

/* scroll progress */
.progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 60;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
}

/* header / footer */
.site-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; flex-wrap: wrap; border-bottom: 1px solid var(--line);
}
.brand { color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand small { display: block; font-size: .8rem; font-weight: 400; color: var(--sub); }
.head-actions { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.head-actions a {
  color: var(--text); text-decoration: none; font-size: .95rem; padding: 2px 0;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 0 2px;
  transition: background-size .25s ease, color .2s;
}
.head-actions a:hover, .head-actions a[aria-current="page"] { background-size: 100% 2px; color: var(--accent-ink); }
.theme-btn {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .85rem; cursor: pointer;
  transition: border-color .2s;
}
.theme-btn:hover { border-color: var(--accent); }

.site-foot { border-top: 1px solid var(--line); margin-top: 16px; padding: 28px 0 40px; color: var(--sub); font-size: .9rem; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* bottom navigation (phones) */
.bottom-nav { display: none; }

/* sections */
.block { padding: 64px 0; border-top: 1px solid var(--line); }
.split { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
.split > header { max-width: 720px; }
.split > header h2 { margin-top: 8px; }
.split > header p { margin-top: 12px; }

.label {
  font-size: .8rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-ink);
}
h1, h2, h3 { line-height: 1.3; margin: 0; }
h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.muted { color: var(--sub); }
.small { font-size: .9rem; }

/* hero */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: end; padding: 80px 0 56px; }
.hero.stack { display: block; }
.hero h1 { font-size: clamp(4rem, 12vw, 8rem); letter-spacing: -.03em; line-height: 1; }
.hero h1 .ch { display: inline-block; animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.hero h1 .ch.dot-ch { color: var(--accent); }
.hero .lead { font-size: 1.25rem; margin-bottom: 20px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* marquee */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
.marquee-track { display: inline-flex; animation: marquee 32s linear infinite; }
.marquee-group { display: inline-flex; gap: 48px; padding: 14px 24px; color: var(--sub); font-weight: 700; letter-spacing: .08em; }
.marquee-group i { font-style: normal; color: var(--accent); }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* buttons & links */
.btn {
  display: inline-block; background: var(--accent); color: var(--btn-text);
  padding: 12px 20px; border-radius: 8px; text-decoration: none; font-weight: 700;
  transition: transform .2s ease, filter .2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.text-link { font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* cards */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px;
  transition: transform .25s ease, border-color .25s ease;
}
a.card:hover, .card.hoverable:hover { transform: translateY(-4px); border-color: var(--accent); }
.cards { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.grid2 { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
.card .num { font-size: .8rem; color: var(--accent-ink); font-weight: 700; letter-spacing: .14em; }
.card .arrow { display: inline-block; transition: transform .25s ease; }
a.card:hover .arrow { transform: translateX(6px); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: .8rem; padding: 3px 10px; border-radius: 6px; border: 1px solid var(--line); color: var(--sub); }

/* status (minecraft.js writes .online-dot / .offline-dot) */
.status { display: flex; align-items: center; flex-wrap: wrap; gap: .3em .6em; font-weight: 700; }
.online-dot, .dot { width: .6em; height: .6em; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: .45em; animation: pulse 2s ease-out infinite; }
.offline-dot, .dot.off { background: var(--danger); animation: none; }

/* timeline */
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.tl { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.tl time { display: block; font-weight: 700; font-size: 1.2rem; color: var(--accent-ink); margin-bottom: 8px; }
.tl time span { display: block; font-weight: 400; color: var(--sub); font-size: .9rem; }
.tl.future time { color: var(--sub); }
.tl.blank { background: transparent; border-style: dashed; }

/* link list */
.linklist { display: grid; gap: 10px; }
.linklist a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 18px; text-decoration: none; color: var(--text);
  transition: transform .2s ease, border-color .2s ease;
}
.linklist a:hover { border-color: var(--accent); transform: translateX(4px); }
.linklist span { color: var(--sub); font-size: .9rem; }

/* log */
.log-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.log-item { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.log-item b { color: var(--accent-ink); font-size: 1.05rem; }
.log-item span { display: block; color: var(--sub); font-size: .85rem; }

/* ads */
.ad-slot { border: 1px dashed var(--line); border-radius: 14px; padding: 16px; text-align: center; }
.ad-sp { display: none; }

/* scroll reveal (only hidden when JS is running) */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal[data-d="1"] { transition-delay: .08s; }
.js .reveal[data-d="2"] { transition-delay: .16s; }
.js .reveal[data-d="3"] { transition-delay: .24s; }
.js .reveal[data-d="4"] { transition-delay: .32s; }

@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(60%); } to { opacity: 1; transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(79, 209, 197, .55); }
  70%, 100% { box-shadow: 0 0 0 .6em rgba(79, 209, 197, 0); }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* responsive */
@media (max-width: 960px) {
  body { font-size: 16px; padding-bottom: 72px; }
  .wrap { padding: 0 20px; }
  .split, .hero { grid-template-columns: 1fr; gap: 24px; }
  .split { gap: 20px; }
  .cards, .cards-4, .cards-2, .grid2 { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .log-item { grid-template-columns: 1fr; gap: 4px; }
  .block { padding: 44px 0; }
  .hero { padding: 48px 0 36px; }
  .head-actions a { display: none; }
  .ad-pc { display: none; }
  .ad-sp { display: block; }

  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    background: var(--panel); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav a {
    flex: 1; text-align: center; padding: 12px 4px; font-size: .78rem; font-weight: 700;
    color: var(--sub); text-decoration: none;
  }
  .bottom-nav a[aria-current="page"] { color: var(--accent-ink); box-shadow: inset 0 3px 0 var(--accent); }
}
@media (min-width: 961px) and (max-width: 1100px) {
  .timeline { grid-template-columns: repeat(3, 1fr); }
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
