/* ==========================================================================
   GAK CONSTRUCTION — SERVICES PAGE  (Midnight Ocean & Rustic Ivory)
   File: public/css/services.css
   Font settings are inherited from the layout.

   Drop-in replacement: every original class name is preserved.
   Pairs with gak-theme.css — the same tokens are re-declared here with
   fallbacks so this file also works standalone.

   PALETTE
   Midnight Navy #071A3A · Ocean Blue #234B78 · Steel Blue #669BC5
   Ice Blue #B7D9EF · Denim #6593BC · Ivory #E5E0D7 · Sand #CFC7B8
   Stone #8C8A80 · Ink #0A1526

   SECTIONS
   01. Tokens & local helpers
   02. Section shell & heading
   03. Services grid
   04. Service card (3D, media, number, body, link)
   05. Empty state & buttons
   06. Pagination
   07. Bottom CTA
   08. Entrance / reveal animation
   09. Responsive
   10. Accessibility & reduced motion
   ========================================================================== */


/* ==========================================================================
   01. TOKENS & LOCAL HELPERS
   ========================================================================== */
:root {
  /* Palette (safe to re-declare — same values as gak-theme.css) */
  --gak-navy:    #071A3A;
  --gak-navy-2:  #04101F;
  --gak-navy-3:  #102E5C;
  --gak-ocean:   #234B78;
  --gak-steel:   #669BC5;
  --gak-denim:   #6593BC;
  --gak-ice:     #B7D9EF;
  --gak-ice-50:  #DCEBF7;
  --gak-ivory:   #E5E0D7;
  --gak-ivory-50:#F5F2EB;
  --gak-sand:    #CFC7B8;
  --gak-stone:   #8C8A80;
  --gak-ink:     #0A1526;
  --gak-muted:   #5C6A7A;
  --gak-line:    rgba(35, 75, 120, .14);
  --gak-line-2:  rgba(35, 75, 120, .26);

  /* Gradients */
  --gak-grad-navy: linear-gradient(150deg, #04101F 0%, #071A3A 34%, #234B78 82%, #2F5C8A 100%);
  --gak-grad-ice:  linear-gradient(180deg, #E4F1FA 0%, #B7D9EF 50%, #669BC5 100%);
  --gak-grad-sheen:linear-gradient(115deg, transparent 26%, rgba(255,255,255,.6) 46%, transparent 64%);
  --gak-grad-text: linear-gradient(100deg, #FFFFFF 0%, #DDEBF7 44%, #B7D9EF 100%);

  /* Elevation */
  --gak-e1: 0 1px 2px rgba(7,26,58,.06), 0 2px 6px rgba(7,26,58,.05);
  --gak-e2: 0 4px 10px -2px rgba(7,26,58,.10), 0 12px 24px -12px rgba(7,26,58,.16);
  --gak-e3: 0 10px 24px -8px rgba(7,26,58,.18), 0 30px 60px -30px rgba(7,26,58,.30);
  --gak-e4: 0 18px 40px -12px rgba(7,26,58,.26), 0 50px 90px -40px rgba(7,26,58,.40);
  --gak-bevel: inset 0 1px 0 rgba(255,255,255,.9);

  /* Motion */
  --gak-ease: cubic-bezier(.16, 1, .3, 1);
  --gak-t: .4s var(--gak-ease);

  /* Textures */
  --gak-tex-plaster: url("../img/textures/plaster.jpg");
  --gak-tex-denim:   url("../img/textures/denim.jpg");

  /* SVG grain */
  --gak-grain: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='.55'/%3E%3C/svg%3E");

  /* SVG diagonal twill (denim weave) */
  --gak-twill: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M-2 6 6-2M2 10 10 2' stroke='%23669BC5' stroke-opacity='.5' stroke-width='1'/%3E%3C/svg%3E");

  /* SVG arrow (services icon fallback / links) */
  --gak-ic-arrow: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6'/%3E%3C/svg%3E");
}

/* Grain overlay helper (never 404s, pure SVG) */
.gak-grain { position: relative; isolation: isolate; }
.gak-grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: var(--gak-grain);
  background-size: 180px 180px;
  opacity: .05;
  mix-blend-mode: multiply;
  border-radius: inherit;
}


/* ==========================================================================
   02. SECTION SHELL & HEADING
   ========================================================================== */
.gak-services-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(58px, 7vw, 104px) 0;
  background:
    radial-gradient(110% 70% at 50% 0%, rgba(255, 255, 255, .72), rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, #F8F5EE 0%, var(--gak-ivory-50) 45%, #EFEAE1 100%);
}

/* your ivory plaster photo, pushed back to a whisper */
.gak-services-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--gak-tex-plaster) center/cover no-repeat;
  opacity: .42;
  mix-blend-mode: multiply;
  filter: contrast(.92) brightness(1.07);
  mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
}

