/**
 * card.css — Novagroup Card Component
 * Base card with hover lift + copper border slide-in.
 * 3D shadow depth on hover. All values reference tokens.
 */

/* ============================================================
 * BASE CARD
 * ============================================================ */
.card {
  position: relative;
  background-color: var(--c-white);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  overflow: hidden;
  transition:
    transform    var(--dur-short) var(--ease-out),
    box-shadow   var(--dur-short) var(--ease-out);
  will-change: transform;
}

/* Copper left-border slide-in pseudo-element */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background-color: var(--c-copper);
  transition: height var(--dur-medium) var(--ease-out);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.card:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px var(--c-fog);
}

.card:hover::before {
  height: 100%;
}

/* ============================================================
 * DARK CARD — navy background
 * ============================================================ */
.card--dark {
  background-color: var(--c-navy);
  color: var(--c-white);
}

.card--dark .card__heading,
.card--dark h3,
.card--dark h4 {
  color: var(--c-white);
}

.card--dark .card__body,
.card--dark p {
  color: var(--c-fog);
}

.card--dark::before {
  background-color: var(--c-copper);
}

.card--dark:hover {
  box-shadow:
    var(--shadow-xl),
    0 0 0 1px rgb(255 255 255 / 0.06);
}

/* ============================================================
 * SERVICE CARD — tall 4:5 ratio, blueprint pattern bg
 * ============================================================ */
.card--service {
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  padding: var(--sp-6);
  background-color: var(--c-navy);
  color: var(--c-white);
  overflow: hidden;
}

.card--service .card__numeral {
  font-family: var(--font-serif);
  font-size: var(--fs-display);
  font-weight: 700;
  color: var(--c-copper);
  opacity: 0.15;
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  user-select: none;
  transition: transform var(--dur-short) var(--ease-out);
}

.card--service:hover .card__numeral {
  transform: translateY(-4px);
  opacity: 0.22;
}

.card--service .card__bullets {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-medium) var(--ease-out);
}

.card--service:hover .card__bullets {
  max-height: 240px;
}

.card--service .card__bullets li {
  font-size: var(--fs-small);
  color: var(--c-fog);
  padding-block: var(--sp-1);
  padding-left: var(--sp-3);
  position: relative;
}

.card--service .card__bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 1px;
  background-color: var(--c-copper);
}

/* ============================================================
 * PILLAR CARD — Home page pillars
 * ============================================================ */
.card--pillar {
  text-align: left;
  padding: var(--sp-6);
  background-color: var(--c-white);
  border: 1px solid rgba(11, 30, 63, 0.10); /* stronger edge so card separates on bone-deep (#7) */
  border-radius: var(--radius-lg);
  /* Dual-layer shadow: tight contact + soft ambient reads as a deliberate
   * elevated object rather than a single blurry float (#24) */
  box-shadow:
    0 1px 2px rgba(11, 30, 63, 0.05),
    0 14px 36px rgba(11, 30, 63, 0.08);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Equal-height row only in the multi-column desktop layout; on mobile the
 * stacked cards size to content instead of carrying a wasteful 480px floor (#19) */
@media (min-width: 901px) {
  .card--pillar {
    min-height: 480px;
  }
}

/* Resting copper top-hairline signature that grows on hover — gives each card
 * an anchor tied to the brand accent (#24) */
.card--pillar::after {
  content: '';
  position: absolute;
  top: 0;
  left: var(--sp-6);
  width: 32px;
  height: 2px;
  background-color: var(--c-copper);
  opacity: 0.55;
  transition:
    width   var(--dur-medium) var(--ease-out),
    opacity var(--dur-short)  var(--ease-out);
}

.card--pillar:hover::after {
  width: 64px;
  opacity: 1;
}

.card--pillar .card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--sp-4);
  color: var(--c-copper);
}

/* Fixed 160px media box so all three illustrations occupy the same vertical
 * band and the titles/leads share a baseline across cards; caps width so an
 * over-wide PNG can't dominate, and prevents CLS via the box height. (#9) */
