/* Maru landing page, v6 brand kit: plain white paper, navy ink, red-pen ◯, soft sky, blush and pink. */

:root {
  --paper: #FFFFFF;
  --rule: #E2E8F8;
  --margin: #F6A9B4;
  --ink: #14307F;
  --ballpoint: #14307F;
  --ballpoint-hover: #1F3F9A;
  --press: #0A1C52;
  --on-ballpoint: #FFFFFF;
  --red: #E5402C;
  /* the kit's soft colours. There is no yellow: --pink is the highlighter, --sky the current item */
  --sky: #E8EEFF;
  --blush: #FDECEF;
  --pink: #F9C9D1;
  --on-pink: #14307F;
  --soft: #E8EEFF;
  --muted: #4E5D8C;
  --logo-fill: #FFFFFF;

  /* Two type stacks: Latin (Japanese characters fall through to the Japanese fonts) and Japanese. */
  --f-sans: "Helvetica Neue", Helvetica, Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --f-ja: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;

  --line: 34px;           /* notebook rule spacing */
  --gutter: 16px;
  --col: 1120px;
  --margin-x: 56px;       /* red margin line, from the sheet's left edge */
  --text-x: 96px;         /* text starts this far in from the sheet's left edge */
  color-scheme: light;
}

/* night: the kit's night variant. Navy paper, white ink, Maru with a navy fill */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0B1A45;
    --rule: #142B6E;
    --margin: #5A2A50;
    --ink: #FFFFFF;
    --ballpoint: #C9D6FF;
    --ballpoint-hover: #E8EEFF;
    --press: #5A72C4;
    --on-ballpoint: #0B1A45;
    --red: #FF7A66;
    --sky: #1B3A8C;
    --blush: #3A2A63;
    --pink: #F9C9D1;
    --on-pink: #14307F;
    --soft: #1B3A8C;
    --muted: #B8C4EC;
    --logo-fill: #14307F;
    color-scheme: dark;
  }
}

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

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

body {
  position: relative;
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Plain white page (no notebook rules or margin line, the owner, 5 Oct 2026). */
body::before {
  display: none;
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: max(calc(var(--gutter) / 2), calc((100% - var(--col)) / 2 + var(--margin-x)));
  width: 2px;
  background: var(--margin);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--ballpoint); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--ballpoint-hover); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 10px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  background: var(--pink);
  color: var(--on-pink);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
}
.skip:focus { top: 12px; }

/* A sheet is the page column, text indented past the margin line. */
.sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding-left: var(--text-x);
  padding-right: 48px;
}

h1, h2 {
  font-family: var(--f-sans);
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(28px, 3.2vw, 38px);
  line-height: 1.15;
}

.section-lede {
  margin: 10px 0 0;
  max-width: 56ch;
  color: var(--muted);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: min(100svh, 940px);
  min-height: min(100vh, 940px);
  min-height: min(100svh, 940px);
}

.hero-text {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  column-gap: 32px;
  padding-top: 24px;
}

.wordmark {
  grid-column: 1 / -1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding-right: 6px;
  text-decoration: none;
  color: var(--ballpoint);
}
.wordmark:hover { color: var(--ballpoint); }
/* The kit's horizontal logo (logo-horizontal.svg) inlined so it can follow the theme. It is a picture: no font loads for it. */
.logo-h { display: block; height: 64px; width: auto; overflow: visible; }
.logo-h [fill="#fff"] { fill: var(--logo-fill); }
.logo-h [stroke="#14307f"] { stroke: var(--ballpoint); }
.footer-wm { display: block; height: 30px; width: auto; margin: 0 0 12px; overflow: visible; }
.footer-wm path { fill: var(--logo-fill); stroke: var(--ballpoint); }

.hero-copy {
  align-self: center;
  padding: 40px 0 32px;
  max-width: 640px;
}

.headline {
  font-size: clamp(44px, 7vw, 88px);
  line-height: 1.04;
}

