/* ==========================================================================
   Japanese Flow — interim site stylesheet
   Brand tokens are fixed by the brand guideline. Do not invent new colours,
   do not lighten or darken these values.
   ========================================================================== */

:root {
  /* Brand palette */
  --b1: #5A70FA; /* Learning Sky   — primary   */
  --b2: #0D192F; /* Trust Flow Blue — secondary */
  --b3: #070C14; /* Deep Knowledge  — text      */
  --b4: #BFC8DF; /* Focus Mist      — surface   */
  --w1: #F2F2F2; /* Flow White      — surface + text */
  --g1: #A9FF02; /* Court Green     — accent, ONE per page */

  /* Type */
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Archivo", "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  --jp: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;

  /* Rhythm */
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 68rem;
  --rule: 1px solid rgba(7, 12, 20, 0.14);
  --rule-dark: 1px solid rgba(242, 242, 242, 0.18);
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--w1);
  color: var(--b3);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}

body[lang="ja"],
.jp { font-family: var(--jp); line-height: 1.85; }

/* --------------------------------------------------------------- structure */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.band--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.band--dark { background: var(--b2); color: var(--w1); }
.band--mist { background: var(--b4); color: var(--b3); }
.band + .band { border-top: var(--rule); }
.band--dark + .band { border-top: 0; }

/* ------------------------------------------------------------------- type */

h1, h2, h3 {
  font-family: var(--display);
  font-variation-settings: "wdth" 125;
  letter-spacing: -0.035em;
  line-height: 1.06;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 7.2vw, 5rem); font-weight: 600; }
h2 { font-size: clamp(1.85rem, 3.8vw, 2.9rem); font-weight: 600; }
h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

h1 .jp, h2 .jp, h3 .jp {
  font-variation-settings: normal;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--display);
  font-variation-settings: "wdth" 112;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--b1);
  margin: 0 0 1.25rem;
}

.band--dark .eyebrow { color: var(--b4); }

.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  max-width: 38ch;
  margin: 0 0 2rem;
}

p { margin: 0 0 1.1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

small, .fine { font-size: 0.875rem; line-height: 1.6; }
.muted { color: rgba(7, 12, 20, 0.62); }
.band--dark .muted { color: rgba(242, 242, 242, 0.66); }

/* The accent is the "aha" mark. Exactly one instance per page. */
.aha {
  color: var(--g1);
  font-variation-settings: "wdth" 125;
  font-weight: 600;
}

a { color: var(--b1); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--b2); }
.band--dark a { color: var(--b4); }
.band--dark a:hover { color: var(--w1); }

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

.band--dark :focus-visible { outline-color: var(--g1); }

/* ---------------------------------------------------------------- masthead */

.masthead {
  border-bottom: var(--rule);
  background: var(--w1);
  position: sticky;
  top: 0;
  z-index: 10;
}

.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.1rem;
}

.logotype {
  font-family: var(--display);
  font-variation-settings: "wdth" 125;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.045em;
  color: var(--b2);
  text-decoration: none;
}

.logotype:hover { color: var(--b1); }
.logotype img { display: block; height: 28px; width: auto; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  font-size: 0.95rem;
}

.nav a { color: var(--b3); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--b1); text-decoration: underline; }

/* ------------------------------------------------------------------- hero */

.hero { background: var(--b2); color: var(--w1); padding-block: clamp(4rem, 11vw, 8.5rem); }
.hero h1 { max-width: 22ch; margin-bottom: 1.5rem; }
.hero .lede { color: rgba(242, 242, 242, 0.82); max-width: 44ch; }

/* Signature: a single hairline that rises left-to-right, echoing the
   logo's bottom-left to top-right growth vector. */
