/* ==========================================================================
   LANDING PAGE  ·  LIQUID GLASS ARCHITECTURE
   Exact design tokens & styles from original RainRisk landing page
   ========================================================================== */

:root {
  --accent-teal: #2dd4a8;
  --accent-blue: #60a5fa;
  --accent-amber: #fbbf24;
  --accent-rose: #fb7185;
  --accent-violet: #a78bfa;
  --accent-slate: #94a3b8;
  --accent-sky: #38bdf8;
  --accent-emerald: #10b981;
  --accent-red: #f43f5e;
  --accent-cyan: #06b6d4;
  --radius-pill: 9999px;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --text-primary: #f4f4f6;
  --text-secondary: #9a9aa2;
}

/* When landing page is active on body */
body.landing-active {
  margin: 0 !important;
  padding: 0 !important;
  background-color: #0c0c0e !important;
  background-image: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  display: block !important;
  min-height: 100vh !important;
}

body.landing-active::before,
body.landing-active::after {
  display: none !important;
}

/* --- Page wrapper --- */
.lp {
  position: relative;
  width: 100%;
  color: #fff;
}

/* --- Fixed full-viewport video background --- */
.lp-video-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  animation: videoFadeIn 0.42s ease-out;
}

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

.lp-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Natural soft vignette around periphery to maintain video vibrancy */
.lp-video-dim {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 20%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
}

.lp-content {
  position: relative;
  z-index: 1;
  width: 100%;
  animation: landingMount 0.42s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.38s ease, transform 0.38s ease, filter 0.38s ease;
}

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

/* ========================  HERO  ======================== */
.lp-hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}

.lp-hero-inner {
  max-width: 840px;
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform, opacity;
  transition: transform 0.15s ease-out, opacity 0.15s ease-out;
}

/* --- Title --- */
.lp-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(3.2rem, 9.5vw, 6.8rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 1.25rem 0;
  color: #ffffff;
  text-shadow:
    0 4px 32px rgba(0, 0, 0, 0.8),
    0 2px 12px rgba(0, 0, 0, 0.6);
}

/* --- Subtitle --- */
.lp-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.98rem, 1.5vw, 1.18rem);
  font-weight: 400;
  line-height: 1.6;
  color: #ffffff;
  max-width: 600px;
  margin: 0 0 2.5rem 0;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9), 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* ========================  LIQUID GLASS METRIC BAR  ======================== */
@keyframes glassSheen {
  0%   { transform: translateX(-180%) skewX(-22deg); opacity: 0; }
  15%  { opacity: 0.75; }
  45%  { transform: translateX(280%) skewX(-22deg); opacity: 0; }
  100% { transform: translateX(280%) skewX(-22deg); opacity: 0; }
}

.lp-glass {
  position: relative;
  display: inline-flex;
  border-radius: 9999px;
  padding: 1.05rem 2.75rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(18, 24, 38, 0.35) 45%,
    rgba(255, 255, 255, 0.12) 100%
  );
  backdrop-filter: blur(64px) saturate(220%) brightness(1.12);
  -webkit-backdrop-filter: blur(64px) saturate(220%) brightness(1.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-top: 1.5px solid rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 24px 60px -10px rgba(0, 0, 0, 0.55),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.75),
    inset 0 -1.5px 2px rgba(0, 0, 0, 0.25),
    0 0 35px rgba(255, 255, 255, 0.08);
  margin-bottom: 3rem;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.lp-glass:hover {
  transform: translateY(-2px);
  border-top-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 32px 72px -10px rgba(0, 0, 0, 0.65),
    inset 0 2px 2px rgba(255, 255, 255, 0.9),
    0 0 45px rgba(45, 212, 168, 0.18);
}

.lp-glass-sheen {
  position: absolute;
  inset: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  pointer-events: none;
  animation: glassSheen 7s ease-in-out infinite;
}

.lp-glass-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2.2rem;
}

.lp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
}

.lp-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.lp-stat-label {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

.lp-stat-div {
  width: 1px;
  height: 32px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.45), transparent);
}

