/* kinéō Blog — Dark Theme Stylesheet */
/* bg: #0a0a12 | accent: #e0368f | secondary: #0096c7 */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a12;
  --bg-card: #12121e;
  --bg-card-alt: #181828;
  --text: #e0e0ea;
  --text-muted: #8888a0;
  --accent: #e0368f;
  --accent-glow: rgba(224, 54, 143, .15);
  --secondary: #0096c7;
  --secondary-glow: rgba(0, 150, 199, .12);
  --border: #222240;
  --radius: 12px;
  --max-w: 820px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #f06ab0; }

img { max-width: 100%; display: block; }

/* ========== HEADER ========== */
.blog-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 18, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: .85rem 1.5rem;
}
.blog-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.blog-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  text-decoration: none;
}
.blog-logo img { width: 32px; height: 32px; border-radius: 6px; }
.blog-nav { display: flex; gap: 1.5rem; align-items: center; }
.blog-nav a { color: var(--text-muted); font-size: .92rem; font-weight: 500; transition: color .2s; }
.blog-nav a:hover { color: #fff; }
.blog-nav .nav-cta {
  background: var(--accent);
  color: #fff;
  padding: .45rem 1.1rem;
  border-radius: 2rem;
  font-weight: 600;
}
.blog-nav .nav-cta:hover { background: #c92d7a; color: #fff; }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: .25rem;
}

@media (max-width: 700px) {
  .blog-nav { display: none; }
  .blog-nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; gap: 1rem; }
  .mobile-menu-btn { display: block; }
}

