/* DJ Major homepage. Direction "Night": near-black, gold from the logo as the only accent,
   a beacon pulse as the only motion. Everything is self-hosted. */

/* Inter 4.1 (SIL OFL, see fonts/LICENSE.txt), InterVariable.woff2 from the release zip,
   subset to Latin-1 and common punctuation (66 KB instead of 352 KB) with fontTools:
   pyftsubset InterVariable.woff2 --flavor=woff2 --output-file=InterVariable-latin.woff2
     --unicodes="U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,
                 U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD"
     --layout-features="kern,liga,calt,cv11,ss01,tnum,case"
   A language outside Latin-1 needs a new subset. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/InterVariable-latin.e717ef3f.woff2") format("woff2");
}

:root {
  --bg: #0b0b0b;
  --bg-raised: #131210;
  --text: #f3efe4;
  --muted: #b9b3a4;
  --faint: #8d887c;
  --line: #2a2823;
  --gold: #f2c94c;
  --gold-deep: #d9a400;
  --ink: #111;
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section: clamp(5rem, 12vw, 9rem);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1,
h2,
h3,
p,
ol,
ul {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

[tabindex="-1"]:focus {
  outline: none;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

/* Header */

.top {
  position: relative;
  z-index: 2;
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color 0.15s ease;
}

.nav a:hover {
  color: var(--text);
}

