/*
 * The site-wide header and footer, matching the homepage. Self-contained so pages with their
 * own stylesheet (the blog) can load it alone. Markup comes from src/siteChrome.ts.
 */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap");

:root {
  --coa-nav-h: 80px;
}

html:has(.coaNav) {
  scroll-padding-top: calc(var(--coa-nav-h) + 16px);
}

/* Whatever wraps the fixed bar leaves room for it: .siteShell, the season page shell, or body on the blog. */
*:has(> header.coaNav) {
  padding-top: calc(var(--coa-nav-h) + 24px);
}

body > footer.coaFooter {
  padding-inline: max(24px, calc((100% - 1180px) / 2));
}

header.coaNav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid transparent;
  transition: background-color 0.5s cubic-bezier(0.19, 1, 0.22, 1), border-color 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

header.coaNav.isScrolled {
  background: rgba(6, 6, 7, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}

/* A blurred parent would trap the full-screen menu inside the bar. */
header.coaNav:has(.isNavOpen) {
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.coaNav .headerInner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 32px;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: padding 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.coaNav.isScrolled .headerInner {
  padding-top: 14px;
  padding-bottom: 14px;
}

.coaNav .siteHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  margin: 0;
  padding: 0;
}

.coaNav .brand,
.coaFooter .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #f4f5f8;
  text-decoration: none;
}

.coaMark {
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
  box-shadow: 0 8px 24px -8px rgba(204, 255, 77, 0.5);
}

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

.coaNav .brand b,
.coaFooter .brand b {
  display: block;
  font-family: "Clash Display", system-ui, sans-serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.coaTag {
  display: block;
  margin-top: 3px;
  font-family: "JetBrains Mono", monospace;
  font-size: 8.5px;
  letter-spacing: 0.26em;
  color: #5e6474;
  text-transform: uppercase;
}

.coaNav .headerNav {
  display: flex;
  align-items: center;
  gap: 32px;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.coaNav .headerLink {
  position: relative;
  display: inline;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #9a9fb0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: normal;
  text-decoration: none;
  transition: color 0.25s;
}

.coaNav .headerLink:hover,
.coaNav .headerLink[aria-current="page"] {
  border: 0;
  background: none;
  color: #f4f5f8;
}

.coaNav .headerLink::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: #ccff4d;
  transition: width 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.coaNav .headerLink:hover::after {
  width: 100%;
}

.coaNav .headerCta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 100px;
  background: #ccff4d;
  color: #0a0f00;
  font-family: "General Sans", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1), box-shadow 0.3s;
}

.coaNav .headerCta:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px -12px rgba(204, 255, 77, 0.6);
}

.coaNav a:focus-visible,
.coaNav button:focus-visible,
.coaFooter a:focus-visible {
  outline: 2px solid #ccff4d;
  outline-offset: 3px;
}

.coaNav .mobileNavToggle,
.coaNav .headerNav .headerNavCta {
  display: none;
}

@media (max-width: 1100px) {
  .coaNav .siteHeader {
    gap: 12px;
  }

  .coaNav .brand {
    margin-right: auto;
  }

  .coaNav .mobileNavToggle {
    order: 3;
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: none;
    color: #f4f5f8;
    cursor: pointer;
  }

  .coaNav .mobileNavToggleLabel {
    display: none;
  }

  .coaNav .headerCta {
    order: 2;
    position: relative;
    z-index: 2;
  }

  .coaNav .headerNav {
    display: none;
  }

  /* Same full-screen menu as the homepage. */
  .coaNav .siteHeader.isNavOpen .headerNav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    padding: 44px;
    overflow-y: auto;
    background: rgba(6, 6, 7, 0.97);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }

  .coaNav .headerNav .headerLink {
    display: block;
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #f4f5f8;
    font-family: "Clash Display", "General Sans", system-ui, sans-serif;
    font-size: 34px;
    font-weight: 600;
    line-height: 1.2;
  }

  .coaNav .headerNav .headerLink::after {
    display: none;
  }

  .coaNav .headerNav .headerNavCta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    margin-top: 26px;
    padding: 14px 26px;
    border: 0;
    border-radius: 100px;
    background: #ccff4d;
    color: #0a0f00;
    font-family: "General Sans", system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
  }

  .coaNav #langSwitch {
    align-self: flex-start;
    margin: 18px 0 0 !important;
  }
}

