/* MTRO Run — public site styles. Calm, premium, mobile-first. */

:root {
  --bg: #0a0d13;
  --surface: #12161d;
  --surface-2: #1a1f27;
  --fg: #f4f5f7;
  --muted: #9a9fa8;
  --muted-2: #80858f;
  --border: #262b33;
  --hairline: rgba(255, 255, 255, 0.07);

  --lime: #b1f758;
  --lime-fg: #0c121a;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container: 1180px;
  --radius-md: 18px;
  --radius-lg: 26px;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
  font-weight: 600;
}

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(24px, 6vw, 48px);
}

section { position: relative; }

.section-pad { padding-block: clamp(72px, 11vw, 140px); }
.section-pad-sm { padding-block: clamp(56px, 8vw, 96px); }

.hairline-top { border-top: 1px solid var(--hairline); }
.hairline-bottom { border-bottom: 1px solid var(--hairline); }

.section-head {
  max-width: 680px;
  margin-bottom: clamp(36px, 6vw, 64px);
}

.section-head h2 {
  font-size: clamp(28px, 4.2vw, 42px);
}

.kicker {
  display: block;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--muted-2);
  margin-bottom: 10px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 100;
  background: var(--lime);
  color: var(--lime-fg);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus { top: 12px; }

/* Focus states */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 13, 19, 0.7);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--hairline);
  background: rgba(10, 13, 19, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.wordmark {
  flex-shrink: 0;
  text-decoration: none;
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}

.site-nav::-webkit-scrollbar { display: none; }

.site-nav a {
  flex-shrink: 0;
  text-decoration: none;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  padding: 8px 14px;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.site-nav a:hover { color: var(--fg); }
.site-nav a.is-active { color: var(--lime); }

@media (max-width: 560px) {
  .site-nav { display: none; }
}

.header-cta {
  flex-shrink: 0;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 4px;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.header-cta:hover { color: var(--fg); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--lime);
  color: var(--lime-fg);
}

.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); opacity: 0.92; }

.btn-outline {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}

.btn-outline:hover { border-color: var(--muted-2); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Hero */
.hero {
  padding-block: clamp(64px, 11vw, 128px) clamp(56px, 9vw, 104px);
}

.hero-grid {
  display: grid;
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
}

.hero h1 {
  font-size: clamp(40px, 6.4vw, 76px);
  max-width: 14ch;
}

.hero-lede {
  margin-top: 24px;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--muted);
  max-width: 46ch;
}

.hero .btn-row { margin-top: 36px; }

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 32px);
}

.hero-visual svg { width: 100%; max-width: 320px; height: auto; }

@keyframes ring-breathe {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 0.5; }
}

.ring-progress {
  animation: ring-breathe 4.5s ease-in-out infinite;
}

/* Principles */
.principles {
  display: grid;
  gap: clamp(28px, 5vw, 40px);
  padding-block: clamp(48px, 7vw, 72px);
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 760px) {
  .principles { grid-template-columns: repeat(4, 1fr); }
}

.principle-item h3 {
  font-size: 16px;
  font-weight: 600;
}

.principle-item p {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--muted-2);
}

/* Journey */
.journey {
  display: grid;
  gap: 32px;
  border-top: 1px solid var(--hairline);
  padding-top: clamp(28px, 4vw, 40px);
}

@media (min-width: 860px) {
  .journey { grid-template-columns: repeat(5, 1fr); }
}

.journey-step { padding-right: 20px; }

.journey-step h3 {
  font-size: 18px;
  font-weight: 600;
}

.journey-step p {
  margin-top: 10px;
  font-size: 15px;
  color: var(--muted);
  max-width: 26ch;
}

/* Two-sided value */
.value-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 820px) {
  .value-grid { grid-template-columns: 1fr 1fr; }
}

.value-panel {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 40px);
}

.value-panel ul {
  margin-top: 22px;
  display: grid;
  gap: 16px;
}

