/* ============================================
   YourDynamicDashboard — Landing Page
   Theme: Warm Obsidian & Sunset Glassmorphism
   ============================================ */

/* --- Custom Properties --- */
:root {
  --obsidian-950: #0a0908;
  --obsidian-900: #120d0a;
  --obsidian-800: #1a1410;
  --obsidian-700: #231c16;
  --obsidian-600: #2d251e;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --rust-500: #b45309;
  --rust-600: #92400e;
  --crimson-500: #dc2626;
  --crimson-600: #991b1b;
  --warm-50: #faf5f0;
  --warm-100: #f0e8e0;
  --warm-200: #e8ddd3;
  --warm-300: #c4b5a5;
  --warm-400: #a89888;
  /* Safe-area insets for notched phones */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

/* --- Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--obsidian-950);
  color: var(--warm-100);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  /* Safe-area bottom padding for notched devices */
  padding-bottom: var(--safe-bottom);
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--obsidian-950);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--amber-600), var(--rust-500));
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--amber-500), var(--amber-600));
}

/* --- Background Mesh Glows --- */
.bg-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.12;
  will-change: transform;
}

.glow-1 {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, var(--amber-500), transparent 70%);
  top: -12%;
  left: -8%;
}

.glow-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, var(--crimson-500), transparent 70%);
  top: 38%;
  right: -12%;
}

.glow-3 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, var(--rust-500), transparent 70%);
  bottom: -8%;
  left: 25%;
}

/* --- Glassmorphic Navbar --- */
.glass-nav {
  background: rgba(10, 9, 8, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(251, 191, 36, 0.06);
  transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  /* Safe-area for notched phones */
  padding-top: var(--safe-top);
  z-index: 250 !important;
}

.glass-nav.scrolled {
  background: rgba(10, 9, 8, 0.94);
  border-bottom-color: rgba(251, 191, 36, 0.12);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
}

.nav-link {
  position: relative;
  color: var(--warm-300);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 6px 0;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, var(--amber-500), var(--rust-500));
  border-radius: 1px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
  color: var(--warm-50);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.portfolio {
  color: var(--amber-400);
  font-weight: 600;
}

.nav-link.portfolio:hover {
  color: var(--amber-500);
}

/* --- Glass Cards --- */
.glass-card {
  background: rgba(18, 13, 10, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(251, 191, 36, 0.07);
  border-radius: 16px;
  transition: border-color 0.4s ease,
              box-shadow 0.4s ease,
              background 0.4s ease;
}

/* Hover effects only on devices that support hover */
@media (hover: hover) {
  .glass-card:hover {
    border-color: rgba(251, 191, 36, 0.22);
    box-shadow: 0 8px 40px rgba(245, 158, 11, 0.08),
                0 0 0 1px rgba(251, 191, 36, 0.06);
    background: rgba(18, 13, 10, 0.65);
  }
}

/* --- Feature Card 3D Tilt --- */
.feature-card {
  perspective: 800px;
}

.feature-card .card-inner {
  will-change: transform;
  transition: transform 0.1s linear;
}

.feature-card .card-content {
  position: relative;
}

/* Feature card enhanced glow — hover-only devices */
@media (hover: hover) {
  .feature-card:hover > .card-inner {
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.14),
                0 0 48px rgba(245, 158, 11, 0.06),
                0 8px 32px rgba(0, 0, 0, 0.25);
  }
}

/* --- Feature Icon --- */
.feature-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(180, 83, 9, 0.08));
  border: 1px solid rgba(251, 191, 36, 0.12);
  transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  flex-shrink: 0;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--amber-500);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) {
  .glass-card:hover .feature-icon {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(180, 83, 9, 0.16));
    border-color: rgba(251, 191, 36, 0.25);
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.12);
  }
}

/* --- Magnetic Button --- */
.magnetic-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: none;
  text-decoration: none;
  will-change: transform;
  transition: box-shadow 0.35s ease;
}

.magnetic-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.magnetic-btn.primary {
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: var(--obsidian-950);
}

@media (hover: hover) {
  .magnetic-btn.primary:hover {
    box-shadow: 0 0 32px rgba(245, 158, 11, 0.35),
                0 0 80px rgba(245, 158, 11, 0.08);
  }
}

