/* NAV */
.nav{
  position: sticky; top: 0; z-index: 50;
  height: 88px;
  background: color-mix(in srgb, var(--ink) var(--veil), transparent);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--side);
  border-bottom: 1px solid var(--line-dark);
}
.nav__brand{ display: flex; align-items: center; }
.nav__brand-img{ height: 37px; width: auto; display: block; }
.nav__links{
  display: flex; align-items: center; gap: 32px;
  font-size: 14px; color: var(--paper-soft);
}
.nav__links a{ color: var(--paper-soft); }
.nav__links a:hover{ color: var(--text); }
.nav__toggle{
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 32px; height: 32px; background: none; border: none; cursor: pointer; padding: 0;
}
.nav__toggle span{ display: block; width: 100%; height: 1.5px; background: var(--text); }

/* EDITORIAL HERO — shared by every page's hero: a full-bleed photograph
   with a brand-tinted scrim, text overlaid on the dark side of the image.
   Add class="editorial-hero" to any *-hero section and a first-child
   `.hero-bg` image block; page-specific *-hero classes keep only their own
   padding / max-width, not a background. */
.editorial-hero{
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.editorial-hero .hero-bg{
  position: absolute; inset: 0; z-index: -1;
  background: var(--ink);
}
.editorial-hero .hero-bg img{
  width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block;
  opacity: 0.9;
}
/* Coordinated hero image entrance — slides in from the right while fading
   in. text-reveal.js adds .hero-armed only when motion is allowed, so the
   image already renders at its final state above with no JS or with
   reduced motion (tokens.css also zeroes --hero-img-shift/-duration there
   as a second layer of defense). --hero-img-delay lets multiple heroes on
   one page stagger; today every page has exactly one, so it is always 0s. */
.editorial-hero.hero-armed .hero-bg img{
  opacity: 0;
  transform: translateX(var(--hero-img-shift));
  transition: opacity var(--hero-img-duration) var(--ease), transform var(--hero-img-duration) var(--ease);
  transition-delay: var(--hero-img-delay, 0s);
}
.editorial-hero.hero-armed.is-visible .hero-bg img{
  opacity: 0.9;
  transform: translateX(0);
}
.editorial-hero .hero-bg::after{
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, transparent 70%, var(--ink) 100%),
    radial-gradient(900px 520px at 88% 0%, color-mix(in srgb, var(--glow, var(--turquoise)) 20%, transparent), transparent 62%),
    linear-gradient(100deg, var(--ink) 0%, color-mix(in srgb, var(--ink) 90%, transparent) 34%, color-mix(in srgb, var(--ink) 46%, transparent) 60%, color-mix(in srgb, var(--ink) 14%, transparent) 100%);
}

/* HERO (home) */
.hero{
  --glow: var(--blue); /* Home is the parent-company page — the secondary
    accent marks it apart from IQ/Products/Insights (cyan) and Academy/About
    (violet), a deliberate three-way rotation across the site. */
  padding: 104px var(--side) 96px;
  min-height: 620px;
  display: flex; align-items: center;
}
.hero__copy{ display: flex; flex-direction: column; gap: 28px; max-width: 620px; position: relative; z-index: 1; }
.hero__copy h1{ font-family: var(--font-display); font-weight: 700; font-size: 76px; line-height: 0.98; letter-spacing: -0.01em; color: var(--text); max-width: 760px; text-wrap: balance; }
.hero__lede{ font-size: 19px; line-height: 1.6; color: var(--paper-soft); max-width: 520px; }
.hero__visual{ aspect-ratio: 4/5; }

/* Shared inner text wrapper for every other page's editorial hero — the
   outer *-hero section stays full-bleed (holds the image), this holds and
   constrains the copy. Each page sets its own max-width on it. */
.hero-content{ position: relative; z-index: 1; display: flex; flex-direction: column; gap: 26px; }
.hero-content h1{ font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; color: var(--text); text-wrap: balance; }

/* SECTIONS */
.section{ background: color-mix(in srgb, var(--paper) var(--veil), transparent); padding: var(--section-y) var(--side); display: flex; flex-direction: column; gap: 48px; }
.section--alt{ background: color-mix(in srgb, var(--paper-2) var(--veil), transparent); }
.section--iq{
  background:
    radial-gradient(900px 420px at 85% -40%, color-mix(in srgb, var(--turquoise-dim) 65%, transparent), transparent 64%),
    color-mix(in srgb, var(--paper-2) var(--veil), transparent);
}
.section--dark{ background: color-mix(in srgb, var(--ink) var(--veil), transparent); padding: var(--section-y) var(--side); display: flex; flex-direction: column; gap: 64px; }
.section-head{ display: flex; flex-direction: column; gap: 20px; max-width: 660px; }
.section-head--row{ display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; max-width: none; }
.section-head--row > div{ display: flex; flex-direction: column; gap: 20px; max-width: 660px; }
.section-head--center{ align-items: center; text-align: center; max-width: none; gap: 16px; }
.section h2{ font-size: 40px; line-height: 1.15; }
.section--dark h2{ font-size: 36px; }
.split{ display: grid; grid-template-columns: minmax(0,7fr) minmax(0,5fr); gap: 64px; }
.lede-align-bottom{ align-self: flex-end; color: var(--ink-soft); font-size: 17px; line-height: 1.6; }
.bridge-line{ font-size: 17px; line-height: 1.6; color: var(--text); font-weight: 500; }

