/* ==========================================================================
   Black Pearl Maritime Security — style.css
   Mobile-first. Breakpoints: 480 / 768 / 1024 / 1280.
   Palette: #1a2332 dark navy · #c9a84c gold · #ffffff white
   ========================================================================== */

/* Self-hosted fonts (must precede any other rules) */
@import url("fonts.css");

/* ---------- Design tokens ---------- */
:root {
  --navy:        #1c2b3a;   /* dark navy — header / footer / banners */
  --navy-deep:   #1c2b3a;   /* footer matches navy per brand spec */
  --navy-mid:    #243447;   /* nav hover state */
  --navy-light:  #243447;   /* submenu / social tiles */
  --charcoal:    #243447;
  --gold:        #c8a951;   /* warm gold accent / active nav */
  --gold-bright: #d4b96a;   /* gold hover */
  --gold-light:  #d4b96a;   /* alias */
  --white:       #ffffff;
  --off-white:   #f5f5f5;   /* page background */
  --grey:        #777777;
  --grey-light:  #dddddd;
  --border:      #dddddd;
  --text:        #222222;   /* body text */
  --text-dark:   #222222;   /* alias */
  --text-muted:  #555555;   /* secondary text */
  --text-mid:    #555555;   /* alias */

  --font-head: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --container: 1200px;
  --header-h: 70px;

  --shadow-sm: 0 1px 3px rgba(19, 27, 39, 0.12);
  --shadow-md: 0 6px 18px rgba(19, 27, 39, 0.14);
  --shadow-lg: 0 14px 40px rgba(19, 27, 39, 0.22);

  --radius: 4px;
  --transition: 0.25s ease;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--off-white);  /* off-white page background */
  overflow-x: hidden;            /* guard against accidental horizontal scroll */
}

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

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover,
a:focus { color: var(--gold-bright); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 0.6em;
  letter-spacing: 0.02em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 3rem 0; background: var(--white); }   /* white content areas */
.section--tight { padding: 2rem 0; }
.section--alt { background: var(--off-white); }
.section--navy { background: var(--navy); color: var(--grey-light); }
.section--navy h1,
.section--navy h2,
.section--navy h3 { color: var(--white); }

.text-center { text-align: center; }

.section-title {
  position: relative;
  margin-bottom: 1.8rem;
  text-transform: uppercase;
}
.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 0.7rem;
  background: var(--gold);
}
.text-center .section-title::after { margin-left: auto; margin-right: auto; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.95rem 1.8rem;        /* ≥44px tall tap target */
  min-height: 44px;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn--primary {
  background: var(--gold);
  color: var(--navy);
}
.btn--primary:hover,
.btn--primary:focus {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--navy);
  transform: translateY(-2px);
}
.btn--ghost {
  background: transparent;
  color: var(--white);
}
.btn--ghost:hover,
.btn--ghost:focus {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-2px);
}

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--navy);
  box-shadow: var(--shadow-md);
  height: var(--header-h);
  display: flex;
  align-items: center;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--white);
  font-family: var(--font-head);
  text-transform: uppercase;
}
.brand:hover, .brand:focus { color: var(--white); }
.brand__logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 60px;          /* sits neatly inside the 70px header bar */
  border-radius: 0;
  clip-path: none;
  object-fit: fill;
  background: none;
}
.brand__logo--small { display: none; }
@media (max-width: 479px) {
  .brand__logo--full  { display: none; }
  .brand__logo--small { display: block; }
}

/* hamburger */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* menu — mobile first (off-canvas dropdown) */
.nav-menu {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  bottom: 0;
  background: var(--navy-deep);
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 2rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--transition);
}
.nav-menu.is-open { transform: translateX(0); }

.nav-menu > li { margin: 0; border-bottom: 1px solid rgba(255,255,255,0.07); }

.nav-menu a,
.nav-menu .submenu-toggle {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1rem;
  color: var(--grey-light);
  background: transparent;
  border: 0;
  padding: 0.95rem 1.5rem;
  min-height: 44px;
  cursor: pointer;
}
.nav-menu > li > a,
.nav-menu .nav-parent > .submenu-toggle { color: var(--white); }
.nav-menu a:hover,
.nav-menu a:focus,
.nav-menu .submenu-toggle:hover,
.nav-menu .submenu-toggle:focus,
.nav-menu a.is-active { color: var(--gold); }

/* parent item with caret */
.nav-parent { position: relative; }
.nav-parent > .submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-parent > .submenu-toggle::after {
  content: "";
  width: 8px; height: 8px;
  margin-left: 0.6rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--transition);
}
.nav-parent.is-open > .submenu-toggle::after { transform: rotate(-135deg); }

