/* Kumanga — white Japanese manga style.
   White paper, black ink linework, halftone screentone dots,
   comic-panel frames with hard offset shadows, hanko-red accents. */

:root {
  --paper: #ffffff;
  --paper-warm: #fbfaf7;
  --ink: #141414;
  --ink-soft: #5b5b5b;
  --line: #141414;
  --accent: #d23c2e; /* hanko seal red */
  --radius: 14px;
  --maxw: 980px;
  --doc-maxw: 760px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Zen Maru Gothic", -apple-system, BlinkMacSystemFont,
    "Hiragino Sans", "PingFang TC", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  /* subtle halftone screentone over white paper */
  background-image: radial-gradient(rgba(20, 20, 20, 0.07) 1px, transparent 1.6px);
  background-size: 14px 14px;
  line-height: 1.75;
  min-height: 100vh;
}

a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 24px 22px 80px; }
.wrap.doc-wrap { max-width: var(--doc-maxw); }

/* ---------- header ---------- */

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 900; font-size: 21px; letter-spacing: 0.02em;
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand img.logo {
  width: 46px; height: 46px; border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
}
.brand .kana {
  font-size: 11px; font-weight: 700; color: var(--ink-soft);
  letter-spacing: 0.35em; display: block; line-height: 1.2;
}

nav.site a {
  color: var(--ink); font-weight: 700; font-size: 15px; margin-left: 20px;
  text-decoration: none; border-bottom: 2.5px solid transparent; padding-bottom: 2px;
}
nav.site a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- hero ---------- */

.hero { text-align: center; padding: 48px 0 30px; position: relative; }

.hero .hero-logo {
  width: clamp(120px, 22vw, 168px); height: auto;
  border-radius: 28px;
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  background: var(--paper);
  margin-bottom: 26px;
}

.hero h1 {
  font-size: clamp(34px, 6vw, 56px); line-height: 1.15;
  margin: 0 0 8px; font-weight: 900; letter-spacing: -0.01em;
}
.hero .kana-sub {
  font-size: 14px; font-weight: 700; letter-spacing: 0.5em;
  color: var(--ink-soft); margin: 0 0 18px;
}
.hero p.lead {
  font-size: clamp(16px, 2.4vw, 19px); color: var(--ink-soft);
  max-width: 560px; margin: 0 auto 30px;
}

.btn {
  display: inline-block;
  background: var(--ink); color: var(--paper);
  padding: 14px 30px; border-radius: 999px;
  border: 3px solid var(--ink);
  font-weight: 900; font-size: 16px; text-decoration: none;
  box-shadow: 5px 5px 0 rgba(20, 20, 20, 0.25);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.08s ease;
}
.btn:hover {
  background: var(--accent); border-color: var(--ink); color: #fff;
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(20, 20, 20, 0.3);
}

/* ---------- section titles ---------- */

.section-title { text-align: center; margin: 64px 0 26px; }
.section-title h2 {
  display: inline-block; font-size: clamp(22px, 3.4vw, 30px); font-weight: 900;
  margin: 0; padding: 6px 26px;
  border: 3px solid var(--ink); border-radius: 999px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
}
.section-title .kana {
  display: block; margin-top: 10px; font-size: 12px;
  letter-spacing: 0.4em; color: var(--ink-soft); font-weight: 700;
}

/* ---------- feature panels (manga koma) ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px; margin: 30px 0 10px;
}
.feature {
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: 5px 5px 0 var(--ink);
  position: relative;
}
.feature .ico { font-size: 30px; line-height: 1; }
.feature h3 { margin: 12px 0 6px; font-size: 17px; font-weight: 900; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 14px; }

/* ---------- how it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px; margin: 30px 0 10px;
  counter-reset: step;
}
.step {
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px 22px;
  box-shadow: 5px 5px 0 var(--ink);
  position: relative;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  position: absolute; top: -16px; left: -14px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  font-weight: 900; font-size: 18px;
  border: 3px solid var(--ink); border-radius: 50%;
  box-shadow: 3px 3px 0 var(--ink);
}
.step h3 { margin: 0 0 6px; font-size: 17px; font-weight: 900; }
.step p { margin: 0; color: var(--ink-soft); font-size: 14px; }

/* ---------- speech bubble ---------- */

.bubble {
  position: relative;
  max-width: 620px; margin: 44px auto 0;
  background: var(--paper);
  border: 3px solid var(--ink); border-radius: 26px;
  padding: 24px 30px;
  box-shadow: 5px 5px 0 var(--ink);
  text-align: center;
  font-size: clamp(16px, 2.2vw, 19px); font-weight: 700;
}
.bubble::after {
  content: "";
  position: absolute; bottom: -19px; left: 56px;
  width: 24px; height: 24px;
  background: var(--paper);
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: skewX(36deg) rotate(45deg);
}
.bubble .speaker {
  display: block; margin-top: 8px; font-size: 13px;
  color: var(--ink-soft); font-weight: 700; letter-spacing: 0.2em;
}

/* ---------- legal / doc pages ---------- */

.doc {
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 38px clamp(22px, 5vw, 48px);
  box-shadow: 6px 6px 0 var(--ink);
}
.doc h1 { margin-top: 0; font-size: 30px; font-weight: 900; }
.doc h2 {
  font-size: 19px; margin-top: 34px; font-weight: 900;
  padding-left: 12px; border-left: 5px solid var(--accent);
}
.doc .updated { color: var(--ink-soft); font-size: 14px; margin-top: -6px; }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; }
.doc a { word-break: break-word; }

.backlink {
  display: inline-block; margin-bottom: 18px;
  color: var(--ink); font-weight: 800; text-decoration: none;
}
.backlink:hover { color: var(--accent); }

/* ---------- footer ---------- */

footer.site {
  text-align: center; color: var(--ink-soft); font-size: 13px;
  padding: 40px 22px 50px; max-width: var(--maxw); margin: 40px auto 0;
  border-top: 3px solid var(--ink);
}
footer.site .footer-logo {
  width: 40px; height: 40px; border-radius: 10px;
  border: 2.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  margin-bottom: 12px; background: var(--paper);
}
footer.site a { color: var(--ink); margin: 0 8px; font-weight: 700; }
footer.site a:hover { color: var(--accent); }

@media (max-width: 560px) {
  nav.site a { margin-left: 12px; font-size: 14px; }
  .brand { font-size: 18px; }
}
