/* kr8tiv AI - Field Notes (blog) styles. Loaded after page.css on /blog/ pages.
   No JS. Motion is CSS only and switches off for prefers-reduced-motion. */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  background: linear-gradient(90deg, var(--amber), #f0c75e);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  .progress {
    animation: progress-grow linear both;
    animation-timeline: scroll(root);
  }
}
@supports not (animation-timeline: scroll()) {
  .progress { display: none; }
}
@keyframes progress-grow {
  to { transform: scaleX(1); }
}

.post-hero {
  padding: clamp(2.2rem, 6vw, 4.5rem) 0 1.5rem;
}
.post-hero h1 {
  max-width: 22ch;
}
.byline {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-55);
  margin: 1.1rem 0 0;
}
.byline a { color: var(--ink-70); }

.hero-figure {
  margin: 1.8rem 0 0;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px -30px rgba(212, 168, 83, 0.35), 0 10px 40px -10px rgba(0, 0, 0, 0.7);
  animation: hero-rise 1.1s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}
.hero-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  animation: hero-drift 18s ease-in-out infinite alternate;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}
.hero-figure.is-playing .hero-video { opacity: 1; }
.hero-figure.is-playing img { animation: none; }
.hero-figure::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(5, 5, 16, 0.55));
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes hero-drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.07) translate3d(-1.2%, -0.8%, 0); }
}

.answer {
  margin: 2rem 0 0;
  padding: 1.3rem 1.4rem 1.2rem;
  border: 1px solid rgba(212, 168, 83, 0.35);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.1), rgba(212, 168, 83, 0.02) 60%);
}
.answer h2 {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 0.6rem;
}
.answer ul { margin: 0; padding-left: 1.1rem; }
.answer li { color: var(--ink); margin: 0.35rem 0; }

.post-layout {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1fr);
  padding-bottom: 3rem;
}
@media (min-width: 1000px) {
  .post-layout { grid-template-columns: minmax(0, 1fr) 15rem; }
  .toc { position: sticky; top: 5rem; align-self: start; }
}
.toc {
  font-size: 0.86rem;
  border-left: 1px solid var(--line);
  padding-left: 1rem;
}
.toc p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-40);
  margin: 0 0 0.6rem;
}
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0.4rem 0; }
.toc a { color: var(--ink-55); text-decoration: none; }
.toc a:hover { color: var(--amber); }
@media (max-width: 999px) {
  .toc { order: -1; }
}

.post-layout > * { min-width: 0; }
.prose { max-width: 44rem; }
.prose h2 {
  margin-top: 2.8rem;
  scroll-margin-top: 5rem;
}
.prose h3 {
  margin-top: 1.8rem;
  color: #fff;
}
.prose p, .prose li { color: var(--ink-70); }
.prose strong { color: #fff; font-weight: 500; }
.prose a {
  color: #fff;
  text-decoration-color: rgba(212, 168, 83, 0.6);
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--amber); }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin: 0.45rem 0; }
.prose li::marker { color: var(--amber); }
.prose em { color: #fff; }

.table-wrap {
  overflow-x: auto;
  margin: 1.4rem 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 34rem;
}
.prose th, .prose td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.prose th {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 500;
}
.prose tr:last-child td { border-bottom: 0; }

.sources-list { font-size: 0.86rem; }
.sources-list li { color: var(--ink-55); }

.post-cards { margin-top: 1.2rem; }
.post-card .meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-40);
  margin: 0 0 0.4rem;
}
.post-card img {
  border-radius: 10px;
  margin-bottom: 0.9rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .hero-figure, .hero-figure img { animation: none; }
  .hero-video { display: none; }
}
