/* ============================================================================
   Service Tile Styles
   ============================================================================ */

/* Card base */
.hub-card {
  position: relative;
  appearance: none;
  border: 1px solid var(--border);
  padding: 0;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(520px 240px at 12% -8%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 65%),
    radial-gradient(520px 220px at 88% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.92));
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease;
  transform-origin: center;
  will-change: transform;
  animation: card-pop 0.7s ease both;
}

.hub-card:nth-child(1) {
  animation-delay: 0.05s;
}

.hub-card:nth-child(2) {
  animation-delay: 0.1s;
}

.hub-card:nth-child(3) {
  animation-delay: 0.15s;
}

.hub-card:nth-child(4) {
  animation-delay: 0.2s;
}

.hub-card::before {
  content: none;
}

.hub-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.7);
  opacity: 0.45;
  pointer-events: none;
}

.hub-card:hover {
  transform: scale(1.18);
  z-index: 2;
}

.hub-card:focus-visible {
  outline: 3px solid rgba(58, 111, 247, 0.3);
  outline-offset: 3px;
}

/* Top hero area */
.card-hero {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
}

.variant-green {
  --accent: #1fb981;
  --accent-soft: rgba(31, 185, 129, 0.5);
}

.variant-blue {
  --accent: #1f5bff;
  --accent-soft: rgba(31, 91, 255, 0.5);
}

.variant-pink {
  --accent: #a353ff;
  --accent-soft: rgba(163, 83, 255, 0.5);
}

.variant-white {
  --accent: #3f4656;
  --accent-soft: rgba(63, 70, 86, 0.38);
}

.variant-green .card-hero,
.variant-blue .card-hero,
.variant-pink .card-hero,
.variant-white .card-hero {
  background:
    linear-gradient(135deg, var(--accent-soft) 0%, rgba(255, 255, 255, 0.85) 100%);
}

.card-hero .tile-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
  filter: saturate(0.9) contrast(1.05) brightness(0.95);
}

.hub-card.playing .tile-video,
.hub-card:hover .tile-video {
  opacity: 0.95;
}

/* Icon in the hero */
.card-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.card-icon .tile-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 30px rgba(23, 36, 60, 0.12);
  backdrop-filter: blur(12px);
}

.variant-blue .card-icon .tile-logo {
  background:
    radial-gradient(120% 120% at 20% 20%, rgba(53, 102, 244, 0.5), rgba(53, 102, 244, 0.18) 55%, rgba(255, 255, 255, 0.9) 100%),
    linear-gradient(135deg, rgba(53, 102, 244, 0.32), rgba(255, 255, 255, 0.85));
  border-color: rgba(53, 102, 244, 0.4);
  box-shadow: 0 18px 30px rgba(53, 102, 244, 0.18), 0 12px 24px rgba(23, 36, 60, 0.12);
}

/* Body */
.card-body {
  padding: 18px 20px 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(31, 36, 48, 0.65);
  min-height: 42px;
}

/* CTA */
.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(53, 102, 244, 0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-cta-icon {
  width: 16px;
  height: 1px;
  background: currentColor;
  position: relative;
  transition: width 0.2s ease;
}

.card-cta-icon::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -3px;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.card-cta:hover .card-cta-icon,
.card-cta:active .card-cta-icon {
  width: 28px;
}

/* ============================================================================
   Locked Tile Styles
   ============================================================================ */

.hub-tile.locked {
  opacity: 0.85;
  cursor: default;
  filter: grayscale(0.2);
}

.hub-tile.locked:hover {
  transform: scale(1.0);
}

.hub-tile.locked .tile-video {
  filter: brightness(0.7);
}

.tile-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(0.5px);
  color: white;
  gap: 12px;
}

.lock-icon {
  opacity: 0.9;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.lock-text {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.95;
}

.hub-tile.locked .card-cta {
  background: rgba(100, 116, 139, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.hub-tile.locked .card-cta-icon::after {
  display: none;
}

.hub-tile.locked .card-cta:hover .card-cta-icon {
  width: 16px;
}