/* submenu */
.submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  background: var(--navy);
  transition: max-height var(--transition);
}
.nav-parent.is-open > .submenu { max-height: 600px; }
.submenu a {
  padding-left: 2.5rem;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  margin-top: var(--header-h);
  min-height: 78vh;
  display: flex;
  align-items: center;
  color: var(--white);
  background:
    linear-gradient(rgba(28,43,58,0.78), rgba(28,43,58,0.86)),
    url("../images/uploads/2016/07/BP-home-image.jpg") center/cover no-repeat;
  background-color: var(--navy);
}
.hero__inner { max-width: 720px; padding: 3rem 0; }
.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 6vw, 3.6rem);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero p {
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  color: var(--grey-light);
  margin-bottom: 1.8rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* page banner (inner pages) */
.page-banner {
  margin-top: var(--header-h);
  background:
    linear-gradient(rgba(28,43,58,0.82), rgba(28,43,58,0.9)),
    url("../images/uploads/2013/07/Master-Heading-2.png") center/cover no-repeat;
  background-color: var(--navy);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}
.page-banner h1 { color: var(--white); text-transform: uppercase; margin: 0; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  background: var(--off-white);
  border-bottom: 1px solid var(--grey-light);
  font-size: 0.85rem;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0.8rem 0;
}
.breadcrumb li { margin: 0; color: var(--text-muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 0.4rem; color: var(--grey); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb [aria-current="page"] { color: var(--navy); font-weight: 600; }

/* ==========================================================================
   CARDS / GRID
   ========================================================================== */
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

.card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card__media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;             /* real <img> fills the slot, cropped to ratio */
  background: var(--navy-light); /* fallback tint while the image loads */
}
.card__body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }
.card__body h3 { margin-bottom: 0.5rem; }
.card__icon {
  width: 56px; height: 56px;
  margin-bottom: 1rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy);
  color: var(--gold);
  border-radius: 50%;
  font-size: 1.5rem;
  font-family: var(--font-head);
}
.card__link {
  margin-top: auto;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  align-self: flex-start;
}
.card__link::after { content: " →"; }

/* feature row (icon + text) */
.feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.feature__icon {
  flex: 0 0 48px;
  width: 48px; height: 48px;
  background: var(--gold);
  color: var(--navy);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-size: 1.2rem;
}

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; text-align: center; }
.stat__num {
  font-family: var(--font-head);
  font-size: 2.6rem;
  color: var(--gold);
  line-height: 1;
}
.stat__label { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; color: var(--grey-light); }

