@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@400;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

:root {
  --bg: #ffffff;
  --bg-tint: #eafcfd;
  --cyan: #12c4d8;
  --cyan-deep: #0a8b9c;
  --ink: #141c1e;
  --ink-soft: #57696b;
  --maroon: #7c2b2b;
  --maroon-tint: #fbeeee;
  --line: #cdeef1;
  --max: 1120px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Zen Kaku Gothic New', 'Space Grotesk', sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; }

/* ---- header ---- */
header.site { border-bottom: 1px solid var(--line); }

.nav-row { display: flex; align-items: stretch; flex-wrap: wrap; }

.nav-row .logo {
  display: flex;
  align-items: center;
  padding: 30px 42px;
  font-family: 'Shippori Mincho', serif;
  font-weight: 700;
  font-size: 2.15rem;
  color: var(--cyan-deep);
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.nav-row .logo .en { font-family: 'Space Grotesk', sans-serif; margin-left: 4px; }

.nav-links { display: flex; flex-wrap: wrap; flex: 1; }

.nav-links a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 17px 38px;
  border-right: 1px solid var(--line);
  transition: background .15s ease, color .15s ease;
}
.nav-links a .jp { font-family: 'Shippori Mincho', serif; font-weight: 600; color: var(--cyan-deep); font-size: 1.55rem; }
.nav-links a .en { font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; color: var(--cyan-deep); opacity: .7; letter-spacing: .01em; }
.nav-links a:hover { background: var(--bg-tint); }
.nav-links a.current { background: var(--bg-tint); }
.nav-links a.jieido .jp { color: var(--maroon); }
.nav-links a.jieido .en { font-family: 'Shippori Mincho', serif; color: var(--maroon); }
.nav-links a.jieido:hover, .nav-links a.jieido.current { background: var(--maroon-tint); }

/* ---- hero (top page only) ---- */
.hero { padding: 30px 0 0; }

.hero-stage {
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 1920 / 620;
}

.hero-line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }

.seg { position: absolute; background: var(--cyan); z-index: 0; }
/* 横線(左): canvas y=426, x=0→807 */
.seg-a { left: 0; width: 41.77%; top: 47.26%; height: 3px; }
/* 縦線: canvas x=802, y=413→512 */
.seg-b { left: 41.77%; top: 47.26%; height: 15.97%; width: 3px; }
/* 横線(右): canvas y=512, x=802→1644 で切る */
.seg-c { left: 41.77%; width: 43.85%; top: 63.23%; height: 3px; }

.hero-t {
  position: absolute;
  z-index: 2;
  font-family: 'Shippori Mincho', serif;
  font-weight: 700;
  color: var(--cyan-deep);
  padding: 1px 6px;
  white-space: nowrap;
  font-size: clamp(18px, 3.84vw, 80px);
  line-height: 1.1;
}
.t1 { left: -0.52%; top: 33.6%; letter-spacing: -0.106em; }
.t2 { left: 2.3%;   top: 49.4%; letter-spacing: -0.021em; }
.t3 { left: 55.8%;  top: 49.0%; letter-spacing: -0.004em; }
.t4 { left: 55.5%;  top: 64.8%; letter-spacing: -0.106em; }

.lcs-tag {
  position: absolute;
  z-index: 1;
  left: 85.68%;
  top: 63.5%;
  transform: translateY(-50%);
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: var(--bg);
  padding: 1px 0 1px 6px;
  color: var(--cyan-deep);
  transition: opacity .15s ease;
}
.lcs-tag:hover { opacity: .65; }
.lcs-tag .arrow { font-family: 'Shippori Mincho', serif; font-weight: 700; font-size: clamp(18px, 3.84vw, 80px); line-height: 1; }
.lcs-tag .lcs-inner { display: flex; flex-direction: column; line-height: 1.15; font-family: 'Shippori Mincho', serif; font-weight: 700; font-size: clamp(14px, 2.2vw, 46px); white-space: nowrap; }

