/* Kanji Draw page: washi paper, sumi ink and the app's three highlighter colours */

:root {
  --paper: #f6f2ea;
  --card: #fcfaf6;
  --ink: #1b1714;
  --ink-2: #4b443c;
  --muted: #7b7267;
  --line: #e0d7c8;
  --red: #d24b3e;
  --yellow: #f2e641;
  --green: #a3e044;
  --cyan: #46d6cc;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; color: var(--ink); font-family: var(--sans); line-height: 1.6; -webkit-font-smoothing: antialiased;
       background: var(--paper) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .42 0 0 0 0 .34 0 0 0 0 .24 0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
main { overflow-x: clip; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.jp { font-family: var(--serif); }
.nw { white-space: nowrap; }

/* Header */
.top { position: sticky; top: 0; z-index: 50; transition: background-color .3s, box-shadow .3s; }
.top.scrolled { background: rgba(246, 242, 234, .84); box-shadow: 0 1px 0 var(--line);
                -webkit-backdrop-filter: saturate(1.2) blur(14px); backdrop-filter: saturate(1.2) blur(14px); }
.nav { display: flex; align-items: center; gap: 14px; height: 72px; }
.parent { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .16em; text-decoration: none; transition: color .2s; }
.parent img { width: 22px; height: 22px; }
.parent:hover { color: var(--ink); }
.crumb { color: var(--line); font-size: 1.3rem; font-weight: 300; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.12rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 22.5%; box-shadow: 0 2px 8px rgba(60, 40, 20, .2); }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--ink-2); font-size: .95rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: .7em 1.2em; border: 1.5px solid var(--ink); border-radius: 999px;
       color: var(--ink); font: 700 .95rem/1.2 var(--sans); text-decoration: none; white-space: nowrap; background: transparent;
       transition: transform .25s var(--ease), box-shadow .3s, background-color .2s; }
.btn:hover { background: rgba(27, 23, 20, .06); }
.btn.ink { background: var(--ink); color: var(--paper); }
.btn.ink:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(27, 23, 20, .7); }
.btn.big { padding: .9em 1.5em; font-size: 1.02rem; }
.btn.small { padding: .5em .95em; font-size: .86rem; border-width: 1.5px; }
.btn svg { width: 1.1em; height: 1.1em; }

/* Type */
.eyebrow { margin: 0 0 16px; color: var(--muted); font-size: .76rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; }
h1 { font-size: clamp(2.7rem, 5.8vw, 4.9rem); line-height: 1.06; letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.12; }
h3 { font-size: 1.4rem; line-height: 1.3; }
.lead { margin: 22px 0 0; max-width: 33em; color: var(--ink-2); font-size: clamp(1.06rem, 1.5vw, 1.18rem); }
/* A highlighter stroke that sweeps in under a word */
.mark { background: linear-gradient(100deg, var(--hl, var(--yellow)) 0 92%, transparent) no-repeat 0 88% / 0 38%; padding: 0 .08em;
        animation: mark .9s var(--ease) .5s forwards; }
@keyframes mark { to { background-size: 100% 38%; } }
.section { position: relative; padding: 110px 0; }
.section-head { max-width: 42em; }

/* Hero */
.hero { position: relative; padding: 24px 0 90px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 56px; min-height: min(740px, calc(100svh - 72px)); }
.intro > * { animation: rise 1s var(--ease) backwards; }
.intro > :nth-child(2) { animation-delay: .08s; }
.intro > :nth-child(3) { animation-delay: .16s; }
.intro > :nth-child(4) { animation-delay: .24s; }
.intro > :nth-child(5) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 32px; }
.cta-note { color: var(--muted); font-size: .92rem; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 0; padding: 0; list-style: none; }
.facts li { padding: .45em .95em; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .55); color: var(--ink-2); font-size: .9rem; }
.facts b { color: var(--ink); }

/* The practice sheet where the kanji draw themselves */
.practice { position: relative; justify-self: center; width: min(470px, 100%); animation: rise 1.1s var(--ease) .15s backwards; }
.swoosh { position: absolute; z-index: -1; overflow: visible; pointer-events: none; mix-blend-mode: multiply; }
.practice .swoosh { left: -24%; top: -12%; width: 150%; height: 130%; }
.sheet { position: relative; aspect-ratio: 1; padding: 9% 7% 10%; border-radius: 26px; background: var(--card); transform: rotate(-2deg);
         box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 34px 70px -34px rgba(70, 45, 20, .5), 0 10px 24px -12px rgba(70, 45, 20, .28); }
