/* On Pace website. Always dark, like the app: the bright sky (Glow) at the top fading to black.
   Colours are the app's: sky blue = on pace, scarlet = off pace, cloud white = buttons, navy = text on them. */
:root {
  color-scheme: dark;
  --sky: #38b6ff;
  --scarlet: #f23b42;
  --cloud: #ffefef;
  --navy: #06243d;
  --text: #fff;
  --secondary: rgba(235, 240, 255, 0.66);
  --card: rgba(18, 24, 34, 0.72);
  --card-edge: rgba(255, 255, 255, 0.08);
  --page: #000;
  --max: 1080px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* The sky: bright at the top, black three quarters of the way down the first screen. */
.sky {
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(127, 212, 255, 0.55) 0%, rgba(127, 212, 255, 0) 60%),
    linear-gradient(180deg, #5cc4ff 0%, #2eaaff 18%, #0b7bd6 40%, #06325c 62%, #000 82%);
}
.sky.short {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(127, 212, 255, 0.45) 0%, rgba(127, 212, 255, 0) 60%),
    linear-gradient(180deg, #2eaaff 0px, #0b7bd6 120px, #06325c 260px, #000 420px);
}

a { color: var(--sky); text-underline-offset: 3px; }
a:hover { color: #7fd4ff; }
:focus-visible { outline: 3px solid var(--cloud); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ── Top bar ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { color: #fff; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); }
.links { display: flex; gap: 22px; }
.links a { color: rgba(255, 255, 255, 0.92); text-decoration: none; font-weight: 600; font-size: 16px; }
.links a:hover { color: #fff; text-decoration: underline; }

/* ── Hero ── */
.hero { text-align: center; padding-top: 48px; }
.hero h1 {
  margin: 0 auto;
  max-width: 13ch;
  font-size: clamp(42px, 8vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-shadow: 0 2px 24px rgba(0, 40, 90, 0.35);
}
.hero .lead {
  margin: 20px auto 0;
  max-width: 34ch;
  font-size: clamp(18px, 2.4vw, 21px);
  color: #fff;
  opacity: 0.92;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding: 15px 28px;
  border-radius: 999px;
  background: var(--cloud);
  color: var(--navy);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(0, 30, 70, 0.35);
  transition: transform 160ms ease-out, box-shadow 160ms ease-out;
}
.button:hover { color: var(--navy); transform: translateY(-1px); box-shadow: 0 12px 36px rgba(0, 30, 70, 0.45); }
.button:active { transform: scale(0.97); }
.button svg { width: 20px; height: 20px; }
.small { margin-top: 12px; font-size: 15px; color: rgba(255, 255, 255, 0.78); }

/* Three phones: on pace in front, too fast and the chart either side. */
.phones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: 56px;
  padding-bottom: 24px;
}
.phones img {
  width: min(280px, 31vw);
  height: auto;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.55));
}
.phones .side { margin-top: 70px; opacity: 0.96; }
.phones .left { margin-right: -34px; transform: rotate(-4deg); }
.phones .right { margin-left: -34px; transform: rotate(4deg); }
.phones .front { position: relative; z-index: 1; }

/* ── Features ── */
section { padding-top: 72px; }
h2 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 800;
}
.intro { margin: 0 0 28px; color: var(--secondary); font-size: 19px; max-width: 46ch; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  padding: 24px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--card-edge);
}
.card h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--secondary); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 2px; }
.dot.on { background: var(--sky); box-shadow: 0 0 10px var(--sky); }
.dot.off { background: var(--scarlet); box-shadow: 0 0 10px var(--scarlet); }
.dot.white { background: var(--cloud); box-shadow: 0 0 10px rgba(255, 239, 239, 0.6); }

/* ── Support ── */
.faq { display: grid; gap: 10px; }
details {
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--card-edge);
}
summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 52px 18px 22px;
  position: relative;
  font-weight: 650;
  font-size: 18px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--secondary);
  border-bottom: 2px solid var(--secondary);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 180ms ease-out;
}
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details p { margin: 0; padding: 0 22px 20px; color: var(--secondary); }

.contact {
  margin-top: 16px;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(56, 182, 255, 0.18), rgba(56, 182, 255, 0.04));
  border: 1px solid rgba(56, 182, 255, 0.28);
}
.contact h3 { margin: 0 0 4px; font-size: 20px; }
.contact p { margin: 0; color: var(--secondary); }

/* ── Privacy page ── */
.doc { max-width: 720px; padding-top: 40px; }
.doc h1 { margin: 0 0 6px; font-size: clamp(38px, 6vw, 54px); letter-spacing: -0.03em; line-height: 1.05; }
.doc .date { color: rgba(255, 255, 255, 0.8); margin: 0 0 28px; }
.doc .card { margin-bottom: 16px; }
.doc .card h2 { font-size: 22px; margin-bottom: 10px; }
.doc .card .big { font-size: 21px; font-weight: 700; margin: 0; color: #fff; }
.doc ul { margin: 0; padding-left: 20px; color: var(--secondary); }
.doc li { margin-bottom: 10px; }
.doc li:last-child { margin-bottom: 0; }
.doc p { color: var(--secondary); }

/* ── Footer ── */
footer {
  margin-top: 88px;
  padding: 28px 0 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--secondary);
  font-size: 15px;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer a { color: var(--secondary); }
footer a:hover { color: #fff; }

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .links { gap: 16px; }
  .hero { padding-top: 28px; }
  .grid { grid-template-columns: 1fr; }
  .phones img { width: 46vw; }
  .phones .side { display: none; }
  .phones .front { width: min(300px, 72vw); }
  section { padding-top: 56px; }
}
