/* ============================================================
   PAYAED — INSIGHTS
   Editorial / print-derived layer for the Insights index + the
   long-form article template.

   Consumes tokens from css/style.css :root — never redefines them.
   Works under body[data-theme="light"] (cream bg / ink fg / maroon
   accent) for articles AND under body.page-insights[data-theme="dark"]
   for the index grid.

   Token map (old -> new):
     --hairline   -> --line
     rgba(brick)  -> color-mix(... var(--brick) ...) / var(--accent)
   ============================================================ */

/* ------------------------------------------------------------
   NAV — active page indicator (brick underline)
   ------------------------------------------------------------ */
.nav__links a[aria-current="page"] {
  color: var(--fg);
}
.nav__links a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--accent);
}

/* ------------------------------------------------------------
   PAGE SHELL
   ------------------------------------------------------------ */
.page--insights { padding-top: 9rem; }

/* ============================================================
   INSIGHTS — HERO (index header)
   ============================================================ */
.insights-hero {
  max-width: 78rem;
  margin: 0 auto;
  padding: clamp(2rem, 8vh, 5rem) var(--gutter) clamp(3rem, 7vh, 5rem);
}
.insights-hero__kicker {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.8rem;
}
.insights-hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.012em;
  max-width: 18ch;
}
.insights-hero__title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}
.insights-hero__standfirst {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 46rem;
  margin-top: 2.2rem;
}
.insights-hero__rule {
  height: 1px;
  background: var(--line);
  margin-top: clamp(2.4rem, 6vh, 4rem);
}

/* ============================================================
   INSIGHTS — INDEX HEAD (legacy block, kept for compatibility)
   ============================================================ */
.insights-index__head {
  max-width: 78rem;
  margin: 0 auto;
  padding: 0 var(--gutter) 4rem;
}

/* ============================================================
   INSIGHTS — GRID (3 cards, responsive)
   ============================================================ */
.insights-grid,
.insights-index__list {
  max-width: 78rem;
  margin: 0 auto;
  padding: 0 var(--gutter) var(--section-gap);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line);
}

/* ------------------------------------------------------------
   INSIGHT CARD — hover-lift, brick "Read ->" arrow
   ------------------------------------------------------------ */
.insight-card {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: clamp(2rem, 3vw, 2.8rem) clamp(1.6rem, 2.4vw, 2.2rem);
  text-decoration: none;
  color: var(--fg);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  position: relative;
  isolation: isolate;
  transition: background 0.5s var(--ease), transform 0.5s var(--ease);
}
.insight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--brick) 7%, transparent);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.insight-card:hover,
.insight-card:focus-visible {
  transform: translateY(-4px);
  background: color-mix(in srgb, var(--ink-2) 92%, transparent);
}
body[data-theme="light"] .insight-card:hover,
body[data-theme="light"] .insight-card:focus-visible {
  background: color-mix(in srgb, var(--cream) 70%, var(--bg));
}
.insight-card:hover::before,
.insight-card:focus-visible::before { opacity: 1; }
.insight-card:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}

.insight-card__meta {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}
.insight-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 1.8vw, 1.55rem);
  line-height: 1.24;
}
.insight-card__standfirst {
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--muted);
  flex-grow: 1;
}
.insight-card__more {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
}
.insight-card__arrow {
  display: inline-block;
  transition: transform 0.35s var(--ease);
}
.insight-card:hover .insight-card__arrow,
.insight-card:focus-visible .insight-card__arrow {
  transform: translateX(0.4rem);
}

/* ============================================================
   INSIGHTS — ENGRAVED PASSPORT ASIDE
   A faint, bordered "stamp" block to close the index.
   ============================================================ */
.insights-aside {
  max-width: 78rem;
  margin: 0 auto var(--section-gap);
  padding: 0 var(--gutter);
}
.insights-aside__inner {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(2.4rem, 5vw, 4rem);
  text-align: center;
  background: var(--glass);
  position: relative;
  overflow: hidden;
}
.insights-aside__inner::before,
.insights-aside__inner::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 34rem);
  height: 1px;
  background: var(--line);
}
.insights-aside__inner::before { top: 1.2rem; }
.insights-aside__inner::after { bottom: 1.2rem; }
.insights-aside__mark {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
}
.insights-aside__line {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.4;
  color: var(--fg);
  max-width: 40ch;
  margin-inline: auto;
}

