/* =========================
   Global Layout
========================= */

.section {
  padding-block: var(--section-spacing);
}

.narrow {
  max-width: 780px;
}


/* =========================
   Header & Navigation
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 25, 32, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(247, 245, 242, 0.1);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-block: 0.85rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* =========================
   Hero Layout
========================= */

.hero {
  min-height: 80vh;
  display: grid;
  align-items: center;
}

.hero-grid {
  display: grid;
  gap: 2rem;
}

.hero-content {
  max-width: 760px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 2rem;
}

/* =========================
   Section Layouts
========================= */

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section-soft {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(
      rgba(15, 25, 32, 0.72),
      rgba(15, 25, 32, 0.82)
    ),
    radial-gradient(
      circle at top right,
      rgba(200, 155, 94, 0.18),
      transparent 34rem
    ),
    url("../assets/images/hero-mountains.webp")
      center / cover no-repeat;
}

.section-sage {
  background: rgba(122, 139, 120, 0.12);
}

/* =========================
   Grid Systems
========================= */

.roadmap-grid,
.path-grid,
.method-grid,
.preview-grid,
.step-grid {
  display: grid;
  gap: 1.25rem;
}

.bridge-split {
  display: grid;
  gap: 2rem;
}

/* =========================
   Footer
========================= */

.site-footer {
  padding-block: 2rem;
  border-top: 1px solid rgba(47, 72, 88, 0.12);
}

/* =========================
   Footer Layout
========================= */

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: var(--color-slate);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-amber);
}

/* =========================
   Responsive Layout
========================= */

@media (min-width: 768px) {
  .nav-links {
    width: auto;
  }

  .hero-grid {
    grid-template-columns:
      minmax(0, 1.5fr)
      minmax(280px, 0.7fr);

    align-items: center;
  }

  .hero-actions {
    flex-direction: row;
  }

  .roadmap-grid,
  .path-grid,
  .method-grid,
  .preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bridge-split {
    grid-template-columns:
      minmax(0, 0.9fr)
      minmax(0, 1.1fr);

    align-items: start;
  }

  .step-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* Portrait phones */
@media (max-width: 767px) and (orientation: portrait) {
  .section {
    padding-block: 3rem;
  }
}

/* Mobile landscape */
@media (orientation: landscape) and (max-height: 480px) and (max-width: 920px) {
  .section {
    padding-block: 1.75rem;
  }

  .site-nav {
    gap: 0.5rem;
    padding-block: 0.4rem;
  }

  .nav-links {
    gap: 0.5rem 0.75rem;
  }

  .nav-links li {
    padding-block: 0.25rem;
  }

  .brand-mark {
    line-height: 1.1;
  }
}

/* Portrait navigation edge cases */
@media (orientation: portrait) and (width: 320px) and (max-height: 568px),
  (orientation: portrait) and (width: 375px) and (height: 667px) {
  .site-nav {
    gap: 0.5rem;
    padding-block: 0.4rem;
  }

  .nav-links {
    gap: 0.5rem 0.75rem;
  }

  .nav-links li {
    padding-block: 0.25rem;
  }

  .brand-mark {
    line-height: 1.1;
  }
}

/* Remaining portrait navigation edge cases */
@media (orientation: portrait) and (width: 320px) and (height: 480px),
  (orientation: portrait) and (width: 360px) and (height: 640px) {
  .site-nav {
    gap: 0.4rem;
    padding-block: 0.3rem;
  }

  .nav-links {
    gap: 0.35rem 0.6rem;
  }

  .nav-links li {
    padding-block: 0.18rem;
  }

  .brand-mark {
    line-height: 1.05;
  }
}

/* Final portrait navigation tune-up */
@media (orientation: portrait) and (width: 390px) and (height: 844px),
  (orientation: portrait) and (width: 414px) and (height: 896px),
  (orientation: portrait) and (width: 430px) and (height: 932px) {
  .site-nav {
    gap: 0.75rem;
    padding-block: 0.65rem;
  }

  .nav-links {
    gap: 0.75rem 1rem;
  }

  .nav-links li {
    padding-block: 0.5rem;
  }

  .brand-mark {
    line-height: 1.1;
  }
}

/* Small landscape section edge cases */
@media (orientation: landscape) and (max-height: 375px) and (max-width: 667px) {
  .section {
    padding-block: 2.5rem;
  }
}

@media (orientation: landscape) and (width: 640px) and (height: 360px) {
  .section {
    padding-block: 2rem;
  }
}

/* Landscape navigation edge cases */
@media (orientation: landscape) and (width: 480px) and (height: 320px),
  (orientation: landscape) and (width: 568px) and (height: 320px),
  (orientation: landscape) and (width: 640px) and (height: 360px),
  (orientation: landscape) and (width: 667px) and (height: 375px),
  (orientation: landscape) and (width: 740px) and (height: 360px) {
  .site-nav {
    gap: 0.4rem;
    padding-block: 0.3rem;
  }

  .nav-links {
    gap: 0.35rem 0.6rem;
  }

  .nav-links li {
    padding-block: 0.18rem;
  }

  .brand-mark {
    line-height: 1.05;
  }
}

/* Final landscape navigation tune-up */
@media (orientation: landscape) and (width: 480px) and (height: 320px),
  (orientation: landscape) and (width: 568px) and (height: 320px),
  (orientation: landscape) and (width: 740px) and (height: 360px) {
  .site-nav {
    gap: 0.2rem;
    padding-block: 0.15rem;
  }

  .nav-links {
    gap: 0.18rem 0.35rem;
  }

  .nav-links li {
    padding-block: 0.08rem;
  }

  .brand-mark {
    line-height: 0.95;
  }
}

/* Short desktop height edge case */
@media (orientation: landscape) and (max-height: 480px) and (min-width: 1000px) and (max-width: 1280px) {
  .section {
    padding-block: 3rem;
  }
}

@media (orientation: landscape) and (max-height: 480px) and (min-width: 1100px) and (max-width: 1280px) {
  .site-nav {
    gap: 0.75rem;
    padding-block: 0.65rem;
  }

  .nav-links {
    gap: 0.75rem 1rem;
  }

  .nav-links li {
    padding-block: 0.5rem;
  }

  .brand-mark {
    line-height: 1.1;
  }
}