@media (max-width: 36rem) {
  .nav {
    display: none;
  }
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-top: -5.25rem;
  padding: clamp(10rem, 26vh, 15rem) 0 clamp(6rem, 16vh, 10rem);
  min-height: min(100svh, 56rem);
  display: flex;
  align-items: center;
  background: radial-gradient(70rem 36rem at 78% 112%, #2b2309 0%, rgba(11, 11, 11, 0) 62%);
}

.hero-inner {
  position: relative;
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(3.25rem, 10.5vw, 8rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero .lede {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 30rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.lede {
  color: var(--muted);
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.55;
  text-wrap: pretty;
}

/* The beacon: the logo with rings spreading from it, like the signal the app listens for. */

.beacon {
  position: absolute;
  z-index: -1;
  right: clamp(-9rem, -4vw, 2rem);
  bottom: clamp(-6rem, -3vw, 3rem);
  width: clamp(18rem, 42vw, 34rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.beacon-mark {
  position: relative;
  width: 28%;
  opacity: 0.9;
}

.ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(242, 201, 76, 0.5);
  border-radius: 50%;
}

.ring:nth-child(1) {
  transform: scale(0.45);
  opacity: 0.7;
}

.ring:nth-child(2) {
  transform: scale(0.72);
  opacity: 0.4;
}

.ring:nth-child(3) {
  transform: scale(1);
  opacity: 0.18;
}

@media (prefers-reduced-motion: no-preference) {
  .ring {
    opacity: 0;
    animation: pulse 4.5s cubic-bezier(0.2, 0.6, 0.35, 1) infinite;
  }

  .ring:nth-child(2) {
    animation-delay: 1.5s;
  }

  .ring:nth-child(3) {
    animation-delay: 3s;
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.3);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.15);
    opacity: 0;
  }
}

@media (max-width: 48rem) {
  .beacon {
    right: -5rem;
    bottom: -5rem;
    opacity: 0.55;
  }
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button.primary {
  background: var(--gold);
  color: var(--ink);
}

.button.primary:hover {
  background: #f6d673;
}

.button.ghost {
  border: 1px solid #55524a;
  color: var(--text);
}

.button.ghost:hover {
  border-color: var(--text);
}

/* Sections */

.section {
  padding: var(--section) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 0;
}

.eyebrow {
  margin-bottom: 1.25rem;
  color: var(--gold);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h2 {
  max-width: 20ch;
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h2 + .lede {
  margin-top: 1.5rem;
  max-width: 36rem;
}

h3 {
  font-size: 1.1875rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h3 + p {
  margin-top: 0.6rem;
  color: var(--muted);
}

/* How it works */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(2.5rem, 5vw, 4rem);
  margin-top: clamp(3rem, 7vw, 5rem);
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 1.5rem;
  color: var(--gold);
  font-size: clamp(2.5rem, 4vw, 3.25rem);
  font-weight: 250;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* For guests */

.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin-top: clamp(3rem, 7vw, 4.5rem);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  overflow: hidden;
}

@media (min-width: 48rem) {
  .facts {
    grid-template-columns: repeat(2, 1fr);
  }
}

.facts li {
  padding: clamp(1.75rem, 4vw, 2.5rem);
  background: var(--bg);
}

.facts h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  max-width: 22ch;
}

.note {
  margin-top: 2rem;
  max-width: 44rem;
  color: var(--faint);
  font-size: 0.9375rem;
}

.reward {
  margin-top: clamp(3.5rem, 8vw, 5rem);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  max-width: 44rem;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #1c1709 0%, var(--bg-raised) 70%);
  border: 1px solid #3a3115;
}

.reward h3 {
  color: var(--gold);
  font-size: clamp(1.375rem, 2.2vw, 1.625rem);
}

.reward p {
  color: var(--text);
}

/* For venues */

/* Mobile reads lead, points, contact. Wide screens put the contact under the lead. */
.split {
  display: grid;
  grid-template-areas: "lead" "features" "contact";
  column-gap: clamp(3rem, 7vw, 6rem);
  row-gap: 3rem;
}

.split-lead {
  grid-area: lead;
}

.features {
  grid-area: features;
}

.contact {
  grid-area: contact;
}

@media (min-width: 60rem) {
  .split {
    grid-template-columns: 1.05fr 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: "lead features" "contact features";
    align-items: start;
  }
}

.features li {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}

.features li:first-child {
  border-top: 0;
  padding-top: 0;
}

@media (min-width: 60rem) {
  .features li:first-child {
    padding-top: 0.5rem;
  }
}

.contact p {
  margin-bottom: 1.5rem;
}

/* Download */

.download {
  text-align: center;
  background: radial-gradient(50rem 22rem at 50% 100%, #221c08 0%, rgba(11, 11, 11, 0) 70%);
}

.download h2 {
  margin: 0 auto;
}

.download .lede {
  margin-left: auto;
  margin-right: auto;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.store {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 12rem;
  padding: 0.75rem 1.5rem 0.8rem;
  border: 1px solid #55524a;
  border-radius: 0.875rem;
  text-align: left;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.store:hover {
  border-color: var(--gold);
}

.store-small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.3;
}

.store-name {
  font-size: 1.375rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

/* Footer */

.foot {
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.875rem;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
  color: var(--muted);
  font-weight: 600;
}

.foot-brand img {
  filter: invert(1);
  opacity: 0.7;
}

.foot a {
  color: var(--muted);
  text-underline-offset: 0.2em;
}

.foot a:hover {
  color: var(--text);
}

/* Guide pages (/guide/android/{vendor}): one reading column under the brand, DJ Major's own steps as a checklist
   whose markers are the beacon's ring, then the source's text set off by a rule. Opened from the app, so the page
   follows the phone's light or dark setting; the homepage stays dark. */

html.guide {
  --accent: var(--gold);
  --halo: rgba(242, 201, 76, 0.16);
  --rule: #3a372f;
}

@media (prefers-color-scheme: light) {
  html.guide {
    color-scheme: light;
    --bg: #faf6ec;
    --bg-raised: #f3eddd;
    --text: #1c1a15;
    --muted: #57524a;
    --faint: #6b665b;
    --line: #e1d9c6;
    --accent: #7a5800;
    --halo: rgba(122, 88, 0, 0.12);
    --rule: #d3c7aa;
  }

  html.guide .foot-brand img {
    filter: none;
  }
}

html.guide :focus-visible {
  outline-color: var(--accent);
}

.guide-body {
  padding-top: clamp(1.5rem, 6vw, 4rem);
  padding-bottom: clamp(4rem, 12vw, 7rem);
}

/* The invitation page (/join): «Open in DJ Major» stays hidden until join.js has checked the invitation. */

.button[hidden] {
  display: none;
}

.join-body .lede,
.join-body .note {
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
}

.guide-body > * {
  max-width: 42rem;
}

.guide-body h1 {
  max-width: 16ch;
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.guide-body .lede {
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
  max-width: 36rem;
}

.guide-part {
  margin-top: clamp(2.75rem, 8vw, 4.5rem);
  padding-top: clamp(1.75rem, 5vw, 2.5rem);
  border-top: 1px solid var(--line);
}

.guide-part h2 {
  max-width: none;
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.checklist {
  display: grid;
  gap: 1.75rem;
  margin-top: 1.75rem;
}

.checklist li {
  position: relative;
  padding-left: 2.75rem;
}

/* An empty ring to tick off in your head, with the faint halo of the homepage's beacon. */
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.18rem;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0.3rem var(--halo);
}

.source {
  margin-top: 1.5rem;
  padding-left: clamp(1rem, 3.5vw, 1.5rem);
  border-left: 2px solid var(--rule);
  overflow-wrap: break-word;
}

.source > * + *,
.source li > * + * {
  margin-top: 0.85em;
}

.source ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.source ol {
  padding-left: 1.5rem;
  list-style: decimal;
}

.source li + li {
  margin-top: 0.6em;
}

.source li::marker {
  color: var(--accent);
}

.source strong,
.source b {
  font-weight: 650;
}

.source a,
.credit-links a,
.unavailable a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.credit {
  margin-top: 2rem;
  color: var(--faint);
  font-size: 0.875rem;
  line-height: 1.55;
}

.credit-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

.unavailable {
  margin-top: 1.25rem;
  color: var(--muted);
}
