/* ===========================================================================
   Belize Immigration Form — stylesheet
   Register: institutional rather than promotional. Square corners, rules
   instead of drop shadows, restrained colour. The flag blue does the work;
   the flag red appears only as a thin accent, never as a fill.
   =========================================================================== */

:root {
  --blue: #003F87;          /* Belize flag blue */
  --blue-dark: #002B5C;
  --red: #CE1126;           /* flag red — accents only */
  --navy: #0d2b45;
  --ink: #16232e;
  --ink-soft: #5b6b78;

  --paper: #ffffff;
  --paper-2: #f4f6f8;
  --paper-3: #eceff3;
  --rule: #d5dce3;
  --rule-strong: #b6c1cb;

  --r: 3px;                 /* deliberately small: squared, official-looking */

  --gap: clamp(1rem, 3vw, 2rem);
  --band: clamp(2.75rem, 6vw, 4.75rem);

  --sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
html, body { max-width: 100%; overflow-x: clip; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1rem, .97rem + .15vw, 1.06rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; letter-spacing: -.012em; text-wrap: balance; }
h1 { font-size: clamp(1.85rem, 1.3rem + 2.2vw, 2.8rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.85rem); }
h3 { font-size: clamp(1.08rem, 1rem + .5vw, 1.28rem); }

p { margin: 0 0 1.1em; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }
img, svg { max-width: 100%; height: auto; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
::selection { background: rgb(0 63 135 / 15%); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skiplink { position: absolute; left: -9999px; top: .5rem; z-index: 90; background: var(--navy); color: #fff; padding: .6rem 1rem; }
.skiplink:focus { left: .5rem; color: #fff; }

/* --- containers ---------------------------------------------------------- */

.wrap { width: min(100% - 2.5rem, 1160px); margin-inline: auto; }
.wrap--text { width: min(100% - 2.5rem, 760px); }

.eyebrow {
  margin: 0 0 .55rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow--light { color: #a8c6e8; }

.section__title { position: relative; padding-bottom: .6rem; margin-bottom: 1.6rem; }
.section__title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 3rem; height: 3px; background: var(--red); }

/* --- buttons: squared, no gradients -------------------------------------- */

.btn {
  --bg: var(--blue);
  --fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .72rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: var(--bg);
  color: var(--fg);
  font-weight: 650;
  font-size: .95rem;
  text-decoration: none;
  transition: background-color .14s ease;
}
.btn:hover { color: var(--fg); }
.btn--primary { --bg: var(--blue); }
.btn--primary:hover { --bg: var(--blue-dark); }
.btn--onphoto { --bg: transparent; --fg: #fff; border-color: rgb(255 255 255 / 55%); }
.btn--onphoto:hover { --bg: rgb(255 255 255 / 14%); }
.btn--quiet { --bg: transparent; --fg: var(--ink); border-color: var(--rule-strong); }
.btn--quiet:hover { --bg: var(--paper-2); }
.btn--sm { padding: .46rem 1rem; font-size: .87rem; }
.btn--lg { padding: .88rem 1.7rem; font-size: 1rem; }

/* --- identifying strip --------------------------------------------------- */

.strip { background: var(--navy); color: rgb(255 255 255 / 76%); font-size: .78rem; }
.strip__row { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; min-height: 34px; padding-block: .3rem; }
.strip__aside { display: flex; align-items: center; gap: .9rem; }
.strip__link { color: rgb(255 255 255 / 84%); text-decoration: none; border-bottom: 1px solid rgb(255 255 255 / 30%); }
.strip__link:hover { color: #fff; border-bottom-color: #fff; }

.langs { display: inline-flex; border: 1px solid rgb(255 255 255 / 28%); border-radius: var(--r); overflow: hidden; }
.langs__opt { padding: .16rem .5rem; font-size: .72rem; font-weight: 700; letter-spacing: .04em; color: rgb(255 255 255 / 76%); text-decoration: none; }
.langs__opt + .langs__opt { border-left: 1px solid rgb(255 255 255 / 28%); }
.langs__opt:hover { background: rgb(255 255 255 / 12%); color: #fff; }
.langs__opt.is-on { background: #fff; color: var(--navy); }

/* --- banner -------------------------------------------------------------- */

.banner {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  box-shadow: inset 0 -4px 0 -1px var(--blue);
}
.banner__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; padding-block: .55rem; }

.logo { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; min-width: 0; }
.logo__mark { flex: none; border-radius: var(--r); }
.logo__words { display: grid; min-width: 0; }
.logo__name { font-weight: 750; font-size: 1.02rem; line-height: 1.2; letter-spacing: -.015em; color: var(--navy); }
.logo__sub { font-size: .72rem; letter-spacing: .04em; color: var(--ink-soft); line-height: 1.3; }

.nav { display: flex; align-items: center; gap: .4rem 1.15rem; flex-wrap: wrap; justify-content: flex-end; }
.nav__item {
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.nav__item:hover { color: var(--blue); border-bottom-color: var(--blue); }

@media (max-width: 780px) { .logo__sub { display: none; } .nav__item { display: none; } }
@media (max-width: 460px) {
  .banner__row { flex-wrap: wrap; }
  .logo { flex: 1 1 100%; }
  .nav { flex: 1 1 100%; justify-content: flex-start; padding-bottom: .2rem; }
}

/* --- hero ---------------------------------------------------------------- */

.hero { position: relative; isolation: isolate; color: #fff; padding-block: var(--band); background: var(--blue-dark); }
.hero__photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 62% 55%; }
/* Wash weighted to the left, where the copy sits; the pyramid on the right
   keeps its detail. */
.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(94deg, rgb(0 25 51 / 92%) 0%, rgb(0 25 51 / 78%) 32%, rgb(0 25 51 / 38%) 62%, rgb(0 25 51 / 12%) 100%),
    linear-gradient(180deg, rgb(0 25 51 / 0%) 60%, rgb(0 25 51 / 42%) 100%);
}
/* Constrain the children, not the wrapper: capping .wrap itself would let its
   auto margins re-centre the whole block, pushing the copy off the dark side of
   the veil and onto the pyramid. */
.hero__inner > * { max-width: 40rem; }
.hero__inner :is(h1, .hero__lead, .eyebrow) { text-shadow: 0 1px 12px rgb(0 18 36 / 55%); }
.hero__lead { font-size: clamp(1rem, .95rem + .35vw, 1.14rem); color: rgb(255 255 255 / 92%); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* --- facts band ---------------------------------------------------------- */

.facts { background: var(--navy); color: #fff; padding-block: clamp(1.6rem, 3vw, 2.4rem); }
.facts__row { margin: 0; display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.facts__cell { padding-left: 1rem; border-left: 3px solid var(--red); }
.facts__cell dt { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.75rem); font-weight: 750; letter-spacing: -.02em; }
.facts__cell dd { margin: .15rem 0 0; font-size: .86rem; color: rgb(255 255 255 / 74%); }

/* --- process ------------------------------------------------------------- */

.process { padding-block: var(--band); }
.process__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.process__step { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--rule); }
.process__n {
  display: grid; place-items: center;
  width: 2.1rem; height: 2.1rem;
  border: 2px solid var(--blue);
  border-radius: var(--r);
  color: var(--blue);
  font-weight: 750; font-size: .95rem;
}
.process__step h3 { margin-bottom: .3rem; }
.process__step p { margin: 0; color: var(--ink-soft); }
@media (min-width: 900px) { .process__list { grid-template-columns: repeat(3, 1fr); gap: 0 2.5rem; border-bottom: 1px solid var(--rule); } .process__step { border-bottom: 0; } }

/* --- distinctions -------------------------------------------------------- */

.distinct { padding-block: var(--band); background: var(--paper-2); }
.distinct__list { margin: 0; display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 820px) { .distinct__list { grid-template-columns: 1fr 1fr; } }
.distinct__item { background: var(--paper); padding: 1.4rem 1.5rem; }
.distinct__item dt { font-weight: 700; font-size: 1.05rem; margin-bottom: .35rem; color: var(--navy); }
.distinct__item dd { margin: 0; font-size: .94rem; color: var(--ink-soft); }

/* --- prose --------------------------------------------------------------- */

.essay { padding-block: var(--band); }

.prose { font-size: 1.03rem; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { margin-top: 2.4rem; padding-top: 1.5rem; border-top: 2px solid var(--rule); scroll-margin-top: 5.5rem; }
.prose h3 { margin-top: 1.9rem; color: var(--navy); }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--blue); }

.prose blockquote {
  margin: 1.8rem 0;
  padding: 1rem 1.3rem;
  background: var(--paper-2);
  border-left: 3px solid var(--blue);
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose figure { margin: 2rem 0; }
.prose figure img { width: 100%; border: 1px solid var(--rule); background: var(--paper-2); }
.prose figcaption { margin-top: .5rem; font-size: .84rem; color: var(--ink-soft); text-align: center; }

.prose table { width: 100%; border-collapse: collapse; margin: 1.8rem 0; font-size: .92rem; }
.prose :is(th, td) { padding: .62rem .8rem; border: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose thead th { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 650; }
.prose tbody tr:nth-child(even) { background: var(--paper-2); }

.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: var(--paper-2); padding: .12em .38em; }

/* ui.js wraps tables so they scroll in place; the query is the no-JS fallback */
.tablewrap { overflow-x: auto; margin: 1.8rem 0; -webkit-overflow-scrolling: touch; }
.tablewrap table { margin: 0; min-width: 34rem; }
@media (max-width: 640px) { .prose > table { display: block; overflow-x: auto; } }

/* --- boxes --------------------------------------------------------------- */

.box { margin: 2rem 0; padding: 1.15rem 1.3rem; border: 1px solid var(--rule); background: var(--paper-2); }
.box > *:last-child { margin-bottom: 0; }
.box strong { display: block; margin-bottom: .35rem; font-size: 1.02rem; color: var(--navy); }
.box--note { border-left: 4px solid var(--blue); background: #f2f6fb; }
.box--cta { border: 0; background: var(--navy); color: #fff; text-align: center; padding: 1.8rem 1.4rem; }
.box--cta strong { color: #fff; }
.box--cta a:not(.btn) { color: #fff; }
.box--cta .btn { margin-top: .5rem; --bg: var(--red); }
.box--cta .btn:hover { --bg: #a80e1e; }

/* --- cards --------------------------------------------------------------- */

.latest { padding-block: var(--band); background: var(--paper-2); }
.latest__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.latest__head .section__title { margin-bottom: 1.6rem; }
.more { font-weight: 650; font-size: .92rem; text-decoration: none; }
.more:hover { text-decoration: underline; }

.cardlist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--rule); }
.card:hover { border-color: var(--rule-strong); }
.card__media { display: block; aspect-ratio: 16 / 9; background: var(--paper-3); border-bottom: 1px solid var(--rule); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.card__date { font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); }
.card__body :is(h2, h3) { font-size: 1.08rem; margin: .35rem 0 .45rem; }
.card__body :is(h2, h3) a { color: var(--navy); text-decoration: none; }
.card__body :is(h2, h3) a:hover { color: var(--blue); }
.card__body p { font-size: .91rem; color: var(--ink-soft); margin-bottom: 1rem; }
.card__more { margin-top: auto; font-size: .86rem; font-weight: 650; color: var(--blue); }

/* --- index --------------------------------------------------------------- */

.index__head { padding-block: var(--band) 0; }
.index__lead { font-size: 1.05rem; color: var(--ink-soft); }
.index__body { padding-block: var(--band); }
.index__foot { padding-bottom: var(--band); }

/* --- document page ------------------------------------------------------- */

.doc { padding-block: clamp(1.3rem, 4vw, 2.2rem) var(--band); }
.crumbs { font-size: .83rem; color: var(--ink-soft); margin-bottom: 1.3rem; display: flex; gap: .45rem; flex-wrap: wrap; }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--blue); text-decoration: underline; }

.doc__head { padding-bottom: 1.6rem; border-bottom: 2px solid var(--rule); margin-bottom: 2.2rem; }
.doc__standfirst { font-size: 1.1rem; color: var(--ink-soft); }
.doc__meta { font-size: .82rem; color: var(--ink-soft); display: flex; gap: .45rem; flex-wrap: wrap; margin: 0; }

.doc__foot { margin-top: 2.8rem; padding-top: 1.6rem; border-top: 2px solid var(--rule); display: flex; gap: .75rem; flex-wrap: wrap; }

/* --- Q&A ----------------------------------------------------------------- */

.qa { padding-block: var(--band); background: var(--paper-2); }
.qa__list { border-top: 1px solid var(--rule); }
.qa__item { border-bottom: 1px solid var(--rule); background: var(--paper); }
.qa__q { cursor: pointer; list-style: none; padding: .95rem 2.8rem .95rem 1.1rem; font-weight: 650; position: relative; color: var(--navy); }
.qa__q::-webkit-details-marker { display: none; }
.qa__q::after {
  content: ""; position: absolute; right: 1.15rem; top: 50%;
  width: .58rem; height: .58rem; margin-top: -.38rem;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: rotate(45deg);
}
.qa__item[open] .qa__q::after { transform: rotate(-135deg); margin-top: -.12rem; }
.qa__q:hover { background: var(--paper-2); }
.qa__a { padding: 0 1.1rem 1rem; color: var(--ink-soft); }
.qa__a p:last-child { margin-bottom: 0; }

/* --- embedded form pages ------------------------------------------------- */

.formhead { padding-block: var(--band) 1.3rem; background: var(--paper-2); border-bottom: 1px solid var(--rule); text-align: center; }
.formhead p { color: var(--ink-soft); }
.formbody { padding-block: 2rem var(--band); }
.formbody .wrap { max-width: 900px; }

/* --- baseboard ----------------------------------------------------------- */

.baseboard { background: var(--navy); color: rgb(255 255 255 / 76%); padding-block: var(--band) 1.8rem; font-size: .91rem; border-top: 4px solid var(--blue); }
.baseboard a { color: rgb(255 255 255 / 82%); text-decoration: none; }
.baseboard a:hover { color: #fff; text-decoration: underline; }
.baseboard__grid { display: grid; gap: 2.1rem; }
@media (min-width: 760px) { .baseboard__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .baseboard__grid { grid-template-columns: 1.7fr .75fr .75fr 1.4fr; } }

.logo--foot .logo__name { color: #fff; }
.logo--foot .logo__sub { color: rgb(255 255 255 / 58%); display: block; }

.baseboard__secure { margin: 1.2rem 0; font-size: .83rem; color: rgb(255 255 255 / 66%); }
.cards__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .11em; color: rgb(255 255 255 / 48%); margin-bottom: .5rem; }
.cards { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.cards img { display: block; border-radius: 2px; box-shadow: 0 0 0 1px rgb(255 255 255 / 12%); }

.baseboard__col h2 { font-size: .76rem; text-transform: uppercase; letter-spacing: .13em; color: #fff; margin-bottom: .85rem; padding-bottom: .5rem; border-bottom: 1px solid rgb(255 255 255 / 16%); }
.baseboard__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .46rem; }
.baseboard__contact p { font-size: .85rem; }
.baseboard__notice { font-size: .77rem; color: rgb(255 255 255 / 58%); line-height: 1.6; }
.baseboard__notice a { text-decoration: underline; }

.baseboard__base { margin: 2.2rem 0 0; padding-top: 1.3rem; border-top: 1px solid rgb(255 255 255 / 14%); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.baseboard__base small { font-size: .74rem; color: rgb(255 255 255 / 48%); }

/* --- print --------------------------------------------------------------- */

@media print {
  .strip, .banner, .baseboard, .doc__foot, .box--cta, .skiplink { display: none !important; }
  body { color: #000; font-size: 11pt; }
  .prose a::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
}
