/* ============================================================
   NOC DEVELOPMENT — Base / Reset
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--black);
  line-height: 1.6;
  /* Rev 10: use clip (not hidden) so the sticky header keeps working on mobile.
     overflow-x:hidden on body makes it a scroll container and breaks
     position:sticky, letting the header scroll away. */
  overflow-x: clip;
}

a {
  text-decoration: none;
  color: inherit;
}

img, video {
  display: block;
  max-width: 100%;
  height: auto;
}

ul, ol { list-style: none; }

button {
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: var(--font-sans);
}

/* ── Utilities ─────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

/* ── Eyebrow Label ──────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--red);
  flex-shrink: 0;
}

/* ── Section Headings ───────────────────────────────────── */
.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--black);
}
.section-heading em {
  font-style: italic;
  color: var(--red);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 15px 32px;
  transition: all var(--dur) var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--red);
  color: #fff;
  border: 2px solid var(--red);
}
.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}
.btn-outline {
  background: transparent;
  color: var(--black);
  border: 2px solid var(--black);
}
.btn-outline:hover {
  background: var(--black);
  color: #fff;
}
.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline-white:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}
.btn-ghost {
  background: transparent;
  color: var(--red);
  border: 2px solid transparent;
  padding-left: 0;
  padding-right: 0;
}
.btn-ghost:hover { color: var(--red-dark); }

/* ── Tags / Chips ───────────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  background: var(--red);
  color: #fff;
}
.tag-outline {
  background: transparent;
  color: var(--gray-500);
  border: 1px solid var(--border);
}

/* ── Divider ────────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

/* ── Section spacing ────────────────────────────────────── */
.section {
  padding: var(--space-10) 0;
}
.section-sm {
  padding: var(--space-8) 0;
}

/* ── Announce Bar ───────────────────────────────────────── */
#announce-bar {
  background: var(--red);
  color: #fff;
  text-align: center;
  padding: 10px var(--gutter);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 200;
}
#announce-bar strong { font-weight: 700; }
#announce-bar a { color: #fff; text-decoration: underline; }

/* ── Sticky Header ──────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 150;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: 72px;
  display: flex;
  align-items: center;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.logo-mark {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  width: 32px;
  height: 32px;
}
.logo-mark span {
  display: block;
  height: 2.5px;
  background: var(--red);
  transition: width var(--dur) var(--ease);
}
.logo-mark span:nth-child(1) { width: 100%; }
.logo-mark span:nth-child(2) { width: 68%; }
.logo-mark span:nth-child(3) { width: 84%; }
.logo-mark span:nth-child(4) { width: 54%; }
.logo:hover .logo-mark span:nth-child(2) { width: 100%; }
.logo:hover .logo-mark span:nth-child(4) { width: 84%; }
.logo-type { line-height: 1; }
.logo-noc {
  display: block;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.06em;
  line-height: 1;
}
.logo-dev {
  display: block;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-top: 3px;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0;
}
.site-nav a, .site-nav .nav-dropdown-toggle {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--gray-500);
  padding: 0 18px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color var(--dur) var(--ease);
  position: relative;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: none;
  font-family: var(--font-sans);
}
.site-nav a:hover, .site-nav .nav-dropdown-toggle:hover { color: var(--red); }
.site-nav a.active { color: var(--red); }
.site-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 18px; right: 18px;
  height: 2px;
  background: var(--red);
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  min-width: 240px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 12px 20px;
  height: auto;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
}
.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover { background: var(--bg-2); color: var(--red); }

/* Nav CTA */
.nav-cta {
  margin-left: 12px;
  background: var(--red);
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 11px 22px !important;
  height: auto !important;
  transition: background var(--dur) var(--ease) !important;
  border: none;
}
.nav-cta:hover { background: var(--red-dark) !important; color: #fff !important; }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  transition: all var(--dur) var(--ease);
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--black);
  padding: var(--space-9) 0 var(--space-6);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 32px;
}
.footer-brand .logo-noc { color: var(--red); font-size: 20px; }
.footer-brand .logo-dev { color: rgba(255,255,255,0.4); }
.footer-brand .logo-mark span { background: var(--red); }
.footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  line-height: 1.75;
  margin-top: 16px;
  max-width: 280px;
}
.footer-col h4 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 13.5px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 10px;
  transition: color var(--dur) var(--ease);
}
.footer-col a:hover { color: var(--red); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: rgba(255,255,255,0.25);
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--white);
    overflow-y: auto;
    z-index: 140;
    padding: 24px 0 48px;
    align-items: flex-start;
  }
  .site-nav.open a,
  .site-nav.open .nav-dropdown-toggle {
    height: auto;
    padding: 14px var(--gutter);
    width: 100%;
    font-size: 15px;
    border-bottom: 1px solid var(--border-light);
  }
  .site-nav.open a.active::after { display: none; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-top: none;
    display: block;
    background: var(--bg-2);
  }
  .nav-dropdown-menu a { padding-left: 48px; }
  .nav-cta {
    margin: 16px var(--gutter) 0;
    display: inline-flex;
    height: auto !important;
    padding: 14px 28px !important;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Rev 10: mobile nav — flip-down motion ──────────────────
   The sticky header (fixed above) keeps the menu button on screen at every
   scroll position; this animates the menu opening with a downward flip so it
   reads as a drop-down and users can jump to any community at any time. */
@keyframes navFlipDown {
  from { opacity: 0; transform: translateY(-14px) scaleY(0.96); }
  to   { opacity: 1; transform: translateY(0) scaleY(1); }
}
@media (max-width: 1024px) {
  .site-nav.open {
    transform-origin: top center;
    animation: navFlipDown 0.28s var(--ease) both;
  }
}
