/* ==========================================================================
   landing.css: page blocks for the commercial landing page
   ========================================================================== */

/* --------------------------------- hero -------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--surface);
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.25rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
}

/* Layered radial gradients for depth, plus a faint grain pass. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 8% -10%, var(--primary-soft) 0%, transparent 58%),
    radial-gradient(90% 70% at 96% 4%, rgba(10, 110, 95, 0.09) 0%, transparent 60%),
    radial-gradient(70% 60% at 60% 110%, rgba(10, 110, 95, 0.05) 0%, transparent 62%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.28;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  .hero::before {
    background:
      radial-gradient(120% 80% at 8% -10%, rgba(47, 191, 166, 0.16) 0%, transparent 58%),
      radial-gradient(90% 70% at 96% 4%, rgba(47, 191, 166, 0.1) 0%, transparent 60%),
      radial-gradient(70% 60% at 60% 110%, rgba(47, 191, 166, 0.05) 0%, transparent 62%);
  }
  .hero::after {
    opacity: 0.5;
  }
}

.hero__title {
  max-width: 26ch;
  margin-bottom: 1.75rem;
}

/* Cluster pages: single-column hero, no side panel, so the title may run wider. */
.hero--page {
  padding-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.hero--page .hero__title {
  max-width: 34ch;
}

.hero--page .prose {
  max-width: 64ch;
  margin-bottom: 1.9rem;
}

.hero__grid {
  display: grid;
  gap: 1.75rem;
  align-items: start;
}

.hero__main .lede {
  max-width: 46ch;
  margin-bottom: 1.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Supporting detail, including the scope limit, as a bordered panel. Same
   copy as the prose version, re-arranged so the wide viewport is not half
   empty. Reading order in the DOM is unchanged. */
.hero__panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem 1.35rem;
  box-shadow: var(--shadow-1);
  font-size: 0.9375rem;
  line-height: 1.62;
  max-width: 46ch;
}

.hero__panel p {
  color: var(--ink-2);
  margin-bottom: 0.85rem;
}

.hero__panel-kicker {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  color: var(--primary) !important;
  margin-bottom: 0.7rem !important;
}

.hero__panel-limit {
  margin-bottom: 0 !important;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
  color: var(--ink) !important;
}

@media (min-width: 980px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3rem;
  }

  .hero__title {
    max-width: 30ch;
  }
}

/* ------------------------------- figures ------------------------------- */

.viz {
  margin: 1.75rem 0 1.9rem;
}

.viz__caption {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: left;
  margin-bottom: 0.75rem;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* -------------------------------- tables ------------------------------- */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.table thead th {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: left;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--rule-strong);
  vertical-align: bottom;
}

.table tbody th,
.table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  text-align: left;
}

.table tbody tr:last-child th,
.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody th[scope="row"] {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink);
  min-width: 15rem;
}

.table tbody td {
  color: var(--ink-2);
}

.table__note {
  display: block;
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.table--models tbody th[scope="row"] {
  min-width: 8rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}

.table--landscape tbody th[scope="row"] {
  min-width: 11rem;
}

.table--landscape tbody td:first-of-type {
  min-width: 24rem;
}

/* No row in the provider table is visually favored. An earlier build tinted the
   specialist row, which reads as an editorial pick on a page that makes none. */

/* ------------------------------- badges -------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--rule);
  color: var(--ink);
  background: var(--tint);
}

.badge svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

/* Status color always ships with its icon and its text label. */
.badge--good {
  background: var(--good-soft);
  border-color: rgba(12, 163, 12, 0.3);
}

.badge--good svg {
  color: var(--good);
}

.badge--warn {
  background: var(--warning-soft);
  border-color: rgba(224, 150, 10, 0.34);
}

.badge--warn svg {
  color: var(--serious);
}

.badge--bad {
  background: var(--critical-soft);
  border-color: rgba(208, 59, 59, 0.3);
}

.badge--bad svg {
  color: var(--critical);
}

.badge--neutral svg {
  color: var(--ink-muted);
}

/* --------------------------- threat card grid --------------------------- */

.threat-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
}

