/* ─────────────────────────────────────────────
   Shared components
───────────────────────────────────────────── */

/* ---- Site nav + logo lockup ---- */

.nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}

.nav__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem; /* 14px — a touch smaller than the shared mono-m token */
  letter-spacing: -0.03em;
  padding: 0 var(--space-5);
}

.nav__links a {
  position: relative;
  transition: opacity var(--duration-fast) var(--ease-editorial);
}

.nav__links a:hover {
  opacity: 0.6;
}

.nav__links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.nav__logo {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: 3.5rem; /* 56px — fits on one line at every breakpoint thanks to the tight tracking + nowrap below */
  white-space: nowrap;
}

.nav__role {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: var(--text-italic-s);
}

@media (max-width: 640px) {
  /* No burger — the row just wraps so it stays comfortable on a
     narrow phone; the wordmark already shrinks via its own clamp. */
  .nav__links {
    flex-wrap: wrap;
    row-gap: var(--space-2);
    padding: 0;
  }
}

/* ---- Back link ---- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: var(--text-mono-m);
  transition: opacity var(--duration-fast) var(--ease-editorial);
}

.back-link:hover {
  opacity: 0.65;
}

.back-link__icon {
  display: inline-block;
  width: 10px;
  height: 3px;
  background-color: currentColor;
  -webkit-mask-image: url("../img/back-arrow.svg");
  mask-image: url("../img/back-arrow.svg");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* ---- Homepage menu list ("Titles") ---- */

.menu-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  align-items: center;
  width: 100%;
  margin-top: var(--space-6);
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
}

.menu-item__label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: var(--text-mono-s);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-align: center;
}

.menu-item__divider {
  width: 44px;
  height: 1px;
  background: currentColor;
  opacity: 0.3;
  border: 0;
  margin: 0;
}

.menu-item__name {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-mono-m);
  letter-spacing: -0.03em;
  text-align: center;
}

.menu-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  transition: opacity var(--duration-fast) var(--ease-editorial);
}

.menu-item a:hover {
  opacity: 0.6;
}

/* ---- Tagline + footnote ---- */

.tagline {
  font-family: var(--font-editorial);
  font-size: var(--text-editorial-l);
  line-height: 1.15;
  text-align: center;
}

.footnote {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 0.875rem; /* 14px */
  line-height: 1.3;
  text-align: center;
  opacity: 0.85;
}

/* ---- Project header block (used on project + story pages) ---- */

.project-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}

.project-header__subtitle {
  font-family: var(--font-editorial);
  font-size: var(--text-editorial-l);
}

.project-header__name {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
  font-size: var(--text-display-xl);
}

.project-header__location {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 1.25rem; /* 20px */
}

/* ---- Video CTAs ---- */

.video-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-7);
}

.video-cta {
  font-family: var(--font-editorial);
  font-size: var(--text-editorial-m);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  position: relative;
}

.video-cta::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-medium) var(--ease-editorial);
}

.video-cta:hover::after,
.video-cta:focus-visible::after,
.video-cta[aria-current="true"]::after {
  transform: scaleX(1);
}

/* ---- Site footer (project + story pages) ----
   Full-bleed purple-paper band, breaking out of the page's own
   centered column — an editorial closing statement, not just a link
   list. */

.site-footer {
  width: 100%;
  background: var(--color-videos);
  color: var(--color-ink);
}

.site-footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-9) var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  text-align: center;
}

.site-footer__eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-mono-s);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.site-footer__headline {
  font-family: var(--font-editorial);
  font-size: 3rem; /* 48px */
  line-height: 1.2;
}

.site-footer__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-mono-s);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  opacity: 0.65;
}

.site-footer__links a {
  position: relative;
  transition: opacity var(--duration-fast) var(--ease-editorial);
}

.site-footer__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-medium) var(--ease-editorial);
}

.site-footer__links a:hover {
  opacity: 1;
}

.site-footer__links a:hover::after {
  transform: scaleX(1);
}

@media (max-width: 640px) {
  .site-footer__inner {
    padding: var(--space-8) var(--space-4);
    gap: var(--space-5);
  }
}

/* ---- Loader ---- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--loader-tint, var(--color-videos));
  transform: translateY(100%);
  transition: transform var(--duration-medium) var(--ease-editorial);
}

.loader[hidden] {
  display: none;
}

/* Curtain rises to cover the screen bottom-to-top, and continues the
   same upward motion off the top edge when it leaves — one fluid
   direction for both the cover and the reveal. */
.loader.is-visible {
  transform: translateY(0);
}

.loader.is-leaving {
  transform: translateY(-100%);
  pointer-events: none;
}

.loader__mark {
  width: clamp(64px, 10vw, 96px);
  height: auto;
  animation: loader-run 1.1s var(--ease-editorial) infinite;
}

@keyframes loader-run {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
  .loader__mark {
    animation: none;
  }
}
