/* ==========================================================================
   Homepage — Animated Orbit, Hero Background & Feature Pills
   Premium SaaS aesthetic — static rings, orbiting logos, glow trace
   ========================================================================== */

/* ==================================================================
   HERO SECTION BACKGROUND
   ================================================================== */
.gpl-hero-section {
  position: relative;
  overflow: hidden;
  background: hsl(220 20% 96%);
}

.gpl-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

.gpl-hero-bg svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Vertical lines subtle drift */
.gpl-vlines {
  animation: gpl-vlines-drift 35s ease-in-out infinite alternate;
}

@keyframes gpl-vlines-drift {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(0, -12px); }
}

/* Hero content sits above background */
.gpl-hero-section > .container {
  position: relative;
  z-index: 2;
}

/* ==================================================================
   ORBIT CONTAINER
   ================================================================== */
.gpl-orbit {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

/* ==================================================================
   CENTER HUB (WordPress logo) — glassmorphism
   ================================================================== */
.gpl-orbit__center {
  position: relative;
  z-index: 30;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 0 0 5px hsl(220 20% 96%),
    0 0 0 7px #000c,
    0 8px 32px -8px rgba(0, 0, 0, 0.15),
    0 0 24px -4px rgba(1, 8, 105, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gpl-orbit__center img {
  display: block;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
}

/* ==================================================================
   STATIC RINGS — concentric circles with glow trace
   ================================================================== */
.gpl-orbit__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--ring-radius, 75px) * 2);
  height: calc(var(--ring-radius, 75px) * 2);
  margin-top: calc(var(--ring-radius, 75px) * -1);
  margin-left: calc(var(--ring-radius, 75px) * -1);
  border-radius: 50%;
  border: 1px solid hsl(0 0% 0% / 0.12);
  pointer-events: none;
}

/* Glow trace — conic gradient sweep masked to ring border */
.gpl-orbit__ring::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 280deg,
    hsl(221 83% 53% / 0.06) 320deg,
    hsl(221 83% 53% / 0.35) 350deg,
    hsl(221 83% 53% / 0.06) 358deg,
    transparent 360deg
  );
  -webkit-mask: radial-gradient(
    circle,
    transparent calc(var(--ring-radius) - 2px),
    #000 calc(var(--ring-radius) - 1px),
    #000 calc(var(--ring-radius) + 2px),
    transparent calc(var(--ring-radius) + 3px)
  );
  mask: radial-gradient(
    circle,
    transparent calc(var(--ring-radius) - 2px),
    #000 calc(var(--ring-radius) - 1px),
    #000 calc(var(--ring-radius) + 2px),
    transparent calc(var(--ring-radius) + 3px)
  );
  animation: gpl-glow-spin 6s linear infinite;
  pointer-events: none;
}

@keyframes gpl-glow-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ==================================================================
   ORBIT WRAPPER — rotates clockwise carrying the logo
   ================================================================== */
.gpl-orbit__orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: rotate(var(--orbit-start, 0deg));
  animation: gpl-orbit-cw var(--orbit-duration, 40s) linear infinite;
  animation-delay: calc(var(--orbit-duration, 40s) * var(--orbit-start, 0deg) / -360deg);
  pointer-events: none;
}

@keyframes gpl-orbit-cw {
  from { transform: rotate(var(--orbit-start, 0deg)); }
  to   { transform: rotate(calc(var(--orbit-start, 0deg) + 360deg)); }
}

/* ==================================================================
   LOGO CARD — glassmorphism, counter-rotates to stay upright
   ================================================================== */
.gpl-orbit__logo {
  position: absolute;
  top: calc(var(--ring-radius, 75px) * -1 - 24px);
  left: -24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 4px 16px -4px rgba(0, 0, 0, 0.12),
    0 0 16px -2px rgba(1, 8, 105, 0.06);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: default;
  transform: rotate(calc(var(--orbit-start, 0deg) * -1));
  animation: gpl-counter-cw var(--orbit-duration, 40s) linear infinite;
  animation-delay: calc(var(--orbit-duration, 40s) * var(--orbit-start, 0deg) / -360deg);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.35s ease;
  will-change: transform;
}