/* Diagram (The Shift) */
.diagram-card{ border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 48px; background: color-mix(in srgb, var(--surface) var(--veil-card), transparent); }
.diagram{ width: 100%; height: auto; display: block; overflow: visible; }
.dtext{ font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; fill: var(--ink-soft); }
.dtext--turquoise{ fill: var(--turquoise); }
.dtext--violet{ fill: var(--violet); }
.dlabel{ font-family: var(--font-mono); font-size: 13px; fill: var(--text); }
.dlabel--bold{ font-weight: 700; }
.dlabel--muted{ fill: var(--ink-soft); font-weight: 500; }
.ditalic{ font-family: var(--font-mono); font-size: 12px; font-style: italic; fill: var(--turquoise); }
.dnode{ fill: var(--surface); stroke: var(--text); stroke-width: 1.5; }
.dnode--violet{ stroke: var(--violet); stroke-width: 2; }
.dnode--fill-turquoise{ fill: var(--turquoise); stroke: none; }
.dnode--fill-violet{ fill: var(--violet); stroke: none; }
.dchevron{ fill: none; stroke: var(--ink-soft); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.chips{ display: flex; flex-wrap: wrap; gap: 10px; }

/* Thesis (AI for Quality / Quality for AI) — the site's background pattern
   is otherwise a uniform global veil (see --veil in tokens.css); this one
   section deliberately sits on a near-solid ground instead, since a dense
   two-column diagram reads better without the tiled texture competing under
   it. Do not reuse .thesis-section's higher opacity elsewhere. */
.thesis-section{ background: color-mix(in srgb, var(--ink) 94%, transparent); }

.thesis{ position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.thesis__divider{ position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-dark); display: flex; align-items: center; justify-content: center; }
.thesis__hub{
  width: 232px; padding: 20px 22px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) var(--veil-card), transparent);
  border: 1px solid var(--line-dark);
  box-shadow: 0 0 28px -6px color-mix(in srgb, var(--turquoise) 35%, transparent);
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.thesis__hub-name{ font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: 0.01em; color: var(--text); }
.thesis__hub-tagline{ font-family: var(--font-mono); font-size: 11px; line-height: 1.55; color: var(--paper-soft); }
.thesis__col{ padding: 16px 64px 16px 0; display: flex; flex-direction: column; gap: 20px; }
.thesis__col--right{ padding: 16px 0 16px 64px; align-items: flex-end; text-align: right; }
.thesis__title{ font-size: 22px; line-height: 1.25; }
.thesis__title--turquoise{ color: var(--turquoise); }
.thesis__title--violet{ color: var(--violet); }
.thesis__lede{ font-size: 15px; line-height: 1.6; color: var(--paper-soft); max-width: 420px; }
.thesis__list{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.thesis__list li{
  font-family: var(--font-mono); font-size: 13px; color: var(--paper-soft);
  border: 1px solid var(--line-dark); border-radius: var(--radius-pill); padding: 6px 12px;
}
.thesis__list--right{ justify-content: flex-end; }
.thesis__result{ margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-dark); font-size: 15px; font-weight: 600; max-width: 420px; }
.thesis__result-label{ display: block; font-family: var(--font-mono); font-weight: 400; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
.thesis__col--right .thesis__result{ margin-left: auto; }

/* Product grid */
.products-note{ font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); }
.status-legend{ display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.status-legend__label{ font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }

/* Academy */
.academy-tags{ display: flex; flex-wrap: wrap; gap: 10px; }

/* Insights */
.articles{ display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.insights-note{ font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); }

/* Why Connecture */
.why-grid{ display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; }

/* Final CTA */
.cta{
  background: radial-gradient(800px 420px at 12% 120%, color-mix(in srgb, var(--turquoise-dim) 60%, transparent), transparent 62%), color-mix(in srgb, var(--ink) var(--veil), transparent);
  padding: 140px var(--side); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px;
}
.cta h2{ font-size: 48px; line-height: 1.1; color: var(--text); max-width: 820px; }
.cta__support{ font-size: 17px; line-height: 1.6; color: var(--paper-soft); max-width: 520px; }

/* Footer */
.footer{ background: color-mix(in srgb, var(--ink) var(--veil), transparent); border-top: 1px solid var(--line-dark); padding: 72px var(--side) 40px; display: flex; flex-direction: column; gap: 64px; }
.footer__top{ display: grid; grid-template-columns: minmax(0,4fr) repeat(3, minmax(0,2fr)); gap: 40px; }
.footer__brand{ display: flex; flex-direction: column; gap: 12px; }
.footer__logo{ display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--text); }
.footer__logo-symbol{ height: 34px; width: auto; display: block; }
.footer__logo-img{ height: 33px; width: auto; display: block; }
.footer__col{ display: flex; flex-direction: column; gap: 16px; }
.footer__col-label{ font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.footer__col-links{ display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--paper-soft); }
.footer__col-links a{ color: var(--paper-soft); }
.footer__bottom{ border-top: 1px solid var(--line-dark); padding-top: 24px; display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); }

