/* ============================================================
   ARMANDO WEALTH — Theme override: #092933 + white + gold
   Load this AFTER styles.css and pages.css. It overrides the
   palette tokens and ADDS new components. It renames nothing.

   APPROVED BUILD (internal review):
   - Re-anchors dark color to #092933; white becomes primary bg
   - Gold kept as the single accent, contrast-tuned for AA
   - New: trust marquee, animated stat band, reading-progress bar,
     refined FAQ — each with a stated business purpose
   - Compliance text and lead-capture markup are NOT touched here
   ============================================================ */

/* ---------- 1. RE-ANCHOR THE PALETTE ----------
   Because the original system is driven entirely by :root tokens,
   redefining them here re-themes every existing component at once. */
:root {
  /* Brand — royal navy scale */
  --navy:        #1F3A68;   /* classic navy (section bands, header bar) */
  --navy-900:    #0D172B;   /* darkest — footer / final CTA */
  --navy-800:    #14213D;   /* deep royal navy — headings, raised surfaces */
  --navy-700:    #35558C;   /* hover / borders on dark */

  /* Backgrounds — white-led, warm-white + beige bands */
  --cream:       #FFFFFF;   /* main background (bg-cream) */
  --cream-deep:  #F5F1E8;   /* very light beige — premium bands (bg-cream-deep) */
  --card:        #FFFFFF;
  --paper:       #F8F8F6;   /* warm white — alternate sections (bg-paper) */

  /* Accent gold */
  --gold:        #B08D57;   /* champagne gold: large text + on dark */
  --gold-dark:   #8D6B38;   /* AA-safe gold for small text on white */
  --gold-soft:   #E8DCC2;   /* light champagne — on-dark soft gold */

  /* Ink / text */
  --ink:         #14213D;   /* deep navy headings */
  --body:        #4A5560;   /* slate gray body */
  --muted:       #7A848C;   /* muted gray secondary */
  --muted-light: #9AA2A9;

  /* Lines */
  --line:        #E6E8EB;
  --line-soft:   #F1F3F5;
  --line-dark:   rgba(176,141,87,0.16);

  /* Softer corners + warm-navy shadows */
  --radius:    8px;
  --shadow-sm: 0 1px 2px rgba(20,33,61,0.05), 0 4px 16px rgba(20,33,61,0.06);
  --shadow-md: 0 8px 30px rgba(20,33,61,0.10);
  --shadow-lg: 0 24px 70px rgba(13,23,43,0.24);
}

/* Header glass tint + thin gold rule underneath */
.site-header { background: rgba(255,255,255,0.88); border-bottom: 1px solid rgba(176,141,87,0.28); }

