/* ==========================================================================
   Layout — Skip link, container, header, footer for worldclassmemory.com.
   Same classes and behaviour as yanjaa.com/css/layout.css, trimmed to what
   this site uses.
   ========================================================================== */

/* ---------- 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);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.75rem 0;
}

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

.nav__logo {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-on-dark);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* the last word folds away once the header turns jade, with a little bounce
   (on yanjaa.com it is the surname; here it is "Memory") */
.nav__logo-last {
  display: inline-block;
  max-width: 12ch;
  overflow: hidden;
  white-space: pre;
  vertical-align: baseline;
  transition: max-width 0.45s cubic-bezier(0.6, -0.28, 0.74, 0.05), opacity 0.25s ease;
}

.site-header.scrolled .nav__logo-last {
  max-width: 0;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .nav__logo-last { transition: none; }
}

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

.nav__link {
  display: inline-block;
  padding: 0.7rem 0;        /* 44px tap target; the row is laid out by the header padding anyway */
  margin: -0.7rem 0;
  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;
}

.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__link:hover {
  opacity: 1;
}

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

/* ---------- Footer ---------- */
/* The footer floats over the tail of the hero: the mist and the dark stage
   run on underneath the copyright line with no seam between the two. */
.site-footer {
  position: relative;
  z-index: 2;
  background: transparent;
  color: var(--text-on-dark);
  margin-top: -5rem;
  padding: 1.5rem 0 2rem;
}

/* with the localhost testimonials section in between, the footer can't float
   over the hero: it gets its own dark ground */
body.has-testimonials .site-footer {
  margin-top: 0;
  background: #04262e;
  padding-top: 2.5rem;
}

.footer__bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
  text-align: center;
  opacity: 0.22;   /* as quiet as the knot above it */
}

.footer__link-quiet {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.footer__link-quiet:hover {
  border-bottom-color: currentColor;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav__links {
    gap: 1.25rem;
  }

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

@media (max-width: 600px) {
  .nav { gap: 1rem; }
  .nav__logo { font-size: 1.15rem; flex-shrink: 0; }
  .nav__links { gap: 1rem; }
  .nav__link { font-size: 0.66rem; letter-spacing: 0.1em; white-space: nowrap; }
}

/* the form is the first screen anyway, so the waitlist link only earns its
   place from 480px up */
@media (max-width: 480px) {
  .nav__links li:first-child { display: none; }
}
