/* Nihonian marketing site. Mobile-first, system fonts, light and dark. */

:root {
  --bg: #f7f5f0;
  --bg-alt: #efece4;
  --surface: #ffffff;
  --ink: #1d1b18;
  --ink-2: #57524a;
  --ink-3: #7b756b;
  --line: #e2ddd3;
  --accent: #c8401a;
  --accent-ink: #ffffff;
  --accent-soft: #fbe5da;
  --accent-deep: #a33010;
  --green: #1f7a4a;
  --green-soft: #dff1e5;
  --red: #b42318;
  --red-soft: #fde7e4;
  --highlight: #ffe08a;
  --seen: #d6dbe5;
  --recognised: #9aa8c6;
  --recalled: #435c95;
  --used: #1f7a4a;
  --bezel: #1d1b18;
  --shadow: 0 1px 2px rgba(29, 27, 24, 0.06), 0 12px 32px rgba(29, 27, 24, 0.08);
  --radius: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-ja: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", Meiryo, sans-serif;
  --wrap: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --bg-alt: #1b1a16;
    --surface: #211f1b;
    --ink: #f2efe8;
    --ink-2: #c4bdb1;
    --ink-3: #9a9388;
    --line: #36322b;
    --accent: #ef6a3c;
    --accent-ink: #1d1b18;
    --accent-soft: #3a2216;
    --accent-deep: #ff8a5c;
    --green: #5cc98a;
    --green-soft: #173525;
    --red: #ff8a7a;
    --red-soft: #3d1a17;
    --highlight: #6b5410;
    --seen: #4a4f5a;
    --recognised: #6f7fa3;
    --recalled: #9db3ea;
    --used: #5cc98a;
    --bezel: #000000;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

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

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

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

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

a {
  color: var(--accent-deep);
}

:lang(ja),
.ja {
  font-family: var(--font-ja);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus {
  left: 8px;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
}
.brand small {
  font-family: var(--font-ja);
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav a:not(.btn) {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.nav a:not(.btn):hover {
  color: var(--ink);
}
@media (max-width: 760px) {
  .nav a:not(.btn) {
    display: none;
  }
  .brand small {
    display: none;
  }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease, background-color 0.15s ease;
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  background: var(--accent-deep);
  color: var(--accent-ink);
}
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--ink-3);
}
.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
  border-radius: 10px;
}

/* ---------- sections ---------- */

section {
  padding: 72px 0;
}
.section-alt {
  background: var(--bg-alt);
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 0 0 12px;
}
h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
h1 {
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 800;
}
h2 {
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 750;
}
h3 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.lead {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--ink-2);
  max-width: 36em;
}
.section-head {
  max-width: 720px;
  margin-bottom: 40px;
}
.section-head p {
  color: var(--ink-2);
  margin: 0;
}
.muted {
  color: var(--ink-3);
  font-size: 15px;
}

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

.hero {
  padding: 56px 0 72px;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1.1fr 0.9fr;
  }
}
.hero h1 .accent {
  color: var(--accent);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 16px;
}
.hero-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--ink-3);
  font-size: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hero-note li::before {
  content: "✓";
  color: var(--green);
  font-weight: 700;
  margin-right: 6px;
}
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 520px;
}
.hero-visual .phone {
  position: relative;
  z-index: 2;
}
.hero-visual .phone.back {
  position: absolute;
  z-index: 1;
  transform: translate(38%, 7%) rotate(5deg) scale(0.9);
  opacity: 0.96;
}
@media (max-width: 520px) {
  .hero-visual {
    min-height: 0;
  }
  .hero-visual .phone.back {
    display: none;
  }
}
.kanji-bg {
  position: absolute;
  inset: auto -20px -40px auto;
  font-family: var(--font-ja);
  font-size: 260px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
}

/* ---------- phone frame ---------- */

.phone {
  width: min(280px, 78vw);
  aspect-ratio: 9 / 19.2;
  background: var(--bezel);
  border-radius: 40px;
  padding: 10px;
  box-shadow: var(--shadow), 0 30px 60px rgba(29, 27, 24, 0.18);
  flex: none;
  /* keep the frame's shape; tall screenshots are cropped from the top instead of stretching it */
  overflow: hidden;
  min-height: 0;
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 31px;
  background: var(--surface);
}
.phone-sm {
  width: min(240px, 70vw);
}

