:root {
  --blue: #397698;
  --blue-deep: #265a76;
  --yellow: #eace72;
  --orange: #efa117;
  --orange-red: #eb4f27;
  --red: #c92325;
  --ink: #173342;
  --paper: #f8f5ee;
  --white: #fffdf9;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 5%, rgb(234 206 114 / 24%), transparent 29rem),
    linear-gradient(145deg, #fffdf9 0%, var(--paper) 70%);
  font-family: Inter, Montserrat, "Segoe UI", sans-serif;
}

.background-shape {
  position: fixed;
  z-index: 0;
  pointer-events: none;
}

.background-shape--blue {
  top: -18rem;
  left: -15rem;
  width: 34rem;
  height: 34rem;
  border: 5rem solid rgb(57 118 152 / 9%);
  border-radius: 50%;
}

.background-shape--warm {
  right: -5rem;
  bottom: -9rem;
  width: 21rem;
  height: 24rem;
  background: rgb(235 79 39 / 7%);
  clip-path: polygon(56% 0, 100% 100%, 0 79%);
  transform: rotate(-8deg);
}

.page-shell {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(1180px, calc(100% - 48px));
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(32px, 6vh, 72px) 0 28px;
  flex-direction: column;
}

.hero {
  display: grid;
  grid-template-columns: 146px 1fr;
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
  max-width: 820px;
}

.hero__logo {
  display: block;
  width: 146px;
  height: 146px;
  border-radius: 50%;
  box-shadow: 0 16px 40px rgb(38 90 118 / 13%);
}

.hero__copy {
  min-width: 0;
}

.hero__eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.65rem);
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.hero__lead {
  margin: 16px 0 0;
  color: rgb(23 51 66 / 65%);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.service-grid {
  display: grid;
  margin: clamp(42px, 7vh, 78px) 0 42px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  position: relative;
  display: flex;
  min-height: 272px;
  padding: 24px;
  overflow: hidden;
  border-radius: 26px;
  color: var(--white);
  text-decoration: none;
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.service-card::before {
  position: absolute;
  inset: auto -15% -42% 23%;
  height: 84%;
  border-radius: 50%;
  background: rgb(255 255 255 / 11%);
  content: "";
  transform: rotate(-16deg);
  transition: transform 280ms ease;
}

.service-card--blue {
  background: linear-gradient(145deg, var(--blue) 0%, var(--blue-deep) 100%);
  box-shadow: 0 18px 40px rgb(57 118 152 / 19%);
}

.service-card--yellow {
  color: #4b3d18;
  background: linear-gradient(145deg, #f0d87e 0%, var(--orange) 135%);
  box-shadow: 0 18px 40px rgb(239 161 23 / 18%);
}

.service-card--red {
  background: linear-gradient(145deg, var(--orange-red) 0%, var(--red) 125%);
  box-shadow: 0 18px 40px rgb(201 35 37 / 17%);
}

.service-card--orange {
  background: linear-gradient(145deg, var(--orange) 0%, var(--orange-red) 125%);
  box-shadow: 0 18px 40px rgb(235 79 39 / 17%);
}

.service-card:hover {
  z-index: 2;
  transform: translateY(-7px);
}

.service-card:hover::before {
  transform: rotate(-9deg) scale(1.08);
}

.service-card:focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 5px;
}

.service-card__icon {
  position: absolute;
  top: 22px;
  left: 22px;
  display: grid;
  width: 54px;
  height: 54px;
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 17px;
  background: rgb(255 255 255 / 14%);
  place-items: center;
}

.service-card--yellow .service-card__icon {
  border-color: rgb(75 61 24 / 16%);
  background: rgb(255 255 255 / 27%);
}

.service-card__icon svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.service-card__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-self: flex-end;
  flex-direction: column;
}

.service-card__number {
  margin-bottom: 10px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  opacity: 0.63;
}

.service-card__title {
  max-width: 12ch;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.service-card__url {
  margin-top: 12px;
  font-size: 0.9rem;
  opacity: 0.72;
}

.service-card__arrow {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 2rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.service-card:hover .service-card__arrow {
  transform: translate(3px, -3px);
}

footer {
  display: flex;
  margin-top: auto;
  align-items: center;
  gap: 14px;
  color: rgb(23 51 66 / 55%);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.footer__line {
  width: 36px;
  height: 2px;
  background: var(--orange-red);
}

@media (max-width: 1000px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-card__title {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 190px;
  }

  .service-card__title {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 28px, 1180px);
    padding-top: 28px;
  }

  .hero {
    grid-template-columns: 88px 1fr;
    gap: 18px;
  }

  .hero__logo {
    width: 88px;
    height: 88px;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3.15rem);
  }

  .hero__eyebrow {
    font-size: 0.63rem;
  }

  .hero__lead {
    grid-column: 1 / -1;
  }

  .service-grid {
    margin-top: 38px;
  }

  .service-card {
    min-height: 176px;
    border-radius: 22px;
  }

  .service-card__title {
    padding-right: 24px;
    font-size: 1.45rem;
  }

  .service-card__number {
    display: none;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .footer__line {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
