/* ============================================================
   LAYER 4 — COMPONENTS
   Reusable: buttons, nav, footer, forms, accordion.
   ============================================================ */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--t);
  text-decoration: none;
  border: 1.5px solid transparent;
}
.btn-gold  { background: transparent; color: var(--gold);  border-color: var(--gold); }
.btn-gold:hover  { background: var(--gold); color: var(--navy); }

.btn-white { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn-white:hover { border-color: var(--white); }

.btn-navy  { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover  { background: var(--navy-mid); }

.btn-outline-navy { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }

/* ── Nav ── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
}
#navbar.dark { background: var(--navy); border-bottom-color: var(--border-dark); }

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px; max-width: 1400px; margin: 0 auto;
}

.nav-logo { display: flex; align-items: center; min-height: 44px; }

/* Two files, one per nav state — the reversed logo carries white
   text that would be invisible on the cream nav, and vice versa. */
/* No-claim variant in the header: at header size the "CLARITY
   ADVISORY" line renders about 4px tall and reads as a smudge.
   The full lockup with the claim is used in the footer instead. */
.nav-logo-img {
  display: block;
  height: 42px;
  width: auto;
}
.nav-logo-dark  { display: none; }
#navbar.dark .nav-logo-light { display: none; }
#navbar.dark .nav-logo-dark  { display: block; }

.nav-links { display: flex; align-items: center; gap: 40px; }
.nav-links a {
  font-family: var(--font-sans); font-size: 0.85rem; font-weight: 500;
  color: var(--navy); transition: color var(--t); letter-spacing: 0.01em;
}
#navbar.dark .nav-links a { color: rgba(255,255,255,0.88); }
.nav-links a:hover { color: var(--gold-text); }
#navbar.dark .nav-links a:hover { color: var(--gold-light); }

.nav-cta { margin-left: 16px; font-size: 0.68rem; letter-spacing: 0.14em; }

/* The CTA sits inside .nav-links, whose `a` rule would otherwise win on
   specificity and paint the label navy-on-navy. Label stays WHITE in every
   state: light nav, dark nav, and hover. */
#navbar .nav-links a.btn.nav-cta,
#navbar .nav-links a.btn.nav-cta:hover,
#navbar .nav-links a.btn.nav-cta:focus,
#navbar.dark .nav-links a.btn.nav-cta,
#navbar.dark .nav-links a.btn.nav-cta:hover,
#navbar.dark .nav-links a.btn.nav-cta:focus {
  color: #FFFFFF;
}

/* Light nav (over cream sections): navy fill */
#navbar .nav-links a.btn.nav-cta       { background: var(--navy);     border-color: var(--navy); }
#navbar .nav-links a.btn.nav-cta:hover { background: var(--navy-mid); border-color: var(--navy-mid); }

/* Dark nav (over hero): gold outline, gold fill on hover */
#navbar.dark .nav-links a.btn.nav-cta       { background: transparent; border-color: var(--gold); }
#navbar.dark .nav-links a.btn.nav-cta:hover { background: var(--gold); border-color: var(--gold); }

/* ── Hamburger / mobile menu ── */
/* 44x44 touch target; the bars stay 24px wide visually */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  align-items: flex-end; gap: 5px; cursor: pointer;
  width: 44px; height: 44px;
  background: none; border: none; padding: 0;
}
.hamburger span { display: block; width: 24px; height: 1.5px; background: var(--navy); transition: all var(--t); }
#navbar.dark .hamburger span { background: var(--white); }

.mobile-menu {
  display: none; position: fixed; inset: 0; background: var(--navy); z-index: 999;
  flex-direction: column; align-items: center; justify-content: center; gap: 40px;
}
.mobile-menu.open { display: flex; }

/* Sits clear of the fixed header, which still shows the horizontal logo */
.mobile-menu-logo {
  height: 68px; width: auto;
  margin: 0 0 20px;
}

