/* ═══════════════════════════════════════════════════════════════════
   FlushLab Golf — Shared Stylesheet
   Variables, Reset, Typography, Navigation, Footer, Accessibility
   ═══════════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
  --bg-deep: #0c0f14;
  --bg-card: #141820;
  --bg-surface: #1a1f2b;
  --gold: #d4a853;
  --gold-bright: #e8b84b;
  --gold-light: #f5d87a;
  --gold-dim: #a07c3a;
  --gold-muted: #8a7035;
  --text-primary: #e8e4dd;
  --text-bright: #f0f2f5;
  --text-secondary: #a8a49e;
  --text-muted: #847f79;
  --text-dim: #6f7d8c;
  --accent-green: #4a7c5c;
  --accent-red: #8c4a4a;
  --border: rgba(212, 168, 83, 0.12);
  --glow: rgba(212, 168, 83, 0.06);
}

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Noise Texture ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ─── Container ─── */
.container { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ═══════════════════════════════════════════════════════════════════
   SITE-WIDE NAV
   ═══════════════════════════════════════════════════════════════════ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(12, 15, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0;
  margin: 0;
}
/* Support both .container (main pages) and .sn-inner (blog/university) */
.site-nav .container,
.site-nav .sn-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.sn-logo a { display: flex; align-items: center; text-decoration: none; }
.sn-logo { flex-shrink: 1; min-width: 0; }
.sn-logo svg { display: block; max-width: 100%; height: auto; }
.sn-links { display: flex; align-items: center; gap: 20px; list-style: none; }
.sn-links a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s;
  position: relative;
}
.sn-links a:hover,
.sn-links a.sn-active { color: var(--gold-bright); }
.sn-links a.sn-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold-bright);
}
.sn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bg-deep);
  background: var(--gold-bright);
  padding: 8px 18px;
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}
.sn-cta:hover { background: var(--gold-light); }
.sn-cta svg { width: 14px; height: 14px; }

/* ─── Mobile Nav ─── */
.sn-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-height: 44px;
  min-width: 44px;
  color: var(--text-primary);
}
.sn-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: all 0.3s;
  border-radius: 1px;
}
.sn-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
}
.sn-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 9999;
  padding: 80px 32px 32px;
  flex-direction: column;
  gap: 8px;
}
.sn-mobile-menu a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.3s;
}
.sn-mobile-menu a:hover,
.sn-mobile-menu a.sn-active { color: var(--gold-bright); }
.sn-mobile-menu .sn-cta {
  margin-top: 16px;
  text-align: center;
  justify-content: center;
}
.sn-mobile-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
}

@media (max-width: 1200px) {
  .sn-links { gap: 14px; }
  .sn-links a { font-size: 10px; letter-spacing: 0.8px; }
  .site-nav .sn-cta { display: none; }
}

@media (max-width: 900px) {
  .sn-links, .site-nav .sn-cta { display: none; }
  .sn-hamburger { display: block; }
  .sn-mobile-menu.sn-open,
  .sn-mobile-overlay.sn-open { display: flex; }
  .sn-mobile-overlay.sn-open { display: block; }
}

/* ═══════════════════════════════════════════════════════════════════
   SITE-WIDE FOOTER (Full version — main pages)
   ═══════════════════════════════════════════════════════════════════ */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 32px; position: relative; z-index: 1; text-align: left; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-top: 16px;
  max-width: 280px;
}
.footer-col .footer-heading {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 5px 0;
  transition: color 0.3s;
}
.footer-col a:hover { color: var(--gold-bright); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.footer-copy { font-size: 12px; color: var(--text-muted); opacity: 0.6; }
.footer-copy a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.3s;
}
.footer-legal a:hover { opacity: 1; }

/* ─── Simple Footer (blogs/legal pages) ─── */
footer { padding: 40px 0; text-align: center; border-top: 1px solid var(--border); margin-top: 80px; }

/* ─── Trademark Notice ─── */
.trademark-notice {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 20px 24px;
  margin: 0 auto 24px;
  max-width: 800px;
  text-align: center;
}
.trademark-notice p { margin: 0; }

/* ─── Footer Responsive ─── */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ═══════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════════ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--gold-bright);
  color: var(--bg-deep);
  padding: 8px 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0 0 6px 6px;
  z-index: 10000;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

*:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
*:focus:not(:focus-visible) { outline: 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;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
