/* ==========================================================================
   Live Ride — landing page
   Editorial "route card" look: warm paper, contour-line texture, condensed
   display type, monospaced readouts, sections laid out as route stages.
   Legal pages keep using styles.css.
   ========================================================================== */

:root {
  --paper: #f2efe6;
  --paper-2: #e9e5d9;
  --card: #fbfaf6;
  --ink: #121412;
  --ink-2: #474b47;
  --ink-3: #7a7d77;
  --rule: rgba(18, 20, 18, 0.14);
  --rule-strong: rgba(18, 20, 18, 0.32);
  --contour: rgba(18, 20, 18, 0.05);

  --teal: #0b7f74;
  --teal-bright: #2dd4bf;
  --on-teal: #ffffff;
  --signal: #ff5a1f;

  --display: "Archivo", "Arial Narrow", sans-serif;
  --body: "Archivo", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d0f0e;
    --paper-2: #141716;
    --card: #181b1a;
    --ink: #eeede6;
    --ink-2: #b4b6ae;
    --ink-3: #82857e;
    --rule: rgba(238, 237, 230, 0.12);
    --rule-strong: rgba(238, 237, 230, 0.3);
    --contour: rgba(238, 237, 230, 0.035);
    --teal: #2dd4bf;
    --on-teal: #04211d;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background-color: var(--paper);
  /* Two offset sets of rings read as a topo map behind everything. */
  background-image:
    repeating-radial-gradient(circle at 88% 8%, transparent 0 34px, var(--contour) 34px 35px),
    repeating-radial-gradient(circle at 6% 62%, transparent 0 46px, var(--contour) 46px 47px);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--teal-bright); color: #04211d; }

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

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

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

/* ---------- type ---------- */

h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 72%;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 0.95;
  margin: 0;
  text-transform: uppercase;
}

h1 { font-size: clamp(3.1rem, 9vw, 7.4rem); }
h2 { font-size: clamp(2.3rem, 5.6vw, 4.4rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.02; }

p { margin: 0; }

.mono, .label {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.label { color: var(--ink-3); }

.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 38ch; }

.hl { color: var(--teal); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px;
  font-family: var(--body); font-weight: 650; font-size: 0.98rem;
  text-decoration: none; white-space: nowrap;
  border: 1.5px solid var(--ink);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }

/* ---------- header ---------- */

.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-stretch: 80%; font-weight: 800; font-size: 1.15rem;
  text-transform: uppercase; letter-spacing: 0.01em; text-decoration: none;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.top nav { display: flex; gap: 26px; margin-left: auto; }
.top nav a { font-size: 0.92rem; color: var(--ink-2); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.top .btn { min-height: 40px; padding: 0 16px; font-size: 0.88rem; }
@media (max-width: 860px) {
  .top nav { display: none; }
  .top .btn { margin-left: auto; }
}

/* ---------- hero ---------- */

.hero { padding: clamp(40px, 7vw, 96px) 0 0; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 5vw, 72px); align-items: end;
}
.hero h1 .stroke {
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
}
.hero .lede { margin-top: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-fine { margin-top: 16px; font-size: 0.9rem; color: var(--ink-3); }

.hero-phone { position: relative; justify-self: center; width: min(100%, 340px); }

.device {
  position: relative;
  border-radius: 46px;
  padding: 9px;
  background: #0b0c0c;
  box-shadow:
    0 0 0 1.5px #2a2c2b,
    0 40px 80px -30px rgba(0, 0, 0, 0.45),
    0 18px 36px -18px rgba(0, 0, 0, 0.35);
}
.device img { border-radius: 38px; width: 100%; }

/* Bike-computer style readout pinned to the phone. */
.readout {
  position: absolute; left: -18%; bottom: 12%;
  display: grid; grid-template-columns: repeat(3, auto); gap: 0;
  background: var(--ink); color: var(--paper);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.5);
}
.readout div { padding: 12px 16px; border-right: 1px solid rgba(255, 255, 255, 0.12); }
.readout div:last-child { border-right: 0; }
.readout b {
  display: block; font-family: var(--mono); font-weight: 600;
  font-size: 1.35rem; font-variant-numeric: tabular-nums; line-height: 1.1;
}
.readout span { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; }
.readout .live b { color: var(--teal-bright); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-phone { width: min(78%, 320px); margin-top: 12px; }
  .readout { left: -14%; }
}
@media (max-width: 520px) {
  .readout { left: 50%; transform: translateX(-50%); bottom: -26px; }
  .readout div { padding: 10px 12px; }
  .readout b { font-size: 1.05rem; }
}

/* ---------- elevation profile divider ---------- */

.profile { margin-top: clamp(48px, 7vw, 88px); position: relative; }
.profile svg { width: 100%; height: clamp(70px, 9vw, 120px); display: block; }
.profile .fill { fill: var(--paper-2); }
.profile .line { fill: none; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.profile .marks {
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--ink); padding-top: 8px;
}

/* ---------- stages (sections) ---------- */

.stage { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--rule); }
.stage-head {
  margin-bottom: clamp(36px, 5vw, 64px);
}
.stage-head .lede { margin-top: 18px; max-width: 52ch; }

