/* Fingers Crossed website. Built on the Runekeeper website's layout (header, hero, feature grid,
   footer), coloured like the app's default look: black with the five finger colours. Dark only.
   Shared by all pages of this site. */

:root {
  color-scheme: dark;
  --text: #f5f5f7;
  --secondary: #a1a1a6;
  --background: #000000;
  --band: #111111;
  --rule: #2c2c2e;
  --accent: #ff2d92;
  --accent-text: #000000;
  --hover: rgba(255, 255, 255, 0.08);
  /* Finger colours (docs/SPEC.md in the app) */
  --pink: #ff2d92;
  --cyan: #00d4ff;
  --green: #39ff14;
  --orange: #ff6600;
  --yellow: #ffff00;
  /* Phone body as in the App Store screenshots (ios/scripts/compose-screenshots.swift) */
  --body: #292a2b;
  --body-edge: #737373;
  --site-header-height: 56px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  overflow-x: hidden;
  padding-top: var(--site-header-height);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

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

/* Header: the same on every page */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: var(--site-header-height);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--background) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  line-height: 1;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
}

.site-brand img { border-radius: 7px; }

.site-nav { display: flex; gap: 4px; margin-left: auto; }

.site-nav a {
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.site-nav a:hover { background: var(--hover); }
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.site-nav .lang { color: var(--secondary); }

.site-main { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* Five dots, one per finger colour */
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); }
.dots i:nth-child(2) { background: var(--cyan); }
.dots i:nth-child(3) { background: var(--green); }
.dots i:nth-child(4) { background: var(--orange); }
.dots i:nth-child(5) { background: var(--yellow); }

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 64px;
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--secondary);
}

.site-footer p { margin: 4px 0; }

/* Buttons */
.button {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.button:hover { background: var(--hover); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.button.primary:hover { filter: brightness(1.08); }

/* Home */
.hero { text-align: center; padding: 56px 0 8px; }
.hero-icon { display: block; margin: 0 auto; border-radius: 28px; box-shadow: 0 0 0 1px var(--rule); }
.hero h1 { font-size: 44px; line-height: 1.1; margin: 16px 0 4px; }
.tagline { font-size: 22px; color: var(--secondary); margin: 0 0 16px; }
.intro { max-width: 760px; margin: 0 auto 24px; }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 0 0 16px; }
.requirements { font-size: 14px; color: var(--secondary); margin: 0; }

/* Three phones, each on a glow in its screen's colour, like the App Store screenshots
   (ios/scripts/story.json: collecting cyan, countdown green, winner pink; the glow fades from
   80% to 24% at half the radius to nothing). The band runs the full window width and is taller
   than each glow, so no edge cuts a glow off. */
.phones {
  --spread: 287px;
  --r: 360px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  margin: 24px calc(50% - 50vw) 40px;
  padding: 64px 24px;
  background:
    radial-gradient(circle var(--r) at calc(50% - var(--spread)) 50%, rgb(0 212 255 / 0.8), rgb(0 212 255 / 0.24) 50%, rgb(0 212 255 / 0) 100%),
    radial-gradient(circle var(--r) at calc(50% + var(--spread)) 50%, rgb(255 45 146 / 0.8), rgb(255 45 146 / 0.24) 50%, rgb(255 45 146 / 0) 100%),
    radial-gradient(circle var(--r) at 50% 50%, rgb(57 255 20 / 0.8), rgb(57 255 20 / 0.24) 50%, rgb(57 255 20 / 0) 100%);
}

.phones > img { flex: 0 1 240px; min-width: 0; }
.phones > img:nth-child(2) { flex-basis: 270px; }

/* Body 3.2% of the screen width per side, screen corners 13%, a fine lighter edge */
.phones img {
  display: block;
  width: 100%;
  height: auto;
  border: 8px solid var(--body);
  border-radius: 39px;
  box-shadow: 0 0 0 1px var(--body-edge);
}

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

.features h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin: 16px 0 4px; }
.features h2::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--pink); }
.features div:nth-child(5n+2) h2::before { background: var(--cyan); }
.features div:nth-child(5n+3) h2::before { background: var(--green); }
.features div:nth-child(5n+4) h2::before { background: var(--orange); }
.features div:nth-child(5n+5) h2::before { background: var(--yellow); }
.features p { margin: 0 0 8px; color: var(--secondary); }

/* Support and privacy */
.doc { max-width: 680px; margin: 0 auto; padding: 48px 0 0; }
.doc h1 { font-size: 36px; line-height: 1.15; margin: 0 0 8px; }
.doc .lead { font-size: 19px; color: var(--secondary); margin: 0 0 8px; }
.doc .updated { font-size: 14px; color: var(--secondary); margin: 0 0 20px; }
.doc h2 { font-size: 22px; margin: 40px 0 8px; }
.doc h3 { font-size: 17px; margin: 24px 0 4px; }
.doc p, .doc ol, .doc ul { margin: 0 0 12px; }
.doc li { margin: 4px 0; }
.doc .short { background: var(--band); border-radius: 12px; padding: 16px 20px; margin: 24px 0 0; }
.doc .short p { margin: 0; }

/* Not found */
.notfound { text-align: center; padding: 96px 0 32px; }
.notfound h1 { font-size: 36px; margin: 20px 0 8px; }
.notfound p { color: var(--secondary); margin: 0 0 24px; }

@media (max-width: 720px) {
  .site-header { gap: 12px; padding: 0 16px; }
  .site-brand { font-size: 0; }
  .site-nav a { padding: 7px 8px; }
  .site-main { padding: 0 16px; }
  .hero { padding-top: 40px; }
  .hero h1 { font-size: 34px; }
  .tagline { font-size: 19px; }
  .phones { --spread: 126px; --r: 170px; gap: 12px; margin-top: 16px; margin-bottom: 32px; padding: 48px 16px; }
  .phones img { border-width: 4px; border-radius: 18px; }
  .doc { padding-top: 32px; }
  .doc h1 { font-size: 30px; }
}
