/* ============================================================
   MTB LP — v3 colour layer (loaded after sections.css / motion.css)
   Per-section colour themes + creative typographic accents.
   Palette: ink / paper + yellow (たのしむ), blue (構造), green (成長), coral (未来)
   ============================================================ */
:root {
  --yellow: #FFD200;
  --blue: #1E4FD8;
  --green: #0B7A4B;
  --coral: #FF5A36;
}
[data-theme="yellow"] { --bg: var(--yellow); --fg: #000; --line: #000; }
[data-theme="blue"]   { --bg: var(--blue);   --fg: #fff; --line: #fff; }
[data-theme="green"]  { --bg: var(--green);  --fg: #fff; --line: #fff; }
[data-theme="coral"]  { --bg: var(--coral);  --fg: #000; --line: #000; }

/* colour chips */
.c-yellow { background: var(--yellow); }
.c-blue   { background: var(--blue); }
.c-green  { background: var(--green); }
.c-coral  { background: var(--coral); }

/* ---------- header: colour follows the section under it (set by motion.js) ---------- */
.site-header { mix-blend-mode: normal; color: var(--white); transition: color 0.3s var(--ease); }
.site-header[data-on="light"] { color: var(--black); }

/* ---------- HERO: palette ribbon ---------- */
.hero__ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 6px;
  gap: 4px;
  margin-top: var(--s-2);
  margin-bottom: 10px;
}
.hero { padding-bottom: var(--s-2); }
@media (min-width: 1024px) { .hero__logo { --glyph-h: min(calc((100vw - var(--margin) * 2) / 3.21), calc((var(--content-max) - var(--margin) * 2) / 3.21), 37svh); } }
.hero__copy-ja { margin-top: var(--s-2); }
.footer__ribbon { margin-top: var(--s-6); }
@media (prefers-reduced-motion: no-preference) {
  html.js.opening .hero__ribbon span { transform: scaleX(0); transform-origin: left; animation: ribbon-in 0.6s var(--ease) both; }
  html.js.opening .hero__ribbon span:nth-child(1) { animation-delay: 1.7s; }
  html.js.opening .hero__ribbon span:nth-child(2) { animation-delay: 1.8s; }
  html.js.opening .hero__ribbon span:nth-child(3) { animation-delay: 1.9s; }
  html.js.opening .hero__ribbon span:nth-child(4) { animation-delay: 2.0s; }
  @keyframes ribbon-in { to { transform: scaleX(1); } }
}

/* ---------- ABOUT: coloured connect lines ---------- */
.about .dg-lines path:nth-child(1) { stroke: var(--blue); }
.about .dg-lines path:nth-child(2) { stroke: var(--yellow); }
.about .dg-lines path:nth-child(3) { stroke: var(--green); }
.about .dg-lines path:nth-child(4) { stroke: var(--coral); }
.about .dg-lines path:nth-child(5) { stroke: var(--blue); }
.about .dg-lines path { stroke-width: 2; }

/* ---------- MISSION (yellow): letter cards in the three colours ---------- */
.mission .mission__letters { border-top: 0; gap: var(--gutter); }
.mission .letter {
  border: 0;
  padding: var(--s-4);
  color: #fff;
  --fg: #fff;
  --line: #fff;
}
.letter--blue { background: var(--blue); }
.letter--green { background: var(--green); }
.mission .letter--coral { background: var(--coral); color: #000; --fg: #000; --line: #000; }
.mission .letter__glyph { color: currentColor; }
.mission .letter__romaji { opacity: .8; }
@media (min-width: 1024px) {
  .mission .letter { padding: var(--s-4) var(--s-4) var(--s-6); border-top: 0; min-height: 420px; }
  .mission .letter__glyph { height: clamp(140px, 13vw, 220px); }
}
.mission__close { font-family: var(--font-display); font-size: clamp(24px, 3vw, 44px); text-transform: uppercase; letter-spacing: 0.02em; }

/* ---------- HOW WE WORK (blue): white structure ---------- */
.how .diagram--structure .dg-block rect { fill: rgba(255,255,255,0.08); }
.how .how__steps { border-color: rgba(255,255,255,0.5); }
.how .step { border-color: rgba(255,255,255,0.5); }
.how .step__num { opacity: .8; }

/* ---------- BUSINESS (green): huge outlined numerals ---------- */
.biz .biz-row__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 8vw, 128px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  opacity: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg);
  text-stroke: 1.5px var(--fg);
}
.biz .biz-row__name { display: grid; gap: 4px; align-items: start; }
.biz .biz-row--pillar .biz-row__name { grid-column: 1 / 8; }
.biz .biz-row__items { color: var(--fg); }
.biz .biz-row:hover, .biz .biz-row:focus-within { background: #fff; color: var(--green); --fg: var(--green); }
.biz .biz-row:hover .biz-row__num, .biz .biz-row:focus-within .biz-row__num { -webkit-text-stroke-color: var(--green); }

/* ---------- VISION (coral): outlined last line ---------- */
.line--outline { color: transparent; -webkit-text-stroke: 2px var(--fg); text-stroke: 2px var(--fg); }
.vision .vision__ja { font-size: clamp(28px, 3.4vw, 56px); }

/* ---------- NEXT (white): colour chips ---------- */
.theme-link { gap: 18px; justify-content: flex-start; }
.theme-link .chip { width: 14px; height: 14px; flex: 0 0 auto; }
.theme-link .arrow { margin-left: auto; }
.theme-link:hover, .theme-link:focus-visible { color: var(--blue); }

/* ---------- CONTACT (black): yellow accent ---------- */
.line--accent { color: var(--yellow); }
.contact .line-link__line { background: var(--yellow); }
.contact .line-link:hover .line-link__text, .contact .line-link:focus-visible .line-link__text { color: var(--yellow); }
.contact .submit .line-link__line { background: var(--fg); }

/* ---------- menu: colour dots per item ---------- */
.menu__link .num { color: var(--yellow); opacity: 1; }

/* ---------- BUSINESS JOIN (white): 8 tiles with colour bars ---------- */
.join__head { grid-column: 1 / -1; }
.join__stat { grid-column: 1 / -1; margin-top: var(--s-4); }
.join__count {
  font-family: var(--font-display); font-weight: 800; line-height: 0.8;
  font-size: clamp(88px, 11vw, 176px);
  color: transparent; -webkit-text-stroke: 2px var(--fg); text-stroke: 2px var(--fg);
  margin-right: 0.06em;
}
.join__stat-text { display: flex; flex-wrap: wrap; align-items: baseline; row-gap: 12px; font-family: var(--font-ja); font-weight: 700; font-size: clamp(22px, 2.6vw, 40px); line-height: 1.2; }
.join__unit { margin-right: 0.5em; white-space: nowrap; }
.join__en { font-family: var(--font-display); font-weight: 800; font-size: 1.25em; line-height: 1; margin: 0 0.08em; }
.join__stat-text .body { flex-basis: 100%; font-weight: 400; margin-top: 4px; }
.join__list-label { grid-column: 1 / -1; margin-top: var(--block-y); padding-bottom: var(--s-2); border-bottom: var(--line-w) solid var(--line); }
.join__list {
  grid-column: 1 / -1; margin-top: var(--s-4);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gutter);
}
.join__tile {
  position: relative; display: grid; align-content: start; gap: 6px;
  min-height: 150px; padding: var(--s-3);
  border: var(--line-w) solid var(--line);
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.join__bar { position: absolute; left: -1px; top: -1px; right: -1px; height: 6px; }
.join__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 8px; }
.join__num { opacity: .7; }
.join__office { font-family: var(--font-info); font-size: 10px; letter-spacing: var(--ls-info); opacity: .45; }
.join__list-label { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px var(--s-3); }
.join__offices { opacity: .5; }
.join__name { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 2.8vw, 40px); line-height: 1; text-transform: uppercase; letter-spacing: -0.01em; }
.join__ja { font-family: var(--font-ja); font-size: 14px; }
.join__tile:hover { background: var(--black); color: var(--white); }
@media (min-width: 1024px) {
  .join__head { grid-column: 1 / 7; }
  .join__stat { grid-column: 7 / 13; margin-top: 0; align-self: end; }
  .join__list { grid-template-columns: repeat(3, 1fr); }
  .join__tile { min-height: 200px; padding: var(--s-4); }
}

/* ---------- ABOUT body (desktop) ---------- */
@media (min-width: 1024px) { .about__body { grid-column: 7 / 12; margin-top: var(--s-6); } }

/* ---------- 0 → 1 motif ---------- */
.zto { display: inline-flex; align-items: baseline; gap: 0.08em; }
.zto__zero { color: transparent; -webkit-text-stroke: 2px var(--fg); text-stroke: 2px var(--fg); }
.zto__arrow { font-size: 0.55em; transform: translateY(-0.08em); }

/* ---------- HERO copy: M みんなで / T たのしく / B ビジネスしよう ---------- */
.hero-copy--mtb { text-transform: none; line-height: 1.02; }
.hero-copy--mtb .line {
  display: grid; grid-template-columns: 1.05em auto; align-items: baseline; column-gap: 0.18em;
}
.hero-copy__k { font-family: var(--font-display); font-weight: 800; color: var(--yellow); line-height: 0.9; }
.hero-copy__ja { font-family: var(--font-ja); font-weight: 700; font-size: 0.66em; line-height: 1.2; letter-spacing: 0.02em; white-space: nowrap; }

/* ---------- 05 COMPANY (blue): 会社概要 ---------- */
.company__head { grid-column: 1 / -1; }
.company__head .display { font-size: clamp(44px, 8vw, 128px); }
.company__ja { margin-top: var(--s-3); font-size: clamp(20px, 2.2vw, 32px); }
.company__list { grid-column: 1 / -1; margin-top: var(--block-y); }
.company__row {
  display: grid; gap: 6px;
  padding-block: var(--s-3);
  border-top: var(--line-w) solid var(--line);
}
.company__row:last-child { border-bottom: var(--line-w) solid var(--line); }
.company__list dd { margin: 0; }
.company__value {
  font-family: var(--font-ja); font-weight: 700;
  font-size: clamp(18px, 2vw, 26px); line-height: 1.5;
}
.company__value--name { font-size: clamp(22px, 2.6vw, 34px); }
.company__en {
  display: block; margin-top: 2px;
  font-family: var(--font-display); font-weight: 800;
  font-size: 0.72em; letter-spacing: var(--ls-display); text-transform: uppercase;
  color: var(--yellow);
}
@media (min-width: 1024px) {
  .company__head .display { font-size: min(clamp(44px, 7vw, 112px), 26cqw); }
  .company__head { grid-column: 1 / 6; container-type: inline-size; position: sticky; top: calc(var(--header-h) + var(--s-4)); align-self: start; }
  .company__list { grid-column: 6 / 13; margin-top: 0; }
  .company__row { grid-template-columns: 11.5em 1fr; column-gap: var(--gutter); align-items: baseline; padding-block: var(--s-4); }
}
