#services {
  --service-ink: var(--reading-ink);
  --service-gold: #d5b475;
  padding-block: clamp(46px, 5vw, 76px);
  background:
    radial-gradient(ellipse at 98% 0%, #eddfc27a, transparent 42%),
    radial-gradient(ellipse at 0% 68%, #e7ebdd80, transparent 35%),
    #faf7ef;
  color: var(--service-ink);
}

#services > .shell {
  width: calc(100% - clamp(88px, 10vw, 160px));
  max-width: 1060px;
  margin-inline: auto;
}

#services .services-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: .65em;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font: 700 16px/1.5 var(--display-type);
  letter-spacing: .09em;
}

#services .services-kicker [lang="en"] {
  font: 600 11px/1.5 Georgia, serif;
  letter-spacing: .24em;
}

#services .split-head {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
  margin-bottom: clamp(28px, 3vw, 44px);
}

#services .section-title {
  position: relative;
  padding-bottom: 14px;
  color: var(--service-ink);
  font-size: clamp(31px, 3.3vw, 44px);
  font-weight: 700;
  line-height: 1.27;
}

#services .section-title::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 56%;
  height: 13px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 14' preserveAspectRatio='none'%3E%3Cpath d='M2 11Q104 1 155 3Q170 4 142 11Q135 14 148 12Q225 3 298 8' fill='none' stroke='%23899e72' stroke-width='2.1' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

#services .service-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 38px);
}

#services .service-tile {
  --card-tint: #e0e5cb;
  --card-arch: #b8c39360;
  --art-position: left top;
  --card-pad: clamp(18px, 1.8vw, 27px);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: start;
  column-gap: 0;
  row-gap: 15px;
  min-height: clamp(220px, 17.5vw, 248px);
  padding: var(--card-pad);
  overflow: hidden;
  border: 1px solid #fffdf6;
  border-radius: 21px;
  background:
    radial-gradient(ellipse 45% 115% at 96% 86%, var(--card-arch) 0 87%, transparent 88%),
    linear-gradient(112deg, #fffcf6 23%, var(--card-tint));
  box-shadow: 0 10px 24px -15px #50412f75, 0 2px 6px #50412f0d;
  color: var(--service-ink);
  transform: none;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

#services .service-tile[href="#web"] {
  --card-tint: #f6e7cc;
  --card-arch: #eccb8954;
  --art-position: right top;
}

#services .service-tile[href="#promotion"] {
  --card-tint: #f6dfc8;
  --card-arch: #eabf9859;
  --art-position: left bottom;
}

#services .service-tile[href="#ai"] {
  --card-tint: #e3e6d5;
  --card-arch: #b9c4a259;
  --art-position: right bottom;
}

#services .service-card-content {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
}

#services .tile-title { gap: 5px 11px; }

#services .service-number {
  color: #547450;
  font: italic 400 clamp(23px, 2.15vw, 32px)/1 Georgia, serif;
  font-variant-numeric: lining-nums;
}

#services .tile-title h3 {
  color: var(--service-ink);
  font-family: var(--display-type);
  font-size: clamp(20px, 1.85vw, 27px);
  font-weight: 700;
  line-height: 1.28;
}

#services .free-label {
  padding: 3px 9px;
  border-radius: 999px;
  background: #f0d492;
  color: #493c20;
  font-size: 11px;
  white-space: nowrap;
}

#services .service-card-content > p {
  max-width: none;
  margin-top: 9px;
  color: var(--reading-muted);
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.65;
}

#services .service-card-content ul {
  gap: 5px 12px;
  margin: 9px 0 0;
  padding: 0;
}

#services .service-card-content li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--reading-muted);
  font-size: clamp(12px, 1vw, 13px);
}

#services .service-card-content li::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #899762;
}

#services .tile-link {
  grid-area: 2 / 1;
  position: relative;
  z-index: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  min-height: 44px;
  padding: 0 0 0 18px;
  border: 1px solid var(--service-gold);
  border-radius: 999px;
  background: #234934;
  color: #fffdf1;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 200ms ease;
}

#services .tile-link > span:first-child {
  font-size: clamp(13px, 1.12vw, 16px);
}

#services .service-arrow {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  margin: -1px;
  border: 1px solid var(--service-gold);
  border-radius: 50%;
  background: #173d2a;
}

#services .service-arrow svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 220ms ease;
}

#services .service-art {
  position: absolute;
  inset-inline-end: 0;
  inset-block-end: 0;
  width: min(42%, 245px);
  aspect-ratio: 1;
  pointer-events: none;
  background: url("./assets/home/service-illustrations.webp") var(--art-position) / 200% 200% no-repeat;
  transform-origin: 75% 75%;
  transition: transform 300ms ease;
}

#services .service-tile:focus-visible {
  outline: 2px solid #28654b;
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  #services .service-tile:hover {
    transform: translateY(-4px);
    border-color: #a3b191;
    box-shadow: 0 18px 32px -17px #50412f8f;
  }

  #services .service-tile:hover .service-art { transform: translateY(-3px) scale(1.035); }
  #services .service-tile:hover .tile-link { background-color: #2c5a40; }
  #services .service-tile:hover .service-arrow svg { transform: translateX(3px); }
}

#services .service-tile:active { transform: translateY(1px); }
#services .service-tile:active .tile-link,
#services .service-tile:focus-visible .tile-link { background-color: #306447; }

@media (max-width: 900px) {
  #services > .shell { width: min(640px, calc(100% - 40px)); }
  #services .service-grid { grid-template-columns: 1fr; gap: 26px; }
  #services .service-tile { --card-pad: 20px; }
}

@media (max-width: 520px) {
  #services > .shell { width: calc(100% - 40px); }
  #services .service-tile {
    --card-pad: 17px;
    grid-template-rows: auto minmax(76px, 1fr);
    row-gap: 7px;
    min-height: 200px;
  }

  #services .service-card-content { grid-column: 1 / -1; }
  #services .tile-link { align-self: end; }
  #services .service-art { width: min(40%, 112px); }
}

@media (prefers-reduced-motion: reduce) {
  #services .service-tile,
  #services .service-art,
  #services .tile-link,
  #services .service-arrow svg { transition: none; }

  #services .service-tile:is(:hover, :active),
  #services .service-tile:hover .service-art,
  #services .service-tile:hover .service-arrow svg { transform: none; }
}

@media print {
  #services, #services .service-tile { background: white; }
  #services .service-tile { border-color: #c6cdbb; box-shadow: none; }
  #services .tile-link, #services .service-arrow { background: white; color: #173b2b; }
}
