:root {
  --landing-bg: #06060a;
  --landing-surface: rgba(18, 18, 30, 0.6);
  --landing-nav-surface: rgba(13, 13, 22, 0.78);
  --landing-border: rgba(238,242,255,0.1);
  --accent-cyan: #06b6d4;
  --accent-violet: #8b5cf6;
  --accent-lime: #06b6d4;
  --glow-cyan: 0 12px 30px rgba(6, 182, 212, 0.2);
  --glow-violet: 0 14px 34px rgba(139, 92, 246, 0.22);
  --radius-md: 16px;
  --radius-lg: 24px;
}

html,
body {
  min-height: 100%;
}

body {
  overflow-x: hidden;
  background-color: var(--landing-bg);
  background-image: radial-gradient(rgba(238,242,255,0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  color: #eef2ff;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  scroll-behavior: smooth;
}

/* ============ Premium sticky glass navbar ============ */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
  min-height: 68px;
  padding: 0.6rem 0;
  background: rgba(6, 6, 10, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}
.navbar.nav-hidden { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) {
  .navbar { transition: none; }
}

.navbar-container {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1rem;
}

.navbar-brand {
  flex-shrink: 0;
  color: #fff !important;
  font-weight: 800;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.2;
  font-family: 'Sora', sans-serif;
  font-size: 1.02rem;
}

.navbar-brand small {
  display: block;
  font-size: 0.68rem;
  color: rgba(238,242,255,0.6);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.navbar-brand .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-violet), inset 0 1px 0 rgba(255,255,255,0.25);
}

.navbar-brand .brand-mark svg {
  width: 21px;
  height: 21px;
}

/* Centered nav links */
.navbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.navbar-container { position: relative; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(238,242,255,0.78) !important;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  padding: 0.6rem 0.95rem !important;
  transition: all 0.3s ease;
  border-radius: 10px;
  white-space: nowrap;
}

.nav-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: all 0.3s ease;
}

/* Soft cyan glow underline that slides in on hover */
.nav-link::after {
  content: "";
  position: absolute;
  left: 0.95rem;
  right: 0.95rem;
  bottom: 0.28rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-violet), var(--accent-cyan));
  box-shadow: 0 0 10px rgba(6,182,212,0.55);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link:focus {
  color: #fff !important;
  background: rgba(238,242,255,0.05);
}

.nav-link:hover::after,
.nav-link:focus::after {
  transform: scaleX(1);
}

.nav-link:hover svg,
.nav-link:focus svg {
  opacity: 1;
  color: var(--accent-cyan);
}

/* Right-side premium gradient CTA */
.navbar-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.navbar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  min-height: 42px;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  box-shadow: 0 8px 24px rgba(139,92,246,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: all 0.3s ease;
}

.navbar-cta svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.navbar-cta:hover {
  transform: translateY(-1px) scale(1.03);
  color: #fff;
  box-shadow: 0 12px 32px rgba(6,182,212,0.45), inset 0 1px 0 rgba(255,255,255,0.25);
}

.navbar-cta:active {
  transform: scale(0.98);
}

#show-login-btn,
#show-login-btn-mobile {
  white-space: nowrap;
}

.navbar-toggler {
  border: 1px solid var(--landing-border);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(238,242,255,0.06);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.navbar-toggler:hover {
  background: rgba(238,242,255,0.12);
  transform: translateY(-1px);
  box-shadow: var(--glow-violet);
}

.navbar-toggler-icon {
  display: inline-block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  position: relative;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: '';
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  position: absolute;
  left: 0;
}

.navbar-toggler-icon::before {
  top: -6px;
}

.navbar-toggler-icon::after {
  top: 6px;
}

@media (max-width: 991px) {
  .navbar { min-height: 62px; }
}

.btn-pill { border-radius: 999px; }

.hero-actions .btn-light {
  background: rgba(238,242,255,0.08);
  color: #fff;
  border: 1px solid var(--landing-border);
  box-shadow: none;
}
.hero-actions .btn-light:hover {
  background: rgba(238,242,255,0.16);
  color: #fff;
  transform: translateY(-2px);
}

.hero-actions .btn-outline-light {
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-lime));
  color: #04040a;
  border: none;
  box-shadow: var(--glow-violet);
}
.hero-actions .btn-outline-light:hover {
  color: #04040a;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 40px rgba(6,182,212,0.35);
}

.landing-mobile-menu {
  width: 100%;
  max-width: 360px;
  background: var(--landing-surface);
  backdrop-filter: blur(14px);
  border-left: 1px solid var(--landing-border);
}

