/* Snooker Self-Trainer — brand colours mirror the app's SnookerTheme (Theme.kt) */
:root {
  --primary-green: #1B5E20;   /* SnookerTheme.PrimaryGreen */
  --secondary-green: #4CAF50; /* SnookerTheme.SecondaryGreen */
  --accent-red: #D32F2F;      /* SnookerTheme.AccentRed */
  --bg: #F5F5F5;              /* SnookerTheme.BackgroundGray */
  --surface: #FFFFFF;         /* SnookerTheme.CardWhite */
  --text: #212121;            /* SnookerTheme.TextPrimary */
  --text-muted: #757575;      /* SnookerTheme.TextSecondary */
  --brand-tint: #E3EFE5;      /* app icon background */
  --border: #E0E0E0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(27,94,32,.06);
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary-green); }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.lede { font-size: 1.15rem; color: var(--text-muted); max-width: 62ch; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* Skip link */
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--primary-green);
  color: #fff; padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 24px;
  min-height: 66px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--primary-green); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand span { font-size: 1.02rem; letter-spacing: -0.01em; }
.site-nav { margin-left: auto; display: flex; gap: 20px; flex-wrap: wrap; }
.site-nav a { color: var(--text); text-decoration: none; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--primary-green); text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 2px solid transparent;
}
.btn-primary { background: var(--primary-green); color: #fff; }
.btn-primary:hover { background: #164a19; }
.btn-secondary { background: transparent; color: var(--primary-green); border-color: var(--primary-green); }
.btn-secondary:hover { background: var(--brand-tint); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero */
.hero { background: var(--brand-tint); padding: 72px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { color: var(--primary-green); }
.hero .lede { color: #33503a; }
.hero-art { text-align: center; }
.hero-art img { width: min(300px, 80%); border-radius: 28px; box-shadow: var(--shadow); }
.eyebrow {
  display: inline-block; background: var(--surface); color: var(--primary-green);
  border-radius: 999px; padding: 5px 14px; font-size: .82rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px;
}
.hero-note { font-size: .9rem; color: var(--text-muted); margin-top: 18px; }

/* Sections */
section { padding: 64px 0; }
section.tint { background: var(--brand-tint); }
section.surface { background: var(--surface); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; margin-top: 34px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { color: var(--primary-green); margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card a { font-weight: 600; }
.card-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--brand-tint);
  color: var(--primary-green); display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; margin-bottom: 14px;
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 20px; margin-top: 34px; }
.stat { text-align: center; padding: 22px 12px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); }
.stat b { display: block; font-size: 2rem; color: var(--secondary-green); line-height: 1.1; }
.stat span { color: var(--text-muted); font-size: .92rem; }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; margin-top: 34px; }
.step { position: relative; padding-top: 52px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary-green); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { margin-bottom: .3em; }

/* Feature list */
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.ticks li::before {
  content: "●"; color: var(--secondary-green); position: absolute; left: 6px; top: 0;
}

/* Content pages */
.page-head { background: var(--brand-tint); padding: 56px 0 44px; }
.page-head h1 { color: var(--primary-green); }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.8em; color: var(--primary-green); }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.prose th { background: var(--brand-tint); color: var(--primary-green); }
.callout {
  background: var(--surface); border-left: 4px solid var(--secondary-green);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 20px 24px; margin: 28px 0;
  box-shadow: var(--shadow);
}

/* FAQ */
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 14px;
}
.faq summary { font-weight: 600; cursor: pointer; color: var(--primary-green); }
.faq details[open] summary { margin-bottom: 10px; }

/* CTA band */
.cta { background: var(--primary-green); color: #fff; text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: #d6e6d8; max-width: 60ch; margin-left: auto; margin-right: auto; }
.cta .btn-primary { background: #fff; color: var(--primary-green); }
.cta .btn-primary:hover { background: var(--brand-tint); }
.cta .btn-secondary { color: #fff; border-color: rgba(255,255,255,.7); }
.cta .btn-secondary:hover { background: rgba(255,255,255,.12); }
.cta .btn-row { justify-content: center; }

/* Footer */
.site-footer { background: #12321a; color: #cfe0d3; padding: 48px 0 32px; font-size: .93rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer .brand { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 32px; padding-top: 18px; color: #9fbaa6; }

/* Breadcrumbs */
.crumbs { font-size: .88rem; color: var(--text-muted); margin-bottom: 12px; }
.crumbs a { color: var(--text-muted); }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero .btn-row { justify-content: center; }
  .site-header .wrap { min-height: auto; padding-top: 10px; padding-bottom: 10px; }
  .site-nav { margin-left: 0; width: 100%; gap: 14px; }
}