.magnetic-btn.secondary {
  background: rgba(251, 191, 36, 0.06);
  color: var(--amber-400);
  border: 1px solid rgba(251, 191, 36, 0.18);
}

@media (hover: hover) {
  .magnetic-btn.secondary:hover {
    background: rgba(251, 191, 36, 0.12);
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.1);
  }
}

.magnetic-btn.outline-btn {
  background: transparent;
  color: var(--warm-200);
  border: 1px solid rgba(251, 190, 36, 0.267);
}

@media (hover: hover) {
  .magnetic-btn.outline-btn:hover {
    border-color: rgba(132, 150, 187, 0.705);
    background: rgba(251, 191, 36, 0.04);
  }
}

.magnetic-btn.live {
  background: linear-gradient(135deg, var(--crimson-500), var(--rust-600));
  color: var(--warm-50);
}

@media (hover: hover) {
  .magnetic-btn.live:hover {
    box-shadow: 0 0 32px rgba(220, 38, 38, 0.3),
                0 0 80px rgba(220, 38, 38, 0.08);
  }
}

/* --- Video Wrapper --- */
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(251, 191, 36, 0.1);
  background: var(--obsidian-900);
}

.video-wrapper .poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

@media (hover: hover) {
  .video-wrapper:hover .poster-img {
    transform: scale(1.03);
  }
}

.video-wrapper .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 9, 8, 0.35);
  transition: background 0.35s ease;
}

@media (hover: hover) {
  .video-wrapper:hover .play-overlay {
    background: rgba(10, 9, 8, 0.15);
  }
}

.play-btn-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s ease;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.25);
}

@media (hover: hover) {
  .play-btn-circle:hover {
    transform: scale(1.08);
    box-shadow: 0 0 64px rgba(245, 158, 11, 0.4);
  }
}

.play-btn-circle svg {
  width: 28px;
  height: 28px;
  fill: var(--obsidian-950);
  margin-left: 3px;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Mode Cards (Integration Split) --- */
.mode-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.06);
  transition: border-color 0.4s ease,
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s ease;
}

@media (hover: hover) {
  .mode-card:hover {
    border-color: rgba(251, 191, 36, 0.18);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  }
}

.mode-card .mode-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

@media (hover: hover) {
  .mode-card:hover .mode-img {
    transform: scale(1.05);
  }
}

.mode-card .mode-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 28px 28px;
  background: linear-gradient(
    to top,
    rgba(10, 9, 8, 0.96) 0%,
    rgba(10, 9, 8, 0.75) 50%,
    transparent 100%
  );
}

/* --- Section Accent Line --- */
.accent-line {
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, var(--amber-500), var(--rust-500));
  border-radius: 2px;
}

/* --- Gradient Text --- */
.gradient-text {
  background: linear-gradient(135deg, var(--warm-50) 20%, var(--amber-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-warm {
  background: linear-gradient(135deg, var(--amber-400), var(--rust-500), var(--crimson-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Typewriter Cursor --- */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  background: var(--amber-500);
  margin-left: 2px;
  animation: cursor-blink 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* --- Developer Avatar --- */
.dev-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(251, 191, 36, 0.18);
  object-fit: cover;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;
}

@media (hover: hover) {
  .dev-avatar:hover {
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.15);
  }
}

/* --- Footer Links --- */
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--warm-400);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

@media (hover: hover) {
  .footer-link:hover {
    color: var(--amber-400);
  }
}

.footer-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* --- Reveal Animation Base (GSAP) --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
}

/* --- Lazy Load: hide until src loaded, then fade in --- */
[data-src] {
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* Once loaded, JS adds this class */
.lazy-loaded {
  opacity: 1 !important;
}

/* Images without data-src (already loaded or hero) should be visible */
img:not([data-src]) {
  opacity: 1;
}

/* --- Mobile Menu --- */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100dvh;
  background: rgba(10, 9, 8, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(251, 191, 36, 0.08);
  z-index: 200;
  padding: 88px 32px 32px;
  padding-top: calc(88px + var(--safe-top));
  padding-right: calc(32px + var(--safe-right));
  transition: right 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu a {
  display: block;
  padding: 16px 0;
  color: var(--warm-200);
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(251, 191, 36, 0.06);
  transition: color 0.3s ease;
}

.mobile-menu a:hover {
  color: var(--amber-400);
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.mobile-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* --- Hamburger Button --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 201;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--warm-200);
  border-radius: 1px;
  transition: transform 0.35s ease, opacity 0.25s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero Image Container (CLS prevention) --- */
.hero-image-wrap {
  position: relative;
  width: 100%;
  max-width: 1000px;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4),
              0 0 120px rgba(245, 158, 11, 0.04);
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Store Badge --- */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber-400);
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.12);
}

/* --- Section Label --- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-500);
}

.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--amber-500);
  border-radius: 1px;
}

/* --- Divider --- */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(251, 191, 36, 0.08) 20%,
    rgba(251, 191, 36, 0.08) 80%,
    transparent
  );
}