/* The CTA must not inherit the 2rem serif sizing of the menu links */
.mobile-menu a.btn {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 15px 30px;
  margin-top: 8px;
}
.mobile-menu a.btn.btn-gold { color: var(--gold); border-color: var(--gold); }
.mobile-menu a.btn.btn-gold:hover { background: var(--gold); color: var(--navy); }
.mobile-menu a { font-family: var(--font-serif); font-size: 2rem; font-weight: 400; color: var(--white); transition: color var(--t); }
.mobile-menu a:hover { color: var(--gold); }
.mobile-close {
  position: absolute; top: 20px; right: 24px; font-size: 1.8rem;
  color: var(--white); cursor: pointer; background: none; border: none; line-height: 1;
}

/* ── FAQ accordion ── */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%; text-align: left; padding: 24px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-family: var(--font-serif); font-size: 1.35rem; font-weight: 400;
  color: var(--navy); background: none; border: none; cursor: pointer;
  transition: color var(--t);
}
.faq-question:hover { color: var(--gold); }
.faq-chevron {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; color: var(--navy);
  transition: transform var(--t), color var(--t);
}
.faq-question:hover .faq-chevron { color: var(--gold-text); }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  display: none; padding: 0 48px 28px 0;
  font-size: var(--fs-body); line-height: 1.8;
  color: var(--muted); font-family: var(--font-sans);
  max-width: 68ch;
}
.faq-item.open .faq-answer { display: block; }

/* ── Forms ── */
.field-label {
  display: block; font-family: var(--font-sans); font-size: 0.65rem; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(255,255,255,0.65); margin-bottom: 10px;
}
input[type="text"], input[type="email"], select, textarea {
  width: 100%; background: transparent; border: none;
  border-bottom: 1px solid rgba(255,255,255,0.2); padding: 10px 0;
  font-family: var(--font-serif); font-size: 1rem; color: var(--white);
  outline: none; transition: border-color var(--t); appearance: none;
}
input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.45); font-style: italic; }
input:focus, select:focus, textarea:focus { border-bottom-color: var(--gold); }
select option { background: var(--navy); color: var(--white); }
textarea { resize: vertical; min-height: 100px; }

.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }

.btn-form {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px;
  background: transparent; border: 1.5px solid rgba(255,255,255,0.4); color: var(--white);
  font-family: var(--font-sans); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; transition: all var(--t);
}
.btn-form:hover { border-color: var(--gold); color: var(--gold); }

/* ── Footer ── */
footer { background: var(--cream-deep); }
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 60px;
  padding: 72px 40px; max-width: var(--container-max); margin: 0 auto;
}
.footer-logo { height: 52px; width: auto; margin-bottom: 22px; }

.footer-brand p { font-size: var(--fs-sm); line-height: 1.75; color: var(--muted); max-width: 38ch; }
.footer-brand a { color: var(--gold-text); text-decoration: underline; text-underline-offset: 3px; }

.footer-col-label {
  font-family: var(--font-sans); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--navy);
  margin-bottom: 20px; display: block;
}
.footer-col p { font-size: var(--fs-sm); line-height: 1.8; color: var(--muted); }
.footer-col a { color: var(--muted); transition: color var(--t); }
.footer-col a:hover { color: var(--gold-text); }

.footer-bottom {
  border-top: 1px solid var(--border); padding: 20px 40px;
  max-width: var(--container-max); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: var(--fs-xs); color: var(--muted); }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { font-size: var(--fs-xs); color: var(--muted); transition: color var(--t); }
.footer-legal a:hover { color: var(--gold-text); }

/* ── Component responsive ── */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-inner { padding: 14px 24px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-logo-img { height: 25px; }
  .footer-logo  { height: 34px; }
  .form-row  { grid-template-columns: 1fr; }
  .footer-inner  { grid-template-columns: 1fr; gap: 36px; padding: 48px 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