/* --- Scroll cue --- */
@keyframes gentleBounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50%      { transform: translateY(7px); opacity: 1; }
}
.lp-scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  padding: 0.5rem 1.15rem;
  color: #ffffff;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  backdrop-filter: blur(16px);
  animation: gentleBounce 2.4s ease-in-out infinite;
  transition: all 0.2s ease;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}
.lp-scroll-cue:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--accent-teal);
}

/* ==========================================================================
   PANELS SECTION  ·  TRUE LIQUID GLASS QUAD GRID
   ========================================================================== */
.lp-panels {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem 7rem;
}

.lp-panels-grid {
  max-width: 1020px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

/* --- TRUE LIQUID GLASS CARDS (Translucent Liquid Optics + Specular Sheen + Razor Readability) --- */
@keyframes cardGlassSheen {
  0%   { transform: translateX(-180%) skewX(-22deg); opacity: 0; }
  14%  { opacity: 0.65; }
  35%  { transform: translateX(280%) skewX(-22deg); opacity: 0; }
  100% { transform: translateX(280%) skewX(-22deg); opacity: 0; }
}

.lp-card {
  position: relative;
  padding: 2.2rem 2rem;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.08) 22%,
    rgba(18, 24, 38, 0.36) 55%,
    rgba(255, 255, 255, 0.14) 100%
  );
  backdrop-filter: blur(64px) saturate(220%) brightness(1.14);
  -webkit-backdrop-filter: blur(64px) saturate(220%) brightness(1.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-top: 1.5px solid rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 24px 60px -10px rgba(0, 0, 0, 0.55),
    inset 0 1.5px 1.5px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1.5px 2px 0 rgba(0, 0, 0, 0.25),
    0 0 35px rgba(255, 255, 255, 0.10);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  will-change: transform, opacity;
  transition:
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

/* Glass specular curvature reflection at top */
.lp-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, transparent 100%);
  border-radius: 20px 20px 0 0;
  pointer-events: none;
  z-index: 1;
}

/* Staggered animated liquid sheen across cards */
.lp-card-sheen {
  position: absolute;
  inset: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  pointer-events: none;
  animation: cardGlassSheen 7.5s ease-in-out infinite;
  z-index: 1;
}

#card-tl .lp-card-sheen { animation-delay: 0s; }
#card-tr .lp-card-sheen { animation-delay: 1.8s; }
#card-bl .lp-card-sheen { animation-delay: 3.6s; }
#card-br .lp-card-sheen { animation-delay: 5.4s; }

.lp-card:hover {
  border-color: rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  transform: translateY(-3px);
}

#card-tl:hover {
  box-shadow:
    0 32px 72px -10px rgba(0, 0, 0, 0.7),
    inset 0 2px 2px 0 rgba(255, 255, 255, 0.95),
    0 0 45px rgba(251, 191, 36, 0.28);
}

#card-tr:hover {
  box-shadow:
    0 32px 72px -10px rgba(0, 0, 0, 0.7),
    inset 0 2px 2px 0 rgba(255, 255, 255, 0.95),
    0 0 45px rgba(45, 212, 168, 0.28);
}

#card-bl:hover {
  box-shadow:
    0 32px 72px -10px rgba(0, 0, 0, 0.7),
    inset 0 2px 2px 0 rgba(255, 255, 255, 0.95),
    0 0 45px rgba(6, 182, 212, 0.28);
}

#card-br:hover {
  box-shadow:
    0 32px 72px -10px rgba(0, 0, 0, 0.7),
    inset 0 2px 2px 0 rgba(255, 255, 255, 0.95),
    0 0 45px rgba(56, 189, 248, 0.28);
}

.lp-card-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0.95;
  border-radius: 20px 20px 0 0;
  z-index: 2;
}

.lp-card-icon {
  position: relative;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 1.5px rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
}

.lp-card-title {
  position: relative;
  z-index: 2;
  font-family: 'Outfit', sans-serif;
  font-size: 1.32rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.68rem;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.lp-card-body {
  position: relative;
  z-index: 2;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.7;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95), 0 1px 4px rgba(0, 0, 0, 0.9);
  flex: 1;
  margin-bottom: 1.35rem;
}

