/* Matcha — site. Ink-wash (sumi-e) direction, mirroring the app's reactive
   Chinese-ink visual: dark canvas, colour blooming through with ragged, bled
   edges, paper grain, brush strokes and a vermilion seal. */

:root {
  --bg:        #0A0910;
  --bg-2:      #0E0C15;
  --surface:   #14121C;
  --surface-2: #1B1826;
  --border:    #29253360;
  --ink:       #F2ECE0;   /* warm rice-paper white */
  --ink-dim:   #A69FAE;
  --ink-faint: #6A6472;
  --coral:     #EE5A7C;
  --yellow:    #E9BE2E;
  --teal:      #4FC2AE;
  --seal:      #B23A2E;   /* 朱 vermilion */

  --font-display: 'Zen Old Mincho', Georgia, serif;
  --font-body:    'Zen Kaku Gothic New', system-ui, -apple-system, sans-serif;
  --font-mono:    'Space Mono', ui-monospace, 'SF Mono', monospace;

  --maxw: 1000px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
  overflow-x: hidden;
  position: relative;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }

/* ---- Ink-wash canvas + paper --------------------------------------- */

.ink-bg {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -3; pointer-events: none;
}
/* Cheap, subtle "reactive" breath — soft blooms that drift like the app's ink. */
.bloom {
  position: fixed; z-index: -2; pointer-events: none; border-radius: 50%;
  filter: blur(50px); mix-blend-mode: screen;
  animation: breathe 24s ease-in-out infinite;
}
.bloom.b1 { width: 48vw; height: 48vw; left: -10vw; top: -12vw;
  background: radial-gradient(closest-side, rgba(238,90,124,0.18), transparent 70%); }
.bloom.b2 { width: 46vw; height: 46vw; right: -8vw; top: 24vh;
  background: radial-gradient(closest-side, rgba(79,194,174,0.14), transparent 70%);
  animation-duration: 31s; animation-delay: -9s; }
.bloom.b3 { width: 52vw; height: 52vw; left: 20vw; bottom: -20vw;
  background: radial-gradient(closest-side, rgba(233,190,46,0.10), transparent 70%);
  animation-duration: 37s; animation-delay: -4s; }
@keyframes breathe {
  0%,100% { opacity: .55; transform: scale(1) translate(0,0); }
  50%     { opacity: .95; transform: scale(1.1) translate(1.5%, -1.5%); }
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("assets/grain.png");
  background-size: 300px 300px;
  opacity: .05; mix-blend-mode: soft-light;
}
@media (prefers-reduced-motion: reduce) { .bloom { animation: none; } }

/* ---- Brand marks ---------------------------------------------------- */

.wordmark { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; line-height: 1; }
.wordmark .dot { color: var(--coral); }

/* Tricolor rule — painted, with a soft bled edge. */
.rule {
  height: 5px; width: 176px; border-radius: 3px;
  background: linear-gradient(90deg, var(--coral) 0 33.33%, var(--yellow) 33.33% 66.66%, var(--teal) 66.66% 100%);
  filter: url(#brush);
}

.eyebrow {
  font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: 0.32em; font-size: 0.7rem; font-weight: 700; color: var(--coral);
}
.eyebrow .jp { font-family: var(--font-display); letter-spacing: 0.1em; color: var(--ink-dim); }

.title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.95rem, 4.6vw, 3.05rem); line-height: 1.1; letter-spacing: -0.015em;
}
.title em { font-style: italic; color: var(--coral); }