.tcard {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.1rem 1.1rem 0;
  box-shadow: var(--shadow-1);
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease;
}

.tcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.tcard__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  margin-bottom: 0.8rem;
  background: var(--tint);
}

.tcard__icon svg {
  width: 21px;
  height: 21px;
}

.tcard--critical .tcard__icon {
  background: var(--critical-soft);
  color: var(--critical);
}

.tcard--serious .tcard__icon {
  background: var(--warning-soft);
  color: var(--serious);
}

.tcard__name {
  font-family: var(--font-head);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.45rem;
}

.tcard__mech {
  font-size: 0.9063rem;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 1rem;
  flex: 1 1 auto;
}

.tcard__cost {
  margin: 0 -1.1rem;
  padding: 0.7rem 1.1rem 0.85rem;
  border-top: 1px solid var(--rule);
  background: var(--tint);
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 550;
}

.tcard__cost-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.15rem;
}

/* --------------------------- architecture SVG -------------------------- */

.diagram__grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
}

/* min-width: 0 is load-bearing. The flow SVG declares only a viewBox, so its
   intrinsic width is 360px; a grid item defaults to min-width: auto and will
   not shrink below that, which pushed the whole document wider than a 360px
   viewport and clipped every line of text on the page. */
.diagram__col {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.1rem 1rem 1.25rem;
  box-shadow: var(--shadow-1);
}

.diagram__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin: 0 0 0.9rem;
  padding-left: 0.6rem;
  border-left: 3px solid var(--rule-strong);
}

.diagram__label--a {
  border-left-color: var(--primary);
}

.diagram__label--b {
  border-left-color: var(--serious);
}

.flow {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 24rem;
  height: auto;
  margin: 0 auto;
}

.flow__node {
  fill: var(--tint);
  stroke: var(--rule-strong);
  stroke-width: 1.4;
}

.flow__node--hot {
  fill: var(--primary-soft);
  stroke: var(--primary);
  stroke-width: 2;
}

.flow__node--cost {
  fill: var(--warning-soft);
  stroke: var(--serious);
  stroke-width: 1.6;
}

.flow__title {
  fill: var(--ink);
  stroke: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
}

.flow__sub {
  fill: var(--ink-2);
  stroke: none;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 400;
}

.flow__note {
  fill: var(--ink-muted);
  stroke: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
}

.flow__link {
  fill: none;
  stroke: var(--ink-muted);
  stroke-width: 1.6;
}

.flow__arrowhead {
  fill: var(--ink-muted);
  stroke: none;
}

/* ------------------------- due diligence list -------------------------- */

.qlist {
  counter-reset: q;
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
  max-width: 62ch;
  display: grid;
  gap: 0.55rem;
}

.qlist li {
  counter-increment: q;
  position: relative;
  padding: 0.8rem 1rem 0.8rem 3rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink);
}

.qlist li::before {
  content: counter(q);
  position: absolute;
  left: 0.85rem;
  top: 0.8rem;
  width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

/* ------------------------------ CTA panels ----------------------------- */

.cta-panel {
  padding: 0 0 clamp(2.5rem, 5vw, 4rem);
  background: var(--tint);
}

.cta-panel--urgent {
  background: var(--page);
  padding-top: clamp(1rem, 2vw, 1.5rem);
}

.cta-panel__inner {
  display: grid;
  gap: 1rem;
  align-items: center;
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

.cta-panel--urgent .cta-panel__inner {
  border-left-color: var(--critical);
}

/* Editorial callout: the CTA panel shell with no outbound link. Neutral rule
   colour so it does not read as a call to action. */
.cta-panel--note {
  background: transparent;
  padding: 0 0 1.9rem;
}

.cta-panel--note .cta-panel__inner {
  border-left-color: var(--rule-strong);
}

.cta-panel--note .cta-panel__icon {
  background: var(--tint);
  color: var(--ink-2);
}

.cta-panel--note .cta-panel__title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0;
}

@media (min-width: 768px) {
  .cta-panel--note .cta-panel__inner {
    grid-template-columns: auto 1fr;
  }
}

/* Inline natural-language citation. Third-party links only. */
.source-link {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.source-link:hover {
  text-decoration-thickness: 2px;
}

.cta-panel__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}

.cta-panel--urgent .cta-panel__icon {
  background: var(--critical-soft);
  color: var(--critical);
}

.cta-panel__icon svg {
  width: 22px;
  height: 22px;
}

.cta-panel__title {
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.cta-panel__body p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-2);
  max-width: 60ch;
}

