/* Broad Cove Insights: shared site styles (header menu and small-screen layout). */

/* Theme colors. build.py swaps page colors for these variables; light values are the original colors. */
:root {
  --bc-surface: #F3F5F2; --bc-surface-alt: #E9EEEA; --bc-surface-card: #FFFFFF; --bc-band: #0E1B26;
  --bc-text: #0E1B26; --bc-text-body: #3B4B57; --bc-text-secondary: #4A5B68; --bc-text-subdued: #6A7883;
  --bc-accent-text: #A33C14; --bc-accent-strong: #C2491A;
  --bc-border: #D5DCD6; --bc-border-soft: #E3E8E4; --bc-control-edge: #B9C4BC;
  --bc-btn-dark-bg: #0E1B26; --bc-btn-dark-text: #F3F5F2; --bc-btn-dark-hover: #22384A;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bc-surface: #0E1B26; --bc-surface-alt: #11263A; --bc-surface-card: #16304A; --bc-band: #08131C;
    --bc-text: #F3F5F2; --bc-text-body: #C3CFD8; --bc-text-secondary: #A9B8C4; --bc-text-subdued: #8FA1AF;
    --bc-accent-text: #F6A37A; --bc-accent-strong: #F6A37A;
    --bc-border: #2E5577; --bc-border-soft: #22405E; --bc-control-edge: #5F7F9C;
    --bc-btn-dark-bg: #F3F5F2; --bc-btn-dark-text: #0E1B26; --bc-btn-dark-hover: #FFFFFF;
  }
  /* Logo: reversed treatment (fog tile, ink wave) */
  a[href="/"] svg rect[fill="#0E1B26"] { fill: #F3F5F2; }
  a[href="/"] svg path[stroke="#F3F5F2"] { stroke: #0E1B26; }
  .menu-btn path { stroke: #F3F5F2; }
  /* Career logos are gray PNGs: lift them so they read on navy */
  img[src*="/assets/logos/"] { filter: brightness(1.9); }
  /* Outline buttons: light fill on hover */
  a[style*="border: 1.5px solid var(--bc-text)"]:hover, .bci-btn-outline:hover { background: #F3F5F2 !important; color: #0E1B26 !important; }
  .bci-btn-dark:hover { background: #FFFFFF !important; color: #0E1B26 !important; }
  input, textarea, select { color-scheme: dark; }
}
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bc-surface); }
img { max-width: 100%; }

/* Mobile menu button and panel */
.menu-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--bc-border); border-radius: 10px; background: var(--bc-surface-card); cursor: pointer; padding: 0; }
.menu-btn .icon-close { display: none; }
.menu-btn[aria-expanded="true"] .icon-open { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }
.mobile-menu { border-top: 1px solid var(--bc-border); background: var(--bc-surface); padding: 8px 16px 20px; display: flex; flex-direction: column; animation: bciMenuIn 200ms ease-out both; }
.mobile-menu[hidden] { display: none; }
.mobile-menu a { text-decoration: none; font-size: 22px; font-weight: 600; padding: 16px 0; border-bottom: 1px solid var(--bc-border-soft); color: var(--bc-text); }
.mobile-menu a[aria-current="page"] { color: var(--bc-accent-text); }
.mobile-menu a.mobile-cta { margin-top: 20px; background: #C2491A; color: #FFFFFF; padding: 16px 20px; border-radius: 8px; font-size: 17px; text-align: center; border-bottom: none; }
@keyframes bciMenuIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* Button hover and focus: primary (orange), dark (navy) and outline buttons */
a[style*="border-radius: 8px"][style*="padding"], button[type="submit"], .mobile-menu a.mobile-cta {
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
a[style*="background: #C2491A"]:hover, button[style*="background: #C2491A"]:hover, .mobile-menu a.mobile-cta:hover {
  background: #A33C14 !important; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(194, 73, 26, 0.28);
}
a[style*="background: var(--bc-btn-dark-bg)"]:hover, button[style*="background: var(--bc-btn-dark-bg)"]:hover {
  background: var(--bc-btn-dark-hover) !important; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(14, 27, 38, 0.22);
}
a[style*="border: 1.5px solid var(--bc-text)"]:hover {
  background: #0E1B26 !important; color: #F3F5F2 !important; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(14, 27, 38, 0.18);
}
a[style*="border-radius: 8px"][style*="padding"]:active, button[type="submit"]:active { transform: translateY(0); box-shadow: none; }
a[style*="border-radius: 8px"][style*="padding"]:focus-visible, button[type="submit"]:focus-visible, .mobile-menu a.mobile-cta:focus-visible {
  outline: 3px solid #F6A37A; outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  a[style*="border-radius: 8px"][style*="padding"], button[type="submit"], .mobile-menu a.mobile-cta { transition: none; transform: none !important; }
}

@media (min-width: 1041px) {
  .mobile-menu { display: none !important; }
}
@media (max-width: 1040px) {
  .site-nav-links { display: none !important; }
  .menu-btn { display: flex; }
  .site-header { position: sticky; top: 0; z-index: 10; }
}

/* Phones and small tablets */
@media (max-width: 760px) {
  .site-nav { padding: 12px 16px !important; flex-wrap: nowrap !important; }
  .site-logo svg { width: 32px; height: 32px; }
  .site-logo span { font-size: 17px !important; }

  [style*="max-width: 1200px"], [style*="max-width: 960px"], [style*="max-width: 880px"] { padding-left: 16px !important; padding-right: 16px !important; }
  [style*="padding: 104px"], [style*="padding: 96px"], [style*="padding: 88px"] { padding-top: 56px !important; padding-bottom: 56px !important; }
  [style*="32px 104px"] { padding-bottom: 56px !important; }
  [style*="padding: 80px"] { padding-top: 48px !important; padding-bottom: 48px !important; }
  [style*="border-radius: 16px; padding: 40px"] { padding: 24px !important; }
  [style*="border-radius: 14px; padding: 32px"] { padding: 22px !important; }

  h1 { font-size: 40px !important; line-height: 1.08 !important; }
  h2[style*="font-size: 48px"], h2[style*="font-size: 44px"] { font-size: 30px !important; line-height: 1.15 !important; }
  h2[style*="font-size: 40px"] { font-size: 28px !important; line-height: 1.15 !important; }
  h2[style*="font-size: 32px"] { font-size: 26px !important; }
  p[style*="font-size: 30px"] { font-size: 22px !important; line-height: 1.4 !important; }
  p[style*="font-size: 20px"] { font-size: 17px !important; }

  /* Home hero */
  .bci-rotator { display: block !important; min-width: 0 !important; height: 1.1em !important; }
  .bci-demo { margin-top: 72px; }
  .bci-demo > svg { width: 135px; height: 105px; top: -93px !important; right: 18px !important; }
  .bci-demo > div[role="img"] { padding: 20px !important; }
}

/* Footer column links: quiet at rest, same orange hover as the rest of the site */
.site-footer nav a { color: var(--bc-text-body); text-decoration: none; transition: color 160ms ease; }
.site-footer nav a:hover { color: #C2491A; text-decoration: underline; text-underline-offset: 3px; }
.site-footer nav a[aria-current="page"] { color: var(--bc-accent-text); }
.site-footer nav a:focus-visible { outline: 2px solid #C2491A; outline-offset: 2px; border-radius: 2px; }