/* atmospheric navy glow, top-right — the "soft fade" of the reference */
.gak-services-section::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -18%;
  right: -10%;
  width: 46vw;
  height: 46vw;
  max-width: 720px;
  max-height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(102, 155, 197, .26), transparent 66%);
  filter: blur(46px);
  pointer-events: none;
  animation: gakDrift 24s var(--gak-ease) infinite alternate;
}

/* Section heading */
.gak-services-heading {
  position: relative;
  max-width: 740px;
  margin: 0 auto clamp(32px, 4vw, 52px);
  text-align: center;
}

/* Label — glass pill with a bevel instead of bare text */
.gak-services-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  padding: 7px 16px 7px 14px;
  border: 1px solid var(--gak-line-2);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.62));
  box-shadow: var(--gak-e1), var(--gak-bevel);
  color: var(--gak-ocean);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.gak-services-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gak-steel);
  box-shadow: 0 0 0 3px rgba(102, 155, 197, .22);
}

.gak-services-heading h2,
.gak-services-cta h2 {
  margin: 0 0 16px;
  color: var(--gak-navy);
  font-size: clamp(28px, 3.6vw, 46px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.gak-services-heading p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--gak-muted);
  font-size: clamp(.96rem, 1.1vw, 1.04rem);
  line-height: 1.8;
}


/* ==========================================================================
   03. SERVICES GRID
   ========================================================================== */
.gak-services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.2vw, 30px);
  perspective: 1600px;   /* gives the child tilt real depth */
}


/* ==========================================================================
   04. SERVICE CARD — 3D
   ========================================================================== */
.gak-service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--gak-line);
  border-radius: 18px;
  background: linear-gradient(180deg, #FFFFFF, #FBFAF6);
  box-shadow: var(--gak-e1), var(--gak-bevel);
  transform-style: preserve-3d;
  transition:
    transform .55s var(--gak-ease),
    box-shadow .55s var(--gak-ease),
    border-color .55s var(--gak-ease);
}

/* top bevel light line */
.gak-service-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 4;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(102, 155, 197, .95), transparent);
  opacity: 0;
  transition: opacity .55s var(--gak-ease);
}

/* cursor-following glow sheen */
.gak-service-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: -28%;
  right: -24%;
  width: 82%;
  height: 92%;
  border-radius: 50%;
  background: radial-gradient(circle at var(--mx, 72%) var(--my, 16%),
              rgba(183, 217, 239, .62), transparent 66%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s var(--gak-ease);
}

.gak-service-card:hover,
.gak-service-card:focus-within {
  transform: perspective(1000px) rotateX(4deg) rotateY(-5deg) translateY(-10px) scale(1.012);
  border-color: rgba(102, 155, 197, .55);
  box-shadow: var(--gak-e4), var(--gak-bevel);
}
.gak-service-card:hover::before,
.gak-service-card:focus-within::before { opacity: 1; }
.gak-service-card:hover::after,
.gak-service-card:focus-within::after { opacity: 1; }

