/* Japanese at Home — shared by the landing pages and the app (/app).
   Colours from the logo: the red circle, black lines, a cream page and the
   banner's mauve watercolour; lesson colours from the printed worksheets. */

@font-face {
  font-family: "Klee One";
  src: url("/fonts/klee-one-kana.woff2") format("woff2");
  font-display: swap;
}

:root {
  --red: #bb002d;
  --red-dark: #8f0022;
  --ink: #111;
  --muted: #5d5a52;
  --line: #e4e0d4;
  --cream: #fdfaf3;
  --cream-deep: #e9e6db;
  --paper: #fff;
  --mauve: #e7d3de;
  --mauve-deep: #c9a3b8;
  /* worksheet colours */
  --purple: #5a3d8a;
  --model: #b796d8;
  --trace: #e3e3e3;
  --green: #4f8a3c;
  --mark: #e60012;
  --head: "Avenir Next", "Futura", "Century Gothic", "Jost", "Segoe UI", system-ui, sans-serif;
  --kana: "Klee One", "Hiragino Maru Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font: 17px/1.6 var(--head);
  color: var(--ink);
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%) fixed;
}
a { color: var(--red); }
img { max-width: 100%; }
.kana { font-family: var(--kana); }

/* ---- type ------------------------------------------------------------- */
.wordmark, h1, h2, .eyebrow, .btn, nav a {
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(28px, 5vw, 48px); font-weight: 700; }
h2 { font-size: clamp(20px, 3vw, 28px); font-weight: 700; }
.eyebrow { font-size: 13px; color: var(--muted); font-weight: 500; }
.lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 40em; }

/* ---- header / footer -------------------------------------------------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.wordmark { font-weight: 700; font-size: 15px; white-space: nowrap; }
nav { display: flex; gap: clamp(10px, 2vw, 24px); align-items: center; flex-wrap: wrap; justify-content: flex-end; }
nav a { color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; }
nav a:hover { color: var(--red); }
footer {
  padding: 32px clamp(16px, 4vw, 40px) 48px; color: var(--muted); font-size: 14px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
}
footer a { color: var(--muted); }

/* ---- buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--paper); color: var(--ink); font: 700 13px var(--head);
  text-decoration: none; cursor: pointer; transition: transform 0.08s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn.small { padding: 7px 14px; font-size: 11px; }
.btn[disabled] { opacity: 0.5; cursor: default; transform: none; }

/* ---- the banner: a white band with mauve watercolour corners ------------ */
.band {
  position: relative; overflow: hidden; background: var(--paper);
  padding: clamp(28px, 6vw, 64px) clamp(16px, 4vw, 40px);
}
.band::before, .band::after {
  content: ""; position: absolute; width: 38%; height: 140%; pointer-events: none;
  filter: blur(18px); opacity: 0.75;
}
.band::before { left: -14%; top: -30%; background: radial-gradient(closest-side, var(--mauve), transparent); }
.band::after { right: -14%; bottom: -60%; background: radial-gradient(closest-side, var(--mauve), transparent); }
.band > * { position: relative; z-index: 1; }

/* ---- cards & layout --------------------------------------------------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
section { padding: clamp(36px, 6vw, 72px) 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
input, textarea {
  width: 100%; font: 16px var(--head); padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
}
input:focus, textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }
label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 12px 16px; border-radius: 10px; background: #f1f7ee; color: #2d5a1e; }
.notice.error { background: #fdecef; color: var(--red-dark); }

@media (max-width: 640px) {
  .wordmark { display: none; }
  body { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
