/* css/global.css */

/* Default offsets for sticky section navs */
:root {
  --section-nav-top: 0px;
  --section-scroll-offset: 220px;
}

@media (max-width: 800px) {
  :root {
    --section-nav-top: 120px;
    --section-scroll-offset: 260px;
  }
}

/* --- GLOBAL BACKGROUND --- */
/* Fixed page background image */
.background-overlay {
  position: fixed;
  inset: 0; /* stick to the visual viewport without relying on vh */
  z-index: 0;
  background: url('../assets/images/misc/gpt_perlinnoise_bg.png') center / cover no-repeat;
  pointer-events: none;
  filter: sepia(0.3);
  will-change: transform;
}

/* Light blur layer on top of the background */
.background-overlay .background-filter {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(0.75px) brightness(0.7);
  -webkit-backdrop-filter: blur(0.75px) brightness(0.7);
}

/* --- PAGE LAYOUT --- */
/* Off-screen skip link that appears on focus */
.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
  z-index: 100000;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Navigation list helper shared across header + section navs */
.nav-list {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Centered hero block beneath the header */
.page-intro {
  margin: clamp(2rem, 5vw, 3rem) auto 3rem;
  text-align: center;
  max-width: 720px;
}

/* Orbitron-styled titles */
.page-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  text-transform: uppercase;
  margin: 0 0 1rem;
  color: var(--text-light);
}

/* Supporting lead paragraph text */
.page-lede {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--foreground);
}

.page-lede .est {
  display: block;
  margin-top: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Reusable CTA button styling shared across pages */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background-color: var(--accent);
  color: black;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.2s ease;
}

/* Preserve readable text even once links are visited */
.btn:link,
.btn:visited {
  color: black;
}

/* Button hover state */
.btn:hover {
  background-color: #e2d7bf;
}

/* Shared sticky sub-navigation used on events + episodes */
.section-nav {
  position: sticky;
  top: var(--section-nav-top, 0px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 1rem 2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(20, 20, 20, 0.6);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

.section-nav .nav-list {
  gap: 2rem;
}

@supports not ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
  .section-nav {
    background-color: #111111;
  }
}

.section-nav a {
  font-family: var(--font-main);
  font-weight: bold;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.section-nav a:hover {
  color: #ffffff;
}

/* Consistent offset for sections reached via nav links */
.section-anchor {
  scroll-margin-top: var(--section-scroll-offset, 200px);
}

/* Ensure content sits above background overlay */
main, header, footer {
  position: relative;
  z-index: 1;
}

/* Default typography + background settings */
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  color: var(--foreground);
  background: none;
  overflow-x: hidden;

}

/* --- HEADER --- */
/* Sticky header styling */
.site-header {
  width: 100%;
  background: #e2d7bf;
  color: #000;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: clamp(1.5rem, 4vw, 2.5rem);
  row-gap: 0.4rem;
  padding: 1rem clamp(1.5rem, 5vw, 3rem) 1.1rem;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
  font-family: var(--font-main);
  transition: padding 0.3s ease;
  justify-items: end;
  box-sizing: border-box;
  backface-visibility: hidden;
}

/* Flex wrapper for logo area */
.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  justify-self: start;
}

/* Primary logo dimensions */
.logo {
  height: 120px;
  width: auto;
  transition: height 0.3s ease, transform 0.3s ease;
  transform-origin: center center;
}

.site-header.shrunk {
  padding: 0.5rem 1.5rem;
}

.site-header.shrunk .logo {
  height: 70px;
  transform: scale(0.9);
}

/* Desktop navigation container */
.header-nav {
  display: flex;
  justify-content: flex-end;
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  margin: 0;
  padding: 0;
  min-width: 0;
  will-change: transform;
}

.header-nav .nav-list {
  align-items: center;
  column-gap: clamp(1.25rem, 3vw, 2.25rem);
  row-gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Burger button spacing */
.burger {
  margin-left: 1rem;
  margin-right: 4rem; /* visible, not cropped */
}

/* Desktop navigation links */
.header-nav a {
  color: black;
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
}

/* Active nav state */
.header-nav a.active {
  color: var(--bold);
  border-bottom: 2px solid var(--bold);
}

/* Hover feedback */
.header-nav a:hover {
  opacity: 0.6;
}

/* Header social links */
.header-socials {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  column-gap: clamp(0.9rem, 2.4vw, 1.5rem);
  row-gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  will-change: transform;
}

.header-socials a {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.header-socials img {
  width: 20px;
  height: 20px;
}

/* --- FOOTER --- */
/* Footer text */
.rights-reserved {
  bottom: 0;
  left: 0;
  width: 100%;
  color: var(--text-muted);
  padding: 10px 0;
  text-align: center;
  z-index: 1000;
}

/* Disable overscroll bounce */
html, body {
  overscroll-behavior: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
