/* The landing page (site/index.html): the game's own look, felt teal and the icon's gold. */
@font-face {
  font-family: "int-maj title";
  src: url("assets/fonts/InterDisplay-BlackItalic.woff2") format("woff2");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #1c4a46;
  --bg-2: #215650;
  --panel: #245d57;
  --line: #3a7770;
  --felt: #2a8a80;
  --felt-2: #5fc4b4;
  --ink: #f6fbfa;
  --muted: #cde2de;
  --coral: #ff8b80;
  --mint: #7ee2a8;
  --sky: #8ccbea;
  --gold-1: #ffe08a;
  --gold-2: #e5a12f;
  --gold-deep: #9a5a07;
  --blue: #8ccbea;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --title: "int-maj title", var(--font);
  --radius: 18px;
  --gutter: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 650px at 78% -5%, rgba(120, 220, 200, 0.35), transparent 65%),
    radial-gradient(800px 600px at -5% 20%, rgba(255, 224, 138, 0.10), transparent 65%),
    radial-gradient(1000px 700px at 95% 65%, rgba(140, 203, 234, 0.14), transparent 65%),
    linear-gradient(180deg, #2a6d66 0%, #225a54 30%, var(--bg) 100%);
  color: var(--ink);
  font: 16px/1.55 var(--font);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

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

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold-1);
  outline-offset: 3px;
  border-radius: 8px;
}

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

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px max(var(--gutter), env(safe-area-inset-left));
  background: rgba(36, 93, 87, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-1);
  text-decoration: none;
  font: italic 900 22px/1 var(--title);
}
.brand img {
  border-radius: 8px;
}
/* The header's small wordmark gets the same tile dot, with a lighter shadow. */
.brand .tile {
  box-shadow: 0 1px 0 var(--gold-deep);
}
.top-nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
}
.top-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.top-nav a:hover {
  color: var(--ink);
}
@media (max-width: 560px) {
  .top-nav {
    display: none;
  }
  .play-small {
    margin-left: auto;
  }
}

