@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Outfit:wght@600;700;800&display=swap');

:root {
  --wall-gap: clamp(10px, 0.95vw, 18px);
  --tile-scale: 1;
  --text: #ecf4ef;
  --muted: #a8bbb2;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #b8ff5a;
  --badge: #ff5b63;
  --page-top: #081512;
  --page-bottom: #0e1b18;
  --glow-a: rgba(184, 255, 90, 0.18);
  --glow-b: rgba(255, 140, 105, 0.2);
  --glow-c: rgba(64, 208, 171, 0.16);
  --overlay-top: rgba(6, 12, 11, 0.08);
  --overlay-bottom: rgba(6, 12, 11, 0.42);
  --footer-text: rgba(255, 255, 255, 0.78);
  --image-opacity: 0.28;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  background: var(--page-bottom);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.wall-page {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.wall-page::before,
.wall-page::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.wall-page::before {
  z-index: -3;
  background:
    radial-gradient(circle at 14% 18%, var(--glow-a), transparent 30%),
    radial-gradient(circle at 84% 18%, var(--glow-b), transparent 28%),
    radial-gradient(circle at 52% 82%, var(--glow-c), transparent 34%),
    linear-gradient(180deg, var(--page-top) 0%, var(--page-bottom) 100%);
}

.wall-page::after {
  z-index: -1;
  background: linear-gradient(180deg, var(--overlay-top), var(--overlay-bottom));
}

.wall-page__image {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: var(--image-opacity);
  filter: saturate(1.05) contrast(1.03);
  transform: scale(1.03);
}

.wall-page--aurora {
  --text: #ecf4ef;
  --muted: #a8bbb2;
  --accent: #b8ff5a;
  --page-top: #081512;
  --page-bottom: #0e1b18;
  --glow-a: rgba(184, 255, 90, 0.18);
  --glow-b: rgba(255, 140, 105, 0.2);
  --glow-c: rgba(64, 208, 171, 0.16);
}

.wall-page--ocean {
  --text: #eef7ff;
  --muted: #9db5ca;
  --accent: #7df5ff;
  --page-top: #071521;
  --page-bottom: #07111b;
  --glow-a: rgba(70, 181, 255, 0.24);
  --glow-b: rgba(71, 255, 224, 0.16);
  --glow-c: rgba(110, 104, 255, 0.18);
}

.wall-page--ember {
  --text: #fff1e8;
  --muted: #d8af98;
  --accent: #ffd36f;
  --page-top: #24100b;
  --page-bottom: #160805;
  --glow-a: rgba(255, 111, 76, 0.24);
  --glow-b: rgba(255, 197, 95, 0.18);
  --glow-c: rgba(255, 78, 95, 0.14);
}

.wall-page--graphite {
  --text: #f4f7f8;
  --muted: #adb6bb;
  --accent: #ffffff;
  --page-top: #17191b;
  --page-bottom: #101113;
  --glow-a: rgba(255, 255, 255, 0.11);
  --glow-b: rgba(123, 142, 156, 0.16);
  --glow-c: rgba(255, 119, 71, 0.12);
}

.wall-page--linen {
  --text: #24332d;
  --muted: #6d7974;
  --accent: #1e6149;
  --page-top: #fff9f2;
  --page-bottom: #efe4d7;
  --glow-a: rgba(255, 255, 255, 0.9);
  --glow-b: rgba(255, 219, 189, 0.76);
  --glow-c: rgba(219, 239, 224, 0.62);
  --overlay-top: rgba(255, 255, 255, 0.08);
  --overlay-bottom: rgba(239, 228, 215, 0.14);
  --footer-text: rgba(36, 51, 45, 0.74);
  --image-opacity: 0.18;
}

.wall-page--sky {
  --text: #183541;
  --muted: #667e8a;
  --accent: #0b7393;
  --page-top: #f7fbff;
  --page-bottom: #ddeff8;
  --glow-a: rgba(255, 255, 255, 0.92);
  --glow-b: rgba(146, 211, 255, 0.62);
  --glow-c: rgba(205, 244, 255, 0.74);
  --overlay-top: rgba(255, 255, 255, 0.06);
  --overlay-bottom: rgba(221, 239, 248, 0.14);
  --footer-text: rgba(24, 53, 65, 0.74);
  --image-opacity: 0.18;
}

.wall-page--mint {
  --text: #20362f;
  --muted: #687b73;
  --accent: #1d7d56;
  --page-top: #f6fff9;
  --page-bottom: #e3f1e9;
  --glow-a: rgba(255, 255, 255, 0.92);
  --glow-b: rgba(162, 232, 202, 0.62);
  --glow-c: rgba(236, 255, 244, 0.76);
  --overlay-top: rgba(255, 255, 255, 0.06);
  --overlay-bottom: rgba(227, 241, 233, 0.14);
  --footer-text: rgba(32, 54, 47, 0.74);
  --image-opacity: 0.18;
}

.wall-shell {
  width: min(90vw, 1880px);
  height: min(90vh, calc(100dvh - 28px));
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(8px, 1.2vh, 16px);
  position: relative;
  z-index: 1;
}

.wall-header {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: title-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.wall-title {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.6rem, 3.2vw, 3.1rem);
  line-height: 1;
  letter-spacing: -0.05em;
  text-align: center;
}

.service-wall {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 3), minmax(0, 1fr));
  grid-template-rows: repeat(var(--grid-rows, 3), minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: var(--grid-gap, var(--wall-gap));
  overflow: hidden;
}

.wall-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 24px;
  font-size: clamp(0.72rem, 0.9vw, 0.92rem);
  color: var(--footer-text);
  animation: title-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.18s;
}

