/* Marko landing page. Colours: docs/brand.md (Ultraviolet) and the app's neutrals (packages/shared/src/theme.ts). */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin-opsz-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin-ext-opsz-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-alt: #f6f5fa;
  --surface: #ffffff;
  --surface-sunk: #f4f4f5;
  --border: #e2e2e6;
  --border-strong: #b9bac0;
  --text: #120e24;
  --text-secondary: #5d6068;
  --text-tertiary: #6d7075;
  --violet: #5b33ff;
  --violet-deep: #3a0fa6;
  --violet-ink: #4a22e8;
  --violet-soft: #ece7ff;
  --on-violet: #ffffff;
  --accent-fill: linear-gradient(180deg, var(--violet), var(--violet-deep));
  --danger: #c93636;
  --change: #fff4d6;
  --run: #e8613c;
  --ride: #2f6fe4;
  --strength: #6c8e03;
  --rest: #b5b8be;
  --shadow: 0 1px 2px rgb(18 14 36 / 6%), 0 12px 32px -8px rgb(26 10 92 / 18%);
  --radius: 20px;
  --gutter: clamp(16px, 5vw, 40px);
  --max: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0920;
    --bg-alt: #110d29;
    --surface: #17132e;
    --surface-sunk: #1e1938;
    --border: #2a2550;
    --border-strong: #4a4470;
    --text: #eeebff;
    --text-secondary: #aaa6c4;
    --text-tertiary: #8f8aab;
    --violet: #8a6bff;
    --violet-deep: #5b33ff;
    --violet-ink: #a891ff;
    --violet-soft: #231a52;
    --on-violet: #0c0920;
    /* On-violet text on the dark gradient's bottom is 3.1:1, so accent surfaces with text stay flat (docs/brand.md). */
    --accent-fill: var(--violet);
    --danger: #ff6b6b;
    --change: #3a3216;
    --run: #ff7a55;
    --ride: #5b93ff;
    --strength: #a2d128;
    --rest: #5e6168;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 16px 40px -12px rgb(0 0 0 / 60%);
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-optical-sizing: auto;
  font-feature-settings: 'cv11', 'ss03';
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--violet-ink);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 8px 14px;
  background: var(--surface);
  border-radius: 10px;
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

/* Header and footer */

.site-header,
.site-footer,
main > section {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-header {
  padding-top: 28px;
  padding-bottom: 8px;
}

.logo {
  display: inline-block;
  line-height: 0;
}

.logo img {
  height: 34px;
  width: auto;
}

.site-footer {
  padding-top: 40px;
  padding-bottom: 48px;
  color: var(--text-tertiary);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-footer a {
  color: inherit;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
  padding-top: 48px;
  padding-bottom: 72px;
}

.eyebrow {
  color: var(--violet-ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(44px, 7.2vw, 76px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.lede {
  margin-top: 22px;
  max-width: 34em;
  color: var(--text-secondary);
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.5;
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 64px;
    padding-top: 72px;
    padding-bottom: 112px;
  }
}

/* The waitlist form */

.waitlist {
  margin-top: 32px;
  max-width: 460px;
  display: grid;
  gap: 14px;
}

.waitlist input[type='email'] {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  font: inherit;
  font-size: 17px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.waitlist input[type='email']::placeholder {
  color: var(--text-tertiary);
}

.waitlist input[type='email']:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 22%, transparent);
}

.waitlist [aria-invalid='true'] {
  border-color: var(--danger) !important;
  outline-color: var(--danger);
}

.consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  cursor: pointer;
}

.consent input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--violet);
  cursor: pointer;
}

.waitlist button,
.button-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.12s, filter 0.15s, box-shadow 0.15s;
}

.waitlist button {
  color: var(--on-violet);
  background: var(--accent-fill);
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--violet) 70%, transparent);
}

.waitlist button:hover,
.button-light:hover {
  filter: brightness(1.06);
}

.waitlist button:active,
.button-light:active {
  transform: scale(0.98);
}

.waitlist button:disabled {
  cursor: progress;
  filter: saturate(0.6);
}

