/* Roll for Rating — marketing site
   Palette mirrors the app: dark chess.com-style surface + #2f81f7 accent. */

:root {
  --bg: #0d1117;
  --bg-alt: #11161d;
  --surface: #161b22;
  --surface-2: #1c2128;
  --border: #2a313b;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #2f81f7;
  --accent-dark: #1f6feb;
  --accent-soft: rgba(47, 129, 247, 0.14);
  --gold: #e0a32e;
  --win: #3fb950;
  --radius: 14px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  /* subtle tatami weave, like the app background */
  background-image:
    linear-gradient(135deg, rgba(255,255,255,0.015) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.015) 50%, rgba(255,255,255,0.015) 75%, transparent 75%);
  background-size: 28px 28px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.bold { font-weight: 800; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-weight: 800; font-family: inherit; cursor: pointer;
  border-radius: 10px; border: 1px solid transparent; text-align: center;
  transition: transform .06s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-primary { background: var(--accent); color: #fff; border-bottom: 3px solid var(--accent-dark); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 900; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; background: var(--accent); border-radius: 8px; font-size: 16px;
}
.brand-name { font-size: 17px; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--text); }
.nav .btn-primary { margin-left: 4px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 22px; cursor: pointer; margin-left: auto; }
.nav-mobile { display: none; flex-direction: column; gap: 4px; padding: 10px 24px 18px; border-bottom: 1px solid var(--border); background: var(--bg); }
.nav-mobile a { color: var(--text); padding: 10px 0; font-weight: 600; }
.nav-mobile.open { display: flex; }

