/* ============================================================
   Read in Romaji — Shared Stylesheet
   ============================================================ */

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background-color: #f8f8f7;
  color: #1a1a1a;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

:root {
  --bg:           #f8f8f7;
  --bg-alt:       #ffffff;
  --bg-subtle:    #f1f1ef;
  --border:       #e4e4e1;
  --text:         #1a1a1a;
  --text-muted:   #6b6b6b;
  --text-quiet:   #9a9a9a;
  --accent:       #2563eb;
  --accent-dark:  #1d4ed8;
  --accent-light: #eff6ff;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);
  --radius:       8px;
  --radius-lg:    12px;
  --max-w:        1120px;
  --max-w-text:   660px;
}

/* --- Containers ------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
}

.container--narrow {
  width: 100%;
  max-width: var(--max-w-text);
  margin-inline: auto;
  padding-inline: 24px;
}

/* --- Typography ------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.05rem, 2vw, 1.3rem); }
h4 { font-size: 1rem; }

p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 60ch;
}

.lead {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 54ch;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.eyebrow--with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow__icon {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

.section-intro { margin-bottom: 48px; }
.section-intro h2 { margin-bottom: 12px; }
.section-intro p { max-width: 52ch; }

.center { text-align: center; }
.center p { margin-inline: auto; }

/* --- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}

.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn--primary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.btn--secondary { background: var(--bg-alt); color: var(--text); border-color: var(--border); }
.btn--secondary:hover { border-color: #c0c0bc; background: var(--bg-subtle); }
.btn--secondary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.btn--lg { padding: 13px 26px; font-size: 1rem; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
}

/* --- Header ----------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248,248,247,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 20px;
}

.site-header__wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex-shrink: 0;
}

.site-header__wordmark-icon {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.site-header__wordmark:hover {
  opacity: .9;
}

.site-nav { display: flex; align-items: center; gap: 4px; }

.site-nav a {
  font-size: .875rem;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}

.site-nav a:hover { color: var(--text); background: var(--bg-subtle); }
.site-nav a.active { color: var(--text); font-weight: 500; }

.site-header__cta { flex-shrink: 0; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text);
  border-radius: 6px;
}

.menu-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.menu-toggle svg { display: block; }

/* --- Footer ----------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  background: var(--bg-alt);
  margin-top: 96px;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.site-footer__brand-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.site-footer__brand-icon {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.site-footer__brand-icon-link:hover {
  opacity: .9;
}

.site-footer__wordmark {
  font-size: .92rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
}

.site-footer__brand p {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 8px;
  max-width: 36ch;
  line-height: 1.55;
}

.site-footer__nav { display: flex; gap: 48px; }

.site-footer__col h4 {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-quiet);
  margin-bottom: 12px;
}

.site-footer__col a {
  display: block;
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  transition: color .15s;
}

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

.site-footer__bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer__copy { font-size: .8rem; color: var(--text-quiet); }

/* --- Sections --------------------------------------------- */
.section { padding: 80px 0; }
.section--alt { background: var(--bg-alt); }
.section--subtle { background: var(--bg-subtle); }