.landing-mobile-menu .offcanvas-header {
  padding: 1.4rem 1.4rem 0.9rem;
  border-bottom: 1px solid var(--landing-border);
}

.landing-mobile-menu .offcanvas-header h5 {
  font-size: 1.1rem;
  color: #fff;
}

.landing-mobile-menu .offcanvas-body {
  padding: 1.5rem 1.4rem 2rem;
}

.offcanvas-backdrop.show {
  background-color: rgba(6, 8, 18, 0.6);
}

.offcanvas-end {
  width: min(100%, 360px);
  transform: translateX(100%);
  transition: transform 0.35s ease, visibility 0.35s ease;
  box-shadow: -18px 24px 70px rgba(6, 8, 18, 0.3);
}

.offcanvas.show {
  transform: translateX(0);
}

.landing-mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.landing-mobile-nav .nav-link {
  color: rgba(255,255,255,0.92) !important;
  font-size: 1.05rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.landing-mobile-nav .nav-link:hover,
.landing-mobile-nav .nav-link:focus {
  background: rgba(255,255,255,0.14);
  transform: translateX(-3px);
  box-shadow: var(--glow-violet);
}

.landing-mobile-nav .btn,
.landing-mobile-nav .btn-close {
  font-size: 1rem;
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius-md);
}

.animated-fade {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.35s; }
.delay-3 { animation-delay: 0.5s; }

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

.hero {
  position: relative;
  overflow: hidden;
  padding-top: 4rem;
  padding-bottom: 5rem;
  min-height: calc(100dvh - 69px);
  background: linear-gradient(135deg, rgba(6, 6, 10, 0.96), rgba(18, 18, 30, 0.92));
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.35;
  animation: float 10s ease-in-out infinite;
}

.orb-one {
  width: 240px;
  height: 240px;
  top: 10%;
  right: 8%;
  background: rgba(139, 92, 246, 0.55);
  box-shadow: var(--glow-violet);
}

.orb-two {
  width: 200px;
  height: 200px;
  bottom: 6%;
  left: 8%;
  background: rgba(6, 182, 212, 0.48);
  animation-delay: -3s;
  box-shadow: var(--glow-cyan);
}

.orb-three {
  width: 180px;
  height: 180px;
  bottom: 18%;
  right: 22%;
  background: rgba(6, 182, 212, 0.22);
  animation-delay: -5s;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1120px;
}

.hero-headline {
  max-width: 640px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--landing-surface);
  border: 1px solid var(--landing-border);
  border-radius: 999px;
  color: #e9d5ff;
  margin-bottom: 1.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  backdrop-filter: blur(14px);
}

.hero-badge svg {
  width: 15px;
  height: 15px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.hero .display-4 {
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  line-height: 1.05;
  margin-bottom: 1.2rem;
  font-weight: 900;
}

.hero .lead {
  font-size: 1.08rem;
  line-height: 1.9;
  color: rgba(238, 242, 255, 0.82);
  max-width: 680px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
  align-items: stretch;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.stat-chip {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1.1rem;
  background: var(--landing-surface);
  border: 1px solid var(--landing-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
}

.stat-chip strong {
  font-family: 'Sora', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-violet);
}
.stat-chip:nth-child(2) strong { color: var(--accent-cyan); }
.stat-chip:nth-child(3) strong { color: var(--accent-lime); }

.stat-chip span {
  font-size: 0.8rem;
  color: rgba(238,242,255,0.68);
}

.hero-panel {
  display: grid;
  align-self: center;
}

.hero-card {
  position: relative;
  padding: 1.8rem;
  border-radius: var(--radius-md);
  background: var(--landing-surface);
  border: 1px solid var(--landing-border);
  box-shadow: var(--glow-violet);
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6,182,212,0.08), transparent 40%);
  pointer-events: none;
}

.chart-card {
  position: relative;
  padding: 1.8rem;
  border-radius: var(--radius-md);
  background: var(--landing-surface);
  border: 1px solid var(--landing-border);
  box-shadow: var(--glow-violet);
  backdrop-filter: blur(14px);
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.chart-title,
.graph-title,
.table-title {
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}

.chart-badge,
.table-note {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.88);
  font-size: 0.82rem;
  font-weight: 600;
}

.graph-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.88);
  font-size: 0.82rem;
  font-weight: 600;
}

.chart-bars {
  display: grid;
  gap: 1rem;
}

