/* =====================================================================
   Citizenship Partners Vanuatu
   Brand colours from the logo:
     navy  #082D4C  main colour: text, headings, header, footer
     gold  #E4AE5C  ACCENTS ONLY, and only on navy (7:1 contrast).
                    Gold on white is 2:1: unreadable as text, so never used.
     cream #F5F2EE  section backgrounds (navy on cream: 12.6:1)

   RIGHT-TO-LEFT: this file uses LOGICAL properties everywhere:
     margin-inline-start / padding-inline-end / border-inline-start / inset-inline-start
   "inline-start" = where the text starts: left in English, RIGHT in Arabic.
   So the same CSS lays out correctly in all five languages, and Arabic
   mirrors itself with no separate stylesheet.
   ===================================================================== */

:root {
    --navy: #082D4C;
    --navy-dark: #051E33;
    --gold: #E4AE5C;
    --gold-soft: #F3DDB5;
    --cream: #F5F2EE;
    --ink: #1B2430;
    --muted: #55606B;
    --rule: #DCD6CC;
    --white: #FFFFFF;

    --font-head: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* Chinese and Arabic: the Latin fonts have no characters for these scripts,
   so each language gets its own font, for headings too. */
.lang-zh { --font-head: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
.lang-ar { --font-head: "Noto Naskh Arabic", "Segoe UI", Tahoma, serif; --font-body: "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; }
.lang-ar body, body.lang-ar { line-height: 1.85; }   /* Arabic needs more line height */

body { font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--white); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; color: var(--navy); line-height: 1.2; }
.lang-zh h1, .lang-zh h2, .lang-zh h3, .lang-ar h1, .lang-ar h2, .lang-ar h3 { font-weight: 700; letter-spacing: 0; }

a { color: var(--navy); text-underline-offset: 0.18em; text-decoration-color: var(--gold); }
a:hover { color: var(--navy-dark); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; box-shadow: 0 0 0 5px var(--navy); }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 1100; padding: .5rem 1rem; background: var(--gold); color: var(--navy); font-weight: 700; }
.skip-link:focus { top: 1rem; }
main:focus { outline: none; }

/* ---------- Buttons ---------- */
.btn { border-radius: 2px; font-weight: 600; }
.btn-gold { background: var(--gold); color: var(--navy); border: 1px solid var(--gold); }
.btn-gold:hover, .btn-gold:focus { background: #EDC07A; color: var(--navy-dark); border-color: #EDC07A; }
.btn-navy { background: var(--navy); color: var(--white); border: 1px solid var(--navy); }
.btn-navy:hover, .btn-navy:focus { background: var(--navy-dark); color: var(--gold-soft); }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--rule); }
.site-header .navbar { padding-block: .6rem; }
.navbar-brand img { height: auto; width: 186px; }
.header-tools { display: flex; align-items: center; gap: .5rem; margin-inline-start: auto; }
@media (min-width: 992px) { .header-tools { order: 3; margin-inline-start: 1rem; } }
.btn-lang { border: 1px solid var(--rule); color: var(--navy); background: var(--white); padding: .35rem .7rem; font-size: .95rem; }
.btn-lang:hover { border-color: var(--navy); }
.lang-menu .dropdown-item.active { background: var(--navy); color: var(--gold); }
.navbar-toggler { border-color: var(--rule); color: var(--navy); font-size: 1.4rem; }
.site-header .nav-link { color: var(--navy); font-weight: 600; padding-inline: .8rem; border-bottom: 3px solid transparent; }
.site-header .nav-link:hover { color: var(--navy-dark); }
.site-header .nav-link.active { border-bottom-color: var(--gold); }
.nav-cta { margin-inline-start: .75rem; white-space: nowrap; }
@media (max-width: 991.98px) { .nav-cta { margin: .75rem 0; display: inline-block; } }

