/* ============================================================ */
/* INSTABOOKS — Articles (index + article pages)                 */
/* Builds on main.css.                                           */
/* ============================================================ */

/* ---------- Articles index ---------- */

.articles-hero {
  padding: 64px 0 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.articles-hero .page-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 12px 0;
  color: var(--ink);
}

.articles-hero .page-lede {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
  max-width: 640px;
}

.articles-list {
  background: var(--section);
  padding: 48px 0 96px;
}

.articles-list .container > * {
  max-width: 760px;
}

.article-card {
  border-top: 2px solid var(--ink);
  padding: 28px 0 32px;
}

.article-card + .article-card { margin-top: 8px; }

.article-card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 8px 0;
  color: var(--ink);
}

.article-card h2 a {
  color: inherit;
  transition: color 120ms ease;
}

.article-card h2 a:hover { color: var(--brand-deep); }

.article-meta {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 14px 0;
  letter-spacing: 0.01em;
}

.article-card p.article-teaser {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 16px 0;
}

.article-card .link-arrow {
  color: var(--brand);
  font-weight: 600;
}

.article-card .link-arrow:hover { color: var(--brand-deep); }

/* ---------- Article body ---------- */

.article-hero {
  padding: 56px 0 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.article-hero .breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--muted);
  margin: 0 0 14px 0;
}

.article-hero .breadcrumb a {
  color: var(--brand);
}

.article-hero .breadcrumb a:hover { color: var(--brand-deep); }

.article-hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.2vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 12px 0;
  color: var(--ink);
  max-width: 760px;
}

.article-hero .article-meta {
  margin: 0;
}

.article-body {
  background: var(--section);
  padding: 48px 0 64px;
}

.article-body .container > * {
  max-width: 760px;
}

.article-body p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin: 0 0 18px;
}

.article-body h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.4vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 48px 0 16px;
  color: var(--ink);
  clear: both;
}

.article-body h2:first-child { margin-top: 0; }

.article-body strong { color: var(--ink); font-weight: 600; }

.article-body a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.article-body a:hover { color: var(--brand-deep); }

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--section-2);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink);
}

.article-body figure {
  margin: 28px 0;
}

.article-body figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.article-body figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
}

/* Floating images (used for narrow callouts) */
.article-body figure.float-right {
  float: right;
  width: 280px;
  max-width: 45%;
  margin: 8px 0 20px 28px;
}

.article-body figure.float-left {
  float: left;
  width: 320px;
  max-width: 45%;
  margin: 8px 28px 20px 0;
}

@media (max-width: 720px) {
  .article-body figure.float-right,
  .article-body figure.float-left {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 28px 0;
  }
}

/* ---------- Article CTA card ---------- */

.article-cta {
  background: linear-gradient(155deg, var(--brand-deep) 0%, var(--brand) 100%);
  color: #fff;
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 48px 0 16px;
  box-shadow: var(--shadow-card);
}

.article-cta h2 {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}

.article-cta p {
  color: rgba(255,255,255,0.88);
  margin: 0 0 22px;
  font-size: 1rem;
}

.article-cta .btn {
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.article-cta .btn:hover {
  background: var(--paper);
}

.article-cta .cta-fineprint {
  display: block;
  margin-top: 14px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

/* ---------- Image lightbox ---------- */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(13, 27, 36, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  cursor: zoom-out;
  animation: lightbox-fade-in 140ms ease;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 2.4rem;
  line-height: 1;
  padding: 8px 14px;
  cursor: pointer;
  font-family: var(--font-display);
}

.lightbox-close:hover {
  color: #fff;
}

@keyframes lightbox-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
