/**
 * @file        blog-post.css
 * @description Public blog post page: zen background, paper reading card, compact brand-coloured headings, animated image and service spotlight
 *
 * @author      Thomas Dobler - SYNTHETIXMIND LTD
 * @email       tom@synthetixmind.com
 * @company     SYNTHETIXMIND LTD, Paphos, Cyprus
 * @url         https://synthetixmind.com
 *
 * @uid         4a8c2e61-d7f3-4b19-8e50-b3c6a9f0d2e7
 * @version     0.3.0.4
 * @created     2026-10-26
 * @updated     2026-10-26
 *
 * @copyright   (c) 2026 by SYNTHETIXMIND LTD
 * @license     Proprietary — All rights reserved
 */

/* WHY: the global h1–h3 sizes (3.5 / 2.5 / 2rem) are made for landing pages; an article
        reads better with a modest title, small section headings and one narrow column. */

::selection { background: rgba(250, 88, 0, 0.2); }

/* ---- Hero: left-aligned, same width as the reading card ---- */
.blog-post-hero { text-align: left; padding-bottom: calc(var(--space-xl) + 2rem); }
.blog-post-hero .container { max-width: 800px; }
.blog-post-hero h1 { font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.2rem); line-height: 1.25; letter-spacing: -0.015em; margin-bottom: 0.75rem; }
.blog-post-hero .subhead { font-size: clamp(1rem, 0.95rem + 0.25vw, 1.15rem); line-height: 1.6; font-weight: 400; margin: 0; }
.blog-post-crumb { font-size: 0.82rem; margin-bottom: 1rem; color: rgba(234, 221, 211, 0.8); }
.blog-post-crumb a { color: inherit; }
.blog-post-meta { margin: 1.25rem 0 0; color: rgba(234, 221, 211, 0.85); font-size: 0.88rem; }

/* ---- Zen background: fixed canvas behind the transparent article section ---- */
.blog-zen {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(120% 90% at 20% 10%, #fbf7f3 0%, #f4ece4 55%, #eee4da 100%);
}

/* ---- Reading card ("paper" on the sand) ---- */
.blog-post { position: relative; padding: 0 0 var(--space-xl); background: transparent; }
.blog-post__inner {
  position: relative;
  max-width: 800px;
  margin-top: -3.5rem;
  padding: clamp(1.25rem, 4vw, 3rem);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(234, 221, 211, 0.9);
  box-shadow: 0 24px 60px rgba(28, 44, 55, 0.1), 0 2px 6px rgba(28, 44, 55, 0.05);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* ---- Image: soft reveal, then a slow drift (Ken Burns) and a light sheen ---- */
.blog-post__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-bottom: var(--space-md);
  border-radius: 14px;
  background: var(--color-beige);
  box-shadow: 0 16px 36px rgba(28, 44, 55, 0.16);
  isolation: isolate;
}
/* 16:9 frame, the Blog Central image format; older images in other formats are cropped to fit. */
.blog-post__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 60% 40%;
  transition: translate 0.6s ease-out;
  animation: bp-reveal 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both, bp-drift 26s ease-in-out 1.4s infinite alternate;
}
.blog-post__media::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(28, 44, 55, 0.28) 100%),
              linear-gradient(120deg, rgba(250, 88, 0, 0.12), transparent 45%);
  mix-blend-mode: multiply;
}
.blog-post__media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.4) 48%, transparent 62%);
  transform: translateX(-130%);
  animation: bp-sheen 2.4s ease-in-out 0.7s both, bp-sheen 2.4s ease-in-out 14s infinite both;
}
@keyframes bp-reveal {
  from { opacity: 0; transform: scale(1.14); filter: blur(10px) saturate(0.6); }
  to   { opacity: 1; transform: scale(1.03); filter: blur(0) saturate(1); }
}
@keyframes bp-drift {
  from { transform: scale(1.03) translate(0, 0); }
  to   { transform: scale(1.12) translate(-2%, -1.5%); }
}
@keyframes bp-sheen {
  0%   { transform: translateX(-130%); }
  60%, 100% { transform: translateX(130%); }
}