/* ---------- problem ---------- */

.problem {
  display: grid;
  gap: 32px;
}
@media (min-width: 900px) {
  .problem {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
.cards {
  display: grid;
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 {
  margin-bottom: 6px;
  font-size: 18px;
}
.card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
}
.card .tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}

/* ---------- pillars ---------- */

.pillars {
  display: grid;
  gap: 20px;
}
@media (min-width: 760px) {
  .pillars {
    grid-template-columns: 1fr 1fr;
  }
}
.pillar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.pillar h3 {
  margin: 0 0 6px;
}
.pillar p {
  margin: 0;
  color: var(--ink-2);
}
.pillar .num {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-deep);
  letter-spacing: 0.06em;
}
.demo {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin-top: auto;
}

/* demo: dictation */
.demo-play {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.demo-play .play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
}
.demo-play .play::before {
  content: "";
  border-left: 13px solid var(--accent-ink);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 4px;
}
.demo-play .speed {
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 14px;
  font-weight: 650;
  background: var(--surface);
}
.demo-play .q {
  font-size: 15px;
  color: var(--ink-2);
  margin-left: 4px;
}
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tile {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  text-align: center;
  padding: 10px 6px 8px;
  font-family: var(--font-ja);
  font-size: 30px;
  line-height: 1.2;
}
.tile small {
  display: block;
  font-family: var(--font);
  font-size: 13px;
  color: var(--ink-3);
}
.tile.ok {
  background: var(--green-soft);
  border-color: var(--green);
}
.tile.bad {
  background: var(--red-soft);
  border-color: var(--red);
}
.tile.faded {
  opacity: 0.45;
}
.tile .why {
  position: absolute;
  top: 6px;
  right: 6px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 650;
  color: var(--red);
  background: var(--surface);
  border-radius: 999px;
  padding: 1px 7px;
}

/* demo: typed recall */
.typed {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.typed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}
.typed-row.bad {
  background: var(--red-soft);
}
.typed-row.ok {
  background: var(--green-soft);
}
.typed-row .icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  flex: none;
}
.typed-row.bad .icon {
  background: var(--red);
}
.typed-row.ok .icon {
  background: var(--green);
}
.typed-row .label {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
}
.typed-row .kana {
  font-family: var(--font-ja);
  font-size: 26px;
  line-height: 1.25;
}
.caret {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  background: var(--red);
  vertical-align: -0.08em;
  margin: 0 1px;
}
mark {
  background: var(--highlight);
  color: inherit;
  border-radius: 4px;
  padding: 0 1px;
}
.typed-note {
  padding: 10px 14px;
  background: var(--surface);
  font-size: 14px;
  color: var(--ink-2);
}
.chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg-alt);
  border-radius: 999px;
  padding: 3px 9px;
  margin-right: 6px;
  color: var(--ink-2);
}

