@font-face {
  font-family: 'Bricolage Grotesque';
  src: url(fonts/bricolage-latin.woff2) format('woff2');
  font-weight: 400 800;
  font-display: swap;
}

/* Only the two glyphs 鬼読, subset from Noto Serif JP. */
@font-face {
  font-family: 'Oni Doku';
  src: url(fonts/oni-doku.woff2) format('woff2');
  font-weight: 900;
  unicode-range: U+8AAD, U+9B3C;
}

:root {
  /* From the logo: violet gradient, cat ink, ear pink, glasses gold. */
  --violet: #6d4aff;
  --violet-2: #a58bff;
  --ink: #2b1d5c;
  --pink: #ff8fb5;
  --gold: #ffd166;

  --bg: #fbfaff;
  --bg-alt: #f3f0ff;
  --surface: #ffffff;
  --text: #17131f;
  --muted: #5f5870;
  --border: #e4def3;
  --accent: #6d4aff;
  --accent-text: #ffffff;
  --shadow: 0 1px 2px rgb(43 29 92 / 0.06), 0 12px 40px -12px rgb(43 29 92 / 0.28);
  --kanji: rgb(109 74 255 / 0.07);
  --code-bg: #1b1530;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0b17;
    --bg-alt: #151022;
    --surface: #1a1428;
    --text: #f2eefb;
    --muted: #a69dbd;
    --border: #2d2542;
    --accent: #a594ff;
    --accent-text: #120d20;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 20px 60px -16px rgb(0 0 0 / 0.7);
    --kanji: rgb(165 148 255 / 0.06);
    --code-bg: #120d20;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}

h2 {
  font-size: clamp(30px, 4.2vw, 46px);
  margin-bottom: 16px;
}

h3 {
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

p {
  margin: 0 0 16px;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.narrow {
  max-width: 760px;
}

.center {
  text-align: center;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
}

.eyebrow {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 12px;
}

.accent-text {
  background: linear-gradient(100deg, var(--violet-2), var(--violet) 55%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font: 700 16px/1 var(--display);
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px var(--accent);
}

.btn-small {
  padding: 9px 16px;
  font-size: 15px;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  box-shadow: none;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta.center {
  justify-content: center;
}

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font: 800 21px/1 var(--display);
  letter-spacing: -0.02em;
}

.nav nav {
  display: flex;
  gap: 24px;
  margin-right: auto;
}

.nav nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.nav nav a:hover {
  color: var(--text);
}

/* hero */
.hero {
  position: relative;
  padding: 72px 0 96px;
  overflow: hidden;
}

.kanji-bg {
  position: absolute;
  right: -4vw;
  top: -6vw;
  font: 900 min(46vw, 620px) / 1 'Oni Doku', 'Noto Serif CJK JP', 'Hiragino Mincho ProN', serif;
  color: var(--kanji);
  writing-mode: vertical-rl;
  pointer-events: none;
  user-select: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(52px, 7.4vw, 96px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin-bottom: 24px;
}

.lede {
  font-size: 19px;
  color: var(--muted);
  max-width: 460px;
  margin-bottom: 28px;
}

.platforms {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.hero-visual {
  position: relative;
  padding-bottom: 48px;
}

.browser {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.browser-bar,
.code-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.dots {
  display: flex;
  gap: 6px;
}

.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.url {
  flex: 1;
  min-width: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popup-float {
  position: absolute;
  right: -20px;
  bottom: 0;
  width: 30%;
  min-width: 170px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

/* problem */
.problem {
  padding: 24px 0 32px;
  text-align: center;
}

.problem p {
  font-size: clamp(19px, 2.2vw, 23px);
  color: var(--muted);
}

.problem .punch {
  font: 800 clamp(28px, 3.6vw, 40px) / 1.1 var(--display);
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 8px 0 0;
}

/* features */
.feature {
  padding: 96px 0;
}

.alt {
  background: var(--bg-alt);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: center;
}

.split.reverse {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.split.reverse .copy {
  order: 2;
}

.copy > p {
  color: var(--muted);
  font-size: 18px;
}

.checks {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 12px;
}

.checks li {
  position: relative;
  padding-left: 30px;
  color: var(--muted);
}

.checks li b {
  color: var(--text);
}

.checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.5 2.5L13 6.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.more {
  display: inline-block;
  margin-top: 24px;
  font-weight: 600;
  text-decoration: none;
}

.more:hover {
  text-decoration: underline;
}

.shot {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
}

/* keyboard shortcuts */
.keys {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 28px;
  font-size: 14px;
  color: var(--muted);
}

.keys span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-width: 3px;
  color: var(--text);
  font: 700 13px/1 var(--display);
}

/* reader tabs (CSS only) */
.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.tabs input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tabs label {
  padding: 6px 18px;
  border-radius: 999px;
  cursor: pointer;
  font: 700 15px/1.3 var(--display);
  color: var(--muted);
}

.tabs input:checked + label {
  background: var(--accent);
  color: var(--accent-text);
}

.tabs input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.media:has(#tab-novel:checked) .tab-comic,
.media:has(#tab-comic:checked) .tab-novel {
  display: none;
}

/* alerts illustration */
.alerts-visual {
  position: relative;
  min-height: 360px;
  border-radius: 20px;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 15%, rgb(255 255 255 / 0.18), transparent 45%),
    linear-gradient(140deg, var(--violet-2), var(--violet) 55%, var(--ink));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.92);
}

.tb-url {
  flex: 1;
  height: 22px;
  border-radius: 999px;
  background: #ece8f7;
}

.tb-icon {
  position: relative;
}

.tb-icon b {
  position: absolute;
  right: -10px;
  bottom: -8px;
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #e0306f;
  color: #fff;
  font: 700 11px/16px var(--body);
  text-align: center;
}

.toast {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(360px, 88%);
  margin: 40px 0 0 auto;
  padding: 14px 16px;
  border-radius: 14px;
  background: #ffffff;
  color: #17131f;
  box-shadow: 0 18px 40px -12px rgb(20 10 50 / 0.55);
  font-size: 14px;
  line-height: 1.4;
}

.toast img {
  border-radius: 10px;
  flex: none;
}

.toast strong {
  display: block;
  font-family: var(--display);
  font-size: 15px;
}

.toast span {
  color: #5f5870;
}

.toast-2 {
  margin: 14px auto 0 8%;
  transform: rotate(-1.5deg);
}

/* source code sample */
.code {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--code-bg);
  box-shadow: var(--shadow);
  border: 1px solid #2d2542;
}

.code .code-bar {
  background: #221a3a;
  border-color: #2d2542;
  color: #a69dbd;
  font-size: 13px;
}

.code .dots i {
  background: #3a3157;
}

.code pre {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  color: #d9d3ea;
  font: 13.5px/1.7 ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

.code .k {
  color: #b9a8ff;
}

.code .s {
  color: #ffd166;
}

/* privacy */
.privacy {
  padding: 112px 0;
}

.privacy .grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.card {
  padding: 28px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.card svg {
  width: 40px;
  height: 40px;
  padding: 8px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

/* name */
.name {
  padding: 96px 0;
  background: var(--bg-alt);
}

.glyphs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.glyphs span {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.glyphs b {
  display: grid;
  place-items: center;
  width: clamp(104px, 18vw, 150px);
  aspect-ratio: 1;
  border-radius: 28px;
  font: 900 clamp(64px, 11vw, 96px) / 1 'Oni Doku', 'Noto Serif CJK JP', 'Hiragino Mincho ProN', serif;
  color: #fff;
  background: linear-gradient(140deg, var(--violet-2), var(--violet));
  box-shadow: var(--shadow);
}

.glyphs span:last-child b {
  background: linear-gradient(140deg, var(--violet), var(--ink));
}

.glyphs small {
  font: 700 16px/1 var(--display);
  color: var(--muted);
}

.glyphs i {
  font: 800 36px/1 var(--display);
  font-style: normal;
  color: var(--muted);
  margin-bottom: 28px;
}

.name p {
  color: var(--muted);
  font-size: 18px;
}

/* get */
.get {
  padding: 112px 0;
}

.get img {
  margin: 0 auto 24px;
}

.get p {
  color: var(--muted);
  font-size: 18px;
  margin-bottom: 28px;
}

/* footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 48px;
  font-size: 14px;
  color: var(--muted);
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 32px;
  align-items: center;
}

.footer .brand {
  font-size: 18px;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-self: end;
}

.footer nav a {
  color: var(--muted);
  text-decoration: none;
}

.footer nav a:hover {
  color: var(--text);
}

.credits {
  grid-column: 1 / -1;
  margin: 0;
}

.credits a {
  color: inherit;
}

/* responsive */
@media (max-width: 960px) {
  .hero-inner,
  .split,
  .split.reverse {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .split.reverse .copy {
    order: 0;
  }

  .hero {
    padding-top: 48px;
  }

  .privacy .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .wrap {
    padding: 0 16px;
  }

  .nav nav {
    display: none;
  }

  .nav-inner {
    justify-content: space-between;
  }

  .feature,
  .name {
    padding: 72px 0;
  }

  .privacy,
  .get {
    padding: 80px 0;
  }

  .privacy .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .popup-float {
    right: -8px;
    width: 38%;
    min-width: 0;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer nav {
    justify-self: start;
  }
}

/* text pages (privacy policy) */
.doc {
  padding-top: 64px;
  padding-bottom: 96px;
}

.doc h1 {
  font-size: clamp(40px, 6vw, 60px);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.doc h2 {
  font-size: 24px;
  margin: 40px 0 12px;
}

.doc-date {
  color: var(--muted);
  margin-bottom: 32px;
}

.doc ul {
  padding-left: 20px;
  margin: 0 0 16px;
}

.doc li {
  margin-bottom: 8px;
}

.doc li::marker {
  color: var(--accent);
}
