/* Bricolage Grotesque, SIL Open Font License 1.1 (fonts/OFL.txt). Cut to Latin, weights 600 to 800. */
@font-face {
  font-family: "Volley Display";
  src: url("/fonts/volley-display.woff2") format("woff2");
  font-weight: 600 800;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  /* From branding/logo.svg and app/lib/look.dart. */
  --fill: #fd5c0e;
  --on-fill: #200b02;
  --on-fill-quiet: #4a1d06;
  --accent: light-dark(#b34100, #ff9a5c);
  --text: light-dark(#14161a, #f6f7f9);
  --quiet: light-dark(#545b68, #a6adb9);
  --ground: light-dark(#f4f2ef, #141517);
  --raised: light-dark(#fff, #1f2125);
  --line: light-dark(#e2ded8, #33363c);
  --display: "Volley Display", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --edge: max(1.25rem, env(safe-area-inset-left), env(safe-area-inset-right));
  accent-color: var(--fill);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 1.0625rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--fill);
  color: var(--on-fill);
}

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

figure {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
}

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

h1,
h2 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0 0 1.25rem;
}

h1 {
  font-size: clamp(2.6rem, 6.4vw, 5.25rem);
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
}

p {
  margin: 0 0 1rem;
  max-width: 34em;
  text-wrap: pretty;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding-inline: var(--edge);
}

.skip {
  position: absolute;
  left: -100vw;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--raised);
}

/* Header */

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: max(0.75rem, env(safe-area-inset-top)) 0 0.75rem;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
}

.bar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  min-height: 3.25rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  background: var(--fill);
  color: var(--on-fill);
  font-weight: 650;
  text-decoration: none;
  transition:
    transform 160ms var(--ease-out),
    background-color 160ms ease;
}

.button:hover {
  background: #ff6d24;
}

.button:active {
  transform: scale(0.97);
}

.button.small {
  min-height: 2.5rem;
  padding: 0 1.1rem;
  font-size: 0.9375rem;
}

.button.dark {
  background: var(--on-fill);
  color: #fff;
}

.button.dark:hover {
  background: #3a1806;
}

.text-link {
  color: var(--accent);
  font-weight: 650;
}

/* Hero: the orange rises like a transfer filling up, as it does in the app. */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 6vw, 5rem) 0 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
}

.hero-text {
  padding-bottom: clamp(9rem, 16vw, 13rem);
}

.lead {
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  color: var(--quiet);
}

.actions {
  margin: 1.75rem 0 1rem;
}

.note {
  font-size: 0.9375rem;
  color: var(--quiet);
}

.level {
  position: absolute;
  inset: auto 0 0;
  height: clamp(7rem, 14vw, 11rem);
  background: var(--fill);
  animation: rise 1.4s var(--ease-out) 0.15s both;
}

.level::before {
  content: "";
  position: absolute;
  inset: -2.4rem 0 auto;
  height: 2.5rem;
  background: url("/wave.svg") bottom / 100% 100% no-repeat;
}

@keyframes rise {
  from {
    transform: translateY(100%);
  }
}

/* Device frames */

.phone {
  padding: 0.55rem;
  border-radius: 2.6rem;
  background: #16171a;
  box-shadow:
    0 0 0 1px light-dark(transparent, #3a3e47),
    0 2rem 3rem -1.5rem rgb(32 11 2 / 0.45),
    0 0.5rem 1rem -0.5rem rgb(32 11 2 / 0.25);
}

.phone img {
  border-radius: 2.1rem;
}

.hero-phone {
  justify-self: center;
  width: min(100%, 20rem);
  margin-bottom: clamp(-6rem, -8vw, -3rem);
  transform: translateY(calc(-1 * clamp(2rem, 5vw, 4rem)));
}

/* Sections */

main > section {
  padding: clamp(4.5rem, 10vw, 8rem) 0;
}

.hero {
  padding-bottom: 0 !important;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.flip .copy {
  order: 2;
}

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

/* Routes */

.lanes {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 1.75rem;
  background: var(--raised);
  border: 1px solid var(--line);
}

.end {
  writing-mode: vertical-rl;
  rotate: 180deg;
  font-weight: 650;
  font-size: 0.9375rem;
  color: var(--quiet);
}

.end:last-child {
  rotate: none;
}

.lanes ol {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lanes li {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 1.1rem 0;
  overflow: hidden;
}

.lanes li::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 2px;
  background: var(--line);
}

.lanes li span {
  position: relative;
  z-index: 1;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: var(--raised);
  border: 1px solid var(--line);
  font-size: 0.9375rem;
  font-weight: 600;
}

.lanes li.won::before {
  height: 4px;
  margin-top: -1px;
  background: var(--fill);
}

.lanes li.won span {
  background: var(--fill);
  border-color: var(--fill);
  color: var(--on-fill);
}

/* A pulse runs along each route; only the winner keeps carrying. */
.lanes li::after {
  content: "";
  position: absolute;
  top: calc(50% - 0.3rem);
  left: 0;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--fill);
  animation: pulse 2.6s linear infinite;
}

.lanes li:nth-child(2)::after {
  animation-name: pulse-fade;
  animation-delay: 0.25s;
}

.lanes li:nth-child(3)::after {
  animation-name: pulse-fade;
  animation-delay: 0.5s;
}

@keyframes pulse {
  from {
    translate: -1rem 0;
  }
  to {
    translate: 40rem 0;
  }
}

@keyframes pulse-fade {
  from {
    translate: -1rem 0;
    opacity: 1;
  }
  35% {
    opacity: 0;
  }
  to {
    translate: 40rem 0;
    opacity: 0;
  }
}

/* The browser window mirrors the receive page on volleysend.com/app/. */

.window {
  border-radius: 1.25rem;
  background: var(--raised);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 2rem 3rem -2rem rgb(32 11 2 / 0.35);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}

.window-bar i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--line);
}

