/* ====================================================
   LANDING PAGE — Pool Party Night Swim
   Only loaded on index.html
   ==================================================== */

/* ---- Floating Bubbles ---- */
.bubbles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bubble {
  position: absolute;
  bottom: -100px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(34,211,238,0.15), rgba(34,211,238,0.02));
  border: 1px solid rgba(34,211,238,0.06);
  animation: rise var(--d) var(--t) ease-in infinite;
  opacity: 0;
}

.bubble:nth-child(1) { --s:18px; --d:14s; --t:0s;  left:8%;  }
.bubble:nth-child(2) { --s:34px; --d:17s; --t:2s;  left:20%; }
.bubble:nth-child(3) { --s:12px; --d:11s; --t:4s;  left:40%; }
.bubble:nth-child(4) { --s:26px; --d:19s; --t:1s;  left:55%; }
.bubble:nth-child(5) { --s:20px; --d:13s; --t:3s;  left:70%; }
.bubble:nth-child(6) { --s:30px; --d:16s; --t:5s;  left:85%; }
.bubble:nth-child(7) { --s:15px; --d:12s; --t:7s;  left:32%; }
.bubble:nth-child(8) { --s:22px; --d:18s; --t:9s;  left:62%; }

@keyframes rise {
  0%   { transform: translateY(0) translateX(0) scale(1);           opacity: 0;   }
  5%   { opacity: 0.6; }
  50%  { transform: translateY(-50vh) translateX(15px) scale(0.7);  opacity: 0.3; }
  100% { transform: translateY(-110vh) translateX(-10px) scale(0.15); opacity: 0; }
}

/* ---- Full-bleed Layout ---- */
.wrap {
  max-width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}

.card {
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: arrive 0.7s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes arrive {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ---- Hero Section ---- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: none;
  background: linear-gradient(180deg, #0a0f1e, #0f172a);
  /* Fill viewport minus header */
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: stretch;
}

.hero::after { background: none; }

.hero img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  aspect-ratio: auto;
  mask-image: none;
  -webkit-mask-image: none;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.6s ease, transform 20s linear;
  filter: brightness(0.7) saturate(1.2);
}

.hero img.loaded {
  opacity: 1;
  transform: scale(1);
}


/* ---- Hero Text Overlay ---- */
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(34,211,238,0.06), transparent 70%),
    linear-gradient(
      180deg,
      rgba(15,23,42,0.15)  0%,
      rgba(15,23,42,0.25) 30%,
      rgba(15,23,42,0.8)  85%,
      #0f172a 100%
    );
}