/* --- Install Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  /* Safe-area padding on all sides */
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-container {
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 
              0 0 40px rgba(251, 191, 36, 0.05);
}

.modal-overlay.open .modal-container {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--warm-400);
  transition: color 0.2s ease, transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.03);
  border: 1px solid rgba(251, 191, 36, 0.05);
}

@media (hover: hover) {
  .modal-close-btn:hover {
    color: var(--amber-400);
    transform: rotate(90deg);
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.15);
  }
}

.modal-store-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 12px;
  color: var(--warm-200);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid rgba(251, 191, 36, 0.1);
  background: rgba(251, 191, 36, 0.03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-store-btn svg {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

@media (hover: hover) {
  .modal-store-btn:hover svg {
    transform: scale(1.1);
  }

  /* Chrome hover state */
  .modal-store-btn.chrome-btn:hover {
    background: rgba(251, 191, 36, 0.08);
    border-color: var(--amber-500);
    color: var(--amber-400);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.12);
  }

  /* Firefox hover state */
  .modal-store-btn.firefox-btn:hover {
    background: rgba(220, 38, 38, 0.06);
    border-color: var(--crimson-500);
    color: #ff5a00;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.1);
  }

  /* Edge hover state */
  .modal-store-btn.edge-btn:hover {
    background: rgba(251, 191, 36, 0.05);
    border-color: #0078d7;
    color: #0078d7;
    box-shadow: 0 0 20px rgba(0, 120, 215, 0.1);
  }
}

/* Equal width layout for Hero buttons & Try It Live button */
.magnetic-btn.live,
#hero-buttons .magnetic-btn {
  width: 220px;
}

#hero-buttons .magnetic-btn.live {
  width: 190px;
}

/* ============================================
   RESPONSIVE DESIGN — Mobile View
   ============================================ */

/* --- Tablet (max 1024px) --- */
@media (max-width: 1024px) {
  .mode-card .mode-img {
    height: 260px;
  }
}

/* --- Tablet/Mobile (max 768px) --- */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .desktop-nav {
    display: none;
  }

  /* Reduce glow intensity on mobile for performance */
  .glow {
    opacity: 0.06;
  }

  .glow-1 {
    width: 350px;
    height: 350px;
  }

  .glow-2 {
    width: 280px;
    height: 280px;
  }

  .glow-3 {
    width: 250px;
    height: 250px;
  }

  /* Mode card images */
  .mode-card .mode-img {
    height: 220px;
  }

  .mode-card .mode-overlay {
    padding: 28px 20px 20px;
  }

  /* Play button sizing */
  .play-btn-circle {
    width: 60px;
    height: 60px;
  }

  .play-btn-circle svg {
    width: 22px;
    height: 22px;
  }

  /* Hero image */
  .hero-image-wrap {
    border-radius: 12px;
  }

  /* Buttons — full width on mobile */
  .magnetic-btn {
    padding: 12px 20px;
    font-size: 0.85rem;
  }

  .magnetic-btn.live,
  #hero-buttons .magnetic-btn,
  #hero-buttons .magnetic-btn.live {
    width: 100%;
    max-width: 320px;
  }

  /* Video wrapper */
  .video-wrapper {
    border-radius: 12px;
  }

  /* Section headings */
  .section-heading {
    font-size: 1.75rem !important;
  }

  /* Developer card */
  .dev-card {
    padding: 24px 20px !important;
  }

  .dev-avatar {
    width: 64px;
    height: 64px;
  }

  /* Feature icon smaller */
  .feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .feature-icon svg {
    width: 20px;
    height: 20px;
  }

  /* Footer links — 3 upper, 2 down flex layout */
  .footer-content .flex-wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 12px 16px !important;
  }

  .footer-content .flex-wrap .text-warm-400\/20 {
    display: inline-block !important;
  }

  /* Force line break after Firefox dot */
  .footer-content .flex-wrap span:nth-of-type(3) {
    flex-basis: 100%;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: transparent;
    pointer-events: none;
  }

  .footer-content .footer-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
  }

  /* Modal — ensure it fits */
  .modal-container {
    margin: 16px;
    max-width: calc(100vw - 32px);
  }

  .modal-store-btn {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
}

