/* ==========================================================================
   MECAS Techsolutions - Components
   --------------------------------------------------------------------------
   Patterns that appear on two or more designed pages, or that are complex
   enough to own independently. Header, footer and page-specific blocks live
   in their own files.

   Every component points at a semantic role token (--color-action and so on),
   never at a raw scale, so the Contact page teal override works without any
   component knowing about it.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Buttons
   --------------------------------------------------------------------------
   Three variants in the reference: solid, outlined (on navy) and ghost.
   All are rectangular with a 4px radius. Not pills.
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  min-height: 48px;              /* comfortable touch target */
  font-family: var(--font-heading);
  font-size: var(--fs-button);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-button);
  text-transform: uppercase;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  border: var(--border-w) solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    background-color var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    color var(--duration) var(--ease);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* The trailing arrow that appears on nearly every button in the design.
   Decorative: the label already carries the meaning. */
.btn__arrow {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  transition: transform var(--duration) var(--ease);
}

.btn:hover .btn__arrow { transform: translateX(3px); }

.btn__icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
}

/* Solid - the primary action */
.btn--primary {
  background-color: var(--color-action);
  color: var(--ink-inverse);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--color-action-hover);
  color: var(--ink-inverse);
}

/* Outlined - used on navy grounds */
.btn--outline {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--ink-inverse);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--ink-inverse);
  color: var(--ink-inverse);
}

/* Outlined on a light ground */
.btn--outline-dark {
  background-color: transparent;
  border-color: var(--color-action);
  color: var(--color-action);
}

.btn--outline-dark:hover,
.btn--outline-dark:focus-visible {
  background-color: var(--color-action);
  color: var(--ink-inverse);
}

/* Ghost - text plus arrow, no chrome */
.btn--ghost {
  padding-inline: 0;
  min-height: 0;
  color: var(--color-action);
}

.btn--ghost:hover { color: var(--color-action-hover); }

.btn--block {
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* --------------------------------------------------------------------------
   2. Section heading
   --------------------------------------------------------------------------
   Centred uppercase navy heading with a short blue rule beneath it. The rule
   is the single most repeated motif in the design.
   -------------------------------------------------------------------------- */

.section-heading { margin-bottom: var(--space-6); }

.section-heading--center {
  text-align: center;
  margin-inline: auto;
}

.section-heading__title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  color: var(--ink-heading);
}

.section-heading__intro {
  margin-top: var(--space-4);
  color: var(--ink-muted);
  max-width: 68ch;
}

.section-heading--center .section-heading__intro { margin-inline: auto; }

/* The short blue rule. Also usable on its own as .rule. */
.rule,
.section-heading__title::after {
  display: block;
  width: var(--rule-len);
  height: var(--rule-w);
  margin-top: var(--space-4);
  background-color: var(--color-rule);
  border-radius: var(--radius-sm);
}

.section-heading__title::after { content: ""; }

.section-heading--center .section-heading__title::after { margin-inline: auto; }

/* --------------------------------------------------------------------------
   3. Icon badge
   --------------------------------------------------------------------------
   Circle filled pale blue (or navy on the Products page) holding a line icon.
   -------------------------------------------------------------------------- */

.icon-badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 88px;
  height: 88px;
  background-color: var(--color-icon-bg);
  color: var(--color-icon);
  border-radius: var(--radius-round);
}

.icon-badge svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-badge--sm { width: 64px; height: 64px; }
.icon-badge--sm svg { width: 32px; height: 32px; }

.icon-badge--lg { width: 96px; height: 96px; }
.icon-badge--lg svg { width: 48px; height: 48px; }

/* Navy fill variant, used on the Products page rows. */
.icon-badge--navy {
  background-color: var(--navy-700);
  color: var(--ink-inverse);
}

/* --------------------------------------------------------------------------
   4. Cards
   -------------------------------------------------------------------------- */

.card {
  display: flex;
  flex-direction: column;
  background-color: var(--surface-raised);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.card__media {
  position: relative;
  background-color: var(--white);
}

.card__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.card__body { padding: var(--space-5); }

.card__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  color: var(--color-action);
}

.card__text {
  margin-top: var(--space-3);
  font-size: var(--fs-small);
  color: var(--ink-muted);
}

/* Industries card: circular badge overlapping the base of the image. */
.card--overlap { border: none; background: none; text-align: center; }

.card--overlap .card__media { overflow: visible; }

.card--overlap .icon-badge {
  position: absolute;
  bottom: calc(var(--space-6) * -0.5);
  left: 50%;
  transform: translateX(-50%);
  border: 3px solid var(--surface);
}

.card--overlap .card__body { padding-top: var(--space-6); }

/* --------------------------------------------------------------------------
   5. Bulleted list - product and service item lists
   -------------------------------------------------------------------------- */

.list-bullet {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-bullet li {
  position: relative;
  padding-left: var(--space-5);
  margin-bottom: var(--space-2);
}

.list-bullet li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  background-color: var(--color-accent);
  border-radius: var(--radius-round);
}

/* Dot-separated inline keyword list (Technology Areas). The bullet trails its
   item, so a wrapped line ends "Turbines •" as drawn, rather than the next
   line opening on a bullet. Spacing is in em so it follows the type size. */
.list-inline {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-inline li:not(:last-child)::after {
  content: "\2022";
  content: "\2022" / "";   /* silent to screen readers where supported */
  margin-inline: 0.42em;
  color: currentColor;
}

/* --------------------------------------------------------------------------
   6. CTA band
   --------------------------------------------------------------------------
   Four treatments in the reference: solid blue, navy, pale blue, and image
   backed. All share the same internal layout.
   -------------------------------------------------------------------------- */

.cta-band { padding-block: var(--space-6); }

.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.cta-band__content {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex: 1 1 420px;
}

.cta-band__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
}

.cta-band__text {
  margin-top: var(--space-1);
  font-size: var(--fs-small);
}

.cta-band--blue {
  background-color: var(--blue-800);
  color: var(--ink-inverse);
}

.cta-band--navy {
  background-color: var(--navy-700);
  color: var(--ink-inverse);
}

.cta-band--blue .cta-band__title,
.cta-band--navy .cta-band__title { color: var(--ink-inverse); }

.cta-band--pale {
  background-color: var(--blue-050);
  color: var(--ink);
}

.cta-band--pale .cta-band__title { color: var(--ink-heading); }

/* Image-backed variant (Development Model). Overlay keeps text legible
   whatever the photograph does. */
.cta-band--image {
  position: relative;
  background-size: cover;
  background-position: center;
  color: var(--ink-heading);
}

.cta-band--image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.62) 100%);
}

.cta-band--image .cta-band__inner { position: relative; }

/* --------------------------------------------------------------------------
   7. Value strip item - icon plus two lines, used in trust strips
   -------------------------------------------------------------------------- */

.value-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.value-item__icon {
  flex: none;
  width: 40px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.value-item__title {
  font-family: var(--font-heading);
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.value-item__text {
  font-size: var(--fs-small);
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   8. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 767.98px) {
  .cta-band__inner { justify-content: flex-start; }

  .cta-band__content { flex: 1 1 100%; }

  .icon-badge { width: 72px; height: 72px; }
  .icon-badge svg { width: 36px; height: 36px; }

  .icon-badge--lg { width: 80px; height: 80px; }
  .icon-badge--lg svg { width: 40px; height: 40px; }
}

@media (max-width: 575.98px) {
  /* Buttons go full width rather than sitting awkwardly side by side. */
  .btn:not(.btn--ghost) {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .cta-band__content {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }
}