.fine {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.form-status:empty {
  display: none;
}

.form-status {
  font-size: 15px;
  font-weight: 500;
}

.form-status[data-state='error'] {
  color: var(--danger);
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.waitlist-done {
  padding: 20px 22px;
  background: var(--violet-soft);
  border-radius: 16px;
  font-size: 17px;
  font-weight: 500;
  outline: none;
}

.submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.offer {
  font-size: 15px;
  font-weight: 500;
}

.offer .price {
  display: block;
  font-weight: 400;
  color: var(--text-secondary);
}

.when {
  margin-top: 28px;
  font-size: 14px;
  color: var(--text-tertiary);
}

@media (max-width: 599px) {
  .waitlist button {
    width: 100%;
  }
}

/* The example week */

.example {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 400px;
  padding-bottom: 56px;
}

.week {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 22px 18px 18px;
  box-shadow: var(--shadow);
  font-variant-numeric: tabular-nums;
}

.week-header {
  display: grid;
  gap: 2px;
  padding: 0 6px 14px;
}

.week-kicker {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.week-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.days {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.day {
  display: grid;
  grid-template-columns: 38px 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 8px;
  border-radius: 12px;
  font-size: 15px;
}

.day-name {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.day-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-meta {
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.run { background: var(--run); }
.dot.ride { background: var(--ride); }
.dot.strength { background: var(--strength); }
.dot.rest { background: var(--rest); }

.day-past {
  opacity: 0.5;
}

.day-rest .day-title {
  color: var(--text-secondary);
  font-weight: 500;
}

.day-moved {
  background: var(--change);
}

.day-today {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    'label label'
    'title title'
    'meta meta'
    'chart chart'
    'start start';
  gap: 4px;
  margin: 6px 0;
  padding: 18px;
  border-radius: 20px;
  color: var(--on-violet);
  background: var(--accent-fill);
}

.today-label {
  grid-area: label;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.85;
}

.today-title {
  grid-area: title;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.today-meta {
  grid-area: meta;
  font-size: 14px;
  opacity: 0.9;
}

.today-chart {
  grid-area: chart;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 44px;
  margin: 12px 0 14px;
}

.seg {
  border-radius: 4px 4px 2px 2px;
  background: currentColor;
}

.seg-warm { flex: 15; height: 30%; opacity: 0.45; }
.seg-on { flex: 12; height: 88%; opacity: 0.95; }
.seg-off { flex: 4; height: 36%; opacity: 0.45; }
.seg-cool { flex: 12; height: 24%; opacity: 0.45; }

.today-start {
  grid-area: start;
  justify-self: start;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--violet-deep);
  background: #ffffff;
}

@media (prefers-color-scheme: dark) {
  .today-start {
    color: #ffffff;
    background: var(--bg);
  }
}

.fuel {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 8px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
}

.fuel span:first-child {
  font-weight: 600;
  color: var(--text);
}

/* Marko speaking */

.bubble {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  font-size: 15px;
  line-height: 1.45;
}

.avatar {
  width: 28px;
  height: 28px;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(180deg, #5b33ff, #3a0fa6);
}

.example .bubble {
  position: absolute;
  left: -12px;
  right: 24px;
  bottom: 0;
}

@media (min-width: 960px) {
  .example .bubble {
    left: -48px;
    right: 48px;
  }
}

/* The six sections */

.features {
  display: grid;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 88px;
}

.feature {
  padding: 32px 28px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.feature h2 {
  font-size: clamp(26px, 3vw, 32px);
  letter-spacing: -0.025em;
}

.feature p {
  margin-top: 14px;
  color: var(--text-secondary);
}

@media (min-width: 720px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  .feature {
    padding: 36px 32px;
  }
}

/* Questions */

.questions {
  display: grid;
  gap: 32px;
  padding-top: 64px;
  padding-bottom: 32px;
  border-top: 1px solid var(--border);
}

.questions h2 {
  font-size: clamp(32px, 4.4vw, 48px);
  letter-spacing: -0.03em;
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq details:first-child {
  border-top: 1px solid var(--border);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  color: var(--violet-ink);
  font-weight: 500;
}

.faq details[open] summary::after {
  content: '–';
}

.faq details p {
  padding-bottom: 20px;
  max-width: 40em;
  color: var(--text-secondary);
}

@media (min-width: 960px) {
  .questions {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 64px;
    padding-top: 96px;
  }
}

/* The closing call to action */

.closing {
  margin-top: 88px !important;
  padding-top: 72px !important;
  padding-bottom: 72px !important;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(180deg, #5b33ff, #3a0fa6);
  border-radius: 32px;
  width: calc(100% - 2 * var(--gutter)) !important;
  max-width: var(--max) !important;
  display: grid;
  justify-items: center;
}

.closing-mark {
  width: 72px;
  height: auto;
  margin-bottom: 24px;
}

.closing h2 {
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.03em;
}

.closing p {
  margin-top: 16px;
  max-width: 32em;
  font-size: 18px;
  opacity: 0.92;
}

.button-light {
  margin-top: 32px;
  color: #3a0fa6;
  background: #ffffff;
}

/* Privacy and the simple pages */

.prose,
.simple {
  max-width: calc(720px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 48px var(--gutter) 40px;
}

.prose h1,
.simple h1 {
  font-size: clamp(36px, 5vw, 52px);
  letter-spacing: -0.03em;
}

.prose h1 + p {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
}

.prose h2 {
  margin-top: 44px;
  font-size: 24px;
  letter-spacing: -0.015em;
}

.prose p,
.prose ul {
  margin-top: 14px;
}

.prose ul {
  padding-left: 1.2em;
}

.prose li + li {
  margin-top: 8px;
}

.prose li::marker {
  color: var(--violet-ink);
}

.simple {
  padding-top: 96px;
  padding-bottom: 120px;
}

.simple p {
  margin-top: 18px;
  font-size: 19px;
  color: var(--text-secondary);
}

.page-prose .site-footer,
.page-simple .site-footer {
  max-width: calc(720px + 2 * var(--gutter));
}