.chart-bar {
  display: grid;
  gap: 0.65rem;
}

.chart-bar span {
  font-size: 0.9rem;
  color: rgba(238,242,255,0.8);
}

.bar-bg {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  transform-origin: left center;
  animation: fillBars 1.4s ease-out forwards;
  box-shadow: var(--glow-cyan);
}

.fill-1 { background: linear-gradient(90deg, var(--accent-violet), var(--accent-cyan)); width: 88%; }
.fill-2 { background: linear-gradient(90deg, #10b981, #06b6d4); width: 72%; animation-delay: 0.1s; }
.fill-3 { background: linear-gradient(90deg, #facc15, #fb7185); width: 98%; animation-delay: 0.2s; }

@keyframes fillBars {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

.section {
  padding: 5rem 0;
}

.section-soft {
  background: linear-gradient(180deg, rgba(26,30,27,0.4), rgba(10,13,11,0.15));
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 2.5rem;
}

.section-text {
  color: rgba(238,242,255,0.75);
  line-height: 1.8;
}

.panel-card {
  border: 1px solid var(--landing-border);
  border-radius: var(--radius-md);
  background: var(--landing-surface);
  box-shadow: var(--glow-violet);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  backdrop-filter: blur(14px);
  padding: 2rem;
  height: 100%;
}

.panel-card:hover {
  transform: translateY(-4px);
  border-color: rgba(6,182,212,0.35);
  box-shadow: var(--glow-cyan);
}

/* ============ Subjects bento (replaces generic 3-equal feature cards) ============ */
.subject-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "a a b"
    "a a c"
    "d e f";
  gap: 1.1rem;
}

.subject-card {
  border: 1px solid var(--landing-border);
  border-radius: var(--radius-md);
  background: var(--landing-surface);
  backdrop-filter: blur(14px);
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.subject-card:hover {
  transform: translateY(-4px);
  border-color: rgba(6,182,212,0.35);
  box-shadow: var(--glow-cyan);
}

.subject-card h3 {
  font-size: 1.05rem;
  margin: 0;
}

.subject-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(6, 182, 212, 0.16));
  border: 1px solid rgba(139,92,246,0.22);
  color: #c4b5fd;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.subject-icon svg {
  width: 22px;
  height: 22px;
}

.subject-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.82rem;
  color: rgba(238,242,255,0.62);
}

.subject-percent {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  color: var(--accent-violet);
}

.subject-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(238,242,255,0.08);
  overflow: hidden;
}

.subject-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-violet), var(--accent-lime));
  box-shadow: var(--glow-violet);
}

.subject-featured {
  grid-area: a;
  box-shadow: var(--glow-violet);
  border-color: rgba(139,92,246,0.28);
  justify-content: flex-start;
  gap: 0.85rem;
  padding: 1.8rem;
}

.subject-featured h3 { font-size: 1.4rem; }

.subject-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.subject-featured .subject-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
}

.subject-featured .subject-icon svg {
  width: 26px;
  height: 26px;
}

