:root {
  --background: #212121;
  --surface: #171717;
  --card: #2a2a2a;
  --input: #2f2f2f;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #ececec;
  --text-soft: #c5c5c5;
  --text-muted: #8e8e8e;
  --accent: #25a9c9;
  --accent-text: #25eba8;
  --accent-soft: rgba(37, 169, 201, 0.14);
  --accent-border: rgba(37, 169, 201, 0.35);
  /* The blue-to-green gradient from the DictoChat logo. */
  --brand-gradient: linear-gradient(135deg, #2563eb 0%, #25eba8 100%);
  --bad: #ef4444;
  --bad-soft: rgba(239, 68, 68, 0.16);
  --good: #22c55e;
  --good-soft: rgba(34, 197, 94, 0.16);
  --warn: #f59e0b;
  --radius-control: 12px;
  --radius-card: 20px;
  --radius-sheet: 24px;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  --font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 8px;
}

svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-control);
  background: var(--text);
  color: #0d0d0d;
  font-weight: 700;
}

.skip-link:focus {
  top: 16px;
}

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

.container-narrow {
  max-width: 760px;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-control);
  font-size: 15px;
  font-weight: 700;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.button:hover {
  opacity: 0.88;
}

.button-primary {
  background: var(--text);
  color: #0d0d0d;
}

.button-secondary {
  background: var(--input);
  color: var(--text);
  font-weight: 600;
}

.button-small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.button-block {
  display: flex;
  width: 100%;
}

/* Shared text */

.eyebrow {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.muted {
  color: var(--text-muted);
  font-size: 14px;
}

.accent {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

/* Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(33, 33, 33, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  display: block;
  width: auto;
  height: 32px;
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

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

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 88px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0 -8% auto auto;
  width: 720px;
  height: 720px;
  /* closest-side makes each glow reach transparent before the box edge, so it never shows as a square. */
  background:
    radial-gradient(closest-side at 42% 46%, rgba(37, 99, 235, 0.22), transparent),
    radial-gradient(closest-side at 60% 58%, rgba(37, 235, 168, 0.14), transparent);
  filter: blur(24px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 64px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-gradient);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero h1 {
  margin-top: 24px;
  font-size: clamp(40px, 5.6vw, 64px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 540px;
  margin-top: 20px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-note {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.hero-visual {
  position: relative;
  min-height: 600px;
}

/* App mock-ups */

.mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sheet);
  box-shadow: var(--shadow);
}

.mock-entry {
  position: relative;
  width: 88%;
  padding: 16px;
}

.mock-bar {
  display: flex;
  gap: 6px;
  padding: 2px 4px 14px;
}

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

.entry,
.entry-section {
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--card);
  border: 1px solid var(--border);
}

.entry-section {
  margin-top: 12px;
}

.entry-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.entry-word {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 9px;
  border-radius: 50%;
  background: var(--input);
  color: var(--text-soft);
}

.pitch {
  display: flex;
  margin-top: 6px;
  color: var(--accent-text);
  font-size: 20px;
  font-weight: 600;
}

.pitch span {
  padding: 2px 1px 0;
  border-top: 2px solid transparent;
}

.pitch .high {
  border-top-color: var(--accent-text);
}

.pitch .drop {
  border-right: 2px solid var(--accent-text);
}

.romaji {
  color: var(--text-muted);
  font-size: 14px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.tag-accent {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.meaning {
  margin-top: 8px;
  font-size: 16px;
}

.num {
  margin-right: 6px;
  color: var(--text-muted);
  font-weight: 700;
}

.mock-chat {
  position: absolute;
  top: 352px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 72%;
  padding: 18px;
}

.bubble {
  max-width: 92%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.5;
}

.bubble-user {
  align-self: flex-end;
  background: var(--input);
  border-radius: 18px;
}

.bubble-correction {
  align-self: flex-end;
  display: grid;
  gap: 4px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
}

.bubble-correction s {
  color: #fca5a5;
}

.bubble-correction strong {
  color: var(--accent-text);
}

.bubble-correction .muted {
  font-size: 13px;
}

.bubble-assistant {
  align-self: flex-start;
  padding-left: 0;
  color: var(--text);
}

/* Data sources strip */

.sources {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.sources-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.sources p {
  color: var(--text-muted);
  font-size: 14px;
}

.sources ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sources li {
  color: var(--text-soft);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Sections */

.section {
  padding: 112px 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 680px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2,
.spotlight h2,
.cta h2 {
  margin-top: 12px;
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.section-lead {
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 17px;
}

/* Features */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 11px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-text);
}

.feature h3,
.step h3 {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature p,
.step p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 15px;
}

/* Spotlights */

.spotlights {
  display: grid;
  gap: 112px;
}

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

.spotlight-reverse .spotlight-copy {
  order: 2;
}

.spotlight-copy > p:not(.eyebrow) {
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 17px;
}

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

.checks li {
  position: relative;
  padding-left: 30px;
  color: var(--text-soft);
  font-size: 15px;
}

.checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2325eba8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E")
    center / 11px no-repeat;
}

.spotlight-visual {
  display: flex;
  justify-content: center;
}

.mock-scan {
  width: 100%;
  max-width: 440px;
  padding: 16px;
}

.scan-photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 220px;
  border-radius: 16px;
  background:
    linear-gradient(160deg, rgba(37, 99, 235, 0.35), transparent 60%),
    linear-gradient(0deg, #1f2937, #374151);
  overflow: hidden;
}

.scan-photo::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.35), transparent);
}

.scan-token {
  position: relative;
  z-index: 1;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(20, 20, 20, 0.82);
  color: #fff;
  font-size: 22px;
  font-weight: 600;
}

.scan-token-selected {
  border-color: rgba(255, 255, 255, 0.8);
  background: var(--brand-gradient);
}

.scan-popup {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 18px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
}

.scan-popup .button {
  margin-top: 12px;
}

.scan-word {
  font-size: 24px;
  font-weight: 700;
}

.scan-reading {
  margin-left: 6px;
  color: var(--accent-text);
  font-size: 16px;
  font-weight: 600;
}

.mock-card {
  width: 100%;
  max-width: 400px;
  padding: 28px;
  text-align: center;
}

.card-front {
  margin-top: 12px;
  font-size: 56px;
  font-weight: 700;
  line-height: 1.2;
}

.card-divider {
  height: 1px;
  margin: 18px 0;
  background: var(--border);
}

.card-reading {
  color: var(--accent-text);
  font-size: 20px;
  font-weight: 600;
}

.card-meaning {
  margin-top: 4px;
  font-size: 16px;
}

.grades {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 24px;
}

.grade {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-radius: 12px;
  border: 1px solid;
  font-size: 14px;
  font-weight: 700;
}

.grade small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}

.grade-again {
  color: #fca5a5;
  border-color: var(--bad);
  background: var(--bad-soft);
}

.grade-hard {
  color: #fcd34d;
  border-color: var(--warn);
  background: rgba(245, 158, 11, 0.16);
}

.grade-good {
  color: var(--accent-text);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.grade-easy {
  color: #93c5fd;
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.16);
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  padding: 28px;
}

.step-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

/* Pricing */

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 32px;
}

