/* ==========================================================================
   layout.css — page regions: top bar, header/nav, hero, sections, footer
   ========================================================================== */

/* ---------- Top bar ---------- */
.topbar {
  padding: 8px 0;
  background: var(--navy-deep);
  color: var(--on-dark);
  font-size: var(--fs-xs);
}
.topbar__inner { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
@media (max-width: 580px) {
  .topbar__inner { justify-content: center; text-align: center; }
  .topbar__inner > :last-child { display: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--navy);
  line-height: 1.2;
}
.brand__logo {
  width: auto;
  height: 48px;
  flex: none;
}
.brand__text { font-size: 0.95rem; white-space: nowrap; }
.brand__tagline {
  display: block;
  margin-top: 2px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.brand--inverse { color: var(--white); }
.brand--inverse .brand__tagline { color: var(--on-dark-muted); }
@media (max-width: 580px) {
  .brand { gap: 10px; }
  .brand__logo { height: 40px; }
  .brand__text { font-size: 0.8125rem; }
  .brand__tagline { font-size: 0.5625rem; letter-spacing: 0.1em; white-space: nowrap; }
}

/* Primary navigation (desktop) */
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav__list { display: flex; align-items: center; gap: 4px; }
.site-nav__list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: var(--fs-sm);
  font-weight: 650;
  color: #33485a;
  white-space: nowrap;
  border-radius: 4px;
}
.site-nav__list a:hover { color: var(--gold-ink); }
.site-nav__actions { display: flex; align-items: center; gap: 10px; }
.site-nav__actions .btn { white-space: nowrap; }

/* Menu toggle (shown on small screens when JS is available) */
.nav-toggle {
  display: none;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-right: -8px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--navy);
  cursor: pointer;
}
.nav-toggle .icon { width: 28px; height: 28px; }
.nav-toggle .icon--close,
.nav-toggle[aria-expanded="true"] .icon--menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon--close { display: block; }

@media (max-width: 1180px) {
  .site-nav { gap: 14px; }
  .site-nav__list a { padding: 0 8px; }
}

/* Collapse point: keep in sync with the media query in assets/js/site.js */
@media (max-width: 1080px) {
  /* Without JS the nav simply wraps under the brand — always usable. */
  .site-header__inner { flex-wrap: wrap; padding-block: 10px; }
  .site-nav { flex-wrap: wrap; }
  .site-nav__list { flex-wrap: wrap; }

  /* With JS: collapsible panel */
  .js .site-header__inner { flex-wrap: nowrap; padding-block: 0; }
  .js .nav-toggle { display: grid; }
  .js .site-nav {
    position: absolute;
    top: 100%;
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 12px var(--gutter) 24px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgb(16 43 70 / 0.12);
  }
  .js .site-nav:not(.is-open) { display: none; }
  .js .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .js .site-nav__list a {
    width: 100%;
    min-height: 52px;
    padding: 0 4px;
    font-size: var(--fs-base);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .js .site-nav__actions { flex-direction: column; align-items: stretch; }
  .js .site-nav__actions .lang-switch { justify-content: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 550px;
  padding: 100px 0 88px;
  overflow: hidden;
  background: var(--navy-deep);
  color: var(--white);
}
.hero__media,
.hero__media img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(10 32 53 / 0.96) 0%, rgb(10 32 53 / 0.88) 47%, rgb(10 32 53 / 0.3) 100%);
}
.hero h1 {
  max-width: 720px;
  margin: 20px 0;
  font-size: clamp(2.25rem, 5.2vw, 4.125rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.hero__lead { max-width: 590px; margin-bottom: 30px; font-size: var(--fs-lg); color: var(--on-dark); }
.hero__notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 46px;
  font-size: var(--fs-xs);
  color: var(--on-dark);
}
.hero__notes li { display: flex; align-items: center; gap: 8px; }
.hero__notes li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 900px) {
  .hero::before { background: linear-gradient(180deg, rgb(10 32 53 / 0.86) 0%, rgb(10 32 53 / 0.93) 100%); }
}
@media (max-width: 580px) {
  .hero { min-height: 0; padding: 64px 0 52px; }
  .hero__lead { font-size: var(--fs-base); }
  .hero__notes { margin-top: 32px; gap: 10px 18px; }
  .hero .actions .btn { flex: 1 1 100%; }
}

/* ---------- Highlights strip ---------- */
.highlights { background: var(--cream); border-bottom: 1px solid var(--line); }
.highlights__list { display: grid; grid-template-columns: repeat(3, 1fr); }
.highlight {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 28px;
  border-right: 1px solid var(--line);
}
.highlight:first-child { padding-left: 0; }
.highlight:last-child { border-right: 0; }
.highlight .icon-tile { width: 44px; height: 44px; background: #e8e0d2; }
.highlight strong { display: block; font-size: var(--fs-sm); }
.highlight p span { font-size: var(--fs-xs); color: var(--muted); }
@media (max-width: 900px) {
  .highlights__list { grid-template-columns: 1fr; }
  .highlight,
  .highlight:first-child { padding: 16px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .highlight:last-child { border-bottom: 0; }
}

/* ---------- Generic sections ---------- */
.section { padding: 86px 0; }
.section--cream { background: var(--cream); }
@media (max-width: 580px) { .section { padding: 60px 0; } }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 65px;
}
.split--narrow-left { grid-template-columns: 0.8fr 1.2fr; align-items: start; gap: 60px; }

@media (max-width: 900px) {
  .split,
  .split--narrow-left { grid-template-columns: 1fr; gap: 40px; }
  /* Keep text first on mobile for the candidate section */
  .split--media-end .photo-frame { order: 2; }
}

/* ---------- Page header (inner pages) ---------- */
.page-main { padding: 56px 0 86px; }
.breadcrumb { font-size: var(--fs-sm); color: var(--muted); }
.breadcrumb a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 52px 0 24px;
  background: var(--navy-darkest);
  color: var(--on-dark);
  font-size: var(--fs-sm);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
}
.site-footer__about p { max-width: 380px; margin-top: 16px; color: var(--on-dark-muted); }
.site-footer h2 {
  margin-bottom: 14px;
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}
.footer-links { display: grid; gap: 2px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--on-dark-muted);
}
.footer-links a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 20px;
  padding-top: 18px;
  border-top: 1px solid rgb(255 255 255 / 0.13);
  font-size: var(--fs-xs);
  color: #9fb2c1;
}
.site-footer__bottom ul { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer__bottom a { display: inline-flex; min-height: 32px; align-items: center; }
.site-footer__bottom a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .disclaimer { color: #9fb2c1; }

@media (max-width: 900px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__about { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; }
}