/* Vermilion seal / chop (落款) */
.seal { width: 76px; height: 76px; display: inline-block; filter: url(#brush); }
.seal rect { fill: var(--seal); }
.seal text { fill: #F4ECE0; font-family: var(--font-display); font-weight: 700; }

/* Brush-stroke divider */
.brush { display: block; width: 100%; height: 26px; color: var(--border); }
.brush path { fill: none; stroke: currentColor; stroke-width: 2; filter: url(#brush); }

/* ---- Nav ------------------------------------------------------------ */

header.nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(130%) blur(12px);
  background: rgba(10,9,16,0.66); border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav .brand { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; }
.nav .brand .dot { color: var(--coral); }
.nav nav { display: flex; gap: 28px; align-items: center; }
.nav nav a {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-dim); transition: color .2s;
}
.nav nav a:hover { color: var(--ink); }
@media (max-width: 620px) { .nav nav a.hide-sm { display: none; } }

/* ---- Buttons -------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 14px 26px; border-radius: 4px; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s, color .2s;
}
.btn-primary { background: var(--yellow); color: #1C1600; box-shadow: 0 10px 34px rgba(233,190,46,0.16); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 42px rgba(233,190,46,0.26); }
.btn-ghost { border: 1px solid var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--coral); color: var(--coral); transform: translateY(-2px); }

/* ---- Hero ----------------------------------------------------------- */

.hero { padding: clamp(64px, 11vw, 128px) 0 46px; position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 50px; align-items: center; }
@media (max-width: 840px) { .hero .wrap { grid-template-columns: 1fr; gap: 46px; } }

.hero .lede { position: relative; }
.hero .eyebrow { display: block; margin-bottom: 20px; }
.hero .titlewrap { display: flex; align-items: flex-start; gap: 22px; }
.hero h1 { font-family: var(--font-display); font-weight: 900; font-size: clamp(3.6rem, 12vw, 6rem); line-height: 0.9; letter-spacing: -0.02em; }
.hero h1 .dot { color: var(--coral); }
.hero .seal { margin-top: 10px; flex: none; }
.hero .rule { margin: 24px 0 22px; }
.hero .tagline { font-family: var(--font-display); font-style: italic; font-size: clamp(1.3rem, 3vw, 1.65rem); }
.hero .tagline b { color: var(--coral); font-style: normal; font-weight: 700; }
.hero .sub { color: var(--ink-dim); margin: 18px 0 32px; max-width: 40ch; }
.hero .cta-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero .store-note { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; color: var(--ink-faint); text-transform: uppercase; }

/* vertical kana rail */
.vrail {
  position: absolute; top: 4px; right: -6px;
  writing-mode: vertical-rl; font-family: var(--font-display);
  font-size: 0.82rem; letter-spacing: 0.5em; color: var(--ink-faint);
}
@media (max-width: 1120px) { .vrail { display: none; } }

/* Phone — framed like a quiet object, ink glow behind */
.device {
  justify-self: center; position: relative;
  width: min(300px, 78vw); border-radius: 44px; padding: 9px;
  background: linear-gradient(160deg, #221E2C, #0E0C15);
  border: 1px solid var(--border);
  box-shadow: 0 44px 100px rgba(0,0,0,0.6);
}
.device::before {
  content: ""; position: absolute; inset: -14%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(238,90,124,0.22), transparent 72%);
  filter: blur(12px);
}
.device img { width: 100%; display: block; border-radius: 37px; }

/* value chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.chip {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-dim);
  border: 1px solid var(--border); border-radius: 3px; padding: 8px 14px;
}
.chip b { color: var(--teal); font-weight: 700; }

/* ---- Manifesto strip ------------------------------------------------ */

.manifesto { padding: clamp(20px,5vw,44px) 0; }
.manifesto .wrap { max-width: 760px; }
.manifesto p {
  font-family: var(--font-display); font-size: clamp(1.25rem, 2.8vw, 1.7rem);
  line-height: 1.6; color: var(--ink);
}
.manifesto .dim { color: var(--ink-faint); }

/* ---- Sections ------------------------------------------------------- */

section { padding: clamp(56px, 9vw, 100px) 0; }
.section-head { max-width: 660px; margin-bottom: 46px; }
.section-head .eyebrow { display: block; margin-bottom: 18px; }
.section-head p { color: var(--ink-dim); margin-top: 14px; }

/* ---- Features: editorial numbered rows (no icons) ------------------- */

.feature {
  display: grid; grid-template-columns: 132px 1fr; gap: 34px;
  align-items: baseline; padding: 34px 0;
}
.feature + .feature { border-top: 1px solid var(--border); }
.feature .num {
  font-family: var(--font-display); font-weight: 700; font-size: 4.4rem;
  line-height: 0.8; color: var(--ink); filter: url(#brush); user-select: none;
}
/* section-head is the first child, so features are nth-child 2–5 */
.feature:nth-child(2) .num { color: var(--coral); }
.feature:nth-child(3) .num { color: var(--yellow); }
.feature:nth-child(4) .num { color: var(--teal); }
.feature:nth-child(5) .num { color: var(--coral); }
.feature .en { display: block; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-faint); margin-top: 12px; }
.feature h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; margin-bottom: 8px; }
.feature p { color: var(--ink-dim); max-width: 54ch; }
@media (max-width: 640px) {
  .feature { grid-template-columns: 1fr; gap: 8px; }
  .feature .num { font-size: 3.2rem; }
}

/* ---- Packs ---------------------------------------------------------- */

.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; }
.pack {
  border-radius: 6px; padding: 18px 16px; min-height: 118px;
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative; overflow: hidden; isolation: isolate;
}
.pack::after { /* ink grain over each tile so they read painted, not glossy */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: url("assets/grain.png"); background-size: 200px;
  opacity: .12; mix-blend-mode: overlay;
}
.pack .jp { font-family: var(--font-display); font-size: 0.86rem; color: rgba(255,255,255,0.82); }
.pack .en { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; color: #fff; }
.pack .meta { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; color: rgba(255,255,255,0.6); margin-top: 5px; }

/* ---- Split ---------------------------------------------------------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.split.rev .device { order: 2; }
@media (max-width: 840px) { .split { grid-template-columns: 1fr; gap: 38px; } .split.rev .device { order: 0; } }
.split .device { width: min(272px, 70vw); }
.split ul { list-style: none; margin-top: 22px; display: grid; gap: 13px; }
.split li { display: flex; gap: 14px; color: var(--ink-dim); }
.split li::before { content: ""; flex: none; width: 9px; height: 9px; margin-top: 9px; border-radius: 50% 50% 50% 0; background: var(--coral); filter: url(#brush); }

/* ---- Contact -------------------------------------------------------- */

.contact { text-align: center; }
.contact .seal { margin: 0 auto 20px; display: block; }
.contact .title { margin-bottom: 14px; }
.contact p { color: var(--ink-dim); max-width: 44ch; margin: 0 auto 24px; }
.mail {
  font-family: var(--font-mono); font-size: clamp(1rem, 3.4vw, 1.3rem);
  color: var(--yellow); letter-spacing: 0.02em; word-break: break-all;
  border-bottom: 1px solid rgba(233,190,46,0.35); padding-bottom: 2px;
}
.mail:hover { border-color: var(--yellow); }

/* ---- Prose (privacy / support) ------------------------------------- */

.prose { max-width: 720px; }
.prose h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; margin: 42px 0 12px; }
.prose h2:first-of-type { margin-top: 8px; }
.prose h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; margin: 24px 0 6px; color: var(--ink); }
.prose p, .prose li { color: var(--ink-dim); margin-bottom: 12px; }
.prose ul { padding-left: 22px; margin-bottom: 12px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a:not(.btn) { color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; }
.updated { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--ink-faint); text-transform: uppercase; }

.qa { border-top: 1px solid var(--border); padding: 22px 0; }
.qa:last-of-type { border-bottom: 1px solid var(--border); }
.qa .q { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; margin-bottom: 6px; }
.qa .a { color: var(--ink-dim); }

/* ---- Footer --------------------------------------------------------- */

footer.foot { border-top: 1px solid var(--border); padding: 44px 0 64px; margin-top: 40px; }
footer.foot .wrap { display: flex; flex-wrap: wrap; gap: 18px 30px; align-items: center; justify-content: space-between; }
footer.foot .brand { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
footer.foot .brand .dot { color: var(--coral); }
footer.foot nav { display: flex; gap: 24px; flex-wrap: wrap; }
footer.foot a, footer.foot span {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint);
}
footer.foot a:hover { color: var(--ink); }

/* Back link — small brush arrow, no glyphs */
.back { display: flex; width: fit-content; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-dim); margin-bottom: 22px; }
.back svg { width: 26px; height: 8px; color: var(--coral); }
.back svg path { fill: none; stroke: currentColor; stroke-width: 1.6; filter: url(#brush); }
.back:hover { color: var(--ink); }

.page-head { padding: clamp(52px, 8vw, 90px) 0 8px; }

/* ---- Guide / manual ------------------------------------------------- */

.lead { max-width: 60ch; color: var(--ink-dim); font-size: 1.06rem; margin-top: 14px; }

.toc { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; max-width: 760px; }
.toc a {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-dim); border: 1px solid var(--border); border-radius: 3px; padding: 7px 12px;
  transition: border-color .2s, color .2s;
}
.toc a:hover { border-color: var(--coral); color: var(--ink); }
.toc a b { color: var(--ink-faint); margin-right: 7px; font-weight: 400; }

.guide-sec { display: grid; grid-template-columns: 132px 1fr; gap: 34px; padding: 46px 0; align-items: start; scroll-margin-top: 84px; }
.guide-sec + .guide-sec { border-top: 1px solid var(--border); }
.guide-sec .num { font-family: var(--font-display); font-weight: 700; font-size: 4.4rem; line-height: 0.8; color: var(--ink); filter: url(#brush); user-select: none; }
.guide-sec .num .en { display: block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); margin-top: 12px; }
.num.c-coral { color: var(--coral); } .num.c-yellow { color: var(--yellow); } .num.c-teal { color: var(--teal); }
.guide-sec .body { min-width: 0; }
.guide-sec h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; margin-bottom: 12px; }
.ky { font-family: var(--font-display); font-weight: 400; font-size: 0.66em; color: var(--ink-faint); margin-left: 0.5em; letter-spacing: 0.12em; }
.guide-sec p { color: var(--ink-dim); margin-bottom: 14px; max-width: 60ch; }
.guide-sec strong { color: var(--ink); font-weight: 700; }
@media (max-width: 640px) { .guide-sec { grid-template-columns: 1fr; gap: 12px; } .guide-sec .num { font-size: 3.2rem; } }

/* ordered steps with painted index */
.steps { list-style: none; counter-reset: s; display: grid; gap: 14px; margin: 4px 0 16px; max-width: 60ch; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 14px; color: var(--ink-dim); }
.steps li::before {
  content: counter(s); font-family: var(--font-display); font-weight: 700; color: var(--coral);
  font-size: 1.15rem; line-height: 1.4; filter: url(#brush);
}

/* plain tick list */
.ticks { list-style: none; display: grid; gap: 12px; margin: 4px 0 16px; max-width: 60ch; }
.ticks li { position: relative; padding-left: 22px; color: var(--ink-dim); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 8px; border-radius: 50% 50% 50% 0; background: var(--teal); filter: url(#brush); }
.ticks b { color: var(--ink); font-weight: 700; }

/* inline UI label chip, e.g. tap [min] then [m7] */
.tag {
  font-family: var(--font-mono); font-size: 0.82em; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 3px; padding: 1px 7px; color: var(--ink); white-space: nowrap;
}

/* note callout */
.note {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--coral);
  border-radius: 0 7px 7px 0; padding: 16px 20px; margin: 18px 0; max-width: 62ch;
}
.note .k { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--coral); display: block; margin-bottom: 6px; }
.note p { margin: 0; color: var(--ink-dim); }

/* inline screenshot figure */
.figure { margin: 22px 0 6px; }
.figure .device { width: min(248px, 62vw); margin: 0; }
.figure figcaption { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; color: var(--ink-faint); margin-top: 12px; text-transform: uppercase; }