/* Buttons */
.play,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 30px;
  border-radius: 999px;
  font: italic 900 20px/1 var(--title);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.play {
  color: #3a2103;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
  box-shadow: 0 3px 0 var(--gold-deep), 0 12px 30px rgba(229, 161, 47, 0.28);
}
.play:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--gold-deep), 0 16px 36px rgba(229, 161, 47, 0.36);
}
.play:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--gold-deep), 0 6px 16px rgba(229, 161, 47, 0.3);
}
.play-small {
  min-height: 38px;
  padding: 0 18px;
  font-size: 16px;
  border-radius: 999px;
}
.ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-family: var(--font);
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
}
.ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* The rule sheet button in the hero: a ghost button with a mint edge and a document icon. */
.ghost-rules {
  gap: 10px;
  color: var(--mint);
  border-color: rgba(126, 226, 168, 0.6);
}
.ghost-rules svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hero */
.hero {
  display: grid;
  gap: 32px;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px var(--gutter) 56px;
}
@media (min-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    padding-top: 80px;
    padding-bottom: 88px;
  }
}
.wordmark {
  margin: 0 0 12px;
  font-family: var(--title);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(56px, 13vw, 104px);
  line-height: 1;
  color: var(--gold-1);
  text-shadow: 0 4px 0 var(--gold-deep), 0 14px 30px rgba(6, 30, 28, 0.4);
}
.word {
  position: relative;
  display: inline-block;
}
/* The i's dot is a mahjong tile, as on the app icon (numbers from app/styles.css). */
.anchor {
  position: relative;
  display: inline-block;
  width: 0;
  height: 0;
}
.tile {
  position: absolute;
  left: 0.0885em;
  bottom: 0.606em;
  width: 0.251em;
  height: 0.3414em;
  border-radius: 0.05em;
  background: var(--gold-1);
  box-shadow: 0 3px 0 var(--gold-deep), 0 14px 34px rgba(0, 0, 0, 0.6);
  transform: rotate(8deg) skewX(-9.7deg);
}
.lead {
  margin: 0 0 12px;
  font-size: clamp(22px, 3.2vw, 30px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.sub {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 17px;
  max-width: 36em;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.cta-center {
  justify-content: center;
  margin-top: 36px;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.facts li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 9px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--felt-2);
  vertical-align: 0;
}
.hero-shot,
.shot {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 26px 60px rgba(6, 30, 28, 0.45);
  background: var(--panel);
}
/* Real tiles from the game float around the hero screenshot. */
.hero-art {
  position: relative;
  margin: 18px 10px;
}
.float-tile {
  position: absolute;
  z-index: 2;
  width: clamp(40px, 6vw, 64px);
  aspect-ratio: 3 / 4;
  padding: 5px;
  border-radius: 9px;
  background: #fbf6e9;
  box-shadow: 0 5px 0 var(--sky), 0 14px 24px rgba(6, 30, 28, 0.35);
  animation: bob 5s ease-in-out infinite;
}
.float-tile img {
  width: 100%;
  height: 100%;
}
.float-tile:nth-child(1) {
  top: -22px;
  left: -10px;
  --tilt: -12deg;
}
.float-tile:nth-child(2) {
  top: -26px;
  right: 14%;
  --tilt: 9deg;
  animation-delay: -1.6s;
}
.float-tile:nth-child(3) {
  bottom: -24px;
  right: -8px;
  --tilt: 14deg;
  animation-delay: -3s;
}
.float-tile:nth-child(4) {
  bottom: -28px;
  left: 18%;
  --tilt: -7deg;
  animation-delay: -4.1s;
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(var(--tilt));
  }
  50% {
    transform: translateY(-8px) rotate(calc(var(--tilt) * 0.6));
  }
}
@media (min-width: 980px) {
  .hero-shot {
    transform: rotate(1.2deg);
  }
}

/* Sections */
section h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4.4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.band {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px var(--gutter);
}
.band-lead {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 18px;
  max-width: 40em;
}

.cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}
.card {
  padding: 22px 22px 20px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.2s ease, background 0.2s ease;
}
.card:hover {
  transform: translateY(-3px) rotate(-0.4deg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
}
.card svg {
  width: 30px;
  height: 30px;
  padding: 7px;
  box-sizing: content-box;
  border-radius: 14px;
  --chip: var(--gold-1);
  background: color-mix(in srgb, var(--chip) 22%, transparent);
  fill: none;
  stroke: var(--chip);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card:nth-child(4n + 2) svg {
  --chip: var(--coral);
}
.card:nth-child(4n + 3) svg {
  --chip: var(--sky);
}
.card:nth-child(4n + 4) svg {
  --chip: var(--mint);
}
.card h3 {
  margin: 14px 0 6px;
  font-size: 19px;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
}
cite {
  font-style: italic;
  color: var(--ink);
}

/* Friends */
.split {
  display: grid;
  gap: 32px;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px var(--gutter);
}
@media (min-width: 980px) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}
.steps {
  margin: 20px 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  margin: 0 0 16px;
  padding-left: 48px;
  color: var(--muted);
  counter-increment: step;
}
.steps li b {
  color: var(--ink);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--gold-1);
  color: #3a2103;
  font: italic 900 17px/1 var(--title);
  box-shadow: 0 2px 0 var(--gold-deep);
}
.steps li:nth-child(2)::before {
  background: var(--coral);
  box-shadow: 0 2px 0 #b5473d;
}
.steps li:nth-child(3)::before {
  background: var(--mint);
  box-shadow: 0 2px 0 #2f8a58;
}
.note {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(140, 203, 234, 0.14);
  border: 1px solid rgba(140, 203, 234, 0.3);
  color: var(--muted);
  font-size: 15px;
}

/* Gallery */
.gallery {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px var(--gutter);
}
.shots {
  display: grid;
  gap: 18px;
  margin-top: 24px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}
.shots figure {
  margin: 0;
}
.shots img {
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 30px rgba(6, 30, 28, 0.35);
}
.shots figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 600;
}

/* The Singapore rule sheet: what people come back for, so it sits right under the hero. */
.rules-strip {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.rules-card {
  display: grid;
  gap: 16px 24px;
  align-items: center;
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 224, 138, 0.16), rgba(126, 226, 168, 0.1)), var(--panel);
  border: 1px solid rgba(255, 224, 138, 0.55);
  box-shadow: 0 18px 44px rgba(6, 30, 28, 0.28);
}
@media (min-width: 820px) {
  .rules-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 28px 32px;
  }
}
.rules-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  color: #3a2103;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
  box-shadow: 0 3px 0 var(--gold-deep);
}
.rules-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rules-kicker {
  margin: 0 0 4px;
  color: var(--mint);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rules-card h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.rules-text p {
  max-width: 44em;
}
.rules-text p:not(.rules-kicker, .rules-meta) {
  margin: 0 0 8px;
  color: var(--muted);
}
.rules-meta {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.rules-download {
  justify-self: start;
  text-align: center;
}
@media (max-width: 559px) {
  .rules-download {
    justify-self: stretch;
  }
}

/* Install */
.install {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.install-card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}
.install-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
}
.install-card ol {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}
.install-card li {
  margin: 6px 0;
}
.install-card b {
  color: var(--ink);
}

/* Footer */
.foot {
  max-width: 1240px;
  margin: 32px auto 0;
  padding: 28px var(--gutter) max(40px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #b3cfca;
  font-size: 13.5px;
}
.foot p {
  margin: 0 0 8px;
  max-width: 62em;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .play,
  .card,
  .hero-shot {
    transition: none;
    transform: none;
  }
  .float-tile {
    animation: none;
    transform: rotate(var(--tilt));
  }
}
