:root {
  --primary: #2b3440;
  --primary-dark: #1a2028;
  --secondary: #8b4513;
  --accent: #e07a2f;
  --bg: #eef1f5;
  --bg-alt: #dde3ea;
  --surface: #ffffff;
  --text: #1a2028;
  --muted: #5a6573;
  --border: #c4cdd8;
  --shadow: 0 4px 24px rgba(44, 36, 22, 0.08);
  --shadow-lg: 0 10px 40px rgba(44, 36, 22, 0.14);
  --font: "Manrope", system-ui, sans-serif;
  --display: "Unbounded", "Manrope", sans-serif;
  --radius: 14px;
  --max: 920px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 12% -10%, rgba(224, 122, 47, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 10%, rgba(139, 69, 19, 0.14), transparent 50%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-alt) 55%, #d2dae4 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(43, 52, 64, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 52, 64, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}

.hero {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: clamp(3.5rem, 12vh, 6.5rem) 0 3rem;
  flex: 1;
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3.2rem, 12vw, 5.75rem);
  letter-spacing: 0.04em;
  line-height: 0.95;
  color: var(--primary-dark);
  margin-bottom: 1.25rem;
  animation: rise 0.7s ease both;
}

.tagline {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.2rem, 3.2vw, 1.65rem);
  color: var(--primary);
  margin-bottom: 0.65rem;
  animation: rise 0.7s ease 0.08s both;
}

.lead {
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  margin-bottom: 2.5rem;
  animation: rise 0.7s ease 0.16s both;
}

.services {
  display: grid;
  gap: 0.85rem;
}

.service {
  --i: 0;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  row-gap: 0.2rem;
  align-items: start;
  padding: 1.15rem 1.25rem;
  padding-top: 2.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
  animation: rise 0.65s ease calc(0.22s + var(--i) * 0.07s) both;
}

.service:hover,
.service:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: var(--shadow-lg);
  outline: none;
}

.service:focus-visible {
  box-shadow: var(--shadow-lg), 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
}

.service__corner {
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  pointer-events: none;
}

.service__pill {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.45rem;
  border-radius: 6px;
  background: var(--bg-alt);
  color: var(--muted);
  white-space: nowrap;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Small gear center sits 17 units from the large one at 36°, so the teeth mesh.
   Both gears repeat every tooth (36° / 51.43°), which keeps loops seamless. */
.service__gears {
  --u: 1.15px;
  position: relative;
  display: block;
  width: calc(35 * var(--u));
  height: calc(31 * var(--u));
  color: var(--border);
  opacity: 0.7;
  transition:
    color 0.4s ease,
    opacity 0.4s ease,
    filter 0.4s ease;
}

.gear {
  position: absolute;
  display: block;
  fill: currentColor;
  will-change: transform;
}

.gear--lg {
  left: 0;
  top: 0;
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
}

.gear--sm {
  left: calc(16.75 * var(--u));
  top: calc(12.99 * var(--u));
  width: calc(18 * var(--u));
  height: calc(18 * var(--u));
  color: color-mix(in srgb, currentColor 75%, var(--primary-dark));
}

.service--ok .service__pill {
  background: color-mix(in srgb, #2d6a4f 18%, var(--surface));
  color: #1b5e40;
}

.service--ok .service__gears {
  color: var(--accent);
  opacity: 1;
  filter: drop-shadow(0 1px 3px color-mix(in srgb, var(--accent) 45%, transparent));
}

.service--ok .gear {
  animation-duration: 7s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.service--ok .gear--lg {
  animation-name: gear-lg-spin;
}

.service--ok .gear--sm {
  animation-name: gear-sm-spin;
}

.service--ok:hover .service__gears,
.service--ok:focus-visible .service__gears {
  filter: drop-shadow(0 1px 6px color-mix(in srgb, var(--accent) 70%, transparent));
}

.service--checking .service__pill {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  color: color-mix(in srgb, var(--accent) 80%, var(--primary-dark));
}

.service--checking .service__gears {
  color: color-mix(in srgb, var(--accent) 60%, var(--muted));
  opacity: 0.9;
}

.service--checking .gear {
  animation-duration: 1.1s;
  animation-timing-function: cubic-bezier(0.55, 0, 0.25, 1);
  animation-iteration-count: infinite;
}

.service--checking .gear--lg {
  animation-name: gear-lg-tick;
}

.service--checking .gear--sm {
  animation-name: gear-sm-tick;
}

.service--down .service__pill {
  background: color-mix(in srgb, #9b2c2c 14%, var(--surface));
  color: #7f1d1d;
}

.service--down .service__gears {
  color: color-mix(in srgb, #9b2c2c 35%, var(--muted));
  opacity: 0.75;
}

.service--down .gear {
  animation-duration: 4s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.service--down .gear--lg {
  animation-name: gear-lg-jam;
}

.service--down .gear--sm {
  animation-name: gear-sm-jam;
}

@keyframes gear-lg-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes gear-sm-spin {
  to {
    transform: rotate(-514.2857deg);
  }
}

@keyframes gear-lg-tick {
  0% {
    transform: rotate(0deg);
  }
  65%,
  100% {
    transform: rotate(36deg);
  }
}

@keyframes gear-sm-tick {
  0% {
    transform: rotate(0deg);
  }
  65%,
  100% {
    transform: rotate(-51.4286deg);
  }
}

@keyframes gear-lg-jam {
  0%,
  78%,
  100% {
    transform: rotate(0deg);
  }
  84% {
    transform: rotate(9deg);
  }
  89% {
    transform: rotate(-3deg);
  }
  94% {
    transform: rotate(1.5deg);
  }
}

@keyframes gear-sm-jam {
  0%,
  78%,
  100% {
    transform: rotate(0deg);
  }
  84% {
    transform: rotate(-12.86deg);
  }
  89% {
    transform: rotate(4.29deg);
  }
  94% {
    transform: rotate(-2.14deg);
  }
}

.service__name {
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--primary-dark);
}

.service__desc {
  color: var(--muted);
  font-size: 0.95rem;
  padding-right: 0.5rem;
}

.site-foot {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: rise 0.7s ease 0.45s both;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
}

.site-foot__meta {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.8rem;
  font-weight: 500;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 720px) {
  .services {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .service--ok .gear--lg {
    animation: gear-lg-spin 40s linear infinite !important;
  }

  .service--ok .gear--sm {
    animation: gear-sm-spin 40s linear infinite !important;
  }
}
