/* ============================================
   KAMIAH WARD — Static HTML/CSS Clone
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Poppins:wght@300;400;500;600;700;900&family=Anton&family=PT+Serif:ital,wght@0,400;0,700;1,400&display=swap');

/* --- Custom Properties --- */
:root {
  --color-accent: #b8860b;
  --color-accent-hover: #d4a017;
  --color-black: #0a0a0a;
  --color-white: #ffffff;
  --color-off-white: #f7f7f8;
  --color-gray: #888;
  --color-light-gray: #e0e0e0;
  --color-dark: #1d1d22;

  --font-display: 'Lora', Georgia, serif;
  --font-body: 'Poppins', 'Helvetica Neue', sans-serif;
  --font-heading-lg: 'Anton', 'Impact', sans-serif;

  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;

  --nav-height: 60px;
  --container-max: 1200px;
  --container-wide: 1400px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-dark);
  background: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-nav {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 3rem);
  max-width: var(--container-wide);
  z-index: 1000;
  background: var(--color-white);
  /* No backdrop-filter here: the background above is fully opaque, so a blur
     was invisible, but it still forced the compositor to snapshot and blur the
     page behind this fixed bar on every scroll frame. */
  height: var(--nav-height);
  display: flex;
  align-items: center;
  border-radius: 50px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Deeper shadow once the page is scrolled. Toggled as a class by main.js so the
   scroll handler never writes inline styles. */
.site-nav.is-scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

.nav-inner {
  width: 100%;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-dark);
  /* Set in caps as a wordmark. Caps need more air between letters than mixed
     case does -- at 0.5px they run together into one block -- so the tracking
     goes up with them. */
  text-transform: uppercase;
  letter-spacing: 1.5px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-dark);
  letter-spacing: 0.5px;
  position: relative;
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  transition: color 0.3s ease, background 0.3s ease;
  /* Belt-and-braces: never let a single link wrap mid-label. The breakpoint
     below collapses to a hamburger before the row gets too tight. */
  white-space: nowrap;
}

.nav-links a:hover {
  background: var(--color-off-white);
  color: var(--color-dark);
}

.nav-links a.active {
  background: var(--color-dark);
  color: var(--color-white);
}

.nav-official-link {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-dark);
  padding: 0.4rem 1rem;
  border: 1.5px solid var(--color-light-gray);
  border-radius: 50px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-official-link:hover {
  background: var(--color-dark);
  border-color: var(--color-dark);
  color: var(--color-white);
}

.nav-search {
  color: var(--color-dark);
  cursor: pointer;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.nav-search:hover {
  color: var(--color-accent);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  transition: all 0.3s ease;
}

.nav-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO SECTIONS
   ============================================ */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.hero-bg.parallax {
  background-attachment: fixed;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--color-white);
  padding: 2rem;
}

.hero-content h6 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 1rem;
  opacity: 0.85;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 400;
  font-style: italic;
}

/* Shape divider */
.shape-divider {
  position: relative;
  background: #dde5f3;
  padding-top: 1px;
}

.shape-divider::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: var(--color-white);
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

/* ============================================
   HOME PAGE — BULLETIN SECTION
   ============================================ */
.bulletin-section {
  padding: 4rem 2rem 3rem;
  text-align: center;
  margin-top: var(--nav-height);
}

/* Only target the section title, not h2s inside bulletin pages */
.bulletin-section > h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  font-style: italic;
  color: var(--color-dark);
  margin-bottom: 2.5rem;
}

.flipbook-container {
  max-width: 800px;
  margin: 0 auto 2rem;
  position: relative;
  display: flex;
  justify-content: center;
}

.flipbook-wrapper {
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
}

#flipbook {
  width: 600px;
  height: 450px;
}

#flipbook .page {
  background: var(--color-white);
  overflow: hidden;
}

#flipbook .page canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.flipbook-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.flipbook-nav button {
  background: var(--color-accent);
  border: none;
  color: var(--color-white);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.flipbook-nav button:hover {
  background: var(--color-accent-hover);
}

.flipbook-dots {
  display: flex;
  gap: 6px;
}

.flipbook-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-light-gray);
  cursor: pointer;
  transition: background 0.3s ease;
}

.flipbook-dots span.active {
  background: var(--color-accent);
}

/* ============================================
   FEATURE CARDS (Home 3-up)
   ============================================ */
/* Four cards, and never a lone orphan on a second row: 4-up on wide screens,
   2x2 on tablets, stacked on phones. At the 1400px container this leaves each
   card 316px wide against its 280px height. */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

@media (max-width: 1100px) {
  .feature-cards { grid-template-columns: repeat(2, 1fr); }
}

.feature-card {
  position: relative;
  height: 280px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}

.feature-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}

.feature-card:hover .feature-card-bg {
  transform: scale(1.08);
}