.sheet small { position: absolute; color: #9b9184; font-size: .62rem; font-weight: 700; letter-spacing: .14em; }
.sheet small b { color: var(--red); font-weight: 700; }
.sheet .tl { top: 4.2%; left: 7%; } .sheet .tr { top: 4.2%; right: 7%; }
.sheet .bl { bottom: 4.2%; left: 7%; } .sheet .br { bottom: 4.2%; right: 7%; }
.board { display: block; width: 100%; height: 100%; overflow: visible; }
.board .frame, .board .grid { fill: none; stroke: var(--red); vector-effect: non-scaling-stroke; }
.board .frame { stroke-width: 1.2; opacity: .55; }
.board .grid { stroke-width: 1; opacity: .3; }
.board .ink path { fill: none; stroke: var(--ink); stroke-width: 5.6; stroke-linecap: round; stroke-linejoin: round; }
.board .nums text { fill: var(--red); font: 700 6px var(--sans); opacity: 0; transition: opacity .3s; }
.board .nums text.on { opacity: .9; }
.board .tip { fill: var(--ink); opacity: 0; transition: opacity .2s; }
.board .tip.on { opacity: 1; }
.board .ink { transition: opacity .45s; }
.board .ink.fade { opacity: 0; }
.reading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 8px 14px; min-height: 3.2em; margin-top: 30px; text-align: center; }
.reading .meaning { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; }
.reading .pill { padding: .25em .75em; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .6); font-family: var(--serif); font-size: 1.05rem; }
.reading .pill small { margin-right: .4em; color: var(--muted); font: 700 .66rem var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.reading.swap > * { animation: swap .5s var(--ease) backwards; }
@keyframes swap { from { opacity: 0; transform: translateY(6px); } }
.picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px; }
.picker button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .5); color: var(--ink-2);
                 font: 600 1.15rem var(--serif); cursor: pointer; transition: background-color .2s, color .2s, transform .25s var(--ease), border-color .2s; }
.picker button:hover { transform: translateY(-2px); border-color: #c9bda9; }
.picker button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Three ways */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 54px; }
.way { position: relative; isolation: isolate; padding: 30px 30px 32px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--card); }
.way .numeral { display: block; width: 96px; height: 96px; margin: -8px 0 -6px -10px; overflow: visible; }
.way .numeral path { fill: none; stroke: var(--ink); stroke-width: 7.5; stroke-linecap: round; stroke-linejoin: round; }
.way::before { content: ""; position: absolute; z-index: -1; left: 24px; top: 58px; width: 100px; height: 28px; border-radius: 30px 8px 30px 6px;
               background: var(--hl); transform: rotate(-8deg); mix-blend-mode: multiply; opacity: .85; }
.way h3 { margin-top: 20px; }
.way p { margin: 8px 0 0; color: var(--ink-2); }

/* Modes */
.modes { margin-top: 30px; }
.mode { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; padding: 70px 0; }
.mode + .mode { border-top: 1px dashed var(--line); }
.mode.flip .mode-text { order: 2; }
.label { position: relative; isolation: isolate; display: inline-block; padding: 0 .25em; font-size: .8rem; font-weight: 800; letter-spacing: .22em; }
.label::after { content: ""; position: absolute; z-index: -1; left: -.35em; right: -.35em; bottom: -.05em; height: .9em; border-radius: 1em .35em 1em .3em;
                background: var(--hl); transform: skewX(-14deg); mix-blend-mode: multiply; }
.mode h2 { margin-top: 18px; }
.mode-text p { margin: 16px 0 0; color: var(--ink-2); font-size: 1.07rem; }
.mode-text ul { margin: 18px 0 0; padding: 0; list-style: none; }
.mode-text li { position: relative; margin-top: 10px; padding-left: 26px; color: var(--ink-2); }
.mode-text li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 8px; border-radius: 8px 3px 8px 2px; background: var(--hl); transform: rotate(-10deg); mix-blend-mode: multiply; }
.tip-note { margin-top: 18px; color: var(--muted); font-size: .95rem; }
.phones { position: relative; isolation: isolate; display: flex; justify-content: center; gap: 22px; }
.phones .swoosh { left: -30%; top: 6%; width: 160%; height: 88%; }
.phone { width: min(250px, 42vw); padding: 8px; border-radius: 32px; background: #141210;
         box-shadow: 0 40px 70px -36px rgba(50, 30, 10, .6), 0 12px 24px -12px rgba(50, 30, 10, .35); }
