/* ============================================================
   blog.css — Tutorials / Journal styles for thegurukulofai.com
   Relies on tokens from base.css (--ink, --teal, --warm-white, etc.)
   ============================================================ */

.blog-body {
  background: var(--warm-white);
}

/* shared content width */
.blog-hero-inner,
.blog-list,
.post-head-inner,
.post-prose,
.post-cta,
.post-author-card {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}
.blog-list { max-width: 1080px; }

/* ---------- Blog index hero ---------- */
.blog-hero {
  padding: 160px 0 40px;
  text-align: center;
}
.blog-hero-title {
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.02;
  margin: 14px 0 0;
  color: var(--ink);
}
.blog-hero-title em {
  font-style: italic;
  color: var(--teal);
}
.blog-hero-lede {
  max-width: 560px;
  margin: 22px auto 0;
  color: var(--slate);
  font-size: 18px;
  line-height: 1.6;
}
.blog-hero .clay-rule { margin: 22px auto 0; }

/* ---------- Post cards grid ---------- */
.blog-list { padding-top: 24px; padding-bottom: 96px; }
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--teal);
  box-shadow: 0 18px 40px -18px rgba(62, 207, 207, .55);
}
.post-card-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--forest);
}
.post-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.04); }
.post-card-body { padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 10px; }
.post-card-tag {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 600; color: var(--teal);
}
.post-card-title { font-size: 22px; line-height: 1.2; margin: 0; color: var(--ink); }
.post-card-desc { font-size: 15px; line-height: 1.55; color: var(--slate); margin: 0; }
.post-card-meta { font-size: 13px; color: var(--slate); opacity: .8; margin-top: 4px; }

/* ---------- Post header ---------- */
.post-head { padding: 150px 0 28px; text-align: center; }
.post-back {
  display: inline-block; margin-bottom: 22px;
  font-size: 14px; font-weight: 600; color: var(--teal); text-decoration: none;
}
.post-back:hover { color: var(--teal-light); }
.post-eyebrow {
  display: inline-block;
  font-size: 11px; letter-spacing: .35em; text-transform: uppercase;
  font-weight: 600; color: var(--teal);
}
.post-title {
  font-size: clamp(34px, 5.5vw, 56px);
  line-height: 1.05;
  margin: 14px 0 0;
  color: var(--ink);
}
.post-head .clay-rule { margin: 22px auto 0; }
.post-lede {
  max-width: 620px; margin: 22px auto 0;
  font-size: 19px; line-height: 1.6; color: var(--slate);
}
.post-meta {
  margin-top: 22px;
  font-size: 14px; color: var(--slate);
  display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap;
}
.post-author { font-weight: 600; color: var(--ink); }
.post-dot { opacity: .5; }

/* ---------- Cover ---------- */
.post-cover {
  max-width: 1080px;
  margin: 36px auto 0;
  padding: 0 24px;
}
.post-cover img {
  width: 100%;
  border-radius: 20px;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ---------- Prose ---------- */
.post-prose { padding-top: 48px; padding-bottom: 8px; }
.post-prose > * { margin-top: 0; }
.post-prose p,
.post-prose ul,
.post-prose ol {
  font-size: 18px;
  line-height: 1.75;
  color: var(--slate);
  margin: 0 0 24px;
}
.post-prose h2 {
  font-size: 30px; line-height: 1.15; color: var(--ink);
  margin: 52px 0 18px;
}
.post-prose h3 {
  font-size: 22px; line-height: 1.2; color: var(--ink);
  margin: 36px 0 14px;
}
.post-prose a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.post-prose a:hover { color: var(--teal-light); }
.post-prose strong { color: var(--ink); font-weight: 600; }
.post-prose ul, .post-prose ol { padding-left: 22px; }
.post-prose li { margin-bottom: 8px; }
.post-prose blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--teal);
  font-size: 20px; line-height: 1.6; color: var(--ink);
}
.post-prose code {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: .9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.post-prose hr { border: 0; border-top: 1px solid var(--mist); margin: 44px 0; }
.post-prose pre {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 12px;
  padding: 20px 22px;
  margin: 28px 0;
  overflow-x: auto;
}
.post-prose pre code {
  background: none;
  border: 0;
  padding: 0;
  display: block;
  font-size: 13px;
  line-height: 1.7;
  color: var(--slate);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

/* images / figures (Bunny CDN) */
.post-figure, .post-video { margin: 36px 0; }
.post-prose img,
.post-figure img {
  width: 100%;
  border-radius: 16px;
  display: block;
}
.post-figure figcaption,
.post-video figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--slate);
  text-align: center;
  opacity: .85;
}

