/* ==========================================================================
   Wake Up Servicios — Portal de Inicio (inicio.wakeupservicios.eu)
   Paleta corporativa exacta extraída del logotipo oficial:
   - Índigo pizarra (WAKE):   #46446A
   - Turquesa (UP):           #44C8CC
   - Azul petróleo (SERVICIOS): #4488A6
   ========================================================================== */

:root {
  --brand-indigo: #46446a;
  --brand-indigo-deep: #252442;
  --brand-indigo-dark: #191830;
  --brand-turquoise: #44c8cc;
  --brand-turquoise-bright: #6be4e8;
  --brand-teal: #4488a6;

  --surface-bg-top: #f7fbfd;
  --surface-bg-mid: #edf5f8;
  --surface-bg-bottom: #e3eff4;

  --text-primary: #2a2947;
  --text-secondary: #4e5e73;
  --text-muted: #6f8096;

  --orb-size: clamp(160px, 14.5vw, 206px);
  --transition-smooth: 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background: linear-gradient(
    155deg,
    var(--surface-bg-top) 0%,
    var(--surface-bg-mid) 52%,
    var(--surface-bg-bottom) 100%
  );
  overflow-x: hidden;
  position: relative;
}

/* ==========================================================================
   Fondo atmosférico + Logo translúcido difuminado
   ========================================================================== */

.bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(70, 68, 106, 0.1) 1px, transparent 1px),
    linear-gradient(to right, rgba(68, 200, 204, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(68, 200, 204, 0.045) 1px, transparent 1px);
  background-size: 36px 36px, 108px 108px, 108px 108px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 48%, #000 45%, transparent 100%);
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.bg-glow--top {
  width: 64vw;
  height: 64vw;
  max-width: 780px;
  max-height: 780px;
  top: -26%;
  right: -12%;
  background: radial-gradient(
    circle,
    rgba(68, 200, 204, 0.24) 0%,
    rgba(68, 136, 166, 0.08) 55%,
    transparent 75%
  );
  animation: driftGlow 18s ease-in-out infinite alternate;
}

.bg-glow--bottom {
  width: 60vw;
  height: 60vw;
  max-width: 740px;
  max-height: 740px;
  bottom: -28%;
  left: -14%;
  background: radial-gradient(
    circle,
    rgba(70, 68, 106, 0.18) 0%,
    rgba(68, 136, 166, 0.08) 55%,
    transparent 75%
  );
  animation: driftGlow 22s ease-in-out infinite alternate-reverse;
}

.bg-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.bg-watermark__img {
  width: min(88vw, 1180px);
  height: auto;
  opacity: 0.095;
  filter: blur(7px) saturate(1.1);
  transform: translateY(4%) scale(1.02);
  user-select: none;
  animation: breatheWatermark 14s ease-in-out infinite alternate;
}

.bg-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

/* ==========================================================================
   Estructura principal
   ========================================================================== */

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: clamp(2rem, 4.5vh, 3.75rem) clamp(1.25rem, 4vw, 3.5rem) 1.75rem;
  gap: clamp(2rem, 4.5vh, 3.5rem);
}

/* ==========================================================================
   Cabecera con logotipo corporativo grande
   ========================================================================== */

.hero-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.15rem;
  animation: fadeSlideDown 0.85s var(--transition-smooth) both;
}

.logo-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 1rem;
}

.logo-halo {
  position: absolute;
  inset: -24% -16%;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(68, 200, 204, 0.16) 48%,
    transparent 74%
  );
  filter: blur(18px);
  z-index: -1;
}

.brand-logo {
  width: clamp(260px, 40vw, 490px);
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 28px rgba(70, 68, 106, 0.13));
  transition: transform 0.5s var(--transition-smooth);
}

.brand-logo:hover {
  transform: scale(1.018);
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 1.15rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(68, 200, 204, 0.38);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 8px 24px rgba(70, 68, 106, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-family: "Outfit", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-indigo);
}

.portal-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-turquoise);
  box-shadow: 0 0 0 4px rgba(68, 200, 204, 0.22);
  animation: pulseDot 2.4s ease-in-out infinite;
}