.plan .checks {
  flex: 1;
  align-content: start;
  margin-bottom: 32px;
}

.plan-featured {
  border-color: transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    var(--brand-gradient) border-box;
  box-shadow: var(--shadow);
}

.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan h3 {
  font-size: 20px;
  font-weight: 700;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan-price {
  margin-top: 16px;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.015em;
}

.plan-summary {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 15px;
}

/* FAQ */

.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color 0.15s ease;
}

.faq details[open] {
  border-color: var(--border-strong);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding: 0 24px 22px;
  color: var(--text-soft);
  font-size: 15px;
}

/* Final CTA */

.cta {
  padding: 112px 0;
}

.cta-card {
  position: relative;
  overflow: hidden;
  padding: 72px 32px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}

.cta-card::before {
  content: '';
  position: absolute;
  inset: -60% 20% auto;
  height: 420px;
  background:
    radial-gradient(closest-side at 44% 50%, rgba(37, 99, 235, 0.26), transparent),
    radial-gradient(closest-side at 56% 50%, rgba(37, 235, 168, 0.16), transparent);
  filter: blur(24px);
  pointer-events: none;
}

.cta-card > * {
  position: relative;
}

.cta-card p {
  margin: 16px auto 32px;
  max-width: 480px;
  color: var(--text-soft);
  font-size: 17px;
}

/* Footer */

.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 32px;
}

.footer-brand p {
  max-width: 320px;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.footer-links a {
  color: var(--text-soft);
  font-size: 14px;
}

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

.footer-legal {
  display: grid;
  gap: 6px;
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

/* Responsive */

@media (max-width: 960px) {
  .hero {
    padding: 64px 0;
  }

  .hero-inner,
  .spotlight {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .spotlight-reverse .spotlight-copy {
    order: 0;
  }

  .hero-visual {
    min-height: 0;
    display: grid;
    gap: 16px;
  }

  .mock-entry,
  .mock-chat {
    position: static;
    width: 100%;
  }

  .feature-grid,
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .plans {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
}

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

  .nav-links {
    display: none;
  }

  .nav-inner .button {
    margin-left: auto;
  }

  .section {
    padding: 80px 0;
  }

  .spotlights {
    gap: 80px;
  }

  .feature-grid,
  .steps,
  .plans {
    grid-template-columns: 1fr;
  }

  .section-head {
    margin-bottom: 40px;
  }

  .cta {
    padding: 80px 0;
  }

  .cta-card {
    padding: 56px 24px;
  }
}

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

  * {
    transition: none !important;
  }
}