/* Media */
.gak-service-card__media {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #E9F0F6, #CFDEEA);
}

.gak-service-card__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.9) contrast(1.04);
  transform: scale(1.001);
  transition: transform .95s var(--gak-ease), filter .6s var(--gak-ease);
}

/* navy veil so the white number badge always reads */
.gak-service-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 26, 58, 0) 44%, rgba(7, 26, 58, .5) 100%);
  opacity: .85;
  transition: opacity .55s var(--gak-ease);
  pointer-events: none;
}

.gak-service-card:hover .gak-service-card__media img {
  transform: scale(1.07);
  filter: saturate(1.06) contrast(1.06);
}
.gak-service-card:hover .gak-service-card__media::after { opacity: 1; }

/* Placeholder when no image */
.gak-service-card__placeholder {
  display: flex;
  flex: 0 0 auto;
  aspect-ratio: 4 / 3;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  color: var(--gak-ice);
  background:
    var(--gak-twill),
    var(--gak-grad-navy);
  background-size: 8px 8px, cover;
  position: relative;
  overflow: hidden;
}
.gak-service-card__placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--gak-grain);
  background-size: 180px 180px;
  opacity: .18;
  mix-blend-mode: overlay;
}
.gak-service-card__placeholder i,
.gak-service-card__placeholder svg {
  position: relative;
  font-size: 44px;
  line-height: 1;
  opacity: .92;
}
.gak-service-card__placeholder svg { width: 52px; height: 52px; stroke: currentColor; }

/* Decorative number — floating 3D tile */
.gak-service-card__number {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, .28);
  color: #fff;
  background: linear-gradient(165deg, rgba(255,255,255,.22), rgba(255,255,255,.06));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .35),
    0 12px 24px -12px rgba(0, 0, 0, .9);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  backdrop-filter: blur(14px);
  transition: transform .55s var(--gak-ease), background .55s var(--gak-ease);
}
.gak-service-card:hover .gak-service-card__number {
  transform: translateZ(34px) translateY(-3px) rotate(-4deg);
  background: linear-gradient(165deg, rgba(183, 217, 239, .95), rgba(102, 155, 197, .85));
  color: var(--gak-navy);
  border-color: rgba(255, 255, 255, .7);
}

/* Body */
.gak-service-card__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(22px, 2.2vw, 28px) clamp(20px, 2.2vw, 26px) clamp(18px, 2vw, 22px);
}

.gak-service-card__body h3 {
  margin: 0 0 12px;
  color: var(--gak-navy);
  font-size: clamp(19px, 1.7vw, 22px);
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -.02em;
  transition: color var(--gak-t);
}
.gak-service-card:hover .gak-service-card__body h3 { color: var(--gak-ocean); }

.gak-service-card__body p {
  margin: 0 0 20px;
  color: var(--gak-muted);
  font-size: .93rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

/* Link row */
.gak-service-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--gak-line);
  color: var(--gak-ocean);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color var(--gak-t), border-color var(--gak-t);
}

.gak-service-link span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: linear-gradient(180deg, #EFF6FC, #DCEAF6);
  box-shadow: inset 0 1px 0 #fff, 0 6px 12px -8px rgba(35, 75, 120, .55);
  color: var(--gak-ocean);
  font-size: 15px;
  transition: transform .4s var(--gak-ease), background .4s var(--gak-ease),
              color .4s var(--gak-ease), box-shadow .4s var(--gak-ease);
}

.gak-service-link:hover { color: var(--gak-steel); border-color: rgba(102, 155, 197, .4); }
.gak-service-link:hover span {
  transform: translateX(4px) scale(1.06);
  background: linear-gradient(180deg, var(--gak-navy-3), var(--gak-navy));
  color: var(--gak-ice);
  box-shadow: 0 10px 20px -10px rgba(7, 26, 58, .9);
}