.wall-footer__version {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wall-footer__divider {
  opacity: 0.45;
}

.wall-footer__link {
  color: var(--accent);
  font-weight: 700;
}

.wall-footer__link:hover {
  text-decoration: underline;
}

.service-card {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: calc(18px * var(--tile-scale));
  border-radius: calc(28px * var(--tile-scale));
  box-shadow: 0 28px 52px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transform-origin: center bottom;
  animation: tile-hop 0.78s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--tile-delay, 0s) + 0.12s);
  will-change: transform, opacity;
  color: var(--card-text);
  text-decoration: none;
}

.service-card--light {
  background: linear-gradient(180deg, #ffffff, #f0eee7);
  --card-text: #1b1e1c;
  --card-muted: #64716c;
  --card-line: rgba(12, 22, 18, 0.08);
  --card-cta-bg: rgba(10, 20, 17, 0.08);
  --card-cta-text: #184c31;
  --card-badge: #18893d;
  --card-fallback-bg: #0f1816;
  --card-fallback-text: #7fd34d;
}

.service-card--dark {
  background: linear-gradient(180deg, #182722, #0f1816);
  --card-text: #f1f6f2;
  --card-muted: rgba(236, 244, 239, 0.74);
  --card-line: rgba(255, 255, 255, 0.1);
  --card-cta-bg: rgba(255, 255, 255, 0.08);
  --card-cta-text: #92ff55;
  --card-badge: #8cff49;
  --card-fallback-bg: rgba(255, 255, 255, 0.08);
  --card-fallback-text: #96ff5a;
}

.service-card--accent {
  background: linear-gradient(180deg, #d7ff8b, #ffdfc7);
  --card-text: #1f211f;
  --card-muted: #65706b;
  --card-line: rgba(12, 22, 18, 0.08);
  --card-cta-bg: rgba(10, 20, 17, 0.08);
  --card-cta-text: #1a5034;
  --card-badge: #18893d;
  --card-fallback-bg: #1a221d;
  --card-fallback-text: #91ff58;
}

a.service-card {
  cursor: pointer;
}

a.service-card:hover {
  box-shadow: 0 32px 62px rgba(0, 0, 0, 0.26);
}

a.service-card:focus-visible {
  outline: 2px solid var(--card-badge);
  outline-offset: 4px;
}

.service-card__media {
  flex: 0 0 42%;
  min-height: calc(90px * var(--tile-scale));
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(20px * var(--tile-scale));
  padding: calc(14px * var(--tile-scale)) calc(10px * var(--tile-scale));
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.24)),
    rgba(255, 255, 255, 0.2);
}

.service-card--dark .service-card__media {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
}

.service-card__media img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.service-card__fallback {
  display: grid;
  place-items: center;
  width: min(44%, 148px);
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--card-fallback-bg);
  color: var(--card-fallback-text);
  font-family: 'Outfit', sans-serif;
  font-size: calc(1.9rem * var(--tile-scale));
  font-weight: 800;
}

.service-card__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: calc(6px * var(--tile-scale));
  padding: calc(16px * var(--tile-scale)) calc(2px * var(--tile-scale)) 0;
}

.service-card__badge {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: calc(0.68rem * var(--tile-scale));
  color: var(--card-badge);
}

.service-card--dark .service-card__badge {
  text-shadow: 0 0 calc(10px * var(--tile-scale)) rgba(140, 255, 73, 0.34);
}

.service-card__body h2 {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: calc(1.3rem * var(--tile-scale));
  line-height: 1.02;
  letter-spacing: -0.04em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.service-card__body p {
  margin: 0;
  flex: 1;
  min-height: 0;
  font-size: calc(0.88rem * var(--tile-scale));
  line-height: 1.42;
  opacity: 0.9;
  overflow: hidden;
}

.service-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(10px * var(--tile-scale));
  padding-top: calc(12px * var(--tile-scale));
  margin-top: auto;
  border-top: 1px solid var(--card-line);
}

.service-card__domain {
  min-width: 0;
  font-size: calc(0.72rem * var(--tile-scale));
  color: var(--card-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: calc(38px * var(--tile-scale));
  padding: 0 calc(14px * var(--tile-scale));
  border-radius: 999px;
  background: var(--card-cta-bg);
  color: var(--card-cta-text);
  font-size: calc(0.8rem * var(--tile-scale));
  font-weight: 700;
  white-space: nowrap;
}

@keyframes title-rise {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tile-hop {
  0% {
    opacity: 0;
    transform: translateY(34px) scale(0.96);
  }

  56% {
    opacity: 1;
    transform: translateY(-7px) scale(1.015);
  }

  76% {
    transform: translateY(3px) scale(0.996);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  .wall-shell {
    width: min(92vw, 1880px);
    height: min(92vh, calc(100dvh - 20px));
  }

  .wall-title {
    font-size: clamp(1.3rem, 5.8vw, 2.2rem);
  }

  .wall-footer {
    gap: 8px;
    font-size: 0.74rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wall-header,
  .wall-footer,
  .service-card {
    animation: none;
  }

  .wall-page__image {
    transform: none;
  }
}
