/* ==========================================================================
   Cronk Companies — shared design system
   Single source of truth for header, nav, mobile menu, footer, and buttons.
   ========================================================================== */

:root {
  --navy: #1f3864;
  --navy-dk: #152845;
  --ink: #1c1f24;
  --grey: #5b6472;
  --grey-lt: #707986; /* darkened from #8a929c for WCAG AA contrast on --bg */
  --bg: #fbfbfa;
  --panel: #ffffff;
  --line: #e7e6e2;
  --amber: #c8862b;
  --amber-dk: #7a4f18;
  --f:
    "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--f);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
}

a {
  color: var(--navy);
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Skip link for keyboard/screen reader users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  z-index: 100;
  border-radius: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Header / nav ---------- */
header.site-header {
  position: sticky;
  top: 0;
  background: rgba(251, 251, 250, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 50;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
}

.brand {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: var(--navy);
  text-decoration: none;
}

.brand span {
  color: var(--amber);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 13.5px;
}

.nav-links a {
  color: var(--grey);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--navy);
}

.nav-ctas {
  display: flex;
  gap: 10px;
}

.btn-cta {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.btn-cta.solid {
  background: var(--navy);
  color: #fff;
}

.btn-cta.solid:hover {
  background: var(--navy-dk);
}

.btn-cta.outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--line);
}

.btn-cta.outline:hover {
  border-color: var(--navy);
}

/* Custom hamburger — three drawn bars, no icon font/emoji */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 60;
}

.menu-toggle .bar {
  position: absolute;
  left: 8px;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    opacity 0.2s ease,
    top 0.25s ease;
}

.menu-toggle .bar:nth-child(1) {
  top: 14px;
}
.menu-toggle .bar:nth-child(2) {
  top: 20px;
}
.menu-toggle .bar:nth-child(3) {
  top: 26px;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(1) {
  top: 20px;
  transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] .bar:nth-child(3) {
  top: 20px;
  transform: rotate(-45deg);
}

/* Mobile nav panel */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 8px 28px 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-nav.open {
  max-height: 480px;
}

.mobile-nav a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav .mobile-cta {
  margin-top: 14px;
  text-align: center;
  border-radius: 3px;
  padding: 12px;
  border-bottom: none;
}

.mobile-nav .mobile-cta.solid {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
}

.mobile-nav .mobile-cta.outline {
  border: 1.5px solid var(--line);
  color: var(--navy);
  font-weight: 600;
}

@media (max-width: 860px) {
  .nav-desktop {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .mobile-nav {
    display: flex;
  }
}

/* ---------- Buttons (content areas) ---------- */
.btn {
  padding: 12px 24px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy-dk);
}

.btn-outline {
  border: 1.5px solid var(--line);
  color: var(--navy);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--navy);
}

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--grey-lt);
  font-size: 12.5px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-row a {
  color: var(--grey-lt);
  text-decoration: none;
  margin-left: 18px;
}

.footer-row a:hover {
  color: var(--navy);
}

@media (max-width: 600px) {
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-row a {
    margin-left: 0;
    margin-right: 16px;
  }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@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;
  }
}
