/* Event Bingo marketing site.
   Colours match ArcadePalette.STANDARD in
   shared/src/commonMain/kotlin/org/damienbradley/eventbingo/ui/theme/ArcadePalette.kt
*/

@font-face {
  font-family: "Rubik Mono One";
  src: url("assets/fonts/rubik_mono_one_regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #07051a;
  --night: #140c3c;
  --stage: #221461;
  --panel: #261a6b;
  --panel-deep: #170f47;
  --royal: #2e4bff;
  --royal-deep: #131f86;
  --royal-light: #5a73ff;
  --yellow: #ffd21f;
  --gold: #ffb000;
  --orange: #ff6a00;
  --red: #e5121f;
  --crimson: #8e0716;
  --cyan: #2ee6ff;
  --green: #3dff6e;
  --chrome-light: #f4f7ff;
  --chrome: #aeb7cf;
  --chrome-dark: #4c5675;
  --silver: #cfd6e6;
  --text-light: #f6f3ff;
  --text-dim: #c9c2f0;
  --outline: #000000;
  --on-primary: #1a0e00;
  --shine: #fff27a;
  --horizon: #3a0f55;
  --horizon-deep: #6a0d2e;
  --award-top: #0e5a6e;
  --font-display: "Rubik Mono One", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Segoe UI", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --space: 1.25rem;
  --max: 68rem;
  --radius: 1.15rem;
}

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

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-light);
  background:
    linear-gradient(
      180deg,
      var(--ink) 0%,
      var(--night) 45%,
      var(--horizon) 80%,
      var(--horizon-deep) 100%
    );
  background-attachment: fixed;
}

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

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

a:hover {
  color: var(--shine);
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space);
  top: 0;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--yellow);
  color: var(--on-primary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-decoration: none;
  transform: translateY(-120%);
}

.skip-link:focus {
  transform: translateY(0.6rem);
  outline-color: var(--text-light);
}

.inner {
  width: min(100% - 2 * var(--space), var(--max));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ink);
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  border-bottom: 2px solid var(--outline);
  box-shadow: 0 2px 0 var(--gold), 0 8px 24px rgb(0 0 0 / 0.45);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding-block: 0.7rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--yellow);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.wordmark img {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 22%;
  box-shadow: 0 0 0 2px var(--outline), 0 0 0 3px var(--gold);
}

.wordmark:hover {
  color: var(--shine);
}

.primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav a {
  color: var(--text-light);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--yellow);
}

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 3.25rem 0 3.75rem;
  text-align: center;
}

.stage-grid {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgb(255 70 160 / 0.28) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 70 160 / 0.28) 1px, transparent 1px);
  background-size: 12% 18%;
  transform: perspective(420px) rotateX(58deg);
  transform-origin: bottom center;
  mask-image: linear-gradient(to top, rgb(0 0 0 / 0.7), transparent);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-icon {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 22.5%;
  box-shadow:
    0 0 0 3px var(--outline),
    0 0 0 6px var(--gold),
    0 0 0 8px var(--outline),
    0 16px 40px rgb(0 0 0 / 0.5);
}

.hero h1 {
  margin: 1.35rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 10vw, 4.4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--yellow);
  background: linear-gradient(180deg, var(--shine) 0%, var(--yellow) 42%, var(--gold) 72%, var(--orange) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 var(--crimson)) drop-shadow(0 6px 0 var(--outline));
}

.tagline {
  margin: 0.6rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 3.4vw, 1.25rem);
  line-height: 1.3;
  color: var(--cyan);
  text-shadow: 0 0 18px rgb(46 230 255 / 0.35);
}

.lead {
  max-width: 38rem;
  margin: 1.25rem 0 0;
  color: var(--text-dim);
  font-size: 1.1rem;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 1.75rem;
}

.store-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  line-height: 0;
  border-radius: 0.4rem;
}

.store-link img {
  display: block;
  height: 50px;
  width: auto;
}

.store-link--play img {
  /* Official Play badge includes padding; scale so it sits optically with the App Store badge. */
  height: 74px;
  margin-block: -12px;
}

/* About */

.about {
  padding: 0 0 3rem;
}

.about p {
  max-width: 42rem;
  margin: 0 auto 1rem;
  color: var(--text-dim);
  text-align: center;
  font-size: 1.1rem;
}

.promise {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--yellow);
  letter-spacing: 0.02em;
}

/* How it works */

.how,
.shots,
.get {
  padding: 3rem 0;
}

