/* --------------------------------------------------------------------------
   Engineering Data for Digital Twins — page-specific blocks.

   Reuses the shared section components (ls-section, section-challenges,
   section-narrative-split, about-project-stages, ls-reasons, flow cards).
   Only the archive-to-output strip, the traceability card/chain and the
   muted band helpers live here.
   -------------------------------------------------------------------------- */

/* Muted band, used to separate white sections without a full dark block. */
.dt-section--muted {
  background: var(--secondary-bg);
}

/* Helper for notes that follow a shared grid/tabs component. */
.dt-notes {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
  max-width: 900px;
  margin: var(--spacing-32) auto 0;
}

.dt-notes--center {
  display: block;
  margin-top: var(--spacing-32);
  text-align: center;
}

/* The industries note sits on a warm tinted panel. */
#industries .dt-notes--center {
  padding: var(--spacing-24) var(--spacing-32);
  border-radius: 16px;
  background: color-mix(in srgb, var(--color-brand-terracotta-50) 55%, #fff);
}

/* The hero stat band carries a fourth, text-only summary card. */
#intro-section .section-description__number-wrapper {
  max-width: 1200px;
}

.section-description__item--summary .section-description__summary-title {
  margin-bottom: var(--spacing-8);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.35;
  font-weight: var(--font-weight-600);
  color: var(--white-text);
}

/* Why-reconstruction sits on the secondary band. The callout already uses
   --secondary-bg, so it flips to white to stay readable as a frame. */
#why-reconstruction {
  background: var(--secondary-bg);
}

#why-reconstruction .section-narrative-split__callout {
  background: #fff;
}

/* Scope: the deliverables list moves into the left column under the intro; the
   engineering-review paragraph follows the callout in the right column. */
#scope .section-narrative-split__header .section-narrative-split__body {
  width: 100%;
}

#scope .section-narrative-split__body > .section-narrative-split__intro {
  margin: var(--spacing-24) 0 0;
}

/* Scope: the deliverables use large bare checkmarks, not the dot bullets. */
#scope .section-narrative-split__body ul li {
  padding-left: 30px;
}

#scope .section-narrative-split__body ul li::before {
  top: 0.12em;
  width: 20px;
  height: 20px;
  border-radius: 0;
  background: none;
  box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23AB3D11' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
}

/* Scope: wider text column on the left, narrower right column pinned to the
   right edge of its track on desktop. */
@media (min-width: 981px) {
  #scope .section-narrative-split__inner {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }

  #scope .section-narrative-split__inner > .section-narrative-split__body {
    max-width: 510px;
    margin-left: auto;
  }
}

/* Industries: break before the accent phrase so it lands on the second line. */
@media (min-width: 981px) {
  #industries .ls-section__title span {
    display: block;
  }
}

/* EDI foundation: split section on the secondary band, with the capability in
   a rounded inset (white, so it still reads as a card on the tinted band). */
#edi-foundation {
  background: var(--secondary-bg);
}

/* Break before the accent phrase so it lands on the second line. The phrase
   fits the column by a hair, so nowrap keeps it from wrapping on rounding. */
@media (min-width: 981px) {
  /* The heading borrows a little of the column gap so the first line
     ("From engineering documents") fits and the phrase starts line two. */
  #edi-foundation .ls-section__title {
    margin-right: calc(-1 * var(--spacing-40));
  }

  #edi-foundation .ls-section__title span {
    display: block;
    white-space: nowrap;
  }
}

/* Narrower desktops get a slightly smaller title so both lines still fit. */
@media (min-width: 981px) and (max-width: 1439px) {
  #edi-foundation .ls-section__title {
    font-size: clamp(28px, 2.6vw, 38px);
  }
}

.dt-edi-inset {
  margin-top: var(--spacing-24);
  background: #fff;
}

/* Workflow: align the big index number to the card bottom, as on the case pages. */
#workflow .section-challenges__index {
  top: auto;
  bottom: var(--spacing-8);
  transform: none;
}

/* Workflow: keep the card grid narrower than the container and centred on
   desktop, so the five steps read as a block under the intro. */
@media (min-width: 993px) {
  #workflow .section-challenges__body {
    max-width: 1100px;
    margin-inline: auto;
  }
}

/* Workflow: the lead-in to the five steps reads as a terracotta subtitle. */
#workflow .section-challenges__intro-lead {
  margin-top: var(--spacing-16);
  font-family: var(--font-display);
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: var(--font-weight-600);
  line-height: 1.35;
  color: var(--color-brand-terracotta);
}

/* --------------------------------------------------------------------------
   Traceability
   -------------------------------------------------------------------------- */
