/* =========================================
   UJI LIFE — DESIGN SYSTEM
   Flat design matching the Flutter app
   ========================================= */
:root {
  --primary: #1C3861;
  --primary-deep: #0F2440;
  --primary-light: #2A4D7D;
  --secondary: #2D6A4F;
  --secondary-light: #40916C;
  --secondary-dark: #1B4332;
  --xp-gold: #FFD93D;
  --success: #4CAF50;
  --error: #E57373;
  --surface: #F8F9FA;
  --background: #FFFFFF;
  --text-primary: #1A1A1A;
  --text-secondary: #757575;
  --text-light: rgba(255,255,255,0.85);
  --card-radius: 20px;
  --btn-radius: 14px;
  --section-padding: 100px 5%;
  --max-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  background: var(--background);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
}

img { max-width: 100%; height: auto; }
a { text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  padding: 18px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.4s ease;
}

.navbar.scrolled {
  background: rgba(28, 56, 97, 0.97);
  padding: 12px 5%;
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo img {
  width: 38px; height: 38px;
  border-radius: 10px;
}

.nav-logo span {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.3s;
}

.nav-links a:hover { color: #fff; }

.nav-cta {
  background: var(--secondary) !important;
  color: #fff !important;
  padding: 10px 24px;
  border-radius: var(--btn-radius);
  font-weight: 700 !important;
  transition: all 0.3s !important;
}

.nav-cta:hover {
  background: var(--secondary-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46,125,91,0.35);
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--secondary);
  color: #fff;
  padding: 15px 32px;
  border-radius: var(--btn-radius);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(46,125,91,0.3);
}

.btn-primary:hover {
  background: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(46,125,91,0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.12);
  color: white;
  padding: 15px 32px;
  border-radius: var(--btn-radius);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 15px;
  border: 1.5px solid rgba(255,255,255,0.25);
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
  min-height: 100vh;
  background: linear-gradient(165deg, var(--primary-deep) 0%, var(--primary) 55%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 5% 80px;
}

/* Floating particles */
.particle {
  position: absolute;
  width: var(--size);
  height: var(--size);
  background: rgba(255,255,255, var(--opacity));
  border-radius: 50%;
  animation: float var(--duration) ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(calc(var(--drift-y) * -0.5)) translateX(calc(var(--drift-x) * 0.7)); }
  50% { transform: translateY(var(--drift-y)) translateX(var(--drift-x)); }
  75% { transform: translateY(calc(var(--drift-y) * -0.3)) translateX(calc(var(--drift-x) * -0.5)); }
}

/* Translucent floating medal decorations */
.hero-medal {
  position: absolute;
  opacity: 0.06;
  z-index: 0;
  animation: medalFloat 20s ease-in-out infinite;
}

.hero-medal svg {
  width: 100%;
  height: 100%;
}

@keyframes medalFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(8deg); }
}

.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-text h1 {
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 900;
  color: white;
  line-height: 1.12;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.hero-text h1 .highlight {
  color: var(--secondary-light);
}

.hero-text p {
  font-size: 17px;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 460px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.phone-mockup {
  width: 100%;
  max-width: 340px;
  animation: phoneFloat 5s ease-in-out infinite;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.35));
  border-radius: 28px;
}

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

.hero-chips {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  transition: all 0.3s;
}

.chip:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-3px);
}

.chip i {
  color: var(--secondary-light);
  font-size: 14px;
}

.chip span {
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  font-weight: 600;
}

/* =========================================
   SECTION COMMON
   ========================================= */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  background: rgba(46,125,91,0.1);
  color: var(--secondary-dark);
  padding: 8px 18px;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.section-header p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 14px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* =========================================
   FEATURES GRID
   ========================================= */
.features {
  padding: var(--section-padding);
  background: var(--surface);
}

.features-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: white;
  border-radius: var(--card-radius);
  padding: 32px 28px;
  border: 1px solid #E8ECF0;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(28, 56, 97, 0.1);
  border-color: transparent;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Card accent stripe */
