/* ============================================================
   VARIATION 1 — Light theme + Apple-style mega-menu nav,
   search, and carousel. Loaded after global.css.
   (No gray background — clean white/light surfaces.)
   ============================================================ */

:root {
  /* Crisper, less-gray text */
  --ink: #1d1d1f;
  --muted: #565d68;
}

/* Slightly darker eyebrow/labels so the page reads less "gray" */
.eyebrow { color: #586070; }
.strip-label { color: #586070; }

/* ============================================================
   NAVBAR — inline menu, always visible
   ============================================================ */
.nav-bar {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  gap: 14px;
}

.nav-menu {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 100%;
  margin-left: auto;
}
.nav-item { display: flex; align-items: center; position: static; }
.nav-link { padding: 8px 13px; font-size: 15px; }

.nav-actions { gap: 8px; }

@media (min-width: 1025px) {
  .nav-bar {
    justify-content: space-between;
    gap: 0;
  }
  .nav-menu, .nav-actions {
    display: contents;
  }
}
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--slate-dark);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }

/* ---------- Mega-menu dropdown ---------- */
.mega {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 28px 46px rgba(20, 30, 45, 0.10);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s;
  z-index: 90;
}
.nav-item.has-mega:hover > .mega,
.nav-item.has-mega:focus-within > .mega { opacity: 1; visibility: visible; transform: none; }

.mega-inner { display: flex; gap: 72px; padding: 38px 0 46px; }
.mega-col h4 {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 16px;
}
.mega-col a {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  padding: 7px 0;
  transition: color 0.15s ease;
  max-width: 320px;
}
.mega-col a:hover { color: #a83bf7; }
/* Every menu reads at one size — the one the Services menu already used. */
.mega-link-lg { font-size: 16px !important; font-weight: 600 !important; letter-spacing: 0; padding: 9px 0 !important; line-height: 1.3; }
.mega-more { color: var(--slate-dark) !important; margin-top: 6px; }

/* ---------- Search bar (revealed below the menu) ---------- */
.nav-search {
  display: none;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.navbar.search-open .nav-search { display: block; }
.search-box { display: flex; align-items: center; gap: 14px; padding: 18px 0; }
.search-icon { color: var(--slate); flex-shrink: 0; }
.search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-body);
  font-size: 22px;
  color: var(--ink);
}
.search-input::placeholder { color: var(--slate-light); }
.search-close {
  border: none; background: transparent;
  color: var(--slate); cursor: pointer;
  padding: 6px; border-radius: 8px; display: flex;
}
.search-close:hover { background: var(--bg-soft); color: var(--ink); }
.search-results { list-style: none; margin: 0; padding: 0 0 18px; }
.search-results a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--ink);
}
.search-results a:hover, .search-results a.active { background: var(--bg-soft); }
.search-results .sr-section { font-size: 12px; color: var(--slate); text-transform: uppercase; letter-spacing: 0.06em; }
.search-results .sr-title { font-family: var(--font-head); font-weight: 600; font-size: 16px; }
.search-empty { padding: 0 12px 18px; color: var(--muted); }

/* ============================================================
   CAROUSEL (light)
   ============================================================ */
.carousel { display: flex; align-items: stretch; gap: 14px; }
.carousel-viewport { overflow: hidden; flex: 1; }
.carousel-track {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 6px 2px;
  transition: transform 0.5s ease;
  will-change: transform;
}
.carousel-slide { flex: 0 0 calc((100% - 48px) / 3); }
.carousel-card {
  height: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.carousel-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--slate-light); }
.carousel-badge {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
}
.carousel-card h3 { font-size: 21px; margin-bottom: 10px; }
.carousel-card p { color: var(--muted); font-size: 15px; }
.carousel-arrow {
  flex-shrink: 0;
  align-self: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--slate-dark);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}
.carousel-arrow:hover { background: var(--gradient); border-color: transparent; color: #fff; transform: scale(1.06); }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.carousel-dots button {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: none; padding: 0;
  background: var(--border);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}
.carousel-dots button.active { width: 26px; border-radius: 999px; background: var(--gradient); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .nav-cta-desktop { display: none; }
  .nav-menu {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 12px 20px 22px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(-12px);
    opacity: 0; visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }
  .navbar.nav-open .nav-menu { opacity: 1; visibility: visible; transform: none; }
  .nav-item { display: block; }
  .nav-link { padding: 13px 6px; font-size: 16px; }
  .nav-link::after { display: none; }
  .mega { display: none; }
}
@media (max-width: 960px) {
  .carousel-slide { flex-basis: calc((100% - 24px) / 2); }
}
@media (max-width: 640px) {
  .carousel-slide { flex-basis: 100%; }
  .carousel-arrow { width: 40px; height: 40px; }
  .search-input { font-size: 18px; }
}

