/* The app's Vault theme (apps/mobile/src/global.css). The site is dark only, like the app. */
:root {
  color-scheme: dark;
  --background: rgb(7 8 12);
  --foreground: rgb(242 243 247);
  --card: rgb(18 20 27);
  --muted-foreground: rgb(150 153 166);
  --border: rgb(36 38 48);
  --primary: rgb(255 204 0);
  --gutter: 1rem;
  --width: 72rem;
}

/* The display face: wordmark, headings and big numbers only; body text stays the system font. */
@font-face {
  font-family: "Space Grotesk";
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-bold.ttf") format("truetype");
}

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

html {
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--background);
  color: var(--foreground);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

h1,
h2,
.wordmark,
.numbers strong {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

h1,
h2 {
  text-wrap: balance;
}

.wordmark {
  color: var(--foreground);
  font-size: 1.75rem;
  text-decoration: none;
}

.wordmark span,
.dot {
  color: var(--primary);
}

.pill {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 999px;
  background: rgb(18 20 27 / 0.7);
  color: var(--foreground);
  font-size: 0.9375rem;
  font-weight: 600;
  backdrop-filter: blur(12px);
}

.pill-lg {
  padding: 0.7rem 1.3rem;
  font-size: 1rem;
}

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--width);
  margin: 0 auto;
  padding: 0.9rem var(--gutter);
}

.nav::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  background: linear-gradient(rgb(7 8 12 / 0.9), rgb(7 8 12 / 0));
  backdrop-filter: blur(10px);
  mask-image: linear-gradient(black 60%, transparent);
}

main {
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Phones: the screenshots in a thin dark bezel with a metal rim, like the app's coins. */

.phone {
  position: relative;
  width: min(100%, 18rem);
  margin: 0;
  padding: 0.45rem;
  border-radius: 2.6rem;
  background: linear-gradient(
    160deg,
    rgb(70 72 84),
    rgb(18 20 27) 30%,
    rgb(10 11 15) 70%,
    rgb(60 62 72)
  );
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.06),
    0 2.5rem 5rem -1rem rgb(0 0 0 / 0.8),
    0 1rem 2rem rgb(0 0 0 / 0.5);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2.2rem;
}

/* Hero */

.hero {
  position: relative;
  display: grid;
  gap: 3rem;
  align-items: center;
  padding: 2.5rem 0 4rem;
}

/* Soft light in the euro's blue and yellow behind the hero, like the app's flag glows. */
.hero-glow {
  position: absolute;
  inset: -6rem calc(50% - 50vw) 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 45% 40% at 75% 35%, rgb(0 51 153 / 0.55), transparent),
    radial-gradient(ellipse 30% 30% at 90% 70%, rgb(255 204 0 / 0.18), transparent),
    radial-gradient(ellipse 40% 35% at 10% 10%, rgb(255 255 255 / 0.05), transparent);
  pointer-events: none;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.75rem, 9vw, 5.25rem);
}

.lead {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  color: var(--muted-foreground);
  font-size: 1.1875rem;
}

.stores {
  margin: 2rem 0 0;
}

.hero-phones {
  position: relative;
  display: grid;
  justify-items: center;
  padding-right: 3.5rem;
}

.hero-phones .phone {
  grid-area: 1 / 1;
}

.phone-back {
  transform: translate(4.5rem, 2rem) rotate(7deg) scale(0.9);
  opacity: 0.85;
}

.phone-front {
  transform: rotate(-3deg);
}

/* Numbers */

.numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.numbers li {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: var(--card);
  color: var(--muted-foreground);
}

.numbers strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--foreground);
  font-size: 2.25rem;
}

/* Features: a phone over a glow in the colours of the issuer on its screen (--a, --b). */

.feature {
  position: relative;
  display: grid;
  gap: 2.5rem;
  justify-items: center;
  padding: 5rem 0 0;
}

.feature .phone {
  z-index: 0;
}

.feature .phone::before {
  content: "";
  position: absolute;
  inset: -20% -60%;
  z-index: -1;
  background:
    radial-gradient(closest-side at 38% 42%, rgb(var(--a) / 0.45), transparent),
    radial-gradient(closest-side at 62% 58%, rgb(var(--b) / 0.32), transparent);
  pointer-events: none;
}

.feature-text {
  max-width: 30rem;
}

.feature h2,
.private h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 6vw, 3.25rem);
}

.feature p,
.private p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 1.125rem;
}

/* Privacy and closing call */

.private {
  margin: 6rem 0 0;
  padding: 3.5rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 2rem;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgb(255 204 0 / 0.12), transparent), var(--card);
  text-align: center;
}

.private p {
  max-width: 32rem;
  margin: 0 auto;
}

/* Footer */

footer {
  max-width: var(--width);
  margin: 4rem auto 0;
  padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 0.875rem;
  text-align: center;
}

footer a {
  color: var(--foreground);
  font-size: 1rem;
  text-decoration: none;
}

footer a:hover {
  color: var(--primary);
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2rem;
}

.credits {
  max-width: 44rem;
  margin: 1.5rem auto 0;
}

/* Desktop */

@media (min-width: 56rem) {
  :root {
    --gutter: 2rem;
  }

  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    min-height: calc(100svh - 4rem);
    padding: 2rem 0 5rem;
  }

  .hero-phones .phone {
    width: 19rem;
  }

  .private {
    padding: 4.5rem 2rem;
  }

  .feature {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    padding: 8rem 0 0;
  }

  .feature-text {
    justify-self: start;
  }

  .feature:nth-of-type(odd) .phone {
    order: 2;
  }

  .feature:nth-of-type(odd) .feature-text {
    justify-self: end;
  }
}

/* Motion: phones and text rise in once as they scroll into view, where the browser supports it. */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .feature .phone,
    .feature-text {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 3rem;
  }
}

/* Privacy policy */

.page main {
  max-width: 42rem;
}

.page h1 {
  margin: 2rem 0 0.5rem;
  font-size: clamp(2.25rem, 7vw, 3rem);
}

.page h2 {
  margin: 2.5rem 0 0.5rem;
  font-size: 1.5rem;
}

.page .muted {
  margin: 0;
  color: var(--muted-foreground);
}

.page li + li {
  margin-top: 0.5rem;
}

.page footer {
  max-width: 42rem;
}
