/* ===========================================================================
   site.css - shared chrome for polln8.me
   Transparent responsive nav, standardized footer, pollen mote layer.
   Self-contained: uses the marketing-site palette directly.
   =========================================================================== */
:root {
  --night: #0a130e;
  --night-2: #0e1b13;
  --pollen: #e9c46a;
  --mist: #e6ede2;
  --sage: #8fa593;
  --line: rgba(143, 165, 147, 0.18);
  --display: "Fraunces", Georgia, serif;
  --body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Pollen mote layer (drifting only, no hero core) */
#pollen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
/* Keep page content above the mote layer */
body > main,
.site-foot {
  position: relative;
  z-index: 1;
}

/* Offset in-page anchor scrolling so target headings clear the sticky nav */
html { scroll-padding-top: 92px; }

/* ---- Responsive nav (solid, sticky) ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(14px, 2.5vw, 22px) clamp(16px, 4vw, 40px);
  background: rgba(10, 19, 14, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.nav__lockup {
  height: 40px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 8px rgba(233, 196, 106, 0.4));
}
.nav__menu {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 30px);
}
.nav__menu a {
  font-family: var(--body);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--mist);
  text-decoration: none;
  transition: color 0.25s ease;
}
.nav__menu a:hover,
.nav__menu a[aria-current="page"] {
  color: var(--pollen);
}
.nav__menu a.nav__cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--pollen);
  border-radius: 999px;
  background: var(--pollen);
  color: var(--night);
  font-weight: 500;
  transition: background-color 0.25s ease, transform 0.25s ease;
}
.nav__menu a.nav__cta:hover {
  background: #f2d488;
  border-color: #f2d488;
  transform: translateY(-1px);
}
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--mist);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

@media (max-width: 640px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute;
    top: 100%;
    right: clamp(16px, 4vw, 40px);
    left: clamp(16px, 4vw, 40px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    background: rgba(10, 19, 14, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: 14px;
    display: none;
  }
  .nav__menu a { padding: 12px 14px; border-radius: 8px; }
  .nav__cta { text-align: center; margin-top: 4px; }
  .nav[data-open="true"] .nav__menu { display: flex; }
  .nav[data-open="true"] .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav[data-open="true"] .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav[data-open="true"] .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---- Standardized footer ---- */
.site-foot {
  max-width: 72rem;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px clamp(16px, 4vw, 40px) 3rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--sage);
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-foot a { color: var(--sage); text-decoration: none; transition: color 0.25s ease; }
.site-foot a:hover { color: var(--pollen); }
@media (max-width: 560px) {
  .site-foot { flex-direction: column; text-align: center; gap: 16px; }
}

/* Skip-to-content link (visible on keyboard focus) */
.skip-link {
  position: absolute;
  left: 8px;
  top: -52px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--pollen);
  color: var(--night);
  border-radius: 10px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: top 0.18s ease;
}
.skip-link:focus {
  top: 8px;
  outline: 2px solid var(--mist);
  outline-offset: 2px;
}

/* Branded focus ring for keyboard users, sitewide. Pages with their own
   page CSS define the same rule; this covers the ones that only load site.css
   (privacy, support, 404) so the gold ring is consistent everywhere. */
:focus-visible {
  outline: 2px solid var(--pollen);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Cookie consent banner (GA Consent Mode) ---- */
.consent {
  position: fixed;
  left: 50%;
  bottom: clamp(12px, 3vw, 24px);
  transform: translateX(-50%);
  z-index: 1000;
  width: min(680px, calc(100% - 24px));
  display: flex;
  align-items: center;
  gap: 1rem 1.4rem;
  flex-wrap: wrap;
  justify-content: space-between;
  background: rgba(10, 19, 14, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem 1.15rem;
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.7);
  animation: consent-rise 0.35s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.consent__text {
  margin: 0;
  flex: 1 1 16rem;
  color: var(--mist);
  font-family: var(--body);
  font-size: 0.9rem;
  line-height: 1.5;
}
.consent__text a {
  color: var(--pollen);
  text-underline-offset: 2px;
}
.consent__actions {
  display: flex;
  gap: 0.6rem;
  flex: 0 0 auto;
}
.consent__btn {
  min-height: 40px;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-family: var(--body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.consent__btn--primary {
  background: var(--pollen);
  color: #1a1305;
}
.consent__btn--primary:hover {
  transform: translateY(-1px);
}
.consent__btn--ghost {
  background: transparent;
  color: var(--mist);
  border-color: var(--line);
}
.consent__btn--ghost:hover {
  border-color: var(--pollen);
}
@keyframes consent-rise {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@media (max-width: 480px) {
  .consent__actions { width: 100%; }
  .consent__btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .consent { animation: none; }
}