/* Premium navy gradient on dark sections */
.bg-navy   { background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy) 100%); }
.page-hero { background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy) 100%); }
.final-cta { background: linear-gradient(135deg, #0A1322 0%, var(--navy-800) 100%); }

/* Selection in brand gold */
::selection { background: var(--gold-soft); color: var(--navy-900); }

/* ---------- 2. FEATURE: TRUST MARQUEE ----------
   Purpose: quiet, continuous row of credentials / associations to
   establish authority without shouting. Pauses on hover; respects
   reduced-motion. Markup:
   <div class="marquee"><div class="marquee-track">
     <span class="marquee-item">RFP</span> ... (duplicate the set twice)
   </div></div> */
.marquee {
  background: var(--navy);
  border-block: 1px solid rgba(216,196,155,0.14);
  overflow: hidden;
  padding-block: 18px;
}
.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee-scroll 38s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gold-soft);
  white-space: nowrap;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.marquee-item::after {
  content: "";
  width: 5px; height: 5px;
  background: rgba(216,196,155,0.5);
  border-radius: 50%;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
}
.no-anim .marquee-track { animation: none; }

/* ---------- 3. FEATURE: ANIMATED STAT BAND ----------
   Purpose: reinforce track record. Works with the existing
   [data-count] counter in site.js. Markup:
   <section class="section bg-navy"><div class="wrap stat-band-pro">
     <div class="stat-pro"><span class="stat-pro-num" data-count="20" data-suffix="+">0</span>
       <span class="stat-pro-label">Years advising</span></div> ...
   </div></section> */
.stat-band-pro {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(216,196,155,0.16);
  border: 1px solid rgba(216,196,155,0.16);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-pro {
  background: var(--navy);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background .3s ease;
}
.stat-pro:hover { background: var(--navy-800); }
.stat-pro-num {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: 1;
  color: #fff;
  font-weight: 500;
}
.stat-pro-num .unit,
.stat-pro-num[data-suffix]::after { color: var(--gold); }
.stat-pro-label {
  font-size: 0.86rem;
  color: #9fb0b6;
  letter-spacing: 0.02em;
}
@media (max-width: 760px) {
  .stat-band-pro { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .stat-band-pro { grid-template-columns: 1fr; }
}

/* ---------- 4. FEATURE: READING-PROGRESS BAR ----------
   Purpose: aid long-form insight/article pages only. Add the element
   <div class="read-progress"><span></span></div> right after <body>,
   and include the small script (provided separately) ONLY on article
   pages. Harmless if the script is absent — it simply stays at 0. */
.read-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 200;
  pointer-events: none;
}
.read-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width .1s linear;
}

/* ---------- 5. FEATURE: REFINED FAQ POLISH ----------
   Extends the existing .faq component (already in pages.css) with a
   smoother open animation and a gold rail on the open item.
   No markup changes required. */
.faq details {
  transition: border-color .25s ease;
}
.faq details[open] {
  border-left: 2px solid var(--gold);
  padding-left: 20px;
  margin-left: -22px;
}
.faq details[open] summary { color: var(--gold-dark); }
.faq-a {
  animation: faq-open .35s cubic-bezier(.22,1,.36,1) both;
}
@keyframes faq-open {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .faq-a { animation: none; }
}

/* ---------- 6. SMALL POLISH: gold link contrast on white ----------
   Use the AA-safe gold for inline arrow links on light backgrounds. */
.bg-cream .link-arrow,
.bg-paper .link-arrow,
.bg-cream-deep .link-arrow { color: var(--gold-dark); }

/* ---------- 7. SMALL POLISH: button focus visibility ----------
   Accessibility: visible keyboard focus ring in brand gold. */
.btn:focus-visible,
.nav-links a:focus-visible,
.filter-pill:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- 8. HEADER SCROLL STATE (Task 2) ----------
   Flat white glass at the very top; gains a faint hairline separator
   once scrolled, for quiet separation from content. Toggled by site.js
   (.is-scrolled). 1px stays present but transparent → no layout shift. */
.site-header { border-bottom-color: transparent; }
.site-header.is-scrolled { border-bottom-color: var(--line); }

/* ---------- 9. COMPLETE THE FOCUS-RING COVERAGE ----------
   Extend the visible gold keyboard-focus ring to every remaining
   focusable control (links + FAQ summaries). Style only; no markup change. */
.link-arrow:focus-visible,
.persona-link:focus-visible,
.nav-tel:focus-visible,
.brand:focus-visible,
.mobile-menu a:focus-visible,
.contact-line a:focus-visible,
.post-body h3 a:focus-visible,
.faq summary:focus-visible,
.breadcrumb a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
/* On the navy footer / dark bands, use the softer gold so the ring stays visible. */
.site-footer a:focus-visible,
.final-nap a:focus-visible,
.bg-navy .link-arrow:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 10. BRAND WORDMARK (vector recreation of the supplied logo) ----------
   Crisp, scalable, themeable rebuild of the ARMANDO wordmark: serif caps over a
   letterspaced subtitle flanked by gold rules. Sharp at any size; recolours to
   white on the navy footer. Replaces the small raster so both lines stay legible. */
.brand { gap: 6px; }
.brand-name {
  font-family: var(--serif); font-weight: 600;
  font-size: 1.78rem; line-height: 1; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--ink); text-align: center;
  padding-left: 0.28em; /* optical balance for the trailing letter-spacing */
}
.brand-sub { display: flex; align-items: center; gap: 10px; }
.brand-sub::before, .brand-sub::after { content: ""; flex: 1 1 0; max-width: 50px; height: 2px; background: var(--gold); }
.brand-sub span {
  font-family: var(--sans); font-size: 0.46rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap;
}
/* Footer / dark surfaces */
.site-footer .brand-name { color: #fff; }
.site-footer .brand-sub span { color: #9aa6b6; }
.site-footer .brand-sub::before, .site-footer .brand-sub::after { background: var(--gold-soft); }
@media (max-width: 560px) { .brand-name { font-size: 1.5rem; } }

/* Footer logo — use the real Armando wordmark (cream, for navy surfaces). */
.footer-logo { width: 244px; height: auto; display: block; }
@media (max-width: 560px) { .footer-logo { width: 210px; } }

/* Footer partner logo (Investia) — sits beside/below the Armando wordmark.
   The supplied artwork is full-colour on white, so it rides on a small white
   plate to stay legible against the navy footer. */
.footer-logos { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 24px; }
.footer-partner-logo { width: 244px; height: auto; display: block; background: #fff; border-radius: 6px; padding: 12px 16px; box-sizing: border-box; }
@media (max-width: 560px) { .footer-partner-logo { width: 210px; } }

/* ============ ARTICLE / LONG-FORM EDITORIAL ============ */
.article-meta { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.article-meta .portrait { flex: 0 0 auto; }
.article-meta cite { font-style: normal; font-weight: 600; color: #fff; display: block; font-size: 0.98rem; }
.article-meta .meta-sub { font-size: 0.82rem; color: #9aa6b6; letter-spacing: 0.01em; }
.article-meta .meta-sub .dot { margin: 0 7px; color: #56616f; }

.article-body { max-width: 44rem; margin: 0 auto; }
.article-lede { font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.55rem); line-height: 1.5; color: var(--ink); margin: 0 0 1.4em; text-wrap: pretty; }
.prose h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.4rem, 2.6vw, 1.85rem); line-height: 1.25; color: var(--ink); letter-spacing: -0.01em; margin: 1.9em 0 0.55em; text-wrap: balance; }
.prose h2:first-child { margin-top: 0; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.article-note { font-size: 0.92rem; line-height: 1.6; color: var(--muted); font-style: italic; border-left: 2px solid var(--gold); padding: 4px 0 4px 20px; margin: 0 0 2.4em; }

.article-disclosure { max-width: 44rem; margin: 3.2em auto 0; padding-top: 2.2em; border-top: 1px solid var(--line); }
.article-disclosure h3 { font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-dark); font-weight: 600; margin: 0 0 1em; }
.article-disclosure p { font-size: 0.85rem; line-height: 1.65; color: var(--muted); margin-bottom: 1em; }
.article-disclosure .disclosure-note { color: var(--muted-light); }

.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.related-card { display: block; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 26px 24px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.related-card:hover { border-color: var(--gold-soft); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.related-card .post-cat { display: block; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dark); font-weight: 600; margin-bottom: 12px; }
.related-card h4 { font-size: 1.08rem; line-height: 1.3; color: var(--ink); margin: 0; }
@media (max-width: 820px) { .related-grid { grid-template-columns: 1fr; } }

/* ============ MOBILE REFINEMENTS ============ */
/* Pillar grid: add a 2-column step before collapsing to one (mid-size phones/tablets). */
@media (max-width: 820px) and (min-width: 561px) {
  .pillar-grid--six { grid-template-columns: 1fr 1fr; }
}
/* Touch targets: enlarge scheduler controls so they're comfortably tappable on phones. */
@media (max-width: 600px) {
  .sched-arrows span { width: 44px; height: 44px; line-height: 42px; margin-left: 8px; }
  .sched-days { gap: 6px; }
  .sched-day, .sched-pad { min-height: 44px; font-size: 0.95rem; }
}
/* Container padding: tighter gutters on the smallest phones for more reading width. */
@media (max-width: 480px) {
  .wrap, .wrap-narrow { padding-inline: 20px; }
}
/* Decorative oversized quote mark: keep it inside its container on small screens. */
@media (max-width: 560px) {
  .quote-mark { font-size: 3.4rem; height: 28px; }
  .big-quote { font-size: clamp(1.25rem, 5.4vw, 1.6rem); }
}
