/* RuckUp landing — styles (design: "Har bir zarba tarixga aylanadi") */
:root {
  --bg: #060f0b; --bg2: #0f261c; --card: #0a1b14; --line: #1d3a2c;
  --tx: #f4f2ec; --mu: #9db3a6; --jade: #22c98a; --brass: #d1a85a; --brass2: #f0cf85; --bad: #e5675a;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4efe2; --bg2: #e8e2d0; --card: #fffdf6; --line: #d9d1b8;
    --tx: #10241a; --mu: #4d6558; --jade: #0f7a52; --brass: #9a7421; --brass2: #7a5a14;
  }
}
:root[data-theme="light"] {
  --bg: #f4efe2; --bg2: #e8e2d0; --card: #fffdf6; --line: #d9d1b8;
  --tx: #10241a; --mu: #4d6558; --jade: #0f7a52; --brass: #9a7421; --brass2: #7a5a14;
}
:root[data-theme="dark"] {
  --bg: #060f0b; --bg2: #0f261c; --card: #0a1b14; --line: #1d3a2c;
  --tx: #f4f2ec; --mu: #9db3a6; --jade: #22c98a; --brass: #d1a85a; --brass2: #f0cf85;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--tx); font: 400 16px/1.6 Manrope, system-ui, sans-serif; overflow-x: hidden; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; line-height: 1.05; }
a { color: inherit; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 15% 0%, rgba(34, 201, 138, .16), transparent 70%),
    radial-gradient(circle 40vw at 100% 45%, rgba(209, 168, 90, .10), transparent 70%),
    radial-gradient(circle 35vw at 0% 100%, rgba(34, 201, 138, .08), transparent 70%),
    repeating-linear-gradient(135deg, rgba(244, 239, 226, .025) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(45deg, rgba(244, 239, 226, .02) 0 1px, transparent 1px 14px);
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) body::before { opacity: .45; } }

.w { max-width: 1100px; margin: auto; padding: 0 20px; }
#tl { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 20; background: linear-gradient(90deg, var(--jade), var(--brass2)); box-shadow: 0 0 14px var(--jade); }

/* Top bar and navigation */
.tb .w { display: flex; justify-content: space-between; align-items: center; height: 42px; font-size: 13px; color: var(--mu); }
.tb a { text-decoration: none; margin-right: 22px; transition: color .2s; }
.tb a:hover { color: var(--jade); }
.lg button { background: none; border: 0; color: var(--mu); font: 800 12px Manrope; padding: 5px 11px; border-radius: 99px; cursor: pointer; }
.lg .on { background: var(--jade); color: #04150d; }
@media (max-width: 600px) { .tb .em { display: none; } }
nav .w { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font: 800 24px Fraunces, serif; text-decoration: none; }
.logo img { width: 30px; height: 30px; }
.logo b { color: var(--jade); }
.nr { display: flex; align-items: center; }
.nr .hide a { margin-left: 24px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--mu); transition: color .2s; }
.nr .hide a:hover { color: var(--tx); }
.nr .btn { margin-left: 24px; }

