/* Kality blog: hub pages and articles. Loaded after site.css and reuses its
   tokens (canvas, card, ink, the logo gradient, macro colors). */

/* ── Hub header ──────────────────────────────────────── */
.blog-hero { padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 5vw, 56px); }
.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1; letter-spacing: -0.03em; font-weight: 500;
  text-wrap: balance; max-width: 14em;
}
.blog-hero p.lede { margin-top: 20px; font-size: clamp(18px, 1.6vw, 20px); color: var(--ink-2); max-width: 36em; }
.blog-hero__jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.blog-hero__jump a {
  text-decoration: none; font-size: 15px; font-weight: 600;
  padding: 9px 16px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--hairline);
}
.blog-hero__jump a:hover { border-color: var(--blue); color: var(--blue); }

/* ── Post cards ──────────────────────────────────────── */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-card {
  display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--radius);
  text-decoration: none; overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.post-card:hover { transform: translateY(-2px); box-shadow: 0 22px 44px -28px rgba(3, 60, 170, .45); }
.post-card__art {
  aspect-ratio: 16 / 10; overflow: hidden; position: relative;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c, var(--sky)) 30%, var(--canvas-tint)), var(--canvas-tint));
  display: flex; justify-content: center; align-items: flex-start;
}
.post-card__art img { width: 46%; margin-top: 8%; border-radius: 18px 18px 0 0; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .45); }
.post-card__art--wide img { width: 100%; margin: 0; border-radius: 0; box-shadow: none; object-fit: cover; object-position: top left; height: 100%; }
.post-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card__tag { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c, var(--blue)); }
.post-card h3 { font-family: var(--font-display); font-weight: 500; font-size: 24px; line-height: 1.15; letter-spacing: -0.015em; }
.post-card p { color: var(--ink-2); font-size: 15px; }
.post-card__meta { margin-top: auto; padding-top: 8px; font-size: 13px; color: var(--ink-3); }
.post-card--feature { grid-column: 1 / -1; flex-direction: row; }
.post-card--feature .post-card__art { flex: 1.1; aspect-ratio: auto; min-height: 320px; }
.post-card--feature .post-card__body { flex: 1; justify-content: center; padding: 32px; }
.post-card--feature h3 { font-size: clamp(28px, 3vw, 36px); }
@media (max-width: 960px) {
  .posts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .posts { grid-template-columns: 1fr; }
  .post-card--feature { grid-column: auto; flex-direction: column; }
  .post-card--feature .post-card__art { min-height: 0; aspect-ratio: 16 / 10; }
  .post-card--feature .post-card__body { padding: 20px 22px 24px; }
}

/* Coach band on the hub, and the coach hub itself */
.coach .posts { margin-top: 44px; }
.coach .post-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: #fff; }
.coach .post-card p, .coach .post-card__meta { color: #fff; }
.coach .post-card__tag { color: #7FC4FF; }
.coach .post-card__art { background: linear-gradient(160deg, rgba(6,168,253,.35), rgba(0,58,249,.15)); }
.coach .post-card:hover { box-shadow: 0 22px 44px -24px rgba(0, 0, 0, .7); }
.coach--hero { padding-top: clamp(40px, 7vw, 88px); }
.coach--hero h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(42px, 6.4vw, 78px); line-height: 1; letter-spacing: -0.03em;
  text-wrap: balance; max-width: 15em;
}
.audiences { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 44px; }
.audiences li { list-style: none; padding: 18px 20px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); font-size: 15px; }
.audiences strong { display: block; font-size: 17px; margin-bottom: 4px; }
.audiences { padding: 0; }
@media (max-width: 900px) { .audiences { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .audiences { grid-template-columns: 1fr; } }

/* ── Article ─────────────────────────────────────────── */
.crumbs { font-size: 14px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--blue); }