.hero-overlay-content {
  padding: 24px;
  animation: text-enter 1s 0.3s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes text-enter {
  from { opacity: 0; transform: translateY(28px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-tag {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 99px;
  background: rgba(34,211,238,0.1);
  border: 1px solid rgba(34,211,238,0.25);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-title {
  margin: 0;
  font-size: clamp(48px, 10vw, 100px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
  text-shadow:
    0 0 60px rgba(34,211,238,0.4),
    0 0 120px rgba(34,211,238,0.15),
    0 4px 12px rgba(0,0,0,0.6);
}

.hero-subtitle {
  margin: 16px 0 0;
  font-size: clamp(14px, 2.5vw, 19px);
  color: rgba(255,255,255,0.6);
  font-weight: 400;
  letter-spacing: 0.01em;
}


/* ---- Wave Divider ---- */
.hero-wave {
  position: absolute;
  bottom: -2px;
  left: -2%;
  right: -2%;
  z-index: 3;
  line-height: 0;
}

.hero-wave svg {
  width: 104%;
  height: 70px;
  display: block;
}

.wave-back {
  fill: rgba(15,23,42,0.6);
  animation: sway 5s ease-in-out infinite alternate;
}

.wave-front {
  fill: #0f172a;
  animation: sway 4s ease-in-out infinite alternate-reverse;
}

@keyframes sway {
  from { transform: translateX(-12px); }
  to   { transform: translateX(12px); }
}


/* ---- Stats Ribbon ---- */
.landing-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  padding: 36px 32px;
  background: rgba(0,0,0,0.3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  animation: fade-up 0.6s 0.5s cubic-bezier(0.16,1,0.3,1) both;
}

.ribbon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ribbon-number {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 30px rgba(34,211,238,0.35);
  line-height: 1;
}

.ribbon-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  font-weight: 600;
}

.ribbon-divider {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, transparent, rgba(34,211,238,0.25), transparent);
}


/* ---- Portal Cards Enhancement ---- */
.dashboard-grid {
  animation: fade-up 0.6s 0.7s cubic-bezier(0.16,1,0.3,1) both;
}

.portal-card {
  overflow: hidden;
}


/* ---- Footer ---- */
.landing-footer-hint {
  text-align: center;
  font-size: 12px;
  opacity: 0.5;
  color: var(--muted);
}


/* ---- Shared Keyframe ---- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ---- Full-bleed header ---- */
.landing-header {
  padding: 16px 32px;
  position: relative;
  z-index: 10;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

/* ---- Full-bleed portals ---- */
.dashboard-grid {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 32px;
}

/* ---- Landing footer ---- */
.landing-header ~ footer {
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
}


/* ---- Scroll hint at hero bottom ---- */
.hero-overlay-content::after {
  content: '';
  display: block;
  width: 24px;
  height: 24px;
  margin: 28px auto 0;
  border-right: 2px solid rgba(255,255,255,0.35);
  border-bottom: 2px solid rgba(255,255,255,0.35);
  transform: rotate(45deg);
  animation: scroll-hint 2s ease-in-out infinite;
}

@keyframes scroll-hint {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.4; }
  50%      { transform: rotate(45deg) translateY(8px); opacity: 0.8; }
}


/* ---- Mobile ---- */
@media (max-width: 640px) {
  .hero { min-height: 100vh; min-height: 100svh; }
  .hero-title { font-size: 40px; }
  .hero-subtitle { font-size: 14px; }
  .hero-wave svg { height: 40px; }
  .hero-overlay-content { padding: 16px; }
  .hero-tag { font-size: 10px; padding: 5px 14px; }
  .landing-header { padding: 12px 16px; }
  .landing-ribbon { gap: 28px; padding: 24px 16px; }
  .ribbon-number { font-size: 26px; }
  .ribbon-divider { height: 30px; }
  .dashboard-grid { padding: 24px 16px; }
}


/* ---- Light Theme Overrides ---- */
[data-theme="light"] .hero {
  background: linear-gradient(180deg, #e0f2fe 0%, var(--bg) 100%);
}

[data-theme="light"] .hero img {
  filter: brightness(0.9) saturate(1.15);
}

[data-theme="light"] .hero-overlay {
  background:
    radial-gradient(ellipse at 50% 60%, rgba(8,145,178,0.05), transparent 70%),
    linear-gradient(
      180deg,
      rgba(248,250,252,0.05)  0%,
      rgba(248,250,252,0.15) 30%,
      rgba(248,250,252,0.85)  80%,
      var(--bg) 100%
    );
}

[data-theme="light"] .hero-title {
  color: #0f172a;
  text-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

[data-theme="light"] .hero-subtitle {
  color: rgba(15,23,42,0.5);
}

[data-theme="light"] .hero-tag {
  background: rgba(8, 145, 178, 0.08);
  border-color: rgba(8, 145, 178, 0.2);
  color: var(--accent);
  backdrop-filter: blur(12px);
}

[data-theme="light"] .hero-wave .wave-back { fill: rgba(248,250,252,0.6); }
[data-theme="light"] .hero-wave .wave-front { fill: var(--bg); }

[data-theme="light"] .landing-ribbon {
  background: rgba(255,255,255,0.5);
  border-color: var(--border);
  backdrop-filter: blur(8px);
}

[data-theme="light"] .ribbon-number {
  color: var(--accent);
  text-shadow: none;
}

[data-theme="light"] .ribbon-divider {
  background: linear-gradient(180deg, transparent, rgba(8,145,178,0.15), transparent);
}

[data-theme="light"] .landing-header {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px);
}

[data-theme="light"] .landing-header ~ footer {
  background: rgba(255,255,255,0.3);
}

[data-theme="light"] .bubble {
  background: radial-gradient(circle at 30% 30%, rgba(8,145,178,0.06), rgba(8,145,178,0.01));
  border-color: rgba(8,145,178,0.04);
}

/* Scroll chevron lighter in light mode */
[data-theme="light"] .hero-overlay-content::after {
  border-color: rgba(15,23,42,0.25);
}


