/* =============================================================================
   IntelliBOM · intellibom.ca · Scenario 2 · Ethereal Glass
   engine.css — algorithms + cost intelligence grid + testament pull-quote
   Pairs with styles.css / sections.css / blocks.css / motion.css.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. ENGINE — algorithms + cost intelligence (2×2 glass grid)
   ---------------------------------------------------------------------------*/
.engine {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--s-section) var(--pad-x);
}
.engine__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 2vw, 28px);
}
.engine__card {
  position: relative;
  padding: clamp(24px, 2.4vw, 36px);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 20px;
  -webkit-backdrop-filter: blur(22px);
          backdrop-filter: blur(22px);
  display: grid;
  gap: 14px;
  align-content: start;
  transition:
    border-color 320ms var(--ease),
    box-shadow 480ms var(--ease-glass);
  overflow: hidden;
}
.engine__card:hover {
  border-color: rgba(16, 185, 129, 0.28);
  box-shadow: 0 28px 72px -28px rgba(16, 185, 129, 0.24);
}
.engine__card--wide {
  grid-column: 1 / -1;
  border-color: rgba(16, 185, 129, 0.22);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.035), var(--glass));
}
.engine__card--wide .engine__title {
  font-size: clamp(22px, 2vw, 30px);
  max-width: 32ch;
}
.engine__card--wide .engine__body {
  max-width: 82ch;
  font-size: 15.5px;
}
.engine__diagram--wide {
  background: rgba(0, 0, 0, 0.36);
}
.engine__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(16, 185, 129, 0.28), transparent);
}
.engine__no {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--emerald);
  text-transform: uppercase;
  padding-left: 26px;
  position: relative;
  line-height: 1;
}
.engine__no::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 18px;
  height: 1px;
  background: var(--emerald);
  transform: translateY(-50%);
}
.engine__title {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--white);
  text-wrap: balance;
}
.engine__title em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 700;
  color: var(--emerald);
  letter-spacing: -0.005em;
}
.engine__body {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--steel);
  text-wrap: pretty;
}
.engine__diagram {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 4px;
}
.engine__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}
.engine__tags li {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--steel);
  letter-spacing: 0.12em;
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--void-2);
}

@media (max-width: 960px) {
  .engine__grid { grid-template-columns: 1fr; }
}

/* -----------------------------------------------------------------------------
   2. TESTAMENT — editorial pull quote, emerald-accented, before compare
   ---------------------------------------------------------------------------*/
.testament {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(56px, 9vw, 110px) var(--pad-x) clamp(40px, 6vw, 72px);
  text-align: center;
  position: relative;
}
.testament::before {
  content: "";
  display: block;
  width: 72px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--emerald), transparent);
  margin: 0 auto 32px;
  filter: drop-shadow(0 0 6px var(--emerald-glow));
}
.testament__quote {
  margin: 0;
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.42;
  color: var(--white);
  letter-spacing: -0.01em;
  max-width: 28ch;
  margin-inline: auto;
  text-wrap: balance;
}
.testament__quote em {
  color: transparent;
  background: linear-gradient(96deg, var(--emerald) 0%, var(--emerald-2) 50%, var(--emerald) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  animation: shimmer 9s linear infinite;
  font-style: italic;
  font-weight: 700;
  padding-right: 0.02em;
}
.testament__cite {
  display: block;
  margin-top: 24px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--steel-3);
  font-style: normal;
}
