/* Padeldex site: the App Store screenshots' look. White ground, black
   type, SF on Apple devices (system font, nothing downloaded), self-hosted
   Inter everywhere else. */
@font-face {
  font-family: "Inter";
  src: url("/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --ink: #000000;
  --muted: rgba(0, 0, 0, 0.5);
  --line: rgba(0, 0, 0, 0.1);
  --court: #1e88e5;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--court);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Top bar: icon and name, links home. */
.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 0;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.bar img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

h1 {
  font-size: clamp(44px, 8vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 800;
  margin: 40px 0 16px;
}

h2 {
  font-size: 28px;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 48px 0 8px;
}

h3 {
  font-size: 20px;
  letter-spacing: -0.015em;
  margin: 28px 0 4px;
}

.lead {
  font-size: clamp(20px, 3vw, 24px);
  color: var(--muted);
  letter-spacing: -0.01em;
  margin: 0 0 32px;
}

.meta {
  color: var(--muted);
  font-size: 15px;
}

p,
ul {
  margin: 0 0 16px;
}

li {
  margin-bottom: 6px;
}

/* Landing page */
.hero {
  text-align: center;
  padding: 48px 0 24px;
}

.hero .icon {
  width: 128px;
  height: 128px;
  border-radius: 29px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.hero h1 {
  margin-top: 28px;
}

.soon {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 16px;
}

/* Wide column for the promo video. */
.wrap-wide {
  max-width: 1040px;
  margin: 32px auto 0;
  padding: 0 24px;
}

/* Video player: the video framed like the screenshots, a big black play
   button before the first play, then a white pill bar with black icons. */
.player {
  position: relative;
  border-radius: 22px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg);
}

.player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg);
  cursor: pointer;
}

.player button {
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.player svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Before the first play: a black pill in the bottom left. */
.player .big-play {
  position: absolute;
  left: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px 14px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font: 600 17px/1 var(--font);
  letter-spacing: -0.01em;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  transition: scale 0.2s ease;
}

.player .big-play:hover {
  scale: 1.04;
}

.big-play .len {
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
}

.player:not([data-state="idle"]) .big-play {
  display: none;
}

.controls {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: opacity 0.25s ease, translate 0.25s ease;
}

.controls[hidden],
.player[data-state="idle"] .controls {
  display: none;
}

/* While playing, the bar fades away until the pointer is over the video. */
.player[data-state="playing"]:not(:hover):not(:focus-within) .controls {
  opacity: 0;
  translate: 0 8px;
}

.controls button {
  width: 32px;
  height: 32px;
  flex: none;
}

.track {
  position: relative;
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  cursor: pointer;
  touch-action: none;
}

.track::before {
  /* Taller hit area than the visible line. */
  content: "";
  position: absolute;
  inset: -10px 0;
}

.fill {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: var(--ink);
}

.time {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 82px;
  text-align: center;
}

/* Icon swaps: play ↔ pause by state, sound ↔ muted by .is-muted. */
.i-pause,
.i-muted,
.player[data-state="playing"] .i-play,
.player.is-muted .i-sound {
  display: none;
}

.player[data-state="playing"] .i-pause,
.player.is-muted .i-muted {
  display: block;
}

.player:fullscreen {
  border-radius: 0;
  border: 0;
  display: grid;
  place-items: center;
}

.player:fullscreen video {
  max-height: 100vh;
}

@media (max-width: 560px) {
  .time {
    display: none;
  }

  .player .big-play {
    left: 12px;
    bottom: 12px;
    padding: 10px 16px 10px 12px;
    font-size: 15px;
  }
}

.shots {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 40px 24px 24px;
  scroll-snap-type: x mandatory;
}

.shots img {
  flex: 0 0 auto;
  width: min(280px, 70vw);
  border-radius: 22px;
  border: 1px solid var(--line);
  scroll-snap-align: center;
}

@media (min-width: 1500px) {
  .shots {
    justify-content: center;
  }
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 32px;
  margin: 24px 0 40px;
}

.features h3 {
  margin-top: 16px;
}

.features p {
  color: var(--muted);
  font-size: 16px;
}

footer {
  border-top: 1px solid var(--line);
  margin-top: 64px;
  padding: 24px 0 48px;
  font-size: 15px;
  color: var(--muted);
}

footer a {
  margin-right: 20px;
}
