/* ============================================================
   MTB LP — Base: reset, typography, grid, common components
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--black);
  color: var(--white);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-ja);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-feature-settings: "palt";
  overflow-x: clip;
  background: var(--black);
  color: var(--white);
}

img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

/* Focus — 2px outline with offset, adapts to black/white */
:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-info);
  font-size: 14px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; outline: 2px solid var(--black); outline-offset: 2px; }

/* ---------- Section frame ---------- */
.section {
  background: var(--bg);
  color: var(--fg);
  padding-block: var(--section-y);
}
.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--margin);
}
.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 0;
}
.grid > * { grid-column: 1 / -1; min-width: 0; }

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.display .line { display: block; }

.hero-copy {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-hero-copy);
  line-height: 0.95;
  letter-spacing: var(--ls-display);
  text-transform: uppercase;
}
.hero-copy .line { display: block; }

.ja-heading {
  font-family: var(--font-ja);
  font-weight: 700;
  font-size: var(--fs-ja-heading);
  line-height: var(--lh-ja);
}
.ja-sub {
  font-family: var(--font-ja);
  font-weight: 700;
  font-size: var(--fs-ja-sub);
  line-height: 1.5;
}
.body {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
.body + .body { margin-top: 1.4em; }

.label {
  font-family: var(--font-info);
  font-size: var(--fs-info);
  line-height: 1.4;
  letter-spacing: var(--ls-info);
  text-transform: uppercase;
}
.label--num { font-variant-numeric: tabular-nums; }

.section-label {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  margin-bottom: var(--block-y);
}
.section-label::after {
  content: "";
  flex: 1 1 auto;
  height: var(--line-w);
  background: var(--line);
  align-self: center;
  opacity: 0.35;
}

.rule { height: var(--line-w); background: var(--line); border: 0; margin: 0; }

/* ---------- Line link / CTA (text + line + arrow, no pill) ---------- */
.line-link {
  --gap: 24px;
  display: flex;
  align-items: center;
  gap: var(--gap);
  width: 100%;
  min-height: 44px;
  padding-block: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: var(--line-w) solid var(--line);
}
.line-link__text { flex: 0 0 auto; }
.line-link__line {
  flex: 1 1 auto;
  height: var(--line-w);
  background: var(--fg);
  transform-origin: left center;
}
.line-link__arrow { flex: 0 0 auto; transition: transform var(--dur-fast) var(--ease); }
.line-link:hover .line-link__arrow,
.line-link:focus-visible .line-link__arrow { transform: translateX(8px); }

/* ---------- Header ---------- */
/* Fixed header. mix-blend-mode: difference inverts it exactly on black/white
   sections (white on black, black on white), so no theme switching is needed. */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  mix-blend-mode: difference;
  pointer-events: none;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--margin);
  max-width: var(--content-max);
  margin-inline: auto;
  color: var(--white);
}
.site-header > * { pointer-events: auto; }
.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
}
.brand-logo { width: auto; height: 22px; color: currentColor; }
@media (min-width: 1024px) { .brand-logo { height: 26px; } }

.menu-btn,
.menu-close {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding-inline: 4px;
  font-family: var(--font-info);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Fullscreen menu ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--black);
  color: var(--white);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.menu[hidden] { display: none; }
.menu__inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 0 var(--margin) var(--s-6);
}
.menu__top {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.menu__list {
  margin-top: var(--s-8);
  border-top: var(--line-w) solid rgba(255,255,255,0.25);
}
.menu__list li { border-bottom: var(--line-w) solid rgba(255,255,255,0.25); }
.menu__link {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: baseline;
  gap: var(--s-2);
  padding-block: 18px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 6vw, 72px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  transition: padding-left var(--dur-fast) var(--ease);
}
.menu__link .num {
  font-family: var(--font-info);
  font-size: var(--fs-info);
  letter-spacing: var(--ls-info);
  opacity: 0.7;
}
.menu__link:hover, .menu__link:focus-visible { padding-left: 8px; }
.menu__copy {
  margin-top: auto;
  padding-top: var(--s-8);
  text-align: right;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 2.4vw, 32px);
  text-transform: uppercase;
}
body.menu-open { overflow: hidden; }

/* ---------- Form ---------- */
.field { display: grid; gap: 8px; }
.field + .field { margin-top: var(--s-4); }
.field__label {
  font-family: var(--font-info);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.field__req { font-size: 12px; margin-left: 0.5em; opacity: 0.8; white-space: nowrap; }
.field__opt { font-size: 12px; margin-left: 0.5em; opacity: 0.6; white-space: nowrap; }
.field__input {
  width: 100%;
  min-height: 48px;
  padding: 12px 0;
  background: transparent;
  border: 0;
  border-bottom: var(--line-w) solid var(--fg);
  border-radius: 0;
  color: var(--fg);
  font-size: 16px;
  line-height: 1.5;
  -webkit-appearance: none;
  appearance: none;
}
.field__input::placeholder { color: transparent; }
.field__input:focus-visible { outline-offset: 6px; }
textarea.field__input { min-height: 160px; resize: vertical; }
select.field__input {
  padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 8px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
select.field__input option { color: var(--black); background: var(--white); }
.field__input[aria-invalid="true"] { border-bottom-width: 2px; }
.field__error {
  font-family: var(--font-info);
  font-size: 14px;
  line-height: 1.5;
}
.field__error:empty { display: none; }
.field__hint { font-family: var(--font-info); font-size: 13px; opacity: 0.75; }

.field--check {
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: 12px;
}
.field--check input {
  width: 22px; height: 22px;
  margin: 2px 0 0;
  accent-color: var(--white);
}
.field--check .field__label { grid-column: 2; font-size: 15px; line-height: 1.6; }
.field--check .field__error { grid-column: 1 / -1; }
.field--check a { text-decoration: underline; text-underline-offset: 0.2em; }

.form-summary {
  padding: 16px 0;
  border-top: var(--line-w) solid var(--fg);
  border-bottom: var(--line-w) solid var(--fg);
  font-family: var(--font-info);
  font-size: 14px;
  margin-bottom: var(--s-4);
}
.form-summary[hidden] { display: none; }
.form-summary ul { margin-top: 8px; display: grid; gap: 4px; }
.form-summary a { text-decoration: underline; text-underline-offset: 0.2em; }

.form-notice {
  font-family: var(--font-info);
  font-size: 14px;
  line-height: 1.6;
  padding: 16px 0;
  border-top: var(--line-w) solid var(--fg);
}
.form-notice[hidden] { display: none; }
.form-status {
  min-height: 1.5em;
  font-family: var(--font-info);
  font-size: 15px;
  line-height: 1.6;
  margin-top: var(--s-3);
}

.submit {
  --gap: 24px;
  margin-top: var(--s-6);
  width: 100%;
  text-align: left;
  font-size: clamp(20px, 2vw, 28px);
}
.submit:disabled { cursor: not-allowed; opacity: 0.45; }
.submit:disabled .line-link__arrow { transform: none; }
