/* Hopprep — styles */

:root {
  --paper: #F6F2EA;
  --card: #FFFDF9;
  --ink: #1B1A17;
  --muted: #5E594F;
  --hairline: rgba(27, 26, 23, .12);
  --rope: #D9431F;
  --rope-dark: #B9361A;
  --butter: #F2C14E;
  --sage: #8DB38A;
  --blue: #3D6BD1;
  --live: #2F8F4E;

  --font: "Shantell Sans", ui-rounded, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(20px, 5vw, 48px);
  --section-gap: clamp(96px, 12vw, 160px);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

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

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

body {
  margin: 0;
  min-width: 340px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-variation-settings: "INFM" 12, "BNCE" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3 { margin: 0; text-wrap: balance; }
h1, h2, .wordmark { font-variation-settings: "INFM" 55, "BNCE" 35; }
h3 { font-variation-settings: "INFM" 35, "BNCE" 15; }
p { margin: 0; text-wrap: pretty; }

a { color: var(--ink); }
a:hover { color: var(--rope-dark); }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--rope);
  outline-offset: 3px;
}

.mono { font-family: var(--mono); }

.wrap {
  max-width: 1296px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-block: 28px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
}
.logo:hover { color: var(--ink); }
.logo-jumper { transition: transform .35s var(--spring); }
.logo:hover .logo-jumper { transform: translateY(-3px); }

.wordmark {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navlink {
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  transition: color .2s ease;
}
.navlink:hover { color: var(--rope-dark); }

.pill {
  margin-left: 8px;
  padding: 11px 18px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
  transition: background-color .2s ease, color .2s ease, transform .2s var(--spring);
}
.pill:hover {
  background: var(--ink);
  color: var(--paper);
  transform: rotate(-2deg);
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, transform .25s var(--spring);
}
.btn:hover {
  background: var(--rope-dark);
  color: var(--card);
  transform: translateY(-2px);
}
.btn:active { transform: translateY(0) scale(.97); }
.btn .arrow {
  display: inline-block;
  transition: transform .25s var(--spring);
}
.btn:hover .arrow { transform: translateY(3px); }

.textlink {
  text-decoration: underline;
  text-decoration-color: var(--rope);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: color .2s ease, text-underline-offset .2s ease;
}
.textlink:hover {
  color: var(--rope-dark);
  text-underline-offset: 7px;
}

/* ---------- Hero ---------- */

.hero { padding-top: clamp(48px, 8vw, 104px); }

.hero h1 {
  max-width: 13.5ch;
  font-size: clamp(48px, 7vw, 100px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.dot { color: var(--rope); }

.hero-row {
  margin-top: clamp(28px, 4vw, 44px);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 48px;
}

.lede {
  max-width: 30em;
  font-size: clamp(18px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- Rope scene ---------- */

.scene { margin: clamp(40px, 6vw, 72px) 0 0; }

.scene > svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.counter {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 16px;
}

.counter-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.count {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-variation-settings: "INFM" 55, "BNCE" 0;
}

.count-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.live {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--live);
}
.live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--live);
  animation: live 2s ease-out infinite;
}
@keyframes live {
  0%   { transform: scale(1);   opacity: .5; }
  100% { transform: scale(2.8); opacity: 0; }
}

.ghost {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1.5px solid rgba(27, 26, 23, .18);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}
.ghost:hover {
  background: var(--card);
  border-color: var(--ink);
}

.ghost .icon-play { display: none; }
.is-paused .ghost .icon-play { display: block; }
.is-paused .ghost .icon-pause { display: none; }

/* ---------- Games ---------- */

.section { padding-top: var(--section-gap); scroll-margin-top: 24px; }

.section-title {
  margin-bottom: 40px;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-title:has(+ .section-intro) { margin-bottom: 16px; }

.section-intro {
  max-width: 34em;
  margin-bottom: 40px;
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--muted);
}

.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 48px 32px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-decoration: none;
  color: var(--ink);
}
.card:hover { color: var(--ink); }

.cover {
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  overflow: hidden;
  transition: transform .45s var(--spring), box-shadow .45s ease;
}
.cover svg { display: block; width: 100%; height: 100%; }

/* Hover lift only for cards that link somewhere. */
a.card:hover .cover {
  transform: translateY(-6px) rotate(-1.4deg);
  box-shadow: 0 18px 30px -18px rgba(27, 26, 23, .35);
}
a.card:nth-child(2):hover .cover { transform: translateY(-6px) rotate(1.2deg); }

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card h3 {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.go {
  font-size: 18px;
  color: var(--ink);
  transition: transform .25s var(--spring);
}
.card:hover .go { transform: translate(3px, -3px); }

.card p {
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
}

.genre {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

/* Unreleased games: art washed toward the page colour, badge on top.
   To launch one, make it an <a class="card" href="..."> and drop is-soon. */
.card.is-soon .cover { position: relative; }
.card.is-soon .cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  opacity: .4;
}
.card.is-soon .cover svg { filter: saturate(.75); }
.card.is-soon h3 { color: rgba(27, 26, 23, .78); }

.soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: 0 1px 0 rgba(27, 26, 23, .08);
}
.cover .soon {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
}
.soon::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--butter);
  box-shadow: 0 0 0 1.5px var(--ink);
}

/* ---------- Contact ---------- */

.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: end;
  gap: 48px 64px;
  padding: clamp(32px, 5vw, 64px);
  background: var(--card);
  border: 1px solid rgba(27, 26, 23, .1);
  border-radius: 32px;
}

.contact-intro {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact h2 {
  font-size: clamp(56px, 7vw, 96px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.contact-intro p {
  max-width: 24em;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
}

.signup {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.signup .soon {
  align-self: flex-start;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.signup fieldset {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.signup label {
  font-size: 17px;
  line-height: 1.5;
}
.signup label span { color: var(--muted); }

.signup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.field {
  flex: 1 1 220px;
  min-width: 0;
  height: 56px;
  padding: 0 20px;
  border: 1.5px solid rgba(27, 26, 23, .2);
  border-radius: 999px;
  background: var(--paper);
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field::placeholder { color: #8A8478; }
.field:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(242, 193, 78, .45);
  outline: none;
}

.signup fieldset:disabled label { color: var(--muted); }
.signup fieldset:disabled .field,
.signup fieldset:disabled .btn {
  opacity: .45;
  cursor: not-allowed;
}
.signup fieldset:disabled .btn:hover {
  background: var(--ink);
  color: var(--paper);
  transform: none;
}

.fineprint {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 56px 40px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .live::after { animation: none; }
}
