/*
  mojikaki.app: the app's own look on the web. A warm paper ground, the app's coral crayon as the one accent, the
  rounded face of the store screenshots for headings, and the system's Japanese face for reading. Layout: a single
  column of practice-notebook sections, each a phone with the app running beside a short text, on one crayon's tint.
*/
@font-face {
  font-family: "Zen Maru Gothic";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/zen-maru-gothic-700.woff2") format("woff2");
}
@font-face {
  font-family: "Zen Maru Gothic";
  font-weight: 900;
  font-display: swap;
  src: url("fonts/zen-maru-gothic-900.woff2") format("woff2");
}

:root {
  --paper: #fff8f1;
  --card: #ffffff;
  --ink: #2b2b33;
  --ink-soft: #66636e;
  --line: #ede6dc;
  --accent: #d9574a;
  --band: rgb(240 138 126 / 0.34);
  --guide: #d6e6f5;
  --box-line: #e4dfd6;
  --tint-blue: #e3eef9;
  --tint-gold: #fff1cc;
  --tint-coral: #fde4de;
  --tint-green: #e0f1e6;
  --tint-purple: #ece6f8;
  --bronze: #c47a4a;
  --silver: #8e97a3;
  --gold: #f2b53b;
  --device: #17171a;
  --device-edge: #3c3c42;
  --shadow: 0 24px 60px rgb(120 70 50 / 0.18);
  --font-display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", system-ui, sans-serif;
  --font-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  --measure: 34rem;
  /* Always the app's light paper, whatever the device's appearance. */
  color-scheme: light;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.85;
  font-feature-settings: "palt" 0;
}
img,
video {
  display: block;
  max-width: 100%;
}
a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-wrap: balance;
  margin: 0;
}
p {
  margin: 0;
}
.wrap {
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: max(16px, 4vw);
}
/* A phrase a Japanese line never breaks inside: a heading wraps between phrases, not in the middle of a word. */
.nb {
  display: inline-block;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The bar: the icon and name, then the other pages. */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--line);
}
.bar nav {
  display: flex;
  gap: 18px;
  font-size: 0.9rem;
}
.bar nav a {
  color: var(--ink-soft);
  text-decoration: none;
}
.bar nav a:hover {
  color: var(--accent);
}

/* The key word of a heading, as the store screenshots mark it: coral on a crayon band. */
em.mark {
  font-style: normal;
  color: var(--accent);
  background: linear-gradient(transparent 62%, var(--band) 62%, var(--band) 92%, transparent 92%);
  padding-inline: 0.05em;
}

/* The hero: もじかき written in four practice boxes, the app's guide under the crayon, beside the app at work. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding-block: clamp(16px, 4vw, 48px) clamp(48px, 7vw, 88px);
}
.hero-text {
  display: grid;
  gap: 22px;
  min-width: 0;
}
.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.name {
  width: 100%;
  max-width: 34rem;
  height: auto;
  overflow: visible;
}
.name .box {
  fill: var(--card);
  stroke: var(--box-line);
  stroke-width: 1;
}
.name .cross {
  fill: none;
  stroke: var(--box-line);
  stroke-width: 0.8;
  stroke-dasharray: 3 3;
}
.name .guide path {
  fill: none;
  stroke: var(--guide);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.name .ink path {
  fill: none;
  stroke: #d9574a;
  stroke-width: 6.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tagline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-wrap: balance;
}
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.9;
  max-width: var(--measure);
}
.get {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.store-badge img {
  height: 54px;
  width: auto;
}
.get-note {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* The app running: a phone drawn around a recording or a capture, on one crayon's tint. */
.stage {
  position: relative;
  display: grid;
  justify-items: center;
  padding-block: 12px;
  min-width: 0;
}
.stage::before {
  content: "";
  position: absolute;
  inset: 6% -2%;
  border-radius: 50%;
  background: var(--tint, var(--tint-blue));
}
.device {
  position: relative;
  width: min(100%, 300px);
  padding: 9px;
  border-radius: 46px;
  background: var(--device);
  box-shadow:
    inset 0 0 0 3px var(--device-edge),
    var(--shadow);
  transform: rotate(var(--rot, -2deg));
}
.screen {
  position: relative;
  aspect-ratio: 660 / 1434;
  border-radius: 38px;
  overflow: hidden;
  background: #fff;
}
.screen img,
.screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.device.tablet {
  width: min(100%, 400px);
  padding: 11px;
  border-radius: 30px;
}
.tablet .screen {
  aspect-ratio: 2064 / 2752;
  border-radius: 20px;
}
.island {
  position: absolute;
  top: 2.3%;
  left: 50%;
  width: 29%;
  height: 3.6%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
}

