/* ==========================================================================
   FBC Trade Holdings — styles.css
   Pure vanilla CSS. System fonts only. Mobile-first.
   Palette: deep navy + charcoal + white + muted gold accent + soft grey.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --navy: #0d2742;
  --navy-dark: #081a2e;
  --navy-soft: #163a5f;
  --charcoal: #1f2933;
  --gold: #b8893b;
  --gold-dark: #98702c;
  --gold-soft: #f3e9d6;
  --grey-bg: #f4f6f9;
  --grey-line: #e3e8ee;
  --text: #20292f;
  --muted: #54616c;
  --white: #ffffff;

  --maxw: 1180px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(13, 39, 66, 0.08);
  --shadow-md: 0 6px 24px rgba(13, 39, 66, 0.10);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--navy-soft); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--gold-dark); }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 var(--space-2);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.8rem, 4.5vw, 2.85rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); }
p { margin: 0 0 var(--space-2); }

ul, ol { margin: 0 0 var(--space-2); padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -3rem;
  z-index: 1000;
  background: var(--gold);
  color: var(--navy-dark);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: var(--space-2); }

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

.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;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.section { padding-block: var(--space-5); }
.section--tight { padding-block: var(--space-4); }
.section--grey { background: var(--grey-bg); }
.section--navy { background: var(--navy); color: #dce6f0; }
.section--navy h2,
.section--navy h3 { color: var(--white); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: var(--space-1);
}
.section--navy .eyebrow { color: var(--gold); }

.section-intro { max-width: 60ch; color: var(--muted); font-size: 1.05rem; }
.section--navy .section-intro { color: #c2d2e2; }

.lead { font-size: 1.15rem; color: var(--muted); max-width: 65ch; }

/* ---------- Skip target ---------- */
#main { scroll-margin-top: 90px; }

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--grey-line);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 68px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.1;
}
.brand-mark {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.brand-sub {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 9px;
  background: transparent;
  border: 1px solid var(--grey-line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}
.site-nav a {
  display: block;
  padding: 0.55rem 0.7rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--navy); background: var(--grey-bg); }
.site-nav a[aria-current="page"] {
  color: var(--navy);
  border-bottom-color: var(--gold);
}

/* Mobile nav */
@media (max-width: 859px) {
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--grey-line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: var(--space-2); }
  .site-nav a { padding: 0.85rem 0.7rem; border-bottom: 1px solid var(--grey-line); border-radius: 0; }
  .site-nav li:last-child a { border-bottom: 0; }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--grey-line); border-left: 3px solid var(--gold); padding-left: 0.7rem; }
}
@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav { display: block !important; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: var(--navy-dark); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: var(--white); }
.btn-secondary { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.btn-secondary:hover { background: rgba(255,255,255,0.12); color: var(--white); border-color: var(--white); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-block { width: 100%; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-soft) 100%);
  color: #e7eef6;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(184,137,59,0.20), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(22,58,95,0.6), transparent 40%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-inner { padding-block: clamp(3rem, 8vw, 5.5rem); max-width: 760px; }
.hero h1 { color: var(--white); margin-bottom: var(--space-3); }
.hero p { font-size: 1.2rem; color: #cdd9e6; margin-bottom: var(--space-4); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: var(--space-4);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e7eef6;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }

/* Page hero (lighter, for interior pages) */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: #e7eef6;
}
.page-hero .container { padding-block: clamp(2.5rem, 6vw, 4rem); }
.page-hero h1 { color: var(--white); margin-bottom: var(--space-2); }
.page-hero p { font-size: 1.12rem; color: #cdd9e6; max-width: 62ch; margin: 0; }

/* ==========================================================================
   Cards & grids
   ========================================================================== */
.card-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}
@media (min-width: 620px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) {
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #cdd6e0; }
.feature-card h3 { margin-bottom: var(--space-1); }
.feature-card p:last-child { margin-bottom: 0; }

.card-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--gold-soft);
  color: var(--gold-dark);
  margin-bottom: var(--space-2);
}
.card-icon svg { width: 24px; height: 24px; }

.section--grey .feature-card { background: var(--white); }

/* Plain bordered list cards */
.info-card {
  background: var(--white);
  border: 1px solid var(--grey-line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
}
.info-card h3 { margin-bottom: var(--space-1); }
.info-card ul { margin-bottom: 0; }

/* Two-column content + sidebar layout */
.hero-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.4fr 1fr; } }

/* ==========================================================================
   Process steps
   ========================================================================== */
.process-steps {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
  counter-reset: step;
  list-style: none;
  padding: 0;
}
@media (min-width: 760px) { .process-steps { grid-template-columns: repeat(3, 1fr); } }
.process-step {
  background: var(--white);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius);
  padding: var(--space-3);
  position: relative;
  box-shadow: var(--shadow-sm);
}
.process-step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.process-step h3 { margin-bottom: var(--space-1); }
.process-step p:last-child { margin-bottom: 0; }

/* ==========================================================================
   CTA panel
   ========================================================================== */
.cta-panel {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
}
.cta-panel h2 { color: var(--white); }
.cta-panel p { color: #cdd9e6; max-width: 55ch; margin-inline: auto; margin-bottom: var(--space-3); }
.cta-panel .hero-cta { justify-content: center; }

/* ==========================================================================
   Check / bullet lists
   ========================================================================== */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.7rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 1.1rem;
  height: 1.1rem;
  background: var(--gold);
  border-radius: 50%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/0.8rem no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/0.8rem no-repeat;
}