.blog-post__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0 0 var(--space-lg); }
.blog-post__tags .badge { background: #fbf3ec; border-color: var(--color-beige); color: var(--color-mahogany); }

/* ---- Body typography in the brand colours ---- */
.blog-post__body { font-size: 1.1rem; line-height: 1.8; color: #2b3640; overflow-wrap: anywhere; }
.blog-post__body > :first-child { margin-top: 0; }
.blog-post__body > p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.1em 0 0;
  font-size: 3.1em;
  line-height: 0.85;
  font-weight: 700;
  color: var(--color-orange);
}
.blog-post__body h2,
.blog-post__body h3,
.blog-post__body h4 { color: var(--color-navy); line-height: 1.35; letter-spacing: -0.005em; }
/* Section headings: half the former size, with a small orange bar as the anchor. */
.blog-post__body h2 { position: relative; font-size: 1.2rem; margin: 2.4rem 0 0.7rem; padding-left: 0.9rem; }
.blog-post__body h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--color-orange), var(--color-mahogany));
}
.blog-post__body h3 { font-size: 1.05rem; margin: 1.8rem 0 0.45rem; color: var(--color-mahogany); }
.blog-post__body h4 { font-size: 0.85rem; margin: 1.5rem 0 0.4rem; text-transform: uppercase; letter-spacing: 0.06em; }
/* The global paragraph colour is mahogany; long-form text reads better in the dark body colour. */
.blog-post__body p,
.blog-post__body ul,
.blog-post__body ol { margin: 0 0 1.3rem; color: inherit; }
.blog-post__body ul,
.blog-post__body ol { padding-left: 1.4rem; }
.blog-post__body li { color: inherit; margin-bottom: 0.4rem; }
.blog-post__body li::marker { color: var(--color-orange); }
.blog-post__body strong { color: var(--color-navy); }
.blog-post__body a { color: var(--color-orange); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.blog-post__body a:hover { color: var(--color-mahogany); text-decoration-thickness: 2px; }
.blog-post__body img { max-width: 100%; height: auto; border-radius: 10px; }
.blog-post__body figure { margin: 2rem 0; }
.blog-post__body figcaption { margin-top: 0.5rem; font-size: 0.88rem; color: #6b7280; text-align: center; }
.blog-post__body blockquote {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--color-orange);
  border-radius: 0 10px 10px 0;
  background: #fbf3ec;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--color-mahogany);
}
.blog-post__body blockquote p:last-child { margin-bottom: 0; }
.blog-post__body hr { border: 0; height: 1px; margin: 2.5rem 0; background: linear-gradient(90deg, transparent, var(--color-beige), transparent); }
.blog-post__body code { padding: 0.1em 0.35em; border-radius: 4px; background: #f6efe8; color: var(--color-mahogany); font-size: 0.88em; }
.blog-post__body pre { overflow-x: auto; margin: 0 0 1.5rem; padding: 1rem 1.25rem; border-radius: 10px; background: var(--color-navy); color: #f3f4f6; font-size: 0.88rem; line-height: 1.6; box-shadow: inset 4px 0 0 var(--color-orange); }
.blog-post__body pre code { padding: 0; background: none; font-size: inherit; color: inherit; }
.blog-post__body table { width: 100%; margin: 0 0 1.5rem; border-collapse: collapse; font-size: 0.95rem; display: block; overflow-x: auto; }
.blog-post__body th,
.blog-post__body td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--color-beige); text-align: left; }
.blog-post__body th { color: var(--color-navy); font-weight: 600; background: #fbf3ec; }

.blog-post__back { margin: var(--space-lg) 0 0; padding-top: var(--space-md); border-top: 1px solid var(--color-beige); font-weight: 600; }
.blog-post__back a { color: var(--color-orange); }

/* ---- Service spotlight ---- */
.blog-spotlight { padding: var(--space-xl) 0; background: linear-gradient(135deg, var(--color-navy) 0%, #24384a 60%, var(--color-mahogany) 140%); color: var(--color-text-light); }
.blog-spotlight__inner { display: grid; gap: var(--space-lg); align-items: center; max-width: 1040px; }
.blog-spotlight__scene { position: relative; margin: 0; }
.blog-spotlight__scene canvas,
.blog-spotlight__fallback { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 18px; }
.blog-spotlight__fallback {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, rgba(250, 88, 0, 0.35), transparent 55%), #22364a;
  color: var(--color-beige);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}
.blog-spotlight__scene.is-3d .blog-spotlight__fallback { display: none; }
.blog-spotlight__scene figcaption { margin-top: 0.6rem; font-size: 0.85rem; color: rgba(234, 221, 211, 0.75); text-align: center; }
.blog-spotlight__label { margin: 0 0 0.4rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-orange); }
.blog-spotlight__text h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin-bottom: 0.75rem; color: #fff; }
.blog-spotlight__text p { color: var(--color-beige); line-height: 1.7; }
.blog-spotlight__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: var(--space-md); }
.blog-spotlight__more { color: var(--color-beige); font-weight: 600; }
.blog-spotlight__more:hover { color: var(--color-orange); }

@media (min-width: 860px) {
  .blog-spotlight__inner { grid-template-columns: 1.15fr 1fr; gap: var(--space-xl); }
}

@media (max-width: 768px) {
  /* The card keeps a small gutter to the screen edge so the sand stays visible around it. */
  .blog-post__inner { width: calc(100% - 1.5rem); margin-top: -2.5rem; border-radius: 16px; }
  .blog-post__body { font-size: 1.04rem; line-height: 1.75; }
  .blog-post__body h2 { font-size: 1.12rem; margin-top: 2rem; }
  .blog-post__body h3 { font-size: 1rem; }
}

/* Reduced motion: the image appears without the zoom, drift and sheen. */
@media (prefers-reduced-motion: reduce) {
  .blog-post__image { animation: none; transform: none; }
  .blog-post__media::after { animation: none; display: none; }
}
