/* Insights: the blog index and the articles (2026-11-16, Krishna: "write the blog page on the website, add the read time").
   Plan and article template: doc/seo/content-plan.md §2. Articles reuse the reading layout of the legal pages
   (legal.css: .legal-grid, .legal-toc, .legal-body, .legal-table) and add only what an article needs here.
   Tokens only, rem type, no box-shadow. */

/* ---------- Byline in the black heading band ---------- */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.25rem;
  margin-top: var(--space-sm);
  color: var(--on-dark-muted);
  font-size: var(--text-sm);
}
.post-meta img { width: 2.75rem; height: 2.75rem; border-radius: 50%; object-fit: cover; object-position: 50% 4%; }   /* 2026-11-16 (Krishna: the face was cut): the crop starts near the top of the photo, so his whole face shows */
.post-meta strong { color: var(--on-dark); font-weight: 600; }
.post-meta .post-read { font-family: var(--mono); font-size: var(--text-xs); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.post-crumb a { color: inherit; }

/* ---------- Article body extras ---------- */
.post-answer {   /* "The short answer" box, quotable by search and AI answers */
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-card);
  background: var(--glow);
}
.post-answer .label { display: block; margin-bottom: .75rem; color: var(--spark-deep); }
.legal-body .post-answer p { max-width: none; color: var(--ink); font-size: var(--text-lead); line-height: 1.55; }
.legal-body h3 { margin-top: 1.5rem; margin-bottom: .5rem; font-size: var(--text-md); font-weight: 600; color: var(--ink); }
.legal-body ol { display: grid; gap: .5rem; margin-top: 1rem; padding-left: 1.25rem; list-style: decimal; }
.legal-body ol li::marker { color: var(--spark-deep); font-family: var(--mono); font-size: var(--text-xs); }
.post-note { margin-top: .5rem; color: var(--muted); font-size: var(--text-sm); font-style: italic; }

/* "What we charge" box, mid article */
.post-charge {
  margin-block: var(--space-md);
  padding: var(--space-md);
  border: var(--rule);
  border-radius: var(--radius-card);
  background: var(--surface);
}
.post-charge h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.post-charge .btn { margin-top: 1.25rem; }

/* Author box and sources */
.post-author {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: var(--rule-strong);
}
.post-author img { width: 4rem; height: 4rem; border-radius: 50%; object-fit: cover; object-position: 50% 4%; }   /* the same */
.legal-body .post-author p { color: var(--muted-deep); }
.post-sources li { font-size: var(--text-sm); }

/* ---------- Cards: the index and "Related articles" ---------- */
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.post-card {
  display: grid;
  align-content: start;
  gap: .75rem;
  height: 100%;
  padding: var(--space-md) 1.5rem;
  border: var(--rule);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--fast) var(--ease);
}
.post-card:hover { border-color: var(--spark); }
.post-card-title { font-family: var(--display); font-size: var(--text-h3); font-weight: 600; line-height: 1.2; letter-spacing: var(--tracking-title); }
.post-card-text { color: var(--muted); font-size: var(--text-sm); line-height: 1.6; }
.post-card-meta { color: var(--muted); font-family: var(--mono); font-size: var(--text-xs); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.post-related { margin-top: var(--space-lg); }
.post-related h2 { margin-bottom: 1rem; font-family: var(--display); font-size: var(--text-h3); font-weight: 600; }

/* Index: the categories line */
.post-cats { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--space-md); }
.post-cats span { padding: .375rem .875rem; border: var(--rule); border-radius: var(--radius-control); color: var(--muted); font-size: var(--text-sm); }

@media (max-width: 55rem) {
  .post-grid { grid-template-columns: minmax(0, 1fr); }
}

/* 2026-11-16 (Krishna: highlight the important terms, same font style): bold key terms in the body font and ink,
   the same as the bold names in the lists. Never italic, never another font or size. */
.legal-body .post-answer strong { font-weight: 600; color: var(--ink); }
.intro-glow .page-lead strong { font-weight: 600; color: var(--on-dark); }

/* ---------- Reading cup (2026-11-16, Krishna: a reading widget like the How we work video, the founder drinking
   the most famous drink here, a flat white; stuck to the bottom left until the footer starts) ----------
   The rail is the last child of <main>, sticky to the bottom with no height of its own, so the cup rides at the bottom
   of the screen and stops where <main> ends, right above the footer. The glass empties as you read (site.js).
   Brand rule: nothing floats or pulses, so the steam only fades as the glass empties. */
