/*
 * ============================================================================
 * File:        assets/css/site.css
 * Module:      Public site / Styles
 * Function:    Minimal custom CSS layered on Bootstrap 5.3. Covers skip-link,
 *              focus appearance (WCAG 2.4.13), section tags, article cards,
 *              footer. Brand color is injected via the --brand CSS variable
 *              from the page header.
 * Version:     1.0.0
 * Created:     2026-05-05
 * ============================================================================
 */

/* WCAG 2.2 SC 2.4.11/2.4.13 — focus indicators clearly visible */
*:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Skip link visible only on focus (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #000;
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1080;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

/* Site header refinements */
.site-header .navbar-brand img { max-height: 40px; }
.site-header .nav-link { font-weight: 500; }
.site-header .nav-link:hover { color: var(--brand); }

/* Section accent line under nav links */
.site-header .nav-link {
  border-bottom: 2px solid transparent;
}
.site-header .nav-link:hover,
.site-header .nav-link[aria-current="page"] {
  border-bottom-color: var(--section-color, var(--brand));
}

/* Article card */
.article-card {
  display: block;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.article-card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,.08);
  transform: translateY(-1px);
}
.article-card-lg { padding: 1.5rem 1.75rem; }
.article-card-sm { padding: 0.75rem 1rem; }
.article-card-link { color: inherit; }
.article-card-title { margin: 0.25rem 0 0.5rem; line-height: 1.25; }
.article-card-lead { margin: 0 0 0.75rem; }
.article-card-meta { font-size: 0.8125rem; }

/* Section tag pill */
.article-section-tag {
  display: inline-block;
  background: #6c757d;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

/* Article view */
.article-hero img { width: 100%; height: auto; border-radius: 0.5rem; }
.article-body { font-size: 1.0625rem; line-height: 1.7; }
.article-body h2 { margin-top: 2rem; margin-bottom: 0.75rem; }
.article-body h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.article-body p { margin-bottom: 1rem; }
.article-body figure { margin: 1.5rem 0; }
.article-body blockquote {
  border-left: 4px solid var(--brand);
  padding: 0.5rem 1rem;
  font-style: italic;
  color: #495057;
}

/* TL;DR box */
.article-tldr {
  background: #f8f9fa;
  border-left: 4px solid var(--brand);
  padding: 1rem 1.25rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin-bottom: 1.5rem;
}
.article-tldr h2 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #495057;
  margin: 0 0 0.5rem;
}

/* Author bio panel */
.author-bio-panel {
  background: #f8f9fa;
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin: 2rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.author-bio-panel img {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}

/* Footer */
.site-footer { font-size: 0.875rem; }
.site-footer a { color: #495057; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Premium / paywall */
.paywall-fade {
  position: relative;
  max-height: 12rem;
  overflow: hidden;
}
.paywall-fade::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 6rem;
  background: linear-gradient(to bottom, transparent, #fff);
}
.paywall-cta {
  background: #fff3cd;
  border: 1px solid #ffe69c;
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  margin: 2rem 0;
}

/* Print — clean article view */
@media print {
  .site-header, .site-footer, .skip-link { display: none; }
  .article-body { font-size: 12pt; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 80%; }
}