/* ============================================================
   CARDS v2 — icon-prefixed titles, richer body content,
   menu-driven highlight state.
   ============================================================ */

/* The <defs> carrier for the shared icon gradient (Layout.astro). */
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Icon prefixed before every card title (todo 5) ---------- */
.card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.card-head h3 { margin-bottom: 0; }
.card-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.card-icon .icon-svg { display: block; }
[dir="rtl"] .card-head { flex-direction: row; }

/* ============================================================
   FLAT CARD CAROUSEL — Solutions & Services
   One card fills the window and the track slides sideways, so
   a long card set reads as one screen instead of many rows.
   ============================================================ */
.deck-content { padding-bottom: 72px; }
/* The carousel gets a wider container than the rest of the page so the cards
   can be wide enough to keep the copy from stacking up vertically. */
.deck-content > .container { max-width: 1120px; }
.deck { position: relative; }
.deck-viewport { position: relative; }

/* The window clips the track. The inline padding leaves room for the card
   shadow, and is pulled back out so the card still lines up with the
   container edge. */
.deck-window {
  overflow: hidden;
  padding: 6px 14px;
  margin: -6px -14px;
}

.deck-track {
  display: flex;
  align-items: stretch;
  column-gap: 28px;
  /* Every card takes the height of the tallest, so the section never
     resizes as you move between them. */
  align-items: stretch;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
  touch-action: pan-y;
}
/* Before the script runs, show the first card and hide the rest rather than
   letting all fourteen render in a row. */
.deck:not(.deck-ready) .deck-slide + .deck-slide { visibility: hidden; }

.deck-slide { flex: 0 0 100%; min-width: 0; display: flex; }

.deck-slide .card {
  flex: 1;
  padding: 0;
}

/* The card is a title rail beside a content column. Without this the copy
   ran the full 1100px — 150 characters a line — and every card was a slab
   of white with the text clinging to the top-left. */
.card-split {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  align-items: stretch;
}
.card-aside {
  padding: 42px 34px 42px 40px;
  background: linear-gradient(170deg, #FBFCFE 0%, #F5F7FB 100%);
  border-right: 1px solid var(--border);
  border-radius: var(--radius) 0 0 var(--radius);
}
[dir="rtl"] .card-aside {
  border-right: none;
  border-left: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.card-aside h3 {
  margin: 18px 0 0;
  font-size: 25px !important;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.card-aside .card-tagline {
  margin: 12px 0 0;
  font-size: 15px !important;
  line-height: 1.45;
  color: var(--slate);
}
/* A short gradient rule ties the rail to the brand without another box. */
.card-aside::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  border-radius: 3px;
  margin-top: 20px;
  background: var(--gradient);
}
.card-body {
  padding: 42px 44px;
  min-width: 0;
}
.deck-slide .card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}
.deck-slide.is-active .card { box-shadow: var(--shadow-lg); }

/* A wide card leaves room to run a long list in columns, which is what
   actually keeps the carousel short. */
/* `.card-list` is a grid, and multicol does not apply to grid containers —
   the split variants have to go back to block flow. */
.deck-slide .card-list.card-list-split,
.deck-slide .card-list.card-list-split-3 { display: block; }
.deck-slide .card-list.card-list-split { columns: 2; column-gap: 44px; }
.deck-slide .card-list.card-list-split-3 { columns: 3; column-gap: 36px; }
.deck-slide .card-list-split li,
.deck-slide .card-list-split-3 li { break-inside: avoid; margin-bottom: 8px; }

@media (max-width: 900px) {
  .deck-slide .card-list.card-list-split,
  .deck-slide .card-list.card-list-split-3 { columns: 2; }
}
@media (max-width: 640px) {
  .deck-slide .card-list.card-list-split,
  .deck-slide .card-list.card-list-split-3 { columns: 1; }
}
.deck-slide .card h3 { font-size: 22px; line-height: 1.2; }

/* A "A + B + C" line that the source document sets apart from the body copy. */
.blocks > * + * { margin-top: 14px; }
.blocks > p {
  font-size: 17px !important;
  line-height: 1.58;
  color: var(--slate-dark);
}
/* The opening line carries the card, so it gets the weight. */
.blocks > p:first-child {
  font-size: 19px !important;
  line-height: 1.5;
  color: var(--ink);
}
.blocks > p strong { color: var(--ink); font-weight: 700; }
/* A line ending in a colon introduces whatever follows — pull them together
   so the pair reads as one unit instead of two stranded paragraphs. */
.blocks > p:has(+ ul),
.blocks > p:has(+ ol) { margin-bottom: -2px; }
.blocks > .card-list + p,
.blocks > .card-chips + p,
.blocks > .card-flow + p,
.blocks > .card-steps + p { margin-top: 20px; }

.card-highlight {
  position: relative;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px !important;
  line-height: 1.55;
  color: var(--ink);
  background: linear-gradient(135deg, rgba(45, 127, 249, 0.07) 0%, rgba(168, 59, 247, 0.07) 55%, rgba(255, 59, 139, 0.05) 100%);
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 12px;
  padding: 15px 20px 15px 24px;
  margin: 0;
}
.card-highlight::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--gradient);
}
/* When it follows the sentence that introduces it, it belongs tight under
   that line rather than floating above the next block. */
