/* Infinite Golf — PlayfulChrome tokens from the in-game menus. */

:root {
  --night: #000000;
  --panel: #0f0f0f;
  --panel-lift: #1f1f1f;
  --gold: #ffc747;
  --gold-glow: rgba(255, 199, 71, 0.45);
  --emerald: #1fc77a;
  --title: #faf7f0;
  --muted: #b8b8b2;
  --rim: #474747;
  --wood: #8c6647;
  --parchment: #faf0db;
  --stamp: #db8561;
  --ink: #1a160e;
  --measure: 52rem;
  --wide: 68rem;
  --radius: 1.5rem;
  --radius-sm: 1rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--title);
  font-family: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--gold);
  text-decoration: none;
}

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

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.15rem, 5vw, 2.4rem);
}

h2 {
  font-size: clamp(1.45rem, 3vw, 1.7rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

p:last-child {
  margin-bottom: 0;
}

.wrap {
  width: min(var(--wide), calc(100% - 2.5rem));
  margin-inline: auto;
}

.wrap-narrow {
  width: min(var(--measure), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rim);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--title);
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--rim);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.1rem;
  font-size: 0.92rem;
  font-weight: 700;
}

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

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--title);
}

/* Hero titles — cream to gold, matching in-game screen titles */

.kicker {
  margin: 0 0 0.7rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.title-glow {
  background: linear-gradient(135deg, var(--title) 20%, var(--gold) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px var(--gold-glow));
}

.lede {
  font-size: 1.12rem;
  max-width: 36rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.1rem;
  padding: 0.7rem 1.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 900;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.btn-gold {
  background: linear-gradient(180deg, #ffd56a 0%, var(--gold) 55%, #e0a820 100%);
  color: var(--ink);
  box-shadow: 0 0 28px var(--gold-glow);
}

.btn-gold:hover {
  color: var(--ink);
  filter: brightness(1.05);
}

.btn-ghost {
  background: var(--panel);
  color: var(--title);
  border-color: var(--rim);
}

.btn-ghost:hover {
  color: var(--title);
  background: var(--panel-lift);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Media slots — reserved frames for later screenshots */

.media-slot {
  aspect-ratio: 16 / 10;
  width: 100%;
  background: var(--panel-lift);
  border: 1px dashed var(--rim);
  border-radius: var(--radius);
}

.media-slot-portrait {
  aspect-ratio: 9 / 14;
  max-width: 16rem;
  margin-inline: auto;
}

/* Gesture stills — portrait mesh captures beside the help copy */

.gesture-figs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 14rem));
  gap: 1.1rem;
  margin: 0 0 1.35rem;
}

.gesture-figs figure {
  margin: 0;
}

.gesture-figs img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: var(--night);
  border: 1px solid var(--rim);
  border-radius: var(--radius-sm);
}

.gesture-figs figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

/* Split rows: copy + slot, justified in context */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem 3rem;
  align-items: center;
}

.split-flip .split-copy {
  order: 2;
}

.split-flip .media-slot {
  order: 1;
}

/* Cards */

.card {
  background: var(--panel);
  border: 1px solid var(--rim);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
}

.card h3 {
  margin-bottom: 0.35rem;
}

.perk-grid,
.mode-grid,
.play-grid {
  display: grid;
  gap: 1rem;
}

.perk-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mode-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.play-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.play-card .media-slot {
  margin-bottom: 1.1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: var(--panel-lift);
  border: 1px solid var(--rim);
  color: var(--emerald);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* Sections */

.section {
  padding: 4.5rem 0;
}

.section-head {
  margin-bottom: 1.75rem;
}

.rule {
  height: 1px;
  background: var(--rim);
  border: 0;
  margin: 0;
}

/* Help / legal */

.help-layout {
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 1fr);
  gap: 2.75rem 3.25rem;
  align-items: start;
  padding: 2.5rem 0 4.5rem;
}

.help-nav {
  position: sticky;
  top: 5.5rem;
}

.help-nav .kicker {
  margin-bottom: 0.85rem;
}

.help-nav a {
  display: block;
  padding: 0.42rem 0;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.help-nav a:hover,
.help-nav a[aria-current="page"] {
  color: var(--gold);
}

.help-main h1 {
  margin-bottom: 0.85rem;
}

.help-main .lede {
  margin-bottom: 1.75rem;
}

.help-main h3 {
  margin-top: 1.65rem;
}

.help-main h3:first-of-type {
  margin-top: 0.35rem;
}

.help-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rim);
  font-weight: 800;
}

.help-pager a {
  color: var(--title);
}

.help-pager a:hover {
  color: var(--gold);
}

.help-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 2rem 2.5rem;
  align-items: start;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.topic-grid a.card {
  color: inherit;
}

.topic-grid a.card:hover {
  background: var(--panel-lift);
  color: inherit;
}

.topic-grid a.card h3 {
  color: var(--title);
}

.help-list {
  margin: 0 0 1.1rem;
  padding-left: 1.15rem;
  color: var(--muted);
}

.help-list li + li {
  margin-top: 0.45rem;
}

.help-list strong {
  color: var(--title);
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  border: 1px solid var(--rim);
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--rim);
  vertical-align: top;
}

th {
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--panel);
}

td {
  color: var(--muted);
}

tr:last-child td {
  border-bottom: 0;
}

td:first-child {
  color: var(--title);
  font-weight: 800;
  white-space: nowrap;
}

.note {
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--rim);
  color: var(--muted);
}

.note strong {
  color: var(--gold);
}

.legal h2 {
  margin-top: 2.25rem;
}

.legal h2:first-of-type {
  margin-top: 0;
}

.updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

/* Footer */

.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--rim);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--title);
}

/* Hero page spacing */

.hero {
  padding: 4.25rem 0 3.5rem;
}

.hero-actions {
  margin-top: 1.6rem;
}

@media (max-width: 860px) {
  .split,
  .split-flip,
  .help-split,
  .help-layout,
  .perk-grid,
  .mode-grid,
  .play-grid,
  .topic-grid {
    grid-template-columns: 1fr;
  }

  .help-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 1.15rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--rim);
  }

  .help-nav .kicker {
    width: 100%;
    margin-bottom: 0.35rem;
  }

  .help-layout {
    padding-top: 1.75rem;
  }

  .split-flip .split-copy,
  .split-flip .media-slot {
    order: unset;
  }

  .media-slot-portrait {
    max-width: none;
  }

  .hero {
    padding-top: 2.75rem;
  }

  .section {
    padding: 3.25rem 0;
  }
}

@media (max-width: 560px) {
  .wrap,
  .wrap-narrow {
    width: min(var(--wide), calc(100% - 1.5rem));
  }

  .site-header .wrap {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.85rem 0 0.95rem;
    min-height: 0;
  }

  .nav {
    justify-content: flex-start;
  }

  td:first-child {
    white-space: normal;
  }
}
