/* StudyBuddy landing page — extends the dashboard's slate/indigo theme */

.landing {
  background: #f8fafc;
}

/* Hero */
.hero-glow {
  background:
    radial-gradient(600px circle at 15% -10%, rgba(99, 102, 241, 0.35), transparent 60%),
    radial-gradient(500px circle at 90% 0%, rgba(16, 185, 129, 0.25), transparent 55%),
    linear-gradient(180deg, #0f172a 0%, #111827 60%, #0f172a 100%);
}

.hero-chip {
  backdrop-filter: blur(6px);
}

/* Floating gradient blobs for visual depth */
.hero-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
  will-change: transform;
}

.hero-blob-1 {
  width: 340px;
  height: 340px;
  top: -60px;
  left: -60px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
  animation: float-blob-1 11s ease-in-out infinite;
}

.hero-blob-2 {
  width: 300px;
  height: 300px;
  bottom: -80px;
  right: -40px;
  background: radial-gradient(circle, #10b981, transparent 70%);
  animation: float-blob-2 13s ease-in-out infinite;
}

@keyframes float-blob-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 25px) scale(1.1); }
}

@keyframes float-blob-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-25px, -20px) scale(1.08); }
}

.hero-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 30%, black 0%, transparent 75%);
}

/* Rotating exam word in the hero heading */
.hero-rotator-wrap {
  display: inline-block;
  vertical-align: top;
}

.hero-rotator {
  display: inline-block;
  background: linear-gradient(90deg, #a5b4fc, #6ee7b7, #a5b4fc);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-pan 4s linear infinite;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.hero-rotator.is-swapping {
  opacity: 0;
  transform: translateY(6px);
}

@keyframes gradient-pan {
  to { background-position: 200% center; }
}

/* Bouncing scroll cue */
.scroll-cue svg {
  animation: scroll-cue-bounce 2s ease-in-out infinite;
}

@keyframes scroll-cue-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* Shimmer sweep across the primary CTA */
.cta-shimmer {
  position: relative;
  overflow: hidden;
}

.cta-shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: cta-shimmer-sweep 3.2s ease-in-out infinite;
}

@keyframes cta-shimmer-sweep {
  0% { left: -60%; }
  55%, 100% { left: 130%; }
}

/* 3D tilt-on-hover cards */
[data-tilt] {
  transform-style: preserve-3d;
  will-change: transform;
}

/* Sticky mini-CTA */
.sticky-cta {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translate(-50%, 140%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem 0.6rem 1.1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  box-shadow: 0 12px 30px -8px rgba(15, 23, 42, 0.25);
  transition: transform 0.4s ease;
}

.sticky-cta.is-visible {
  transform: translate(-50%, 0);
}

/* Exam marquee */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 28s linear infinite;
}

.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Short benefit labels around the dashboard preview. */
.dashboard-annotations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.dashboard-annotations-top {
  margin-bottom: 0.35rem;
}

.dashboard-annotations-bottom {
  margin-top: 0.35rem;
}

.dashboard-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-height: 4.5rem;
  color: #475569;
  text-align: center;
}

.dashboard-note strong {
  display: block;
  color: inherit;
  font-family: "Caveat", cursive;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
}

.dashboard-note p {
  margin-top: 0.08rem;
  color: inherit;
  font-family: "Caveat", cursive;
  font-size: 0.95rem;
  line-height: 1.05;
}

.dashboard-note-arrow {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 1.75rem;
  color: inherit;
  font-family: "Caveat", cursive;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
}

.dashboard-annotations-top .dashboard-note {
  flex-direction: column-reverse;
}

.dashboard-annotations-top .dashboard-note-amber {
  grid-column: 3;
}

.dashboard-annotations-bottom .dashboard-note {
  flex-direction: column;
}

.dashboard-note-indigo { color: #4f46e5; transform: rotate(-3deg); }
.dashboard-note-rose { color: #e11d48; transform: rotate(2deg); }
.dashboard-note-amber { color: #b45309; transform: rotate(3deg); }
.dashboard-note-violet { color: #7c3aed; transform: rotate(-2deg); }
.dashboard-note-emerald { color: #059669; transform: rotate(2deg); }
.dashboard-note-slate { color: #475569; transform: rotate(-2deg); }

/* Full dashboard preview, matching the complete app layout. */
.dashboard-teaser {
  position: relative;
  overflow: visible;
  padding: 0.5rem;
  margin: -0.5rem;
}

.dashboard-side-note {
  position: absolute;
  top: 11rem;
  left: -8.5rem;
  z-index: 15;
  width: 9.5rem;
  min-height: 0;
  justify-content: flex-end;
  text-align: right;
}

.dashboard-side-note-right {
  top: 23.5rem;
  right: -9.25rem;
  left: auto;
  width: 9rem;
  justify-content: flex-start;
  text-align: left;
}

@media (max-width: 1023px) {
  .dashboard-side-note {
    position: static;
    width: auto;
    min-height: 4.5rem;
    justify-content: center;
    text-align: center;
  }

  .dashboard-side-note-right {
    width: auto;
  }
}

.dashboard-teaser::before {
  content: "Preview of your personal StudyBuddy dashboard";
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 12;
  padding: 0.35rem 0.65rem;
  border: 1px solid #e0e7ff;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.9);
  color: #4f46e5;
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.dashboard-teaser-fade {
  display: none;
}

.dashboard-teaser-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: min(39rem, 100%);
  margin: 0 auto;
  padding: 0.8rem 0.9rem;
  border: 1px solid #e0e7ff;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px -14px rgba(15, 23, 42, 0.35);
}

@media (max-width: 640px) {
  .dashboard-annotations {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .dashboard-annotations-top .dashboard-note-amber {
    grid-column: auto;
  }

  .dashboard-side-note {
    position: static;
    width: auto;
    min-height: 4.5rem;
    justify-content: center;
    text-align: center;
  }

  .dashboard-annotations-bottom {
    margin-top: 0.75rem;
  }

  .dashboard-teaser::before {
    display: none;
  }

  .dashboard-teaser-cta {
    flex-wrap: wrap;
  }

  .dashboard-teaser-cta a {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mastery bars animate width once visible */
.mastery-bar {
  width: 0%;
  transition: width 1.1s ease;
}

/* Locked preview overlay */
.locked-card {
  position: relative;
  overflow: hidden;
}

.locked-card .locked-content {
  filter: blur(4px);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
  transition: filter 0.3s ease;
}

.locked-badge {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  z-index: 10;
}

.stat-lock .locked-badge {
  top: 2.35rem;
  bottom: auto;
  height: 2.15rem;
}

/* Live pulse dot */
.pulse-dot {
  position: relative;
  display: inline-flex;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #10b981;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.5);
  animation: pulse-ring 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

.leaderboard-row-flash {
  animation: row-flash 1.2s ease;
}

@keyframes row-flash {
  0% { background-color: rgba(99, 102, 241, 0.12); }
  100% { background-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .pulse-dot::after { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .hero-blob-1, .hero-blob-2, .hero-rotator, .scroll-cue svg, .cta-shimmer::after { animation: none; }
}