.value-panel li {
  font-size: 16px;
  color: var(--fg);
  line-height: 1.5;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}

.value-panel li:first-child { padding-top: 0; border-top: none; }

/* Product surfaces */
.surfaces {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .surfaces { grid-template-columns: 1fr 1fr; }
}

.surface-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.surface-card h3 {
  font-size: 19px;
  font-weight: 600;
}

.product-note { margin-top: 28px; }

/* Runner phone mock */
.mock-phone {
  align-self: center;
  width: 100%;
  max-width: 240px;
  border-radius: 26px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 14px;
}

.mock-phone-screen {
  border-radius: 16px;
  background: var(--bg);
  overflow: hidden;
  border: 1px solid var(--hairline);
  padding-bottom: 16px;
}

.mock-topbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px 0;
}

.mock-topbar span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
}

.mock-hero {
  margin: 14px 16px 0;
  height: 90px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
}

.mock-progress {
  margin: 16px 16px 0;
  height: 5px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.mock-progress span {
  display: block;
  height: 100%;
  width: 58%;
  background: var(--lime);
  border-radius: 999px;
}

/* Control dashboard mock */
.mock-desktop {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.mock-desktop-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
}

.mock-desktop-bar span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--border);
}

.mock-desktop-body {
  display: grid;
  grid-template-columns: 72px 1fr;
  min-height: 190px;
}

.mock-sidebar {
  border-right: 1px solid var(--hairline);
  padding: 18px 14px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.mock-line {
  display: block;
  height: 5px;
  width: 100%;
  border-radius: 999px;
  background: var(--border);
}

.mock-line.is-active { background: var(--lime); opacity: 0.7; }

.mock-main {
  padding: 18px;
  display: flex;
  align-items: stretch;
}

.mock-chart {
  flex: 1;
  display: flex;
  align-items: end;
  gap: 8px;
  min-height: 96px;
}

.mock-chart i {
  display: block;
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: var(--surface-2);
}

.mock-chart i:nth-child(1) { height: 35%; }
.mock-chart i:nth-child(2) { height: 60%; }
.mock-chart i:nth-child(3) { height: 45%; background: var(--lime); opacity: 0.75; }
.mock-chart i:nth-child(4) { height: 80%; }
.mock-chart i:nth-child(5) { height: 55%; }
.mock-chart i:nth-child(6) { height: 70%; }

/* Statement blocks (responsible data / founder) */
.data-statement,
.founder-statement {
  max-width: 640px;
}

.data-statement h2,
.founder-statement h2 {
  font-size: clamp(26px, 3.6vw, 36px);
}

.data-statement p,
.founder-statement p {
  margin-top: 18px;
  font-size: 17px;
  color: var(--muted);
}

/* Closing CTA */
.closing {
  border-top: 1px solid var(--hairline);
  text-align: center;
}

.closing h2 {
  font-size: clamp(28px, 4vw, 40px);
  max-width: 20ch;
  margin-inline: auto;
}

.closing p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 17px;
}

.closing .btn-row {
  justify-content: center;
  margin-top: 32px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 40px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  font-size: 14px;
  color: var(--muted-2);
}

.footer-inner .wordmark { font-size: 16px; color: var(--muted); }

.footer-meta {
  display: grid;
  gap: 6px;
  text-align: right;
}

.footer-meta a { color: var(--muted); text-decoration: none; }
.footer-meta a:hover { color: var(--lime); }

@media (max-width: 560px) {
  .footer-inner { flex-direction: column; }
  .footer-meta { text-align: left; }
}

/* 404 */
.error-page {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.error-page h1 {
  font-size: clamp(32px, 6vw, 52px);
  margin-top: 12px;
}

.error-page p {
  margin-top: 16px;
  color: var(--muted);
  max-width: 46ch;
  margin-inline: auto;
}

.error-page .btn-row {
  justify-content: center;
  margin-top: 32px;
}

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