.feature-card .card-accent {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  border-radius: var(--card-radius) var(--card-radius) 0 0;
}

/* =========================================
   APP PREVIEW SECTION (Interactive)
   ========================================= */
.app-preview {
  padding: var(--section-padding);
  background: var(--background);
}

.preview-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.preview-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.preview-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--surface);
  border: 1.5px solid #E8ECF0;
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s;
}

.preview-tab:hover {
  border-color: var(--secondary);
  color: var(--secondary-dark);
}

.preview-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.preview-tab i {
  font-size: 15px;
}

.preview-content {
  display: none;
}

.preview-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

.preview-content h3 {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
}

.preview-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

/* Preview mini-mockups */
.preview-mockup {
  background: var(--surface);
  border-radius: var(--card-radius);
  padding: 24px;
  border: 1px solid #E8ECF0;
}

/* Bus arrival board */
.bus-board {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bus-line {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: white;
  border-radius: 14px;
  border: 1px solid #E8ECF0;
}

.bus-line-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: white;
}

.bus-line-info {
  flex: 1;
}

.bus-line-info .name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}

.bus-line-info .dest {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.bus-time {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--success);
}

/* Grade card */
.grade-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.grade-ring-container {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px;
  background: white;
  border-radius: 16px;
  border: 1px solid #E8ECF0;
}

.grade-ring {
  position: relative;
  width: 80px;
  height: 80px;
}

.grade-ring svg {
  transform: rotate(-90deg);
}

.grade-ring .ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--primary);
}

.grade-info h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
}

.grade-info p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.grade-bar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border-radius: 12px;
  border: 1px solid #E8ECF0;
}

.grade-bar-item .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 80px;
}

.grade-bar-track {
  flex: 1;
  height: 8px;
  background: #ECEFF1;
  border-radius: 8px;
  overflow: hidden;
}

.grade-bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 1.2s ease;
}

.grade-bar-item .value {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--primary);
  min-width: 36px;
  text-align: right;
}

/* Phone frame for preview */
.preview-phone {
  width: 280px;
  margin: 0 auto;
  background: var(--primary);
  border-radius: 36px;
  padding: 12px;
  box-shadow: 0 24px 60px rgba(28,56,97,0.25);
}

.preview-phone-screen {
  background: white;
  border-radius: 28px;
  overflow: hidden;
  min-height: 480px;
}

/* =========================================
   CAMPUS GALLERY — ORBITAL DESIGN
   ========================================= */
.campus {
  padding: var(--section-padding);
  background: var(--primary);
  position: relative;
  overflow: hidden;
}

.campus .section-tag {
  background: rgba(46,125,91,0.2);
  color: var(--secondary-light);
}

.campus .section-header h2 {
  color: white;
}

.campus .section-header p {
  color: rgba(255,255,255,0.6);
}

/* ─── Pinterest Collage Background ─── */
.campus-collage {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 8px;
  padding: 8px;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;

  /* Spotlight mask – hidden by default, JS updates --mx/--my */
  --mx: -9999px;
  --my: -9999px;
  --spotlight-size: 280px;
  -webkit-mask-image: radial-gradient(
    circle var(--spotlight-size) at var(--mx) var(--my),
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.25) 40%,
    transparent 100%
  );
  mask-image: radial-gradient(
    circle var(--spotlight-size) at var(--mx) var(--my),
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.25) 40%,
    transparent 100%
  );
  transition: -webkit-mask-image 0.05s ease, mask-image 0.05s ease;
}

.collage-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.collage-col img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  opacity: 0.7;
  filter: saturate(0.6);
}

/* Scroll UP columns */
.col-up {
  animation: collageScrollUp 40s linear infinite;
}
/* Scroll DOWN columns */
.col-down {
  animation: collageScrollDown 45s linear infinite;
}