/* ---------- what's new ---------- */

.new-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px;
}
.panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 30px);
  display: flex; flex-direction: column; gap: 14px;
  min-width: 0;
}
.panel p { color: var(--ink-2); }
.panel .tag {
  align-self: flex-start;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 6px; border: 1px solid var(--rule-strong); color: var(--ink-2);
}
.panel .tag.pro { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
@media (max-width: 960px) {
  .span-7, .span-5 { grid-column: span 12; }
  .span-4 { grid-column: span 6; }
}
@media (max-width: 620px) { .span-4 { grid-column: span 12; } }

/* Maintenance demo */
.wear { display: grid; gap: 14px; margin-top: 6px; }
.wear-row { display: grid; gap: 6px; }
.wear-top { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.wear-top .mono { color: var(--ink-3); font-weight: 400; }
.bar { height: 8px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--teal); width: var(--w); }
.wear-row.soon .bar i { background: #e7b416; }
.wear-row.due .bar i { background: var(--signal); }
.wear-row.due .wear-top .mono { color: var(--signal); }
.toast {
  display: flex; align-items: center; gap: 12px; margin-top: 8px;
  padding: 12px 14px; border-radius: 14px;
  background: var(--paper-2); font-size: 0.92rem;
}
.toast .dot { width: 30px; height: 30px; border-radius: 50%; background: var(--signal); flex: none; display: grid; place-items: center; color: #fff; font-weight: 800; }
.toast small { display: block; color: var(--ink-3); }

/* Lock Screen demo */
.lockscreen {
  border-radius: 22px; padding: 18px;
  background:
    radial-gradient(120% 90% at 20% 0%, #1f5f58 0%, transparent 60%),
    radial-gradient(100% 100% at 100% 100%, #3a2a1f 0%, transparent 55%),
    #0d1110;
  color: #f4f4ef;
}
.lockscreen .clock {
  text-align: center; font-family: var(--display); font-stretch: 100%; font-weight: 700;
  font-size: 3.4rem; line-height: 1; letter-spacing: -0.02em; margin: 4px 0 16px;
}
.activity {
  background: rgba(10, 12, 12, 0.72); border-radius: 18px; padding: 14px 16px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.activity-top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.75; }
.activity-top .rec { color: var(--teal-bright); opacity: 1; }
.activity-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 10px; }
.activity-row b { font-family: var(--mono); font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; display: block; line-height: 1.1; }
.activity-row span { font-family: var(--mono); font-size: 0.6rem; opacity: 0.6; text-transform: uppercase; letter-spacing: 0.06em; }
.pause-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--teal-bright); display: grid; place-items: center; flex: none; }
.pause-btn svg { width: 16px; height: 16px; }

/* Widget demo */
.widget-demo { display: flex; gap: 16px; align-items: center; }
.ring { --p: 64; width: 92px; height: 92px; border-radius: 50%; flex: none; position: relative;
  background: conic-gradient(var(--teal) calc(var(--p) * 1%), var(--paper-2) 0);
}
.ring::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--card); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; font-family: var(--mono); font-weight: 600; }

/* Siri demo */
.quote {
  font-family: var(--display); font-stretch: 85%; font-weight: 700; font-size: 1.45rem; line-height: 1.12;
  text-transform: none; letter-spacing: -0.01em;
}
.quote::before { content: "“"; color: var(--teal); }
.quote::after { content: "”"; color: var(--teal); }

/* PB demo */
.pb { display: flex; align-items: baseline; gap: 10px; font-family: var(--mono); }
.pb b { font-size: 2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pb s { color: var(--ink-3); }

/* ---------- screens strip ---------- */

.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 24vw, 270px);
  gap: clamp(18px, 2.4vw, 28px);
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px var(--gutter) 24px;
  margin: 0 calc(var(--gutter) * -1);
  scrollbar-width: thin;
}
.strip figure { margin: 0; scroll-snap-align: start; }
.strip .device { border-radius: 36px; padding: 7px; }
.strip .device img { border-radius: 30px; }
.strip figcaption { margin-top: 16px; }
.strip figcaption strong { display: block; font-size: 1rem; }
.strip figcaption span { color: var(--ink-2); font-size: 0.92rem; }
.strip-hint { margin-top: 4px; }

/* ---------- spec sheet ---------- */