.card-highlight + .card-note { margin-top: 16px; }

/* Named stages. Laid out as one timeline down the column rather than a grid
   of boxes: five boxes wrapped 3-then-2 and left a hole, and each box was too
   narrow to hold its chain without stacking one chip per line. */
.card-stages {
  position: relative;
  margin: 18px 0 0;
  padding-inline-start: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.card-stages::before {
  content: "";
  position: absolute;
  inset-inline-start: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, #2D7FF9 0%, #A83BF7 55%, #FF3B8B 100%);
  opacity: 0.55;
}
.card-stage { position: relative; }
.card-stage::before {
  content: "";
  position: absolute;
  inset-inline-start: -28px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #A83BF7;
}
.card-stage h4 {
  margin: 0;
  font-family: var(--font-head);
  font-size: 16px;
  line-height: 1.3;
  color: var(--ink);
}
.card-stage p {
  margin: 5px 0 0;
  font-size: 15px !important;
  line-height: 1.5;
  color: var(--slate-dark);
}
.card-stage .card-flow { margin-top: 10px; gap: 7px; }
.card-stage .card-flow li { font-size: 13px !important; padding: 5px 12px; gap: 8px; }

.deck-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
}
.deck-arrow-prev { left: -22px; }
.deck-arrow-next { right: -22px; }
[dir="rtl"] .deck-arrow-prev { left: auto; right: -22px; }
[dir="rtl"] .deck-arrow-next { right: auto; left: -22px; }
.deck-arrow:hover { transform: translateY(-50%) scale(1.06); }
.deck-arrow:disabled {
  opacity: 0.32;
  cursor: default;
  transform: translateY(-50%);
}

.deck-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}
.deck-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.deck-dots button {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: none; padding: 0;
  background: var(--border);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}
.deck-dots button:hover { background: var(--slate-light); }
.deck-dots button.active { width: 26px; border-radius: 999px; background: var(--gradient); }
.deck-counter {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--slate);
  white-space: nowrap;
}

/* Card body type is 18px throughout (todo 6). */
.card p,
.card li { font-size: 18px; line-height: 1.45; }