/* ==========================================================================
   05. EMPTY STATE & BUTTONS
   ========================================================================== */
.gak-services-empty {
  grid-column: 1 / -1;
  padding: clamp(40px, 5vw, 70px) 26px;
  border: 1px dashed rgba(102, 155, 197, .55);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(241, 245, 248, .94));
  box-shadow: var(--gak-e2);
  text-align: center;
}
.gak-services-empty > i {
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 20px;
  border-radius: 18px;
  background: linear-gradient(160deg, #EAF2F9, #C9DEEE);
  box-shadow: var(--gak-bevel), 0 14px 26px -16px rgba(35, 75, 120, .7);
  color: var(--gak-ocean);
  font-size: 30px;
}
.gak-services-empty h2 {
  margin: 0 0 12px;
  color: var(--gak-navy);
  font-size: clamp(21px, 2.2vw, 27px);
  font-weight: 780;
  letter-spacing: -.025em;
}
.gak-services-empty p {
  max-width: 560px;
  margin: 0 auto 26px;
  color: var(--gak-muted);
  font-size: .95rem;
  line-height: 1.8;
}

/* Shared button — lacquered navy 3D */
.gak-services-button,
.gak-services-cta__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  overflow: hidden;
  padding: 15px 26px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(180deg, var(--gak-navy-3), var(--gak-navy) 62%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    inset 0 -2px 0 rgba(0, 0, 0, .28),
    0 10px 20px -10px rgba(7, 26, 58, .7),
    0 2px 4px rgba(7, 26, 58, .25);
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
  text-decoration: none;
  transition: transform .25s var(--gak-ease), box-shadow .25s var(--gak-ease),
              background .25s var(--gak-ease);
}

/* light sweep */
.gak-services-button::after,
.gak-services-cta__button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gak-grad-sheen);
  transform: translateX(-130%);
  transition: transform .85s var(--gak-ease);
}

.gak-services-button:hover,
.gak-services-cta__button:hover {
  color: #fff;
  transform: translateY(-2px);
  background: linear-gradient(180deg, var(--gak-ocean), var(--gak-navy-3) 70%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -2px 0 rgba(0, 0, 0, .3),
    0 18px 30px -12px rgba(7, 26, 58, .75);
}
.gak-services-button:hover::after,
.gak-services-cta__button:hover::after { transform: translateX(130%); }

.gak-services-button:active,
.gak-services-cta__button:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35), 0 4px 10px -6px rgba(7, 26, 58, .6);
}

/* Ice variant (used on the dark CTA) */
.gak-services-cta__button {
  flex: 0 0 auto;
  color: var(--gak-navy);
  background: var(--gak-grad-ice);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .85),
    inset 0 -2px 0 rgba(7, 26, 58, .18),
    0 16px 30px -16px rgba(183, 217, 239, .85);
}
.gak-services-cta__button:hover {
  color: var(--gak-navy);
  background: linear-gradient(180deg, #EAF4FB, #CFE5F4 50%, #7FADD4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 20px 36px -16px rgba(183, 217, 239, .95);
}


/* ==========================================================================
   06. PAGINATION
   ========================================================================== */
.gak-services-pagination {
  display: flex;
  justify-content: center;
  margin-top: clamp(34px, 4vw, 52px);
}

.gak-services-pagination .pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gak-services-pagination .page-link {
  display: flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 1px solid var(--gak-line);
  border-radius: 10px;
  color: var(--gak-ocean);
  background: linear-gradient(180deg, #fff, #F7F7F3);
  box-shadow: var(--gak-e1), var(--gak-bevel);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .22s var(--gak-ease), background .22s var(--gak-ease),
              color .22s var(--gak-ease), border-color .22s var(--gak-ease);
}

.gak-services-pagination .page-link:hover {
  color: #fff;
  background: var(--gak-grad-navy);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 12px 22px -14px rgba(7, 26, 58, .85);
}

.gak-services-pagination .active .page-link {
  color: #fff;
  background: var(--gak-grad-navy);
  border-color: transparent;
  box-shadow: 0 12px 22px -14px rgba(7, 26, 58, .85), var(--gak-bevel);
}

.gak-services-pagination .disabled .page-link {
  color: #A7B2BC;
  background: #F4F5F3;
  box-shadow: none;
  pointer-events: none;
}


/* ==========================================================================
   07. BOTTOM CTA
   ========================================================================== */
.gak-services-cta-section {
  position: relative;
  padding: clamp(14px, 2vw, 26px) 0 clamp(56px, 6vw, 92px);
  background: #EFEAE1;
}

.gak-services-cta {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 48px);
  overflow: hidden;
  padding: clamp(32px, 4.8vw, 60px) clamp(26px, 4.4vw, 56px);
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(90% 140% at 8% 0%, rgba(102, 155, 197, .55), transparent 60%),
    radial-gradient(80% 120% at 96% 110%, rgba(183, 217, 239, .26), transparent 62%),
    var(--gak-grad-navy);
  box-shadow: var(--gak-e4);
}

/* denim twill texture, the second of your two reference images */
.gak-services-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--gak-tex-denim) center/cover no-repeat;
  opacity: .26;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* grain + a hairline light edge on the left (replaces the flat gold border) */
