/* ─────────────────────────────────────────────
   Relovation — Shared Navigation & Footer
   ───────────────────────────────────────────── */

:root {
  --nav-h: 76px;
  --nav-ink: #4c6a57;
  --nav-ink-deep: #3d5645;
  --nav-cream: #f4edcf;
  --nav-ease: cubic-bezier(0.22, 0.88, 0.2, 1);
}

/* ── Body offset ── */
body {
  padding-top: var(--nav-h);
}

/* Index hero: full-bleed behind transparent nav */
.hero {
  margin-top: calc(-1 * var(--nav-h));
}

/* ════════════════════════════════════════════
   DESKTOP NAV — "Concert Programme" aesthetic
   ════════════════════════════════════════════ */

.r-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  height: var(--nav-h);
  /* Permanent hairline: subtle but always present */
  border-bottom: 1px solid rgba(76, 106, 87, 0.1);
  transition:
    background 0.5s var(--nav-ease),
    border-color 0.5s,
    backdrop-filter 0.5s;
}

.r-nav.is-scrolled {
  background: rgba(244, 237, 207, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(76, 106, 87, 0.2);
}

.r-nav__inner {
  height: 100%;
  display: grid;
  /* Three zones: brand | links | actions */
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(20px, 4vw, 60px);
  gap: 0;
}

/* ── LEFT: Brand block ── */
.r-nav__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  text-decoration: none;
  color: var(--nav-ink);
  justify-self: start;
}

.r-nav__genre {
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(76, 106, 87, 0.52);
  line-height: 1;
  user-select: none;
  transition: color 0.28s;
}

.r-nav__brand:hover .r-nav__genre {
  color: rgba(76, 106, 87, 0.76);
}

.r-nav__wordmark {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: "EB Garamond", serif;
  font-size: clamp(20px, 1.7vw, 26px);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1;
  color: var(--nav-ink);
  transition: opacity 0.28s;
}

.r-nav__brand:hover .r-nav__wordmark {
  opacity: 0.78;
}

.r-nav__note {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.75;
  transform: rotate(-8deg);
  transition: transform 0.48s var(--nav-ease), opacity 0.28s;
}

.r-nav__note img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.r-nav__brand:hover .r-nav__note {
  transform: rotate(12deg) scale(1.12);
  opacity: 1;
}

/* ── CENTER: Links ── */
.r-nav__links {
  display: flex;
  align-items: center;
  /* Separator dots inserted via CSS */
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}

.r-nav__links li {
  display: flex;
  align-items: center;
}

/* Dot separators between items */
.r-nav__links li + li::before {
  content: "·";
  font-family: "EB Garamond", serif;
  font-size: 20px;
  color: rgba(76, 106, 87, 0.3);
  padding: 0 clamp(14px, 1.6vw, 22px);
  line-height: 1;
  user-select: none;
}

.r-nav__links a {
  text-decoration: none;
  color: var(--nav-ink);
  /* EB Garamond italic — the key differentiator */
  font-family: "EB Garamond", serif;
  font-size: clamp(16px, 1.25vw, 19px);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.26s;
}

/* Sliding underline from left */
.r-nav__links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 100%;
  height: 1px;
  background: var(--nav-ink);
  transition: right 0.38s var(--nav-ease);
}

.r-nav__links a:hover,
.r-nav__links a.r-active {
  color: var(--nav-ink-deep);
}

.r-nav__links a:hover::after,
.r-nav__links a.r-active::after {
  right: 0;
}

/* ── RIGHT: Actions ── */
.r-nav__actions {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-self: end;
}

/* Filled pill CTA — distinct from any bordered/outline approach */
.r-nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 20px;
  background: var(--nav-ink);
  color: var(--nav-cream);
  border-radius: 999px;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  flex-shrink: 0;
  transition:
    background 0.32s var(--nav-ease),
    transform 0.34s var(--nav-ease),
    gap 0.32s var(--nav-ease);
}

.r-nav__cta-arrow {
  display: inline-block;
  transition: transform 0.32s var(--nav-ease);
  font-style: normal;
  font-size: 13px;
}

.r-nav__cta:hover {
  background: var(--nav-ink-deep);
  transform: translateY(-1px);
  gap: 10px;
}

.r-nav__cta:hover .r-nav__cta-arrow {
  transform: translateX(2px);
}

/* Burger — hidden on desktop */
.r-nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  margin: -10px;
  flex-shrink: 0;
}

.r-nav__burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--nav-ink);
  transform-origin: center;
  transition: transform 0.38s var(--nav-ease), background 0.3s;
}

.r-nav.overlay-open .r-nav__burger span {
  background: var(--nav-cream);
}

.r-nav__burger.is-open span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.r-nav__burger.is-open span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* ════════════════════════════════════════════
   MOBILE OVERLAY — keep the editorial sweep
   ════════════════════════════════════════════ */

.r-nav__overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: #3d5645;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--nav-h) clamp(22px, 8vw, 72px) clamp(36px, 8vw, 60px);
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.6s var(--nav-ease);
}

.r-nav__overlay.is-open {
  pointer-events: auto;
  clip-path: inset(0 0 0% 0);
}

/* Grain texture on overlay */
.r-nav__overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  background-size: 200px;
  opacity: 0.3;
  pointer-events: none;
}