.card-tagline {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px !important;
  letter-spacing: -0.01em;
  color: var(--slate-dark);
  margin-bottom: 8px;
}
.card-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.card-list li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
}
.card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient);
}
[dir="rtl"] .card-list li { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .card-list li::before { left: auto; right: 0; }

/* The documents' numbered lists ("1. Applied Scientific Innovation — …").
   The marker is real list numbering, so the copy never carries "1." itself. */
.card-numbered {
  list-style: none;
  counter-reset: cardnum;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.card-numbered li {
  counter-increment: cardnum;
  position: relative;
  padding-inline-start: 38px;
  font-size: 16px !important;
  line-height: 1.55;
  color: var(--slate-dark);
}
.card-numbered li::before {
  content: counter(cardnum);
  position: absolute;
  inset-inline-start: 0;
  top: 1px;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3658F5 0%, #A83BF7 100%);
}
.card-numbered li strong { color: var(--ink); }

/* Pipeline chains. The connector sits INSIDE each pill: floating it in the
   gap left arrows stranded in white space and dangling at line ends. */
.card-flow {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card-flow li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-head);
  font-size: 14px !important;
  font-weight: 600;
  color: var(--ink);
  background: #F3F5FA;
  border: 1px solid #E0E5EF;
  border-radius: 999px;
  padding: 7px 14px;
}
.card-flow li:not(:last-child)::after {
  content: "\2192";
  color: #94A3B8;
  font-weight: 400;
  margin-inline-end: -2px;
}
[dir="rtl"] .card-flow li:not(:last-child)::after { content: "\2190"; }

/* Ordered pipelines. Numbered pills that wrap, rather than a vertical
   timeline: eight stacked steps set the height for every card in the
   carousel. The number carries the sequence, so a line break mid-chain
   can't be misread the way a dangling arrow would be. */
.card-steps {
  list-style: none;
  counter-reset: step;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card-steps li {
  counter-increment: step;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-head);
  font-size: 14px !important;
  font-weight: 600;
  color: var(--ink);
  background: #F3F5FA;
  border: 1px solid #E0E5EF;
  border-radius: 999px;
  padding: 5px 15px 5px 5px;
}
.card-steps li::before {
  content: counter(step);
  flex: none;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3658F5 0%, #A83BF7 100%);
}

/* Short list entries render as wrapping chips — several per row instead of
   one bullet per line, which is what keeps the deck short. */
.card-chips {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card-chips li {
  font-family: var(--font-head);
  font-size: 14px !important;
  font-weight: 600;
  color: var(--ink);
  background: #F3F5FA;
  border: 1px solid #E0E5EF;
  border-radius: 999px;
  padding: 7px 14px;
}

.card-note {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 17px !important;
  line-height: 1.45;
}

/* ---------- Highlight the card a menu entry points at (todo 9) ---------- */
.card { position: relative; }
.card.is-highlighted {
  border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, var(--gradient) border-box;
  transform: translateY(-8px);
  z-index: 4;
  box-shadow:
    0 22px 48px rgba(45, 127, 249, 0.22),
    0 10px 26px rgba(168, 59, 247, 0.20),
    0 4px 12px rgba(255, 59, 139, 0.14),
    var(--shadow-lg);
  animation: card-pop 0.55s ease;
}
.card.is-highlighted:focus-visible,
.card.is-highlighted:focus { outline: none; }
@keyframes card-pop {
  0% { transform: translateY(0) scale(1); }
  55% { transform: translateY(-12px) scale(1.015); }
  100% { transform: translateY(-8px) scale(1); }
}

/* ---------- Overlay copy on the section images (todo 2) ---------- */
.split-top-bg .split-intro {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 10px auto 30px;
  /* Centred multi-line paragraphs are hard to track back to; the ragged
     left edge was the main reason this block read as dense and unfinished. */
  text-align: start;
  padding: 30px 36px;
  border-radius: 18px;
  background: rgba(8, 13, 24, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.split-intro-title {
  color: #ffffff;
  font-size: 26px;
  margin-bottom: 12px;
}
/* The intro sits on a dark image overlay, so its blocks take a
   light-on-dark palette rather than the card palette. */
.split-intro-blocks > p {
  color: #CBD5E1 !important;
  font-size: 16px !important;
  line-height: 1.5;
  margin-top: 10px;
}
.split-intro-blocks > p:first-child {
  color: #E2E8F0 !important;
  font-size: 18px !important;
  line-height: 1.45;
  margin-top: 0;
}
.split-intro-blocks > .card-highlight {
  margin: 16px 0;
  padding: 14px 18px;
  background: rgba(56, 189, 248, 0.10);
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 12px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px !important;
  line-height: 1.6;
  color: #BAE6FD !important;
}
.split-intro-blocks > .card-highlight::before {
  top: 10px;
  bottom: 10px;
  opacity: 0.9;
}
.card-highlight::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--gradient);
}
.split-intro-blocks > p strong { color: #FFFFFF; font-weight: 700; }

/* ---------- Mega menu: single column list (todo 1) ---------- */
.mega-col-full { flex: 1 1 100%; }
.mega-col-full .mega-list {
  columns: 3;
  column-gap: 56px;
}
.mega-col-full .mega-link-lg {
  max-width: none;
  break-inside: avoid;
}

/* ---------- Partners (todo 10) ---------- */
.partners-head {
  max-width: 760px;
  margin: 0 auto 44px;
  text-align: center;
}
.carousel-single .carousel-slide { flex: 0 0 100%; }
.carousel-single .carousel-card { padding: 40px 44px; }
.partner-card h3 { font-size: 24px; }
.partner-card p { font-size: 18px; }

/* ---------- Contact form validation (todo 11) ---------- */
.field input.invalid,
.field select.invalid,
.field textarea.invalid {
  border-color: #E11D48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}
.form-error {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(225, 29, 72, 0.07);
  border: 1px solid rgba(225, 29, 72, 0.3);
  color: #B91C1C;
  font-size: 15px;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .mega-col-full .mega-list { columns: 2; }
}
@media (max-width: 1024px) {
  .card-split { grid-template-columns: 248px minmax(0, 1fr); }
  .card-aside { padding: 34px 26px 34px 30px; }
  .card-body { padding: 34px 32px; }
  .card-aside h3 { font-size: 22px !important; }
}
@media (max-width: 900px) {
  .split-top-bg .split-intro { padding: 22px 20px; }
  /* The title rail becomes a header band once there is no room beside it. */
  .card-split { grid-template-columns: minmax(0, 1fr); }
  .card-aside {
    padding: 28px 30px 22px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
  }
  [dir="rtl"] .card-aside {
    border-left: none;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .card-aside::after { margin-top: 16px; }
  .card-body { padding: 28px 30px 32px; }
}
@media (max-width: 1160px) {
  /* Not enough container gutter left for the arrows to hang outside, so
     inset the window and let them sit in the space that frees up. */
  .deck-viewport { padding-inline: 52px; }
  .deck-arrow-prev { left: 0; }
  .deck-arrow-next { right: 0; }
  [dir="rtl"] .deck-arrow-prev { left: auto; right: 0; }
  [dir="rtl"] .deck-arrow-next { right: auto; left: 0; }
}
@media (max-width: 640px) {
  /* On a phone the arrows would cost more width than they are worth —
     swiping and the dots carry the navigation instead. */
  .deck-viewport { padding-inline: 0; }
  .deck-arrow { display: none; }
}
@media (max-width: 760px) {
  .deck-footer { flex-direction: column-reverse; gap: 14px; }
  .card-stages { padding-inline-start: 24px; }
}
@media (max-width: 560px) {
  .card-head { gap: 11px; }
  .card-icon { width: 40px; height: 40px; border-radius: 11px; }
  .deck-slide .card-icon { width: 44px; height: 44px; border-radius: 12px; }
  .card-aside { padding: 22px 20px 18px; }
  .card-body { padding: 22px 20px 26px; }
  .deck-slide .card h3 { font-size: 20px !important; }
  .blocks > p { font-size: 16px !important; }
  .blocks > p:first-child { font-size: 17px !important; }
  .carousel-single .carousel-card { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .card.is-highlighted { animation: none; }
  .deck-track { transition: none; }
}

/* Card body copy sits at 18px in the carousel and pillar cards too (todo 6). */
.carousel-card p { font-size: 18px; line-height: 1.45; }
.carousel-card .carousel-badge { font-size: 24px; margin-bottom: 10px; }
.pillar p { font-size: 18px; line-height: 1.45; }
.pillar .card-head { margin-bottom: 10px; }

/* ============================================================
   RESEARCH — flagship series card + published papers
   ============================================================ */
.research-series { margin-bottom: 56px; }
/* The rail title is the card's heading and is sized on the h3 step the rest
   of the page uses (.pillar 22, .carousel-card 21, .papers-heading 20). */
.research-series .card-aside h3 {
  font-family: var(--font-head);
  font-size: 21px !important;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 18px 0 0;
}
/* Everything below it is one uniform run of body type. */
.research-series .card-aside .card-tagline,
.research-series .card-body .blocks > p {
  font-family: var(--font-body);
  font-size: 18px !important;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
  margin-top: 0;
}
.research-series .card-aside .card-tagline { margin: 12px 0 0; color: var(--muted); }
.research-series .card-body .blocks > p + p { margin-top: 16px; }
/* The title carries the link to the series (the separate call to action is gone). */
.research-series .card-aside h3 a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(45, 127, 249, 0.4);
  text-underline-offset: 4px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.research-series .card-aside h3 a:hover {
  color: #a83bf7;
  text-decoration-color: currentColor;
}

.papers-heading {
  font-family: var(--font-head);
  font-size: 20px;
  color: var(--ink);
  margin: 0 0 6px;
  text-align: center;
}
.papers-heading + .papers-list { margin-top: 22px; }

/* Twenty-nine entries: numbered, and in columns so the list doesn't become
   a single scroll of its own. */
.papers-list {
  list-style: none;
  counter-reset: paper;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 46px;
}
.paper {
  counter-increment: paper;
  break-inside: avoid;
  position: relative;
  padding: 0 0 18px 34px;
}
.paper::before {
  content: counter(paper);
  position: absolute;
  inset-inline-start: 0;
  top: 2px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  color: var(--slate-light);
  font-variant-numeric: tabular-nums;
}
.paper-title {
  margin: 0;
  font-size: 18px !important;
  line-height: 1.4;
  color: var(--ink);
  font-weight: 600;
}
.paper-credit {
  margin: 5px 0 0;
  font-size: 18px !important;
  line-height: 1.45;
  color: var(--slate);
}
.paper-title a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(45, 127, 249, 0.35);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.paper-title a:hover {
  color: #a83bf7;
  text-decoration-color: currentColor;
}
@media (max-width: 900px) { .papers-list { columns: 1; } }

/* ============================================================
   NEWS — one featured story above the grid
   ============================================================ */
.news-featured {
  position: relative;
  background: linear-gradient(135deg, #10182B 0%, #1B1233 55%, #2A1430 100%);
  border-radius: var(--radius);
  padding: 42px 46px;
  margin-bottom: 34px;
  overflow: hidden;
}
.news-featured::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient);
}
.news-featured-body { max-width: 760px; }
.news-featured h3 {
  margin: 14px 0 0;
  font-size: 30px;
  line-height: 1.18;
  color: #fff;
}
.news-featured-summary {
  margin: 14px 0 0;
  font-size: 17px !important;
  line-height: 1.55;
  color: #CBD5E1;
}
.news-featured .news-category {
  margin: 16px 0 0;
  color: #7DD3FC;
}
.news-featured .news-date { color: #94A3B8; }
.news-featured .research-link { margin-top: 20px; color: #fff; }

.news-featured-tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--gradient);
  border-radius: 999px;
  padding: 5px 12px;
}
.news-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0;
}
.news-category {
  font-family: var(--font-head);
  font-size: 12px !important;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6D5AE6;
  margin: 0;
}
.news-card .news-date { font-size: 13px; }
.news-card h3 { margin-top: 10px; }

/* ============================================================
   PARTNERS — intro copy and the closing call to action
   ============================================================ */
/* The image carries only the heading and the intro paragraph; the focus
   areas, carousel and call to action sit below it on the page background,
   like the cards in the other sections. */
.partners-bg {
  min-height: 0;
  justify-content: center;
  padding-top: 88px;
  padding-bottom: 40px;
}
.partners-content { position: relative; z-index: 2; }
.partners-intro { margin-bottom: 30px; }
.partners-focus {
  margin: 0 0 32px;
  text-align: center;
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}

.partner-card { position: relative; }
.partner-index {
  position: absolute;
  top: 22px;
  inset-inline-end: 26px;
  font-family: var(--font-head);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: var(--border);
}
.partners-closing {
  max-width: 720px;
  margin: 40px auto 0;
  text-align: center;
}
.partners-closing p {
  font-size: 18px !important;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 20px;
}

/* ============================================================
   Blocks on a dark image overlay.
   The card palette is authored for white cards, and several of its rules
   (`.blocks > p strong`, `.card-numbered li`, …) out-specify a bare
   `.split-intro-blocks` override — which silently rendered dark ink on a
   dark panel. Everything the overlay can contain is re-stated here, at
   matching specificity, so a new block type can't reintroduce the bug.
   ============================================================ */
.split-intro-blocks > p,
.split-intro-blocks > .card-numbered li,
.split-intro-blocks > .card-list li { color: #CBD5E1 !important; }

.split-intro-blocks > p strong,
.split-intro-blocks > .card-numbered li strong,
.split-intro-blocks > .card-list li strong { color: #FFFFFF !important; }

.split-intro-blocks > .card-numbered { gap: 10px; }
.split-intro-blocks > .card-numbered li { font-size: 15px !important; }
.split-intro-blocks > .card-numbered li::before {
  background: rgba(125, 211, 252, 0.16);
  color: #BAE6FD;
  border: 1px solid rgba(125, 211, 252, 0.3);
}

.split-intro-blocks > .card-steps li::before {
  background: rgba(125, 211, 252, 0.18);
  color: #BAE6FD;
}
.split-intro-blocks > .card-chips li,
.split-intro-blocks > .card-flow li,
.split-intro-blocks > .card-steps li {
  color: #E2E8F0 !important;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}
.split-intro-blocks > .card-note {
  color: #94A3B8 !important;
  border-top-color: rgba(255, 255, 255, 0.14);
}

.news-featured-heading {
  font-family: var(--font-head);
  font-size: 20px;
  color: var(--ink);
  margin: 0 0 16px;
}
