/*
Theme Name: Visio Wealth
Theme URI: https://visiowealth.in
Description: Purpose-built wealth management theme. No forced content widths. Full-site editing with glass header, responsive footer, and native block patterns.
Version: 4.9.9
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: visio-wealth
*/

/* ══════════════════════════════════════════════════
   SELF-HOSTED FONTS — Ember & Ivory (C2)
   Variable fonts (woff2). format('woff2') used for maximum
   browser compatibility (woff2-variations is not universally
   recognized as a valid format string by all UAs/tools; woff2
   support itself is universal and browsers still parse the
   variable weight/opsz axes fine via the fvar table regardless
   of the format hint used).
══════════════════════════════════════════════════ */
@font-face {
  font-family: 'EB Garamond';
  src: url('assets/fonts/EBGaramond-Variable.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'EB Garamond';
  src: url('assets/fonts/EBGaramond-Italic-Variable.woff2') format('woff2');
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Italic-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('assets/fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('assets/fonts/GeistMono-Italic-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ══════════════════════════════════════════════════
   --vw-* CANONICAL TOKENS — Ember & Ivory (C2)
   Light = default (:root). Dark = :root[data-theme="dark"] override.
   Shared names across WP theme + engines per brand-system plan Part B/C.
══════════════════════════════════════════════════ */
:root {
  /* ember accent (light mode default) */
  --vw-ember: #C96442;
  --vw-ember-lt: #D97757;
  --vw-ember-deep: #A84B2F;
  --vw-ember-on: #FFFFFF;

  /* gold — retained brand signature, mode-agnostic base stops */
  --vw-gold-dk: #8B7020;
  --vw-gold: #B8952A;
  --vw-gold-lt: #d4aa44;

  /* surfaces — light (ivory / cream heritage) */
  --vw-bg: #F5F0E1;
  --vw-surface: #FBF8EF;
  --vw-card: #FFFFFF;
  --vw-tint: #EFE7D2;
  --vw-text: #211D16;
  --vw-muted: #7A7264;
  --vw-muted-2: #9A9282;
  --vw-border: rgba(33,29,22,0.12);
  --vw-border-soft: rgba(33,29,22,0.06);

  /* footer top hairline — brighter/wider than default gold-on-border use */
  --vw-footer-hairline: rgba(184,149,42,0.5);
  /* footer bg — opposite direction from the header: header floats
     lighter than the page, footer sinks darker. See brand guidelines
     Section 08 (Full Palette Reference, Tint row). */
  --vw-footer-bg: var(--vw-tint);

  /* cascade depth (universal pattern — light: layers lighter, "paper") */
  --vw-cascade-l0: #F3EBD8;
  --vw-cascade-l1: #FAF6EA;
  --vw-cascade-l2: #FFFDF7;

  /* semantic */
  --vw-gain: #2E8B5F;
  --vw-loss: #C23B3B;

  /* glass — main bar keys off --vw-card (brightest light-mode surface) so
     it floats clearly lighter than the page; footer sinks the opposite
     direction onto --vw-tint (see --vw-footer-bg above). Utility bar is
     already --vw-tint-based here, i.e. already equal to --vw-footer-bg —
     the two deliberately bookend the header/page as a matched top/bottom
     pair (translucent glass here, flat/opaque there). */
  --vw-glass-util: rgba(239,231,210,0.75);
  --vw-glass-main: rgba(255,255,255,0.75);

  color-scheme: light;
}

:root[data-theme="dark"] {
  /* ember accent (dark mode swaps to lighter/hover stop for contrast) */
  --vw-ember: #D97757;
  --vw-ember-lt: #E08A6C;
  --vw-ember-deep: #C96442;
  --vw-ember-on: #1F1E1D;

  /* surfaces — dark (Claude warm charcoal — zero blue, zero brown) */
  --vw-bg: #262624;
  --vw-surface: #1F1E1D;
  --vw-card: #30302E;
  --vw-tint: #3A3835;
  --vw-text: #F5F1E8;
  --vw-muted: #A8A296;
  --vw-muted-2: #8A8478;
  --vw-border: rgba(245,241,232,0.10);
  --vw-border-soft: rgba(245,241,232,0.06);

  /* footer top hairline — dark mode swaps to the lighter gold stop
     (matches gold-lt usage everywhere else on dark surfaces) */
  --vw-footer-hairline: rgba(212,170,68,0.55);
  /* footer bg — deliberately deepened Cascade L2 base, flat/opaque.
     The old L2 base (31,30,29) is --vw-surface, only Δ7 from --vw-bg —
     too weak once reused as a full-bleed footer. Reusing/deepening L2
     instead of adding a 5th dark surface token: see Section 08. */
  --vw-footer-bg: #171614;

  /* cascade depth (dark: recedes darker as you drill) */
  --vw-cascade-l0: #33312E;
  --vw-cascade-l1: rgba(58,56,53,0.55);
  --vw-cascade-l2: rgba(23,22,20,0.65);

  /* semantic */
  --vw-gain: #5ABF8A;
  --vw-loss: #E07070;

  /* glass — main bar keys off --vw-tint (lightest dark-mode tone) so it
     floats lighter than the page; footer sinks the opposite direction
     onto --vw-footer-bg (deepened Cascade L2), flat/opaque. Utility bar
     is keyed to the same --vw-footer-bg base as the footer (translucent
     here vs flat there) — the two deliberately bookend the header/page
     as a matched top/bottom pair. */
  --vw-glass-util: rgba(23,22,20,0.75);
  --vw-glass-main: rgba(58,56,53,0.75);

  color-scheme: dark;
}

/* ══════════════════════════════════════════════════
   GLOBAL RESET
══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
/* theme.json's styles.color.background is a static hex baked into WP's
   global-styles output (:where() specificity, so this plain rule already
   wins) — without this, the page background never reacted to the
   data-theme toggle, only header/footer chrome did. */
body { background-color: var(--vw-bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* NOTE: do NOT set overflow-x:hidden on body — it kills backdrop-filter on sticky elements */
img { max-width: 100%; height: auto; }
p { text-wrap: pretty; }

/* ══════════════════════════════════════════════════
   WP PRESET COLOR CLASSES — reference only
   (auto-generated by theme.json)
══════════════════════════════════════════════════ */
.has-vw-cream-color      { color: var(--vw-text) !important; }
.has-vw-ink-color        { color: var(--vw-text) !important; }
.has-vw-charcoal-color   { color: var(--vw-text) !important; }
.has-vw-gold-color       { color: var(--vw-gold) !important; }
.has-vw-muted-color      { color: var(--vw-muted) !important; }
.has-vw-muted-2-color    { color: var(--vw-muted-2) !important; }
.has-vw-cream-tx-color   { color: var(--vw-text) !important; }
.has-vw-header-bar-background-color { background-color: var(--vw-surface) !important; }

/* ── Preset classes re-pointed at the LIVE --vw-* tokens ──────────────
   theme.json can only carry ONE static hex per slug, so WP's generated
   .has-{slug}-* rules would freeze these at their light-mode values.
   Re-pointing each class at the --vw-* custom property instead means
   :root[data-theme="dark"] (top of this file) keeps driving both modes,
   exactly as the old inline style="color:var(--vw-ember)" did.

   The `:root ` prefix is deliberate and load-bearing: WP prints its own
   `.has-vw-ember-background-color{...!important}` from theme.json, which
   is the same specificity as a bare class here — whichever stylesheet
   happens to be enqueued last would win, which is not something to leave
   to chance. `:root .x` (0,2,0) beats `.x` (0,1,0) unconditionally. */
:root .has-vw-ember-color            { color: var(--vw-ember) !important; }
:root .has-vw-ember-on-color         { color: var(--vw-ember-on) !important; }
:root .has-vw-text-color             { color: var(--vw-text) !important; }
:root .has-vw-gold-lt-color          { color: var(--vw-gold-lt) !important; }
:root .has-vw-gold-dk-color          { color: var(--vw-gold-dk) !important; }
:root .has-vw-ember-background-color    { background-color: var(--vw-ember) !important; }
:root .has-vw-ember-on-background-color { background-color: var(--vw-ember-on) !important; }
:root .has-vw-bg-background-color       { background-color: var(--vw-bg) !important; }
:root .has-vw-surface-background-color  { background-color: var(--vw-surface) !important; }

/* ══════════════════════════════════════════════════
   BLOCK-VALIDITY SUPPORT RULES
   Declarations that used to sit in inline style="" attributes inside
   parts/*.html and templates/*.html but have NO matching block
   attribute. WordPress's style engine only ever serialises what a block
   attribute describes, so any extra inline declaration guarantees the
   block fails validation ("Attempt Block Recovery") and loses its
   styling when recovered. Same rendered result, expressed where it can
   survive: as CSS keyed off the class the block already carries.
══════════════════════════════════════════════════ */
.vw-main         { min-height: 50vh; }
.vw-content-wrap { max-width: 100%; }

/* 404 / error template */
.vw-error-page {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.vw-error-lede { max-width: 44ch; }

/* single.html post meta row */
.entry-meta { display: flex; gap: 16px; flex-wrap: wrap; }

/* Button typography — core/button serialises typography onto the OUTER
   .wp-block-button wrapper, not the inner <a>, so hand-writing it on the
   <a> could never round-trip. Driven from the block's own className
   instead; the mobile overrides further down (which are !important)
   still win exactly as before. */
.vw-login-btn .wp-block-button__link { font-size: 13px; font-weight: 600; }
.vw-cta-btn   .wp-block-button__link { font-size: 14px; font-weight: 600; }

/* ══════════════════════════════════════════════════
   STICKY HEADER + GLASS EFFECT
   backdrop-filter needs:
   1. No overflow:hidden on ANY ancestor (use clip instead)
   2. Semi-transparent background (opacity < 1)
   3. No transform or will-change on the sticky element
══════════════════════════════════════════════════ */

/* Force clip (not hidden) on all likely WP.com wrappers.
   overflow:hidden on any ancestor silently kills backdrop-filter. */
html,
body,
.wp-site-blocks,
#page,
#content,
.site,
.site-content,
#wpcontent { overflow-x: clip !important; overflow-y: visible !important; }

/* <html> has no background of its own by default, so on short pages
   (login/admin-login, where <body> ends right after the footer) the
   browser's plain white canvas shows through below it as a visible
   mismatched bar. Body's background is *supposed* to auto-propagate
   to fill the canvas even past short content, but that propagation
   isn't reliable once an ancestor has overflow:clip (set above, for
   the sticky header's backdrop-filter) — so it's set explicitly here
   instead of relying on propagation. Theme-aware via the same --vw-bg
   token body already uses, so light/dark stay in sync automatically. */
html { background-color: var(--vw-bg); }

header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 1000;
  /* NO transform, NO will-change — both kill backdrop-filter */
}

/* ── Glass: utility bars ─────────────────────────────────────────────
   Opacity guide: 0.65 = very glassy · 0.82 = balanced · 0.95 = solid
   Edit the LAST number in rgba() to change opacity. */
.vw-util-desktop,
.vw-util-mobile {
  background-color: var(--vw-glass-util) !important;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

/* ══════════════════════════════════════════════════
   THEME-AWARE LOGO
   Both colourways sit in the DOM at all times (header.html/footer.html);
   this just toggles which one is visible off the same :root[data-theme]
   attribute the rest of the theme keys off. Avoids a load-in flash from
   JS-driven swapping and needs no extra script.
══════════════════════════════════════════════════ */
.vw-logo-img[data-logo="dark"] { display: none; }
:root[data-theme="dark"] .vw-logo-img[data-logo="light"] { display: none; }
:root[data-theme="dark"] .vw-logo-img[data-logo="dark"] { display: block; }

.vw-logo-swap { display: inline-flex; align-items: center; }
.vw-logo-swap .vw-logo-img { width: 72px; height: auto; }

/* Mobile wordmark ("Visio Wealth" below the icon, <1024px only) — real
   text, not baked into the logo image, so it's crisp at any size. Hidden
   on desktop, where .vw-header-name (site-title + tagline) does this job
   instead. Font matches the theme's serif face explicitly rather than
   relying on inheritance, since this is a plain HTML block outside any
   heading context. Gold V/W follows the same dark-surface contrast rule
   as the logo's own monogram: --vw-gold-lt on dark, --vw-gold on light
   (guidelines: never plain --vw-gold on a dark/charcoal surface). */
.vw-mobile-wordmark {
  display: none;
  margin: 0;
  line-height: 1;
  font-family: 'EB Garamond', 'Times New Roman', Times, serif;
  color: var(--vw-text);
}
.vw-wm-gold { color: var(--vw-gold); }
:root[data-theme="dark"] .vw-wm-gold { color: var(--vw-gold-lt); }

.vw-footer-logo { display: inline-flex; align-items: center; }
.vw-footer-logo .vw-logo-img { width: 48px; height: auto; }

/* ── Glass: main header bar ─────────────────────────────────────────
   Opacity guide: 0.65 = very glassy · 0.82 = balanced · 0.95 = solid
   Edit the LAST number in the --vw-glass-main/--vw-glass-util tokens (:root, top of file) to change opacity. */
.vw-main-bar {
  background-color: var(--vw-glass-main) !important;
  backdrop-filter: blur(24px) saturate(180%) brightness(1.04);
  -webkit-backdrop-filter: blur(24px) saturate(180%) brightness(1.04);
  box-shadow: 0 1px 0 rgba(184,149,42,0.12);
  transition: box-shadow 0.25s ease;
}
.vw-main-bar.is-scrolled {
  box-shadow: 0 4px 28px rgba(0,0,0,0.13), 0 1px 0 rgba(184,149,42,0.18);
}

/* ══════════════════════════════════════════════════
   UTILITY BAR — SHOW/HIDE BY BREAKPOINT
══════════════════════════════════════════════════ */
@media (min-width: 1024px) { .vw-util-mobile { display: none !important; } }
@media (max-width: 1023px) { .vw-util-desktop { display: none !important; } }

/* Mobile utility bar — static single line, styled via wp:group block */

/* ══════════════════════════════════════════════════
   UTILITY BAR — TEXT + COLOUR
══════════════════════════════════════════════════ */
.vw-util-desktop p,
.vw-util-mobile p {
  color: var(--vw-muted) !important;
  margin: 0 !important;
}
.vw-util-desktop p a,
.vw-util-mobile p a {
  color: var(--vw-muted) !important;
  text-decoration: none !important;
}
.vw-util-desktop p a:hover,
.vw-util-mobile p a:hover { color: var(--vw-ember) !important; }


/* ══════════════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════════════ */
.vw-main-bar .wp-block-navigation a {
  color: var(--vw-text) !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  letter-spacing: 0.01em;
  transition: color 0.18s;
}
.vw-main-bar .wp-block-navigation a:hover { color: var(--vw-ember) !important; }
/* Ensure nav items have spacing */
.vw-main-bar .wp-block-navigation .wp-block-navigation__container {
  gap: 28px !important;
  flex-wrap: nowrap !important;
}

@media (max-width: 1023px) {
  /* Main bar: tighter padding */
  .vw-main-bar { padding: 10px 14px !important; gap: 0 !important; }

  /* Left group: icon on top, live "Visio Wealth" wordmark stacked below
     (mobile only) — see note [A] in header.html. Column instead of row
     so the wordmark has its own line rather than competing with the
     toggle/hamburger for horizontal space, which is what caused the
     collision with a side-by-side layout on some phones. */
  .vw-main-bar > .wp-block-group:first-child {
    flex-direction: column !important;
    /* center, not flex-start: the icon (40px) is narrower than the
       wordmark text, so left-aligning them left the icon looking
       off-center above it. Centering via flexbox (not a fixed px
       offset) means it stays centered regardless of viewport width or
       how long the rendered text ends up being. */
    align-items: center !important;
    gap: 0 !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
    overflow: hidden;
  }

  /* Logo: fixed size, never squish */
  .vw-main-bar .vw-logo-swap { flex-shrink: 0 !important; min-width: 40px !important; }
  .vw-main-bar .vw-logo-swap .vw-logo-img { width: 40px !important; height: 40px !important; min-width: 40px !important; object-fit: contain !important; }

  /* Name + tagline (desktop's site-title/tagline group): hidden below
     1024px, replaced by .vw-mobile-wordmark below. */
  .vw-header-name { display: none !important; }
  .vw-mobile-wordmark { display: block !important; font-size: 15px !important; }

  /* Right group (nav + button): don't shrink, keep together */
  .vw-main-bar > .wp-block-group:last-child {
    flex-shrink: 0 !important;
    gap: 6px !important;
    align-items: center !important;
  }

  /* Login button + hamburger: small compact pill and toggle, in that
     order, before the (hidden-until-opened) nav */
  .vw-main-bar .wp-block-button { order: 1; }
  .vw-nav-toggle { order: 2; }
  .vw-main-bar .wp-block-navigation { order: 3; }
  .vw-main-bar .wp-block-button a {
    font-size: 10px !important;
    padding: 6px 10px !important;
    white-space: nowrap !important;
    line-height: 1.3 !important;
    border-radius: 6px !important;
    letter-spacing: 0 !important;
  }

  /* Theme toggle pill: scaled down by the same ratio the login button
     above just was (10px / 13px font-size ≈ 0.77×, applied uniformly to
     the pill's own desktop values in parts/header.html — padding:3px,
     font-size:13px, opt padding:6px 10px) — so the two controls stay
     proportionate to each other on mobile instead of the toggle staying
     full desktop size next to a shrunk button. */
  .vw-theme-pill {
    padding: 2px !important;
    font-size: 10px !important;
  }
  .vw-theme-opt {
    padding: 5px 8px !important;
  }

  /* Nav links: hidden by default below 1024px — only shown as the
     fullscreen overlay once .vw-nav-open is toggled by the hamburger.
     No WP wrapper divs involved (overlayMenu:"never"), so this targets
     the plain link list directly. */
  .vw-main-bar .wp-block-navigation__container { display: none; }
}

/* Custom hamburger toggle — visibility gated purely by these two media
   queries, nothing WP-provided decides when it shows. */
.vw-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.vw-nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--vw-text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.vw-nav-toggle:focus-visible { outline: 2px solid var(--vw-ember); outline-offset: 2px; }
@media (max-width: 1023px) { .vw-nav-toggle { display: flex; } }
@media (min-width: 1024px) { .vw-nav-toggle { display: none !important; } }

/* Nav dropdown — small anchored panel below the hamburger, NOT a
   fullscreen takeover (the earlier fullscreen version trapped users
   with no visible way to tap out). Styling lifted from the investor
   portal's own .vw-ddown-menu pattern (card bg, thin border, soft
   shadow, rounded corners) for a consistent, elegant feel. Triggered
   by html.vw-nav-open (set in functions.php); scoped to <1024px so it
   can't apply at desktop widths where the plain inline
   .wp-block-navigation__container rule (above, unconditional) already
   governs the layout. */
@media (max-width: 1023px) {
  .vw-main-bar { position: relative; }

  html.vw-nav-open .vw-main-bar .wp-block-navigation__container {
    display: flex !important;
    flex-direction: column !important;
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 14px !important;
    left: auto !important;
    width: max-content !important;
    min-width: 180px !important;
    max-width: min(260px, calc(100vw - 28px)) !important;
    max-height: min(70vh, 420px) !important;
    overflow-y: auto !important;
    gap: 2px !important;
    padding: 8px !important;
    margin: 0 !important;
    list-style: none !important;
    background: var(--vw-card) !important;
    border: 1px solid var(--vw-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.28) !important;
    z-index: 9999 !important;
    animation: vwNavDropIn 0.16s ease;
  }
  html.vw-nav-open .vw-main-bar .wp-block-navigation-item { width: 100% !important; }
  html.vw-nav-open .vw-main-bar .wp-block-navigation-item__content {
    display: block !important;
    color: var(--vw-text) !important;
    font-size: 14.5px !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em !important;
    padding: 10px 14px !important;
    border-radius: 7px !important;
    text-decoration: none !important;
    transition: background 0.15s, color 0.15s !important;
  }
  @media (hover: hover) and (pointer: fine) {
    html.vw-nav-open .vw-main-bar .wp-block-navigation-item__content:hover {
      background: color-mix(in srgb, var(--vw-ember) 10%, transparent) !important;
      color: var(--vw-ember) !important;
    }
  }
  @keyframes vwNavDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @media (prefers-reduced-motion: reduce) {
    html.vw-nav-open .vw-main-bar .wp-block-navigation__container { animation: none; }
  }

  /* Hamburger -> X while open */
  html.vw-nav-open .vw-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  html.vw-nav-open .vw-nav-toggle span:nth-child(2) { opacity: 0; }
  html.vw-nav-open .vw-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ══════════════════════════════════════════════════
   FOOTER — BACKGROUND LOCK
   theme.json global cream bleeds in; override here.
   Uses --vw-footer-bg (light: --vw-tint, dark: deepened Cascade L2
   #171614) — opposite direction from the header, which floats lighter
   than the page on --vw-card (light) / --vw-tint (dark). This keeps
   header/page/footer three genuinely distinct surfaces in both themes.
   See brand guidelines Section 08, Full Palette Reference.
══════════════════════════════════════════════════ */
footer.wp-block-template-part,
footer.wp-block-template-part > .wp-block-group,
footer.wp-block-template-part .alignfull {
  background-color: var(--vw-footer-bg) !important;
}
/* Individual sections that override charcoal intentionally keep their own bg */
footer.wp-block-template-part .vw-footer-cta {
  background-color: var(--vw-footer-bg) !important;
}
/* Top hairline — brighter + theme-aware (was a static light-mode-only gold,
   invisible on dark surfaces). Overrides the inline style baked into
   parts/footer.html. */
footer.wp-block-template-part > .wp-block-group {
  border-top: 2px solid var(--vw-footer-hairline) !important;
}

/* ══════════════════════════════════════════════════
   FOOTER — CTA STRIP
══════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  .vw-footer-cta {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 32px 24px !important;
    gap: 18px !important;
  }
  .vw-footer-cta h3 { font-size: 22px !important; }
}

/* ══════════════════════════════════════════════════
   FOOTER — COMBO ROW (identity+badges / links / partners+socials)
   Desktop: one row, three groups spread edge to edge.
══════════════════════════════════════════════════ */
.vw-footer-combo { gap: 24px !important; }

/* Identity: just the logo, AMFI/ARN pills beside it — no wordmark
   (matches the header's logo-only mobile treatment). */
.vw-footer-identity { gap: 12px !important; align-items: center !important; }
.vw-footer-identity .vw-footer-logo { flex-shrink: 0; }
.vw-footer-reg-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.vw-footer-badge {
  display: inline-block;
  background: var(--vw-border-soft);
  border: 1px solid var(--vw-border);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--vw-muted);
  font-family: 'Geist Mono', monospace;
}

/* Links: plain inline row, no arrows/list styling */
.vw-footer-links-inline {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px 22px !important;
}
.vw-footer-links-inline li { margin: 0 !important; }
.vw-footer-links-inline li a {
  color: var(--vw-muted-2) !important;
  font-size: 13.5px !important;
  text-decoration: none !important;
  transition: color 0.18s;
}
.vw-footer-links-inline li a:hover { color: var(--vw-ember) !important; }

/* Fund Partners button (opens modal) + social icons */
.vw-footer-actions { gap: 14px !important; }
.vw-fund-partners-btn .wp-block-button__link {
  background: transparent !important;
  border: 1px solid var(--vw-ember) !important;
  color: var(--vw-ember) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  padding: 8px 16px !important;
  border-radius: 999px !important;
  white-space: nowrap;
  transition: background 0.15s;
}
/* No separate dark-mode override needed here (unlike the old gold
   version) — --vw-ember already swaps its own value per theme via the
   :root[data-theme="dark"] block above, gold doesn't (it's the same hex
   in both modes by design), which is why gold needed a manual swap and
   ember doesn't. */
@media (hover: hover) and (pointer: fine) {
  .vw-fund-partners-btn .wp-block-button__link:hover { background: rgba(201,100,66,0.10) !important; }
}
.vw-fund-count { font-family: 'Geist Mono', monospace; color: var(--vw-muted); font-weight: 500; }

.vw-footer-social { gap: 10px !important; }
.vw-social-icon-btn .wp-block-button__link {
  width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 1px solid var(--vw-border) !important;
  background: transparent !important;
  color: var(--vw-muted) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}
.vw-social-icon-btn .wp-block-button__link svg {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0;
}
@media (hover: hover) and (pointer: fine) {
  .vw-social-icon-btn .wp-block-button__link:hover { border-color: var(--vw-ember) !important; color: var(--vw-ember) !important; }
}

/* Disclaimer: single centered line on desktop — the band is wide
   enough at >=1024px that it never needs to wrap. */
.vw-footer-disclaimer { text-align: center; }
.vw-footer-disclaimer p { white-space: nowrap; }

/* ══════════════════════════════════════════════════
   FOOTER — MOBILE (<1024px)
   Fully centered, owner's call — every row reads as its own
   centered unit rather than sharing a left rail. Identity block
   stays internally left-aligned (name/badges flush to the logo);
   it's the OUTER group that centers as a whole.
══════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  .vw-footer-combo {
    flex-direction: column !important;
    padding: 28px 24px !important;
    gap: 28px !important;
  }
  .vw-footer-links-inline,
  .vw-footer-actions { width: 100%; justify-content: center !important; }

  /* Identity is a horizontal row (logo, then pills beside it) —
     justify-content centers it as a unit. */
  .vw-footer-identity { width: 100%; justify-content: center !important; }

  .vw-footer-links-inline { text-align: center; }

  /* Disclaimer wraps on mobile — centering a short 2-line legal
     paragraph reads as a deliberate sign-off, not a directory row. */
  .vw-footer-disclaimer { padding: 16px 24px 26px !important; }
  .vw-footer-disclaimer p { white-space: normal; font-size: 11.5px; line-height: 1.6; }
}

/* ══════════════════════════════════════════════════
   FUND PARTNERS MODAL
   Custom HTML block (wp:html) — no native WP dialog block.
   Toggled via .vw-modal-backdrop.open, set by vwOpenFundModal /
   vwCloseFundModal in functions.php.
══════════════════════════════════════════════════ */
.vw-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,13,10,0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100000;
}
.vw-modal-backdrop.open { display: flex; }
.vw-modal {
  background: var(--vw-card);
  border: 1px solid var(--vw-border);
  border-radius: 14px;
  width: min(680px, 100%);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.vw-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--vw-border-soft);
}
.vw-modal-head h3 { font-size: 19px; font-weight: 400; margin: 0; color: var(--vw-text); }
.vw-modal-sub { font-size: 12px; color: var(--vw-muted); margin-top: 3px; }
.vw-modal-close {
  appearance: none;
  border: 1px solid var(--vw-border);
  background: transparent;
  color: var(--vw-muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}
.vw-modal-close:hover { color: var(--vw-text); border-color: var(--vw-ember); }
.vw-modal-close:focus-visible { outline: 2px solid var(--vw-ember); outline-offset: 2px; }
.vw-modal-body {
  overflow-y: auto;
  padding: 8px 24px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
}
@media (max-width: 560px) { .vw-modal-body { grid-template-columns: 1fr; } }
.vw-amc-row { padding: 14px 0; border-bottom: 1px solid var(--vw-border-soft); }
.vw-amc-row .vw-amc-name { font-size: 14px; font-weight: 600; color: var(--vw-text); }
.vw-amc-row .vw-amc-reg { font-size: 11.5px; color: var(--vw-muted); margin-top: 3px; }

/* ══════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
══════════════════════════════════════════════════ */
.reveal, .reveal-left, .reveal-right, .reveal-scale, .fade-in {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal        { transform: translateY(28px); }
.reveal-left   { transform: translateX(-28px); }
.reveal-right  { transform: translateX(28px); }
.reveal-scale  { transform: scale(0.95); }
.fade-in       { transform: none; }

.reveal.is-visible, .reveal-left.is-visible, .reveal-right.is-visible,
.reveal-scale.is-visible, .fade-in.is-visible { opacity: 1; transform: none; }

/* Stagger: children animate in sequence */
.stagger > * { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s ease; }
.stagger.is-visible > * { opacity: 1; transform: none; }
.stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.is-visible > *:nth-child(2) { transition-delay: 0.12s; }
.stagger.is-visible > *:nth-child(3) { transition-delay: 0.19s; }
.stagger.is-visible > *:nth-child(4) { transition-delay: 0.26s; }
.stagger.is-visible > *:nth-child(5) { transition-delay: 0.33s; }

/* Gold divider line animation */
.vw-divider { display: block; width: 0; height: 2px; background: var(--vw-gold); margin: 12px 0; transition: width 0.9s cubic-bezier(.4,0,.2,1); }
.vw-divider.is-visible { width: 60px; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale, .fade-in, .stagger { opacity: 1 !important; transform: none !important; }
  .stagger > * { opacity: 1 !important; transform: none !important; transition-delay: 0s !important; }
}

/* ══════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════ */
input, textarea, select, button { font-family: inherit; font-size: 100%; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--vw-ember); outline-offset: 2px; }
@media (max-width: 781px) { input, textarea, select { font-size: 16px; } }

/* ══════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════ */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--vw-border); }
th { font-weight: 600; }
@media (max-width: 600px) {
  table { overflow-x: auto; display: block; }
  th, td { padding: 10px 12px; font-size: 13px; white-space: nowrap; }
}

/* ══════════════════════════════════════════════════
   OVERFLOW PROTECTION
   Use clip on site-blocks wrapper only — never on body
   (overflow:hidden on body/html kills backdrop-filter on sticky)
══════════════════════════════════════════════════ */
.wp-site-blocks { overflow-x: clip; }
.wp-block-group.alignfull { max-width: 100%; }
@media (max-width: 781px) {
  .wp-site-blocks { overflow-x: clip; }
}
