/* ==========================================================================
   International Flag-State Association (IFA) — Public Website
   Executive maritime-association design: formal, restrained, editorial.
   ========================================================================== */

:root {
  --navy: #0E2A4A;
  --navy-dark: #081b31;
  --contact-bg: #112B4F;
  --teal: #17ACC0;
  --teal-dark: #0C7686;
  --ink: #20242b;
  --ink-soft: #4a5058;
  --ink-muted: #6b7280;
  --border: #e2e6eb;
  --bg: #ffffff;
  --bg-muted: #f5f7f9;

  --font-sans: 'Poppins', 'Segoe UI', Arial, sans-serif;

  --max-width: 1200px;
  --side-padding: clamp(20px, 4vw, 48px);
  --reading-width: 760px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}

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

a {
  color: var(--teal-dark);
}

a:hover,
a:focus-visible {
  color: var(--navy);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  z-index: 1000;
  font-weight: 600;
  border-radius: 0 0 6px 0;
}

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

/* ---------------------------------- Shared container & headings ---------------------------------- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--side-padding);
  padding-right: var(--side-padding);
}

section h2 {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 24px;
  line-height: 1.35;
}

/* ---------------------------------- Header ---------------------------------- */

.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
}

.site-logo {
  width: 140px;
  height: auto;
}

/* ---------------------------------- Hero ---------------------------------- */

.hero {
  position: relative;
  min-height: clamp(380px, 30vw, 460px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--navy-dark);
  padding: 48px 0;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 20, 37, 0.9) 0%, rgba(8, 27, 49, 0.8) 50%, rgba(8, 27, 49, 0.55) 75%, rgba(8, 27, 49, 0.25) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-inner h1 {
  color: #ffffff;
  font-size: clamp(2.75rem, 4vw, 3.5rem);
  font-weight: 500;
  letter-spacing: 0.2px;
  line-height: 1.28;
  margin: 0 0 20px;
  max-width: 720px;
  text-wrap: balance;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-caption {
  color: #e7edf2;
  font-size: clamp(1.125rem, 1.5vw, 1.25rem);
  font-weight: 400;
  line-height: 1.65;
  max-width: 680px;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

/* ---------------------------------- About ---------------------------------- */

.about {
  background: var(--bg);
  padding-top: 72px;
  padding-bottom: 72px;
}

.about-inner {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 64px;
  align-items: center;
}

.about-media img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: center;
  display: block;
  border: 1px solid var(--border);
}

.about-copy {
  max-width: 100%;
}

.about-copy p {
  font-size: 1.08rem;
  color: var(--ink-soft);
  line-height: 1.75;
  margin: 0 0 20px;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.stat-emphasis {
  color: var(--navy);
  font-weight: 700;
}

.contact-button {
  display: inline-block;
  margin-top: 28px;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--navy);
  background: transparent;
  border: 1.5px solid var(--navy);
  padding: 10px 24px;
  border-radius: 4px;
  text-decoration: none;
}

.contact-button:hover,
.contact-button:focus-visible {
  background: var(--navy);
  color: #ffffff;
}

/* ---------------------------------- Flag States ---------------------------------- */

.flag-states {
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-top: 64px;
  padding-bottom: 64px;
}

.registry-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.registry-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-left: 1px solid var(--border);
}

.registry-item:first-child {
  border-left: none;
}

.registry-flag {
  max-height: 54px;
  max-width: 150px;
  width: auto;
  height: auto;
  flex-shrink: 0;
}

.registry-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.registry-name,
.registry-name:link,
.registry-name:visited,
.registry-name:hover,
.registry-name:focus-visible,
.registry-name:active {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.35;
  text-decoration: none;
  color: #0B2D50;
}

.registry-name:hover,
.registry-name:active {
  text-decoration: underline;
}