@keyframes collageScrollUp {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

@keyframes collageScrollDown {
  0%   { transform: translateY(-50%); }
  100% { transform: translateY(0); }
}

/* Ensure campus content sits ABOVE the collage */
.campus .section-header {
  position: relative;
  z-index: 5;
}

/* Orbital container */
.campus-orbital {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 580px;
  margin: 10px auto 0;
  z-index: 10;
}

/* ─── Central circle ─── */
.campus-center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  height: 340px;
  z-index: 20;
  pointer-events: none;
}

.campus-center-glow {
  position: absolute;
  inset: -36px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(46,125,91,0.2) 0%,
    rgba(55,120,180,0.1) 50%,
    transparent 70%
  );
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

.campus-center-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(145deg, #3a6ea5 0%, #2d5f8a 30%, #245078 60%, #1e4468 100%);
  box-shadow:
    0 16px 48px rgba(0,0,0,0.35),
    0 4px 16px rgba(0,0,0,0.2),
    inset 0 4px 8px rgba(255,255,255,0.12),
    inset 0 -6px 20px rgba(0,0,0,0.15),
    0 0 90px rgba(55,130,200,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid rgba(255,255,255,0.12);
}

.campus-agora-icon {
  width: 180px;
  height: 180px;
  filter: brightness(0) invert(1);
  opacity: 0.88;
}

/* ─── Decorative orbit ring ─── */
.campus-orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 460px;
  height: 460px;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.06);
  pointer-events: none;
  z-index: 1;
}

/* ─── Orbiting images (common) ─── */
.campus-orbit-img {
  position: absolute;
  z-index: 5;
  width: 160px;
  height: 110px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 10px 32px rgba(0,0,0,0.4),
    0 2px 8px rgba(0,0,0,0.2);
  transition: box-shadow 0.4s ease, filter 0.4s ease;
  cursor: pointer;
  /* Each image is placed using top/left from center, with individual rotation */
  transform-origin: center center;
}

.campus-orbit-img:hover {
  box-shadow:
    0 18px 48px rgba(0,0,0,0.5),
    0 0 24px rgba(46,125,91,0.25);
  filter: brightness(1.1);
}

.campus-orbit-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Positions: tightly around circle border with unique rotations ─── */
/* Images are positioned so that the circle edge overlaps them.
   Circle center is at 50%/50%, radius ~170px. We push images to sit
   partially under the circle edge. Each has a unique tilt rotation. */

/* Position 1: top-left (~150° from top, upper-left quadrant) */
.orbit-pos-1 {
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% + -230px), calc(-50% + -100px)) rotate(-8deg);
  animation: orbitFloat1 5s ease-in-out infinite;
}

/* Position 2: top-center (0°, directly above) */
.orbit-pos-2 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + -210px)) rotate(4deg);
  animation: orbitFloat2 6s ease-in-out infinite;
}

/* Position 3: top-right (~30° from top, upper-right quadrant) */
.orbit-pos-3 {
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% + 230px), calc(-50% + -100px)) rotate(10deg);
  animation: orbitFloat3 5.5s ease-in-out infinite;
}

/* Position 4: bottom-left (~210° from top) */
.orbit-pos-4 {
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% + -230px), calc(-50% + 110px)) rotate(6deg);
  animation: orbitFloat4 6.5s ease-in-out infinite;
}

/* Position 5: bottom-center (180°, directly below) */
.orbit-pos-5 {
  top: 50%;
  left: 50%;
  width: 170px;
  height: 115px;
  transform: translate(-50%, calc(-50% + 210px)) rotate(-5deg);
  animation: orbitFloat5 5s ease-in-out infinite;
}

/* Position 6: bottom-right (~330° from top) */
.orbit-pos-6 {
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% + 230px), calc(-50% + 110px)) rotate(-12deg);
  animation: orbitFloat6 5.8s ease-in-out infinite;
}

/* ─── Staggered floating animations with preserved rotations ─── */
@keyframes orbitFloat1 {
  0%, 100% { transform: translate(calc(-50% + -230px), calc(-50% + -100px)) rotate(-8deg); }
  50% { transform: translate(calc(-50% + -224px), calc(-50% + -112px)) rotate(-6deg); }
}

