/* Adamas Digital — insight detail page and clickable insight cards.
   Loaded after site.css on every page, but every rule is scoped to markup that
   only the article template and the insight grid produce. */

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
}

/* ---- Clickable insight cards ------------------------------------------
   A stretched overlay rather than wrapping the card in an anchor: the grid
   styles its <article> children directly, so an extra element between them
   would break the layout the reference build defines. */
.insight-grid article { position: relative; }

.insight-cover {
  border-radius: 18px;
  position: absolute;
  inset: 0;
}

.insight-live { transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.insight-live:hover { transform: translateY(-4px); }

.insight-live .insight-art:after {
  content: "";
  background: linear-gradient(180deg, #0d0d0d00 40%, #0d0d0d47 100%);
  border-radius: inherit;
  opacity: 0;
  transition: opacity .35s;
  position: absolute;
  inset: 0;
}

.insight-live:hover .insight-art:after { opacity: 1; }

.insight-live h3 { transition: color .25s; }
.insight-live:hover h3 { color: var(--blue); }

/* ---- Draft preview banner ---------------------------------------------
   Deliberately loud. It sits above a page that looks published, and mistaking
   a preview for the live article is the whole risk. */
.draft-banner {
  z-index: 60;
  color: var(--ink);
  text-align: center;
  background: #ffd84d;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 18px;
  padding: 12px 24px;
  font-family: var(--display);
  font-size: 11px;
  display: flex;
  position: sticky;
  top: 0;
}

.draft-banner span {
  text-transform: uppercase;
  letter-spacing: .14em;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 9px;
  font-weight: 700;
}

.draft-banner p { margin: 0; }
.draft-banner a { text-decoration: underline; font-weight: 600; }

/* A draft card only ever renders for a signed-in admin, so it is marked as
   clearly as the preview banner is — mistaking one for a live article is the
   whole risk of listing them at all. */
.insight-draft .insight-art { opacity: .5; }

.insight-draft > p span {
  background: #ffd84d;
  color: var(--ink);
  border-radius: 999px;
  padding: 2px 9px;
  font-weight: 700;
}

.insight-draft h3 { opacity: .72; }

.draft-banner-inline {
  border-radius: 12px;
  margin-bottom: 34px;
  position: static;
}

/* ---- Article hero ------------------------------------------------------
   Article titles are sentences, not two-word statements, so they need a
   smaller size and a looser line than the marketing headings share. */
.article-hero h1 {
  letter-spacing: -.045em;
  font-size: clamp(38px, 5.4vw, 76px);
  line-height: .98;
}

.article-hero .inner-hero-grid > p {
  max-width: 620px;
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 1.55;
}

/* ---- Body -------------------------------------------------------------- */
.article-body {
  grid-template-columns: minmax(210px, .28fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(32px, 6vw, 90px);
  padding: clamp(70px, 9vw, 130px) clamp(24px, 6vw, 96px);
  display: grid;
}

.article-meta {
  border-top: 1px solid var(--line);
  gap: 26px;
  display: grid;
  position: sticky;
  top: 108px;
  padding-top: 26px;
}

.article-meta span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-family: var(--display);
  font-size: 9px;
  display: block;
}

.article-meta strong {
  margin-top: 6px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  display: block;
}

.article-prose {
  border-top: 1px solid var(--line);
  max-width: 720px;
  padding-top: 26px;
}

.article-prose p {
  margin: 0 0 26px;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.68;
}

/* The opening paragraph carries the reader in, so it is set a size larger. */
.article-prose > p:first-child {
  color: var(--ink);
  font-size: clamp(19px, 1.7vw, 23px);
  line-height: 1.5;
}

.article-prose h2 {
  letter-spacing: -.03em;
  margin: 54px 0 18px;
  font-family: var(--display);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 600;
  line-height: 1.15;
}

.article-prose blockquote {
  border-left: 3px solid var(--blue);
  margin: 38px 0;
  padding: 4px 0 4px 26px;
  font-family: var(--serif);
  font-size: clamp(21px, 2.2vw, 29px);
  font-style: italic;
  line-height: 1.35;
}

.article-empty {
  color: var(--muted);
  font-style: italic;
}

.article-foot {
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 60px;
  padding-top: 34px;
  display: flex;
}

/* ---- Related ----------------------------------------------------------- */
.article-related {
  background: var(--paper);
  padding: clamp(70px, 9vw, 130px) clamp(24px, 6vw, 96px);
}

.article-related .insight-grid { margin-top: 50px; }

.article-missing {
  padding: clamp(70px, 9vw, 130px) clamp(24px, 6vw, 96px);
}

/* ---- Enquiry confirmation ---------------------------------------------- */
.thanks-next {
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
  align-items: start;
  gap: clamp(36px, 6vw, 90px);
  padding: clamp(70px, 9vw, 130px) clamp(24px, 6vw, 96px);
  display: grid;
}

.thanks-steps ol {
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.thanks-steps li {
  border-top: 1px solid var(--line);
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.5;
  display: grid;
}

.thanks-steps li span {
  color: var(--blue);
  font-family: var(--display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .1em;
  padding-top: 5px;
}

.thanks-redirect {
  background: var(--mist);
  border-radius: 18px;
  padding: clamp(24px, 3vw, 34px);
}

.thanks-timer {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.thanks-timer strong {
  color: var(--blue);
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
  font-size: 17px;
}

/* Present but quiet — the escape hatch for the timer, not a call to action
   competing with the button below it. */
.thanks-cancel {
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  margin-top: 10px;
  padding: 0 0 3px;
  font-family: var(--display);
  font-size: 11px;
  transition: color .2s, border-color .2s;
}

.thanks-cancel:hover { color: var(--ink); border-color: var(--ink); }

.thanks-redirect .button-row { margin-top: 22px; }
.thanks-redirect .text-link { margin-top: 18px; }

@media (max-width: 900px) {
  .thanks-next { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  /* The meta rail stops being a rail and becomes a strip above the copy —
     sticky positioning in a single column would park it over the text. */
  .article-body { grid-template-columns: 1fr; }

  .article-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    position: static;
  }
}
