/* The invite landing page. Colours and radii are the app's tokens
   (src/theme/tokens.ts); motion uses its 300 ms and standard easing. */

@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Inter_400Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Inter_600SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/Inter_800ExtraBold.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --zest: #3e8444;
  --zest-pressed: #346f39;
  --dark: #1f4742;
  --ink: #333333;
  --muted: #5c6663;
  --tint: #e0f0e5;
  --grey: #e8eae9;
  --line: #c9cecc;
  --white: #ffffff;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --gutter: 20px;
  --standard: cubic-bezier(0.2, 0, 0, 1);
}

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--tint) 0, var(--white) 360px) no-repeat, var(--white);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}

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

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 100vh;
  min-height: 100dvh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mark {
  border-radius: 11px;
  box-shadow: 0 1px 2px rgb(31 71 66 / 0.18);
}
.wordmark {
  color: var(--dark);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
h1 {
  color: var(--dark);
  font-size: clamp(32px, 9vw, 52px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
}
.lead {
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.muted {
  color: var(--muted);
}
.notice {
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
}

/* Steps: a white card each, numbered by CSS counters so a hidden step never
   leaves a gap in the numbers. */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: step;
}
.step {
  counter-increment: step;
  display: flex;
  gap: 14px;
  padding: 18px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow:
    0 0 0 1px rgb(31 71 66 / 0.08),
    0 8px 24px -12px rgb(31 71 66 / 0.25);
}
.step::before {
  content: counter(step);
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--dark);
  font-size: 15px;
  font-weight: 800;
}
.step-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
h2 {
  color: var(--dark);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.015em;
  padding-top: 3px;
}
.step .muted {
  font-size: 15px;
}

.stores {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 20px;
  border-radius: var(--radius-pill, 999px);
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 160ms var(--standard),
    background-color 160ms var(--standard);
}
.button:active {
  transform: scale(0.98);
}
.button:focus-visible {
  outline: 3px solid var(--zest);
  outline-offset: 2px;
}
.store {
  background: var(--dark);
  color: var(--white);
}
.primary {
  margin-top: 8px;
  background: var(--zest);
  color: var(--white);
}
.primary:active {
  background: var(--zest-pressed);
}

.qr {
  margin-top: 10px;
  width: 196px;
  max-width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: 0 0 0 1px var(--grey);
}
.qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.foot {
  margin-top: auto;
  font-size: 14px;
  color: var(--ink);
}
.foot p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.plate {
  padding: 3px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--dark);
  color: var(--dark);
  font-weight: 800;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

/* What each platform sees. */
body[data-platform='ios'] .only-android,
body[data-platform='ios'] .only-desktop,
body[data-platform='android'] .only-ios,
body[data-platform='android'] .only-desktop,
body[data-platform='desktop'] .only-phone {
  display: none;
}

/* A computer: the copy beside the steps, both stores side by side. */
@media (min-width: 840px) {
  .page {
    padding-top: 48px;
    gap: 48px;
  }
  .layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 48px;
  }
  .intro {
    flex: 1.1;
    padding-top: 8px;
  }
  .steps {
    flex: 1;
  }
}

/* One calm entrance, off for Reduce Motion. */
@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 300ms var(--standard) both;
  }
  .layout .rise:nth-child(2) {
    animation-delay: 60ms;
  }
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
  }
}
