/* Self-hosted faces. Both files carry usWeightClass 400 and no italic, so a
   single weight is declared for each; the browser synthesises 600 where the
   live site loads a real semibold from Typekit. */
@font-face {
  font-family: "Myriad Pro";
  src: url("/fonts/MyriadPro-SemiCondensed.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-stretch: semi-condensed;
  font-display: swap;
}

/* Adelle is what the live hero heading uses (bold italic). Drop the two .ttf
   files into wwwroot/fonts and it takes over; until then --font-adelle falls
   back to Zilla Slab, the closest slab already loaded. */
@font-face {
  font-family: "Adelle";
  src: url("/fonts/Adelle_Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Adelle";
  src: url("/fonts/Adelle_Bold_Italic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "DIN Condensed";
  src: url("/fonts/DINCondensed-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-stretch: condensed;
  font-display: swap;
}

:root {
  --color-navy: #013556;
  --color-navy-hover: #064872;
  --color-teal-blue: #145171;
  --color-cta-blue: #285d7f;
  --color-hero-blue-1: #1f4e84;
  --color-hero-blue-2: #1c426e;
  --color-charcoal: #282828;
  --color-offwhite: #f1f1f3;
  --color-text: #333333;
  --font-heading: "Zilla Slab", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-accent: "Source Sans Pro", sans-serif;
  /* Kit faces first, then the self-hosted semi-condensed .ttf as fallback for
     when the Adobe kit isn't authorised for the current domain. */
  --font-myriad: "myriad-pro", "Myriad Pro", "Segoe UI", Arial, sans-serif;
  --font-myriad-condensed: "myriad-pro-condensed", "Myriad Pro", "Segoe UI", Arial, sans-serif;
  --font-din: "DIN Condensed", "Arial Narrow", Arial, sans-serif;
  --font-adelle: "Adelle", "Zilla Slab", Georgia, "Times New Roman", serif;
  --container-max: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: #fff;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin: 0 0 0.5em;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-block;
  border: none;
  border-radius: 1rem;
  padding: 14px 40px;
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: -16px 12px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
  box-shadow: -0.6rem 0.35rem rgba(46, 73, 92, 0.55);
  animation: pulse-hover 1000ms ease-in-out;
}

@keyframes pulse-hover {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.btn-login {
  background: var(--color-navy);
  color: #fff;
  border-radius: 0;
  padding: 12px 50px;
  font-size: 1rem;
  line-height: 1rem;
  letter-spacing: normal;
  text-transform: uppercase;
  box-shadow: none;
  margin-bottom: -12px;
  position: relative;
  z-index: 2;
}

.btn-login:hover {
  background: var(--color-navy-hover);
  color: #fff;
  box-shadow: none;
  animation: none;
}

.btn-cta {
  background: var(--color-navy-hover);
  color: var(--color-offwhite);
  font-family: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 18px;
  font-weight: 500;
  line-height: 34px;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  padding: 16px 30px;
}

.btn-cta:hover {
  background: var(--color-navy);
  color: var(--color-offwhite);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.topbar {
  background: linear-gradient(90deg, rgba(20, 81, 113, 0.8) 0%, var(--color-teal-blue) 100%);
  padding: 0;
  position: relative;
  z-index: 1;
}

.topbar-inner {
  display: flex;
  justify-content: flex-end;
}

.mainbar {
  background: linear-gradient(90deg, #ffffff 0%, #d6d1cc 100%);
  padding: 25px 0;
  transition: padding 0.3s ease, box-shadow 0.3s ease;
}

.mainbar.is-sticky {
  padding: 10px 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.mainbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 63px;
}

/* Translucent panel behind the logo. Negative margins let it break out of the
   mainbar in both directions: up past the top of the page through the topbar,
   and down over the hero. The margin box collapses to less than the row's
   min-height, so the oversized panel never stretches the header itself. */
.logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32%;
  min-width: 340px;
  min-height: 198px;
  padding: 0;
  margin-top: -113px;
  margin-bottom: -100px;
  background: rgba(255, 255, 255, 0.7);
  position: relative;
  z-index: 999;
  transition: min-height 0.3s ease, margin 0.3s ease;
}

.mainbar.is-sticky .logo-link {
  min-height: 141px;
  margin-top: -58px;
  margin-bottom: -40px;
}

.logo {
  width: 280px;
  transition: width 0.3s ease;
}

.mainbar.is-sticky .logo {
  width: 200px;
}

.main-nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-family: var(--font-accent);
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.main-nav a:hover {
  color: var(--color-navy);
  border-color: var(--color-navy);
}

/* Current page. The live site's mobile menu flips the active item to white,
   which would vanish on this light panel, so both menus use the red. */
.main-nav a.is-active,
.mobile-nav a.is-active {
  color: #d54553;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px 28px;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-nav a {
  font-family: var(--font-accent);
  font-weight: 600;
  color: var(--color-text);
}

.mobile-nav .btn-cta {
  text-align: center;
}

@media (max-width: 860px) {
  .main-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .mobile-nav.is-open {
    display: flex;
  }

  /* Panel sizes to the logo instead of a column share, but still breaks out
     to the top of the page and over the hero. */
  .logo-link,
  .mainbar.is-sticky .logo-link {
    width: auto;
    min-width: 0;
    min-height: 160px;
    padding: 0 16px;
    margin-top: -69px;
    margin-bottom: -60px;
  }

  .logo,
  .mainbar.is-sticky .logo {
    width: 200px;
  }
}

/* CTA: heading and button sit on one row, not stacked. The 0.8 alpha over
   the white page is what lightens the panel against the solid --color-cta-blue.
   Shared by the homepage and About Us, hence site.css rather than home.css. */
.cta-section {
  background: rgba(40, 93, 127, 0.8);
  color: #fff;
  padding: 100px 0 80px;
}

.cta-section .container-inner {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  gap: 20px;
}

.cta-section h2 {
  width: 60%;
  font-family: "Open Sans", sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 36px;
  color: var(--color-offwhite);
  margin: 0;
  opacity: 0;
}

/* Heading carries the live site's "animated-slow" (2s); the button uses the
   default 1.25s. Both are one-shot entrance animations, not loops. */
.cta-section h2.in-view {
  animation: cta-fade-in-left 2s ease both;
}

.cta-section .btn-cta {
  opacity: 0;
}

.cta-section .btn-cta.in-view {
  opacity: 1;
  animation: cta-pulse 1.25s ease both;
}

@keyframes cta-fade-in-left {
  from {
    opacity: 0;
    transform: translate3d(-100%, 0, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Used by the offset hero panel on About Us and Member Benefits. */
@keyframes fade-left-soft {
  from {
    opacity: 0;
    transform: translateX(-150px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes cta-pulse {
  from {
    transform: scale3d(1, 1, 1);
  }
  50% {
    transform: scale3d(1.05, 1.05, 1.05);
  }
  to {
    transform: scale3d(1, 1, 1);
  }
}

@media (max-width: 768px) {
  .cta-section .container-inner {
    flex-direction: column;
    gap: 32px;
  }

  .cta-section h2 {
    width: 100%;
    text-align: center;
  }
}

/* Footer */
.site-footer {
  font-family: var(--font-body);
}

.footer-top {
  background: var(--color-charcoal);
  color: #fff;
  padding: 100px 0;
}

.footer-grid {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.footer-nav {
  width: 29.5%;
}

.footer-contact {
  width: 29.5%;
}

.footer-logo {
  width: 39.4%;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer-nav a {
  display: block;
  padding: 13px 0;
  color: #538baf;
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-contact h3 {
  color: #538baf;
  font-family: "Open Sans", sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.footer-contact address {
  font-style: normal;
  font-family: "Open Sans", sans-serif;
  font-size: 13px;
  line-height: 30px;
  color: #fff;
}

.footer-contact a {
  color: #fff;
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

/* No brightness/invert filter here: the live footer mark keeps its full
   colour against the charcoal panel. */
.footer-logo {
  display: flex;
  justify-content: center;
}

.footer-logo img {
  width: 400px;
}

.footer-bottom {
  background: var(--color-offwhite);
  padding: 8px 0;
}

.footer-bottom-inner {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-bottom-inner p {
  margin: 0;
  font-family: "Open Sans", sans-serif;
  font-size: 12px;
  line-height: 19px;
  color: #000;
}

.footer-credit {
  font-weight: 600;
  color: #0f467c;
}

@media (max-width: 768px) {
  .footer-grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 32px;
  }

  .footer-nav,
  .footer-contact,
  .footer-logo {
    width: 100%;
  }

  .footer-logo img {
    width: 260px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }
}
