/* Quadra landing page. Light and dark follow the system setting.
   The brand is the app icon's black, with the app's own green and red for money
   in and out. */

:root {
  color-scheme: light dark;
  --surface: #ffffff;
  --surface-alt: #f2f2f7;
  --ink: #0b0b0c;
  --ink-2: #5c5c61;
  --eyebrow: #12813e;
  --money-in: #12813e;
  --money-out: #d70015;
  /* The hero, the download section, privacy and the footer: light greys here, the app icon's black in dark. */
  --hero: #e8e8ed;
  --hero-top: #fbfbfd;
  --hero-ink: #0b0b0c;
  --hero-ink-2: #5c5c61;
  --hero-eyebrow: #12813e;
  --ring-1: rgba(11, 11, 12, 0.035);
  --ring-2: rgba(11, 11, 12, 0.04);
  --cta-bg: #0b0b0c;
  --cta-ink: #ffffff;
  --frame: #101012;
  --screen: #f2f2f7;
  --screen-border: #e0e0e6;
  --inverse: #e8e8ed;
  --inverse-card: #ffffff;
  --inverse-ink: #0b0b0c;
  --inverse-ink-2: #5c5c61;
  --band: #e8e8ed;
  --band-ink: #0b0b0c;
  --focus: #0b0b0c;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #121214;
    --surface-alt: #1c1c1e;
    --ink: #f5f5f7;
    --ink-2: #a9a9b0;
    --eyebrow: #30d158;
    --money-in: #30d158;
    --money-out: #ff453a;
    --frame: #3a3a3c;
    --screen: #000000;
    --screen-border: #3a3a3c;
    --focus: #30d158;
    --hero: #0b0b0c;
    --hero-top: #3a3a3c;
    --hero-ink: #ffffff;
    --hero-ink-2: #c7c7cc;
    --hero-eyebrow: #30d158;
    --ring-1: rgba(255, 255, 255, 0.06);
    --ring-2: rgba(255, 255, 255, 0.07);
    --cta-bg: #ffffff;
    --cta-ink: #0b0b0c;
    --inverse: #000000;
    --inverse-card: #1c1c1e;
    --inverse-ink: #ffffff;
    --inverse-ink-2: #c7c7cc;
    --band: #0b0b0c;
    --band-ink: #ffffff;
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--inverse);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

img,
picture,
svg {
  display: block;
}

img {
  width: 100%;
  height: auto;
}

a {
  color: inherit;
}

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

/* A section that a header link scrolled to takes focus, without a ring around the whole section. */
[tabindex="-1"]:focus {
  outline: none;
}

/* Off screen until a keyboard user tabs to it. */
.skip {
  position: absolute;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

/* Layout */

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 112px 0;
  background: var(--surface);
}

.section--alt {
  background: var(--surface-alt);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 56px 64px;
}

/* Type */

.eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eyebrow);
}

.title {
  font-size: clamp(34px, 4.2vw, 60px);
  line-height: 1.03;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lede {
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-2);
}

.head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.head--center {
  max-width: 760px;
  margin: 0 auto;
  align-items: center;
  text-align: center;
}

.small {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* Apple's badge, at its own proportions. */
.store-badge {
  display: inline-block;
  border-radius: 12px;
  transition: transform 0.15s ease;
}

.store-badge:hover {
  transform: translateY(-1px);
}

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

/* Pill button, for the header. */
.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

/* Hero: the app icon's black, top to bottom. */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--hero-top), var(--hero) 70%);
  color: var(--hero-ink);
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 22.5%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.nav__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-left: auto;
  gap: 8px 28px;
  font-size: 16px;
  font-weight: 600;
}

.nav__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.nav__links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
  padding-top: 72px;
  padding-bottom: 96px;
}