.tagline-stage { width: 100%; padding: 1.2vw 16px 60px; margin-top: -4.75vw; display: flex; justify-content: center; }
.tagline { text-align: center; transform: translateX(-7.97vw); }
.tagline .jp { font-family: 'Shippori Mincho', serif; font-weight: 700; font-size: clamp(30px, 4.8vw, 84px); color: var(--cyan-deep); }
.tagline .credit { display: block; margin-top: 12px; font-family: 'Shippori Mincho', serif; font-weight: 700; font-size: clamp(16px, 2.3vw, 32px); color: var(--cyan-deep); opacity: .7; }

/* ---- project list (top page) ---- */
.projects { padding: 60px 0 90px; }
.projects h2 { font-family: 'Shippori Mincho', serif; font-weight: 700; font-size: 1.2rem; margin: 0 0 6px; color: var(--cyan-deep); }
.project-list { border-top: 1px solid var(--line); }

.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 4px;
  border-bottom: 1px solid var(--line);
  transition: background .15s ease;
}
.project-row:hover { background: var(--bg-tint); }
.project-row.jieido:hover { background: var(--maroon-tint); }
.project-row .name .jp { font-family: 'Shippori Mincho', serif; font-weight: 600; font-size: 1.3rem; color: var(--cyan-deep); }
.project-row .name .en { font-family: 'Space Grotesk', sans-serif; font-size: .85rem; color: var(--cyan-deep); opacity: .75; margin-left: 10px; }
.project-row.jieido .name .jp { color: var(--maroon); }
.project-row.jieido .name .en { color: var(--maroon); opacity: 1; }
.project-row .teaser { font-size: .9rem; color: var(--ink-soft); max-width: 44ch; text-align: right; }

/* ---- sub pages ---- */
.page-head { padding: 68px 0 16px; }
.page-head .jp { font-family: 'Shippori Mincho', serif; font-weight: 700; font-size: 2.4rem; display: block; color: var(--cyan-deep); }
.page-head .en { font-family: 'Space Grotesk', sans-serif; font-size: 1.05rem; color: var(--cyan-deep); opacity: .75; display: block; margin-top: 8px; }
.page-head.jieido .jp { color: var(--maroon); }
.page-head.jieido .en { color: var(--maroon); opacity: 1; font-family: 'Shippori Mincho', serif; font-size: 1.15rem; }
.status-note { font-size: .8rem; color: var(--ink-soft); margin-top: 16px; }

.page-body { padding: 6px 0 70px; max-width: 60ch; }
.page-body p { line-height: 1.95; font-size: 1rem; color: var(--ink); }

.back-link { display: inline-block; margin-top: 26px; padding-bottom: 2px; border-bottom: 1px solid var(--cyan); color: var(--cyan-deep); font-size: .88rem; }
.back-link:hover { color: var(--ink); border-color: var(--ink); }