.how {
  background: rgb(7 5 26 / 0.45);
}

h2 {
  margin: 0 0 1.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--yellow);
  text-align: center;
}

h2::after {
  content: "";
  display: block;
  width: 6.5rem;
  height: 0.45rem;
  margin: 0.7rem auto 0;
  background: linear-gradient(180deg, var(--shine), var(--yellow), var(--gold), var(--orange));
  border: 2px solid var(--outline);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 6px 100%, 0 50%);
}

.steps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 1.25rem 1.15rem 1.2rem 4.1rem;
  background: linear-gradient(180deg, var(--panel), var(--panel-deep));
  border: 2px solid var(--chrome);
  outline: 2px solid var(--outline);
  outline-offset: 0;
  filter: drop-shadow(8px 10px 0 rgb(0 0 0 / 0.4));
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0.85rem;
  top: 1.15rem;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--on-primary);
  background: linear-gradient(180deg, var(--shine), var(--yellow) 40%, var(--gold) 75%, var(--orange));
  border: 2px solid var(--outline);
  box-shadow: 0 2px 0 var(--crimson);
}

.steps h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--cyan);
}

.steps p {
  margin: 0;
  color: var(--text-dim);
}

/* Screenshots */

.shot-row {
  display: flex;
  gap: 1.1rem;
  margin: 0;
  padding: 0.35rem 0.15rem 1.25rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--space);
  -webkit-overflow-scrolling: touch;
}

.shot-row li {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.shot-row figure {
  margin: 0;
  width: 13.5rem;
  padding: 0.35rem;
  background: linear-gradient(180deg, var(--chrome-light), var(--chrome) 45%, var(--chrome-dark));
  border: 2px solid var(--outline);
  border-radius: 1.35rem;
  box-shadow: 8px 12px 0 rgb(0 0 0 / 0.35);
}

.shot-row img {
  display: block;
  width: 100%;
  border-radius: 1.05rem;
  border: 2px solid var(--outline);
  background: var(--ink);
}

.shot-row figcaption {
  margin-top: 0.55rem;
  padding: 0 0.2rem 0.3rem;
  font-family: var(--font-display);
  font-size: 0.62rem;
  line-height: 1.35;
  color: var(--on-primary);
  text-align: center;
}

/* Get the app */

.get {
  padding-bottom: 3.5rem;
}

.get-inner {
  max-width: 42rem;
  margin-inline: auto;
  padding: 2rem 1.25rem 2.15rem;
  text-align: center;
  background: linear-gradient(180deg, var(--panel), var(--panel-deep));
  border: 3px solid var(--gold);
  outline: 2px solid var(--outline);
  filter: drop-shadow(10px 12px 0 rgb(0 0 0 / 0.35));
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}

.get p {
  margin: 0 auto;
  max-width: 30rem;
  color: var(--text-dim);
}

/* Footer */

.site-footer {
  padding: 1.75rem 0 2.25rem;
  border-top: 2px solid var(--outline);
  box-shadow: 0 -2px 0 var(--gold);
  background: var(--ink);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--text-light);
  font-family: var(--font-display);
  font-size: 0.7rem;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--yellow);
}

.credit {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.credit a {
  font-family: inherit;
  font-size: inherit;
  text-decoration: underline;
  color: var(--text-dim);
}

#how-it-works,
#screenshots,
#get-the-app,
#about {
  scroll-margin-top: 4.75rem;
}

.nowrap {
  white-space: nowrap;
}

/* Layout tweaks */

@media (min-width: 40rem) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .steps li:last-child {
    grid-column: 1 / -1;
  }

  .shot-row li,
  .shot-row figure {
    width: 15.25rem;
  }
}

@media (min-width: 70rem) {
  .shot-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 0.4rem;
  }

  .shot-row li,
  .shot-row figure {
    width: auto;
  }

  .steps {
    grid-template-columns: repeat(5, 1fr);
  }

  .steps li,
  .steps li:last-child {
    grid-column: auto;
    padding: 4.4rem 0.95rem 1.15rem 0.95rem;
  }

  .steps li::before {
    left: 50%;
    top: 1.05rem;
    transform: translateX(-50%);
  }

  .steps h3,
  .steps p {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .stage-grid {
    transform: none;
    height: 18%;
    opacity: 0.45;
    mask-image: none;
  }

  .skip-link {
    transition: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--ink);
    backdrop-filter: none;
  }
}