/* Bunny Stream embed */
.post-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: var(--ink);
}
.post-video-frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}

/* ---------- CTA ---------- */
.post-cta {
  margin-top: 64px;
  background: var(--ink);
  color: var(--white);
  border-radius: 20px;
  padding: 44px 40px;
  text-align: center;
  max-width: 760px;
}
.post-cta-title { color: var(--white); font-size: 28px; line-height: 1.2; margin: 0 0 12px; }
.post-cta p { color: rgba(255,255,255,.8); font-size: 17px; line-height: 1.6; margin: 0 0 24px; }

/* ---------- Author card ---------- */
.post-author-card {
  margin: 40px auto 110px;
  padding: 24px 0 0;
  border-top: 1px solid var(--mist);
  text-align: center;
}
.post-author-name { display: block; font-weight: 700; color: var(--ink); font-size: 18px; }
.post-author-role { display: block; color: var(--slate); font-size: 15px; margin-top: 4px; }

/* ---------- Flow infographic ---------- */
.post-prose ol.flow {
  list-style: none;
  padding: 0;
  margin: 36px 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  counter-reset: none;
}
.flow-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 16px;
  padding: 18px 18px;
  margin: 0 !important;
}
.flow-num {
  flex: none;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--teal);
  color: var(--ink);
  font-weight: 700;
  border-radius: 50%;
  font-size: 15px;
}
.flow-text { display: flex; flex-direction: column; gap: 4px; }
.flow-text strong { color: var(--ink); font-size: 16px; }
.flow-text span { color: var(--slate); font-size: 14.5px; line-height: 1.5; }

/* ---------- Still -> motion ---------- */
.s2m { margin: 36px 0; }
.s2m-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}
.s2m-cell { display: flex; flex-direction: column; gap: 8px; }
.s2m-label {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 600; color: var(--teal); text-align: center;
}
.s2m-cell img { width: 100%; border-radius: 14px; display: block; aspect-ratio: 16/9; object-fit: cover; }
.s2m-cell .post-video-frame { border-radius: 14px; }
.s2m-arrow { color: var(--teal); flex: none; }
.s2m-arrow svg { width: 34px; height: 34px; display: block; }

/* ---------- Reel grid ---------- */
.reel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 36px 0;
}
.reel-tile { display: flex; flex-direction: column; gap: 8px; }
.reel-tile .post-video-frame { border-radius: 14px; }
.reel-tile-cap { font-size: 13px; color: var(--slate); text-align: center; }

/* ---------- Still -> video pair gallery (same layout as stillToMotion) ---------- */
.pair-gallery {
  margin: 36px 0;
  display: flex;
  flex-direction: column;
  gap: 44px;
}
.pair-gallery .s2m { margin: 0; }
.pair-gallery .s2m figcaption {
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Flow icons ---------- */
.flow-text strong { display: flex; align-items: center; gap: 8px; }
.flow-ic { color: var(--teal); display: inline-flex; flex: none; }
.flow-ic svg { width: 18px; height: 18px; }

/* ---------- Download cards ---------- */
.dl-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 28px 0;
}
.dl-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--ink);
  color: var(--white);
  border-radius: 16px;
  padding: 20px 22px;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.dl-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -18px rgba(62, 207, 207, .7);
}
.dl-icon {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--teal);
  color: var(--ink);
  border-radius: 12px;
}
.dl-icon svg { width: 22px; height: 22px; }
.dl-text { display: flex; flex-direction: column; gap: 2px; }
.dl-text strong { font-size: 16px; }
.dl-text span { color: rgba(255,255,255,.7); font-size: 13.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .dl-row { grid-template-columns: 1fr; }
  .post-prose ol.flow { grid-template-columns: 1fr; }
  .reel-grid { grid-template-columns: 1fr; }
  .s2m-row { grid-template-columns: 1fr; }
  .s2m-arrow { transform: rotate(90deg); margin: 2px auto; }
}
@media (max-width: 640px) {
  .blog-hero { padding-top: 130px; }
  .post-head { padding-top: 124px; }
  .post-prose p, .post-prose ul, .post-prose ol { font-size: 17px; }
  .post-cta { padding: 34px 24px; }
}