.gak-services-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--gak-grain);
  background-size: 180px 180px;
  opacity: .12;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.gak-services-cta__content {
  position: relative;
  max-width: 660px;
}

.gak-services-cta h2 {
  color: #fff;
  font-size: clamp(25px, 3.2vw, 40px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.14;
  margin-bottom: 14px;
}

.gak-services-cta p {
  margin: 0;
  color: #C6D6E4;
  font-size: clamp(.95rem, 1.1vw, 1.02rem);
  line-height: 1.8;
}

/* small eyebrow inside the CTA, if your template has one */
.gak-services-cta .gak-services-label {
  border-color: rgba(183, 217, 239, .38);
  background: rgba(183, 217, 239, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
  color: #EAF4FC;
}
.gak-services-cta .gak-services-label::before { background: var(--gak-ice); }


/* ==========================================================================
   08. ENTRANCE / REVEAL ANIMATION
   ========================================================================== */

/* Cards and heading rise in. Add .is-visible via IntersectionObserver,
   or just leave it — a CSS-only fallback (below) handles no-JS. */
@media (prefers-reduced-motion: no-preference) {
  .gak-services-heading,
  .gak-service-card,
  .gak-services-empty,
  .gak-services-cta,
  .gak-services-pagination {
    opacity: 0;
    transform: translateY(26px);
    animation: gakRise .8s var(--gak-ease) forwards;
    animation-delay: calc(var(--i, 0) * 90ms);
  }

  /* stagger the grid automatically — no extra markup needed */
  .gak-services-grid .gak-service-card:nth-child(1) { --i: 0; }
  .gak-services-grid .gak-service-card:nth-child(2) { --i: 1; }
  .gak-services-grid .gak-service-card:nth-child(3) { --i: 2; }
  .gak-services-grid .gak-service-card:nth-child(4) { --i: 3; }
  .gak-services-grid .gak-service-card:nth-child(5) { --i: 4; }
  .gak-services-grid .gak-service-card:nth-child(6) { --i: 5; }
  .gak-services-grid .gak-service-card:nth-child(7) { --i: 6; }
  .gak-services-grid .gak-service-card:nth-child(8) { --i: 7; }
  .gak-services-grid .gak-service-card:nth-child(9) { --i: 8; }

  /* once revealed, keep the hover transform authoritative */
  .gak-services-grid .gak-service-card.gak-revealed { animation-fill-mode: both; }
}

@keyframes gakRise {
  from { opacity: 0; transform: translateY(26px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

@keyframes gakDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-3vw, 2vw, 0) scale(1.12); }
}

/* Optional scroll-driven reveal — Chrome/Edge 115+, zero JS */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .gak-service-card {
      animation: gakRise linear both;
      animation-timeline: view();
      animation-range: entry 4% cover 24%;
      animation-delay: 0ms;
    }
  }
}