.window-bar span {
  flex: 1;
  margin-left: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--ground);
  color: var(--quiet);
  font-size: 0.8125rem;
  text-align: center;
}

.window-body {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.w-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.w-quiet {
  color: var(--quiet);
}

.w-files {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.w-files li {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}

.w-files b {
  font-weight: 550;
}

.w-files span {
  color: var(--quiet);
  font-variant-numeric: tabular-nums;
}

.w-actions {
  display: flex;
  gap: 0.6rem;
}

.w-actions span {
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: var(--ground);
  font-weight: 600;
  font-size: 0.9375rem;
}

.w-actions .w-primary {
  background: var(--fill);
  color: var(--on-fill);
}

/* Big files */

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  max-width: 30rem;
  justify-self: center;
}

.pair .phone:last-child {
  translate: 0 3rem;
}

/* Devices */

.devices h2 {
  max-width: 16em;
}

.laptop {
  margin: clamp(2rem, 5vw, 3.5rem) auto 0;
  box-shadow: 0 0 0 1px light-dark(transparent, #3a3e47);
  max-width: 56rem;
  padding: 0.6rem 0.6rem 0;
  border-radius: 1.5rem 1.5rem 0 0;
  background: #16171a;
}

.laptop img {
  border-radius: 1rem 1rem 0 0;
}

.laptop::after {
  content: "";
  display: block;
  height: 1rem;
  margin: 0 -2.5rem;
  border-radius: 0 0 1rem 1rem;
  background: linear-gradient(#c9ccd1, #9a9ea6);
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  padding: 0;
  list-style: none;
}

.platforms li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  background: var(--raised);
  border: 1px solid var(--line);
}

.platforms span {
  color: var(--quiet);
  font-size: 0.875rem;
}

.platforms .now {
  background: var(--fill);
  border-color: var(--fill);
  color: var(--on-fill);
}

.platforms .now a {
  font-size: 0.875rem;
  font-weight: 650;
}

/* Trust */

.trust dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  margin: clamp(1.5rem, 4vw, 3rem) 0 0;
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 2px solid var(--text);
}

.trust dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}

.trust dd {
  margin: 0;
  color: var(--quiet);
}

/* Close */

.close {
  background: var(--fill);
  color: var(--on-fill);
  text-align: center;
}

.close h2 {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
}

.close p {
  margin: 0 auto 2rem;
  color: var(--on-fill-quiet);
  font-size: 1.125rem;
}

.close ::selection {
  background: var(--on-fill);
  color: var(--fill);
}

.close :focus-visible {
  outline-color: var(--on-fill);
}

/* Footer */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2rem max(2rem, env(safe-area-inset-bottom));
  font-size: 0.9375rem;
  color: var(--quiet);
}

.small-brand {
  font-size: 1.125rem;
  color: var(--text);
}

.small-brand img {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.4rem;
}

.foot nav {
  display: flex;
  gap: 1.5rem;
}

/* Narrow screens */

@media (max-width: 52rem) {
  .hero-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .hero-text {
    padding-bottom: 0;
  }

  .hero-phone {
    width: min(78%, 17rem);
    margin-bottom: -5rem;
    transform: none;
  }

  .level {
    height: 9rem;
  }

  .flip .copy {
    order: 0;
  }

  .pair {
    width: 100%;
  }

  .trust dl {
    grid-template-columns: 1fr;
  }

  .laptop::after {
    margin: 0 -1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .level,
  .lanes li::after {
    animation: none;
  }

  .lanes li:not(.won)::after {
    display: none;
  }

  .lanes li.won::after {
    left: 50%;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .bar {
    background: var(--ground);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