.card--pillar .card__illustration {
  width: 100%;
  height: 160px;
  margin-bottom: var(--sp-5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--dur-short) var(--ease-out);
}

.card--pillar .card__illustration img {
  max-width: 160px;
  max-height: 160px;
  width: auto;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
}

.card--pillar .card__illustration svg {
  width: auto;
  height: 100%;
  max-height: 160px;
  color: var(--c-copper);
}

/* Illustration lifts subtly on hover so the card reads as a touchable object (#24) */
.card--pillar:hover .card__illustration {
  transform: translateY(-6px) scale(1.03);
}

/* Below tablet the card stacks single-column and the wide media band is
 * unnecessary — cap the box so a full-width PNG can't balloon (#19) */
@media (max-width: 900px) {
  .card--pillar .card__illustration {
    height: 200px;
    justify-content: center;
  }

  .card--pillar .card__illustration img {
    max-width: 200px;
    max-height: 200px;
  }
}

.card--pillar .card__title {
  font-family: var(--font-serif);
  font-size: var(--fs-h3);
  font-weight: 500;
  color: var(--c-navy);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-snug);
  margin-bottom: var(--sp-3);
}

/* One scannable outcome sentence replaces the dense bullet list on the home
 * pillars. flex:1 pushes the link-arrow to a shared bottom edge across cards. (#14) */
.card--pillar .card__lead {
  font-size: var(--fs-body);
  line-height: var(--leading-relaxed);
  color: var(--c-steel);
  max-width: 34ch;
  margin: var(--sp-3) 0 var(--sp-4);
  flex: 1;
}

/* Pin the pillar CTA (link-arrow) to the bottom so all three cards bottom-align
 * their CTAs regardless of copy length. (#14) */
.card--pillar .link-arrow {
  margin-top: auto;
}

.card--pillar .card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
  margin-bottom: var(--sp-4);
}

.card--pillar .card__list li {
  font-size: var(--fs-small);
  color: var(--c-steel);
  padding-left: var(--sp-4);
  position: relative;
  line-height: var(--leading-body);
}

.card--pillar .card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 1px;
  background-color: var(--c-copper);
}

/* Hover state override for pillar cards — lift + deepened ambient shadow +
 * copper ring so the elevated object reads as deliberately raised (#24) */
.card--pillar:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow:
    0 1px 2px rgba(11, 30, 63, 0.05),
    0 20px 56px rgba(11, 30, 63, 0.14),
    0 0 0 1px rgba(184, 115, 51, 0.22);
}

/* ============================================================
 * INDUSTRY TILE
 * ============================================================ */
.card--industry {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: var(--sp-4);
  background-color: var(--c-navy);
  color: var(--c-white);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.card--industry .card__illustration {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: transform var(--dur-medium) var(--ease-out), opacity var(--dur-short) var(--ease-out);
}

.card--industry:hover .card__illustration {
  opacity: 0.85;
  transform: scale(1.04);
}

.card--industry .card__label {
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--c-white);
  text-align: center;
  position: relative;
  z-index: var(--z-raised);
  padding: var(--sp-2) var(--sp-3);
  background-color: rgb(6 20 41 / 0.7);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

/* ============================================================
 * REDUCED MOTION — collapse hover states
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .card,
  .card--dark,
  .card--service,
  .card--pillar,
  .card--industry {
    transition: none;
  }

  .card::before {
    display: none;
  }

  .card--service .card__bullets {
    max-height: 240px;
    transition: none;
  }

  /* Pillar microinteractions: keep the resting copper signature but kill all
   * motion (hairline grow, illustration lift, card hover transform) (#24) */
  .card--pillar::after,
  .card--pillar .card__illustration {
    transition: none;
  }

  .card--pillar:hover {
    transform: none;
  }

  .card--pillar:hover::after {
    width: 32px;
    opacity: 0.55;
  }

  .card--pillar:hover .card__illustration {
    transform: none;
  }
}