@keyframes gpl-counter-cw {
  from { transform: rotate(calc(var(--orbit-start, 0deg) * -1)); }
  to   { transform: rotate(calc((var(--orbit-start, 0deg) + 360deg) * -1)); }
}

.gpl-orbit__logo:hover {
  transform: scale(1.18);
  box-shadow:
    0 8px 28px -6px rgba(0, 0, 0, 0.18),
    0 0 28px -2px rgba(1, 8, 105, 0.12);
}

.gpl-orbit__logo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ==================================================================
   HERO CTA BUTTON — #010869 background
   ================================================================== */
.gpl-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 2rem;
  border-radius: 0.375rem;
  background: #010869;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow:
    0 2px 8px -2px rgba(1, 8, 105, 0.3),
    0 0 0 1px rgba(1, 8, 105, 0.1);
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gpl-hero-btn:hover {
  background: #020a80;
  box-shadow:
    0 6px 20px -4px rgba(1, 8, 105, 0.4),
    0 0 0 1px rgba(1, 8, 105, 0.15);
  transform: translateY(-2px);
}

/* ==================================================================
   BUNDLE BUTTON — #010869 solid fill
   ================================================================== */
.gpl-bundle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 2rem;
  border-radius: 0.375rem;
  background: #010869;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 2px 8px -2px rgba(1, 8, 105, 0.3),
    0 0 0 1px rgba(1, 8, 105, 0.1);
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gpl-bundle-btn:hover {
  background: #020a80;
  box-shadow:
    0 6px 20px -4px rgba(1, 8, 105, 0.4),
    0 0 0 1px rgba(1, 8, 105, 0.15);
  transform: translateY(-2px);
}

/* ==================================================================
   FEATURE PILLS — premium glassmorphism style
   ================================================================== */
.gpl-feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gpl-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid hsl(0 0% 0% / 0.12);
  background: rgba(255, 255, 255, 0.65);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25;
  color: hsl(var(--foreground));
  cursor: default;
  user-select: none;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.gpl-feature-pill:hover {
  background: transparent;
  border-color: hsl(0 0% 0% / 0.2);
  color: hsl(var(--foreground));
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.gpl-feature-pill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: hsl(var(--primary));
  transition: color 0.25s ease;
}

.gpl-feature-pill:hover .gpl-feature-pill__icon {
  color: hsl(var(--primary));
}

.gpl-feature-pill__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ==================================================================
   FEATURE CARDS — below hero section
   ================================================================== */
.gpl-feature-cards-section {
  background: hsl(0 0% 100%);
}

.gpl-feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: 12px;
  background: hsl(0 0% 100%);
  border: 1px solid hsl(0 0% 0% / 0.08);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
  transition:
    transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.gpl-feature-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 12px 32px -8px rgba(0, 0, 0, 0.12),
    0 4px 16px -4px rgba(1, 8, 105, 0.08);
  border-color: hsl(0 0% 0% / 0.12);
}

.gpl-feature-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 10px;
  background: hsl(220 20% 96%);
  color: #010869;
  margin-bottom: 1.25rem;
  transition: background 0.3s ease, color 0.3s ease;
}

.gpl-feature-card:hover .gpl-feature-card__icon {
  background: #010869;
  color: #fff;
}

.gpl-feature-card__icon svg {
  display: block;
  flex-shrink: 0;
}

.gpl-feature-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  color: hsl(var(--foreground));
  margin: 0 0 0.5rem;
}

.gpl-feature-card__text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
  margin: 0 0 1.25rem;
  flex-grow: 1;
}

.gpl-feature-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #010869;
  text-decoration: none;
  transition: gap 0.25s ease;
}

.gpl-feature-card__link:hover {
  gap: 0.625rem;
}

.gpl-feature-card__link svg {
  display: block;
  transition: transform 0.25s ease;
}

.gpl-feature-card__link:hover svg {
  transform: translateX(2px);
}

/* ==================================================================
   RECENTLY UPDATED — Split Layout
   ================================================================== */
.gpl-recent-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: stretch;
}

.gpl-recent-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  justify-content: center;
}