/* demo: meter */
.meter-num {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.meter-num strong {
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.meter-num span {
  color: var(--ink-2);
  font-size: 15px;
}
.meter-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  gap: 2px;
  margin-bottom: 12px;
}
.meter-bar i {
  display: block;
}
.legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  font-size: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend li b {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: none;
}

/* demo: readiness */
.ready {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.ready strong {
  font-size: 30px;
  letter-spacing: -0.02em;
}
.ready span {
  font-size: 14px;
  color: var(--ink-2);
}
.bands {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}
.bands i {
  height: 8px;
  border-radius: 4px;
  background: var(--line);
}
.bands i.on {
  background: var(--ink);
}
.band-labels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.3;
}
.band-labels .now {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- screens ---------- */

.screens {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding: 8px 4px 28px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 900px) {
  .screens {
    justify-content: center;
    overflow: visible;
  }
}
.screen {
  scroll-snap-align: center;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.screen figcaption {
  max-width: 240px;
  text-align: center;
  font-size: 15px;
  color: var(--ink-2);
}
.screen figcaption b {
  display: block;
  color: var(--ink);
}

/* ---------- goals ---------- */

.goals {
  display: grid;
  gap: 16px;
}
@media (min-width: 900px) {
  .goals {
    grid-template-columns: repeat(3, 1fr);
  }
}
.goal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
}
.goal .ja-big {
  font-family: var(--font-ja);
  font-size: 34px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 10px;
}
.goal p {
  margin: 0;
  color: var(--ink-2);
}

/* ---------- india ---------- */

.features {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}
.features li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.features b {
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
}
.features span {
  color: var(--ink-2);
  font-size: 15px;
}
.features .ico {
  font-size: 22px;
  margin-bottom: 8px;
  display: block;
}

/* ---------- institutes ---------- */

.institutes {
  display: grid;
  gap: 32px;
  align-items: center;
  background: var(--ink);
  color: var(--bg);
  border-radius: 28px;
  padding: 40px 28px;
}
@media (min-width: 900px) {
  .institutes {
    grid-template-columns: 1.2fr 0.8fr;
    padding: 56px;
  }
}
.institutes h2 {
  color: var(--bg);
}
.institutes p {
  color: color-mix(in srgb, var(--bg) 78%, transparent);
  margin: 0 0 20px;
}
.institutes ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.institutes li {
  display: flex;
  gap: 10px;
}
.institutes li::before {
  content: "→";
  color: var(--accent);
  font-weight: 700;
}
.institutes .btn-primary {
  background: var(--accent);
}

/* ---------- faq ---------- */

.faq {
  max-width: 780px;
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-weight: 650;
  font-size: 18px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  font-size: 24px;
  line-height: 1;
  color: var(--accent);
}
.faq details[open] summary::after {
  content: "−";
}
.faq details p {
  margin: 0 0 18px;
  color: var(--ink-2);
}

/* ---------- waitlist ---------- */

.join {
  display: grid;
  gap: 36px;
}
@media (min-width: 900px) {
  .join {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }
}
.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}
.field {
  display: grid;
  gap: 6px;
}
.field label,
.field legend {
  font-weight: 650;
  font-size: 15px;
}
.field .hint {
  font-size: 13px;
  color: var(--ink-3);
}
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 12px;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
}
fieldset.field {
  border: 0;
  margin: 0;
  padding: 0;
}
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.segmented label {
  position: relative;
}
.segmented input {
  position: absolute;
  opacity: 0;
  inset: 0;
}
.segmented span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-weight: 550;
  font-size: 15px;
  cursor: pointer;
  background: var(--bg);
}
.segmented input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
}
.segmented input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--ink-2);
}
.consent input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex: none;
}
.form-status {
  font-size: 15px;
  margin: 0;
  min-height: 1.4em;
}
.form-status.error {
  color: var(--red);
}
.form-done {
  text-align: center;
  padding: 24px 8px;
}
.form-done .big {
  font-family: var(--font-ja);
  font-size: 44px;
  color: var(--accent);
  line-height: 1.2;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
  font-size: 14px;
  color: var(--ink-3);
}
.site-footer .wrap {
  display: grid;
  gap: 24px;
}
@media (min-width: 760px) {
  .site-footer .wrap {
    grid-template-columns: 1fr 1fr;
  }
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 550;
}
.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.site-footer p {
  margin: 0 0 8px;
}
.site-footer a {
  color: var(--ink-2);
}

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

.legal {
  padding: 48px 0 72px;
}
.legal .wrap {
  max-width: 760px;
}
.legal h1 {
  font-size: clamp(34px, 5vw, 48px);
}
.legal h2 {
  font-size: 24px;
  margin-top: 40px;
}
.legal p,
.legal li {
  color: var(--ink-2);
}
.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 12px 0 8px;
}
.legal th,
.legal td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  padding: 10px 8px 10px 0;
}
.legal th {
  color: var(--ink);
}
.legal .updated {
  color: var(--ink-3);
  font-size: 15px;
}
.steps {
  counter-reset: s;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}
.steps li {
  counter-increment: s;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px 16px 56px;
  position: relative;
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 16px;
  top: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 14px;
}

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