/* ============================================================
   SERVICES — 3 PILLARS (ADVERTISE / RANK / BUILD)
   Dark navy cards on off-white, each topped with a tilted
   label chip in one of the three brand blues.
   ============================================================ */

.pillars-section { background: var(--off-white); }
/* Subtitle: each sentence on its own line, wrapped into even lines on phones
   so no word is left hanging on its own */
.pillars-sub span { display: block; text-wrap: balance; }

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  margin-top: 7rem;               /* room for the label + peaks above each card */
}

.pillar {
  --chip-bg: var(--blue);
  --chip-text: var(--white);
  --chip-tilt: -3deg;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 3.75rem 2.5rem 2.75rem;
  border-radius: 24px;
  background:
    radial-gradient(ellipse 90% 60% at 100% 0%, rgba(46, 101, 184, 0.28) 0%, rgba(46, 101, 184, 0) 70%),
    linear-gradient(180deg, var(--navy) 0%, var(--dark) 100%);
  box-shadow: 0 18px 40px rgba(13, 31, 66, 0.18);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.pillar--rank  { --chip-bg: var(--light-blue); --chip-text: var(--dark); --chip-tilt: 2.5deg; }
.pillar--build { --chip-bg: var(--white);      --chip-text: var(--navy); --chip-tilt: -2deg; }

.pillar:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 50px rgba(13, 31, 66, 0.26);
}

/* Tilted label chip that sits over the card's top edge */
.pillar-chip {
  position: absolute;
  top: 0;
  left: 2rem;
  transform: translateY(-50%) rotate(var(--chip-tilt));
  padding: 0.55rem 1.1rem 0.5rem;
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(13, 31, 66, 0.3);
  transition: transform 0.35s ease;
}
.pillar:hover .pillar-chip { transform: translateY(-50%) rotate(0deg); }

/* The three peaks from the logo, standing on top of each label the way
   they stand over "Donard" in the logo. Sized in em so they scale with
   the label; they tilt and straighten with it. */
.pillar-chip::before {
  content: '';
  position: absolute;
  bottom: calc(100% - 1px);
  left: 50%;
  width: 2.6em;
  aspect-ratio: 760 / 324;
  transform: translateX(-50%);
  background: url('../images/mountains-mark.svg?v=4') center bottom / contain no-repeat;
  pointer-events: none;
}

.pillar-copy {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.98rem;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.pillar-list {
  list-style: none;
  margin: auto 0 0;
  padding: 0;
  border-top: 1px dashed rgba(123, 159, 212, 0.35);
}
.pillar-list li { border-bottom: 1px dashed rgba(123, 159, 212, 0.35); }
.pillar-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.25s ease;
}
.pillar-arrow {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--light-blue);
  opacity: 0.6;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.pillar-list a:hover,
.pillar-list a:focus-visible { color: var(--light-blue); }
.pillar-list a:hover .pillar-arrow,
.pillar-list a:focus-visible .pillar-arrow { transform: translateX(4px); opacity: 1; }

/* Keep the hover lift snappy once the fade-in has finished */
.pillar.fade-in.visible { transition: opacity 0.6s ease, transform 0.35s ease, box-shadow 0.35s ease; }

@media (max-width: 1040px) {
  .pillars-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    row-gap: 6rem;
  }
}

@media (max-width: 480px) {
  .pillar { padding: 3.25rem 1.5rem 2rem; }
  .pillar-chip { left: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pillar,
  .pillar-chip,
  .pillar-arrow { transition: none; }
  .pillar:hover { transform: none; }
  .pillar:hover .pillar-chip { transform: translateY(-50%) rotate(var(--chip-tilt)); }
}