/* ==========================================================================
   Grid de los 4 redondeles futuristas
   ========================================================================== */

.orbs-section {
  width: 100%;
  max-width: 1040px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbs-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 3.2vw, 2.75rem) clamp(1.5rem, 3.5vw, 3rem);
  align-items: start;
}

/* Tarjeta de cada redondel */
.orb-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  padding: 0.75rem 0.5rem 1rem;
  border-radius: 28px;
  outline: none;
  position: relative;
  transition: transform var(--transition-smooth);
  animation: fadeSlideUp 0.8s var(--transition-smooth) both;
}

.orb-card:nth-child(1) { animation-delay: 0.06s; }
.orb-card:nth-child(2) { animation-delay: 0.14s; }
.orb-card:nth-child(3) { animation-delay: 0.22s; }
.orb-card:nth-child(4) { animation-delay: 0.30s; }
.orb-card:nth-child(5) { animation-delay: 0.38s; }
.orb-card:nth-child(6) { animation-delay: 0.46s; }

.orb-card:not(.orb-card--soon) {
  cursor: pointer;
}

.orb-card:not(.orb-card--soon):hover,
.orb-card:not(.orb-card--soon):focus-visible {
  transform: translateY(-10px);
}

.orb-card:not(.orb-card--soon):focus-visible .orb-sphere {
  box-shadow:
    0 0 0 4px rgba(68, 200, 204, 0.65),
    0 24px 50px rgba(37, 36, 66, 0.34);
}

/* Contenedor circular y anillos orbitales */
.orb-wrapper {
  position: relative;
  width: var(--orb-size);
  height: var(--orb-size);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.4rem;
  perspective: 900px;
}

.orb-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transition:
    transform 0.6s var(--transition-smooth),
    opacity 0.45s ease,
    border-color 0.45s ease;
}

.orb-ring--outer {
  inset: -12px;
  border: 1.5px solid rgba(68, 200, 204, 0.36);
  border-top-color: var(--brand-turquoise);
  border-right-color: rgba(70, 68, 106, 0.32);
  opacity: 0.85;
  animation: orbitSpin 18s linear infinite;
}

.orb-ring--inner {
  inset: -5px;
  border: 1px dashed rgba(68, 136, 166, 0.4);
  opacity: 0.65;
  animation: orbitSpin 26s linear infinite reverse;
}

.orb-card:not(.orb-card--soon):hover .orb-ring--outer {
  inset: -15px;
  border-color: rgba(68, 200, 204, 0.65);
  border-top-color: var(--brand-turquoise-bright);
  box-shadow: 0 0 28px rgba(68, 200, 204, 0.32);
}

.orb-card:not(.orb-card--soon):hover .orb-ring--inner {
  opacity: 0.95;
  border-color: rgba(68, 200, 204, 0.6);
}

/* Esfera 3D ("bola") */
.orb-sphere {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(
    circle at 35% 30%,
    #35335b 0%,
    var(--brand-indigo-deep) 58%,
    var(--brand-indigo-dark) 100%
  );
  border: 2.5px solid rgba(68, 200, 204, 0.55);
  box-shadow:
    0 20px 42px -8px rgba(37, 36, 66, 0.36),
    0 8px 20px -4px rgba(68, 200, 204, 0.22),
    inset 0 2px 12px rgba(255, 255, 255, 0.24),
    inset 0 -14px 26px rgba(18, 17, 36, 0.65);
  transition:
    transform 0.25s ease-out,
    box-shadow var(--transition-smooth),
    border-color var(--transition-smooth);
  will-change: transform;
}

.orb-card:not(.orb-card--soon):hover .orb-sphere {
  border-color: var(--brand-turquoise-bright);
  box-shadow:
    0 28px 56px -10px rgba(37, 36, 66, 0.44),
    0 0 36px rgba(68, 200, 204, 0.45),
    inset 0 2px 16px rgba(255, 255, 255, 0.34),
    inset 0 -14px 28px rgba(18, 17, 36, 0.55);
}

.orb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.04);
  transition: transform 0.55s var(--transition-smooth), filter 0.45s ease;
}

.orb-card:not(.orb-card--soon):hover .orb-image {
  transform: scale(1.11);
  filter: brightness(1.08) saturate(1.12);
}