.feature-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.45);
  transition: background 0.3s ease;
}

.feature-card:hover .feature-card-overlay {
  background: rgba(10, 10, 10, 0.55);
}

/* The calendar photo is far brighter than the other three: it is sunlit,
   near-white paper. Measured over the card as cover actually crops it at each
   breakpoint, the standard 0.45 scrim leaves white text at only 3.26:1 over
   the lightest parts. 0.60 lifts the worst pixel to 5.38:1, clearing 4.5:1 at
   every breakpoint, so this card gets a heavier scrim of its own.
   Re-measure if the photo is ever swapped again. */
.feature-card.is-bright .feature-card-overlay {
  background: rgba(10, 10, 10, 0.6);
}

.feature-card.is-bright:hover .feature-card-overlay {
  background: rgba(10, 10, 10, 0.68);
}

.feature-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--color-white);
  padding: 2rem;
  text-align: center;
}

.feature-card-content h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.8rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border: 2px solid var(--color-white);
  color: var(--color-white);
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  background: var(--color-white);
  color: var(--color-dark);
}

.btn-accent {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-accent:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-white);
}

.btn-dark {
  border-color: var(--color-dark);
  color: var(--color-dark);
}

.btn-dark:hover {
  background: var(--color-dark);
  color: var(--color-white);
}

/* ============================================
   TESTIMONIAL / QUOTE SECTION
   ============================================ */
.quote-section {
  padding: 6rem 2rem;
  text-align: center;
  background: var(--color-off-white);
  border-radius: var(--radius-lg);
  /* The bottom margin is the point: without it the quote card butts straight
     into the footer, and two large blocks touching with no gap read as one
     mistake rather than two sections. */
  margin: 0 2rem 4rem;
}

@media (max-width: 900px) {
  .quote-section {
    padding: 3.5rem 1.5rem;
    margin: 0 0.5rem 2.5rem;
  }
}

.quote-section blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-dark);
  max-width: 800px;
  margin: 0 auto 1.5rem;
}

.quote-section .quote-author {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-gray);
}

.quote-section .quote-source {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  color: var(--color-gray);
}

.quote-section .quote-source a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.quote-section .quote-source a:hover { color: var(--color-accent); }

.quote-section .quote-author-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
}

/* ============================================
   INFO COLUMNS (Church Services)
   ============================================ */
.info-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 5rem 2rem;
  text-align: center;
}

.info-col .info-icon {
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: 1.2rem;
}

.info-col h3 {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.info-col p {
  font-size: 0.95rem;
  color: var(--color-gray);
  margin-bottom: 1.2rem;
}

/* ============================================
   LIVESTREAM SECTION
   ============================================ */
.livestream-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
  text-align: center;
}

