/* Homepage styles: a classroom chalkboard (hero, closing) over an exercise book (features) and a class register (who).
   No external resources: the one web font is the brand's Plus Jakarta Sans, subset to Latin and self-hosted. */

@font-face {
  font-family: "Jakarta";
  src: url("/site/jakarta-latin.58a0c6bbbe.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+2013-2014, U+2018-2019, U+201C-201D, U+2022, U+2026, U+2192;
}
/* Latin Extended (Vietnamese and the like): a second file, which a browser fetches only for a page that uses it */
@font-face {
  font-family: "Jakarta";
  src: url("/site/jakarta-ext.41658f264c.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-024F, U+0300-0323, U+1EA0-1EF9, U+20AB;
}

:root {
  --slate: #232a3b;
  --slate-deep: #1a2030;
  --chalk: #eef0f3;
  --chalk-dim: #c3c9d6;
  --chalk-warm: #ffcf7a;
  --chalk-rose: #f4a3b0;
  --paper: #fbfcfe;
  --rule-c: #d6deee;
  --margin-c: #e9798b;
  --ink: #1f2434;
  --ink-soft: #485068;
  --pen: #2741a8;
  --wood: #7a5236;
  --rule: 2rem;
  --wrap: 72rem;
  --sans: "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.lang-zh-Hans { --sans: "Jakarta", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif; }
.lang-zh-Hant { --sans: "Jakarta", "PingFang TC", "Noto Sans CJK TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif; }
.lang-ja { --sans: "Jakarta", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans CJK JP", "Noto Sans JP", "Yu Gothic", "Meiryo", system-ui, sans-serif; }
.lang-ko { --sans: "Jakarta", "Apple SD Gothic Neo", "Noto Sans CJK KR", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif; }
.lang-hi { --sans: "Jakarta", "Kohinoor Devanagari", "Devanagari Sangam MN", "Noto Sans Devanagari", "Nirmala UI", "Mangal", system-ui, sans-serif; }
.lang-th { --sans: "Jakarta", "Sukhumvit Set", "Thonburi", "Noto Sans Thai", "Leelawadee UI", "Tahoma", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: var(--rule);
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure, table { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
/* Chinese and Korean headings break only at punctuation and spaces, never inside a word; Japanese by phrase */
.lang-zh-Hans :is(h1, h2), .lang-zh-Hant :is(h1, h2), .lang-ko :is(h1, h2) { word-break: keep-all; }
.lang-ja :is(h1, h2) { word-break: auto-phrase; }
ul { padding: 0; list-style: none; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Focus: always visible, chalk yellow on the board and pen blue on paper */
a:focus-visible, main:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; border-radius: 3px; }
.board a:focus-visible { outline-color: var(--chalk-warm); }
main:focus { outline: none; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  padding: .5rem 1rem; background: var(--chalk-warm); color: var(--slate-deep);
  font-weight: 700; text-decoration: none; border-radius: 4px;
}
.skip:focus { top: 1rem; }

/* ---------------------------------------------------------------- the board */
.board {
  color: var(--chalk);
  background-color: var(--slate);
  /* Eraser smudges: faint, wide and off-centre, like a board wiped between lessons */
  background-image:
    radial-gradient(60rem 18rem at 18% 30%, rgba(255,255,255,.045), transparent 70%),
    radial-gradient(40rem 14rem at 80% 70%, rgba(255,255,255,.035), transparent 70%),
    radial-gradient(30rem 10rem at 55% 10%, rgba(255,255,255,.03), transparent 70%);
}
.chalk { filter: url(#chalk); }
.topbar.board { background-image: none; }

.topbar-in {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2rem;
  padding-block: 1.25rem;
}
.mark { display: inline-block; margin-right: auto; }
.mark img { width: 9.5rem; height: auto; }
.topbar nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.topbar nav a {
  color: var(--chalk-dim); text-decoration: none; font-size: .95rem; line-height: 2.25rem;
  border-bottom: 2px solid transparent;
}
.topbar nav a:hover { color: var(--chalk); border-bottom-color: var(--chalk-warm); }
/* The one top-bar link to the language list at the foot of the page */
.langjump {
  display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; white-space: nowrap;
  padding: .3rem .85rem; font-size: .95rem; line-height: 1.75rem; font-weight: 600;
  color: var(--chalk); border: 2px solid var(--chalk-dim);
  border-radius: 14px 5px 12px 6px / 6px 12px 5px 14px;
}
.langjump:hover { border-color: var(--chalk-warm); }
.langjump:focus-visible { outline: 3px solid var(--chalk-warm); outline-offset: 3px; }
.globe { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.6; }

.hero { position: relative; padding-top: clamp(2rem, 6vw, 5rem); overflow-x: clip; }
.hero-in {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center; gap: clamp(2rem, 5vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5.5rem);
}
.hero h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.5rem); line-height: 1.04; font-weight: 800;
  letter-spacing: -.02em; max-width: 13ch;
}
.script-cjk .hero h1 { line-height: 1.2; letter-spacing: 0; max-width: 11em; font-size: clamp(2.2rem, 4.2vw, 3.7rem); }
.script-deva .hero h1 { line-height: 1.4; letter-spacing: 0; max-width: 14em; font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
.script-thai .hero h1 { line-height: 1.35; letter-spacing: 0; max-width: 14em; font-size: clamp(2.3rem, 4.6vw, 3.8rem); }
/* Longer words (German, Vietnamese, ...): a little smaller so the headline keeps to three or four lines */
.lang-de .hero h1, .lang-fr .hero h1, .lang-es .hero h1, .lang-pt .hero h1, .lang-vi .hero h1, .lang-id .hero h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.8rem); max-width: 16ch; hyphens: auto;
}
.scribble { display: block; width: min(18rem, 70%); height: 1.1rem; margin: .6rem 0 1.6rem; overflow: visible; }
.scribble path {
  fill: none; stroke: var(--chalk-warm); stroke-width: 5; stroke-linecap: round;
  filter: url(#chalk);
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 1.1s cubic-bezier(.6,.1,.3,1) .35s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.lede { color: var(--chalk-dim); font-size: 1.2rem; line-height: 1.75; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

.btn {
  display: inline-block; padding: .7rem 1.35rem; font-weight: 700; font-size: 1rem; line-height: 1.5;
  text-decoration: none;
  /* A hand-cut edge instead of a uniform pill */
  border-radius: 14px 5px 12px 6px / 6px 12px 5px 14px;
}
.btn-chalk { background: var(--chalk-warm); color: var(--slate-deep); }
.btn-chalk:hover { background: #ffe0a6; }
.btn-line { color: var(--chalk); border: 2px solid var(--chalk-dim); padding: calc(.7rem - 2px) calc(1.35rem - 2px); }
.btn-line:hover { border-color: var(--chalk); background: rgba(255,255,255,.06); }

/* The laptop, drawn around the real screenshot, with the brand's light and rings chalked behind it */
.laptop { position: relative; padding-top: 4.5rem; }
.rings {
  position: absolute; top: 0; left: -14%; width: 128%; height: auto; z-index: 0;
  stroke: rgba(255, 207, 122, .5); stroke-width: 2.5; filter: url(#chalk);
}
.rings path:nth-child(2) { stroke: rgba(244, 163, 176, .45); }
.rings path:nth-child(3) { stroke: rgba(238, 240, 243, .4); }
.lid {
  position: relative; z-index: 1;
  border: clamp(6px, 1vw, 11px) solid #0e1119; border-bottom-width: clamp(10px, 1.6vw, 18px);
  border-radius: 14px 14px 4px 4px; background: #0e1119;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.7);
}
.lid img { border-radius: 3px; }
.deck {
  position: relative; z-index: 1;
  height: clamp(10px, 1.4vw, 16px); margin-inline: -7%;
  background: linear-gradient(#d4d8e1, #9ca2b1);
  border-radius: 2px 2px 14px 14px / 2px 2px 10px 10px;
}
.deck::before {
  content: ""; position: absolute; left: 50%; top: 0; width: 16%; height: 40%;
  transform: translateX(-50%); background: #8a90a0; border-radius: 0 0 6px 6px;
}

/* What sets the system apart, chalked under the hero: right after the first screen */
.strengths {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 3vw, 2.5rem);
  padding-block: 2.25rem 3.25rem; border-top: 2px dashed rgba(238,240,243,.22);
}
.strengths .big {
  font-size: clamp(2rem, 3.2vw, 2.7rem); line-height: 1.1; font-weight: 800; color: var(--chalk-warm);
  letter-spacing: -.01em; margin-bottom: .6rem; hyphens: auto; overflow-wrap: break-word;
}
.strengths li:nth-child(2) .big { color: var(--chalk-rose); }
.strengths li:nth-child(3) .big { color: var(--chalk); }
.strengths h3 { font-size: 1.08rem; line-height: 1.45; font-weight: 750; margin-bottom: .4rem; }
.strengths p { color: var(--chalk-dim); font-size: 1rem; line-height: 1.6; }
.script-cjk .strengths .big, .script-thai .strengths .big, .script-deva .strengths .big { letter-spacing: 0; font-size: clamp(1.7rem, 2.4vw, 2.2rem); line-height: 1.25; }
.lang-ja .strengths .big { word-break: auto-phrase; }

/* The chalk tray along the bottom of the board */
.tray {
  position: relative; height: 1.4rem;
  background: linear-gradient(#946645, var(--wood) 45%, #5e3e28);
  box-shadow: 0 -3px 0 rgba(0,0,0,.25) inset, 0 6px 14px -8px rgba(0,0,0,.5);
}
.tray i, .tray b { position: absolute; top: -.45rem; height: .55rem; border-radius: 3px; }
.tray i { width: 3.2rem; background: var(--chalk); }
.tray i:nth-child(1) { left: 12%; transform: rotate(-3deg); }
.tray i:nth-child(2) { left: 17%; width: 2rem; background: var(--chalk-warm); transform: rotate(4deg); }
.tray i:nth-child(3) { left: 21%; width: 1.4rem; background: var(--chalk-rose); }
.tray b { right: 14%; width: 5.5rem; height: 1rem; top: -.85rem; background: linear-gradient(#3b3f4d 55%, #c9b28a 55%); border-radius: 3px 3px 2px 2px; }

/* ---------------------------------------------------------------- the exercise book */
.paper { padding-block: calc(var(--rule) * 3) calc(var(--rule) * 2); }
.notebook {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: calc(var(--rule) * 1.5) clamp(2rem, 5vw, 4.5rem); align-items: start;
}
.page {
  position: relative;
  padding: var(--rule) clamp(1rem, 3vw, 2rem) var(--rule) 5.75rem;
  background-color: #fff;
  /* Ruled lines sit just under each line of body text */
  background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--rule) - 1px), var(--rule-c) calc(var(--rule) - 1px) var(--rule));
  background-position: 0 calc(var(--rule) * .72 + 3px);
  border: 1px solid #e3e8f2;
  box-shadow: 0 1px 0 #e3e8f2, 0 2px 0 #fff, 0 3px 0 #e3e8f2, 0 18px 30px -24px rgba(31,36,52,.35);
}
/* Chinese, Japanese, Korean and Thai text come from whatever system font is installed, so their baselines cannot be
   lined up with rules: use squared exercise paper instead, which needs no alignment */
.script-cjk .page, .script-thai .page, .script-deva .page, .script-cyrillic .page, .script-greek .page {
  background-image:
    repeating-linear-gradient(to bottom, transparent 0 calc(1.25rem - 1px), #e4e9f3 calc(1.25rem - 1px) 1.25rem),
    repeating-linear-gradient(to right, transparent 0 calc(1.25rem - 1px), #e4e9f3 calc(1.25rem - 1px) 1.25rem);
  background-position: 0 0;
}
/* The red double margin line of a school exercise book */
.page::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 4.5rem; width: 5px;
  border-left: 1.5px solid var(--margin-c); border-right: 1.5px solid var(--margin-c);
}
/* Every line box in the book is a whole number of rules, however the heading wraps */
.paper h2, .register h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.5rem); line-height: calc(var(--rule) * 2); font-weight: 800; letter-spacing: -.015em;
}
.script-cjk h2, .script-thai h2, .script-deva h2 { letter-spacing: 0; }
.intro { color: var(--ink-soft); max-width: 36em; }
.features { margin-top: var(--rule); }
.features li { position: relative; padding-top: var(--rule); }
.features h3 { font-size: 1.22rem; line-height: var(--rule); font-weight: 750; }
.features p { color: var(--ink-soft); max-width: 38em; }
.ico {
  position: absolute; left: -5.1rem; top: calc(var(--rule) - .35rem); width: 2.9rem; height: 2.9rem;
  fill: none; stroke: var(--pen); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}

/* Screenshots taped into the book */
.photos { display: grid; gap: calc(var(--rule) * 2); padding-top: calc(var(--rule) * 3); position: sticky; top: var(--rule); }
.photo {
  position: relative; background: #fff; padding: .6rem .6rem 0;
  box-shadow: 0 1px 2px rgba(31,36,52,.18), 0 14px 26px -18px rgba(31,36,52,.45);
}
.photo::before {
  content: ""; position: absolute; top: -.8rem; left: 50%; width: 6.5rem; height: 1.6rem;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(255, 228, 160, .72); box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.tilt-l { transform: rotate(-1.6deg); }
.tilt-r { transform: rotate(1.3deg); margin-left: 1.5rem; }
.photo figcaption { font-size: .95rem; line-height: 1.5; color: var(--ink-soft); padding: .55rem .2rem .7rem; }

/* ---------------------------------------------------------------- the class register */
.register { padding-block: calc(var(--rule) * 2) calc(var(--rule) * 3); }
.register table {
  width: 100%; margin-top: var(--rule); border-collapse: collapse; background: #fff;
  border: 1px solid #e3e8f2; border-top: 6px solid var(--ink);
}
.register th, .register td { text-align: left; vertical-align: top; padding: .9rem 1.25rem; border-bottom: 1px solid var(--rule-c); }
.register thead th { font-size: .95rem; color: var(--ink-soft); font-weight: 600; background: #f3f6fb; }
.register tbody th { width: 13rem; font-size: 1.15rem; font-weight: 750; border-right: 1.5px solid var(--margin-c); }
.register td { color: var(--ink-soft); }
.register tbody tr:last-child > * { border-bottom: 0; }

/* ---------------------------------------------------------------- closing board */
.closing { padding-block: calc(var(--rule) * 3); }
.closing-in { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem clamp(2rem, 6vw, 6rem); }
.closing h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.2; font-weight: 800; margin-bottom: 1rem; }
.script-deva .closing h2, .script-thai .closing h2 { line-height: 1.45; }
.closing p { color: var(--chalk-dim); line-height: 1.75; max-width: 32em; }
.closing p + p { margin-top: 1.5rem; }
.closing .addr { margin-top: .75rem; font-size: .95rem; color: var(--chalk-dim); }
.contact { border-left: 2px dashed rgba(238,240,243,.28); padding-left: clamp(1.5rem, 4vw, 3.5rem); }

/* The language list: every page, as plain links */
.langs-sec { border-top: 1px dashed rgba(238,240,243,.25); padding-block: calc(var(--rule) * 1.5); }
.langs-sec h2 { font-size: 1.25rem; line-height: var(--rule); margin-bottom: .5rem; color: var(--chalk); }
.langs-sec ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.langs-sec a { color: var(--chalk-dim); text-decoration: none; line-height: 2.25rem; white-space: nowrap; border-bottom: 2px solid transparent; }
.langs-sec a:hover { color: var(--chalk); border-bottom-color: var(--chalk-warm); }
.langs-sec a[aria-current="page"] { color: var(--chalk); font-weight: 600; border-bottom-color: var(--chalk-warm); }

.foot { background: var(--slate-deep); color: var(--chalk-dim); font-size: .9rem; }
.foot p { padding-block: 1.25rem; line-height: 1.6; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 880px) {
  .hero-in, .notebook, .closing-in { grid-template-columns: minmax(0, 1fr); }
  .laptop { max-width: 34rem; margin-inline: auto; width: 92%; }
  .photos { grid-template-columns: 1fr 1fr; padding-top: 0; gap: 1.5rem; position: static; }
  .strengths { grid-template-columns: 1fr 1fr; }
  .tilt-r { margin-left: 0; }
  .contact { border-left: 0; padding-left: 0; border-top: 2px dashed rgba(238,240,243,.28); padding-top: 2.5rem; }
}
@media (max-width: 560px) {
  .mark { order: -2; }
  .langjump { order: -1; }
  body { font-size: 1.0625rem; }
  .sections { order: 3; width: 100%; }
  .topbar nav ul { gap: 0 1rem; }
  .page { padding-left: 1.25rem; }
  .paper h2, .register h2 { font-size: 1.75rem; line-height: var(--rule); }
  .paper h2 { padding-bottom: var(--rule); }
  .page::before { left: .5rem; }
  .ico { position: static; display: block; width: var(--rule); height: var(--rule); }
  .photos { grid-template-columns: 1fr; gap: 2.5rem; }
  .strengths { grid-template-columns: 1fr; gap: 1.75rem; }
  .strengths .big { font-size: 2rem; margin-bottom: .3rem; }
  /* Keep it a real table (changing its display can drop table semantics); just narrow the first column */
  .register th, .register td { padding: .75rem .8rem; }
  .register tbody th { width: 6.5rem; font-size: 1.02rem; }
  .register td { font-size: 1rem; line-height: 1.6; }
  .tray i:nth-child(1) { left: 6%; }
  .tray i:nth-child(2) { left: 18%; }
  .tray i:nth-child(3) { left: 27%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scribble path { animation: none; stroke-dashoffset: 0; }
}
@media (forced-colors: active) {
  .chalk, .scribble path, .rings { filter: none; }
  .btn { border: 2px solid; }
}
