/* Colours follow docs/DESIGN.md (Lime Runway) so the pages read as part of the app; the layout is
   a flat, sectioned web page rather than the app's rounded cards. */

:root {
  color-scheme: light dark;
  --page: #ffffff;
  --canvas: #eef0ea;
  --well: #e3e7df;
  --hairline: #dadfd6;
  --pine: #0e3b2e;
  --lime: #c6f26a;
  --ink: #10201a;
  --secondary: #5c6962;
  --tertiary: #646f69;
  --on-pine-secondary: #b7c4c0;
  --link: #1c4d3e;
  --bar: rgb(238 240 234 / 82%);

  --width: 61.25rem;
  --gutter: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue",
    "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Helvetica Neue", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0b1512;
    --canvas: #14211c;
    --well: #1d2c26;
    --hairline: #263730;
    --pine: #17503f;
    --ink: #f1f4ee;
    --secondary: #a2ada6;
    --tertiary: #8a958e;
    --on-pine-secondary: #c6d1cd;
    --link: #d6f598;
    --bar: rgb(20 33 28 / 82%);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: clip;
  background: var(--page);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font);
}

.page {
  max-width: calc(var(--width) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

main {
  flex: 1;
}

/* Full-bleed bands inside the centred column: the bar, the hero and the footer. */
.topbar,
.hero,
footer {
  margin-inline: calc(50% - 50vw);
  padding-inline: max(var(--gutter), calc(50vw - var(--width) / 2));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  background: var(--bar);
  border-bottom: 0.5px solid var(--hairline);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--pine);
  display: grid;
  place-items: center;
}

.brand-mark::after {
  content: "";
  width: 9px;
  height: 12px;
  background: var(--lime);
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  transform: translateY(1px);
}

.lang {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--secondary);
  font-size: 0.875rem;
  text-decoration: none;
}

.lang:hover {
  color: var(--ink);
}

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-top: clamp(56px, 10vw, 104px);
  padding-bottom: clamp(56px, 10vw, 104px);
  /* Same diagonal ground as the app icon (design/app-icon/AppIcon.svg). */
  background: linear-gradient(135deg, #245a30 0%, #0e3b2e 50%, #0b3226 100%);
  color: #fff;
}

/* Hard-edged ellipses blurred as one layer, as the icon does with feGaussianBlur. The icon blurs
   by about 5% of its width; this follows the band's width the same way. Glows stay at the edges
   and right side so the text on the left keeps its contrast. The layer overhangs the band so the
   blur doesn't fade in from transparent at the edges. */
.hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  filter: blur(clamp(36px, 5vw, 72px));
  background:
    radial-gradient(closest-side, rgb(198 242 106 / var(--corner-glow, 38%)) 99%, transparent 100%)
      no-repeat 96% var(--corner-glow-y, 6%) / 40% 34%,
    radial-gradient(closest-side, rgb(198 242 106 / 22%) 99%, transparent 100%)
      no-repeat 4% 98% / 30% 32%,
    radial-gradient(closest-side, rgb(111 154 134 / 34%) 99%, transparent 100%)
      no-repeat 80% 82% / 22% 30%,
    radial-gradient(closest-side, rgb(36 90 48 / 85%) 99%, transparent 100%)
      no-repeat 52% 100% / 26% 26%,
    radial-gradient(closest-side, rgb(198 242 106 / 18%) 99%, transparent 100%)
      no-repeat 66% 44% / 10% 14%;
}

/* On narrow screens the text runs the full width, under the top-right glow. */
@media (max-width: 799px) {
  .hero {
    --corner-glow: 24%;
    --corner-glow-y: 0%;
  }
}

.hero > * {
  position: relative;
  max-width: 40rem;
}

.pill {
  display: block;
  margin-bottom: 14px;
  color: var(--lime);
  font-size: 1rem;
  font-weight: 600;
}

.hero h1 {
  margin: 0 0 18px;
  font: 700 clamp(2.25rem, 7vw, 3.5rem) / 1.08 var(--font-display);
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0;
  color: var(--on-pine-secondary);
  font-size: clamp(1.0625rem, 2.2vw, 1.3125rem);
  line-height: 1.5;
}

.points {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid rgb(255 255 255 / 14%);
  list-style: none;
}

.points li {
  display: flex;
  gap: 14px;
  line-height: 1.5;
}

.points li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 0.6em;
  background: var(--lime);
}

.hero .actions {
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 4px;
  background: var(--lime);
  color: #0e3b2e;
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: #d4f78a;
}

.hero + .card,
.hero + .links {
  border-top: 0;
}

.card {
  padding: 48px 0;
  border-top: 1px solid var(--hairline);
}

.card h2 {
  margin: 0 0 16px;
  font: 600 clamp(1.5rem, 3.4vw, 2rem) / 1.2 var(--font-display);
  letter-spacing: -0.015em;
}

.card h3 {
  margin: 28px 0 6px;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
}

.card h2 + h3 {
  margin-top: 0;
}

.card p,
.card ul,
.card ol {
  margin: 0 0 12px;
}

.card > :last-child {
  margin-bottom: 0;
}

.card ul,
.card ol {
  padding-left: 1.2em;
}

.card li + li {
  margin-top: 6px;
}

/* Wide screens: heading in a left column, body on the right, like a product spec sheet. */
@media (min-width: 800px) {
  .card {
    display: grid;
    grid-template-columns: 16rem minmax(0, 1fr);
    column-gap: 56px;
    align-items: start;
  }

  .card > * {
    grid-column: 2;
  }

  .card > h2 {
    grid-column: 1;
    grid-row: 1 / span 40;
    position: sticky;
    top: 76px;
  }
}

.meta {
  color: var(--tertiary);
  font-size: 0.875rem;
}

.note {
  margin-top: 20px;
  padding: 14px 18px;
  border-left: 3px solid var(--pine);
  background: var(--canvas);
  color: var(--secondary);
  font-size: 0.9375rem;
}

@media (prefers-color-scheme: dark) {
  .note {
    border-left-color: var(--lime);
  }
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
}

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

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

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--tertiary);
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details > :not(summary) {
  color: var(--secondary);
}

.faq details[open] {
  padding-bottom: 18px;
}

.links {
  display: grid;
  border-top: 1px solid var(--hairline);
}

@media (min-width: 640px) {
  .links {
    grid-template-columns: 1fr 1fr;
  }

  .link-card + .link-card {
    border-left: 1px solid var(--hairline);
    padding-left: 32px;
  }
}

.link-card {
  display: block;
  padding: 36px 32px 36px 0;
  color: var(--ink);
  text-decoration: none;
}

.link-card + .link-card {
  border-top: 1px solid var(--hairline);
}

@media (min-width: 640px) {
  .link-card + .link-card {
    border-top: 0;
  }
}

.link-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.3125rem;
  font-weight: 600;
}

.link-card strong::after {
  content: " ›";
  color: var(--link);
}

.link-card span {
  color: var(--secondary);
  font-size: 0.9375rem;
}

.link-card:hover strong {
  color: var(--link);
}

footer {
  padding-top: 20px;
  padding-bottom: 28px;
  border-top: 1px solid var(--hairline);
  background: var(--canvas);
  color: var(--tertiary);
  font-size: 0.8125rem;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}

footer p {
  margin: 4px 0 0;
}

footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--secondary);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}