.read-cup-rail { position: sticky; bottom: 0; z-index: 20; height: 0; pointer-events: none; }
.read-cup {
  position: absolute;
  left: max(1rem, calc((100vw - var(--container)) / 2 - 1rem));
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .375rem 1rem .375rem .375rem;
  border: var(--rule);
  border-radius: var(--radius-card);
  background: var(--surface);
  pointer-events: auto;
}
.read-cup > svg { width: 6.5rem; height: 5rem; flex: none; }   /* the full body scene (2026-11-16); was until the same day 4rem square */
.read-cup-text { display: grid; line-height: 1.1; }
.read-cup-pct { font-family: var(--display); font-size: var(--text-lead); font-weight: 600; color: var(--ink); }
.read-cup-label { color: var(--muted); font-family: var(--mono); font-size: var(--text-xs); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.read-cup-coffee { transition: transform var(--fast) var(--ease); }
.read-cup-steam { transition: opacity var(--fade) var(--ease); }
@media (max-width: 40rem) {
  .read-cup { bottom: .75rem; padding: .25rem .75rem .25rem .25rem; }
  .read-cup > svg { width: 4.5rem; height: 3.5rem; }
}
@media (prefers-reduced-motion: reduce) { .read-cup-coffee, .read-cup-steam { transition: none; } }
@media print { .read-cup-rail { display: none; } }

/* 2026-11-16 fix: the article link colour (.legal-body a) also coloured the button text, so "Book a call" vanished
   into the button. Buttons keep their own colours. */
.legal-body .btn-primary, .legal-body .btn-primary:hover { color: var(--on-primary); text-decoration: none; }

/* 2026-11-16 (Krishna: remove the white background, make it feel fully 3D): the scene stands on the page by itself,
   shaded with gradients and a soft floor shadow drawn in the SVG (no box-shadow). Where it passes over the black call
   to action band, site.js adds .is-on-dark and the words turn light. */
.read-cup { padding: 0; border: 0; background: none; }   /* was until 2026-11-16: a white card with a hairline border */
.read-cup > svg { width: 8rem; height: 7.1rem; }   /* taller for the raised glass on cheers (2026-11-16); was until the same day 6.3rem */
.read-cup-pct { font-size: var(--text-h3); }
.read-cup.is-on-dark .read-cup-pct { color: var(--on-dark); }
.read-cup.is-on-dark .read-cup-label { color: var(--on-dark-muted); }
@media (max-width: 40rem) {
  .read-cup { padding: 0; }
  .read-cup > svg { width: 5.5rem; height: 4.9rem; }
  .read-cup-pct { font-size: var(--text-lead); }
}

/* ---------- Reading cup: the 100% celebration (2026-11-16, Krishna: "at 100% they should be celebrating, a pop up and
   balloons going up") ----------
   Once per visit, when the reader gets to the end (site.js adds .is-party for a few seconds and .is-done for good):
   he raises his glass, smiles wide, a "Cheers!" bubble pops up, confetti bursts from the glass and three balloons in the
   site colours rise up the screen and fade. A one time moment chosen by Krishna, the only motion of its kind on the
   site. With reduced motion: the bubble and the smile only, nothing moves. */
.read-cup-happy { opacity: 0; transition: opacity var(--fast) var(--ease); }
.read-cup.is-done .read-cup-happy { opacity: 1; }
.read-cup.is-done .read-cup-smile { opacity: 0; }
.read-cup-party { position: absolute; inset: 0; pointer-events: none; }
.read-cup-bubble, .read-cup-confetti, .read-cup-balloon { position: absolute; opacity: 0; }

/* "Cheers!" bubble above his head */
.read-cup-bubble {
  left: 4.6rem;   /* beside the raised glass (2026-11-16); was until the same day 1.25rem, above his head */
  bottom: 100%;
  margin-bottom: .25rem;
  padding: .3rem .75rem;
  border: var(--rule);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--display);
  font-size: var(--text-md);
  font-style: italic;
  font-weight: 600;
  white-space: nowrap;
  transform-origin: 20% 100%;
  z-index: 2;   /* always in front of the balloons */
}
.read-cup-bubble::after {   /* the little tail pointing at him */
  content: "";
  position: absolute;
  left: 1rem;
  top: 100%;
  border: .35rem solid transparent;
  border-top-color: var(--surface);
}

/* confetti: eight small pieces from the glass */
.read-cup-confetti { left: 4.3rem; top: 1.4rem; width: .45rem; height: .3rem; border-radius: .08rem; background: var(--spark); }
.read-cup-confetti:nth-child(3n) { background: var(--primary); }
.read-cup-confetti:nth-child(3n + 1) { background: var(--pop); }
.read-cup-confetti:nth-child(2) { --x: -2.6rem; --y: -3.2rem; --r: 200deg; }
.read-cup-confetti:nth-child(3) { --x: -1.2rem; --y: -4.2rem; --r: -140deg; }
.read-cup-confetti:nth-child(4) { --x: .4rem; --y: -4.6rem; --r: 260deg; }
.read-cup-confetti:nth-child(5) { --x: 2rem; --y: -3.8rem; --r: -220deg; }
.read-cup-confetti:nth-child(6) { --x: 3.2rem; --y: -2.4rem; --r: 160deg; }
.read-cup-confetti:nth-child(7) { --x: 2.6rem; --y: -.6rem; --r: -300deg; }
.read-cup-confetti:nth-child(8) { --x: -3.2rem; --y: -1.2rem; --r: 240deg; }
.read-cup-confetti:nth-child(9) { --x: -.6rem; --y: -2.6rem; --r: -180deg; }