/* Brillo esférico de cristal */
.orb-gloss {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(
      ellipse 72% 42% at 50% 14%,
      rgba(255, 255, 255, 0.26) 0%,
      rgba(255, 255, 255, 0.04) 55%,
      transparent 70%
    ),
    radial-gradient(
      circle at 50% 50%,
      transparent 62%,
      rgba(16, 15, 34, 0.42) 100%
    );
  pointer-events: none;
}

/* Textos y píldora de enlace debajo de cada esfera */
.orb-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.42rem;
  max-width: 260px;
}

.orb-title {
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.15rem, 1.45vw, 1.38rem);
  font-weight: 700;
  color: var(--brand-indigo);
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}

.orb-card:not(.orb-card--soon):hover .orb-title {
  color: var(--brand-teal);
}

.orb-subtitle {
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--text-secondary);
  min-height: 2.8em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb-link-pill {
  margin-top: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  font-family: "Outfit", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-indigo);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(70, 68, 106, 0.16);
  box-shadow: 0 4px 14px rgba(70, 68, 106, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    background 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.orb-arrow {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--brand-turquoise);
  transition: transform 0.35s var(--transition-smooth), color 0.35s ease;
}

.orb-card:not(.orb-card--soon):hover .orb-link-pill {
  background: linear-gradient(135deg, var(--brand-indigo) 0%, var(--brand-teal) 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(70, 68, 106, 0.25);
}

.orb-card:not(.orb-card--soon):hover .orb-arrow {
  color: var(--brand-turquoise-bright);
  transform: translateX(3px);
}

/* ==========================================================================
   Estado "Próximamente" (4.º círculo)
   ========================================================================== */

.orb-card--soon {
  cursor: default;
}

.orb-card--soon .orb-sphere {
  border-color: rgba(70, 68, 106, 0.38);
  box-shadow:
    0 16px 34px -10px rgba(37, 36, 66, 0.25),
    inset 0 2px 10px rgba(255, 255, 255, 0.16);
}

.orb-card--soon .orb-image {
  filter: saturate(0.75) brightness(0.92);
}

.orb-card--soon .orb-ring--outer {
  border-style: dashed;
  border-color: rgba(70, 68, 106, 0.28);
  animation-duration: 30s;
}

.soon-chip {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-indigo) 0%, var(--brand-teal) 100%);
  color: #ffffff;
  font-family: "Outfit", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow:
    0 6px 16px rgba(37, 36, 66, 0.28),
    0 0 0 2px rgba(255, 255, 255, 0.9);
}

.orb-card--soon .orb-title {
  color: rgba(70, 68, 106, 0.78);
}

.orb-link-pill--soon {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.52);
  border-style: dashed;
  border-color: rgba(70, 68, 106, 0.22);
}

/* ==========================================================================
   Pie de página
   ========================================================================== */

.site-footer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
  animation: fadeSlideUp 0.9s var(--transition-smooth) 0.45s both;
}

.site-footer strong {
  color: var(--brand-indigo);
  font-weight: 600;
}

/* ==========================================================================
   Animaciones
   ========================================================================== */

@keyframes orbitSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes driftGlow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-3%, 4%, 0) scale(1.07);
  }
}

@keyframes breatheWatermark {
  from {
    opacity: 0.08;
    transform: translateY(4%) scale(1);
  }
  to {
    opacity: 0.115;
    transform: translateY(2%) scale(1.035);
  }
}

@keyframes pulseDot {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 4px rgba(68, 200, 204, 0.22);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(68, 200, 204, 0.08);
  }
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 900px) {
  .orbs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 680px;
    gap: 2.25rem 2rem;
  }

  :root {
    --orb-size: clamp(168px, 26vw, 206px);
  }
}

@media (max-width: 560px) {
  .orbs-grid {
    grid-template-columns: 1fr;
    max-width: 340px;
    gap: 2.4rem;
  }

  :root {
    --orb-size: 196px;
  }

  .portal-badge {
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    padding: 0.42rem 0.95rem;
  }

  .bg-watermark__img {
    width: 120vw;
    opacity: 0.075;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
