@layer base {
  :root,
  * {
    --tw-gradient-from: transparent !important;
    --tw-gradient-via: transparent !important;
    --tw-gradient-stops: transparent !important;
    --tw-gradient-to: transparent !important;
  }
}

/* Custom service card gradient colors */
li[data-name] a.content {
  background: linear-gradient(var(--bg-colors, transparent, transparent));
}

/* dark default cards */
li[data-name="Memos"] {
  --bg-colors: #0ea5e9, #0369a1;
}

/* Layout & Grid */
.grid {
  margin: 1.5vw 1vw;
}
.grid .item {
  display: block;
  width: calc(100% - 2vw);
  margin: 0.5vw 1vw;
  z-index: 1;
}
.body .grid {
  margin: 0 1vw;
  margin-top: 0.5vw;
}

.background-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 25%,
    black 40%,
    black 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 25%,
    black 40%,
    black 100%
  );
  pointer-events: none;
}

/* Header */
.header {
  background: #5555;
  border-radius: min(max(2vmax, 2rem), 3rem);
  backdrop-filter: blur(3vmax);
  margin: 1vw 0;
}
.header.glass {
  position: relative !important;
  overflow: hidden !important;
  background: transparent !important;
  border-radius: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25) !important;
  backdrop-filter: blur(3px);
  min-height: 100px;
  z-index: 10;
}
.header.glass::before,
.header.glass::after {
  content: none !important;
}
.header.glass > * {
  position: relative;
  z-index: 5;
}
.services-group.header .apple-tv-card-title {
  display: none;
}

/* Apple TV Card Core */
.apple-tv-card-container {
  position: relative;
  width: 100%;
}
.services-group.body .apple-tv-card-container {
  padding-bottom: 3.4rem;
}
.apple-tv-card-container.no-title {
  padding-bottom: 0;
}
.apple-tv-card-container > .apple-tv-card {
  width: 100%;
  border-radius: min(max(2vmax, 2rem), 3rem);
  box-shadow: 0 0.25rem 0.25rem #0002;
  transform-origin: 50%;
  transition: transform 50ms ease-in-out;
  transform-style: preserve-3d;
  overflow: hidden;
  position: relative;
  z-index: 0;
  max-height: 12rem;
  min-height: 11rem;
}

@media (prefers-reduced-motion: reduce) {
  .apple-tv-card-container > .apple-tv-card {
    transition: none;
  }
}

/* Hover / focus — Apple TV effect */
.apple-tv-card-container > .apple-tv-card.hover,
.apple-tv-card-container > .apple-tv-card:focus-within {
  box-shadow: 0 1.5rem 2rem 0.25rem #0005;
  outline: none;
  transform: translateZ(4rem);
}
.apple-tv-card-container > .apple-tv-card.hover + .apple-tv-card-title,
.apple-tv-card-container > .apple-tv-card:focus-within + .apple-tv-card-title {
  bottom: 0.4rem !important;
  opacity: 1;
}

/* Inner layers */
.apple-tv-card-container > .apple-tv-card > .shadow,
.apple-tv-card-container > .apple-tv-card > .reflection {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  transition: all 0.12s ease-in-out, transform 0.18s ease-out;
}
.apple-tv-card-container > .apple-tv-card > .shadow {
  background: #0002;
  opacity: 0;
  z-index: 3;
}
.apple-tv-card-container > .apple-tv-card > .reflection {
  top: 0;
  left: 0;
  background-image: radial-gradient(#fff7, transparent 70%);
  transform: translateY(-100%);
  z-index: 4;
}
.apple-tv-card-container > .apple-tv-card.hover > .shadow,
.apple-tv-card-container > .apple-tv-card:focus-within > .shadow {
  opacity: 1;
}
.apple-tv-card-container > .apple-tv-card.hover > .reflection,
.apple-tv-card-container > .apple-tv-card:focus-within > .reflection {
  transform: translateY(0);
}

/* Content & Parallax */
.apple-tv-card-container > .apple-tv-card > .content {
  display: block !important;
  width: 100%;
  border: none;
  outline: none;
  background-position: center center;
  padding-bottom: 100%;
  z-index: 1;
  position: relative !important;
}
.apple-tv-card-container > .apple-tv-card > .content * {
  pointer-events: none;
}
.apple-tv-card-container > .apple-tv-card > .parallax-content {
  transform-style: preserve-3d;
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  background-position: center center;
  background-repeat: no-repeat;
  transition: transform 50ms ease-in-out;
  z-index: 2;
  height: 100%;
}

/* Title */
.apple-tv-card-container > .apple-tv-card-title {
  position: absolute;
  pointer-events: none;
  bottom: 1.3rem;
  left: 0;
  right: 0;
  opacity: 0;
  text-align: center;
  font-size: 1.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  text-shadow: 0 1px 2px #000;
  transition: opacity 0.12s ease-in-out, bottom 0.09s ease-in-out;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.service-logo {
  transform-style: preserve-3d;
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  background-position: center center;
  background-repeat: no-repeat;
  transition: transform 50ms ease-in-out;
  z-index: 2;
  height: 70%;
  padding: 2vw 1.5vw 0.5vw 1.5vw;
}
.service-logo svg {
  box-sizing: content-box;
  display: var(--fa-display, inline-block);
  height: 2em;
  overflow: visible;
  vertical-align: -0.125em;
  max-width: var(--fa-width, 3em);
  max-height: var(--fa-height, 1em);
}
.service-logo img {
  width: 100% !important;
  height: 100% !important;
  max-width: var(--fa-width, 2.8em);
  max-height: var(--fa-height, 0.8em);
}

.service-container {
  position: absolute !important;
  width: 94% !important;
}
.service-card .service-container:last-of-type {
  bottom: 0.4vw;
}
.service-name {
  text-align: center;
  font-size: var(--text-md);
}
.service-block {
  border-radius: min(max(1vmax, 1rem), 2rem);
  background-color: color-mix(in oklab, rgb(var(--color-900)/1) 50%, transparent);
}

#layout-groups {
  margin-top: 4em;
}

/* Hide footer */
#footer {
  display: none;
}

/* Hide scrollbar */
html, body {
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
  display: none !important;
}