.phone img { width: 100%; border-radius: 25px; }
.phones .phone:nth-child(3) { transform: translateY(46px) rotate(3deg); }
.phones .phone:nth-child(2) { transform: rotate(-2deg); }

/* iPad */
.section-head .sub { margin: 18px 0 0; max-width: 36em; color: var(--ink-2); font-size: 1.1rem; }
.tablet-stage { position: relative; isolation: isolate; margin-top: 56px; }
.tablet-stage .swoosh { left: -12%; top: -10%; width: 124%; height: 120%; }
.tablet { width: min(920px, 100%); margin: 0 auto; padding: clamp(7px, 1.4vw, 15px); border-radius: clamp(20px, 3.2vw, 38px); background: #141210;
          box-shadow: 0 50px 90px -44px rgba(50, 30, 10, .6), 0 14px 30px -14px rgba(50, 30, 10, .35); }
.tablet img { width: 100%; border-radius: clamp(13px, 1.8vw, 23px); }
.ipad-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 40px; max-width: 920px; margin: 104px auto 0; padding: 0; list-style: none; color: var(--ink-2); }
.ipad-notes b { position: relative; isolation: isolate; display: table; margin-bottom: 6px; color: var(--ink); font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.ipad-notes b::after { content: ""; position: absolute; z-index: -1; left: -.2em; right: -.2em; bottom: .05em; height: .5em; border-radius: 1em .35em 1em .3em;
                       background: var(--hl); transform: skewX(-14deg); mix-blend-mode: multiply; }

/* What's inside */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 50px; }
.stat { padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); }
.stat b { display: block; font-family: var(--serif); font-size: 2.5rem; font-weight: 600; line-height: 1.05; }
.stat span { display: block; margin-top: 8px; color: var(--ink-2); }
.lessons { display: flex; flex-wrap: wrap; gap: 10px; margin: 34px 0 0; padding: 0; list-style: none; }
.lessons li { display: inline-flex; align-items: center; gap: 8px; padding: .5em .95em; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: .93rem; font-weight: 600; }
.lessons li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.lessons small { color: var(--muted); font-weight: 500; }
.pace { margin-top: 26px; color: var(--ink-2); }

/* Promise */
.promise { text-align: center; }
.seal { display: inline-grid; place-items: center; width: 74px; height: 74px; border-radius: 12px; background: var(--red); color: #fff;
        font-family: var(--serif); font-size: 2.4rem; transform: rotate(-6deg); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .22), 0 10px 22px -10px rgba(160, 40, 30, .6); }
.promise h2 { margin-top: 30px; font-size: clamp(2.3rem, 5vw, 3.8rem); }
.promise p { max-width: 34em; margin: 18px auto 0; color: var(--ink-2); font-size: 1.12rem; }
.promise .cta { justify-content: center; }
/* The brush from the app's info screen, set down on the paper; it slides in from the right */
.brush { width: min(820px, 100%); margin: 96px auto 0; transform: rotate(-2deg); }
.js .brush.reveal { transform: translateX(24%) rotate(4deg); transition-duration: 1.6s; }
.js .brush.reveal.in { transform: rotate(-2deg); }

/* Footer */
.foot { padding: 50px 0 60px; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 26px 48px; }
.foot-grid > p { grid-column: 1 / -1; margin: 0; }
.foot-about { margin: 12px 0 0; max-width: 30em; color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; justify-content: flex-end; align-content: start; gap: 12px 24px; }
.foot-links a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.credits { color: var(--muted); font-size: .86rem; }
.credits a { color: var(--ink-2); }

/* Scroll reveals; without JavaScript everything is simply visible */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 50px; min-height: 0; padding-top: 16px; }
  .ways, .stats { grid-template-columns: 1fr; }
  .mode { grid-template-columns: 1fr; gap: 40px; }
  .mode.flip .mode-text { order: 0; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-links { justify-content: flex-start; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .nav { gap: 10px; }
  .parent span { display: none; }
  .section { padding: 80px 0; }
  .phone { width: min(200px, 44vw); }
  .phones .phone:nth-child(3) { transform: translateY(30px) rotate(3deg); }
  .tablet-stage { margin-top: 40px; }
  .ipad-notes { grid-template-columns: 1fr; margin-top: 44px; }
  .brush { margin-top: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
                           transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .brush.reveal { transform: rotate(-2deg); }
}