/* A feature: the phone and its text side by side, the side alternating. */
.features {
  display: grid;
  gap: clamp(56px, 9vw, 120px);
  padding-block: 24px clamp(64px, 9vw, 120px);
}
.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(24px, 6vw, 80px);
}
.feature:nth-child(even) .stage {
  order: 2;
}
.feature-text {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: var(--measure);
}
.feature-text h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
}
.feature-text .kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.blue {
  --tint: var(--tint-blue);
}
.gold {
  --tint: var(--tint-gold);
}
.coral {
  --tint: var(--tint-coral);
}
.green {
  --tint: var(--tint-green);
}
.purple {
  --tint: var(--tint-purple);
}
.feature:nth-child(even) {
  --rot: 2deg;
}

/* The medals, as the app names them, with what earns each. */
.medals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.medals li {
  display: block;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.medal {
  display: block;
  margin: 0 auto 8px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--medal);
  box-shadow:
    inset 0 -4px 0 rgb(0 0 0 / 0.14),
    0 0 0 4px var(--card);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
}
.medals b {
  display: block;
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 0.95rem;
}
.bronze {
  --medal: var(--bronze);
}
.silver {
  --medal: var(--silver);
}
.gold-medal {
  --medal: var(--gold);
}

/* For parents: what the app never does, in plain rows. */
.parents {
  background: var(--card);
  border-block: 1px solid var(--line);
  padding-block: clamp(56px, 8vw, 96px);
}
.parents h2,
.plans h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
}
.section-head {
  display: grid;
  gap: 12px;
  max-width: 40rem;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 28px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.facts li {
  display: grid;
  gap: 4px;
  padding-top: 16px;
  border-top: 2px solid var(--line);
  min-width: 0;
}
.facts h3 {
  font-size: 1.1rem;
}
.facts p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* The free version and the unlock. */
.plans {
  padding-block: clamp(56px, 8vw, 96px);
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 20px;
}
.plan {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 28px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  min-width: 0;
}
.plan.unlock {
  background: var(--tint-coral);
  border-color: transparent;
}
.plan h3 {
  font-size: 1.35rem;
}
.plan .price {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
}
.plan ul {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: 4px;
}
.plan-note {
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.closing {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
  padding-block: 8px clamp(56px, 8vw, 96px);
}
.closing h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

/* The footer: the other pages, the credits, the copyright. */
.foot {
  border-top: 1px solid var(--line);
  padding-block: 32px 48px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.7;
}
.foot .wrap {
  display: grid;
  gap: 10px;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}
.foot a {
  color: var(--ink-soft);
}

/* A text page: the privacy policy and support. */
.doc {
  max-width: 44rem;
  padding-block: clamp(16px, 4vw, 40px) clamp(56px, 8vw, 96px);
  display: grid;
  gap: 18px;
}
.doc h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}
.doc h2 {
  font-size: 1.3rem;
  margin-top: 18px;
}
.doc .meta {
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.contact {
  display: grid;
  gap: 10px;
  padding: 24px;
  border-radius: 20px;
  background: var(--tint-coral);
}
.contact .address {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 3.5vw, 1.4rem);
  overflow-wrap: anywhere;
}
.faq {
  display: grid;
  gap: 10px;
}
.faq details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  padding: 4px 20px;
}
.faq summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  padding-block: 12px;
  list-style-position: outside;
}
.faq details[open] summary {
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.faq details p {
  padding-bottom: 14px;
  color: var(--ink-soft);
}

@media (max-width: 760px) {
  .hero,
  .feature {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero .stage {
    order: 2;
  }
  .feature .stage,
  .feature:nth-child(even) .stage {
    order: 0;
  }
  .device {
    width: min(64%, 250px);
  }
  .device.tablet {
    width: min(86%, 340px);
  }
  .bar nav {
    gap: 14px;
  }
}

/* The name writes itself once, the way the app's guide moves; without script or with reduced motion, it rests whole. */
.js .name .ink path {
  stroke-dasharray: 1 1;
  animation: write 0.5s ease-in-out both;
}
@keyframes write {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .js .name .ink path {
    animation: none;
  }
}
