/* EraGuess website. Colours and record proportions come from the app icon. */
:root {
  --brand-1: #6366f1;
  --brand-2: #8b5cf6;
  --vinyl-rim: #111111;
  --vinyl: #282828;
  --vinyl-groove: #3f3f3f;
  --vinyl-ring: #535353;
  --ink: #17123a;
  --ink-soft: #4a4470;
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

/* The icon's gradient across the whole page. */
html {
  min-height: 100%;
  background: var(--brand-1) linear-gradient(160deg, var(--brand-1), var(--brand-2));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: #fff;
  font: 400 18px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

/* A soft light in the top-left corner, as on the icon. */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(80vmax 80vmax at 0% 0%, rgba(255, 255, 255, 0.14), transparent 60%);
}

a {
  color: inherit;
}

img {
  display: block;
}

.wrap {
  width: min(1180px, 100% - 48px);
  margin: 0 auto;
}

/* Navigation */

.nav {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(23, 18, 58, 0.35);
}

.nav__links {
  display: flex;
  gap: 22px;
  font-weight: 600;
}

.nav__links a {
  text-decoration: none;
  opacity: 0.9;
}

.nav__links a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Hero with the record */

.hero {
  position: relative;
  /* The record runs off the right edge and continues below, behind the content. */
  overflow-x: clip;
  overflow-y: visible;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.hero__body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.hero__copy,
.nav {
  pointer-events: auto;
}

.hero__copy {
  max-width: 660px;
  padding: 40px 0 80px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.28);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 22px;
  font-size: clamp(46px, 6.4vw, 88px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-shadow: 0 6px 30px rgba(23, 18, 58, 0.25);
}

.lead {
  margin: 0 0 32px;
  font-size: clamp(18px, 2vw, 21px);
  color: rgba(255, 255, 255, 0.92);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}

.badge-link img {
  height: 54px;
  width: auto;
}

.hint {
  margin: 0;
  font-weight: 700;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
}

.hint span {
  display: inline-block;
  margin-right: 4px;
  font-size: 20px;
}

/* The invite page: the game code, big, and a button that opens the app. */
.join-code {
  display: inline-block;
  margin: 0 0 22px;
  padding: 10px 26px;
  border-radius: 22px;
  background: #fff;
  color: #111;
  font-size: clamp(48px, 10vw, 76px);
  font-weight: 900;
  letter-spacing: 0.16em;
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.22);
}

.open-app {
  display: inline-flex;
  align-items: center;
  height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
}

.steps {
  margin: 0 0 16px;
  padding-left: 22px;
  line-height: 1.7;
}

.fineprint {
  margin: 18px 0 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}

/* The record. --d is its diameter; the hero shows half of it. */

.turntable {
  --d: max(118vh, 820px);
  position: absolute;
  z-index: 1;
  width: var(--d);
  height: var(--d);
  top: 50%;
  right: calc(var(--d) / -2);
  transform: translateY(-50%);
  cursor: grab;
  /* Vertical swipes still scroll the page; sideways ones scratch. */
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.turntable.is-scratching {
  cursor: grabbing;
}

.vinyl,
.vinyl__disc,
.vinyl__shine {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.vinyl {
  box-shadow:
    0 50px 120px -30px rgba(23, 18, 58, 0.7),
    0 0 0 1px rgba(0, 0, 0, 0.35);
}

.vinyl__disc {
  background:
    radial-gradient(
      circle closest-side,
      transparent 0 62.3%,
      var(--vinyl-groove) 62.3% 63.5%,
      transparent 63.5% 74.9%,
      var(--vinyl-groove) 74.9% 76%,
      transparent 76% 87.4%,
      var(--vinyl-groove) 87.4% 88.6%,
      transparent 88.6%
    ),
    repeating-radial-gradient(circle closest-side, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 3px),
    radial-gradient(
      circle closest-side,
      var(--vinyl) 0 47.9%,
      var(--vinyl-ring) 47.9% 52.8%,
      var(--vinyl) 52.8% 95.5%,
      var(--vinyl-rim) 95.5% 100%,
      transparent 100%
    );
}

.vinyl__label {
  position: absolute;
  left: 50%;
  top: 50%;
  /* The label's radius is 0.377 of the record's, as on the icon. */
  width: 37.7%;
  height: 37.7%;
  transform: translate(-50%, -50%);
}

.vinyl__label .ring {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.6px;
  fill: var(--brand-1);
}

.vinyl__label .title {
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.5px;
  fill: var(--vinyl-rim);
}

.vinyl__label .sub {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.5px;
  fill: var(--brand-2);
}

/* A still reflection on the spinning grooves. */
.vinyl__shine {
  background: conic-gradient(
    from 300deg,
    transparent 0 6%,
    rgba(255, 255, 255, 0.14) 12%,
    transparent 19%,
    transparent 50%,
    rgba(255, 255, 255, 0.09) 62%,
    transparent 69%
  );
  -webkit-mask: radial-gradient(circle closest-side, transparent 0 38%, #000 38.5% 95.5%, transparent 95.6%);
  mask: radial-gradient(circle closest-side, transparent 0 38%, #000 38.5% 95.5%, transparent 95.6%);
}

/* Sections below the hero */

.section {
  position: relative;
  z-index: 2;
  padding: 90px 0;
}

.section h2 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section > .wrap > p {
  max-width: 620px;
  margin: 0 0 40px;
  color: rgba(255, 255, 255, 0.92);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(17, 17, 17, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.card__num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #fff;
  color: var(--brand-1);
  font-weight: 900;
}

/* A little timeline: the mystery song looking for its place. */

.timeline {
  display: flex;
  gap: 14px;
  margin: 0 0 40px;
  padding: 6px 2px 18px;
  overflow-x: auto;
}

.tl {
  flex: 0 0 auto;
  width: 170px;
  padding: 16px 18px;
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 14px 30px -12px rgba(23, 18, 58, 0.55);
}

.tl b {
  display: block;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.tl span {
  color: var(--ink-soft);
  font-size: 15px;
}

.tl--mystery {
  background: var(--vinyl-rim);
  color: #fff;
  outline: 3px dashed rgba(255, 255, 255, 0.7);
  outline-offset: -8px;
  animation: hover 2.4s ease-in-out infinite;
}

.tl--mystery span {
  color: rgba(255, 255, 255, 0.75);
}

@keyframes hover {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-12px) rotate(1.5deg); }
}

.big-cta {
  text-align: center;
}

.big-cta .cta {
  justify-content: center;
}

/* Footer */

.footer {
  position: relative;
  z-index: 2;
  padding: 40px 0 50px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-bottom: 14px;
  font-weight: 600;
}

.footer p {
  margin: 4px 0;
}

/* Privacy page: a shorter hero and the policy on paper. */

.hero--short {
  min-height: 62vh;
  min-height: 62svh;
}

.hero--short .turntable {
  --d: max(92vh, 680px);
}

.paper {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: -40px auto 80px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 80px -30px rgba(23, 18, 58, 0.6);
}

.paper h2 {
  margin: 34px 0 10px;
  font-size: 23px;
  letter-spacing: -0.01em;
}

.paper p {
  margin: 0 0 14px;
  color: var(--ink-soft);
}

.paper a {
  color: var(--brand-1);
  font-weight: 600;
}

.paper .updated {
  margin: 0 0 24px;
  font-size: 15px;
  font-style: italic;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.pills li {
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  font-weight: 750;
  font-size: 15px;
}

/* Narrow screens: the record rises from the bottom of the first screen and continues behind the page. */

@media (max-width: 900px) {
  .turntable {
    --d: 140vw;
    top: auto;
    right: auto;
    left: 50%;
    bottom: calc(var(--d) / -2);
    transform: translateX(-50%);
  }

  .hero {
    min-height: 0;
    padding-bottom: 72vw;
  }

  .hero__copy {
    padding: 8px 0 24px;
  }

  h1 {
    font-size: clamp(40px, 11.5vw, 60px);
    margin-bottom: 16px;
  }

  .lead {
    font-size: 17px;
    margin-bottom: 24px;
  }

  .cta {
    gap: 12px;
  }

  .badge-link img {
    height: 46px;
  }

  .nav__links a[href="#how"] {
    display: none;
  }

  .hero--short {
    padding-bottom: 52vw;
  }

  .hero--short .turntable {
    --d: 112vw;
  }

  .paper {
    margin-top: 0;
  }

  .section {
    padding: 64px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tl--mystery {
    animation: none;
  }
}