/* ============ TABLET (~1100px and down) ============ */
@media (max-width: 1100px){
  :root{ --side: 40px; }
  .why-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .articles{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer__top{ grid-template-columns: 1fr 1fr; row-gap: 32px; }

  .hero__copy h1, .hero-content h1{ font-size: 46px; }
  .hero-content{ max-width: 560px !important; }
}

/* ============ MOBILE (~640px and down) ============ */
@media (max-width: 640px){
  :root{ --side: var(--side-mobile); --section-y: var(--section-y-mobile); }

  .nav{ padding: 0 var(--side); height: 64px; }
  .nav__brand-img{ height: 25px; }
  .nav__links{
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--line-dark);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
  }
  .nav__links.is-open{ opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav__links a{ padding: 16px var(--side); width: 100%; border-bottom: 1px solid var(--line-dark); }
  .nav__cta{ display: none; }
  .nav__toggle{ display: flex; }

  /* Editorial heroes: shorter, and the reveal scrim becomes a flat wash so
     text stays legible at any width instead of relying on the diagonal
     reveal tuned for wide desktop images. Hero image entrance also shortens
     and travels less distance — same slide-in-from-right + fade, scaled down. */
  :root{ --hero-img-shift: 22px; --hero-img-duration: 450ms; }
  .editorial-hero{ min-height: 0 !important; }
  .editorial-hero .hero-bg::after{
    background:
      linear-gradient(to bottom, transparent 65%, var(--ink) 100%),
      color-mix(in srgb, var(--ink) 80%, transparent);
  }
  .hero, .iq-hero, .products-hero, .academy-hero, .insights-hero, .about-hero{
    padding: 56px var(--side) 40px;
  }
  .hero__copy, .hero-content{ gap: 20px; max-width: none !important; }
  .hero__copy h1, .hero-content h1{ font-size: 34px; line-height: 1.08; }
  .hero__lede{ font-size: 15px; max-width: none; }

  .section, .section--dark{ padding: var(--section-y) var(--side); gap: 28px; }
  .section h2, .section--dark h2{ font-size: 26px; }
  .split{ grid-template-columns: 1fr; gap: 20px; }
  .lede-align-bottom{ align-self: flex-start; font-size: 15px; }
  .section-head--row{ flex-direction: column; align-items: flex-start; }

  .grid-lines--2, .grid-lines--3, .grid-lines--4, .why-grid, .articles{ grid-template-columns: 1fr; }
  .diagram-card{ padding: 24px 18px; }

  /* Thesis: stack with a horizontal divider + centered badge, not side-by-side */
  .thesis{ grid-template-columns: 1fr; row-gap: 16px; }
  .thesis__divider{
    position: static; width: 100%; height: auto; background: none;
    display: flex; align-items: center; justify-content: center; margin: 8px 0;
  }
  .thesis__hub{ position: relative; width: 100%; max-width: 320px; }
  .thesis__col, .thesis__col--right{ padding: 0; align-items: flex-start; text-align: left; }
  .thesis__list--right{ justify-content: flex-start; }
  .thesis__col--right .thesis__result{ margin-left: 0; }

  /* Insights: horizontal scroll instead of stacking */
  .articles{ display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; }
  .article-card{ flex: 0 0 210px; }

  .cta{ padding: 64px var(--side); gap: 20px; }
  .cta h2{ font-size: 28px; }
  .cta .btn-row{ flex-direction: column; width: 100%; }
  .cta .btn{ width: 100%; min-height: 44px; }

  .footer{ padding: 48px var(--side) 28px; gap: 32px; }
  .footer__top{ grid-template-columns: 1fr; gap: 24px; }
  .footer__bottom{ flex-direction: column; gap: 8px; }
}