/* --- Small Mobile (max 480px) --- */
@media (max-width: 480px) {
  /* Hero typography */
  #hero .font-heading {
    font-size: 2.25rem !important;
    line-height: 1.1;
  }

  #hero-subtitle {
    font-size: 0.95rem !important;
  }

  /* Store badge */
  .store-badge {
    font-size: 0.65rem;
    padding: 5px 10px;
    gap: 4px;
  }

  .store-badge svg {
    width: 12px;
    height: 12px;
  }

  /* Hero buttons */
  #hero-buttons {
    gap: 12px !important;
  }

  #hero-buttons .flex-wrap {
    flex-direction: column;
    width: 100%;
    align-items: center;
  }

  .magnetic-btn.live,
  #hero-buttons .magnetic-btn,
  #hero-buttons .magnetic-btn.live {
    width: 100%;
    max-width: 280px;
  }

  /* Mode card images */
  .mode-card .mode-img {
    height: 200px;
  }

  .mode-card {
    border-radius: 14px;
  }

  /* Feature card padding */
  .feature-card .card-inner {
    padding: 20px !important;
  }

  /* Section padding */
  section {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  #hero {
    padding-top: 96px !important;
    padding-bottom: 40px !important;
  }

  /* Section headings */
  .section-heading {
    font-size: 1.5rem !important;
  }

  /* Smaller section labels */
  .section-label {
    font-size: 0.65rem;
  }

  /* Dev card text */
  .dev-card p {
    font-size: 0.875rem !important;
  }

  /* Footer */
  .footer-link {
    font-size: 0.8rem;
  }

  /* Modal */
  .modal-container {
    margin: 12px;
    padding: 20px !important;
  }

  .modal-container h3 {
    font-size: 1.1rem;
  }

  .modal-store-btn {
    padding: 11px 14px;
    font-size: 0.85rem;
    gap: 10px;
  }
}

/* --- Extra Small Mobile (max 360px) --- */
@media (max-width: 360px) {
  /* Hero title */
  #hero .font-heading {
    font-size: 1.85rem !important;
    line-height: 1.12;
  }

  #hero-subtitle {
    font-size: 0.85rem !important;
  }

  /* Navbar */
  .glass-nav .max-w-7xl {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Content padding */
  .max-w-7xl,
  .max-w-5xl,
  .max-w-3xl {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Mode card images */
  .mode-card .mode-img {
    height: 180px;
  }

  .mode-card .mode-overlay {
    padding: 20px 16px 16px;
  }

  .mode-card .mode-overlay h3 {
    font-size: 1rem;
  }

  .mode-card .mode-overlay p {
    font-size: 0.8rem;
  }

  /* Feature icon even smaller */
  .feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .feature-icon svg {
    width: 18px;
    height: 18px;
  }

  /* Buttons */
  .magnetic-btn {
    padding: 10px 16px;
    font-size: 0.8rem;
    border-radius: 10px;
  }

  /* Hero buttons */
  .magnetic-btn.live,
  #hero-buttons .magnetic-btn,
  #hero-buttons .magnetic-btn.live {
    max-width: 100%;
  }

  /* Modal */
  .modal-store-btn {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .modal-store-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* --- Landscape Mobile — prevent content from being too cramped --- */
@media (max-height: 500px) and (orientation: landscape) {
  #hero {
    padding-top: 72px !important;
    padding-bottom: 24px !important;
  }

  #hero .font-heading {
    font-size: 2rem !important;
  }

  .mode-card .mode-img {
    height: 180px;
  }

  .play-btn-circle {
    width: 48px;
    height: 48px;
  }

  .play-btn-circle svg {
    width: 18px;
    height: 18px;
  }
}
