/* Intro Narrative — structure and theming.
   Colours, sizes and spacing arrive as custom properties emitted per instance
   by module.html, so this file is instance-agnostic and is served once
   however many times the module appears on a page. */

/* ========================================================== section shell */

.inr {
  position: relative;
  padding: var(--n-pady, 104px) 24px;
  font-family: var(--n-font-body, inherit);
  color: var(--n-body, rgba(250, 250, 250, 0.68));
  box-sizing: border-box;
  overflow: hidden;
}

.inr *,
.inr *::before,
.inr *::after { box-sizing: border-box; }

/* A gradient rule rather than a border: a hard 1px line across a dark
   section reads as a seam between two pages. */
.inr--hairline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--n-max, 1140px), calc(100% - 48px));
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--n-line, rgba(12, 83, 148, 0.62)) 22%,
    var(--n-line, rgba(12, 83, 148, 0.62)) 78%,
    transparent
  );
}

.inr__glow {
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 90%;
  pointer-events: none;
  background:
    radial-gradient(46% 60% at 22% 30%, rgba(var(--n-accent-rgb), 0.14) 0%, transparent 70%),
    radial-gradient(40% 52% at 82% 12%, rgba(var(--n-glow-rgb), 0.1) 0%, transparent 68%);
  filter: blur(8px);
}

.inr__inner {
  position: relative;
  z-index: 1;
  max-width: var(--n-max, 1140px);
  margin: 0 auto;
}

/* ================================================================ layouts */

/* auto rather than a fraction for the card track: the card has an authored
   width and should hold it, letting the prose take the remainder. */
.inr--split .inr__inner,
.inr--split-reverse .inr__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--n-cardw, 330px);
  gap: var(--n-gap, 72px);
  align-items: start;
}

.inr--split-reverse .inr__inner {
  grid-template-columns: var(--n-cardw, 330px) minmax(0, 1fr);
}

.inr--split-reverse .inr__copy { order: 2; }

/* With no card there is no second column to balance. */
.inr--split:not(.inr--has-feature) .inr__inner,
.inr--split-reverse:not(.inr--has-feature) .inr__inner {
  display: block;
}

/* Stacked: the heading spans, then prose and card share the row beneath it. */
.inr--stacked .inr__inner { display: block; }

.inr--stacked.inr--has-feature .inr__copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--n-cardw, 330px);
  gap: 0 var(--n-gap, 72px);
}

.inr--stacked.inr--has-feature .inr__kicker,
.inr--stacked.inr--has-feature .inr__heading { grid-column: 1 / -1; }

.inr--single .inr__inner { display: block; }
.inr--single .inr__feature { margin-top: 44px; max-width: var(--n-cardw, 330px); }

/* =================================================================== copy */

.inr__copy { min-width: 0; }

.inr__kicker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--n-kicker, #1481ff);
}

.inr--rule-bar .inr__kicker::before {
  content: "";
  width: 34px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.inr--rule-dot .inr__kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px 2px rgba(var(--n-accent-rgb), 0.8);
}

.inr--rule-line .inr__kicker::after {
  content: "";
  flex: 0 1 90px;
  height: 1px;
  background: linear-gradient(to right, currentColor, transparent);
  opacity: 0.65;
}