@keyframes orbitFloat2 {
  0%, 100% { transform: translate(-50%, calc(-50% + -210px)) rotate(4deg); }
  50% { transform: translate(-50%, calc(-50% + -222px)) rotate(2deg); }
}

@keyframes orbitFloat3 {
  0%, 100% { transform: translate(calc(-50% + 230px), calc(-50% + -100px)) rotate(10deg); }
  50% { transform: translate(calc(-50% + 224px), calc(-50% + -110px)) rotate(12deg); }
}

@keyframes orbitFloat4 {
  0%, 100% { transform: translate(calc(-50% + -230px), calc(-50% + 110px)) rotate(6deg); }
  50% { transform: translate(calc(-50% + -222px), calc(-50% + 120px)) rotate(4deg); }
}

@keyframes orbitFloat5 {
  0%, 100% { transform: translate(-50%, calc(-50% + 210px)) rotate(-5deg); }
  50% { transform: translate(-50%, calc(-50% + 220px)) rotate(-3deg); }
}

@keyframes orbitFloat6 {
  0%, 100% { transform: translate(calc(-50% + 230px), calc(-50% + 110px)) rotate(-12deg); }
  50% { transform: translate(calc(-50% + 222px), calc(-50% + 118px)) rotate(-10deg); }
}

/* =========================================
   GAMIFICATION SECTION
   ========================================= */
.gamification {
  padding: var(--section-padding);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.gamification-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* Medal display grid */
.medals-display {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.medal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: white;
  border-radius: 16px;
  border: 1px solid #E8ECF0;
  transition: transform 0.3s;
}

.medal-item:hover {
  transform: translateY(-4px) rotate(3deg);
}

.medal-hex {
  width: 56px;
  height: 64px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.medal-item .medal-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
}

.xp-bar-demo {
  background: white;
  border-radius: 14px;
  padding: 18px 22px;
  border: 1px solid #E8ECF0;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.xp-bar-demo .bar-track {
  flex: 1;
  height: 12px;
  background: #ECEFF1;
  border-radius: 10px;
  overflow: hidden;
}

.xp-bar-demo .bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--secondary), var(--secondary-light));
  border-radius: 10px;
  transition: width 1.5s ease;
}

.xp-bar-demo .bar-fill.animate { width: 72%; }

.xp-bar-demo .xp-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  color: var(--primary);
  font-size: 13px;
  white-space: nowrap;
}

.gamification-text h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
  line-height: 1.2;
}

.gamification-text p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.level-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.level-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid;
}

/* Floating background medals */
.bg-medal {
  position: absolute;
  opacity: 0.04;
}

.bg-medal svg {
  fill: var(--primary);
}

/* =========================================
   STATS SECTION
   ========================================= */
.stats {
  padding: 70px 5%;
  background: white;
}

.stats-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--surface);
  border-radius: var(--card-radius);
  border: 1px solid #E8ECF0;
  transition: transform 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 18px;
  color: white;
}