/* ===== Invite code banner (?ref= / ?elite= share links) ===== */
.invite-banner {
  background: linear-gradient(90deg, rgba(47, 129, 247, 0.22), rgba(47, 129, 247, 0.10));
  border-bottom: 1px solid rgba(47, 129, 247, 0.4);
}
.invite-inner { display: flex; align-items: center; justify-content: center; gap: 10px 18px; flex-wrap: wrap; padding: 14px 24px; text-align: center; }
.invite-text { display: flex; flex-direction: column; gap: 2px; }
.invite-title { font-weight: 800; font-size: 16px; }
.invite-code {
  display: inline-block; margin-left: 8px; padding: 2px 10px;
  background: var(--surface); border: 1px dashed var(--accent); border-radius: 8px;
  color: var(--accent); font-weight: 900; letter-spacing: 0.08em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.invite-sub { color: var(--muted); font-size: 13px; }
.invite-copy { background: var(--accent); color: #fff; border-bottom: 3px solid var(--accent-dark); }
.invite-copy:hover { background: var(--accent-dark); }
.invite-copy:disabled { cursor: default; }
.invite-banner.elite { background: linear-gradient(90deg, rgba(224, 163, 46, 0.20), rgba(224, 163, 46, 0.08)); border-bottom-color: rgba(224, 163, 46, 0.45); }
.invite-banner.elite .invite-code { border-color: var(--gold); color: var(--gold); }

/* ===== Hero ===== */
.hero { padding: 72px 0 56px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.pill-badge {
  display: inline-block; background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(47,129,247,0.3); padding: 6px 14px; border-radius: 999px;
  font-weight: 700; font-size: 13px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(38px, 6vw, 60px); font-weight: 900; }
.lede { font-size: 19px; color: var(--muted); max-width: 520px; margin: 22px 0 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { color: var(--muted); font-size: 14px; margin-top: 18px; }

/* Phone mockup */
.hero-phone { position: relative; display: flex; justify-content: center; }
.phone {
  position: relative; width: 300px; height: 600px; background: #05080d;
  border: 10px solid #1b222c; border-radius: 42px; padding: 14px 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55); z-index: 2;
}
.phone-notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 120px; height: 22px; background: #1b222c; border-radius: 0 0 14px 14px; }
.phone-screen { height: 100%; border-radius: 30px; background: var(--bg); padding: 16px 12px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.app-topbar { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.app-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.app-title { font-size: 13px; font-weight: 800; }
.app-bell { font-size: 14px; }
.app-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.app-hero-card { background: linear-gradient(160deg, #182536, var(--surface)); }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.streak { color: #ff7a1a; font-size: 11px; font-weight: 800; }
.ror-number { font-size: 46px; font-weight: 900; line-height: 1; letter-spacing: -0.03em; }
.tier { color: var(--gold); font-weight: 800; font-size: 12px; }
.belt-chip { align-self: flex-start; background: #8b5cf6; color: #fff; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 6px; }
.app-card.mini { flex-direction: row; align-items: center; justify-content: space-between; }
.win { color: var(--win); font-weight: 800; font-size: 12px; }
.phone-glow { position: absolute; width: 360px; height: 360px; background: radial-gradient(circle, rgba(47,129,247,0.35), transparent 65%); top: 50%; left: 50%; transform: translate(-50%, -50%); filter: blur(30px); z-index: 1; }

/* ===== ROR strip ===== */
.strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.strip-inner { display: flex; align-items: center; gap: 32px; padding: 36px 24px; flex-wrap: wrap; }
.strip-big { font-size: 52px; font-weight: 900; letter-spacing: -0.03em; color: var(--accent); white-space: nowrap; }
.strip-big .muted { font-size: 22px; font-weight: 600; }
.strip-inner p { margin: 0; color: var(--text); font-size: 18px; max-width: 720px; }

/* ===== Sections ===== */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-size: clamp(28px, 4vw, 40px); font-weight: 900; text-align: center; }
.section-title.left { text-align: left; }
.section-sub { color: var(--muted); text-align: center; max-width: 620px; margin: 14px auto 0; font-size: 18px; }
.section-sub.left { text-align: left; margin-left: 0; }

/* Features grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: border-color .15s ease, transform .15s ease; }
.feature:hover { border-color: var(--accent); transform: translateY(-3px); }
.feature-icon { font-size: 28px; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); border-radius: 12px; margin-bottom: 16px; }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--muted); margin: 0; font-size: 15px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.step { text-align: center; padding: 12px; }
.step-num { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 22px; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 6px var(--accent-soft); }
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--muted); margin: 0; }

/* Split (for gyms) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.checklist { list-style: none; padding: 0; margin: 26px 0; display: flex; flex-direction: column; gap: 12px; }
.checklist li { padding-left: 30px; position: relative; color: var(--text); }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--win); font-weight: 900; }
.board { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,0.4); }
.board-title { font-weight: 900; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; }
.board-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 10px; }
.board-row + .board-row { border-top: 1px solid var(--border); }
.board-row.you { background: var(--accent-soft); border: 1px solid rgba(47,129,247,0.3); }
.rank { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.rank.gold { background: var(--gold); color: #111; }
.rank.silver { background: #c0c7d0; color: #111; }
.rank.bronze { background: #cd7f32; color: #111; }
.board-row .ror { font-weight: 900; color: var(--accent); }

/* CTA */
.section-cta { background: linear-gradient(160deg, #14233a, var(--bg)); border-top: 1px solid var(--border); }
.cta-inner { text-align: center; max-width: 640px; }
.cta-inner h2 { font-size: clamp(30px, 5vw, 46px); font-weight: 900; }
.cta-inner p { color: var(--muted); font-size: 18px; margin: 16px 0 30px; }
.badges { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.store-badge { display: inline-flex; flex-direction: column; align-items: flex-start; padding: 10px 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.store-badge.disabled { opacity: 0.6; }
.store-sub { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.store-main { font-size: 18px; font-weight: 800; }
a.store-badge { background: var(--accent); border-color: var(--accent-dark); border-bottom-width: 3px; color: #fff; transition: transform .06s ease, background .15s ease; }
a.store-badge:hover { background: var(--accent-dark); }
a.store-badge:active { transform: translateY(1px); }
a.store-badge .store-sub { color: rgba(255, 255, 255, 0.85); }
.cta-inner p.contact-line { margin: 28px 0 0; font-size: 13px; }
.contact-line a { font-weight: 700; }

/* FAQ */
.faq { margin-top: 40px; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 800; padding: 16px 0; font-size: 17px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 24px; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin: 0 0 18px; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 48px 0 30px; background: var(--bg-alt); }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-brand .brand-mark { margin-bottom: 4px; }
.footer-brand .brand-name { font-weight: 900; font-size: 18px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.footer-links a { color: var(--muted); font-weight: 600; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 22px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 1; }
  .hero-phone { order: 2; }
  .lede, .hero-cta { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .section-title.left, .section-sub.left { text-align: center; }
  .checklist { max-width: 420px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav .btn-primary { display: none; }
  .nav-toggle { display: block; }
  .grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .strip-big { font-size: 40px; }
  .section { padding: 60px 0; }
  .hero { padding: 48px 0 40px; }
}