.gpl-recent-desc {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: hsl(var(--muted-foreground));
  max-width: 28rem;
}

.gpl-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gpl-recent-list li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
}

.gpl-recent-list li svg {
  flex-shrink: 0;
  color: #010869;
}

.gpl-recent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: fit-content;
  height: 2.5rem;
  padding: 0 2rem;
  border-radius: 0.375rem;
  background: #010869;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px -2px rgba(1, 8, 105, 0.3);
  transition: all 0.25s ease;
}

.gpl-recent-btn:hover {
  background: #020a80;
  box-shadow: 0 6px 20px -4px rgba(1, 8, 105, 0.4);
  transform: translateY(-2px);
}

.gpl-recent-btn svg {
  transition: transform 0.25s ease;
}

.gpl-recent-btn:hover svg {
  transform: translateX(3px);
}

/* Right side products — hover effect */
.gpl-recent-products {
  display: flex;
  align-items: stretch;
}

.gpl-recent-products .products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  width: 100%;
}

.gpl-recent-products .product {
  border-radius: 12px;
  border: 1px solid hsl(0 0% 0% / 0.08);
  overflow: hidden;
  transition:
    transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.gpl-recent-products .product:hover {
  transform: translateY(-6px);
  box-shadow:
    0 12px 32px -8px rgba(0, 0, 0, 0.12),
    0 4px 16px -4px rgba(1, 8, 105, 0.08);
  border-color: hsl(0 0% 0% / 0.12);
}

/* ==================================================================
   HOMEPAGE OUTLINE BUTTONS — #010869 override
   ================================================================== */
.site-main a.border.border-input {
  background: #010869;
  color: #fff;
  border-color: #010869;
  box-shadow: 0 2px 8px -2px rgba(1, 8, 105, 0.3);
  transition: all 0.25s ease;
}

.site-main a.border.border-input:hover {
  background: #020a80;
  border-color: #020a80;
  color: #fff;
  box-shadow: 0 6px 20px -4px rgba(1, 8, 105, 0.4);
  transform: translateY(-2px);
}

/* ==================================================================
   WHY SECTION — light background
   ================================================================== */
.gpl-why-section {
  background: hsl(220 20% 96%);
}

/* ==================================================================
   PROMO CARD — #010869 background
   ================================================================== */
.gpl-promo-card {
  border-radius: 12px;
  background: #010869;
  color: #fff;
  box-shadow: 0 8px 32px -8px rgba(1, 8, 105, 0.3);
}

.gpl-promo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 2rem;
  border-radius: 0.375rem;
  background: #fff;
  color: #010869;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
}

.gpl-promo-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.2);
}

/* ==================================================================
   RESPONSIVE
   ================================================================== */
@media (max-width: 767px) {
  .gpl-orbit {
    transform: scale(0.62);
    transform-origin: center center;
  }

  .gpl-orbit__center {
    width: 76px;
    height: 76px;
  }

  .gpl-orbit__center img {
    width: 52px;
    height: 52px;
  }

  .gpl-hero-btn {
    height: 2.5rem;
    padding: 0 1.75rem;
    font-size: 0.8125rem;
  }

  .gpl-recent-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gpl-recent-products .products {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==================================================================
   REDUCED MOTION
   ================================================================== */
@media (prefers-reduced-motion: reduce) {
  .gpl-orbit__orbit,
  .gpl-orbit__logo,
  .gpl-orbit__ring::after,
  .gpl-vlines {
    animation: none !important;
  }

  .gpl-orbit__orbit {
    transform: rotate(var(--orbit-start, 0deg));
  }

  .gpl-orbit__logo {
    transform: rotate(calc(var(--orbit-start, 0deg) * -1));
  }

  .gpl-feature-pill,
  .gpl-hero-btn,
  .gpl-bundle-btn,
  .gpl-feature-card,
  .gpl-feature-card__icon,
  .gpl-feature-card__link,
  .gpl-feature-card__link svg,
  .gpl-promo-btn,
  .gpl-recent-btn,
  .gpl-recent-btn svg,
  .gpl-recent-products .product,
  .site-main a.border.border-input {
    transition: none;
  }
}