/* ---------- Accreditations ---------- */
.accreditations { padding: 2.5rem 0; background: var(--white); border-top: 1px solid var(--grey-light); }
.accreditations__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  align-items: center;
}
.accreditation {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  padding: 0.5rem;
  background: var(--off-white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  color: var(--grey);
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  filter: grayscale(1);
  opacity: 0.8;
  transition: filter var(--transition), opacity var(--transition);
}
.accreditation:hover { filter: grayscale(0); opacity: 1; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    linear-gradient(rgba(28,43,58,0.92), rgba(28,43,58,0.92)),
    url("../images/uploads/2013/07/shutterstock_60165934.jpg") center/cover no-repeat;
  background-color: var(--navy-deep);
  color: var(--white);
  text-align: center;
  padding: 3.5rem 0;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: var(--grey-light); max-width: 620px; margin: 0 auto 1.6rem; }

/* ==========================================================================
   FORMS
   ========================================================================== */
.form-field { margin-bottom: 1.2rem; }
.form-field label {
  display: block;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  color: var(--navy);
}
.form-field .req { color: #b3402f; }
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;            /* prevents iOS zoom */
  padding: 0.8rem 0.9rem;
  min-height: 44px;
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.2);
  outline: none;
}
.form-field input.invalid,
.form-field textarea.invalid { border-color: #b3402f; }
.field-error {
  display: block;
  color: #b3402f;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  min-height: 1em;
}
.form-status {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}
.form-status.success { background: #e6f4ea; color: #1e7a3c; border: 1px solid #a9d8b8; }
.form-status.error   { background: #fbeae7; color: #b3402f; border: 1px solid #efb9b0; }
.form-status[hidden] { display: none; }

/* visually-hidden (honeypot / a11y) */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ---------- Info / contact cards ---------- */
.info-card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.info-card h3 { margin-bottom: 0.6rem; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: 0.6rem; margin-bottom: 0.7rem; }
.info-list .label {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
  color: var(--gold);
  flex: 0 0 70px;
}

/* prose blocks for content pages */
.prose { max-width: 820px; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul { padding-left: 1.3rem; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--navy-deep);
  color: var(--grey-light);
  padding-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.site-footer h4 {
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1rem;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.6rem;
}
.site-footer h4::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 40px; height: 2px; background: var(--gold);
}
.site-footer p { color: var(--grey-light); font-size: 0.92rem; }
.footer-logo { display: block; height: 60px; width: auto; margin-bottom: 1.1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.55rem; }
.footer-links a { color: var(--grey-light); font-size: 0.92rem; }
.footer-links a:hover { color: var(--gold); padding-left: 4px; transition: padding var(--transition), color var(--transition); }

.footer-contact { list-style: none; padding: 0; margin: 0; font-size: 0.92rem; }
.footer-contact li { margin-bottom: 0.7rem; line-height: 1.45; }
.footer-contact a { color: var(--grey-light); }
.footer-contact a:hover { color: var(--gold); }

.social-links { display: flex; gap: 0.6rem; margin-top: 1rem; }
.social-links a {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-light);
  color: var(--white);
  border-radius: 50%;
  font-family: var(--font-head);
  transition: background var(--transition), transform var(--transition);
}
.social-links a:hover { background: var(--gold); color: var(--navy); transform: translateY(-3px); }

.footer-bottom {
  margin-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.3rem 0;
  font-size: 0.82rem;
  color: var(--grey);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}
.footer-bottom a { color: var(--grey); }
.footer-bottom a:hover { color: var(--gold); }

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 1100;
  background: var(--gold);
  color: var(--navy);
  padding: 0.7rem 1.1rem;
  font-family: var(--font-head);
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ==========================================================================
   RESPONSIVE — 480px (small mobile)
   ========================================================================== */
@media (min-width: 480px) {
  .hero__actions { flex-wrap: nowrap; }
  .accreditations__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   RESPONSIVE — 768px (tablet)
   ========================================================================== */
@media (min-width: 768px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 2rem; }

  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .accreditations__grid { grid-template-columns: repeat(4, 1fr); }

  .footer-grid { grid-template-columns: 2fr 1fr 1.4fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ==========================================================================
   RESPONSIVE — 1024px (desktop) — switch to horizontal nav + hover dropdowns
   ========================================================================== */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }

  .nav-menu {
    position: static;
    transform: none;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    background: transparent;
    height: var(--header-h);
    padding: 0;
    overflow: visible;
  }
  /* each item is its own inline flex row so a dropdown's link + caret
     sit side-by-side instead of stacking into a second header row */
  .nav-menu > li { border-bottom: 0; display: flex; align-items: center; }

  .nav-menu a,
  .nav-menu .submenu-toggle {
    display: flex;
    align-items: center;
    height: var(--header-h);
    padding: 0 0.8rem;
    font-size: 13px;
    letter-spacing: 0.03em;
    color: var(--white);
    white-space: nowrap;
  }
  .nav-menu > li > a::after,
  .nav-parent > .submenu-toggle::after { /* keep caret */ }

  .nav-menu > li > a:hover,
  .nav-menu > li > a:focus,
  .nav-menu .submenu-toggle:hover,
  .nav-menu .submenu-toggle:focus,
  .nav-menu a.is-active {
    color: var(--gold);
    box-shadow: inset 0 -3px 0 var(--gold);
  }

  /* desktop dropdown */
  .submenu {
    position: absolute;
    top: var(--header-h);
    left: 0;
    min-width: 260px;
    max-height: none;
    background: var(--navy-deep);
    box-shadow: var(--shadow-lg);
    border-top: 3px solid var(--gold);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  }
  .nav-parent:hover > .submenu,
  .nav-parent:focus-within > .submenu,
  .nav-parent.is-open > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: none;
  }
  .submenu a {
    height: auto;
    padding: 0.8rem 1.3rem;
    color: var(--grey-light);
    white-space: normal;
  }
  .submenu a:hover,
  .submenu a:focus { color: var(--gold); background: var(--navy-light); box-shadow: none; }

  .nav-parent.is-open > .submenu-toggle::after { transform: rotate(45deg); } /* reset; hover-driven on desktop */

  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }

  .section { padding: 4.5rem 0; }
}

/* ==========================================================================
   RESPONSIVE — 1280px (wide)
   ========================================================================== */
@media (min-width: 1280px) {
  :root { --container: 1280px; }
  .nav-menu a,
  .nav-menu .submenu-toggle { padding: 0 1rem; font-size: 13px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .nav-toggle, .cta-band, .site-footer { display: none; }
  .hero, .page-banner { margin-top: 0; color: #000; background: none; }
  body { color: #000; }
}