/* Same steps as the homepage's own header rules. */
@media (max-width: 900px) {
  .coaNav .headerInner,
  .coaNav.isScrolled .headerInner {
    padding: 14px 18px;
  }

  .coaNav.isScrolled .headerInner {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .coaNav .brand b,
  .coaNav .coaTag {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .coaNav .siteHeader {
    gap: 8px;
  }

  .coaNav .headerCta {
    min-height: 44px;
    padding: 0 12px;
    font-size: 0;
  }

  .coaNav .headerCta::after {
    content: "Elite Telegram";
    font-size: 12px;
    font-weight: 800;
  }

  .coaNav .mobileNavToggle {
    height: 44px;
  }
}

@media (max-width: 560px) {
  .coaNav .headerInner,
  .coaNav.isScrolled .headerInner {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* On phones the homepage menu is a card under the header, not a full screen. */
  .coaNav .siteHeader.isNavOpen .headerNav {
    inset:auto 16px auto 16px;
    top:calc(70px);
    padding:12px;
    border:1px solid rgba(255, 255, 255, 0.08);
    border-radius:18px;
    background:rgba(6,6,7,.94);
    box-shadow:0 24px 70px -36px #000;
    justify-content:flex-start;
    gap:4px;
  }

  .coaNav .headerNav .headerLink {
    padding: 11px 12px;
    border-bottom: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
  }

  .coaNav .headerNav .headerNavCta {
    justify-content: center;
    width: 100%;
    margin-top: 26px;
    padding: 14px 26px;
    border-radius: 100px;
    font-family: "General Sans", system-ui, sans-serif;
    font-size: 14px;
  }

  .coaNav #langSwitch {
    margin: 4px 0 0 12px !important;
  }

  .coaNav .brand b {
    font-size: 18px;
  }

  .coaNav .coaTag {
    font-size: 7.5px;
    letter-spacing: 0.22em;
  }
}

@media (max-width: 380px) {
  .coaNav .headerInner,
  .coaNav.isScrolled .headerInner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .coaNav .coaTag {
    display: none;
  }

  .coaNav .brand b {
    font-size: 16px;
  }
}

@media (max-width: 359px) {
  .coaNav .headerCta::after {
    content: "Elite";
  }
}

/* Footer */
footer.coaFooter {
  display: block;
  margin-top: 56px;
  padding: 64px 0 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: none;
}

.coaFootGrid {
  display: flex;
  justify-content: space-between;
  gap: 44px;
  flex-wrap: wrap;
}

.coaFootBrand {
  max-width: 24em;
}

.coaFootBrand .brand {
  margin-bottom: 18px;
}

.coaFootBrand p {
  margin: 0;
  color: #9a9fb0;
  font-size: 13px;
  line-height: 1.7;
}

.coaFootLinks {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.coaFootCol h4 {
  margin: 0 0 18px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 245, 248, 0.56);
}

.coaFootCol a {
  display: block;
  margin-bottom: 11px;
  color: rgba(244, 245, 248, 0.72);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.coaFootCol a:hover {
  color: #ccff4d;
}

.coaFootCol .footer-social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
}

.coaFootCol .footer-social-link svg {
  flex: none;
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.coaFooter .legalNote {
  margin-top: 40px;
}

.coaCopyright {
  max-width: 72em;
  margin: 28px 0 0;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(244, 245, 248, 0.68);
  font-size: 12px;
  line-height: 1.7;
}

@media (max-width: 720px) {
  footer.coaFooter {
    padding-top: 44px;
  }

  .coaFootLinks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
    width: 100%;
  }
}