.riser {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  height: 1px;
  border: 0;
  background: linear-gradient(to right, rgba(242, 242, 242, 0.1), rgba(242, 242, 242, 0.55));
  transform: rotate(-0.6deg);
  transform-origin: left center;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-variation-settings: "wdth" 112;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  padding: 0.85rem 1.6rem;
  border-radius: 2px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--solid { background: var(--b1); color: var(--w1); }
.btn--solid:hover { background: var(--w1); color: var(--b2); }

.btn--ghost { border-color: rgba(242, 242, 242, 0.45); color: var(--w1); }
.btn--ghost:hover { border-color: var(--w1); background: var(--w1); color: var(--b2); }

.btn--dark { background: var(--b2); color: var(--w1); }
.btn--dark:hover { background: var(--b1); color: var(--w1); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }

/* ------------------------------------------------------------------- grid */

.grid { display: grid; gap: clamp(1.75rem, 4vw, 3rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }

.card {
  background: var(--w1);
  border: var(--rule);
  border-radius: 3px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 1rem; }

.card--feature { border-color: var(--b1); border-width: 2px; }

.price {
  font-family: var(--display);
  font-variation-settings: "wdth" 125;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1;
  display: block;
  margin: 0.35rem 0 0.15rem;
  color: var(--b2);
}

.price-note { font-size: 0.85rem; color: rgba(7, 12, 20, 0.62); display: block; margin-bottom: 1.25rem; }

.ticks { list-style: none; margin: 0; padding: 0; font-size: 1rem; }
.ticks li { padding-left: 1.35rem; position: relative; margin-bottom: 0.55rem; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.55rem;
  height: 1px;
  background: var(--b1);
}

/* ------------------------------------------------------------------ steps */

.steps { counter-reset: step; display: grid; gap: 1.75rem; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: step; padding-top: 1.25rem; border-top: var(--rule); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--display);
  font-variation-settings: "wdth" 125;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--b1);
  display: block;
  margin-bottom: 0.5rem;
}
.steps strong { display: block; font-size: 1.1rem; margin-bottom: 0.3rem; }

/* ------------------------------------------------------------------ table */

.spec { width: 100%; border-collapse: collapse; margin: 0 0 2rem; font-size: 1rem; }
.spec caption { text-align: left; font-weight: 700; padding-bottom: 0.75rem; }
.spec th,
.spec td { text-align: left; vertical-align: top; padding: 0.95rem 1rem; border-bottom: var(--rule); }
.spec th {
  width: 32%;
  font-weight: 600;
  background: rgba(191, 200, 223, 0.32);
  white-space: normal;
}
.spec td p { max-width: none; }
.spec td p:last-child { margin-bottom: 0; }

@media (max-width: 34rem) {
  .spec th, .spec td { display: block; width: 100%; }
  .spec th { border-bottom: 0; }
  .spec td { padding-top: 0.5rem; }
}

/* ------------------------------------------------------------------- prose */

.prose h2 { margin-top: 2.75rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 2rem; }
.prose ul, .prose ol { max-width: 68ch; padding-left: 1.35rem; }
.prose li { margin-bottom: 0.5rem; }

.updated { font-size: 0.85rem; color: rgba(7, 12, 20, 0.62); margin-bottom: 2.5rem; }

/* ------------------------------------------------------------------ footer */

.footer { background: var(--b2); color: var(--w1); padding-block: clamp(3rem, 6vw, 4.5rem); }
.footer a { color: rgba(242, 242, 242, 0.82); text-decoration: none; font-weight: 400; }
.footer a:hover { color: var(--w1); text-decoration: underline; }

.footer__grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  padding-bottom: 2.5rem;
  border-bottom: var(--rule-dark);
}

.footer h2 {
  font-size: 0.75rem;
  font-variation-settings: "wdth" 112;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242, 242, 242, 0.55);
  margin-bottom: 1rem;
}

.footer ul { list-style: none; margin: 0; padding: 0; font-size: 0.95rem; }
.footer li { margin-bottom: 0.6rem; }

.footer__legal {
  padding-top: 2rem;
  font-size: 0.85rem;
  color: rgba(242, 242, 242, 0.62);
}

.footer__legal p { max-width: 60ch; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--g1);
  color: var(--b3);
  padding: 0.75rem 1rem;
  border-radius: 2px;
}

/* ==========================================================================
   Image slots — logo and portrait
   These degrade gracefully: if the image file is absent, the text logotype
   or the plain hero layout is shown instead.
   ========================================================================== */

.logotype img { display: block; height: 30px; width: auto; }
.logotype--text { display: none; }
.footer .logotype img { height: 26px; }

/* Split hero with portrait */
.hero__split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 56rem) {
  .hero__split { grid-template-columns: 1.15fr 0.85fr; }
}

.hero__split .lede { max-width: 40ch; }

/* No portrait available: fall back to the single-column hero. */
.hero__split--solo { grid-template-columns: 1fr; }
.hero__split--solo .lede { max-width: 44ch; }

.portrait {
  margin: 0;
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  background: var(--b1);
  aspect-ratio: 4 / 5;
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.band--mist .card { background: var(--w1); }