.hero__copy {
  position: relative;
  z-index: 1;
  flex: 1 1 480px;
  min-width: 0;
  max-width: 660px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.hero .eyebrow {
  color: var(--hero-eyebrow);
}

.hero__copy .lede,
.download .note {
  color: var(--hero-ink-2);
}

.hero h1 {
  font-size: clamp(52px, 6.6vw, 96px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero__copy .lede {
  max-width: 540px;
  font-size: 22px;
  line-height: 1.45;
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.note {
  font-size: 15px;
  line-height: 1.45;
}

.hero__device {
  position: relative;
  flex: 0 1 340px;
  min-width: 0;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.hero__device::before,
.hero__device::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.hero__device::before {
  width: 880px;
  height: 880px;
  background: var(--ring-1);
}

.hero__device::after {
  width: 540px;
  height: 540px;
  background: var(--ring-2);
}

/* The looping video sits exactly over the screenshot, inside the frame's padding, and fades in once it plays. */
.hero__video {
  position: absolute;
  inset: 9px;
  width: calc(100% - 18px);
  height: calc(100% - 18px);
  object-fit: cover;
  border-radius: 15.2% / 7%;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hero__video.is-playing {
  opacity: 1;
}

.hero__device .phone {
  z-index: 1;
  max-width: 340px;
  padding: 9px;
  background: #2c2c2e;
  box-shadow: 0 36px 70px -24px rgba(0, 0, 0, 0.8);
}

/* Cards */

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border-radius: 24px;
  background: var(--surface-alt);
}

.section--alt .card {
  background: var(--surface);
}

.card h3 {
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
}

.card--large {
  gap: 10px;
  padding: 28px;
}

.card--large h3 {
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card--large p {
  font-size: 17px;
}

/* A close-up from the app at the top of a card. */
.card__shot {
  margin-bottom: 12px;
}

.card__shot img {
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background: var(--screen);
}

.card__tag {
  align-self: flex-start;
  margin-top: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.section--alt .card__tag {
  background: var(--surface-alt);
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Four ways in: the first, Apple Pay, is the one that needs no typing at all. */

.way {
  gap: 10px;
}

.way strong {
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.way p {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
}

.way--first {
  background: var(--ink);
  color: var(--surface);
}

.way--first .eyebrow {
  color: var(--surface);
  opacity: 0.7;
}

.way--first p {
  color: var(--surface);
  opacity: 0.8;
}

/* Copy beside one or two phones */

.split__copy {
  flex: 1 1 440px;
  min-width: 0;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.split__device {
  flex: 0 1 280px;
  min-width: 0;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.pair {
  flex: 1 1 420px;
  min-width: 0;
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
}

.pair .phone {
  flex: 1 1 0;
  min-width: 0;
  max-width: 250px;
  padding: 7px;
}

.pair .phone:first-child {
  margin-top: 40px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.pills li {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 18px;
  font-weight: 700;
}

.section:not(.section--alt) .pills li {
  background: var(--surface-alt);
}

.pills li:first-child {
  background: var(--ink);
  color: var(--surface);
}

/* Reports: three screens in a row, each with its caption. */

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

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}

.step__text {
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step h3 {
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.step p {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
}

.band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding: 40px;
  border-radius: 32px;
  background: var(--band);
}

.band p {
  flex: 1 1 320px;
  min-width: 0;
  color: var(--band-ink);
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
}

/* iPad, with the iPhone over its corner in the other appearance. */

/* Smart: two tiles, each with the whole phone below its copy. */

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

.tile {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 40px;
  border-radius: 32px;
  background: var(--surface);
}

.tile__text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tile h3 {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.tile p {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-2);
}

.tile__device {
  display: flex;
  justify-content: center;
  margin-top: auto;
}

.tile .phone {
  max-width: 280px;
}

.devices {
  position: relative;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 0 7% 5% 0;
}

.devices .tablet {
  padding: 1.2%;
  border-radius: 3.2% / 4.3%;
}

.devices .tablet img {
  border-radius: 2% / 2.7%;
}

.devices .phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 22%;
  padding: 0.6%;
  background: #3a3a3c;
  box-shadow: 0 30px 60px -24px rgba(11, 11, 12, 0.6);
}

/* iPhone Duo: its words beside it, on a panel. */
.duo-feature {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 40px 72px;
  padding: 40px;
  border-radius: 32px;
  background: var(--surface);
}

.duo-feature__copy {
  flex: 1 1 320px;
  min-width: 0;
  max-width: 480px;
}

.duo-feature h3 {
  margin-bottom: 12px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.duo-feature .duo {
  flex: 1 1 420px;
  max-width: 560px;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .duo-feature {
    padding: 24px;
    border-radius: 24px;
  }

  .duo-feature .duo {
    flex-basis: 100%;
  }
}

/* Privacy */

.privacy {
  background: var(--inverse);
  color: var(--inverse-ink);
}

.privacy .eyebrow {
  color: var(--hero-eyebrow);
}

.privacy .lede {
  color: var(--inverse-ink-2);
}

.privacy .card {
  background: var(--inverse-card);
}

.privacy .card p {
  color: var(--inverse-ink-2);
}

/* Questions */

.questions .card {
  padding: 24px 28px;
}

.questions .card h3 {
  font-size: 19px;
  line-height: 1.3;
}

/* Download */

.download {
  padding: 128px 0;
  background: linear-gradient(to bottom, var(--hero-top), var(--hero) 70%);
  color: var(--hero-ink);
  text-align: center;
}

.download .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.download .icon {
  width: 88px;
  height: 88px;
  border-radius: 22.5%;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
}

.download h2 {
  max-width: 900px;
  font-size: clamp(40px, 5.6vw, 84px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.download .lede {
  font-size: 22px;
  line-height: 1.45;
  color: var(--hero-ink-2);
}

.download .note {
  max-width: 560px;
}

/* Footer */

.footer {
  background: var(--inverse);
  color: var(--inverse-ink-2);
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  padding-top: 40px;
  padding-bottom: 48px;
}

.footer .brand {
  font-size: 16px;
  color: var(--inverse-ink);
}

.footer .brand img {
  width: 32px;
  height: 32px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  font-size: 15px;
}

.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--inverse-ink);
}

.hero :focus-visible,
.download :focus-visible,
.footer :focus-visible,
.privacy :focus-visible,
.band :focus-visible {
  outline-color: var(--hero-eyebrow);
}

/* Narrower screens */

/* Once copy and screens no longer fit side by side, they stack, centred: the copy first. */
@media (max-width: 980px) {
  .split {
    flex-direction: column;
    align-items: stretch;
  }

  .split__copy {
    order: -1;
    flex-basis: auto;
    max-width: 720px;
    margin: 0 auto;
  }

  /* Except under the two Logging screens, which it describes. */
  .pair ~ .split__copy {
    order: 0;
  }

  .split__copy .head {
    align-items: center;
    text-align: center;
  }

  .split__copy .pills {
    justify-content: center;
  }

  .split__device,
  .pair {
    flex-basis: auto;
    width: 100%;
  }
}

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

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

@media (max-width: 700px) {
  .section {
    padding: 72px 0;
  }

  .download {
    padding: 88px 0;
  }

  .stack {
    gap: 48px;
  }

  .hero__body {
    gap: 48px;
    padding-top: 48px;
    padding-bottom: 72px;
  }

  .hero__copy .lede,
  .download .lede {
    font-size: 19px;
  }

  .lede {
    font-size: 18px;
  }

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

  .tile {
    padding: 28px 24px;
    border-radius: 28px;
  }

  .band {
    padding: 28px 24px;
    border-radius: 28px;
  }

  .pair {
    gap: 14px;
  }

  /* The three report screens swipe sideways, with the next one peeking in. */
  .steps {
    display: flex;
    gap: 20px;
    margin: 0 -24px;
    padding: 0 24px 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 24px;
    scrollbar-width: none;
  }

  .steps::-webkit-scrollbar {
    display: none;
  }

  .step {
    flex: 0 0 72%;
    scroll-snap-align: start;
  }

  /* In the sideways row each screen would wait to come in until it was swiped into view, rising inside
     a row that clips it; here they're simply there. */
  .motion .steps .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 520px) {
  .wrap {
    padding-left: 20px;
    padding-right: 20px;
  }

  .steps {
    margin: 0 -20px;
    padding: 0 20px 8px;
    scroll-padding: 0 20px;
  }

  /* The page links get a row of their own under the brand and Download. */
  .nav {
    padding-top: 20px;
  }

  .nav__download {
    margin-left: auto;
  }

  .nav__links {
    order: 1;
    flex-basis: 100%;
    margin-left: 0;
    justify-content: space-between;
    gap: 0 12px;
    font-size: 15px;
  }

  .hero h1 {
    font-size: clamp(44px, 13vw, 56px);
  }

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

  .button {
    padding: 0 18px;
    font-size: 15px;
  }

  .store-badge img {
    height: 52px;
  }
}

/* Motion: only on when the head script adds .motion, which it doesn't under Reduce Motion. */

.motion .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.motion .pills li.reveal {
  transform: translateY(10px) scale(0.96);
}

.motion .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* The hero comes in once on load: the copy line by line, the phone rising into its rings. */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
}

@keyframes rings {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
  }
}

.motion .hero__copy > * {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.motion .hero__copy > :nth-child(2) {
  animation-delay: 0.08s;
}

.motion .hero__copy > :nth-child(3) {
  animation-delay: 0.16s;
}

.motion .hero__copy > :nth-child(4) {
  animation-delay: 0.24s;
}

.motion .hero__device .phone {
  animation: rise 1s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.motion .hero__device::before,
.motion .hero__device::after {
  animation: rings 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.motion .hero__device::after {
  animation-delay: 0.1s;
}

@media print {
  .motion .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .store-badge {
    transition: none;
  }
}

.privacy__more {
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  color: var(--inverse-ink-2);
}

.privacy__more a {
  text-underline-offset: 4px;
}

.privacy__more a:hover {
  color: var(--inverse-ink);
}

/* On a phone the hero is compact, so the app in the phone below is already in view when the page opens:
   tighter spacing and a smaller headline. */
@media (max-width: 520px) {
  .hero__body {
    gap: 28px;
    padding-top: 16px;
  }

  .hero__copy {
    gap: 14px;
  }

  .hero .eyebrow {
    font-size: 12px;
  }

  .hero h1 {
    font-size: clamp(36px, 10.6vw, 46px);
  }

  .hero__copy .lede {
    font-size: 17px;
  }

  .hero .cta {
    margin-top: 4px;
  }

  .hero__device .phone {
    max-width: 290px;
  }
}