/* ---------- Hero ---------- */
.hero { background: var(--navy); color: var(--white); padding: 5rem 0 4.5rem; position: relative; overflow: hidden; }
/* A thin gold rule down the start edge: the one decorative touch. */
.hero::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 8px; background: var(--gold); }
.hero-inner { max-width: 46rem; }
.hero-kicker { color: var(--gold); font-weight: 600; letter-spacing: .02em; margin-bottom: .75rem; }
.hero-title { color: var(--white); font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 1.1rem; }
.hero-lead { color: #D9E2EA; font-size: 1.2rem; max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* ---------- Trust band ---------- */
.trust-band { background: var(--cream); border-bottom: 1px solid var(--rule); }
.trust-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; padding-block: 1.5rem; }
.trust-shield { width: 54px; height: auto; flex: none; }
.trust-title { font-size: 1.3rem; margin-bottom: .2rem; }
.trust-text { margin: 0; color: var(--muted); }
.trust-link { margin-inline-start: auto; font-weight: 600; }

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section-alt { background: var(--cream); }
.page-head { background: var(--cream); padding: 3rem 0 2.5rem; border-bottom: 1px solid var(--rule); }
.page-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: .5rem; }
.section-title { font-size: 1.8rem; margin-bottom: 1.2rem; }
.lead-text { font-size: 1.15rem; color: var(--muted); max-width: 44rem; }
.narrow { max-width: 50rem; }
.prose { max-width: 44rem; }
.prose ul { padding-inline-start: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.panel-cream { background: var(--cream); padding: 1.5rem 1.75rem; border-top: 4px solid var(--navy); }
.small-print { font-size: .92rem; color: var(--muted); max-width: 44rem; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0 0 1rem; }
.step { display: flex; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.step:last-child { border-bottom: 0; }
.step-no {
    flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%;
    background: var(--navy); color: var(--gold); font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.step-title { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; margin-bottom: .2rem; }
.step p { margin: 0; color: var(--muted); }

/* ---------- Fees ---------- */
.currency-switch { display: flex; gap: .35rem; margin-bottom: 1rem; }
.currency-switch a { padding: .35rem .9rem; border: 1px solid var(--navy); color: var(--navy); text-decoration: none; font-weight: 600; }
.currency-switch a.active { background: var(--navy); color: var(--gold); }
.fee-table { background: var(--white); max-width: 56rem; }
.fee-table thead th { background: var(--navy); color: var(--white); font-weight: 600; border: 0; }
/* Numbers line up at the END edge: right in English, left in Arabic. */
.fee-table .num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fee-table tbody th { font-weight: 600; }
.fee-table .kind-fee th, .fee-table .kind-extra th { font-weight: 400; }
.fee-note { display: block; font-size: .85rem; color: var(--muted); font-weight: 400; }
.verified-note { color: var(--navy); font-weight: 600; }
.staff-warning { background: #FFF4D6; border-inline-start: 5px solid var(--gold); padding: .6rem 1rem; font-weight: 600; }

/* ---------- Approved Agent ---------- */
.licence-list { list-style: none; padding: 0; }
.licence { border-inline-start: 5px solid var(--navy); padding: .75rem 1.25rem; margin-bottom: 1.25rem; background: var(--cream); }
.licence-title { font-family: var(--font-body); font-size: 1.1rem; font-weight: 700; }
.licence dl { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; margin-bottom: .5rem; }
.licence dt { color: var(--muted); font-weight: 400; }
.licence dd { margin: 0; }
.verify-box { background: var(--navy); color: var(--white); padding: 1.5rem 1.75rem; }
.verify-box h2 { color: var(--gold); }
.verify-box p { margin: 0; color: #D9E2EA; }

/* ---------- FAQ ---------- */
.faq-group { margin-bottom: 2.5rem; }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary { cursor: pointer; padding: 1rem 0; padding-inline-end: 2rem; font-weight: 600; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; inset-inline-end: .25rem; top: .8rem; font-size: 1.4rem; color: var(--navy); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-answer { padding-bottom: 1rem; }
.draft-tag { font-size: .75rem; background: #FFF4D6; color: var(--ink); padding: .1rem .45rem; margin-inline-start: .5rem; font-weight: 600; }

/* ---------- Contact ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: .6rem; margin-bottom: .6rem; align-items: baseline; }
.contact-panel .contact-list { font-size: 1.1rem; }

/* ---------- Preview bar (staff only) ---------- */
.preview-bar { background: #FFF4D6; border-bottom: 2px solid var(--gold); padding: .5rem 0; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #D9E2EA; padding: 3.5rem 0 1.5rem; border-top: 5px solid var(--gold); }
.site-footer a { color: var(--white); text-decoration-color: var(--gold); }
.site-footer a:hover { color: var(--gold); }
.footer-logo { width: 200px; height: auto; margin-bottom: 1rem; }
.footer-tagline { color: var(--gold-soft); }
.footer-title { color: var(--gold); font-size: 1.25rem; margin-bottom: 1rem; }
.footer-licences { list-style: none; padding: 0; }
.footer-licences li { margin-bottom: .8rem; display: flex; flex-direction: column; }
.footer-licences strong { color: var(--white); font-weight: 600; }
.footer-bottom { margin: 2.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.15); font-size: .85rem; }

/* ---------- 404 ---------- */
.notfound-code { font-family: var(--font-head); font-size: 5rem; font-weight: 700; color: var(--gold); line-height: 1; margin: 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Phase 2: enquiry form ---------- */
.enquiry-form .form-control, .enquiry-form .form-select { border-radius: 2px; border-color: #9AA3AC; }
.enquiry-form .form-check-input:checked { background-color: var(--navy); border-color: var(--navy); }
.form-error-summary { border-inline-start: 6px solid #B42318; background: #FDF1F0; padding: 1rem 1.25rem; margin-bottom: 1.5rem; font-weight: 600; }
.form-error-summary ul { margin: .5rem 0 0; font-weight: 400; }
.form-error-summary a { color: #B42318; }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ref-number { display: inline-block; font-size: 1.8rem; font-weight: 700; background: var(--navy); color: var(--gold); padding: .3rem 1rem; letter-spacing: .03em; }

/* ---------- Phase 3a: client portal ---------- */
.portal-narrow { max-width: 44rem; }
.portal-form { border-top: 4px solid var(--navy); }
.portal-bar { background: var(--navy-dark); color: #D9E2EA; padding: .45rem 0; }
.portal-bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.portal-bar form { margin: 0; }
.portal-msg { padding: .8rem 1.1rem; margin-bottom: 1.25rem; font-weight: 600; border-inline-start: 6px solid; }
.portal-msg-ok { background: #EAF6EE; border-color: #198754; }
.portal-msg-error { background: #FDF1F0; border-color: #B42318; }
.wizard-step { color: var(--muted); font-weight: 600; margin-bottom: .3rem; }
.person-card legend { float: none; width: auto; padding: 0 .4rem; margin-bottom: .75rem; }
.forms-list { list-style: none; padding: 0; }
.forms-list li { display: flex; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.form-badge { flex: none; width: 2.4rem; height: 2.4rem; display: inline-flex; align-items: center; justify-content: center;
              background: var(--navy); color: var(--gold); font-weight: 700; font-size: 1.1rem; }
.form-badge-sm { width: 1.6rem; height: 1.6rem; font-size: .85rem; margin-inline-start: .4rem; vertical-align: middle; }
.form-note { color: #8A5A00; font-size: .92rem; }
.portal-next { background: var(--cream); padding: .8rem 1rem; border-inline-start: 4px solid var(--gold); }
.doc-person { border: 1px solid var(--rule); margin-bottom: .75rem; padding: .75rem 1rem; background: #fff; }
.doc-person summary { cursor: pointer; font-weight: 600; }
.doc-stage { font-family: var(--font-body); font-size: 1rem; font-weight: 700; margin: 1rem 0 .4rem; color: var(--navy); }
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--rule); }
.doc-status { white-space: nowrap; font-size: .85rem; font-weight: 600; }
.doc-missing .doc-status { color: var(--muted); }
.doc-uploaded .doc-status { color: #0B5CAD; }
.doc-accepted .doc-status { color: #198754; }
.doc-rejected .doc-status { color: #B42318; }
.fee-line { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.fee-line span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fee-total { border-top: 2px solid var(--navy); padding-top: .5rem; font-weight: 700; }
.portal-link { margin-inline-end: .25rem; }

/* ---------- Phase 3b-1: nomination forms ---------- */
.nf-wrap { max-width: 52rem; }
.nf-parts { display: flex; gap: .25rem; flex-wrap: wrap; margin-top: .75rem; }
.nf-parts a { padding: .45rem .9rem; border: 1px solid var(--rule); background: #fff; color: var(--navy); text-decoration: none; font-weight: 600; }
.nf-parts a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.nf-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.nf-status { display: inline-block; font-size: .78rem; font-weight: 700; padding: .15rem .55rem; border-radius: 1rem; white-space: nowrap; }
.nf-status-new { background: #EEF0F3; color: #555; }
.nf-status-draft { background: #FFF4DB; color: #7A4B00; }
.nf-status-done { background: #E3F4E8; color: #146C43; }
.nf-section { margin-bottom: 1.5rem; }
.nf-section legend { float: none; width: auto; padding: 0 .4rem; }
.nf-item { display: flex; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.nf-item:last-child { border-bottom: 0; }
.nf-no { flex: none; min-width: 2.6rem; font-weight: 700; color: var(--navy); padding-top: .15rem; }
.nf-fields { flex: 1; min-width: 0; display: grid; gap: .8rem; }
.nf-readonly { padding: .35rem 0; display: flex; gap: .8rem; align-items: baseline; flex-wrap: wrap; }
.nf-optional { font-weight: 400; color: var(--muted); font-size: .88em; }
.nf-declaration { background: #fff; border: 1px solid var(--rule); padding: .8rem 1rem; }
.nf-explain { font-weight: 600; margin-bottom: .5rem; }
.nf-official { font-size: .88rem; color: #333; line-height: 1.5; margin-bottom: .6rem; text-align: left; }
.nf-warning { color: #7A4B00; font-size: .9rem; margin-top: .3rem; }
.nf-family th { font-size: .85rem; }
.nf-actions { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: flex-end; margin-top: 1rem; }
.nf-person-parts { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: .45rem; }
.nf-part-link { display: inline-flex; gap: .4rem; align-items: center; }
.nf-pdf { color: var(--navy); }

/* ---------- Phase 3b-2: documents ---------- */
.du-list { list-style: none; padding: 0; }
.du-item { background: #fff; border: 1px solid var(--rule); padding: .9rem 1rem; margin-bottom: .75rem; scroll-margin-top: 6rem; }
.du-item:target { outline: 3px solid var(--gold); }
.du-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.du-hint { font-size: .9rem; color: var(--muted); margin: .4rem 0; }
.du-file { margin: .5rem 0; word-break: break-word; }
.du-rejected { background: #FDF1F0; border-inline-start: 4px solid #B42318; padding: .55rem .8rem; margin: .5rem 0; }
.du-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; }
.du-upload { display: flex; gap: .5rem; flex-wrap: wrap; flex: 1; min-width: 16rem; }
.du-upload input { flex: 1; min-width: 12rem; }
.du-status-received { background: #E7F0FB; color: #0B5CAD; }
.du-status-rejected { background: #FDECEA; color: #B42318; }

/* ---------- Phase 3b-3: signing ---------- */
.sg-pad { display: block; width: 100%; height: 170px; background: #fff; border: 2px dashed #9AA5B1; border-radius: 4px;
          touch-action: none; cursor: crosshair; }
.sg-pad:focus-visible { outline: 3px solid var(--gold); }
.sg-witness { border-top: 1px solid var(--rule); padding-top: 1rem; }
.sg-witness legend { float: none; width: auto; }
.sg-note { background: #fff; border-inline-start: 4px solid var(--gold); padding: .5rem .8rem; }
.sg-steps { padding-inline-start: 1.2rem; }
.sg-steps li { margin-bottom: .6rem; }
.sg-locked, .sg-ready { padding: .8rem 1rem; margin-bottom: 1rem; border-inline-start: 5px solid; }
.sg-locked { background: #EEF2F6; border-color: var(--navy); }
.sg-ready { background: #FFF8EA; border-color: var(--gold); }
.sg-receipt h2 { color: var(--navy); }
.sg-sign-link { font-weight: 600; }
fieldset.nf-all { min-width: 0; }
fieldset.nf-all:disabled .nf-field { opacity: .85; }