.btn { display: inline-block; background: var(--brass); color: #1a1405; font-weight: 800; padding: 12px 22px; border-radius: 99px; text-decoration: none; border: 0; cursor: pointer; font: 800 15px Manrope; transition: transform .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .5; cursor: progress; transform: none; }
.btn svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 8px; }
.btn.ghost { background: none; color: var(--tx); border: 1px solid var(--line); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { padding-top: 60px; padding-bottom: 30px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; }
.tag { color: var(--brass); font-weight: 800; letter-spacing: .14em; font-size: 12px; text-transform: uppercase; }
h1 { font-size: clamp(40px, 6.4vw, 76px); font-weight: 800; margin: 14px 0 18px; }
h1 em { color: var(--jade); font-style: normal; }
.lead { color: var(--mu); max-width: 48ch; margin-bottom: 26px; }
.table { position: relative; border-radius: 26px; padding: 12px; background: linear-gradient(145deg, #5a3a1c, #2c1b0b); box-shadow: 0 30px 70px #0008; }
.felt { position: relative; border-radius: 16px; background: radial-gradient(circle at 50% 40%, #13805a, #0b4a34); overflow: hidden; aspect-ratio: 4 / 3; }
canvas { width: 100%; height: 100%; display: block; cursor: pointer; touch-action: manipulation; }
.hint { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .1em; color: #ffffffb0; pointer-events: none; }
.re { margin: 10px auto 0; display: block; background: none; border: 1px solid var(--line); color: var(--mu); border-radius: 99px; padding: 6px 16px; cursor: pointer; font: 600 13px Manrope; }

/* Sections */
section { padding: 70px 0; }
h2 { font-size: clamp(30px, 4.5vw, 50px); margin: 10px 0 14px; }
.sub { color: var(--mu); max-width: 60ch; }
.fine { font-size: 12px; color: var(--mu); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 10px 0 50px; }
.stats div { text-align: center; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.stats b { display: block; font: 800 40px Fraunces, serif; color: var(--brass); font-variant-numeric: tabular-nums; }
.stats small { color: var(--mu); }
.live { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--jade); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--jade); box-shadow: 0 0 10px var(--jade); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; counter-reset: s; }
.how div { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px 20px 20px; position: relative; }
.how div::before { content: counter(s); position: absolute; top: -17px; left: 20px; width: 34px; height: 34px; border-radius: 50%; background: var(--jade); color: #04150d; font: 800 15px Manrope; display: grid; place-items: center; box-shadow: 0 0 16px var(--jade); }
.how b { font: 800 20px Fraunces, serif; display: block; margin-bottom: 4px; }
.how p { color: var(--mu); font-size: 14px; }

/* PTS calculator */
.sim { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
label { display: block; font-weight: 800; font-size: 13px; color: var(--mu); margin: 14px 0 4px; letter-spacing: .04em; }
label span { float: right; color: var(--tx); }
input[type=range] { width: 100%; accent-color: var(--jade); }
select, input[type=text], input[type=tel] { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--tx); font: inherit; }
.res { text-align: center; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.big { font: 800 72px Fraunces, serif; color: var(--jade); line-height: 1; }
.neg { color: var(--bad); font: 800 30px Fraunces, serif; }

.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 30px; }
.lv { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; position: relative; overflow: hidden; }
.lv b { display: block; font: 800 30px Fraunces, serif; color: var(--brass); }
.lv small { color: var(--mu); }

.fg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 30px; }
.fg div { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; transition: .25s; }
.fg div:hover { transform: translateY(-4px); border-color: var(--jade); }
.fg span { font-size: 26px; }
.fg b { display: block; font-weight: 800; margin: 4px 0 2px; }
.fg small { color: var(--mu); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.two li { margin: 10px 0 0 18px; color: var(--mu); }
.two h3 { font-size: 28px; margin-bottom: 6px; }

/* Live data: rating, clubs, tournaments */
.lb { margin-top: 20px; }
.lb h3 { margin-bottom: 6px; }
.lb .row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; overflow-wrap: anywhere; }
.lb .row:last-child { border-bottom: 0; }
.lb .pos { color: var(--mu); font-weight: 800; }
.lb .pts { color: var(--brass); font-weight: 800; font-variant-numeric: tabular-nums; }
.pill { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 99px; border: 1px solid currentColor; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 24px; }
/* A long name with no spaces (American_pool_tashkent) breaks inside the card instead of running out of it */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.card .top { display: flex; align-items: center; gap: 12px; }
.card .top > div { min-width: 0; }
.card img, .card .ph { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--bg2); flex: none; display: grid; place-items: center; font-size: 22px; }
.card b { font-weight: 800; line-height: 1.3; }
.card small { color: var(--mu); }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--mu); font-size: 14px; }
.card .prize { color: var(--brass); font-weight: 800; }

/* Download: the Google Play button and, on a computer, a QR code to open the store on the phone */
.dl { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; padding: 40px; background: linear-gradient(135deg, var(--card), var(--bg2)); }
.dl h2 { margin-top: 10px; }
.dl .sub { margin-bottom: 24px; }
.qr { margin: 0; text-align: center; }
.qr img { display: block; width: 220px; height: 220px; padding: 12px; background: #fff; border-radius: 24px; box-shadow: 0 20px 50px #0006, 0 0 0 6px rgba(34, 201, 138, .14); }
.qr figcaption { margin-top: 14px; max-width: 220px; font-size: 13px; color: var(--mu); }

details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; font-weight: 800; font-size: 18px; }
details p { color: var(--mu); margin-top: 8px; }

/* Join form */
.wiz { max-width: 640px; margin: 30px auto 0; background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 28px; position: relative; overflow: hidden; box-shadow: 0 30px 80px #0006; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 12px 18px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg); color: var(--tx); cursor: pointer; font: 600 14px Manrope; transition: .2s; }
.chip.on { background: var(--jade); color: #04150d; border-color: var(--jade); }
.fl { position: relative; margin-top: 14px; }
.fl input { padding: 22px 14px 8px; }
.fl label { position: absolute; left: 14px; top: 15px; margin: 0; pointer-events: none; transition: .2s; font-weight: 600; font-size: 15px; }
.fl input:focus + label, .fl input:not(:placeholder-shown) + label { top: 6px; font-size: 11px; color: var(--jade); }
.fl input.bad { border-color: var(--bad); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.nv { display: flex; justify-content: space-between; gap: 16px; margin-top: 22px; align-items: center; }
.err { color: var(--bad); font-size: 14px; font-weight: 600; min-height: 1em; }
.id { display: none; position: relative; border-radius: 22px; padding: 28px; min-height: 230px; color: #1a1405; background: linear-gradient(135deg, #f0cf85, #d1a85a 55%, #8a6a2a); overflow: hidden; animation: in .6s; }
.id.on { display: block; }
.id::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, #fff6 50%, transparent 60%); transform: translateX(-100%); animation: sh 2.6s .5s infinite; }
@keyframes sh { to { transform: translateX(100%); } }
@keyframes in { from { opacity: 0; transform: translateX(30px); } }
.id h3 { font-size: 38px; margin: 34px 0 4px; word-break: break-word; }
.id .k { font-weight: 800; letter-spacing: .14em; font-size: 12px; }
#cf { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }

/* Rocky, the app's mascot: beside the club form, on the calculator, and next to a failed send */
.rocky { display: block; height: auto; pointer-events: none; user-select: none; filter: drop-shadow(0 18px 24px #0007); }
.join-wrap { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin-top: 30px; }
.join-wrap .wiz { margin: 0; flex: 0 1 640px; min-width: 0; }
.rocky-join { width: 200px; flex: none; margin-bottom: 18px; }
.res { position: relative; }
.rocky-sim { position: absolute; right: -14px; top: -62px; width: 112px; }
.err-box { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 0; }
.nv .btn { flex: none; white-space: nowrap; }
.rocky-err { width: 44px; flex: none; filter: none; animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } }

footer { border-top: 1px solid var(--line); padding: 30px 0; color: var(--mu); font-size: 14px; text-align: center; }
footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 10px; }
footer nav a { text-decoration: none; }
footer nav a:hover { color: var(--jade); }

.rv { opacity: 0; transform: translateY(24px); transition: .7s; }
.rv.on { opacity: 1; transform: none; }
[hidden] { display: none !important; }

@media (max-width: 800px) {
  .hero, .sim, .two { grid-template-columns: 1fr; }
  .levels, .stats, .how, .fg { grid-template-columns: 1fr 1fr; }
  .how { gap: 28px 16px; }
  .hide { display: none; }
  /* Rocky peeks over the top of the form instead of squeezing it from the side */
  .join-wrap { flex-direction: column; align-items: center; gap: 0; }
  .join-wrap .wiz { flex: none; width: 100%; } /* in a column the 640px basis would fix its height */
  .rocky-join { width: 112px; margin: 0 0 -22px; position: relative; z-index: 1; }
  .rocky-sim { right: 10px; top: 10px; width: 64px; }
  .nv { flex-direction: column; align-items: stretch; gap: 10px; }
  .err { min-height: 0; }
  .nv .btn { width: 100%; }
  /* On the phone the store is one tap away, so the QR code goes */
  .dl { grid-template-columns: 1fr; padding: 26px; }
  .qr { display: none; }
  .cta-row .btn { flex: 1 1 auto; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .live::before, .id::after { animation: none; }
}