.dt-trace {
  position: relative;
  overflow: hidden;
  background: var(--color-brand-navy);
}

/* Geometric artwork pinned bottom-left, same treatment as #the-problem on the
   EDI page: about-bg.svg is drawn on the same #060B1A, so only its shapes show. */
.dt-trace::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/about-bg.7be2890657ad.svg");
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: auto;
  pointer-events: none;
  z-index: 0;
}

.dt-trace .container {
  position: relative;
  z-index: 1;
}

@media screen and (max-width: 1200px) {
  .dt-trace::before {
    background-size: 100% auto;
    background-position: 30% 100%;
  }
}

@media (max-width: 760px) {
  .dt-trace::before {
    display: none;
  }
}

.dt-trace .ls-section__title {
  color: var(--white-text);
}

/* On the dark band the accent phrase is orange, not terracotta. */
.dt-trace .ls-section__title span {
  color: var(--accent-orange);
}

.dt-trace .ls-section__lead {
  color: rgba(255, 255, 255, 0.8);
}

/* The example line and the record itself read as an accent subtitle; orange
   instead of terracotta because the band is dark. */
.dt-trace .dt-trace__subtitle {
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: var(--font-weight-600);
  color: var(--accent-orange);
}

.dt-trace__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.dt-trace__column {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-32);
  min-width: 0;
}

/* Only the left (text) column is capped; the right one keeps its full track. */
.dt-trace__column:first-child {
  max-width: 510px;
}

.dt-trace__intro .ls-section__title {
  margin-bottom: var(--spacing-24);
}

.dt-trace__intro .ls-section__lead + .ls-section__lead,
.dt-trace__notes .ls-section__lead + .ls-section__lead {
  margin-top: var(--spacing-16);
}

.dt-trace__card {
  padding: clamp(24px, 3vw, 36px);
  background: #0d1326;
  border: 1px solid color-mix(in srgb, var(--color-brand-teal) 20%, transparent);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.dt-trace__record {
  margin: 0 0 var(--spacing-16);
  font-family: var(--font-heading, var(--font-body));
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.35;
  font-weight: var(--font-weight-600);
  color: var(--white-text);
}

.dt-trace__hint {
  margin: 0;
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
}

.dt-trace__notes {
  max-width: 900px;
}

.dt-chain {
  padding: clamp(20px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

.dt-chain__label {
  display: block;
  margin-bottom: var(--spacing-16);
  font-size: clamp(15px, 1.6vw, 17px);
  font-weight: var(--font-weight-600);
  color: var(--white-text);
}

.dt-chain__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-8) 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dt-chain__item {
  position: relative;
  padding-right: 30px;
  font-size: clamp(13px, 1.4vw, 15px);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.8);
}

.dt-chain__item::after {
  content: "\2192";
  position: absolute;
  right: 10px;
  color: var(--color-brand-terracotta-300);
}

.dt-chain__item:last-child {
  padding-right: 0;
}

.dt-chain__item:last-child::after {
  content: none;
}

/* Platforms: break before the accent phrase so the question lands on the
   second line as a whole instead of splitting mid-phrase. */
@media (min-width: 981px) {
  #platforms .about-project-stages__title span {
    display: block;
  }
}

/* Tabs block (platforms): icon sizing follows the shared EDI pattern. */
#platforms .about-project-stages__subtitle {
  max-width: 1100px;
  margin: var(--spacing-40) auto var(--spacing-24);
  text-align: left;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.4vw, 22px);
  font-weight: var(--font-weight-600);
  line-height: 1.3;
  color: var(--color-brand-terracotta);
}

#platforms .llm-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-bottom: var(--spacing-16);
  border-radius: 12px;
  background: rgba(171, 61, 17, 0.08);
  color: var(--color-brand-terracotta);
}

#platforms .llm-card__icon svg {
  width: 22px;
  height: 22px;
}

/* Linked card titles in the industries / capabilities grids: links are teal,
   teal-300 on hover/focus. */
.ls-reasons__title a {
  color: var(--color-brand-teal);
  text-decoration: none;
  transition: color 0.25s ease;
}

.ls-reasons__title a:hover,
.ls-reasons__title a:focus-visible {
  color: var(--color-brand-teal-300);
}

/* The FAQ component ships with section--flush-top; this page needs room above
   and below, and a white band of its own. */
#faq.section-faq {
  padding-top: var(--spacing-80) !important;
  padding-bottom: var(--spacing-80) !important;
  background: #fff;
}

/* The video demo takes the secondary band so the closing sections alternate:
   navy (why-azati) → mist (video) → white (FAQ) → case studies. */