.livestream-section h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.livestream-section p {
  font-size: 0.9rem;
  color: var(--color-gray);
  margin-bottom: 2rem;
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================
   MAP SECTION
   ============================================ */
.map-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.map-container {
  width: 100%;
  height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================
   FAMILY HISTORY — HOURS CARD
   ============================================ */
.hours-card-section {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 5rem 2rem;
}

.hours-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

.hours-card-image {
  min-height: 400px;
  background-size: cover;
  background-position: center;
}

.hours-card-body {
  padding: 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hours-card-body h2 {
  font-family: var(--font-body);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.hours-card-body .hours-item {
  margin-bottom: 0.8rem;
  font-size: 1rem;
  color: var(--color-dark);
}

.hours-card-body .hours-item strong {
  font-weight: 700;
}

.hours-card-body .btn {
  margin-top: 2rem;
  align-self: flex-start;
}

/* ============================================
   MISSIONARIES
   ============================================ */
.missionaries-section {
  max-width: 700px;
  margin: 0 auto;
  padding: 5rem 2rem;
  text-align: center;
}

.missionaries-section h3 {
  font-family: var(--font-body);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.accent-line {
  width: 40px;
  height: 2px;
  background: var(--color-accent);
  margin: 0 auto 2rem;
}

.missionaries-section p {
  font-size: 1rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 2rem;
}

/* ============================================
   ANNOUNCEMENTS
   ============================================ */
.announcements-section {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 5rem 6% 5rem;
  margin-top: var(--nav-height);
}

.announcements-title {
  font-family: var(--font-heading-lg);
  font-size: clamp(3rem, 9vw, 8rem);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0;
  color: var(--color-dark);
}

.announcement-divider {
  width: 100%;
  height: 1px;
  background: var(--color-dark);
  margin: 2.5rem 0;
}

.announcement-item {
  padding: 0.5rem 0;
}

.announcement-item h3 {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 400;
  line-height: 1.7;
  max-width: 66%;
}

.announcement-item em strong {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

/* ============================================
   BULLETIN PAGE (standalone)
   ============================================ */
.bulletin-page-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  margin-top: var(--nav-height);
}

.bulletin-page-section h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-style: italic;
  text-align: center;
  margin-bottom: 2rem;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--color-black);
  color: var(--color-white);
  padding: 6rem 2rem;
  text-align: center;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.footer-title {
  font-family: var(--font-heading-lg);
  font-size: clamp(3rem, 10vw, 9rem);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 2rem;
}

.footer-subtitle {
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 3rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.footer-links a {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}

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

.footer-bottom {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 1px;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ============================================
   UTILITIES
   ============================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .feature-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .hours-card {
    grid-template-columns: 1fr;
  }

  .hours-card-image {
    min-height: 280px;
  }

  .announcement-item h3 {
    max-width: 100%;
  }
}

/* Collapse the inline nav into a hamburger at 1180px — six links + brand +
   the "Official Church Site" pill + search need this much room before the
   row gets tight. The pill is the wide item; if it were removed this could
   drop back to ~960px. */
@media (max-width: 1180px) {
  .nav-links {
    display: none;
    position: fixed;
    top: calc(var(--nav-height) + 20px);
    left: 1.5rem;
    right: 1.5rem;
    width: auto;
    background: var(--color-white);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  }

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

  .nav-hamburger {
    display: flex;
  }
}

@media (max-width: 768px) {

  .feature-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .feature-card {
    height: 220px;
  }

  .info-columns {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero {
    min-height: 50vh;
  }

  #flipbook {
    width: 100%;
    height: 350px;
  }

  .bulletin-section {
    padding: 2rem 1rem 1.5rem;
  }

  .nav-official-link {
    display: none;
  }

  .nav-brand {
    font-size: 1rem;
  }

  .announcements-section {
    padding: 3rem 5%;
  }
}

@media (max-width: 480px) {
  .nav-inner {
    padding: 0 1rem;
  }

  .bulletin-section {
    padding: 3rem 1rem 2rem;
  }

  .feature-cards {
    padding: 0 1rem 3rem;
  }

  .feature-card {
    height: 180px;
  }

  .hours-card-body {
    padding: 2rem;
  }
}

/* Mobile: a black bar.
   Kept at the END of this file on purpose: the 1180px hamburger block below
   also sets .nav-links background, at equal specificity, so this has to come
   after it or the dropdown keeps a white panel while its links turn white.
   White-on-black is the higher-contrast pair, and on a phone this bar sits
   directly over the bulletin's photo backdrop where a white bar and a white
   page ran into each other. The dropdown panel goes dark with it -- a white
   sheet hanging off a black bar reads as an accident -- and its links get a
   48px row rather than a 30px one, which is the same reason as the controls
   below it. */
@media (max-width: 900px) {
  /* An island on phones, sized to the bulletin's control bar so the two line
     up: 0.5rem clear of each edge rather than the 1.5rem the desktop pill
     uses, which was eating 24px a side on a 390px screen.

     Positioned with left/right rather than the desktop's `left: 50%` plus
     `transform: translateX(-50%)`, and that is deliberate. A transform makes an
     element the containing block for its fixed-position descendants, so with
     one here the dropdown's offsets would be measured from the BAR instead of
     the screen -- which is a trap worth not re-setting. Without it both are
     measured the same way and simply share the inset. */
  .site-nav {
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    width: auto;
    max-width: none;
    transform: none;
    border-radius: 50px;
    background: var(--color-dark);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.28);
  }
  .site-nav.is-scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  }
  .nav-brand,
  .nav-search {
    color: var(--color-white);
  }
  .nav-hamburger span {
    background: var(--color-white);
  }

  /* A separate card, narrower than the bar and clear of it.

     Flush and the same width did not work. The bar is a 50px-radius pill, so
     its bottom edge curves inward while the panel's top edge is straight --
     the panel's square corners stuck out past the curve on both sides and read
     as a rendering fault. Tucking them under would mean matching the pill's
     flat bottom, only 274px of a 374px bar, which is far too narrow.

     So it stops pretending to be part of the bar: inset a further 0.75rem each
     side, a small gap above, and rounded on all four corners. Nothing touches,
     so there is no corner to go wrong.

     There is no transform above, so these offsets are viewport-relative and the
     bar's own 0.5rem top has to be added back. */
  .nav-links {
    top: calc(0.5rem + var(--nav-height) + 0.4rem);
    left: 1.25rem;
    right: 1.25rem;
    background: var(--color-dark);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    padding: 1.25rem 1.5rem 1.5rem;
  }
  .nav-links a {
    color: var(--color-white);
    font-size: 1.05rem;
    padding: 0.75rem 1rem;
  }
  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-white);
  }
  .nav-links a.active {
    background: var(--color-white);
    color: var(--color-dark);
  }
}