/* --- Hero ------------------------------------------------- */
.hero {
  padding: 72px 0 64px;
  background: var(--bg);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero__text .eyebrow { margin-bottom: 16px; }
.hero__title { margin-bottom: 20px; }
.hero__lead { margin-bottom: 0; }

.hero__micro {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.hero__visual { position: relative; }

.hero__screenshot {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  width: 100%;
  background: #fff;
}

/* Mock screenshot */
.mock-screenshot {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: #fff;
  overflow: hidden;
}

.mock-screenshot__bar {
  background: #f0f0ee;
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

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

.mock-screenshot__body { padding: 20px 24px; }

.mock-japanese-line {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.mock-romaji {
  font-size: .7rem;
  color: var(--accent);
  letter-spacing: .04em;
  line-height: 1;
}

.mock-kanji {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 400;
}

.mock-english {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Trust strip ------------------------------------------ */
.trust-strip {
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.trust-strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: .8rem;
  color: var(--text-muted);
  background: var(--bg);
  transition: border-color .15s, color .15s;
}

.pill--link { cursor: pointer; }
.pill--link:hover { border-color: var(--accent); color: var(--accent); }

.trust-strip .sep {
  width: 1px;
  height: 16px;
  background: var(--border);
  flex-shrink: 0;
}

/* --- Cards ------------------------------------------------ */
.card-grid { display: grid; gap: 20px; }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.card--subtle { background: var(--bg-subtle); box-shadow: none; }

.card__icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
  margin-bottom: 16px;
}

.card h3 { margin-bottom: 8px; }
.card p { font-size: .9rem; line-height: 1.6; max-width: none; }

/* --- Steps ------------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.step {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.step h3 { margin-bottom: 8px; }
.step p { font-size: .9rem; max-width: none; }

/* --- Pricing ---------------------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 720px;
  margin-inline: auto;
}

.pricing-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.pricing-card--featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-md);
}

.pricing-card--toggle {
  position: relative;
}

.pricing-card__top {
  position: static;
  margin-bottom: 0;
}

.pricing-card__label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-quiet);
  margin-bottom: 12px;
  display: block;
}


.pricing-card__billing {
  position: absolute;
  top: 28px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  margin-bottom: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-subtle);
  flex-wrap: nowrap;
}

.billing-toggle__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}

.billing-toggle__btn:hover {
  color: var(--text);
}

.billing-toggle__btn.is-active {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.billing-toggle__btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.billing-toggle__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.58rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.pricing-card__note {
  font-size: 0.8rem;
  color: var(--text-quiet);
  margin-top: 12px;
  margin-bottom: 0;
  max-width: none;
  text-align: center;
  line-height: 1.4;
}


.pricing-card--featured .pricing-card__label { color: var(--accent); }

.pricing-card__price {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}

.pricing-card__per {
  font-size: .82rem;
  color: var(--text-quiet);
  margin-bottom: 20px;
}

.pricing-card__list { margin-bottom: 24px; }

.pricing-card__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.45;
}

.pricing-card__list li::before {
  content: "✓";
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

/* Comparison table */
.pricing-table { width: 100%; border-collapse: collapse; margin-top: 48px; }

.pricing-table th,
.pricing-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  color: var(--text-muted);
}

.pricing-table th {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-quiet);
  background: var(--bg-subtle);
}

.pricing-table tr:last-child td { border-bottom: none; }

.pricing-table td:first-child { color: var(--text); }

.pricing-table .check { color: var(--accent); font-weight: 600; }
.pricing-table .dash  { color: var(--border); }

/* --- Screenshots grid ------------------------------------- */
.screenshots-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.screenshot-item__cap {
  font-size: .82rem;
  color: var(--text-quiet);
  margin-top: 10px;
  text-align: center;
}

/* --- FAQ -------------------------------------------------- */
.faq-list { display: flex; flex-direction: column; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  overflow: hidden;
  margin-bottom: 4px;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: .95rem;
  font-weight: 500;
  color: var(--text);
  gap: 16px;
  transition: background .12s;
}

.faq-question:hover { background: var(--bg-subtle); }
.faq-question:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-quiet);
  transition: transform .2s;
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-answer p { padding: 0 22px 20px; font-size: .9rem; line-height: 1.65; max-width: none; }
.faq-item.open .faq-answer { max-height: 500px; }

/* --- CTA section ------------------------------------------ */
.cta-section {
  padding: 80px 0;
  text-align: center;
}

.cta-section h2 { margin-bottom: 14px; }
.cta-section p { margin-inline: auto; max-width: 44ch; }
.cta-section .btn-row { justify-content: center; margin-top: 32px; }

/* --- Page hero (inner pages) ------------------------------ */
.page-hero {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.page-hero h1 { margin-bottom: 14px; }
.page-hero p { max-width: 52ch; }

/* --- Utilities -------------------------------------------- */
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

.text-muted  { color: var(--text-muted); }
.text-quiet  { color: var(--text-quiet); }
.text-accent { color: var(--accent); }

/* Prose */
.prose h2    { margin-top: 40px; margin-bottom: 12px; font-size: 1.25rem; }
.prose h3    { margin-top: 28px; margin-bottom: 8px; font-size: 1.05rem; }
.prose p     { margin-bottom: 16px; max-width: none; }
.prose ul    { margin-bottom: 16px; padding-left: 20px; list-style: disc; }
.prose ul li { margin-bottom: 6px; color: var(--text-muted); font-size: .95rem; }
.prose a     { color: var(--accent); text-decoration: underline; }
.prose a:hover { color: var(--accent-dark); }

/* 404 */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}

.error-page__code {
  font-size: 5rem;
  font-weight: 700;
  letter-spacing: -.05em;
  color: var(--border);
  line-height: 1;
  margin-bottom: 8px;
}

.error-page h1 { margin-bottom: 12px; }
.error-page p { margin-inline: auto; margin-bottom: 32px; }

/* --- Responsive ------------------------------------------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { order: 2; }
  .card-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .steps        { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .site-footer__nav { gap: 32px; }
}

@media (max-width: 640px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 56px; left: 0; right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    box-shadow: var(--shadow-md);
  }

  .site-nav.open { display: flex; }
  .site-nav a { width: 100%; padding: 10px 12px; font-size: .95rem; }
  .site-header__cta { display: none; }
  .menu-toggle { display: block; }
  .hero { padding: 48px 0 40px; }
  .hero__inner { gap: 32px; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
  .card-grid--2,
  .card-grid--3,
  .card-grid--4 { grid-template-columns: 1fr; }
  .pricing-grid  { grid-template-columns: 1fr; }
  .pricing-card__top {
    margin-bottom: 12px;
  }

  .pricing-card__billing {
    position: static;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }

  .billing-toggle__btn {
    justify-content: center;
    flex: 1 1 auto;
  }
  .screenshots-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .section-intro { margin-bottom: 32px; }
  .site-footer__nav { flex-direction: column; gap: 24px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: .85rem;
  font-weight: 500;
  z-index: 999;
  transition: top .1s;
}

.skip-link:focus { top: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
