/* Route-based section visibility + layout refinements */

.route-hidden {
  display: none !important;
}

/* Section transition animations */
.section {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section.route-hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: none;
}

/* Body scroll lock during intro */
body.intro-active {
  overflow: hidden;
}

/* Staggered animation for section children */
.section > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section.route-hidden > * {
  opacity: 0;
  transform: translateY(30px);
  transition: none;
}

/* Floating bottom nav on desktop */
@media (min-width: 721px) {
  .top-shell {
    position: fixed;
    top: auto;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: calc(100% - 32px);
    min-height: 56px;
    padding: 6px 8px 6px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--panel);
    color: var(--ink);
    grid-template-columns: auto auto auto;
  }

  .top-shell .brand {
    color: var(--ink);
  }

  .top-shell .brand-mark {
    width: 36px;
    height: 36px;
    border-color: var(--line);
  }

  .top-shell .brand-text small {
    color: var(--muted);
  }

  .main-nav {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    padding: 0 6px;
    margin: 0 4px;
  }

  .main-nav button {
    color: var(--muted);
    min-height: 40px;
  }

  .main-nav button:hover,
  .main-nav button.active {
    color: var(--ink);
    background: var(--soft);
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
  }

  .top-shell .icon-button,
  .top-shell .mini-button {
    border-color: var(--line);
    color: var(--ink);
    background: var(--panel);
  }

  .top-shell .icon-button:hover,
  .top-shell .icon-button.active,
  .top-shell .play-dot {
    color: var(--ink);
    background: var(--soft);
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
  }

  main {
    padding-top: 48px;
    padding-bottom: 100px;
  }

  .hero,
  .section {
    scroll-margin-top: 24px;
  }
}

@media (max-width: 720px) {
  .top-shell {
    position: sticky;
    top: 0;
    transform: none;
    width: 100%;
    max-width: none;
    box-shadow: none;
    border-bottom: 1px solid var(--line);
    border-top: 0;
    background: var(--panel);
    color: var(--ink);
  }
}