.lp-card-tag {
  position: relative;
  z-index: 2;
  display: inline-block;
  align-self: flex-start;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.70rem;
  font-weight: 600;
  padding: 0.32rem 0.78rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45), 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   CENTER LAUNCH AREA (IN THE CENTER OF THE 4 PANELS)
   ========================================================================== */
.lp-center {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2.2rem 1rem;
  will-change: transform, opacity;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lp-launch {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.2rem 3.4rem;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #38bdf8 100%);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9999px;
  cursor: pointer;
  box-shadow:
    0 12px 38px rgba(37, 99, 235, 0.55),
    0 0 28px rgba(56, 189, 248, 0.4);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.lp-launch:hover {
  transform: translateY(-2px) scale(1.025);
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
  box-shadow:
    0 18px 50px rgba(37, 99, 235, 0.75),
    0 0 38px rgba(56, 189, 248, 0.55);
  filter: brightness(1.08);
}

.lp-github {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.45rem 1.15rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-top: 1.5px solid rgba(255, 255, 255, 0.5);
  text-decoration: none;
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
}

.lp-github:hover {
  color: #ffffff;
  border-color: rgba(45, 212, 168, 0.5);
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(45, 212, 168, 0.35);
}

/* ========================  LANDING PAGE RESPONSIVE  ======================== */
@media (max-width: 820px) {
  .lp-hero {
    padding: 4.5rem 1rem 3rem;
    min-height: 92vh;
  }
  .lp-title {
    font-size: clamp(2.3rem, 10vw, 3.2rem) !important;
    letter-spacing: -0.02em;
  }
  .lp-subtitle {
    font-size: 0.92rem !important;
    line-height: 1.55;
    padding: 0 0.4rem;
    margin-bottom: 1.5rem !important;
  }
  .lp-panels-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }
  .lp-glass {
    border-radius: 18px;
    padding: 1.1rem 1rem !important;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
  }
  .lp-glass-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
  }
  .lp-stat-div {
    display: none;
  }
  .lp-stat-num {
    font-size: 1.45rem !important;
  }
  .lp-stat-label {
    font-size: 0.65rem !important;
  }
  .lp-panels {
    padding: 3rem 1rem 5.5rem;
  }
  .lp-card {
    padding: 1.5rem 1.3rem;
    border-radius: 18px;
  }
  .lp-card-title {
    font-size: 1.18rem;
  }
  .lp-card-body {
    font-size: 0.88rem;
    line-height: 1.6;
  }
  .lp-center {
    padding: 1.5rem 0.5rem;
  }
  .lp-launch {
    width: 100%;
    max-width: 320px;
    justify-content: center;
    padding: 1.05rem 2rem;
    font-size: 1.05rem;
  }
}

@media (max-width: 440px) {
  .lp-glass-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }
  .lp-stat-num {
    font-size: 1.3rem !important;
  }
}

/* ==========================================================================
   VIEW TRANSITION ORCHESTRATION (LANDING <-> DASHBOARD)
   ========================================================================== */

/* Landing Page Exit */
.lp.lp-exit .lp-content {
  opacity: 0;
  transform: translateY(-16px) scale(0.985);
  filter: blur(4px);
  transition: all 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.lp.lp-exit .lp-video-bg {
  opacity: 0;
  transition: opacity 0.38s ease;
}

/* Dashboard Window Enter */
.app-window.dashboard-enter {
  animation: dashboardMount 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Dashboard Exit back to landing */
.app-window.dashboard-exit {
  opacity: 0;
  transform: translateY(-14px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

/* Launch Button Active Pulsing Transition State */
.lp-launch.launching {
  transform: scale(0.96) !important;
  filter: brightness(1.2);
  box-shadow: 0 0 45px rgba(56, 189, 248, 0.85), 0 0 20px rgba(37, 99, 235, 0.8) !important;
}

/* Return to Landing Nav Button */
.exit-to-landing-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.exit-to-landing-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  transform: translateX(-2px);
}