/* ========== HERO ========== */
.blog-hero {
  background: linear-gradient(160deg, #0a0a12 0%, #1a1040 50%, #0a0a12 100%);
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.blog-hero .meta {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.blog-hero .meta span { margin: 0 .4rem; }
.blog-hero h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  max-width: 800px;
  margin: 0 auto .75rem;
  background: linear-gradient(135deg, #fff 60%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.blog-hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ========== ARTICLE BODY ========== */
.blog-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}
.blog-body h2 {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: #fff;
  border-left: 4px solid var(--accent);
  padding-left: .75rem;
}
.blog-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2rem 0 .6rem;
  color: var(--secondary);
}
.blog-body p {
  margin-bottom: 1.1rem;
  font-size: 1.05rem;
}
.blog-body ul, .blog-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.1rem;
}
.blog-body li {
  margin-bottom: .5rem;
  font-size: 1.02rem;
}
.blog-body strong { color: #fff; }
.blog-body em { color: var(--accent); font-style: normal; font-weight: 600; }

/* ========== DATA CARDS ========== */
.data-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.data-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
}
.data-card .value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}
.data-card .label {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: .35rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.data-card.secondary .value { color: var(--secondary); }

/* ========== MONTH TABLE ========== */
.month-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.month-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  min-width: 520px;
}
.month-table th {
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: .78rem;
  letter-spacing: .05em;
  padding: .75rem .6rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
.month-table th:first-child { text-align: left; }
.month-table td {
  padding: .7rem .6rem;
  text-align: right;
  border-bottom: 1px solid rgba(34, 34, 64, .5);
  color: var(--text);
}
.month-table td:first-child { text-align: left; font-weight: 600; color: #fff; }
.month-table tr:last-child td { border-bottom: none; }
.month-table .highlight-row {
  background: var(--accent-glow);
}
.month-table .highlight-row td:first-child {
  color: var(--accent);
}
.month-table .total-row {
  background: var(--bg-card);
  font-weight: 700;
}
.month-table .total-row td { color: #fff; border-top: 2px solid var(--accent); }

/* ========== RACE SPLIT ========== */
.race-splits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.race-split {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  border-left: 4px solid var(--accent);
}
.race-split.swim { border-left-color: #0096c7; }
.race-split.bike { border-left-color: #e0368f; }
.race-split.run { border-left-color: #f0a030; }
.race-split.total { border-left-color: #a855f7; background: var(--bg-card-alt); }
.race-split h4 {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .5rem;
}
.race-split.swim h4 { color: #0096c7; }
.race-split.bike h4 { color: #e0368f; }
.race-split.run h4 { color: #f0a030; }
.race-split.total h4 { color: #a855f7; }
.race-split .split-stat {
  font-size: .92rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.race-split .split-stat strong { color: #fff; }

/* ========== CALLOUT / NOTE ========== */
.callout {
  background: var(--bg-card-alt);
  border-left: 4px solid var(--secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  font-size: .98rem;
}
.callout.warning { border-left-color: #f0a030; }
.callout.accent { border-left-color: var(--accent); }

/* ========== TSS SPARKLINE ========== */
.tss-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
  margin: 1.5rem 0;
  padding: .5rem 0;
}
.tss-bar {
  flex: 1;
  min-width: 12px;
  background: linear-gradient(to top, var(--accent), #a855f7);
  border-radius: 3px 3px 0 0;
  position: relative;
  transition: opacity .2s;
}
.tss-bar:hover { opacity: .8; }
.tss-bar .bar-label {
  position: absolute;
  bottom: -1.4rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: .6rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.tss-bar.peak { background: linear-gradient(to top, #f0a030, #e0368f); }

/* ========== CTA GATE (blur overlay) ========== */
.cta-gate {
  position: relative;
  margin: 2rem 0;
  overflow: hidden;
}
.cta-gate-content,
.cta-gate > div:first-child:not(.cta-gate-overlay):not(.cta-overlay) {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  max-height: 280px;
  overflow: hidden;
  position: relative;
}
/* Fade-out mask on gated content */
.cta-gate-content::after,
.cta-gate > div:first-child:not(.cta-gate-overlay):not(.cta-overlay)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}
.cta-gate-overlay,
.cta-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, transparent 0%, rgba(10,10,18,.85) 30%, rgba(10,10,18,.97) 60%, rgba(10,10,18,.99) 100%);
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  z-index: 2;
}
.cta-gate-overlay h3,
.cta-overlay h3,
.cta-form h3 {
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: .5rem;
}
.cta-gate-overlay p,
.cta-overlay p,
.cta-form p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  max-width: 400px;
}
.cta-gate-overlay .gate-form,
.cta-form form,
.cta-overlay form,
.cta-form {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: center;
  justify-content: center;
}
.cta-gate-overlay input[type="email"],
.cta-overlay input[type="email"],
.cta-form input[type="email"],
.cta-form input[type="text"] {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: #fff;
  padding: .7rem 1rem;
  border-radius: 2rem;
  font-size: .95rem;
  width: 260px;
  outline: none;
}
.cta-gate-overlay input:focus,
.cta-overlay input:focus,
.cta-form input:focus { border-color: var(--accent); }
.cta-gate-overlay .gate-btn,
.cta-overlay button[type="submit"],
.cta-form button[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: .7rem 1.5rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: background .2s;
  width: 260px;
}
.cta-gate-overlay .gate-btn:hover,
.cta-overlay button[type="submit"]:hover,
.cta-form button[type="submit"]:hover { background: #c92d7a; }
.cta-form .note {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .5rem;
}
.cta-form .success {
  color: var(--secondary);
  font-weight: 600;
  font-size: .9rem;
}

/* ========== BOTTOM CTA ========== */
.blog-bottom-cta,
.bottom-cta {
  background: linear-gradient(135deg, #1a1040, #0a0a12);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 3.5rem 1.5rem;
  margin-top: 2rem;
  border-radius: var(--radius);
}
.blog-bottom-cta h2,
.bottom-cta h2,
.bottom-cta h3 { color: #fff; font-size: 1.5rem; margin-bottom: .5rem; border: none; padding: 0; }
.blog-bottom-cta p,
.bottom-cta p { color: var(--text-muted); margin-bottom: 1.5rem; }
.blog-bottom-cta .cta-btn,
.blog-bottom-cta a,
.bottom-cta a {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: .85rem 2.2rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform .2s, background .2s;
}
.blog-bottom-cta .cta-btn:hover,
.blog-bottom-cta a:hover,
.bottom-cta a:hover { transform: scale(1.04); background: #c92d7a; color: #fff; }

/* ========== RELATED ARTICLES ========== */
.related-articles {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 2.5rem;
}
.related-articles h2 { color: #fff; font-size: 1.3rem; margin-bottom: 1rem; border: none; padding: 0; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
  transition: border-color .2s, transform .2s;
}
.related-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.related-card h3 { font-size: 1rem; color: #fff; margin-bottom: .4rem; }
.related-card p { font-size: .85rem; color: var(--text-muted); margin: 0; }
.related-card .tag {
  display: inline-block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent);
  margin-bottom: .5rem;
}

/* ========== FOOTER ========== */
.blog-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: .82rem;
  border-top: 1px solid var(--border);
}
.blog-footer a { color: var(--accent); }

/* ========== UTILITIES ========== */
.text-accent { color: var(--accent); }
.text-secondary { color: var(--secondary); }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Print */
@media print {
  .blog-header, .cta-gate-overlay, .blog-bottom-cta, .mobile-menu-btn { display: none; }
  body { background: #fff; color: #111; }
  .blog-hero h1 { -webkit-text-fill-color: #111; background: none; }
}
