/* Pace website. Dark by design, matching the App Store artwork. */

:root {
  color-scheme: dark;

  --bg: #050807;
  --bg-raised: #0c1210;
  --card: #101816;
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f2f5f4;
  --text-secondary: #a6b4af;
  --text-tertiary: #7d8c87;
  /* The app's accent in dark appearance. */
  --accent: #59c7a6;
  --accent-strong: #7fdcbf;
  --accent-ink: #04110d;
  --accent-wash: rgba(89, 199, 166, 0.12);

  --radius-card: 22px;
  --radius-small: 14px;
  --page-max: 1120px;
  --gutter: clamp(16px, 4vw, 32px);

  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
    system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-strong);
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--page-max));
  margin-inline: auto;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lede {
  color: var(--text-secondary);
  font-size: clamp(1.125rem, 1.8vw, 1.3rem);
}

.section {
  padding-block: clamp(72px, 11vw, 128px);
}

.section-head {
  display: grid;
  gap: 16px;
  max-width: 680px;
  margin-bottom: clamp(36px, 6vw, 64px);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(5, 8, 7, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--card-border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

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

.site-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

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

/* More specific than .badge-link img below, so the header keeps the small size. */
.site-header .header-badge img {
  width: 120px;
  height: 40px;
}

/* The App Store badge is used as supplied by Apple; only its size changes. */
.badge-link {
  display: inline-block;
  border-radius: 9px;
}

.badge-link img {
  width: 165px;
  height: 55px;
}

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(48px, 8vw, 96px) clamp(64px, 9vw, 112px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 70%;
  z-index: -1;
  background: url("assets/flow-pages.webp") center bottom / cover no-repeat;
  opacity: 0.55;
  mask-image: linear-gradient(to bottom, transparent, black 45%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 45%);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
}

.hero-copy {
  display: grid;
  gap: 24px;
  justify-items: start;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-meta li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-meta li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Phone frame */

.device {
  position: relative;
  width: min(100%, 330px);
  margin-inline: auto;
  aspect-ratio: 1206 / 2622;
  padding: 10px;
  border-radius: 52px;
  background: linear-gradient(145deg, #2a302e, #0d100f 40%, #1c2220);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 40px 80px -24px rgba(0, 0, 0, 0.85),
    0 0 120px -40px rgba(89, 199, 166, 0.35);
}

.device > img,
.device > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 42px;
  background: #000;
}

.device-small {
  width: min(100%, 280px);
  padding: 8px;
  border-radius: 44px;
}

.device-small > img {
  border-radius: 36px;
}

/* Trust strip */

.trust {
  border-block: 1px solid var(--card-border);
  background: var(--bg-raised);
}

.trust ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 28px 0;
  list-style: none;
}

.trust li {
  display: grid;
  gap: 4px;
}

.trust strong {
  font-size: 1rem;
}

.trust span {
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* How it works */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 28px;
}

.steps .card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.steps .card::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-wash);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 800;
}

.card p {
  color: var(--text-secondary);
}

/* Features */

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

.feature + .feature {
  margin-top: clamp(72px, 10vw, 120px);
}

/* Articles only, so the section heading does not shift the alternation. */
.feature:nth-of-type(even) .device {
  order: 2;
}

.feature-copy {
  display: grid;
  gap: 18px;
  max-width: 520px;
}

.feature-copy p {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

.ticks {
  display: grid;
  gap: 10px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: 30px;
  color: var(--text);
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304110d' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
      center / 12px no-repeat,
    var(--accent);
}

/* Honest progress */

.honest {
  background: var(--bg-raised);
  border-block: 1px solid var(--card-border);
}

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

.rule-value {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Pricing */

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 820px;
}

.plan {
  position: relative;
  display: grid;
  gap: 6px;
  align-content: start;
}

.plan-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset, 0 30px 80px -40px rgba(89, 199, 166, 0.5);
}

.plan-tag {
  justify-self: start;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-tag-muted {
  background: var(--accent-wash);
  color: var(--accent);
}

.plan-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.plan-price {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.plan-price small {
  color: var(--text-secondary);
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
}

.plan p {
  color: var(--text-secondary);
}

.included {
  margin-top: 36px;
  max-width: 820px;
}

.included h3 {
  margin-bottom: 20px;
  font-size: 1.25rem;
}

.included .ticks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 32px;
}

.included .ticks strong {
  display: block;
}

.included .ticks span {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.fine-print {
  max-width: 820px;
  margin-top: 28px;
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* FAQ */

.faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-small);
  padding: 0 22px;
}

.faq summary {
  position: relative;
  padding: 20px 32px 20px 0;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  translate: 0 -50%;
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 400;
  transition: rotate 0.2s ease;
}

.faq details[open] summary::after {
  rotate: 45deg;
}

.faq details > div {
  display: grid;
  gap: 12px;
  padding-bottom: 22px;
  color: var(--text-secondary);
}

/* Final call to action */

.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("assets/flow-light.webp") center bottom / cover no-repeat;
  opacity: 0.5;
  mask-image: linear-gradient(to bottom, transparent, black 60%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 60%);
}

.cta .wrap {
  display: grid;
  justify-items: center;
  gap: 22px;
}

.cta .app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 24px 60px -20px rgba(89, 199, 166, 0.6);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--card-border);
  padding-block: 40px 56px;
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

.site-footer .wrap {
  display: grid;
  gap: 20px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

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

/* Document pages: privacy and support */

.doc {
  padding-block: clamp(48px, 8vw, 96px);
}

.doc .wrap {
  max-width: 760px;
}

.doc header {
  display: grid;
  gap: 14px;
  margin-bottom: 40px;
}

.doc section {
  display: grid;
  gap: 12px;
  margin-top: 36px;
}

.doc h2 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.doc p,
.doc li {
  color: var(--text-secondary);
}

.doc ol,
.doc ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.3em;
}

.doc .updated {
  color: var(--text-tertiary);
  font-size: 0.9375rem;
}

.contact-card {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.contact-card a {
  font-size: 1.25rem;
  font-weight: 650;
}

/* Responsive */

@media (max-width: 920px) {
  .site-nav {
    display: none;
  }

  .header-badge {
    margin-left: auto;
  }

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

  .hero-copy {
    justify-items: center;
    text-align: center;
  }

  .hero-meta {
    justify-content: center;
  }

  .hero .device {
    width: min(78%, 300px);
  }

  .feature {
    justify-items: center;
    text-align: center;
  }

  .feature .device,
  .feature:nth-of-type(even) .device {
    order: 0;
    width: min(70%, 260px);
  }

  .feature-copy {
    justify-items: center;
  }

  .ticks {
    text-align: left;
  }

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

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

@media (max-width: 600px) {
  .trust ul,
  .rules,
  .plans,
  .included .ticks {
    grid-template-columns: minmax(0, 1fr);
  }

  .card {
    padding: 22px;
  }
}

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

  .faq summary::after {
    transition: none;
  }
}