/* ==========================================================================
   FAQ accordion (native details/summary)
   ========================================================================== */
.faq-list { display: grid; gap: var(--space-2); }
.faq-item {
  background: var(--white);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-2) var(--space-3);
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--gold-dark);
  line-height: 1;
  flex: none;
}
.faq-item[open] summary::after { content: "\2013"; }
.faq-item .faq-body { padding: 0 var(--space-3) var(--space-3); }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Contact + forms
   ========================================================================== */
.contact-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.3fr 1fr; } }

.form-card {
  background: var(--white);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: var(--shadow-sm);
}

.form-row { display: grid; gap: var(--space-2); grid-template-columns: 1fr; margin-bottom: var(--space-2); }
@media (min-width: 620px) { .form-row--2 { grid-template-columns: 1fr 1fr; } }

.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: var(--space-2); }
.field label { font-weight: 600; font-size: 0.92rem; color: var(--charcoal); }
.field .req { color: #b3261e; }
.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  padding: 0.7rem 0.8rem;
  border: 1px solid #c4ccd6;
  border-radius: var(--radius-sm);
  background: var(--white);
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--navy-soft);
  outline: 3px solid rgba(184,137,59,0.35);
  outline-offset: 0;
}
.field textarea { min-height: 130px; resize: vertical; }
.field .hint { font-size: 0.82rem; color: var(--muted); }
.field input:invalid:not(:placeholder-shown),
.field select:invalid:not(:focus) { border-color: #c4ccd6; } /* avoid premature red */

.consent-group { border: 0; padding: 0; margin: 0 0 var(--space-2); min-width: 0; }
.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: start;
  padding: 0.6rem 0;
  font-size: 0.92rem;
  color: var(--charcoal);
}
.consent input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  accent-color: var(--navy);
  flex: none;
}

.form-feedback {
  margin-top: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.form-feedback[hidden] { display: none; }
.form-feedback.is-error { background: #fdecea; border: 1px solid #f5c6cb; color: #842029; }
.form-feedback.is-success { background: #e7f4ec; border: 1px solid #b7dfc6; color: #14532d; }
.form-feedback a { color: inherit; font-weight: 600; }

/* Contact details aside */
.contact-aside {
  background: var(--grey-bg);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2rem);
}
.contact-aside dl { margin: 0; }
.contact-aside dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-top: var(--space-2);
}
.contact-aside dt:first-child { margin-top: 0; }
.contact-aside dd { margin: 0.15rem 0 0; color: var(--text); }
.contact-aside a { color: var(--navy-soft); }
.todo-token {
  display: inline-block;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.82rem;
  background: var(--gold-soft);
  color: var(--gold-dark);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumb { font-size: 0.85rem; color: var(--muted); padding-block: var(--space-2); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; }
.breadcrumb li::after { content: "›"; margin-left: 0.4rem; color: var(--muted); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--navy-soft); }

/* ==========================================================================
   Policy / legal pages
   ========================================================================== */
.policy-layout { max-width: 860px; }
.policy-meta {
  background: var(--grey-bg);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: 0.92rem;
  color: var(--muted);
}
.policy-meta p { margin-bottom: 0.3rem; }
.policy-meta p:last-child { margin-bottom: 0; }
.policy-meta .updated { font-weight: 700; color: var(--charcoal); }
.policy-layout h2 {
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  border-top: 1px solid var(--grey-line);
  font-size: 1.4rem;
}
.policy-layout h2:first-of-type { border-top: 0; padding-top: 0; }
.policy-layout h3 { margin-top: var(--space-3); font-size: 1.12rem; }
.policy-toc {
  background: var(--white);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
}
.policy-toc h2 { border: 0; padding: 0; margin: 0 0 var(--space-1); font-size: 1.1rem; }
.policy-toc ul { columns: 2; column-gap: var(--space-3); }
@media (max-width: 560px) { .policy-toc ul { columns: 1; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--navy-dark);
  color: #b9c6d4;
  padding-block: var(--space-5) var(--space-3);
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2 { color: var(--white); font-size: 1.05rem; margin-bottom: var(--space-2); }
.footer-brand .brand-mark { color: var(--white); font-size: 1.15rem; display: block; }
.footer-brand p { margin-bottom: 0.5rem; }
.site-footer a { color: #c9d6e3; text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: 0.5rem; }
.footer-contact-line { color: #d6e0ea; }
.footer-consent {
  font-size: 0.85rem;
  color: #8ea1b4;
  margin-top: var(--space-2);
}
.footer-token {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.8rem;
  color: var(--gold);
  word-break: break-word;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: space-between;
  font-size: 0.85rem;
  color: #8ea1b4;
}

/* ==========================================================================
   404
   ========================================================================== */
.error-page { text-align: center; padding-block: var(--space-6); }
.error-page .code { font-size: clamp(3rem, 12vw, 6rem); font-weight: 800; color: var(--gold); line-height: 1; }

/* ==========================================================================
   Utilities
   ========================================================================== */
.text-center { text-align: center; }
.fs-sm { font-size: 0.85rem; }
.mx-auto { margin-inline: auto; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-3 { margin-top: var(--space-3); }
.flow > * + * { margin-top: var(--space-2); }
.muted { color: var(--muted); }
.note {
  background: var(--gold-soft);
  border: 1px solid #e7d6b3;
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  color: #6b5320;
  font-size: 0.95rem;
}
.note p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .btn:hover, .feature-card:hover { transform: none; }
}