/* The red-pen ◯: one loop drawn with a ballpoint-red stroke, slightly rotated. */
.redpen {
  position: relative;
  display: inline-block;
  width: 0.84em;
  height: 0.74em;
  margin: 0 0.06em 0 0.08em;
  vertical-align: -0.04em;
}
.redpen-glyph {
  position: absolute;
  inset: 0;
  color: transparent;
  overflow: hidden;
  font-size: 0.8em;
  line-height: 1;
}
.redpen-ring {
  position: absolute;
  left: -12%;
  top: -14%;
  width: 124%;
  height: 128%;
  overflow: visible;
  transform: rotate(-7deg);
}
.redpen-ring path {
  fill: none;
  stroke: var(--red);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .redpen-ring path { animation: draw-ring 0.9s cubic-bezier(.55, .1, .3, 1) 0.35s both; }
}
@keyframes draw-ring {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.hero-ja {
  margin: 18px 0 0;
  font-family: var(--f-ja);
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.5;
  color: var(--ballpoint);
}

.hero-lede {
  margin: 14px 0 0;
  max-width: 50ch;
  font-size: clamp(18px, 1.6vw, 21px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 12px 28px;
  background: var(--ballpoint);
  color: var(--on-ballpoint);
  border-radius: 18px 20px 17px 21px;
  box-shadow: 0 5px 0 var(--press);
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.1;
  text-decoration: none;
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn:hover { color: var(--on-ballpoint); background: var(--ballpoint-hover); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--press); }

.textlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

.hero-maru {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  position: relative;
  width: 340px;
  height: 354px;
  margin-top: -20px;
  line-height: 0;
}
/* The ring is centred on the drawn figure, not on the box: the shi pose at 340px
   has its centre at 174,184. */
.hero-maru::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 29px;
  width: 320px;
  height: 310px;
  border: 5px solid var(--red);
  border-radius: 50% 48% 52% 50%;
  transform: rotate(-8deg);
  opacity: 0.85;
}
.hero-maru svg { position: relative; }

/* The crowd walks on the bottom band of the hero page. */
.crowd {
  position: relative;
  z-index: 1;
  height: clamp(190px, 26vh, 260px);
  border-bottom: 2.5px solid var(--ballpoint);
}
.crowd-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Sections ---------- */

main { position: relative; z-index: 1; }

.section {
  padding-top: 88px;
  padding-bottom: 8px;
}

/* Faces */
.faces {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 32px 12px;
}
.face {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.face-art { display: block; width: 100%; max-width: 112px; line-height: 0; }
.face-art svg { display: block; width: 100%; height: auto; }
.face-kana {
  font-family: var(--f-ja);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.3;
  color: var(--ballpoint);
  margin-top: 4px;
}
.face-label {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--muted);
  margin-bottom: 4px;
}
.face-text {
  font-size: 16px;
  line-height: 1.5;
  max-width: 16ch;
}

/* A night with Maru: the plan card from the Today screen. */
.night {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 24px 56px;
  align-items: start;
}
.plan {
  list-style: none;
  margin: 0;
  padding: 18px 22px;
  background: var(--paper);
  border: 2.5px solid var(--ballpoint);
  border-radius: 22px 26px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.plan li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 10px 10px;
  margin: 0 -10px;
  border-radius: 12px;
}
.plan li:first-child { background: var(--sky); }
.plan-n {
  flex: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid var(--ballpoint);
  border-radius: 50%;
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--ballpoint);
}
.plan li:last-child .plan-n {
  border: 3px solid var(--red);
  color: var(--red);
  transform: rotate(-8deg);
}
.plan-body { display: flex; flex-direction: column; min-width: 0; padding-top: 2px; }
.plan-body b {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.35;
}
.plan-body span { font-size: 16.5px; line-height: 1.55; color: var(--muted); }

/* What's inside */
.inside {
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 40px;
}
.inside div { min-width: 0; }
.inside dt {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.35;
  color: var(--ballpoint);
}
.inside dd { margin: 4px 0 0; font-size: 17px; line-height: 1.65; max-width: 36ch; }

/* Closing */
.closing {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 96px;
}
.closing-art { flex: none; line-height: 0; width: 140px; height: 146px; }
.closing .hero-actions { margin-top: 18px; }

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  margin-top: 88px;
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 2.5px solid var(--ballpoint);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}
.footer p { margin: 4px 0 0; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin-bottom: 8px;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  font-size: 15.5px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .hero-maru { display: none; }
  .hero-text { grid-template-columns: minmax(0, 1fr); }
  .faces { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .night { grid-template-columns: minmax(0, 1fr); }
  .inside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  :root { --text-x: 40px; --margin-x: 22px; }
  .sheet { padding-right: 24px; }
}

@media (max-width: 560px) {
  :root { --text-x: var(--gutter); --line: 32px; }
  body { font-size: 16.5px; }
  body::before { left: 8px; width: 1.5px; }
  .sheet { padding-left: calc(var(--gutter) + 6px); padding-right: var(--gutter); }
  .hero { min-height: 0; }
  .hero-text { padding-top: 14px; }
  .logo-h { height: 52px; }
  .hero-copy { padding: 28px 0 24px; }
  .headline { font-size: clamp(42px, 13vw, 56px); }
  .crowd { height: 168px; }
  .section { padding-top: 64px; }
  .faces { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 8px; }
  .face-text { font-size: 15px; }
  .inside { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .plan { padding: 12px 14px; }
  .plan li { gap: 12px; }
  .closing { flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 72px; }
  .footer { margin-top: 64px; }
}

/* kanji look-up on the landing page (the app has the full pop-up) */
.kj-tip{position:relative;cursor:help;text-decoration:underline dotted;text-underline-offset:5px;text-decoration-thickness:1.5px;border-radius:3px}
.kj-tip:hover,.kj-tip:focus-visible{background:var(--pink);color:var(--on-pink);outline:none}
.kj-pop{display:none;position:absolute;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%);white-space:nowrap;background:var(--paper);color:var(--ink);border:2px solid var(--ballpoint);border-radius:12px;padding:8px 12px;font-size:16px;line-height:1.4;box-shadow:0 10px 24px -10px rgba(20,48,127,.35);z-index:5;text-align:left}
.kj-pop b{font-size:20px;margin-right:6px}
.kj-pop small{display:block;font-size:13px;color:var(--muted)}
.kj-tip:hover .kj-pop,.kj-tip:focus .kj-pop{display:block}

/* night: white Maru keeps a thin white edge so its navy lines read on navy (the owner, 5 Oct 2026) */
@media (prefers-color-scheme: dark) { [data-pose] svg, [data-pose-big] svg, [data-pose-closing] svg { filter: drop-shadow(0 0 .7px #fff) drop-shadow(0 0 .7px #fff); } }

.hero-levels { margin: -6px 0 0; font-size: 14px; color: var(--muted, #4E5D8C); }

/* the Maru Menkyo icon link under the hero actions: Maru's driving art from the Menkyo app, its name next to it */
.menkyo-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 18px; padding: 4px 14px 4px 8px; border: 2px solid var(--rule); border-radius: 999px; background: var(--paper); color: var(--ballpoint); font-size: 15px; font-weight: 700; text-decoration: none; }
.menkyo-link:hover { background: var(--soft); color: var(--ballpoint); }
.menkyo-link img { display: block; flex: none; height: 30px; width: auto; }
@media (prefers-color-scheme: dark) { .menkyo-link img { filter: drop-shadow(0 0 .7px #fff) drop-shadow(0 0 .7px #fff); } }
