/*
 * CormackCoreWeb 2.0 — Avesco Services page
 * Builds on front-page.css (tokens, nav, contact buttons, blue-glory, sectors).
 */

.av-services { background: #fff; }

/* ============================================================
   Hero (light) — eyebrow + slab headline, blue-glory glow
   ============================================================ */
.av-svc-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #fff;
  /* Full viewport: nav pinned at top, headline centred in the space below. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
/* Circular glow — CSS recreation of the blue-glory radial SVG.
   SVG: circle centred at ~51% / ~115% (below the hero), radius ~932px,
   stops #1426F6 (0%) → #85BED6 (50%) → rgba(255,255,255,.09) (100%).
   The layer is OVERSIZED past the section on every side so the motion below
   never exposes the white background underneath. */
.av-svc-hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -30%;                    /* bleed well beyond the section edges */
  pointer-events: none;
  background:
    radial-gradient(
      circle 990px at 50% 88%,   /* zoomed out ~10% (was 1100px) */
      #1426F6 0%,
      #85BED6 50%,
      rgba(255, 255, 255, 0.09) 100%
    );
  transform-origin: 50% 88%;
  will-change: transform;
  /* Slow figure-8 drift + gentle zoom (see keyframes). */
  animation: av-svc-glow-flow 22s ease-in-out infinite;
}
/* Animated film grain over the gradient — same fine fractal-noise AND the same
   flicker as the front-page hero (.av-grain: av-static .5s steps(6)). */
.av-svc-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: .85;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='2.4' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.95 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
  animation: av-static .5s steps(6) infinite;
}
/* The gradient centre traces a slow figure-8 (∞) — x oscillates once, y twice —
   while the glow gently zooms in and out. Amplitudes kept small so it reads as
   a soft, organic drift rather than sliding. */
@keyframes av-svc-glow-flow {
  0%    { transform: translate(0%,    0%)     scale(1.00); }
  12.5% { transform: translate(2.6%,  2.0%)   scale(1.04); }
  25%   { transform: translate(3.6%,  0%)     scale(1.08); }
  37.5% { transform: translate(2.6%, -2.0%)   scale(1.04); }
  50%   { transform: translate(0%,    0%)     scale(1.00); }
  62.5% { transform: translate(-2.6%, 2.0%)   scale(1.04); }
  75%   { transform: translate(-3.6%, 0%)     scale(1.08); }
  87.5% { transform: translate(-2.6%,-2.0%)   scale(1.04); }
  100%  { transform: translate(0%,    0%)     scale(1.00); }
}
@media (prefers-reduced-motion: reduce) {
  .av-svc-hero::before,
  .av-svc-hero::after { animation: none; transform: none; }
}
.av-svc-hero-inner {
  flex: 1;                        /* fill the height below the nav */
  display: flex;
  flex-direction: column;
  justify-content: center;       /* centre the headline vertically */
  text-align: center;
  padding-block: 80px;
  max-width: 1320px;
}
.av-svc-eyebrow { color: var(--grey-500); margin-bottom: 36px; }
.av-svc-hero h1 {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(38px, 4.6vw, 64px);
  line-height: 1.12;
  letter-spacing: -1px;
  color: #212121A8;                /* grey-900 @ ~66% (A8) */
  margin: 0 auto;
  max-width: 1160px;
}

/* ============================================================
   Teal anchor-nav band — 4 service links, icon above label
   ============================================================ */