.registry-name:focus-visible {
  text-decoration: underline;
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

/* ---------------------------------- Priorities ---------------------------------- */

.priorities {
  background: var(--bg);
  padding-top: 72px;
  padding-bottom: 72px;
}

.priorities-lead {
  max-width: var(--reading-width);
  font-size: 1.08rem;
  color: var(--ink-soft);
  line-height: 1.75;
  margin: 0 0 36px;
}

.priorities-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.priorities-list li {
  background: #ffffff;
  padding: 24px 14px;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--navy);
  line-height: 1.4;
}

/* ---------------------------------- News ---------------------------------- */

.news {
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
  padding-top: 72px;
  padding-bottom: 72px;
}

.featured-article {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 40px;
}

.article-column {
  max-width: var(--reading-width);
}

.article-kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin: 0 0 10px;
}

.article-date {
  font-size: 0.92rem;
  color: var(--ink-muted);
  margin: 0 0 16px;
}

.article-headline {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy);
  margin: 0 0 24px;
}

.read-full-link {
  display: inline-block;
  font-weight: 600;
  font-size: 0.96rem;
  color: #ffffff;
  background: var(--navy);
  padding: 12px 26px;
  border-radius: 4px;
  text-decoration: none;
}

.read-full-link:hover,
.read-full-link:focus-visible {
  background: var(--teal-dark);
  color: #ffffff;
}

/* ---------------------------------- Footer (index.html) ---------------------------------- */

.site-footer {
  background: var(--contact-bg);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr;
  align-items: center;
  column-gap: clamp(48px, 12vw, 220px);
  padding-top: 32px;
  padding-bottom: 20px;
}

.footer-contact {
  text-align: left;
}

.footer-contact-heading {
  font-size: 0.98rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 6px;
}

.footer-enquiry {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 18px;
  max-width: 360px;
}

.footer-brand-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 6px;
}

.footer-email {
  display: inline-block;
  font-size: 0.98rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
}

.footer-email:hover,
.footer-email:focus-visible {
  color: var(--teal);
  text-decoration: underline;
}

.footer-location {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 4px 0 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-logo {
  width: 180px;
  height: auto;
}

.footer-bottom {
  padding-top: 14px;
  padding-bottom: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-copyright {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.footer-credit a:hover,
.footer-credit a:focus-visible {
  color: var(--teal);
}

/* ---------------------------------- Footer (404 page only) ---------------------------------- */

.notfound-footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
}

.notfound-footer-inner {
  padding-top: 24px;
  padding-bottom: 24px;
}

.notfound-footer-org {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

/* ---------------------------------- Responsive ---------------------------------- */

@media (max-width: 860px) {
  .about-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-media {
    order: 2;
  }

  .featured-article {
    padding: 28px;
  }

  .priorities-list {
    grid-template-columns: 1fr;
  }

  .priorities-list li {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .registry-strip {
    grid-template-columns: 1fr;
  }

  .registry-item {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .registry-item:first-child {
    border-top: none;
  }
}

@media (max-width: 640px) {

  .footer-main {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 28px;
    padding-bottom: 16px;
  }

  .footer-brand {
    justify-content: center;
  }

  .footer-logo {
    width: 130px;
  }

  .footer-bottom {
    padding-top: 12px;
    padding-bottom: 16px;
  }

  .footer-copyright {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .footer-email {
    overflow-wrap: anywhere;
  }

  .header-inner {
    min-height: 76px;
  }

  .site-logo {
    width: 110px;
  }

  .hero {
    min-height: clamp(300px, 62vw, 380px);
    padding: 32px 0;
  }

  .hero-inner h1 {
    font-size: clamp(1.875rem, 7.5vw, 2.25rem);
    margin-bottom: 14px;
  }

  .hero-caption {
    font-size: 1rem;
    line-height: 1.6;
  }

  .about,
  .priorities,
  .news,
  .contact {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .about-media img {
    height: 280px;
  }

  .flag-states {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .featured-article {
    padding: 22px;
  }
}