/* ==========================================================================
   09. RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .gak-services-cta { gap: 32px; }
}

/* Tablet */
@media (max-width: 991px) {
  .gak-services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(16px, 2.4vw, 22px);
  }

  .gak-services-cta {
    padding: clamp(26px, 4vw, 38px);
  }

  .gak-service-card:hover,
  .gak-service-card:focus-within {
    transform: translateY(-6px);   /* flatten the tilt on coarse pointers */
  }
}

/* Small tablet / large phone */
@media (max-width: 767px) {
  .gak-services-section {
    padding: clamp(44px, 10vw, 62px) 0;
  }

  .gak-services-heading {
    margin-bottom: 30px;
  }

  .gak-services-label {
    font-size: .66rem;
    letter-spacing: .13em;
    padding: 6px 13px 6px 11px;
  }

  .gak-services-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    perspective: none;
  }

  .gak-service-card__media,
  .gak-service-card__placeholder {
    aspect-ratio: 16 / 10;
  }

  .gak-service-card:hover,
  .gak-service-card:focus-within {
    transform: none;
    box-shadow: var(--gak-e3), var(--gak-bevel);
  }
  .gak-service-card:active { transform: scale(.995); }

  .gak-service-card__body {
    padding: 20px 18px 16px;
  }

  .gak-service-card__number {
    width: 42px;
    height: 42px;
    right: 12px;
    bottom: 12px;
  }
  .gak-service-card:hover .gak-service-card__number { transform: none; }

  .gak-services-cta-section {
    padding: 10px 0 clamp(46px, 9vw, 62px);
  }

  .gak-services-cta {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
    padding: 26px 20px;
    border-radius: 18px;
  }

  .gak-services-cta__button {
    width: 100%;
    white-space: normal;
  }

  .gak-services-button { width: 100%; }
}

/* Very small phones */
@media (max-width: 420px) {
  .gak-services-pagination .page-link {
    min-width: 38px;
    min-height: 38px;
    padding: 5px 9px;
    font-size: .82rem;
  }
  .gak-services-empty { padding: 34px 18px; }
  .gak-services-empty > i { width: 58px; height: 58px; font-size: 26px; }
}


/* ==========================================================================
   10. ACCESSIBILITY
   ========================================================================== */
.gak-service-card a:focus-visible,
.gak-services-button:focus-visible,
.gak-services-cta__button:focus-visible,
.gak-services-pagination .page-link:focus-visible {
  outline: 2px solid var(--gak-steel);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .gak-services-section::after { animation: none; }

  .gak-services-heading,
  .gak-service-card,
  .gak-services-empty,
  .gak-services-cta,
  .gak-services-pagination {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    filter: none !important;
  }

  .gak-service-card:hover,
  .gak-service-card:focus-within {
    transform: translateY(-4px) !important;
  }

  .gak-service-card__media img,
  .gak-service-card__number,
  .gak-service-link span { transition-duration: .01ms !important; }
}

@media (prefers-contrast: more) {
  .gak-service-card { border-width: 2px; }
  .gak-service-card__body p,
  .gak-services-heading p,
  .gak-services-empty p { color: #3E4C5B; }
  .gak-service-card__body h3 { color: #04101F; }
}

@media print {
  .gak-services-section { background: #fff; padding: 12mm 0; }
  .gak-services-section::before,
  .gak-services-section::after,
  .gak-services-cta::before,
  .gak-services-cta::after { display: none !important; }
  .gak-service-card,
  .gak-services-cta { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .gak-services-cta { color: #000; background: #fff !important; }
  .gak-services-cta h2 { color: #000; -webkit-text-fill-color: #000; }
  .gak-services-cta p { color: #333; }
}