.av-svc-anchors {
  background: var(--teal);
  padding: 48px 0;
}
.av-svc-anchors-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.avesco .av-svc-anchor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  color: #fff;
  text-align: center;
}
.av-svc-anchor-icon { width: 44px; height: 44px; }
.av-svc-anchor-icon svg { width: 100%; height: 100%; }
/* Service icons carry an inline stroke:#3d54a5; force white on the teal band. */
.av-svc-anchor-icon svg path { stroke: #fff !important; }
.av-svc-anchor-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  white-space: nowrap;          /* label + arrow always stay on one line */
}
.av-svc-anchor .av-chev {
  width: 16px; height: 16px; flex: 0 0 auto;
  transition: transform .2s ease;
}
.av-svc-anchor .av-chev path { stroke: #fff; }
/* Hover: nudge the chevron right (no underline). */
.av-svc-anchor:hover .av-chev { transform: translateX(4px); }

/* ============================================================
   Service block — shared header (eyebrow + name left, icon right)
   ============================================================ */
.av-svc-block { padding: 110px 0; scroll-margin-top: 24px; }
.av-svc-offwhite { background: #FBFBFB; }   /* Strategic Introductions */
.av-svc-tint     { background: #EDF1F5; }   /* Marketing & Communications */

.av-svc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 96px;
  /* Sits directly on the section — no box, border, or shadow. */
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.av-svc-pillar {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  color: var(--grey-600);
  margin: 0 0 24px;
}
.av-svc-name {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -1px;
  color: var(--grey-900);
  margin: 0;
}
.av-svc-head-icon { flex: 0 0 auto; width: 92px; height: 92px; }
.av-svc-head-icon svg { width: 100%; height: 100%; }
/* Service icons carry an inline stroke:#3d54a5; force brand blue. */
.av-svc-head-icon svg path { stroke: var(--blue-1) !important; }

/* ============================================================
   Sub-service feature grid
   ============================================================ */
.av-svc-grid {
  display: grid;
  gap: 72px 72px;
  align-items: start;
}
.av-svc-grid--3 { grid-template-columns: repeat(3, 1fr); }

.av-svc-feature h3 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.18;
  color: var(--blue-1);
  margin: 0 0 28px;
}
.av-svc-feature p {
  font-size: 17px;
  line-height: 27px;
  color: var(--grey-600);
  margin: 0;
}
.av-svc-feature ul {
  margin: 14px 0 0;
  padding-left: 20px;
  list-style: disc;
}
.av-svc-feature li {
  font-size: 17px;
  line-height: 28px;
  color: var(--grey-600);
}

/* ---------- Offset 3-col grid (Human Capital + Marketing) ----------
   Row 1: [ col1 | col2 | col3 ]
   Row 2: [ (empty) | col2 | col3 ]
   Cards placed explicitly to match the design's offset spread. */
.av-svc-grid-offset {
  grid-template-columns: repeat(3, 1fr);
  gap: 96px 72px;
}
.av-pos-c1r1 { grid-column: 1; grid-row: 1; }
.av-pos-c2r1 { grid-column: 2; grid-row: 1; }
.av-pos-c3r1 { grid-column: 3; grid-row: 1; }
.av-pos-c2r2 { grid-column: 2; grid-row: 2; }
.av-pos-c3r2 { grid-column: 3; grid-row: 2; }

/* ============================================================
   Investment — Swoop "Business Finance" partner block
   ============================================================ */
.av-svc-finance {
  position: relative;
  /* Span only the right 2 of the 3 feature columns (col 1 stays empty),
     aligning with "Mergers & Acquisitions Advisory" / "Exit Planning" above.
     Col width = (100% − 2×72px gap) / 3; offset = one col + one gap. */
  --svc-col: calc((100% - 144px) / 3);
  width: calc(var(--svc-col) * 2 + 72px);
  margin-left: calc(var(--svc-col) + 72px);
  margin-top: 50px;
  padding: 64px;
  background: #F4F5F8;
  border-radius: 0;              /* sharp corners */
}
.av-svc-finance-badge {
  position: absolute;
  top: 64px;                     /* line up with the "Business Finance" heading */
  right: 64px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--blue-1);
  background: #E2E6F6;
  padding: 6px 12px;
  border-radius: 4px;
}
.av-svc-finance-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;            /* copy/heading stay at the top (aligned w/ badge) */
}
.av-svc-finance-copy h3 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 26px;
  color: var(--blue-1);
  margin: 0 0 28px;
}
.av-svc-finance-copy p {
  font-size: 17px;
  line-height: 27px;
  color: var(--grey-600);
  margin: 0;
}
.av-svc-finance-copy ul {
  margin: 14px 0 0;
  padding-left: 20px;
  list-style: disc;
}
.av-svc-finance-copy li {
  font-size: 17px;
  line-height: 28px;
  color: var(--grey-600);
}
.av-svc-finance-card {
  align-self: end;               /* align the card to the bottom of the copy column */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 56px 40px;
  background: #fff;
  border-radius: 4px;
}
.av-svc-finance-logo { width: 200px; height: auto; }
.av-svc-finance-wordmark {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 44px;
  letter-spacing: -1px;
  color: #0b2a3a;
}
.av-svc-finance-note { font-size: 14px; color: var(--grey-500); }

/* Solid-blue CTA button (Swoop portal link). Scoped under .avesco to beat the
   `.avesco a { color: inherit }` reset. */
.avesco .av-btn-blue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: var(--radius);
  background: var(--blue-1);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  transition: background .2s ease, transform .2s ease;
}
.avesco .av-btn-blue:hover { background: var(--blue-2, #0f1fc8); transform: translateY(-2px); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .av-svc-block { padding: 80px 0; }
  .av-svc-head { margin-bottom: 64px; }
  .av-svc-head-icon { width: 72px; height: 72px; }
  /* All multi-col grids collapse to 2 columns. */
  .av-svc-grid--3 { grid-template-columns: repeat(2, 1fr); gap: 56px 56px; }
  .av-svc-grid-offset { grid-template-columns: repeat(2, 1fr); gap: 56px; }
  .av-svc-grid-offset > * { grid-column: auto !important; grid-row: auto !important; }
  /* Finance block goes full width once columns collapse. */
  .av-svc-finance { width: auto; margin-left: 0; padding: 48px; }
  .av-svc-finance-inner { grid-template-columns: 1fr; gap: 40px; }
  .av-svc-finance-badge { position: static; align-self: flex-start; display: inline-block; margin-bottom: 24px; }
}

@media (max-width: 760px) {
  .av-svc-block { padding: 56px 0; }
  .av-svc-hero-inner { padding-top: 72px; }
  .av-svc-anchors-inner { gap: 36px; justify-content: center; }
  .av-svc-head { flex-direction: column-reverse; align-items: flex-start; gap: 20px; margin-bottom: 48px; }
  .av-svc-grid--3,
  .av-svc-grid-offset { grid-template-columns: 1fr; gap: 44px; }
  .av-svc-finance { padding: 28px; }
}