.spec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); }
.spec section { padding: 26px 0 8px; border-top: 2px solid var(--ink); }
.spec h3 { margin-bottom: 14px; }
.spec dl { margin: 0; }
.spec dt { font-weight: 650; margin-top: 14px; }
.spec dd { margin: 2px 0 0; color: var(--ink-2); font-size: 0.95rem; }
@media (max-width: 960px) { .spec { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .spec { grid-template-columns: 1fr; } }

/* ---------- pricing ---------- */

.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.price {
  border: 1.5px solid var(--ink); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px);
  display: flex; flex-direction: column; gap: 14px; background: var(--card);
}
.price.pro { background: var(--ink); color: var(--paper); }
.price.pro .label, .price.pro li { color: color-mix(in srgb, var(--paper) 72%, transparent); }
.price .big { font-family: var(--display); font-stretch: 72%; font-weight: 800; font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1; text-transform: uppercase; }
.price ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--ink-2); }
.price li { padding-left: 22px; position: relative; }
.price li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 12px; height: 1.5px; background: currentColor; }
.price-note { margin-top: 22px; color: var(--ink-2); max-width: 70ch; }
@media (max-width: 760px) { .price-grid { grid-template-columns: 1fr; } }

/* ---------- privacy ---------- */

.privacy { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.privacy div { border-top: 1px solid var(--rule-strong); padding-top: 16px; }
.privacy b { display: block; font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 1.5rem; text-transform: uppercase; line-height: 1; margin-bottom: 8px; }
.privacy p { color: var(--ink-2); font-size: 0.95rem; }
@media (max-width: 900px) { .privacy { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .privacy { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */

.faq { max-width: 860px; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-weight: 650; font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 1.3rem; color: var(--ink-3); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .answer { padding: 0 0 22px; color: var(--ink-2); max-width: 68ch; }

/* ---------- finish ---------- */

.finish { padding: clamp(72px, 10vw, 140px) 0; text-align: left; border-top: 1px solid var(--rule); }
.finish h2 { font-size: clamp(3rem, 10vw, 8.5rem); }
.finish .row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 28px; margin-top: 28px; }

/* ---------- footer ---------- */

footer { border-top: 2px solid var(--ink); padding: 40px 0 48px; font-size: 0.92rem; }
.foot { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.foot p { color: var(--ink-2); margin-top: 12px; max-width: 34ch; }
.foot h4 { margin: 0 0 10px; font-family: var(--mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.foot a { display: block; text-decoration: none; color: var(--ink-2); padding: 3px 0; }
.foot a:hover { color: var(--ink); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 36px; color: var(--ink-3); font-size: 0.82rem; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr 1fr; } .foot > div:first-child { grid-column: 1 / -1; } }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(18px); animation: rise 0.8s cubic-bezier(.2, .7, .2, 1) forwards; }
  .d1 { animation-delay: 0.06s; } .d2 { animation-delay: 0.16s; } .d3 { animation-delay: 0.26s; } .d4 { animation-delay: 0.38s; }
  @keyframes rise { to { opacity: 1; transform: none; } }

  .profile .line { stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: draw 2.2s 0.3s ease-out forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }

  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, .7, .2, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* ---------- legal pages (privacy, terms) ---------- */

.legal-head { padding: clamp(48px, 8vw, 104px) 0 clamp(32px, 5vw, 56px); border-bottom: 2px solid var(--ink); }
.legal-head h1 { font-size: clamp(2.8rem, 8vw, 6rem); margin-top: 14px; }
.legal-head .lede { margin-top: 22px; max-width: 62ch; }
.legal-head .effective { margin-top: 18px; display: block; }

.legal-layout {
  display: grid; grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(36px, 5vw, 64px) 0 clamp(72px, 9vw, 120px);
}
.toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; }
.toc ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; }
.toc a {
  display: block; padding: 5px 0; font-size: 0.9rem; color: var(--ink-2); text-decoration: none;
  border-left: 2px solid transparent; padding-left: 12px; margin-left: -14px;
}
.toc a:hover { color: var(--ink); border-left-color: var(--teal); }

.legal-body { max-width: 72ch; }
.legal-body h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.05;
  margin: 48px 0 14px; padding-top: 18px; border-top: 1px solid var(--rule);
  scroll-margin-top: 84px;
}
.legal-body h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.legal-body p, .legal-body li { color: var(--ink-2); }
.legal-body p + p { margin-top: 14px; }
.legal-body ul { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.legal-body strong { color: var(--ink); }
.legal-body a { color: var(--teal); text-underline-offset: 3px; }

@media (max-width: 860px) {
  .legal-layout { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px; background: var(--card); }
  .toc a { margin-left: 0; }
}

/* 404 */
.notfound { min-height: 70vh; display: grid; align-content: center; justify-items: start; gap: 22px; padding-block: 64px; }
.notfound h1 { font-size: clamp(3rem, 10vw, 7rem); }
.legal-body .callout {
  margin: 16px 0 0; padding: 16px 18px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--signal);
}