.stat-number {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* =========================================
   DOWNLOAD / CTA
   ========================================= */
.download {
  padding: var(--section-padding);
  background: linear-gradient(165deg, var(--primary-deep) 0%, var(--primary) 60%, var(--primary-light) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.download-content {
  max-width: 650px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.download .section-tag {
  background: rgba(46,125,91,0.2);
  color: var(--secondary-light);
}

.download h2 {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
}

.download p {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin-bottom: 36px;
}

.download-badges {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: white;
  color: var(--primary);
  padding: 14px 24px;
  border-radius: 14px;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.store-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.store-badge i { font-size: 26px; color: var(--primary); }
.store-badge .store-text { text-align: left; }
.store-badge .store-text small {
  font-size: 10px;
  opacity: 0.6;
  display: block;
  font-weight: 500;
  color: var(--text-secondary);
}
.store-badge .store-text strong {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
}

.store-badge.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.uji-only {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
}

.uji-only i { color: var(--secondary-light); font-size: 16px; }
.uji-only span {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
}

/* SVG logo in download section */
.download-logo {
  width: 260px;
  margin: 0 auto 24px;
  position: relative;
}

.download-logo svg {
  display: block;
  width: 100%;
  height: auto;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
  background: var(--primary-deep);
  padding: 50px 5% 24px;
  color: rgba(255,255,255,0.55);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-brand .footer-logo img {
  width: 32px; height: 32px;
  border-radius: 8px;
}

.footer-brand .footer-logo span {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: white;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
}

.footer-col h4 {
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 10px;
  transition: color 0.3s;
}

.footer-col a:hover { color: var(--secondary-light); }

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.footer-socials {
  display: flex;
  gap: 14px;
}

.footer-socials a {
  color: rgba(255,255,255,0.4);
  font-size: 18px;
  transition: color 0.3s;
}

.footer-socials a:hover { color: var(--secondary-light); }

/* =========================================
   SCROLL ANIMATIONS
   ========================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* =========================================
   MOBILE NAV
   ========================================= */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  background: rgba(15, 36, 64, 0.98);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 700;
  transition: color 0.3s;
}

.mobile-nav a:hover { color: var(--secondary-light); }

.mobile-nav-close {
  position: absolute;
  top: 20px; right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .campus-orbital { height: 460px; max-width: 700px; }
  .campus-orbit-img { width: 130px; height: 90px; }
  .orbit-pos-1 { transform: translate(calc(-50% + -185px), calc(-50% + -80px)) rotate(-8deg); }
  .orbit-pos-2 { transform: translate(-50%, calc(-50% + -170px)) rotate(4deg); }
  .orbit-pos-3 { transform: translate(calc(-50% + 185px), calc(-50% + -80px)) rotate(10deg); }
  .orbit-pos-4 { transform: translate(calc(-50% + -185px), calc(-50% + 90px)) rotate(6deg); }
  .orbit-pos-5 { width: 140px; height: 95px; transform: translate(-50%, calc(-50% + 170px)) rotate(-5deg); }
  .orbit-pos-6 { transform: translate(calc(-50% + 185px), calc(-50% + 90px)) rotate(-12deg); }
  .campus-center-circle { width: 220px; height: 220px; }
  .campus-agora-icon { width: 70px; height: 70px; }
  .campus-orbit-ring { width: 340px; height: 340px; }
  .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --section-padding: 70px 5%; }
  
  .navbar { padding: 12px 5%; }
  .nav-links { display: none; }
  .nav-hamburger { display: block; }

  .hero { padding: 100px 5% 60px; }
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 36px;
  }
  .hero-text p { margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }
  .hero-chips { justify-content: center; }
  .hero-visual { order: -1; }
  .phone-mockup { max-width: 240px; }

  .features-grid { grid-template-columns: 1fr; }

  .preview-container { grid-template-columns: 1fr; }
  .preview-phone-wrapper { display: none; }

  .campus-orbital {
    height: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-top: 20px;
  }
  .campus-orbit-img {
    position: relative;
    top: auto; left: auto; right: auto; bottom: auto;
    width: 100% !important;
    height: 140px !important;
    animation: none !important;
    transform: none !important;
  }
  .campus-center-circle {
    position: relative;
    top: auto; left: auto;
    transform: none;
    width: 160px; height: 160px;
    margin: 0 auto 10px;
    grid-column: 1 / -1;
  }
  .campus-center-glow { inset: -16px; }
  .campus-agora-icon { width: 50px; height: 50px; }
  .campus-center-text { font-size: 11px; }
  .campus-orbit-ring { display: none; }

  .gamification-content { grid-template-columns: 1fr; gap: 36px; }
  .medals-display { grid-template-columns: repeat(4, 1fr); }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-content { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .campus-orbital { grid-template-columns: repeat(2, 1fr); }
  .campus-orbit-img { height: 110px !important; }
  .medals-display { grid-template-columns: repeat(2, 1fr); }
  .hero-chips { gap: 6px; }
  .chip { padding: 8px 12px; }
}