.article-head { padding: clamp(32px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); }
.article-head .wrap { max-width: calc(760px + 2 * var(--gutter)); }
.article-head h1 {
  margin-top: 18px;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -0.03em;
  text-wrap: balance;
}
.article-head .lede { margin-top: 20px; font-size: clamp(19px, 1.8vw, 22px); color: var(--ink-2); max-width: 36em; }
.byline { margin-top: 22px; font-size: 14px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.article-head--coach { background: var(--night); color: #fff;
  background:
    radial-gradient(800px 420px at 90% -20%, rgba(6, 168, 253, 0.35), transparent 60%),
    radial-gradient(600px 400px at 0% 60%, rgba(0, 58, 249, 0.3), transparent 60%),
    var(--night);
}
.article-head--coach .lede, .article-head--coach .byline, .article-head--coach .crumbs, .article-head--coach .crumbs a { color: #fff; }
.article-head--coach .eyebrow { color: #7FC4FF; }

.article { padding: clamp(20px, 4vw, 40px) 0 var(--section-pad); }
.prose { max-width: calc(760px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); font-size: 18px; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(28px, 3.2vw, 38px); margin-top: 2em; line-height: 1.12; }
.prose h3 { font-size: 21px; margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose em { font-style: italic; font-weight: inherit; }
.prose a { color: var(--blue); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--blue); }

.prose figure { margin: 2em 0; }
.prose figure .phone { --w: min(300px, 76vw); margin: 0 auto; }
.prose figure .browser { margin: 0 calc(-1 * min(120px, 8vw)); }
.prose figcaption { margin-top: 16px; font-size: 14px; color: var(--ink-3); text-align: center; }
.figure-pair { display: flex; justify-content: center; gap: 20px; }
.prose .figure-pair .phone { --w: min(260px, 40vw); margin: 0; }

.callout {
  padding: 20px 22px; border-radius: 18px;
  background: color-mix(in srgb, var(--c, var(--blue)) 9%, var(--card));
  border-left: 4px solid var(--c, var(--blue));
  font-size: 16px;
}
.callout p { color: var(--ink-2); }
.callout > strong:first-child { display: block; margin-bottom: 4px; }
.callout ul { margin: 6px 0 0; }

.keyfacts { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.keyfacts li { margin: 0 !important; padding: 16px; border-radius: 16px; background: var(--card); font-size: 14px; }
.keyfacts b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 30px; line-height: 1.1; color: var(--ink); }

.table-wrap { overflow-x: auto; border-radius: 16px; background: var(--card); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.prose th, .prose td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.prose th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.prose td { color: var(--ink-2); }
.prose tr:last-child td { border-bottom: 0; }

.steps { list-style: none; padding: 0 !important; counter-reset: step; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: 14px; margin: 0 !important; }
.steps li::before {
  content: counter(step); width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff;
  background: linear-gradient(180deg, var(--sky), var(--blue) 55%, var(--deep));
}

.article-cta {
  max-width: 760px; margin: 3em auto 0; padding: 28px;
  border-radius: 24px; color: #fff;
  background: linear-gradient(180deg, var(--sky), var(--blue) 55%, var(--deep));
  display: grid; gap: 14px; justify-items: start;
}
.article-cta h2 { font-size: clamp(26px, 3vw, 32px); color: #fff; }
.article-cta p { color: #fff; }
.article-cta--coach { background: var(--night); background:
  radial-gradient(500px 300px at 100% 0%, rgba(6, 168, 253, 0.4), transparent 60%), var(--night); }
.article-cta .row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
@media (max-width: 860px) { .article-cta { margin-left: var(--gutter); margin-right: var(--gutter); } }

.related { padding: 0 0 var(--section-pad); }
.related h2 { font-size: clamp(28px, 3vw, 36px); margin-bottom: 24px; }

.disclaimer { max-width: calc(760px + 2 * var(--gutter)); margin: 2.4em auto 0; padding: 0 var(--gutter); font-size: 14px; color: var(--ink-3); }

/* ── Sleep art & figure ──────────────────────────────── */
.post-card__art--night { background: radial-gradient(400px 240px at 80% 0%, rgba(6,168,253,.35), transparent 60%), var(--night); align-items: center; }
.coach .post-card__art--night { background: radial-gradient(400px 240px at 80% 0%, rgba(6,168,253,.35), transparent 60%), #020818; }
.sleep-art { width: 100%; height: 100%; }
.sleep-fig { background: var(--night); border-radius: 20px; padding: 22px 22px 14px; }
.sleep-fig svg { width: 100%; height: auto; display: block; }
.sleep-fig text { font: 600 13px var(--font-body); fill: rgba(255,255,255,.75); }
.sleep-fig figcaption { color: #fff; opacity: .8; }
.st--awake { fill: #FF9F0A; }
.st--rem { fill: #BE6BE8; }
.st--light { fill: #7FC4FF; }
.st--deep { fill: #0361FC; }

.prose figure.figure-wide { margin-left: calc(-1 * min(110px, 7vw)); margin-right: calc(-1 * min(110px, 7vw)); }
.prose figure .browser { margin: 0; }
@media (max-width: 760px) { .prose figure.figure-wide { margin-left: 0; margin-right: 0; } }
.nav__links a[aria-current="page"] { color: var(--ink); }
.article-head .eyebrow { margin: 18px 0 0; }
.crumbs--on-dark, .crumbs--on-dark a { color: #fff; }
.crumbs--on-dark { margin-bottom: 22px; }
.blog-list { padding-top: 0; }
.blog-closing { padding-top: var(--section-pad); }
