/* rakugakibeast.com v2 — モダンゲームサイト × ラクガキ(ダーク地にチョーク/クレヨン)
   参考にした定石: フルビューポートのシネマティックヒーロー / 固定ガラスヘッダー /
   常時ウィッシュリストCTA / スクロールリビール / 大判メディア交互配置 /
   ライトボックス / ダーク基調に彩度の高い差し色。 */

:root {
  --bg: #14110e;
  --bg-raise: #1c1814;
  --bg-card: #211c17;
  --line: rgba(243, 236, 221, 0.14);
  --cream: #f3ecdd;
  --muted: #b6aa95;
  --red: #ff5a3c;
  --blue: #5b93ff;
  --gold: #ffb02e;
  --green: #7fc86a;
  --pink: #ff7ab0;
  --font-display: "Dela Gothic One", "Zen Kaku Gothic New", sans-serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Inter", sans-serif;
  --measure: 72rem;
  --header-h: 4.25rem;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--cream);
  background-color: var(--bg);
  /* 黒板の粒子 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 0.95 0 0 0 0 0.85 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23p)'/%3E%3C/svg%3E");
  line-height: 1.9;
  font-size: 1.02rem;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }

/* Dela Gothic One は 400 の単一ウェイト。UA の h1-h3 bold 等が乗ると
   疑似ボールド合成で字がつぶれるため、display 書体は常に 400 で使う */
h1, h2, h3,
.brand, .header-cta, .cta, .hero-tagline, .section-title,
.feature-num, .trailer-frame p, .footer-brand, .notfound h1 {
  font-weight: 400;
}

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.6rem); }

::selection { background: var(--red); color: var(--bg); }

/* ───────── header (fixed glass) ───────── */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: var(--header-h);
  background: rgba(20, 17, 14, 0.55);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.site-header.is-scrolled { background: rgba(20, 17, 14, 0.86); border-color: var(--line); }
.site-header .wrap {
  height: 100%;
  display: flex; align-items: center; gap: 1.1rem;
}
.brand {
  font-family: var(--font-display); font-size: 1.02rem; letter-spacing: 0.02em;
  color: var(--cream); text-decoration: none;
  display: flex; align-items: center; gap: 0.5rem; flex: none;
}
.brand:hover { color: var(--cream); }
.brand svg { width: 30px; height: 30px; }
.site-nav {
  display: flex; align-items: center; gap: 1.25rem;
  margin-left: auto;
  overflow-x: auto; scrollbar-width: none; white-space: nowrap;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-weight: 700; font-size: 0.92rem;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--cream); }
