:root {
  color-scheme: light dark;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-soft: #f1f0ed;
  --text: #1b1a18;
  --body-text: #45413c;
  --muted: #6d675f;
  --line: #ddd8d1;
  --accent: #e8690a;
  --accent-strong: #b84b00;
  --accent-soft: #fff0e4;
  --header-bg: rgba(247, 247, 245, 0.9);
  --header-border: rgba(221, 216, 209, 0.85);
  --button-primary-text: #ffffff;
  --button-primary-hover: #38332e;
  --button-secondary-hover: #fcfbf9;
  --button-secondary-hover-line: #c9c1b8;
  --section-soft-end: #f6f4f1;
  --note-border: #f2c8a7;
  --note-text: #8a3d08;
  --screenshot-border: rgba(221, 216, 209, 0.9);
  --focus-ring: rgba(232, 105, 10, 0.45);
  --shadow: 0 18px 50px rgba(40, 31, 24, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shell: 1160px;
}

:root[data-theme="light"] { color-scheme: light; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141414;
  --surface: #202020;
  --surface-soft: #181818;
  --text: #f2f1ef;
  --body-text: #d0ccc6;
  --muted: #aaa49c;
  --line: #34312e;
  --accent: #e8690a;
  --accent-strong: #ff9a4c;
  --accent-soft: #382416;
  --header-bg: rgba(20, 20, 20, 0.9);
  --header-border: rgba(52, 49, 46, 0.9);
  --button-primary-text: #151515;
  --button-primary-hover: #e2ddd7;
  --button-secondary-hover: #292725;
  --button-secondary-hover-line: #49443f;
  --section-soft-end: #202020;
  --note-border: #694325;
  --note-text: #ffc18f;
  --screenshot-border: rgba(73, 68, 63, 0.9);
  --focus-ring: rgba(255, 154, 76, 0.55);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #141414;
    --surface: #202020;
    --surface-soft: #181818;
    --text: #f2f1ef;
    --body-text: #d0ccc6;
    --muted: #aaa49c;
    --line: #34312e;
    --accent: #e8690a;
    --accent-strong: #ff9a4c;
    --accent-soft: #382416;
    --header-bg: rgba(20, 20, 20, 0.9);
    --header-border: rgba(52, 49, 46, 0.9);
    --button-primary-text: #151515;
    --button-primary-hover: #e2ddd7;
    --button-secondary-hover: #292725;
    --button-secondary-hover-line: #49443f;
    --section-soft-end: #202020;
    --note-border: #694325;
    --note-text: #ffc18f;
    --screenshot-border: rgba(73, 68, 63, 0.9);
    --focus-ring: rgba(255, 154, 76, 0.55);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  transform: translateY(-180%);
  background: var(--text);
  color: var(--button-primary-text);
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
.narrow { max-width: 760px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--header-border);
}
.nav-wrap {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--accent), #ff9a4c);
  color: white;
  box-shadow: 0 8px 20px rgba(232, 105, 10, 0.24);
}
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.94rem;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--text); }

.theme-toggle {
  appearance: none;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
}
.theme-toggle:hover {
  color: var(--text);
  background: var(--button-secondary-hover);
  border-color: var(--button-secondary-hover-line);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  gap: clamp(38px, 7vw, 90px);
  align-items: center;
  padding-top: clamp(64px, 9vw, 116px);
  padding-bottom: clamp(70px, 10vw, 124px);
}
.hero-copy { max-width: 700px; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h1, h2, h3 {
  margin-top: 0;
  line-height: 1.08;
  letter-spacing: -0.035em;
}
h1 {
  margin-bottom: 22px;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  max-width: 13ch;
}
h2 { font-size: clamp(1.8rem, 3.2vw, 2.8rem); }
h3 { font-size: 1.2rem; }
.lede {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 750;
}
.button-primary {
  background: var(--text);
  color: var(--button-primary-text);
  box-shadow: 0 10px 26px rgba(40, 31, 24, 0.15);
}
.button-primary:hover { background: var(--button-primary-hover); }
.button-secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}
.button-secondary:hover {
  background: var(--button-secondary-hover);
  border-color: var(--button-secondary-hover-line);
}