#pid-agent-demo.video-agent {
  background: var(--secondary-bg);
}

/* Case studies: the shared block carries no section padding of its own. */
#dt-case-studies {
  padding-top: var(--spacing-80);
  padding-bottom: var(--spacing-80);
}

/* Why Azati: the four reasons are cards on the dark band; four across on wide
   desktops, two below that (the shared --four variant covers the rest). */
@media (max-width: 1199px) {
  #why-azati .ls-build__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  #why-azati .ls-build__grid {
    grid-template-columns: 1fr;
  }
}

/* First phase: the lead-in over the step list is terracotta. */
#first-phase .section-flow-cards__timeline-lead {
  color: var(--color-brand-terracotta);
}

/* First phase: narrow intro on the left, the step list on the wider right. */
@media (min-width: 1025px) {
  #first-phase .section-flow-cards__grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }

  #first-phase .section-flow-cards__cta {
    max-width: 510px;
  }
}

/* Inline links in the industries note use the same link colours. */
#industries .dt-notes a {
  color: var(--color-brand-teal);
  text-decoration: none;
  transition: color 0.25s ease;
}

#industries .dt-notes a:hover,
#industries .dt-notes a:focus-visible {
  color: var(--color-brand-teal-300);
}

/* Industries: four cards in a row on wide desktops; below 1200px the
   descriptions get too narrow, so they stay 2 × 2. */
@media (min-width: 1200px) {
  #industries .ls-reasons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   Capabilities: dark section, intro left, accordion tabs right.
   The accordion reuses .cv-industries and js/cv-industries-accordion.js.
   -------------------------------------------------------------------------- */
.dt-capabilities {
  padding: var(--spacing-80) 0;
  background: var(--color-brand-navy);
}

.dt-capabilities__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.dt-capabilities__intro {
  max-width: 510px;
}

.dt-capabilities__title {
  margin: 0 0 var(--spacing-24);
  color: var(--white-text);
}

.dt-capabilities__lead {
  margin: 0;
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.8);
}

.dt-capabilities__lead + .dt-capabilities__lead {
  margin-top: var(--spacing-16);
}

.dt-capabilities__body {
  min-width: 0;
}

.cv-industries__accordion {
  padding: 8px;
  border-radius: 16px;
  background: #0d1326;
  border: 1px solid color-mix(in srgb, var(--color-brand-teal) 20%, transparent);
}

.cv-industries__item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cv-industries__item:last-child {
  border-bottom: none;
}

.cv-industries__summary {
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  cursor: pointer;
  padding: var(--spacing-24);
  padding-right: 64px;
  position: relative;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--white-text);
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight: var(--font-weight-600);
  line-height: 1.35;
  transition: color 0.2s ease;
}

.cv-industries__summary:hover,
.cv-industries__item.is-open .cv-industries__summary {
  color: var(--color-brand-teal);
}

.cv-industries__summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--color-brand-teal);
  background: #242425;
  font-size: 20px;
  font-weight: var(--font-weight-500);
  line-height: 1;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.cv-industries__item.is-open .cv-industries__summary::after {
  content: "\2212";
  color: var(--white-text);
  background: var(--color-brand-teal);
  border-color: rgba(255, 255, 255, 0.12);
}

.cv-industries__collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s ease;
}

.cv-industries__item.is-open .cv-industries__collapse {
  grid-template-rows: 1fr;
}

.cv-industries__collapse-inner {
  min-height: 0;
  overflow: hidden;
}

.cv-industries__body {
  padding: 0 var(--spacing-24) var(--spacing-24);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
}

.cv-industries__body p {
  margin: 0;
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
}

.cv-industries__body p strong {
  color: var(--white-text);
}

.cv-industries__body p a {
  color: var(--color-brand-teal);
  text-decoration: none;
  transition: color 0.2s ease;
}

.cv-industries__body p a:hover,
.cv-industries__body p a:focus-visible {
  color: var(--color-brand-teal-300);
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .cv-industries__collapse {
    transition: none;
  }
}

@media screen and (min-width: 769px) and (max-width: 1080px) {
  #intro-section .section-description__number-wrapper {
    flex-wrap: wrap;
  }

  #intro-section .section-description__item {
    flex: 1 1 calc(50% - var(--spacing-8));
  }
}

@media screen and (max-width: 992px) {
  .dt-trace__grid {
    grid-template-columns: 1fr;
  }

  .dt-capabilities__grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-32);
  }
}

@media screen and (max-width: 640px) {
  .dt-chain__item {
    padding-right: 0;
  }

  .dt-chain__item::after {
    position: static;
    margin-left: 8px;
  }
}