.inr__heading {
  margin: 0 0 26px;
  max-width: 22ch;
  font-family: var(--n-font-head, inherit);
  line-height: 1.14;
  letter-spacing: -0.6px;
  color: var(--n-heading, #fafafa);
  text-wrap: balance;
}

.inr__lede {
  max-width: var(--n-copyw, 66ch);
  margin: 0 0 26px;
  font-size: var(--n-lede-size, 21px);
  line-height: 1.58;
  color: var(--n-lede, rgba(250, 250, 250, 0.92));
}

.inr__lede p { margin: 0 0 0.8em; }
.inr__lede p:last-child { margin-bottom: 0; }

/* initial-letter where it is supported, a float everywhere else. The float
   fallback is deliberately conservative — it only has to not look broken. */
.inr--dropcap .inr__lede > p:first-of-type::first-letter {
  float: left;
  margin: 6px 12px 0 0;
  font-family: var(--n-font-head, inherit);
  font-size: 3.1em;
  line-height: 0.82;
  font-weight: 300;
  color: var(--n-accent, #1550ff);
}

@supports (initial-letter: 3) or (-webkit-initial-letter: 3) {
  .inr--dropcap .inr__lede > p:first-of-type::first-letter {
    float: none;
    margin: 0 10px 0 0;
    font-size: inherit;
    -webkit-initial-letter: 3;
    initial-letter: 3;
  }
}

.inr__body {
  max-width: var(--n-copyw, 66ch);
  font-size: var(--n-body-size, 17px);
  line-height: var(--n-leading, 1.75);
  color: var(--n-body, rgba(250, 250, 250, 0.68));
}

.inr__body p { margin: 0 0 1.15em; }
.inr__body p:last-child { margin-bottom: 0; }

.inr__body em,
.inr__lede em {
  font-style: italic;
  color: var(--n-lede, rgba(250, 250, 250, 0.92));
}

.inr__body strong,
.inr__lede strong {
  font-weight: 500;
  color: var(--n-heading, #fafafa);
}

.inr__body a,
.inr__lede a {
  color: var(--n-accent, #1550ff);
  text-underline-offset: 3px;
}

/* ============================================================= pull quote */

.inr__quote {
  position: relative;
  max-width: var(--n-copyw, 66ch);
  margin: 40px 0 0;
  padding: 4px 0 4px 28px;
  border-left: 2px solid var(--n-accent, #1550ff);
}

.inr__quote blockquote {
  margin: 0;
  font-family: var(--n-font-head, inherit);
  font-size: calc(var(--n-lede-size, 21px) * 1.05);
  font-weight: 300;
  font-style: italic;
  line-height: 1.5;
  color: var(--n-quote, rgba(250, 250, 250, 0.96));
  text-wrap: pretty;
}

.inr__quote-by {
  margin: 14px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--n-kicker, #1481ff);
}

/* =========================================================== feature card */

.inr__feature { min-width: 0; }

.inr__card {
  position: relative;
  padding: 26px;
  border-radius: var(--n-radius, 16px);
  background: var(--n-panel, rgba(6, 18, 41, 0.72));
  border: 1px solid var(--n-line, rgba(12, 83, 148, 0.62));
  color: var(--n-card-ink, #fafafa);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.9);
}

/* Sticky is offset by more than the card's own padding so it clears a fixed
   site header rather than tucking under one. */
.inr--card-sticky .inr__card {
  position: sticky;
  top: 96px;
}

.inr--card-bare .inr__card {
  padding: 0 0 0 26px;
  background: none;
  border: 0;
  border-left: 1px solid var(--n-line, rgba(12, 83, 148, 0.62));
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.inr__card-eyebrow {
  margin: 0 0 18px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--n-kicker, #1481ff);
}

.inr__cover {
  position: relative;
  margin: 0 0 20px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.95);
}

.inr__cover-img {
  display: block;
  width: 100%;
  height: auto;
}

/* Spine: the cover reads as a physical object stood on the card. The
   transform is on the cover only, so the text below it stays flat and
   legible. */
.inr--card-spine .inr__cover {
  transform: perspective(900px) rotateY(-14deg) rotateX(2deg);
  transform-origin: left center;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.inr--card-spine .inr__cover::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 12px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.5), transparent);
}

@media (hover: hover) {
  .inr--card-spine .inr__card:hover .inr__cover {
    transform: perspective(900px) rotateY(-6deg) rotateX(0deg);
  }
}

.inr__card-title {
  margin: 0 0 6px;
  font-family: var(--n-font-head, inherit);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.28;
  color: var(--n-card-ink, #fafafa);
}

.inr__card-byline {
  margin: 0 0 16px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--n-kicker, #1481ff);
}

.inr__card-body {
  font-size: 14.5px;
  line-height: 1.66;
  color: var(--n-body, rgba(250, 250, 250, 0.68));
}

.inr__card-body p { margin: 0 0 0.85em; }
.inr__card-body p:last-child { margin-bottom: 0; }

.inr__card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  color: var(--n-accent, #1550ff);
}

.inr__card-link:focus-visible {
  outline: 2px solid var(--n-accent, #1550ff);
  outline-offset: 3px;
  border-radius: 3px;
}

.inr__card-arrow { transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1); }

@media (hover: hover) {
  .inr__card-link:hover { text-decoration: underline; text-underline-offset: 4px; }
  .inr__card-link:hover .inr__card-arrow { transform: translateX(4px); }
}

/* ================================================================= reveal */

/* The markup holds the finished state; module.js adds inr--armed only once it
   knows it can animate. Without script the section is simply already here. */
.inr--armed .inr__copy > *,
.inr--armed .inr__feature {
  opacity: 0;
  transform: translateY(20px);
}

.inr--armed.inr--in .inr__copy > *,
.inr--armed.inr--in .inr__feature {
  opacity: 1;
  transform: none;
  transition:
    opacity 800ms cubic-bezier(0.22, 1, 0.36, 1) calc(var(--n-i, 0) * var(--n-stagger, 110ms)),
    transform 800ms cubic-bezier(0.22, 1, 0.36, 1) calc(var(--n-i, 0) * var(--n-stagger, 110ms));
}

/* A sticky card cannot be transformed while it sticks — a transform makes it
   the containing block for itself and it stops sticking. So it fades only. */
.inr--card-sticky.inr--armed .inr__feature { transform: none; }

/* ============================================================= responsive */

@media (max-width: 960px) {
  .inr--split .inr__inner,
  .inr--split-reverse .inr__inner,
  .inr--stacked.inr--has-feature .inr__copy {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .inr--split-reverse .inr__copy { order: 0; }

  .inr__feature { max-width: var(--n-cardw, 330px); }

  /* Sticky has nothing left to stick against in one column. */
  .inr--card-sticky .inr__card { position: static; }
}

@media (max-width: 700px) {
  .inr { padding: var(--n-pady-m, 64px) 20px; }

  .inr__heading { max-width: 100%; }
  .inr__feature { max-width: 100%; }

  /* A drop cap on a narrow measure takes a third of the line with it. */
  .inr--dropcap .inr__lede > p:first-of-type::first-letter {
    float: none;
    margin: 0;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    -webkit-initial-letter: normal;
    initial-letter: normal;
  }
}

/* ======================================================== reduced motion */

@media (prefers-reduced-motion: reduce) {
  .inr--card-spine .inr__cover,
  .inr__card-arrow { transition: none; }

  .inr--armed .inr__copy > *,
  .inr--armed .inr__feature {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* The CMS Elevate theme colours every anchor with
   `a:not(.hs-elevate-button, …)`. A :not() carrying a class takes that class's
   specificity, so the theme's rule is (0,1,1) — stronger than a bare button
   class at (0,1,0) — and its link blue was winning over the button ink,
   printing blue text on the magenta fill at about 1.3:1 contrast. Scoping to
   the section root outranks it, and naming the states explicitly covers the
   theme's own :hover/:visited rules, which are more specific again.
   Specificity rather than !important, so a page-level override can still win. */

.inr .inr__card-link,
.inr .inr__card-link:link,
.inr .inr__card-link:visited,
.inr .inr__card-link:hover,
.inr .inr__card-link:focus,
.inr .inr__card-link:active { color: var(--n-accent, #1550ff); }

.inr .inr__body a,
.inr .inr__body a:link,
.inr .inr__body a:visited,
.inr .inr__body a:hover,
.inr .inr__body a:focus,
.inr .inr__body a:active { color: var(--n-accent, #1550ff); }

.inr .inr__lede a,
.inr .inr__lede a:link,
.inr .inr__lede a:visited,
.inr .inr__lede a:hover,
.inr .inr__lede a:focus,
.inr .inr__lede a:active { color: var(--n-accent, #1550ff); }