.hero-device {
  position: relative;
  max-width: 360px;
  justify-self: center;
}
.hero-device::before {
  content: "";
  position: absolute;
  inset: 8% -16% 3%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(232, 105, 10, 0.22), rgba(232, 105, 10, 0) 68%);
  filter: blur(8px);
}
.hero-device img {
  width: 100%;
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.section { padding-block: clamp(64px, 9vw, 108px); }
.section-soft {
  background: linear-gradient(180deg, var(--surface-soft), var(--section-soft-end));
  border-block: 1px solid var(--line);
}
.section-heading { max-width: 760px; margin-bottom: 40px; }
.section-heading.compact { margin-bottom: 28px; }
.section-heading h2 { margin-bottom: 14px; }
.section-heading p:not(.eyebrow) { color: var(--muted); margin: 0; font-size: 1.08rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.feature-card {
  min-height: 215px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.feature-card h3 { margin: 20px 0 10px; }
.feature-card p { margin: 0; color: var(--muted); }
.feature-number {
  display: inline-flex;
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(32px, 8vw, 100px);
  align-items: start;
}
.split h2 { margin-bottom: 0; max-width: 13ch; }
.prose-short { color: var(--muted); font-size: 1.05rem; }
.prose-short h3 { color: var(--text); margin: 28px 0 8px; }
.prose-short h3:first-child { margin-top: 0; }
.prose-short p { margin-top: 0; }

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  gap: 18px;
  overflow-x: auto;
  padding: 8px 4px 28px;
  scroll-snap-type: x proximity;
}
.screenshot-grid figure {
  margin: 0;
  min-width: 210px;
  scroll-snap-align: start;
}
.screenshot-grid img {
  width: 100%;
  border-radius: 26px;
  border: 1px solid var(--screenshot-border);
  box-shadow: 0 16px 38px rgba(40, 31, 24, 0.12);
}

.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(28px, 5vw, 50px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.callout h2 { margin-bottom: 10px; font-size: clamp(1.8rem, 4vw, 3rem); }
.callout p:not(.eyebrow) { max-width: 58ch; margin: 0; color: var(--muted); }
.callout .button { flex: 0 0 auto; }

.docs-main { padding-bottom: 80px; }
.docs-hero {
  padding-top: clamp(58px, 8vw, 92px);
  padding-bottom: 48px;
}
.docs-hero h1 { max-width: none; font-size: clamp(2.4rem, 4.8vw, 4rem); }
.updated { margin-top: 20px; color: var(--muted); font-size: 0.9rem; }

.docs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  gap: clamp(42px, 7vw, 92px);
  align-items: start;
}
.docs-toc {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 8px;
  padding: 16px 0;
}
.docs-toc strong { margin-bottom: 4px; font-size: 0.88rem; }
.docs-toc a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.docs-toc a:hover { color: var(--accent-strong); }

.docs-content section,
.policy section {
  padding-block: 10px 34px;
  scroll-margin-top: 96px;
}
.docs-content section + section,
.policy section + section {
  border-top: 1px solid var(--line);
  padding-top: 38px;
}
.docs-content h2,
.policy h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin-bottom: 16px;
}
.docs-content h3 { margin: 26px 0 8px; font-size: 1.06rem; letter-spacing: -0.015em; }
.docs-content p,
.docs-content li,
.policy p,
.policy li { color: var(--body-text); }
.docs-content ul,
.docs-content ol,
.policy ul { padding-left: 1.25rem; }
.docs-content li + li,
.policy li + li { margin-top: 8px; }

.note {
  margin: 22px 0 6px;
  padding: 16px 18px;
  background: var(--accent-soft);
  border: 1px solid var(--note-border);
  border-radius: var(--radius-sm);
  color: var(--note-text);
}
.policy { padding-bottom: 44px; }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.footer-wrap {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-wrap p { margin: 0; }
.footer-wrap nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-wrap a { text-decoration: none; }
.footer-wrap a:hover { color: var(--text); }

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}
.error-card {
  width: min(100%, 620px);
  padding: 40px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.error-card h1 { max-width: none; font-size: clamp(3rem, 8vw, 6rem); margin-bottom: 10px; }
.error-card p { color: var(--muted); margin-bottom: 24px; }
.error-theme-toggle { margin-top: 14px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-device { max-width: 310px; }
  .split { grid-template-columns: 1fr; }
  .split h2 { max-width: 18ch; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-toc {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
  }
  .docs-toc strong { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .shell { width: min(calc(100% - 28px), var(--shell)); }
  .site-header { position: static; }
  .nav-wrap { min-height: auto; padding-block: 15px; align-items: flex-start; }
  .nav { gap: 12px 16px; flex-wrap: wrap; justify-content: flex-end; font-size: 0.86rem; }
  .hero { padding-top: 52px; }
  h1 { font-size: clamp(2.65rem, 13vw, 4rem); }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 0; }
  .callout { align-items: flex-start; flex-direction: column; }
  .callout .button { width: 100%; }
  .docs-toc { grid-template-columns: 1fr; }
  .footer-wrap { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 24px; }
}

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

/* -------------------------------------------------------------------------- */
/* MotoWave home — intentionally distinct from the utility/document pages.    */
/* -------------------------------------------------------------------------- */

.home {
  --home-bg: var(--bg);
  --home-surface: var(--surface-soft);
  --home-text: var(--text);
  --home-muted: var(--muted);
  --home-line: var(--line);
  --home-accent: var(--accent);
  margin: 0;
  background: var(--home-bg);
  color: var(--home-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  line-height: 1.5;
}

.home a { color: inherit; }
.home .skip-link {
  background: var(--home-text);
  color: var(--home-bg);
}

.home-shell {
  width: min(calc(100% - 48px), 1220px);
  margin-inline: auto;
}

.home-header {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--home-line);
  background: var(--home-bg);
}

.home-nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.home-brand {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.home-nav nav,
.home-footer nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.home-nav nav a,
.home-footer a,
.home-end a {
  color: var(--home-muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.home-nav nav a:hover,
.home-footer a:hover,
.home-end a:hover,
.home-links a:hover,
.home-origin a:hover {
  color: var(--home-text);
}

.home-hero {
  padding: clamp(72px, 11vw, 150px) 0 clamp(56px, 8vw, 96px);
}

.home-kicker {
  margin: 0 0 18px;
  color: var(--home-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-hero h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(3rem, 7.5vw, 6.4rem);
  line-height: 0.88;
  letter-spacing: -0.065em;
  font-weight: 820;
}

.home-intro-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
  margin-top: clamp(42px, 7vw, 82px);
  padding-top: 28px;
  border-top: 1px solid var(--home-line);
}

.home-intro-row > p {
  max-width: 650px;
  margin: 0;
  color: var(--home-muted);
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 24px;
}

.home-links a {
  color: var(--home-text);
  font-weight: 750;
  text-decoration: none;
}

.screen-stage {
  overflow: hidden;
  padding: 16px 0 clamp(90px, 12vw, 150px);
}

.screen-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: clamp(10px, 2.4vw, 32px);
  max-width: 980px;
  margin-inline: auto;
}

.screen {
  margin: 0;
  min-width: 0;
}

.screen img,
.detail-screens img {
  width: 100%;
  border: 1px solid var(--home-line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.screen-left {
  transform: translateY(38px) rotate(-2deg);
}

.screen-center {
  position: relative;
  z-index: 2;
}

.screen-right {
  transform: translateY(38px) rotate(2deg);
}

.home-ledger,
.home-origin,
.home-end {
  border-top: 1px solid var(--home-line);
}

.home-ledger {
  padding: clamp(76px, 10vw, 124px) 0;
}

.ledger-heading {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  margin-bottom: 34px;
}

.ledger-heading h2,
.listening-copy h2,
.home-origin h2 {
  margin: 0;
  color: var(--home-text);
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.feature-ledger {
  border-bottom: 1px solid var(--home-line);
}

.feature-ledger article {
  display: grid;
  grid-template-columns: 90px minmax(180px, 0.55fr) minmax(260px, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 28px 0;
  border-top: 1px solid var(--home-line);
}

.feature-ledger span {
  color: var(--home-accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.feature-ledger h3 {
  margin: 0;
  color: var(--home-text);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.feature-ledger p {
  max-width: 650px;
  margin: 0;
  color: var(--home-muted);
}

.listening-section {
  padding: clamp(76px, 10vw, 128px) 0;
  background: var(--home-surface);
}

.listening-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  gap: clamp(48px, 9vw, 118px);
  align-items: center;
}

.listening-copy p:last-child {
  max-width: 470px;
  margin: 28px 0 0;
  color: var(--home-muted);
  font-size: 1.05rem;
}

.detail-screens {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 30px);
  align-items: end;
}

.detail-screens figure { margin: 0; }
.detail-screens figure:last-child { transform: translateY(34px); }

.promise-strip {
  border-top: 1px solid var(--home-line);
  border-bottom: 1px solid var(--home-line);
}

.promise-strip .home-shell {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.promise-strip span {
  padding: 24px 18px;
  color: var(--home-text);
  font-size: clamp(0.95rem, 1.8vw, 1.18rem);
  font-weight: 750;
  text-align: center;
  border-right: 1px solid var(--home-line);
}

.promise-strip span:first-child { border-left: 1px solid var(--home-line); }

.home-origin {
  padding: clamp(76px, 10vw, 120px) 0;
}

.origin-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1fr);
  gap: clamp(48px, 9vw, 118px);
}

.origin-copy {
  max-width: 680px;
  color: var(--home-muted);
  font-size: 1.04rem;
}

.origin-copy p { margin: 0 0 18px; }
.origin-copy a {
  color: var(--home-text);
  text-underline-offset: 4px;
}

.home-end {
  padding: 30px 0;
}

.end-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.end-grid > p {
  margin: 0;
  color: var(--home-text);
  font-weight: 700;
}

.end-grid > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 22px;
}

.home-footer {
  border-top: 1px solid var(--home-line);
  padding: 30px 0 42px;
  color: var(--home-muted);
}

.home-footer .home-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.home-footer p {
  margin: 0;
  font-size: 0.88rem;
}

@media (max-width: 820px) {
  .home-intro-row,
  .ledger-heading,
  .listening-grid,
  .origin-grid {
    grid-template-columns: 1fr;
  }

  .home-links { justify-content: flex-start; }

  .feature-ledger article {
    grid-template-columns: 54px minmax(180px, 0.55fr) minmax(220px, 1fr);
  }

  .listening-copy { max-width: 620px; }
}

@media (max-width: 620px) {
  .home-shell {
    width: min(calc(100% - 28px), 1220px);
  }

  .home-nav {
    min-height: auto;
    padding: 18px 0;
    align-items: flex-start;
  }

  .home-nav nav {
    justify-content: flex-end;
    gap: 10px 14px;
  }

  .home-hero {
    padding-top: 62px;
  }

  .home-hero h1 {
    font-size: clamp(3rem, 15vw, 4.8rem);
  }

  .screen-stack {
    width: 165%;
    margin-left: -32%;
    gap: 12px;
  }

  .screen-left,
  .screen-right {
    transform: translateY(24px);
  }

  .screen img,
  .detail-screens img {
    border-radius: 22px;
  }

  .feature-ledger article {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px 16px;
    padding: 24px 0;
  }

  .feature-ledger article p {
    grid-column: 2;
  }

  .detail-screens {
    gap: 12px;
  }

  .detail-screens figure:last-child {
    transform: translateY(20px);
  }

  .promise-strip .home-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .promise-strip span:nth-child(2) {
    border-right: 1px solid var(--home-line);
  }

  .promise-strip span:nth-child(-n + 2) {
    border-bottom: 1px solid var(--home-line);
  }

  .end-grid,
  .home-footer .home-shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .end-grid > div { justify-content: flex-start; }
}