@media (min-width: 768px) {
  .cta-panel__inner {
    grid-template-columns: auto 1fr auto;
    gap: 1.25rem;
    padding: 1.5rem 1.75rem;
  }
}

/* -------------------------------- CTA band ----------------------------- */

.cta-band {
  background: var(--band);
  color: #fff;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  border-top: 1px solid var(--rule);
}

.cta-band__inner {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.cta-band__title {
  color: #fff;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.18;
  margin-bottom: 0.6rem;
}

.cta-band__body p {
  margin: 0;
  color: #cfe6e0;
  max-width: 56ch;
}

@media (min-width: 768px) {
  .cta-band__inner {
    grid-template-columns: 1fr auto;
    gap: 2.5rem;
  }
}

/* ------------------------------- stepper ------------------------------- */

.stepper {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  counter-reset: none;
}

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 1rem 1.05rem;
  box-shadow: var(--shadow-1);
}

/* Sequence is carried by the numbered badges. A drawn connector was tried and
   removed: with an auto-fit grid there is no way to know which card ends a row,
   so the last card in each row was left with a line dangling into empty space. */

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.step__icon {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 0.5rem;
  color: var(--primary);
}

.step__icon svg {
  width: 19px;
  height: 19px;
}

.step__name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin: 0.7rem 0 0.3rem;
}

.step__req {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.step--paired {
  border-color: var(--primary-edge);
}

.step__pair-tag {
  display: inline-block;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
}

/* ---------------------------- metric tiles ---------------------------- */

.metric-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.mtile {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem 1.15rem;
  box-shadow: var(--shadow-1);
}

.mtile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.mtile__icon svg {
  width: 19px;
  height: 19px;
}

.mtile__name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 0.35rem;
}

.mtile__def {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-2);
}

/* --------------------------------- FAQ -------------------------------- */

/* Left-aligned to the same edge as every other section rather than centered,
   so the page keeps one vertical rhythm. */
.faq {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.5rem;
  max-width: 46rem;
}

.faq__item {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq__item[open] {
  border-color: var(--primary-edge);
}

.faq__item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-left: auto;
  margin-top: 0.45rem;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}

.faq__item[open] summary::after {
  transform: rotate(225deg);
}

.faq__item summary:hover {
  color: var(--primary);
}

.faq__answer {
  padding: 0 1.1rem 1.05rem;
  font-size: 0.9375rem;
}

.faq__answer p {
  margin: 0;
  max-width: 66ch;
}

/* ==========================================================================
   Responsive tables. Below the single breakpoint each row becomes a card so
   nothing is lost to horizontal scrolling on a phone.
   ========================================================================== */

@media (max-width: 767px) {
  .table {
    border: 0;
    background: transparent;
  }

  .table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .table,
  .table tbody,
  .table tr,
  .table tbody th,
  .table tbody td {
    display: block;
    width: auto;
  }

  .table tbody tr {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 0.95rem 1.05rem 1rem;
    margin-bottom: 0.7rem;
    box-shadow: var(--shadow-1);
  }

  .table tbody th[scope="row"] {
    min-width: 0;
    padding: 0 0 0.6rem;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 0.6rem;
    font-family: var(--font-head);
    font-size: 1.0625rem;
    line-height: 1.3;
  }

  .table--models tbody th[scope="row"],
  .table--landscape tbody th[scope="row"],
  .table--landscape tbody td:first-of-type {
    min-width: 0;
  }

  .table tbody td {
    padding: 0.45rem 0 0;
    border-bottom: 0;
    font-size: 0.9063rem;
  }

  .table tbody td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.2rem;
  }

  /* The connector only makes sense in a horizontal run. */
  .step::after {
    display: none;
  }
}