/* ============================================================
   ARTICLE — long-form template
   ============================================================ */
.article {
  max-width: 44rem;
  margin: 0 auto;
  padding: 9rem var(--gutter) var(--section-gap);
}
.article > * { max-width: var(--measure); }

/* ------------------------------------------------------------
   ARTICLE — HERO (kicker + Cormorant H1 + byline + reading time)
   ------------------------------------------------------------ */
.article__hero {
  border-bottom: 1px solid var(--line);
  padding-bottom: 2.6rem;
  margin-bottom: 3rem;
}
.article__kicker {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}
.article__hero .article__title { margin-bottom: 1.6rem; }
.article__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.7rem 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.article__byline strong {
  color: var(--fg);
  font-weight: 500;
}
.article__byline .article__dot {
  color: var(--accent);
  opacity: 0.7;
}
.article__readtime { color: var(--muted); }

/* ------------------------------------------------------------
   ARTICLE — META / TITLE / STANDFIRST / EPIGRAPH
   ------------------------------------------------------------ */
.article__backlink {
  display: inline-block;
  margin-bottom: 3rem;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}
.article__backlink:hover { color: var(--fg); }

.article__meta {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2.2rem;
}
.article__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 5.4vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.008em;
  margin-bottom: 1.6rem;
}
.article__title em {
  font-style: italic;
  color: var(--accent);
}
.article__standfirst {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 2.6rem;
}
.article__epigraph {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0.4rem 0 4rem;
  position: relative;
  padding-top: 1.6rem;
}
.article__epigraph::before {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 2.4rem; height: 2px; background: var(--accent);
}

/* ------------------------------------------------------------
   ARTICLE — SECTION LABELS / SUBLEDE
   ------------------------------------------------------------ */
.article__label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 4rem 0 1.4rem;
}
.article__sublede {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.3;
  margin-bottom: 1.2rem;
}

/* ------------------------------------------------------------
   ARTICLE — BODY COPY
   ------------------------------------------------------------ */
.article p {
  font-size: 0.95rem;
  line-height: 1.95;
  margin-bottom: 1.4rem;
}
.article p.article__muted { color: var(--muted); }

/* large faint Cormorant numeral */
.article__secnum {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2.6rem;
  color: var(--accent);
  opacity: 0.85;
  margin: 4.6rem 0 0.4rem;
  display: block;
  line-height: 1;
}
.article h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.9rem;
  line-height: 1.2;
  margin-bottom: 1.6rem;
}
.article h3 {
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 0.84rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 2.6rem 0 0.9rem;
}

/* italic lead-in */
.article .article__keyline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--muted);
}

/* ------------------------------------------------------------
   ARTICLE — LISTS
   ------------------------------------------------------------ */
.article ul {
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
}
.article ul li {
  font-size: 0.95rem;
  line-height: 1.9;
  padding-left: 1.6rem;
  position: relative;
  margin-bottom: 0.7rem;
}
.article ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.article ul li strong { font-weight: 500; }

/* ------------------------------------------------------------
   ARTICLE — CALLOUT (bordered aside)
   ------------------------------------------------------------ */
.article__callout {
  border: 1px solid var(--line);
  padding: 2.4rem clamp(1.4rem, 4vw, 2.6rem);
  margin: 4rem 0;
  background: var(--glass);
}
.article__callout .article__label { margin-top: 0; }
.article__callout p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------
   ARTICLE — CLOSE / CTA
   ------------------------------------------------------------ */
.article__close {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--fg);
  margin: 3.4rem 0;
}

.article__cta {
  border-top: 1px solid var(--line);
  padding-top: 2.6rem;
  margin-top: 4rem;
}
.article__cta p {
  color: var(--muted);
  font-size: 0.9rem;
}
.article__cta a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  text-decoration: none;
  color: var(--fg);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.15rem;
  transition: color 0.3s var(--ease);
}
.article__cta a:hover { color: var(--accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .insights-grid,
  .insights-index__list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page--insights { padding-top: 7rem; }
  .article { padding-top: 7rem; }
  .insights-hero { padding-top: clamp(1.5rem, 5vh, 3rem); }
}