.subject-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #e9d5ff;
  background: rgba(139,92,246,0.16);
  border: 1px solid rgba(139,92,246,0.28);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.subject-desc {
  color: rgba(238,242,255,0.72);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

.subject-featured .subject-percent { color: #e9d5ff; }

.subject-card:nth-of-type(2) { grid-area: b; }
.subject-card:nth-of-type(3) { grid-area: c; }
.subject-card:nth-of-type(4) { grid-area: d; }
.subject-card:nth-of-type(5) { grid-area: e; }
.subject-card:nth-of-type(6) { grid-area: f; }

@media (max-width: 900px) {
  .subject-bento {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "a a"
      "b c"
      "d e"
      "f f";
  }
}

@media (max-width: 560px) {
  .subject-bento {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "a"
      "b"
      "c"
      "d"
      "e"
      "f";
  }
}

.panel-card h3 {
  font-size: 1.45rem;
  margin-bottom: 1.2rem;
}

.visual-card,
.table-card {
  min-height: 420px;
}

.visual-graph {
  display: grid;
  gap: 1.5rem;
}

.graph-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.graph-grid {
  position: relative;
  min-height: 260px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at top left, rgba(6,182,212,0.12), transparent 10%),
              linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  border: 1px solid var(--landing-border);
  overflow: hidden;
  padding: 0.5rem;
}

.week-chart {
  width: 100%;
  height: 260px;
  display: block;
  overflow: visible;
}

.week-chart-grid line {
  stroke: rgba(238,242,255,0.08);
  stroke-width: 1;
}

.week-chart-area {
  animation: fadeInUp 1s ease 0.2s both;
}

.week-chart-line {
  fill: none;
  stroke: var(--accent-violet);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: drawLine 1.6s ease-out 0.2s forwards;
}

.week-chart-dot {
  fill: var(--landing-bg);
  stroke: var(--accent-violet);
  stroke-width: 2.5;
  opacity: 0;
  animation: bounceIn 0.6s ease-out both;
  animation-delay: 1.6s;
}

.week-chart-dot-peak {
  fill: var(--accent-lime);
  stroke: var(--accent-lime);
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

.graph-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 0.5rem;
  color: rgba(238,242,255,0.6);
  font-size: 0.82rem;
}

@media (prefers-reduced-motion: reduce) {
  .week-chart-line { animation: none; stroke-dashoffset: 0; }
  .week-chart-dot { animation: none; opacity: 1; }
  .week-chart-area { animation: none; }
}

.metrics-table {
  width: 100%;
  border-collapse: collapse;
}

.metrics-table th,
.metrics-table td {
  padding: 1rem 0.75rem;
  color: rgba(255,255,255,0.82);
}

.metrics-table thead tr {
  border-bottom: 1px solid var(--landing-border);
}

.metrics-table tbody tr {
  transition: background 0.2s ease;
}

.metrics-table tbody tr:hover {
  background: rgba(6,182,212,0.08);
}

.progress-pill {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.progress-high { background: rgba(16,185,129,0.14); color: #a7f3d0; }
.progress-mid { background: rgba(6,182,212,0.12); color: #bae6fd; }
.progress-low { background: rgba(249,115,22,0.14); color: #fed7aa; }

.section-label {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 0.8rem;
}

.roadmap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.6rem;
  position: relative;
}

.roadmap::before {
  content: '';
  position: absolute;
  left: 40px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-violet), var(--accent-cyan));
  opacity: 0.25;
}

.roadmap-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--landing-border);
  transition: all 0.3s ease;
  position: relative;
}

.roadmap-item:hover {
  border-color: rgba(139,92,246,0.3);
  box-shadow: var(--glow-violet);
}

.roadmap-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-cyan));
  color: #04040a;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: var(--glow-violet);
}

@keyframes bounceIn {
  0% { transform: translateY(24px) scale(0.7); opacity: 0; }
  70% { transform: translateY(-6px) scale(1.05); opacity: 1; }
  100% { transform: translateY(0) scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-18px); }
}

@keyframes fillBars {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-top: 3.5rem;
    padding-bottom: 4rem;
  }

  .hero-panel {
    order: -1;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }

  .hero {
    padding-top: 3rem;
  }

  .hero .display-4 {
    font-size: clamp(2.2rem, 7vw, 3.2rem);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel {
    order: -1;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats {
    flex-direction: column;
  }

  .hero-stats .stat-chip {
    width: 100%;
  }

  .visual-card,
  .table-card {
    min-height: auto;
  }

  .landing-mobile-nav {
    gap: 1.2rem;
  }

  .landing-mobile-nav .nav-link {
    font-size: 1.08rem;
  }

  .navbar-toggler {
    display: inline-flex;
  }
}

.card,
.panel-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover,
.panel-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow-cyan);
}

.table-dark {
  --bs-table-bg: var(--landing-surface);
  --bs-table-border-color: var(--landing-border);
}

