:root {
  --bg: #101215;
  --bg-raised: #16191d;
  --card: #1a1d22;
  --screen: #0b0c0e;
  --line: #2a2e35;
  --line-strong: #4a4f57;
  --text: #edede8;
  --text-2: #c4c7cc;
  --text-3: #a9adb3;
  --accent: #ffb000;
  --accent-hover: #ffd066;
  --sos: #ff8a6b;
  --ok: #7cdb6a;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header .wrap {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  align-items: center; justify-content: space-between;
  padding-top: 20px; padding-bottom: 20px;
}
.logo {
  font-family: var(--display); font-weight: 800; font-size: 28px;
  letter-spacing: 0.02em; color: var(--text); text-decoration: none;
}
.logo span { color: var(--accent); }
.logo:hover { color: var(--text); }
.site-nav { display: flex; flex-wrap: wrap; margin-right: -14px; }
.site-nav a {
  color: var(--text); text-decoration: none; font-weight: 500;
  padding: 12px 14px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }

/* Shared type */
.kicker {
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-3); font-weight: 400;
}
.display {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  line-height: 0.92; letter-spacing: -0.01em;
}
.display em { font-style: normal; color: var(--accent); }
.lead { font-size: 21px; line-height: 1.5; color: var(--text-2); max-width: 580px; }

/* Home hero */
.hero { padding-top: 64px; padding-bottom: 56px; display: grid; gap: 24px; }
.hero .display { font-size: clamp(52px, 9vw, 116px); }

/* App cards */
.group { padding-bottom: 32px; display: grid; gap: 20px; }
.group + .group { padding-top: 32px; }
.cards { display: flex; flex-wrap: wrap; gap: 24px; }
.card {
  flex: 1 1 420px; min-width: 0;
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; color: inherit; text-decoration: none;
  transition: border-color 0.15s;
}
.card:hover { color: inherit; border-color: var(--line-strong); }
.card:hover .more { color: var(--accent-hover); }
.card-shot {
  height: 360px; background: var(--screen); overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
}
.card-shot img {
  width: 240px; height: 330px; object-fit: cover; object-position: top;
  border: 6px solid var(--line); border-bottom: 0; border-radius: 26px 26px 0 0;
}
.card-body { padding: 28px; display: grid; gap: 10px; }
.card-title { display: flex; align-items: center; gap: 14px; }
.card-title img { width: 44px; height: 44px; border-radius: 10px; }
.card h3 {
  font-family: var(--display); font-weight: 700; font-size: 42px;
  text-transform: uppercase; line-height: 1;
}
.card p { color: var(--text-2); }
.more { font-weight: 600; color: var(--accent); }

/* Rally Lynx wide card */
.card-wide { flex-direction: row; flex-wrap: wrap; }
.card-wide .card-body { flex: 1 1 400px; padding: 40px; align-content: start; gap: 14px; }
.card-wide .lynx-logo { height: 56px; width: auto; }
.card-wide ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--text-2); }
.card-wide li::before { content: "— "; color: var(--text-3); }
.lynx-map { flex: 1 1 420px; min-height: 300px; background: var(--screen); position: relative; overflow: hidden; }
.lynx-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lynx-tags { position: absolute; left: 24px; top: 24px; display: flex; gap: 8px; font-family: var(--mono); font-size: 13px; }
.lynx-tags span { padding: 6px 10px; border-radius: 8px; background: var(--card); color: var(--ok); }
.lynx-tags .sos { background: #3a1810; color: var(--sos); }
.fine { font-size: 15px; color: var(--text-3); }

/* App page */
.app-hero {
  padding-top: 48px; padding-bottom: 80px;
  display: flex; flex-wrap: wrap; gap: 56px; align-items: center;
}
.app-hero-text { flex: 1 1 460px; min-width: 0; display: grid; gap: 24px; }
.app-hero .display { font-size: clamp(52px, 8vw, 100px); }
.app-icon { width: 72px; height: 72px; border-radius: 16px; }
.phone {
  flex: 0 0 auto; margin: 0 auto;
  width: 300px; aspect-ratio: 1320 / 2868; object-fit: cover;
  border: 10px solid var(--line); border-radius: 44px; background: var(--screen);
}
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px;
  border-radius: 12px; font-weight: 600; font-size: 17px; text-decoration: none;
  border: 1px solid var(--line-strong); color: var(--text);
}
.btn:hover { border-color: var(--text-3); color: var(--text); }
.btn-primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-primary:hover { background: #fff; color: var(--bg); }

.band { background: var(--bg-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.features {
  padding-top: 56px; padding-bottom: 56px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px;
}
.features h2 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.features p { font-size: 16px; color: var(--text-2); }

/* Screenshot carousel: native swipe/scroll, buttons added by carousel.js */
.carousel { padding-top: 72px; padding-bottom: 32px; display: grid; gap: 20px; }
.carousel-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.carousel-nav { display: flex; gap: 8px; }
.carousel-nav button {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  font: inherit; font-size: 20px; cursor: pointer;
}
.carousel-nav button:hover:not(:disabled) { border-color: var(--text-3); }
.carousel-nav button:disabled { opacity: 0.35; cursor: default; }
/* Track runs edge to edge; the first and last shots line up with the .wrap content edge */
.shots {
  --edge: max(24px, calc((100% - 1160px) / 2 + 24px));
  display: flex; gap: 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scroll-padding-inline: var(--edge); padding: 0 var(--edge) 4px;
  scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
.carousel.fits .carousel-nav { display: none; }
.carousel.fits .shots { justify-content: center; padding-inline: 24px; }
.shots figure { margin: 0; flex: 0 0 240px; scroll-snap-align: start; display: grid; gap: 12px; }
.shots img {
  width: 240px; aspect-ratio: 1320 / 2868; object-fit: cover;
  border: 6px solid var(--line); border-radius: 32px; background: var(--screen);
}
.shots figcaption { font-size: 15px; color: var(--text-3); text-align: center; }

.note { padding-top: 40px; padding-bottom: 56px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap {
  padding-top: 32px; padding-bottom: 48px;
  display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between;
  font-size: 15px; color: var(--text-3);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--text-3); }
.site-footer a:hover { color: var(--text); }

@media (max-width: 520px) {
  body { font-size: 17px; }
  .card-shot { height: 300px; }
  .card-body, .card-wide .card-body { padding: 24px; }
  .hero { padding-top: 40px; }
}