/* three balloons behind the chair */
.read-cup-balloon { bottom: 2.5rem; width: 2.2rem; height: 4.8rem; }
.read-cup-balloon:nth-of-type(1) { left: .2rem; }
.read-cup-balloon:nth-of-type(2) { left: 1.9rem; }
.read-cup-balloon:nth-of-type(3) { left: 3.6rem; }

.read-cup.is-party .read-cup-bubble { animation: read-cup-bubble 4s var(--ease) forwards; }
.read-cup.is-party .read-cup-confetti { animation: read-cup-confetti 1.1s var(--ease) .15s forwards; }
.read-cup.is-party .read-cup-balloon { animation: read-cup-balloon 4.2s var(--ease-soft) forwards; }
.read-cup.is-party .read-cup-balloon:nth-of-type(2) { animation-delay: .35s; animation-duration: 4.6s; }
.read-cup.is-party .read-cup-balloon:nth-of-type(3) { animation-delay: .7s; animation-duration: 4.4s; }

@keyframes read-cup-bubble {
  0% { opacity: 0; transform: scale(.6); }
  10% { opacity: 1; transform: scale(1.08); }
  16%, 85% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}
@keyframes read-cup-confetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(.4); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); }
}
@keyframes read-cup-balloon {
  0% { opacity: 0; transform: translate(0, 1rem) scale(.6); }
  12% { opacity: 1; transform: translate(0, 0) scale(1); }
  40% { transform: translate(.6rem, -22vh) rotate(4deg); }
  70% { opacity: 1; transform: translate(-.5rem, -46vh) rotate(-4deg); }
  100% { opacity: 0; transform: translate(.3rem, -70vh) rotate(2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .read-cup.is-party .read-cup-confetti, .read-cup.is-party .read-cup-balloon { animation: none; }
  .read-cup.is-party .read-cup-bubble { animation: none; opacity: 1; }
}

/* ---------- Reading cup on tablets and phones (2026-11-16, Krishna: "on the phone the widget is covering the text, make
   it responsive for every screen") ----------
   Measured: from 55rem (880px) up the cup sits in the empty left column beside "On this page" and never touches the
   text (checked at 1920, 1440, 1280, 1100, 1024 and 900px). Below 55rem that column is gone, so the cup becomes a slim
   bar at the bottom of the screen: the page background, a hairline on top and a thin line that fills as you read
   (--read, set in site.js). The rail now has a height of its own, so at the end of the page the bar takes its own space
   above the footer and never hides the last lines. The scene, the sips and the celebration stay. */
.read-cup::before { content: none; }
@media (max-width: 55rem) {
  .read-cup-rail { height: 4rem; }
  .read-cup {
    position: relative;
    left: auto;
    bottom: auto;
    height: 100%;
    gap: .75rem;
    padding: 0 var(--gutter);
    border-top: var(--rule);
    background: var(--bg);
  }
  .read-cup::before {   /* the reading line along the top of the bar */
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: calc(var(--read, 0) * 100%);
    height: 2px;
    background: var(--primary);
    transition: width var(--fast) var(--ease);
  }
  .read-cup > svg { width: 4.2rem; height: 3.75rem; align-self: flex-end; }
  .read-cup-text { display: flex; align-items: baseline; gap: .375rem; }
  .read-cup-pct { font-size: var(--text-lead); }
  .read-cup.is-on-dark .read-cup-pct { color: var(--ink); }          /* the bar has its own light background */
  .read-cup.is-on-dark .read-cup-label { color: var(--muted); }
  .read-cup-bubble { left: 3.6rem; }
  .read-cup-confetti { left: calc(var(--gutter) + 2.3rem); top: .4rem; }
  .read-cup-balloon { bottom: 1.5rem; }
}
@media (max-width: 55rem) and (prefers-reduced-motion: reduce) { .read-cup::before { transition: none; } }

/* 2026-11-16 (Krishna: "reduce the space between Enable businesses to do more and the widget"): on tablets and phones the
   reading bar follows the black band at the end of an article, so the band's tall bottom padding (72px) left a big gap
   above the bar. Only there, the band ends closer to its last line. */
@media (max-width: 55rem) {
  .cta-glow:has(+ .read-cup-rail) { padding-bottom: var(--space-sm); }
}

/* 2026-11-16 (Krishna: "remove the On this page section from the mobile screens"): below 55rem the list no longer sits
   beside the article but above it, pushing the short answer down, so articles hide it there. From 55rem up it stays in
   the left column. Only the articles load this file; Privacy, Terms and Accessibility keep their list. */
@media (max-width: 55rem) {
  .legal .legal-toc { display: none; }
}