.r-nav__ovl-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.r-nav__ovl-list li {
  border-top: 1px solid rgba(244, 237, 207, 0.15);
  overflow: hidden;
}

.r-nav__ovl-list li:last-child {
  border-bottom: 1px solid rgba(244, 237, 207, 0.15);
}

.r-nav__ovl-list a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 16px 0 18px;
  text-decoration: none;
  color: rgba(244, 237, 207, 0.88);
  font-family: "EB Garamond", serif;
  font-size: clamp(34px, 9vw, 62px);
  font-style: italic;
  line-height: 1.05;
  transform: translateY(110%);
  transition: transform 0.52s var(--nav-ease), color 0.24s, opacity 0.52s;
  opacity: 0;
}

.r-nav__overlay.is-open .r-nav__ovl-list a {
  transform: translateY(0);
  opacity: 1;
}

.r-nav__ovl-list li:nth-child(1) a { transition-delay: 0.07s; }
.r-nav__ovl-list li:nth-child(2) a { transition-delay: 0.14s; }
.r-nav__ovl-list li:nth-child(3) a { transition-delay: 0.21s; }
.r-nav__ovl-list li:nth-child(4) a { transition-delay: 0.28s; }

.r-nav__ovl-list a:hover { color: #f4edcf; }

.r-nav__ovl-num {
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: rgba(244, 237, 207, 0.35);
  font-style: normal;
  padding-bottom: 5px;
  min-width: 26px;
}

.r-nav__ovl-bottom {
  margin-top: clamp(24px, 5vw, 40px);
  display: flex;
  align-items: center;
  gap: 24px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.42s, transform 0.42s var(--nav-ease);
  transition-delay: 0.36s;
}

.r-nav__overlay.is-open .r-nav__ovl-bottom {
  opacity: 1;
  transform: translateY(0);
}

.r-nav__cta-ovl {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 28px;
  border: 1.5px solid rgba(244, 237, 207, 0.46);
  color: var(--nav-cream);
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.28s, border-color 0.28s;
}

.r-nav__cta-ovl:hover {
  background: rgba(244, 237, 207, 0.1);
  border-color: rgba(244, 237, 207, 0.7);
}

.r-nav__ovl-contact {
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  color: rgba(244, 237, 207, 0.42);
  letter-spacing: 0.02em;
  margin: 0;
}

.r-nav__ovl-contact a {
  color: rgba(244, 237, 207, 0.56);
  text-decoration: none;
  transition: color 0.24s;
}

.r-nav__ovl-contact a:hover { color: var(--nav-cream); }

/* ════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════ */

.r-footer {
  background: var(--nav-ink);
  color: var(--nav-cream);
  padding: clamp(48px, 6vw, 88px) clamp(18px, 4.5vw, 64px) clamp(24px, 3vw, 40px);
}

.r-footer__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 4vw, 48px);
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: clamp(24px, 3vw, 36px);
  border-bottom: 1px solid rgba(244, 237, 207, 0.15);
}

.r-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--nav-cream);
  font-family: "EB Garamond", serif;
  font-size: clamp(22px, 2vw, 28px);
  font-style: italic;
}

.r-footer__brand-note {
  width: 24px;
  height: 24px;
  opacity: 0.6;
  flex-shrink: 0;
}

.r-footer__brand-note img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.r-footer__nav {
  display: flex;
  gap: clamp(20px, 3vw, 36px);
  flex-wrap: wrap;
  align-items: center;
}

.r-footer__nav a {
  color: rgba(244, 237, 207, 0.62);
  text-decoration: none;
  font-family: "EB Garamond", serif;
  font-size: clamp(16px, 1.2vw, 18px);
  font-style: italic;
  transition: color 0.24s;
}

.r-footer__nav a:hover { color: var(--nav-cream); }

.r-footer__contact a {
  color: rgba(244, 237, 207, 0.62);
  text-decoration: none;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  transition: color 0.24s;
}

.r-footer__contact a:hover { color: var(--nav-cream); }

.r-footer__bottom {
  max-width: 1320px;
  margin: clamp(18px, 2vw, 26px) auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.r-footer__copy {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  color: rgba(244, 237, 207, 0.32);
  margin: 0;
  letter-spacing: 0.04em;
}

.r-footer__copy a {
  color: rgba(244, 237, 207, 0.48);
  text-decoration: none;
  transition: color 0.24s;
}

.r-footer__copy a:hover { color: rgba(244, 237, 207, 0.8); }

/* ════════════════════════════════════════════
   RESPONSIVE — breakpoints
   ════════════════════════════════════════════ */

@media (max-width: 860px) {
  .r-nav__links,
  .r-nav__actions {
    display: none;
  }

  .r-nav__inner {
    grid-template-columns: 1fr auto;
  }

  .r-nav__burger {
    display: flex;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .r-nav,
  .r-nav__links a::after,
  .r-nav__cta,
  .r-nav__overlay,
  .r-nav__ovl-list a,
  .r-nav__ovl-bottom,
  .r-nav__burger span,
  .r-nav__note {
    transition: none;
    animation: none;
  }

  .r-nav__overlay {
    clip-path: none;
    display: none;
  }

  .r-nav__overlay.is-open {
    display: flex;
  }

  .r-nav__ovl-list a,
  .r-nav__ovl-bottom {
    opacity: 1;
    transform: none;
  }
}