/* ---- footer ---- */
footer.site { border-top: 1px solid var(--line); padding: 20px 0; font-size: .76rem; color: var(--ink-soft); margin-top: auto; }
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---- 字衞道ページ専用 ---- */
body.jieido-body { background: #f4f1e8; }
body.jieido-body header.site { background: var(--bg); }
body.jieido-body footer.site { border-top-color: #e3ddc9; }

.jieido-main { padding: 8px 20px 0; }

.jieido-stage {
  position: relative;
  width: 100%;
  max-width: 1760px;
  margin: 0 auto;
}
.jieido-stage .page-head { margin-left: 21.3%; padding-top: 24px; }

.j-logo { width: 320px; max-width: 100%; }
.j-logo img { display: block; width: 100%; height: auto; }

.jieido-row {
  display: flex;
  align-items: flex-start;
  padding-top: 10px;
}

.j-left {
  margin-left: 21.3%;
  width: 20.9%;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.j-left .page-body { padding: 0; max-width: none; }

.j-mid {
  margin-left: 6.4%;
  margin-top: -134px;
  width: 25.9%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.j-yt {
  margin: 8px 0 0 21.3%;
  width: 50.7%;
}

.j-right {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 73%;
  right: 3%;
  overflow-y: auto;
}

.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  padding: 20px 32px;
  border: none;
  border-radius: 6px;
  background: #5865f2;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.25rem;
  width: fit-content;
  transition: background .15s ease;
}
.discord-btn:hover { background: #4752c4; }
.discord-icon { width: 26px; height: 26px; flex-shrink: 0; }

.store-buttons { display: flex; flex-direction: column; gap: 18px; }
.store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 22px 30px;
  border: 1px solid var(--ink-soft);
  border-radius: 6px;
  background: #f4f1e8;
  font-weight: 700;
  font-size: 1.3rem;
  width: fit-content;
  transition: background .15s ease, border-color .15s ease;
}
.store-btn:hover { background: #ebe6d6; border-color: var(--ink); }

.x-embed { min-height: 60px; width: 100%; max-width: 100%; overflow: hidden; }
.x-embed .twitter-tweet { margin: 0 !important; max-width: 100% !important; }

.yt-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #00000010;
  border-radius: 4px;
  overflow: hidden;
}
.yt-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.support-note { font-size: .92rem; line-height: 1.9; color: var(--ink); max-width: 62ch; margin: 40px 0; }

@media (max-width: 900px) {
  .jieido-stage .page-head { margin-left: 0; }
  .jieido-row { flex-direction: column; align-items: stretch; gap: 30px; }
  .j-left, .j-mid { margin-left: 0; width: 100%; }
  .j-yt { margin: 30px 0 0; width: 100%; }
  .j-right { position: static; inset: auto; width: 100%; margin-top: 30px; overflow-y: visible; }
}

/* ---- responsive ---- */
@media (max-width: 760px) {
  .nav-row .logo { border-right: none; border-bottom: 1px solid var(--line); width: 100%; }
  .nav-links a { border-right: none; border-bottom: 1px solid var(--line); width: 100%; }
  .hero { padding: 40px 16px 20px; }
  .hero-line, .seg { display: none; }
  .hero-stage { display: flex; flex-direction: column; align-items: center; gap: 20px; aspect-ratio: auto; }
  .hero-t, .lcs-tag { position: static; text-align: center; font-size: 1.6rem !important; }
  .tagline-stage { padding: 30px 16px 40px; }
  .tagline { transform: none; }
  .lcs-tag { flex-direction: column; align-items: center; }
  .lcs-tag .arrow { font-size: 1.6rem !important; }
  .lcs-tag .lcs-inner { align-items: center; font-size: 1rem !important; }
  .project-row { flex-direction: column; align-items: flex-start; }
  .project-row .teaser { text-align: left; max-width: 100%; }
}

/* ---- 寄付ページ ---- */
.donate-box { max-width: 460px; margin: 30px 0 50px; padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-tint); }
.donate-label { font-family: 'Shippori Mincho', serif; font-size: 1rem; margin: 0 0 14px; }
.donate-presets { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.donate-preset { padding: 10px 18px; border: 1px solid var(--ink-soft); border-radius: 6px; background: var(--bg); font-size: .95rem; font-weight: 600; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.donate-preset:hover { border-color: var(--ink); }
.donate-preset.active { background: var(--cyan-deep); border-color: var(--cyan-deep); color: #fff; }
.donate-custom-label { display: block; font-size: .82rem; color: var(--ink-soft); margin-bottom: 6px; }
.donate-custom { width: 100%; padding: 10px 12px; border: 1px solid var(--ink-soft); border-radius: 6px; font-size: 1rem; margin-bottom: 20px; }
.donate-go { display: block; width: 100%; text-align: center; padding: 15px; border: none; border-radius: 6px; background: var(--cyan-deep); color: #fff; font-weight: 700; font-size: 1.05rem; transition: background .15s ease; }
.donate-go:hover { background: #076f7d; }
.donate-note { font-size: .78rem; color: var(--ink-soft); margin: 14px 0 0; }
.about-link-note { margin: 0 0 28px; }
.about-link-note .back-link { margin-top: 0; }
