/* ============================================================
   Superhuman Badminton - blog design system
   Extends the landing page tokens (Barlow + Barlow Condensed,
   blue/gold) with long-form reading components.
   ============================================================ */

:root {
  --primary: #2B5CFF;
  --primary-dark: #1D3FD8;
  --primary-mid: #3D7BFF;
  --primary-light: #EAF0FF;
  --ink: #14161A;
  --ink-2: #545B69;
  --ink-3: #8E939E;
  --bg: #F6F8FD;
  --card: #FFFFFF;
  --gold: #F5B301;
  --gold-ink: #5F4700;
  --gold-bg: #FFF4D6;
  --orange: #FF8A3D;
  --teal: #12B5A5;
  --teal-bg: #DDF6F3;
  --flame: #F5484D;
  --divider: #E5E9F2;
  --shadow-card: 0 10px 30px rgba(20, 40, 90, 0.08);
  --shadow-lift: 0 18px 40px rgba(20, 40, 90, 0.13);
  --measure: 68ch;          /* 65-75 characters per line */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; scroll-padding-top: 90px; }
body {
  font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, .display {
  font-family: 'Barlow Condensed', 'Barlow', sans-serif;
  line-height: 1.08;
  letter-spacing: 0.2px;
}
img, svg { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

/* ---------- reading progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  background: transparent; z-index: 100; pointer-events: none;
}
.progress i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--primary-mid), var(--primary-dark));
  transition: width 0.08s linear;
}

/* ---------- nav (matches landing page) ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 248, 253, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(229, 233, 242, 0.7);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; flex: none;
  background: linear-gradient(160deg, var(--primary-mid), var(--primary-dark));
  display: grid; place-items: center;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a.plain { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; transition: color 0.2s; }
.nav-links a.plain:hover, .nav-links a.plain[aria-current="page"] { color: var(--ink); }
@media (max-width: 700px) { .nav-links a.plain { display: none; } }
@media (max-width: 430px) {
  .brand { font-size: 16px; gap: 8px; }
  .brand-mark { width: 31px; height: 31px; border-radius: 10px; }
  .btn.small { padding: 9px 14px; font-size: 14px; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 16px; padding: 13px 24px; border-radius: 14px;
  border: none; cursor: pointer; white-space: nowrap;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(43, 92, 255, 0.35); }
.btn.small { padding: 10px 18px; font-size: 15px; border-radius: 12px; }
:focus-visible { outline: 3px solid rgba(43, 92, 255, 0.5); outline-offset: 2px; }

/* ---------- app store button ---------- */
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: #101319; color: #fff; text-decoration: none;
  padding: 12px 22px; border-radius: 15px; border: 1px solid #101319;
  transition: transform 0.2s, box-shadow 0.2s;
}
.store-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(16, 19, 25, 0.28); }
.store-btn svg { flex: none; }
.store-btn .lbl { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.store-btn .lbl small { font-size: 11px; font-weight: 600; opacity: 0.85; letter-spacing: 0.3px; }
.store-btn .lbl b { font-family: 'Barlow Condensed', sans-serif; font-size: 21px; font-weight: 700; letter-spacing: 0.3px; }

/* ---------- chips / eyebrows ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--primary-light); color: var(--primary-dark);
  font-weight: 800; font-size: 12px; letter-spacing: 1.1px;
  padding: 6px 13px; border-radius: 999px; text-transform: uppercase;
  text-decoration: none;
}
.chip.gold { background: var(--gold-bg); color: var(--gold-ink); border: 1px solid #F3DFA2; }
.chip.teal { background: var(--teal-bg); color: #0B7268; }

/* ============================================================
   BLOG INDEX
   ============================================================ */
.blog-hero { padding: 66px 0 40px; position: relative; overflow: hidden; }
.blog-hero::before {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 999px;
  background: radial-gradient(circle, rgba(61, 123, 255, 0.13), transparent 68%);
  top: -220px; right: -140px; pointer-events: none;
}
.blog-hero h1 { font-size: clamp(42px, 6.4vw, 70px); font-weight: 800; text-transform: uppercase; margin-top: 16px; }
.blog-hero h1 .accent { color: var(--primary); }
.blog-hero p { color: var(--ink-2); font-size: clamp(16px, 2vw, 19px); max-width: 560px; margin-top: 16px; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-bottom: 20px; }
@media (max-width: 950px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
  background: var(--card); border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow-card); display: flex; flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none; color: inherit;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.post-card .thumb { height: 140px; position: relative; overflow: hidden; display: grid; place-items: center; }
.post-card .thumb.blue { background: linear-gradient(150deg, #3D7BFF, #2B5CFF 55%, #1D3FD8); }
.post-card .thumb.dark { background: linear-gradient(160deg, #17203B, #101527 70%); }
.post-card .thumb.gold { background: linear-gradient(150deg, #FFC93D, #F5B301 60%, #DB9600); }
.post-card .thumb.teal { background: linear-gradient(150deg, #2AD3C1, #12B5A5 60%, #0B8479); }
.post-card .thumb::after {
  content: ""; position: absolute; right: -36px; top: -36px;
  width: 120px; height: 120px; border-radius: 999px; background: rgba(255, 255, 255, 0.1);
}
.post-card .thumb svg { position: relative; z-index: 2; }
.post-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card .body > .chip { align-self: flex-start; }
.post-card h2 { font-size: 24px; font-weight: 700; text-transform: uppercase; margin-top: 12px; }
.post-card p { color: var(--ink-2); font-size: 14.5px; margin-top: 8px; flex: 1; }
.post-card .meta { color: var(--ink-3); font-size: 12.5px; font-weight: 600; margin-top: 14px; letter-spacing: 0.4px; }

/* featured card spans the row */
.post-card.feature { grid-column: 1 / -1; flex-direction: row; }
.post-card.feature .thumb { height: auto; width: 42%; flex: none; }
.post-card.feature .body { padding: 34px 36px; justify-content: center; }
.post-card.feature h2 { font-size: clamp(28px, 3.4vw, 40px); }
.post-card.feature p { font-size: 16px; flex: none; max-width: 52ch; }
@media (max-width: 800px) {
  .post-card.feature { flex-direction: column; }
  .post-card.feature .thumb { width: 100%; height: 150px; }
  .post-card.feature .body { padding: 22px 22px 26px; }
}

/* ============================================================
   ARTICLE
   ============================================================ */
.art-hero { padding: 48px 0 34px; position: relative; }
.crumbs { color: var(--ink-3); font-size: 13.5px; font-weight: 600; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--primary); }
.art-hero h1 {
  font-size: clamp(38px, 5.6vw, 64px); font-weight: 800;
  text-transform: uppercase; margin-top: 14px; max-width: 18ch;
}
.art-hero .dek { color: var(--ink-2); font-size: clamp(17px, 2.1vw, 20px); max-width: var(--measure); margin-top: 16px; }
.art-meta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--divider);
  color: var(--ink-3); font-size: 14px; font-weight: 600;
}
.art-meta .who { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.art-meta .who .av {
  width: 34px; height: 34px; border-radius: 999px; flex: none;
  background: var(--gold-bg); display: grid; place-items: center; overflow: hidden;
}
.art-meta .dot { color: var(--divider); }

/* layout: prose + sticky TOC rail */
.art-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 52px; align-items: start; padding-bottom: 40px; }
@media (max-width: 1000px) { .art-layout { grid-template-columns: minmax(0, 1fr); gap: 0; } }

.toc { position: sticky; top: 92px; }
@media (max-width: 1000px) {
  .toc {
    position: static; background: var(--card); border-radius: 18px;
    padding: 20px 22px; box-shadow: var(--shadow-card); margin-bottom: 30px;
  }
}
.toc h4 { font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-3); font-weight: 800; font-family: 'Barlow', sans-serif; }
.toc ol { list-style: none; margin-top: 12px; display: grid; gap: 9px; counter-reset: toc; }
.toc a {
  color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 600;
  display: block; padding-left: 13px; border-left: 2px solid var(--divider);
  transition: color 0.2s, border-color 0.2s;
}
.toc a:hover, .toc a.active { color: var(--primary); border-left-color: var(--primary); }

/* ---------- prose ---------- */
.prose { max-width: var(--measure); font-size: 17.5px; min-width: 0; }
.prose > * + * { margin-top: 20px; }
.prose .lead { font-size: 20px; color: var(--ink-2); }
.prose h2 {
  font-size: clamp(28px, 3.6vw, 38px); font-weight: 800; text-transform: uppercase;
  margin-top: 52px; padding-top: 4px;
}
.prose h3 { font-size: 23px; font-weight: 700; margin-top: 34px; }
.prose p { color: #2C313C; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--primary); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--primary-light); }
.prose a:hover { border-bottom-color: var(--primary); }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 10px; color: #2C313C; }
.prose li::marker { color: var(--primary); font-weight: 700; }
.prose hr { border: none; border-top: 1px solid var(--divider); margin: 44px 0; }
.prose figure { margin-top: 26px; }
.prose figcaption { color: var(--ink-3); font-size: 13.5px; margin-top: 8px; }

/* ---------- table ---------- */
.t-wrap {
  overflow-x: auto; border-radius: 16px; box-shadow: var(--shadow-card);
  max-width: 100%; min-width: 0; -webkit-overflow-scrolling: touch;
  /* edge shadows that fade out once the table is scrolled to that end */
  background:
    linear-gradient(to right, var(--card) 40%, rgba(255, 255, 255, 0)) left center,
    linear-gradient(to left, var(--card) 40%, rgba(255, 255, 255, 0)) right center,
    radial-gradient(farthest-side at 0 50%, rgba(20, 40, 90, 0.16), rgba(20, 40, 90, 0)) left center,
    radial-gradient(farthest-side at 100% 50%, rgba(20, 40, 90, 0.16), rgba(20, 40, 90, 0)) right center,
    var(--card);
  background-repeat: no-repeat;
  background-size: 46px 100%, 46px 100%, 15px 100%, 15px 100%, 100% 100%;
  background-attachment: local, local, scroll, scroll, local;
}
table { border-collapse: collapse; width: 100%; min-width: 440px; font-size: 15px; }
thead th {
  background: var(--primary-light); color: var(--primary-dark);
  font-weight: 800; font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  text-align: left; padding: 13px 16px; white-space: nowrap;
}
tbody td { padding: 13px 16px; border-top: 1px solid var(--divider); color: #2C313C; vertical-align: top; }
tbody tr:hover { background: #FAFBFF; }
tbody td:first-child { font-weight: 700; color: var(--ink); }

/* ---------- drill cards ---------- */
.drills { display: grid; gap: 16px; margin-top: 26px; }
.drill {
  background: var(--card); border-radius: 20px; padding: 24px 24px 22px;
  box-shadow: var(--shadow-card); position: relative; overflow: hidden;
  border-left: 4px solid var(--primary);
}
.drill.gold { border-left-color: var(--gold); }
.drill.teal { border-left-color: var(--teal); }
.drill.orange { border-left-color: var(--orange); }
.drill .n {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 60px;
  color: var(--primary-light); position: absolute; top: 8px; right: 20px; line-height: 1;
  pointer-events: none;
}
.drill.gold .n { color: #FFF1CC; }
.drill.teal .n { color: var(--teal-bg); }
.drill.orange .n { color: #FFEBDC; }
.drill h3 { font-size: 23px; font-weight: 700; text-transform: uppercase; margin: 0; max-width: 80%; }
.drill .tag {
  display: inline-block; margin-top: 8px; font-size: 11.5px; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase; color: var(--ink-3);
}
.drill p { margin-top: 10px; color: #2C313C; font-size: 15.5px; }
.drill .spec {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid var(--divider);
}
.drill .spec span {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg); border-radius: 999px; padding: 6px 13px;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.drill .miss { margin-top: 12px; font-size: 14.5px; color: var(--ink-2); }
.drill .miss b { color: var(--flame); font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: 0.8px; }

/* ---------- callouts ---------- */
.callout {
  display: flex; gap: 15px; align-items: flex-start;
  border-radius: 18px; padding: 20px 22px; margin-top: 28px;
  background: var(--primary-light); border: 1px solid #D5E1FF;
}
.callout svg { flex: none; margin-top: 2px; }
.callout .ct { font-weight: 800; text-transform: uppercase; letter-spacing: 0.9px; font-size: 12.5px; color: var(--primary-dark); }
.callout p { margin-top: 5px; font-size: 15.5px; color: #2C313C; }
.callout.warn { background: #FFF1F1; border-color: #FBD4D5; }
.callout.warn .ct { color: #B0272B; }
.callout.gold { background: var(--gold-bg); border-color: #F3DFA2; }
.callout.gold .ct { color: var(--gold-ink); }

/* Bruno says */
.bruno-says {
  display: flex; gap: 18px; align-items: center;
  background: linear-gradient(160deg, #17203B, #101527 70%);
  color: #fff; border-radius: 24px; padding: 24px 28px; margin-top: 30px;
}
.bruno-says .pic { width: 74px; flex: none; }
.bruno-says .ct { color: var(--gold); font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; font-size: 12px; }
.bruno-says p { color: #DDE3F0; font-size: 15.5px; margin-top: 6px; }
@media (max-width: 560px) { .bruno-says { flex-direction: column; text-align: center; } }

/* ---------- key numbers strip ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }
.stats .s { background: var(--card); border-radius: 18px; padding: 20px; box-shadow: var(--shadow-card); text-align: center; }
.stats .s b { font-family: 'Barlow Condensed', sans-serif; font-size: 40px; font-weight: 800; color: var(--primary); display: block; line-height: 1; }
.stats .s span { color: var(--ink-2); font-size: 14px; font-weight: 600; display: block; margin-top: 7px; }

/* ---------- in-article app CTA ---------- */
.cta-card {
  background: linear-gradient(150deg, #3D7BFF, #2B5CFF 55%, #1D3FD8);
  border-radius: 26px; color: #fff; padding: 34px 32px; margin-top: 40px;
  position: relative; overflow: hidden;
}
.cta-card::before {
  content: ""; position: absolute; width: 300px; height: 300px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.09); right: -110px; bottom: -150px;
}
.cta-card h3 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; text-transform: uppercase; position: relative; }
.cta-card p { opacity: 0.92; font-size: 16px; margin-top: 10px; position: relative; max-width: 46ch; }
.cta-card .row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 22px; position: relative; }
.cta-card .store-btn { background: #fff; color: var(--ink); border-color: #fff; }
.cta-card .fine { font-size: 13.5px; opacity: 0.9; }

/* ---------- related ---------- */
.related { padding: 10px 0 60px; }
.related h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; text-transform: uppercase; }
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
@media (max-width: 900px) { .rel-grid { grid-template-columns: 1fr; } }
.rel {
  background: var(--card); border-radius: 18px; padding: 22px; box-shadow: var(--shadow-card);
  text-decoration: none; color: inherit; display: block;
  transition: transform 0.25s, box-shadow 0.25s;
}
.rel:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.rel h3 { font-size: 20px; font-weight: 700; text-transform: uppercase; margin-top: 10px; }
.rel p { color: var(--ink-2); font-size: 14px; margin-top: 7px; }

/* ---------- footer ---------- */
footer { padding: 44px 0 56px; color: var(--ink-2); font-size: 14.5px; border-top: 1px solid var(--divider); }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
footer a { margin-right: 20px; text-decoration: none; font-weight: 600; color: var(--ink-2); transition: color 0.2s; }
footer a:hover { color: var(--primary); }

/* ---------- scroll reveal (no-JS safe) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .progress i { transition: none; }
  * { animation: none !important; }
}
