/* ==========================================================================
   Layout — Container, sections, header, nav, footer for yanjaa.com
   ========================================================================== */

/* ---------- Skip to Content (a11y) ---------- */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--deep-forest);
  color: var(--text-on-dark);
  border-radius: 0 0 0.5rem 0.5rem;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: 0;
}

/* ---------- Container & Section ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
  position: relative;
  overflow: hidden;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: background 0.4s ease, padding 0.4s ease;
}

.site-header.scrolled {
  background: rgba(13, 92, 75, 0.95);
  backdrop-filter: blur(10px);
  padding: 0.75rem 0;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-on-dark);
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-on-dark);
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--turquoise);
  transition: width 0.3s ease;
}

/* Mix of underline colors — target li position, not .nav__link (always :first-child of its li) */
.nav__links li:nth-child(1) .nav__link::after { background: var(--turquoise); }
.nav__links li:nth-child(2) .nav__link::after { background: var(--amber); }
.nav__links li:nth-child(3) .nav__link::after { background: var(--lavender); }
.nav__links li:nth-child(4) .nav__link::after { background: var(--orchid); }
.nav__links li:nth-child(5) .nav__link::after { background: #ff659e; }

.nav__link:hover {
  opacity: 1;
}

.nav__link:hover::after {
  width: 100%;
}

/* Scrollspy state — the section in view lights its link (single champagne accent) */
.nav__link--active {
  opacity: 1;
}

.nav__link--active::after,
.nav__links li:nth-child(n) .nav__link--active::after {
  width: 100%;
  background: var(--champagne);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-on-dark);
  transition: all 0.3s ease;
}

/* ---------- Footer ---------- */
.site-footer {
  /* Same dark stage as the Say hi section above it, so the page ends in one
     continuous surface instead of two stacked darks. */
  background: #04262e;
  color: var(--text-on-dark);
  padding: 1.5rem 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer__tagline {
  opacity: 0.7;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.footer__social {
  display: flex;
  gap: 1rem;
}

.footer__social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.footer__social-link:hover {
  background: var(--turquoise);
  border-color: var(--turquoise);
  color: var(--deep-forest);
}

.footer__column-title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.25rem;
  opacity: 0.6;
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__link {
  font-size: 0.95rem;
  opacity: 0.8;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.footer__link:hover {
  opacity: 1;
  color: var(--turquoise);
}

.footer__bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  /* Two anchor links fit inline — no drawer needed while the nav is minimal */
  .nav__links {
    gap: 1.25rem;
  }

  .nav__links--drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--deep-forest);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.4s ease;
  }

  .nav__links.active {
    right: 0;
  }

  .nav__links.active::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }

  .nav__toggle {
    display: flex;
    z-index: 1001;
  }

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

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

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

  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer__brand {
    max-width: 100%;
  }

  .footer__social {
    justify-content: center;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