.lang-switch {
  border: 2px solid var(--line); border-radius: 999px;
  padding: 0.18em 0.85em; font-size: 0.82rem !important;
  color: var(--cream) !important;
}
.lang-switch:hover { border-color: var(--cream); }
.header-cta {
  flex: none;
  font-family: var(--font-display); font-size: 0.82rem;
  color: var(--bg) !important; background: var(--gold);
  text-decoration: none; border-radius: 999px;
  padding: 0.5em 1.15em;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.header-cta:hover { transform: translateY(-1px); filter: brightness(1.08); }
.nav-toggle {
  display: none;
  margin-left: auto; flex: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  background: none; border: 2px solid var(--line); border-radius: 10px;
  color: var(--cream); cursor: pointer; padding: 0;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.site-header.nav-open .nav-toggle .icon-menu { display: none; }
.site-header.nav-open .nav-toggle .icon-close { display: block; }

/* ───────── hero (full viewport cinematic) ───────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  text-align: center;
  padding: calc(var(--header-h) + 2rem) 0 0;
  overflow: hidden;
  isolation: isolate;
}
/* 背後の色глow */
.hero::before {
  content: ""; position: absolute; inset: -20% -10%; z-index: -2;
  background:
    radial-gradient(38% 30% at 30% 30%, rgba(91, 147, 255, 0.16), transparent 70%),
    radial-gradient(40% 32% at 70% 26%, rgba(255, 90, 60, 0.15), transparent 70%),
    radial-gradient(30% 26% at 52% 60%, rgba(255, 176, 46, 0.10), transparent 70%);
}
.hero-inner { position: relative; z-index: 2; padding-bottom: clamp(14rem, 30svh, 20rem); }
.hero-logo {
  width: min(640px, 82vw); height: auto; margin: 0 auto;
  filter: drop-shadow(0 10px 34px rgba(0, 0, 0, 0.55));
}
.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.2vw, 2.1rem);
  margin-top: 1.4rem; letter-spacing: 0.04em;
}
.hero-tagline span { display: inline-block; }
.hero-tagline .accent-draw { color: var(--blue); }
.hero-tagline .accent-battle { color: var(--red); }
.hero-lede {
  max-width: 40em; margin: 1.2rem auto 0;
  color: var(--muted); font-size: 0.98rem; text-wrap: pretty;
}
.hero-cta-row {
  display: flex; gap: 1rem; justify-content: center; align-items: center;
  flex-wrap: wrap; margin-top: 2rem;
}
.platform-note { margin-top: 1rem; font-size: 0.85rem; color: var(--muted); letter-spacing: 0.03em; }
/* 最下部のクリーチャー帯 (上端をフェードマスク) */
.hero-band {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 0;
  pointer-events: none;
}
.hero-band img {
  width: 100%; height: clamp(180px, 30svh, 340px); object-fit: cover; object-position: center bottom;
  -webkit-mask-image: linear-gradient(to top, black 62%, transparent 100%);
  mask-image: linear-gradient(to top, black 62%, transparent 100%);
}
.scroll-cue {
  position: absolute; left: 50%; bottom: 1.1rem; transform: translateX(-50%); z-index: 3;
  color: var(--cream); opacity: 0.75; font-size: 1.5rem; text-decoration: none;
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ───────── CTA buttons ───────── */
.cta {
  font-family: var(--font-display); font-size: 1.02rem;
  background: var(--red); color: #fff;
  border: 3px solid var(--cream);
  border-radius: 14px;
  padding: 0.85em 1.9em;
  text-decoration: none; display: inline-block; position: relative;
  transform: rotate(-0.8deg);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.5), 0 14px 34px rgba(255, 90, 60, 0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cta:hover { color: #fff; transform: rotate(0.4deg) translateY(-2px); box-shadow: 0 8px 0 rgba(0, 0, 0, 0.5), 0 18px 40px rgba(255, 90, 60, 0.32); }
.cta.is-soon { cursor: default; }
.cta .soon-badge {
  position: absolute; top: -1.15em; right: -1.2em;
  font-size: 0.6em; letter-spacing: 0.05em;
  background: var(--gold); color: var(--bg);
  border: 2px solid var(--bg); border-radius: 999px;
  padding: 0.3em 0.9em; transform: rotate(7deg);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
}
.btn-ghost {
  font-weight: 800; font-size: 0.95rem;
  color: var(--cream); text-decoration: none;
  border: 2.5px solid var(--line); border-radius: 12px;
  padding: 0.75em 1.5em; background: rgba(243, 236, 221, 0.04);
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.btn-ghost:hover { border-color: var(--cream); color: var(--cream); transform: translateY(-2px); }

/* ───────── sections ───────── */
section { padding: clamp(4rem, 9vw, 7rem) 0 0; }
.section-head { margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.section-eyebrow {
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.28em;
  color: var(--gold); text-transform: uppercase;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.4vw, 2.9rem);
  line-height: 1.35;
  display: inline-block; position: relative; margin-top: 0.3rem;
}
.section-title::after {
  content: "";
  display: block; height: 12px; margin-top: 0.3em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 16' preserveAspectRatio='none'%3E%3Cpath d='M3 10 C 40 2, 70 14, 110 8 S 190 4, 230 10 S 280 12, 297 6' fill='none' stroke='%23ff5a3c' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left / min(280px, 90%) 100%;
}

/* リビール (JSで .in 付与) */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ───────── feature rows (大判交互) ───────── */
.feature-row {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.6rem, 4vw, 3.4rem); align-items: center;
}
.feature-row + .feature-row { margin-top: clamp(3rem, 7vw, 5rem); }
.feature-row:nth-child(even) .feature-media { order: 2; }
.feature-media { position: relative; }
.feature-media img {
  width: 100%; border-radius: 14px;
  border: 3px solid var(--cream);
  transform: rotate(-1deg);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.feature-row:nth-child(even) .feature-media img { transform: rotate(1deg); }
.feature-num {
  position: absolute; top: -1.1rem; left: -1.1rem; z-index: 2;
  font-family: var(--font-display); font-size: 1rem;
  width: 2.6em; height: 2.6em;
  display: flex; align-items: center; justify-content: center;
  color: var(--bg); background: var(--gold);
  border: 3px solid var(--bg);
  border-radius: 52% 48% 44% 56% / 48% 56% 44% 52%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.feature-num.fn-blue { background: var(--blue); color: #fff; }
.feature-num.fn-gold { background: var(--gold); color: var(--bg); }
.feature-num.fn-red { background: var(--red); color: #fff; }
.feature-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.8rem);
  line-height: 1.45; margin-bottom: 0.7rem;
}
.feature-copy p { color: var(--muted); font-size: 0.98rem; }

/* サブ特徴 (小さめ2列) */
.subfeatures {
  margin-top: clamp(3rem, 7vw, 4.5rem);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.2rem;
}
.subfeature {
  background: var(--bg-card);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 1.3rem 1.4rem;
}
.subfeature h3 { font-family: var(--font-display); font-size: 1.02rem; margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.55rem; }
.subfeature .dot { width: 0.6em; height: 0.6em; flex: none; border-radius: 52% 48% 44% 56% / 48% 56% 44% 52%; background: var(--green); }
.subfeature:nth-child(2) .dot { background: var(--pink); }
.subfeature p { color: var(--muted); font-size: 0.92rem; }

/* ───────── creature marquee ───────── */
.marquee {
  margin-top: clamp(3.4rem, 7vw, 5rem);
  overflow: hidden; padding: 1.2rem 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.marquee-track { display: flex; gap: clamp(2.4rem, 6vw, 4.5rem); width: max-content; animation: marquee 30s linear infinite; }
.marquee-track svg { width: clamp(56px, 8vw, 84px); height: auto; flex: none; opacity: 0.95; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ───────── trailer slot ───────── */
.trailer-frame {
  position: relative; aspect-ratio: 16 / 9;
  border: 3px dashed var(--line); border-radius: 16px;
  display: grid; place-items: center; text-align: center;
  color: var(--muted); background: var(--bg-raise);
}
.trailer-frame .play {
  width: 84px; height: 84px; margin: 0 auto 1rem;
  border: 3px solid var(--muted); border-radius: 50%;
  display: grid; place-items: center; font-size: 1.6rem;
}
.trailer-frame p { font-family: var(--font-display); font-size: 1rem; }

/* ───────── gallery + lightbox ───────── */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; }
.shot {
  display: block; padding: 0; cursor: zoom-in;
  border: 2.5px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--bg-card);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.shot:hover { transform: translateY(-4px); border-color: var(--cream); }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lightbox { border: none; border-radius: 14px; padding: 0; background: var(--bg); max-width: min(1100px, 94vw); }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox img { width: 100%; height: auto; display: block; }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 1rem; color: var(--muted); font-size: 0.9rem; }
.lightbox-close { background: none; border: 2px solid var(--line); color: var(--cream); border-radius: 999px; padding: 0.3em 1em; font: inherit; cursor: pointer; }
.lightbox-close:hover { border-color: var(--cream); }

/* ───────── news ───────── */
.news-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.news-card {
  display: block; text-decoration: none;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.2rem 1.3rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.news-card:hover { transform: translateY(-3px); border-color: var(--cream); }
.news-date {
  display: inline-block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em;
  color: var(--bg); background: var(--gold);
  border-radius: 999px; padding: 0.1em 0.75em; margin-bottom: 0.6rem;
  font-variant-numeric: tabular-nums;
}
.news-card h3 { color: var(--cream); font-size: 1.02rem; font-weight: 700; line-height: 1.6; }
.news-more { margin-top: 1.2rem; font-weight: 700; }

/* ───────── release table ───────── */
.release-table { border-collapse: collapse; min-width: min(36rem, 100%); }
.release-table th, .release-table td {
  text-align: left; padding: 0.6rem 1.2rem 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.96rem; vertical-align: top;
}
.release-table th { color: var(--muted); font-weight: 800; white-space: nowrap; }

/* ───────── article / press / contact ───────── */
.page-main { padding-top: var(--header-h); }
.article { max-width: 47em; }
.article h2 { font-family: var(--font-display); font-size: 1.3rem; margin: 2.6rem 0 0.7rem; }
.article h2:first-child { margin-top: 0; }
.article p { color: var(--muted); }
.article p + p { margin-top: 0.9em; }
.article .news-date { margin-bottom: 0.8rem; }
.press-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; margin-top: 1.2rem; }
.press-grid figure { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg-card); }
.press-grid figcaption { font-size: 0.8rem; font-weight: 700; padding: 0.5em 0.9em; border-top: 1px solid var(--line); color: var(--muted); }

/* contact form */
.contact-form { max-width: 40em; display: grid; gap: 1.1rem; }
.contact-form label { display: grid; gap: 0.35rem; font-weight: 700; font-size: 0.92rem; }
.contact-form .req { color: var(--red); }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit; color: var(--cream);
  background: var(--bg-card);
  border: 2px solid var(--line); border-radius: 10px;
  padding: 0.65em 0.9em;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--blue);
}
.contact-form textarea { min-height: 10em; resize: vertical; }
.contact-form .hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form button {
  justify-self: start; cursor: pointer;
  font-family: var(--font-display); font-size: 0.98rem;
  color: #fff; background: var(--red);
  border: 3px solid var(--cream); border-radius: 12px;
  padding: 0.75em 1.9em;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.5);
  transition: transform 0.12s ease;
}
.contact-form button:hover { transform: translateY(-2px); }
.contact-form button:disabled { opacity: 0.6; transform: none; cursor: wait; }
.form-status { font-weight: 700; }
.form-status.ok { color: var(--green); }
.form-status.err { color: var(--red); }
.contact-note { color: var(--muted); font-size: 0.9rem; margin-top: 2rem; }

/* ───────── footer ───────── */
.footer-cta {
  margin-top: clamp(4rem, 9vw, 7rem);
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 7vw, 5rem) 0;
  text-align: center;
  background:
    radial-gradient(50% 60% at 50% 0%, rgba(255, 90, 60, 0.10), transparent 70%);
}
.footer-cta h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 3.6vw, 2.4rem); margin-bottom: 1.6rem; }
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem 0 2.6rem;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--cream); }
.footer-cols { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; }
.footer-brand { font-family: var(--font-display); color: var(--cream); font-size: 1rem; }
.footer-nav { display: flex; gap: 1.3rem; flex-wrap: wrap; font-size: 0.9rem; font-weight: 700; }
.footer-note { margin-top: 1.5rem; font-size: 0.78rem; }

