/* Offlift site. One stylesheet, no external resources. */

:root {
  --bg: #fbfaf8;
  --surface: #f3f1ed;
  --text: #1c1917;
  --muted: #6b6560;
  --line: #e4e0da;
  --accent: #ff662e;
  --link: #c2410c;
  --focus: #c2410c;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 40rem;
  --gutter: 1rem;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.9rem, 1.4rem + 2.4vw, 2.6rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141210;
    --surface: #1e1b18;
    --text: #f2efea;
    --muted: #a39d96;
    --line: #2e2a26;
    --link: #ff8a5c;
    --focus: #ff8a5c;
  }
}

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

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

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

.wrap {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 40em) {
  :root { --gutter: 1.5rem; }
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.lang {
  font-size: var(--step--1);
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0 0 var(--space-1);
  font-size: var(--step--1);
}

.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 650; }

/* Type */
h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 { font-size: var(--step-3); font-weight: 700; }
h2 { font-size: var(--step-2); font-weight: 680; margin-top: var(--space-5); }
h3 { font-size: var(--step-1); font-weight: 650; margin-top: var(--space-4); }

p, ul, ol, address { margin: var(--space-2) 0 0; }
ul, ol { padding-left: 1.25rem; }
li + li { margin-top: 0.375rem; }
address { font-style: normal; }
strong { font-weight: 650; }

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

.muted { color: var(--muted); }
.small { font-size: var(--step--1); }

/* Home */
.hero {
  padding: var(--space-4) 0 var(--space-2);
}

.hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 8px 24px rgb(255 102 46 / 0.25);
}

.hero h1 { margin-top: var(--space-3); max-width: 18ch; }

.lede {
  font-size: var(--step-1);
  color: var(--muted);
  max-width: 34ch;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-3);
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--step--1);
  color: var(--muted);
}

.status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

/* App Store button and the pay-once note, under the status pill */
.cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.cta p { margin: 0; max-width: 40ch; }

/* Apple's official badge (assets/app-store-badge-*.svg), unchanged as Apple requires */
.store-badge { display: inline-block; border-radius: 0.5rem; }
.store-badge img { display: block; width: auto; height: 48px; }
.store-badge:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.price {
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.price strong { display: block; font-size: 1.15em; }

.button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--link);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px rgb(255 102 46 / 0.3);
}

.button:hover { filter: brightness(1.08); }

.button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.features {
  display: grid;
  gap: var(--space-4) var(--space-3);
  margin-top: var(--space-5);
  padding: 0;
  list-style: none;
}

@media (min-width: 36em) {
  .features { grid-template-columns: 1fr 1fr; }
}

.features li { margin: 0; }

.features h2 {
  margin: 0;
  font-size: var(--step-0);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.features h2::before {
  content: "";
  display: block;
  width: 1.5rem;
  height: 3px;
  margin-bottom: 0.75rem;
  border-radius: 2px;
  background: var(--accent);
}

.features p { margin-top: 0.375rem; color: var(--muted); }

.panel {
  margin-top: var(--space-5);
  padding: var(--space-3);
  border-radius: 14px;
  background: var(--surface);
}

.panel h2 { margin-top: 0; font-size: var(--step-1); }

/* Section intro */
.section-head { margin-top: var(--space-5); }
.section-head h2 { margin: 0; }
.section-head p { margin-top: 0.5rem; color: var(--muted); }

/* Screenshots: a horizontal strip that scrolls on its own, never the page */
.shots {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-3) calc(-1 * var(--gutter)) 0;
  padding: 0 var(--gutter) var(--space-2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  list-style: none;
  overscroll-behavior-x: contain;
}

.shots li {
  flex: 0 0 auto;
  width: min(62vw, 13.5rem);
  margin: 0;
  scroll-snap-align: start;
}

/* Watch shots: two stacked per column, at the end of the strip */
.shots li.watch {
  width: min(48vw, 10rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.shot,
.shot-empty {
  display: block;
  width: 100%;
  height: auto; /* the img height attribute would otherwise win and stretch it */
  aspect-ratio: 720 / 1561;
  border-radius: 1.4rem;
  border: 1px solid var(--line);
  background: var(--surface);
  object-fit: cover;
}

.watch .shot,
.watch .shot-empty {
  aspect-ratio: 368 / 448;
  border-radius: 2rem;
}

.shot-empty {
  display: grid;
  place-content: center;
  gap: 0.5rem;
  padding: var(--space-2);
  text-align: center;
  font-size: var(--step--1);
  color: var(--muted);
}

.shot-empty::before {
  content: "";
  justify-self: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6rem;
  background: var(--accent);
  opacity: 0.35;
}

.shots figure { margin: 0; }

.shots figcaption {
  margin-top: 0.625rem;
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.35;
}

/* What's new teaser */
.whatsnew h2 { font-size: var(--step-1); }
.whatsnew .version { color: var(--muted); font-weight: 500; }
.whatsnew ul { margin-top: var(--space-1); }
.whatsnew p:last-child { margin-top: var(--space-2); }

/* FAQ */
.faq { margin-top: var(--space-3); border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  padding: 0.875rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 var(--space-2); color: var(--muted); }

/* Changelog */
/* Each version is a <details>: only version, badge and date show until tapped. */
.release { border-bottom: 1px solid var(--line); }
.release:first-of-type { margin-top: var(--space-3); border-top: 1px solid var(--line); }

.release summary {
  padding: 0.875rem 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}

.release summary::-webkit-details-marker { display: none; }
.release summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.25rem; line-height: 1; }
.release[open] summary::after { content: "−"; }
.release summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.release:target summary { color: var(--accent); }

.release h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin: 0;
}

.release time { font-size: var(--step--1); font-weight: 400; color: var(--muted); letter-spacing: 0; }
.release ul { margin: 0 0 var(--space-2); }

.badge {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0;
}

/* Licenses */
.license {
  margin-top: var(--space-2);
  padding: var(--space-2);
  border-radius: 10px;
  background: var(--surface);
  font: 0.8125rem/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Long-form pages */
.doc { padding: var(--space-3) 0 0; }
.doc h1 { font-size: var(--step-2); }
.doc h2 { font-size: var(--step-1); margin-top: var(--space-4); }
.doc h3 { font-size: var(--step-0); margin-top: var(--space-3); }
.doc .release h2 { font-size: var(--step-1); }

/* Footer */
.site-footer {
  margin-top: var(--space-5);
  padding: var(--space-3) 0 var(--space-4);
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1.25rem;
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer p { margin-top: var(--space-1); }

@media (prefers-reduced-motion: no-preference) {
  a { transition: color 120ms ease, text-decoration-thickness 120ms ease; }
}
