:root {
  --ink: #13231d;
  --muted: #5c6c64;
  --border: rgba(19, 35, 29, 0.14);
  --shadow: 0 22px 60px rgba(36, 28, 18, 0.15);
  --radius-lg: 22px;
  --font-display: "Avenir Next Condensed", "Franklin Gothic Medium", "Trebuchet MS", sans-serif;
  --font-body: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(220, 150, 89, 0.28), transparent 34%),
    radial-gradient(circle at 85% 12%, rgba(76, 134, 108, 0.2), transparent 28%),
    linear-gradient(180deg, #efe6d7 0%, #f8f3ea 38%, #ece4d8 100%);
  color: var(--ink);
  font-family: var(--font-body);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(19, 35, 29, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 35, 29, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 80%);
}

.page-shell {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 18px 56px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--muted);
}

h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.section-head {
  margin: 0 0 18px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.section-head.compact h2 {
  font-size: clamp(2.4rem, 4vw, 4rem);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  position: relative;
  grid-column: span 4;
  min-height: 238px;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(19, 35, 29, 0.11);
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.95), rgba(252, 248, 241, 0.84));
  box-shadow: 0 14px 34px rgba(27, 22, 15, 0.08);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  animation: rise-in 520ms ease both;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.service-card::after {
  content: "";
  position: absolute;
  inset: auto -18% -28% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  opacity: 0.11;
  background: currentColor;
}

.service-card:hover,
.service-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 24px 46px rgba(27, 22, 15, 0.13);
  border-color: rgba(19, 35, 29, 0.2);
}

.card-top,
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.service-logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(19, 35, 29, 0.08);
}

.service-logo svg {
  width: 32px;
  height: 32px;
}

.initials {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.tag {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(19, 35, 29, 0.06);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.service-card h3 {
  margin-top: 18px;
  font-size: 2rem;
}

.service-card p {
  margin: 10px 0 0;
  max-width: 28ch;
  line-height: 1.55;
  color: rgba(19, 35, 29, 0.72);
}

.card-meta {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  font-size: 0.9rem;
  color: rgba(19, 35, 29, 0.72);
}

.accent-claw { color: #1d6d67; }
.accent-elevation { color: #9b5a2e; }
.accent-harvester { color: #5a6f3a; }
.accent-rancher { color: #235ea8; }
.accent-homeassistant { color: #d46c1a; }
.accent-homebridge { color: #7b4fc7; }
.accent-scrypted { color: #d04365; }

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

@media (max-width: 1100px) {
  .service-card {
    grid-column: span 6;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 14px 14px 42px;
  }

  .service-card {
    grid-column: 1 / -1;
    min-height: 210px;
    padding: 18px;
    border-radius: 22px;
  }

  .card-meta {
    left: 18px;
    right: 18px;
    bottom: 16px;
  }

  .section-head.compact h2 {
    font-size: 2.4rem;
  }
}
