:root {
  color-scheme: light dark;
  --bg: #f6f5f1;
  --surface: #ffffff;
  --text: #16181a;
  --muted: #5b5f63;
  --faint: #8a8d90;
  --line: #e1dfd8;
  --link: #16181a;
  --mark-back: #cdcac0;
  --serif: ui-serif, "New York", "Iowan Old Style", Charter, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", sans-serif;
  --wrap: min(1160px, calc(100% - 40px));
  --narrow: min(760px, calc(100% - 40px));
  --reserve: #2a7d3f;
  --amp-bg: #0b1219;
  --amp-surface: #111b25;
  --amp-line: #23313c;
  --amp-text: #eef2f3;
  --amp-muted: #9aa6ad;
  --amp-accent: #61f3c3;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1012;
    --surface: #17191c;
    --text: #ecebe6;
    --muted: #a3a49f;
    --faint: #7c7e7b;
    --line: #2a2c30;
    --link: #ecebe6;
    --mark-back: #55575c;
    --reserve: #5fcf7c;
  }
}

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

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

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

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.08;
}

h3 {
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.35;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.narrow {
  width: var(--narrow);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 650;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: var(--wrap);
  margin-inline: auto;
  padding: 22px 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark svg {
  width: 24px;
  height: 24px;
  flex: none;
}

.mark-back {
  fill: var(--mark-back);
}

.mark-front {
  fill: var(--text);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px 4px;
}

.site-nav a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 550;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav .nav-app {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.site-nav .nav-app img {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}

/* Home hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 88px);
}

.hero-art {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1;
}

.hero-art picture {
  position: absolute;
}

.hero-art img {
  width: 100%;
  border-radius: 22.5%;
}

.art-amp {
  top: 0;
  right: 0;
  width: 72%;
}

.art-amp img {
  box-shadow: 0 30px 60px rgba(11, 18, 25, 0.28);
}

.art-res {
  bottom: 0;
  left: 0;
  width: 50%;
}

.art-res img {
  box-shadow: 0 0 0 10px var(--bg), 0 26px 50px rgba(20, 60, 30, 0.25);
}

.hero h1 {
  max-width: 15ch;
  font-size: clamp(2.5rem, 6.4vw, 5rem);
}

.hero-lede {
  max-width: 40rem;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.7vw, 1.25rem);
  line-height: 1.55;
}

.app-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
  margin-top: 40px;
  padding: 0;
  list-style: none;
}

.app-index a {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s;
}

.app-index a:hover {
  border-color: var(--faint);
}

.app-index img {
  width: 56px;
  height: 56px;
  border-radius: 13px;
}

.app-index strong {
  display: block;
  font-size: 1rem;
  font-weight: 650;
}

.app-index span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

/* Shared app pieces */

.kicker {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-id {
  display: flex;
  align-items: center;
  gap: 18px;
}

.app-id img {
  width: 72px;
  height: 72px;
  border-radius: 17px;
  flex: none;
}

.app-id h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.app-id p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.98rem;
}

.app-lede {
  margin-top: 26px;
  font-size: 1.12rem;
}

.points {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding: 0;
  list-style: none;
}

.points li {
  position: relative;
  padding-left: 22px;
}

.points li::before {
  position: absolute;
  top: 0.68em;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  opacity: 0.45;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 30px;
}

.store-badge {
  display: inline-block;
  border-radius: 8px;
}

.store-badge img {
  width: auto;
  height: 44px;
}

.arrow-link {
  font-weight: 600;
  text-decoration: none;
}

.arrow-link:hover {
  text-decoration: underline;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.facts dt {
  color: var(--faint);
  font-size: 0.8rem;
  font-weight: 600;
}

.facts dd {
  font-size: 0.95rem;
  font-weight: 550;
}

/* Featured app: AmpSonic keeps its own colors */

.stage {
  --line: var(--amp-line);
  --muted: var(--amp-muted);
  --faint: #7b8890;
  --link: var(--amp-text);
  color-scheme: dark;
  overflow: hidden;
  padding: clamp(56px, 8vw, 104px) 0 clamp(40px, 6vw, 72px);
  background: var(--amp-bg);
  color: var(--amp-text);
}

@media (prefers-color-scheme: dark) {
  .stage {
    border-block: 1px solid var(--amp-line);
  }
}

.stage .kicker {
  color: var(--amp-accent);
}

.stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.stage .app-lede {
  color: var(--amp-text);
}

.stage .points {
  color: var(--amp-muted);
}

.stage .points li::before {
  background: var(--amp-accent);
  opacity: 1;
}

.stage .arrow-link {
  color: var(--amp-accent);
}

.devices {
  position: relative;
  padding: 0 clamp(36px, 7%, 80px) clamp(40px, 9%, 72px) 0;
}

.mac-shot img {
  width: 100%;
  border: 1px solid #2c3a46;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.phone-shot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 27%;
  padding: 5px;
  border-radius: 13% / 6%;
  background: #05090d;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px #2c3a46;
}

.phone-shot img {
  width: 100%;
  border-radius: 11.5% / 5.3%;
}

.stage-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px clamp(32px, 5vw, 72px);
  margin-top: clamp(48px, 7vw, 80px);
  padding-top: 32px;
  border-top: 1px solid var(--amp-line);
}

.stage-foot h3 {
  margin-bottom: 14px;
  color: var(--amp-muted);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.server-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.server-links a {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--amp-line);
  border-radius: 999px;
  background: var(--amp-surface);
  color: var(--amp-text);
  font-size: 0.92rem;
  text-decoration: none;
}

.server-links a:hover {
  border-color: var(--amp-accent);
}

.stage-foot p {
  color: var(--amp-muted);
}

/* Secondary app */

.app-feature {
  padding: clamp(64px, 9vw, 120px) 0;
}

.app-feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.window-shot img {
  width: 100%;
  border-radius: 1.6% / 2.2%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 24px 60px rgba(20, 24, 20, 0.18);
}

.app-feature .points li::before {
  background: var(--reserve);
  opacity: 1;
}

.app-feature .arrow-link {
  color: var(--reserve);
}

.guide-links {
  display: grid;
  gap: 0;
  margin-top: 28px;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.guide-links a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 0.96rem;
  text-decoration: none;
}

.guide-links a::after {
  color: var(--faint);
  content: "\2192";
}

.guide-links a:hover::after {
  color: var(--text);
}

/* Sections */

.section {
  padding: clamp(48px, 6vw, 80px) 0;
  border-top: 1px solid var(--line);
}

.section-title {
  max-width: 20ch;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
}

.section-intro {
  max-width: 40rem;
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.1rem;
}

.columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px clamp(28px, 4vw, 56px);
  margin-top: 44px;
}

.columns > * {
  padding-top: 18px;
  border-top: 2px solid var(--text);
}

.columns p {
  margin-top: 10px;
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px clamp(32px, 5vw, 72px);
}

.about-copy p + p {
  margin-top: 16px;
}

.about-copy {
  font-size: 1.12rem;
}

.qa {
  display: grid;
  gap: 0;
  margin-top: 36px;
  border-top: 1px solid var(--line);
}

.qa > div {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 8px clamp(32px, 5vw, 72px);
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.qa dt {
  font-weight: 650;
}

.qa dd {
  color: var(--muted);
}

/* Inner pages */

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  color: var(--faint);
  font-size: 0.88rem;
  list-style: none;
}

.breadcrumbs li + li::before {
  margin-right: 6px;
  content: "/";
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--text);
}

.page-hero {
  padding: clamp(28px, 5vw, 56px) 0 clamp(36px, 5vw, 56px);
}

.page-hero h1 {
  max-width: 20ch;
  margin-top: 22px;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.page-hero .lede {
  max-width: 42rem;
  margin-top: 20px;
  color: var(--muted);
  font-size: 1.15rem;
}

.page-hero .guide-links {
  max-width: 42rem;
}

.page-meta {
  margin-top: 16px;
  color: var(--faint);
  font-size: 0.92rem;
}

.app-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

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

.prose {
  max-width: 42rem;
}

.prose h2 {
  margin: 48px 0 12px;
  font-size: 1.6rem;
}

.prose h3 {
  margin: 32px 0 8px;
  font-size: 1.12rem;
}

.prose > :first-child {
  margin-top: 0;
}

.prose p,
.prose ul,
.prose ol {
  margin-top: 12px;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

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

.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.shots button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.lightbox {
  width: min(1400px, 96vw);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  border: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.lightbox img {
  width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
}

.lightbox form {
  position: fixed;
  top: 16px;
  right: 16px;
}

.lightbox button {
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cta-band .app-id img {
  width: 56px;
  height: 56px;
  border-radius: 13px;
}

.cta-band strong {
  display: block;
  font-size: 1.05rem;
}

.cta-band span {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Footer */

.site-footer {
  padding: 48px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer-grid h2 {
  margin-bottom: 12px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0;
}

.footer-grid ul {
  display: grid;
  gap: 7px;
  padding: 0;
  list-style: none;
}

.footer-grid a {
  color: var(--muted);
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--text);
}

.footer-about p {
  max-width: 22rem;
  margin-top: 12px;
}

.legal {
  margin-top: 40px;
  color: var(--faint);
  font-size: 0.8rem;
}

/* Narrow screens */

@media (max-width: 900px) {
  .hero,
  .stage-grid,
  .app-feature-grid,
  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-feature-grid .window-shot {
    order: 2;
  }

  .hero-art {
    display: none;
  }

  .columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  :root {
    --wrap: calc(100% - 32px);
    --narrow: calc(100% - 32px);
  }

  .site-header {
    flex-wrap: wrap;
    padding: 16px 0;
  }

  .site-nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: calc(100% + 26px);
    margin: 0 -16px 0 -10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    flex: none;
  }

  .app-index,
  .stage-foot,
  .shots {
    grid-template-columns: minmax(0, 1fr);
  }

  .qa > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-id img {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }

  .devices {
    padding-right: 24px;
  }

  .phone-shot {
    width: 30%;
  }
}

/* Reserve pages */

.page-hero .kicker {
  margin: 28px 0 0;
}

.page-hero .kicker + h1 {
  margin-top: 12px;
}

.page-hero .app-id {
  margin-top: 28px;
}

.page-hero .app-id h1 {
  margin-top: 0;
}

.page-hero .app-id p {
  margin-top: 8px;
}

.section > .wrap > :first-child {
  margin-top: 0;
}

.columns-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.columns .points {
  margin-top: 12px;
  color: var(--muted);
}

.section-title + .prose {
  margin-top: 32px;
}

.cta-band .cta-row {
  margin-top: 0;
}

@media (max-width: 900px) {
  .columns-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.gallery {
  padding-bottom: clamp(48px, 6vw, 80px);
}

.gallery .shots {
  margin-top: 0;
}

.section .guide-links {
  max-width: 42rem;
}

@media (max-width: 680px) {
  .page-hero .app-id {
    flex-direction: column;
    align-items: flex-start;
  }
}