/* ───────── misc ───────── */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--cream); color: var(--bg); padding: 0.6em 1em; z-index: 60; }
.skip-link:focus { left: 0.5rem; top: 0.5rem; }
.notfound { text-align: center; padding: 8rem 1rem 6rem; }
.notfound h1 { font-family: var(--font-display); font-size: clamp(2.4rem, 9vw, 5rem); }
.notfound p { margin-top: 1rem; color: var(--muted); }

@media (max-width: 760px) {
  .feature-row { grid-template-columns: 1fr; }
  .feature-row:nth-child(even) .feature-media { order: 0; }
  .feature-num { top: -0.9rem; left: 0.4rem; }
  .hero-cta-row { flex-direction: column; }
  .header-cta { display: none; }
  /* モバイルnav: ヘッダー下のドロップダウンパネル (toggleで開閉)。
     header 自体が backdrop-filter で containing block になるため、
     fixed ではなく header 基準の absolute で全幅に張る */
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    display: none;
    flex-direction: column; align-items: stretch; gap: 0;
    margin: 0; padding: 0.3rem 1.4rem 1.1rem;
    background: #171310;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45);
    white-space: normal; overflow: visible;
  }
  .site-header.nav-open .site-nav { display: flex; }
  .site-nav a {
    font-size: 1.02rem; padding: 0.8em 0.2em;
    border-bottom: 1px dashed rgba(243, 236, 221, 0.14);
  }
  .site-nav a.lang-switch {
    align-self: flex-start; margin-top: 0.8rem;
    padding: 0.3em 1.1em; border-bottom: none;
  }
  .platform-note span { white-space: nowrap; display: inline-block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  .scroll-cue { animation: none; }
  .cta, .btn-ghost, .shot, .news-card, .header-cta { transition: none; }
}