.table-hover > tbody > tr:hover > * {
  --bs-table-accent-bg: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.highlight-card { border: 1px solid rgba(139,92,246,0.2); }
.metric-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.metric-list .metric-item { display: flex; align-items: center; gap: 12px; font-size: 14px; color: rgba(255,255,255,0.85); }
.metric-ico {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(6,182,212,0.14));
  border: 1px solid rgba(139,92,246,0.22);
  color: #c4b5fd;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.metric-ico svg { width: 18px; height: 18px; }

.footer { padding: 2rem 0; border-top: 1px solid var(--landing-border); color: rgba(255,255,255,0.6); font-size: 14px; }

/* ============ Small-screen refinements ============ */

/* Metrics table scrolls inside its card instead of squeezing */
.table-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.metrics-table { min-width: 420px; }

@media (max-width: 768px) {
  .section-heading h2 { font-size: 1.45rem; }
  .section-text { font-size: 0.95rem; }

  .panel-card { padding: 1.3rem; }
  .subject-featured { padding: 1.4rem; }
  .subject-card { padding: 1.15rem 1.2rem; }
  .subject-card h3 { font-size: 1rem; }
  .subject-featured h3 { font-size: 1.2rem; }

  /* Weekly chart: shorter canvas, readable labels */
  .week-chart { height: 200px; }
  .graph-grid { min-height: 200px; }
  .graph-labels { font-size: 0.72rem; }

  .metrics-table th, .metrics-table td { padding: 0.7rem 0.55rem; font-size: 0.85rem; }
  .progress-pill { font-size: 0.78rem; padding: 0.28rem 0.6rem; }

  .roadmap::before { left: 36px; }
  .roadmap-step { width: 40px; height: 40px; font-size: 0.9rem; }
  .roadmap-item { padding: 0.85rem 0.9rem; }
  .roadmap-item p { font-size: 0.88rem; margin-bottom: 0; }

  .hero-badge { font-size: 0.78rem; padding: 0.5rem 0.85rem; }
  .hero .lead { font-size: 0.98rem; line-height: 1.75; }
  .chart-card { padding: 1.3rem; }

  .footer { text-align: center; font-size: 13px; }
}

@media (max-width: 480px) {
  /* Navbar: mark + name only, subtitle hidden */
  .navbar-brand small { display: none; }
  .brand-text { font-size: 0.95rem; }
  .navbar-brand .brand-mark { width: 36px; height: 36px; }
  .navbar-brand .brand-mark svg { width: 19px; height: 19px; }

  .week-chart { height: 170px; }
  .graph-grid { min-height: 170px; }

  .stat-chip { padding: 0.7rem 0.9rem; }
  .section { padding: 2.4rem 0; }
  .hero { padding-top: 2.2rem; padding-bottom: 3rem; }
  .hero .display-4 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
}

/* ============ 320px floor: smallest real devices ============ */
@media (max-width: 360px) {
  .navbar { width: 96vw; padding: 0.4rem 0.5rem; }
  .navbar-container { padding: 0 0.35rem; }
  .navbar-brand .brand-mark { width: 32px; height: 32px; border-radius: 11px; }
  .navbar-brand .brand-mark svg { width: 17px; height: 17px; }
  .brand-text { font-size: 0.85rem; }
  .navbar-toggler { width: 38px; height: 38px; }

  .hero { padding-top: 1.6rem; padding-bottom: 2.4rem; }
  .hero-badge { font-size: 0.72rem; padding: 0.45rem 0.7rem; gap: 0.4rem; }
  .hero-badge svg { width: 13px; height: 13px; }
  .hero .display-4 { font-size: clamp(1.5rem, 9vw, 2.1rem); }
  .hero .lead { font-size: 0.9rem; line-height: 1.65; }
  .hero-actions .btn { padding: 0.75rem 1rem; font-size: 0.88rem; }
  .stat-chip { padding: 0.55rem 0.75rem; }
  .stat-chip strong { font-size: 1rem; }
  .stat-chip span { font-size: 0.72rem; }

  .section { padding: 1.8rem 0; }
  .section-heading h2 { font-size: 1.25rem; }
  .section-text { font-size: 0.88rem; }
  .section-label { font-size: 0.72rem; letter-spacing: 0.14em; }

  .subject-card { padding: 0.95rem 1rem; }
  .subject-featured { padding: 1.15rem; }
  .subject-featured h3 { font-size: 1.05rem; }
  .subject-icon { width: 38px; height: 38px; }
  .subject-icon svg { width: 19px; height: 19px; }

  .week-chart { height: 150px; }
  .graph-grid { min-height: 150px; }
  .graph-labels { font-size: 0.66rem; }
  .metrics-table th, .metrics-table td { padding: 0.55rem 0.45rem; font-size: 0.78rem; }

  .roadmap-item { padding: 0.75rem 0.8rem; gap: 0.75rem; }
  .roadmap-step { width: 34px; height: 34px; font-size: 0.82rem; }
  .roadmap::before { left: 34px; }
}

/* ============ Scroll reveal (see initLandingScrollReveal in app.js) ============ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

.subject-bento .reveal:nth-child(1) { transition-delay: 0s; }
.subject-bento .reveal:nth-child(2) { transition-delay: 0.06s; }
.subject-bento .reveal:nth-child(3) { transition-delay: 0.12s; }
.subject-bento .reveal:nth-child(4) { transition-delay: 0.18s; }
.subject-bento .reveal:nth-child(5) { transition-delay: 0.24s; }
.subject-bento .reveal:nth-child(6) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}