/*
Theme Name: INDEX Asset Investments
Theme URI: http://indexgroup.test.com
Description: Child theme of Kadence for INDEX Asset Investments. Brand colours, typography and layout derived directly from the official Company Profile.
Author: INDEX Asset Investments
Template: kadence
Version: 1.0.0
Text Domain: indexgroup-child
*/

/* ==========================================================================
   BRAND TOKENS - sourced from INDEX Asset Investments Company Profile PDF
   ========================================================================== */
:root {
  --idx-navy:        #0b1f3a;
  --idx-ink:         #172033;
  --idx-blue:        #1677ff;
  --idx-blue-dark:   #0f5fd6;
  --idx-grey:        #5e6b7a;
  --idx-soft:        #f5f7fa;
  --idx-border:      #d9dee7;
  --idx-white:       #ffffff;

  --idx-font: "Inter", "Helvetica Neue", Arial, sans-serif;

  --idx-maxw: 1200px;
  --idx-radius: 4px;
}

/* ==========================================================================
   BASE
   ========================================================================== */
body {
  font-family: var(--idx-font);
  color: var(--idx-ink);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--idx-font);
  color: var(--idx-ink);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

a { color: var(--idx-blue); text-decoration: none; }
a:hover { color: var(--idx-blue-dark); }

.idx-wrap {
  max-width: var(--idx-maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* section rhythm */
.idx-section { padding: 104px 0; }
.idx-section--tight { padding: 72px 0; }
.idx-section--soft { background: var(--idx-soft); }
.idx-section--navy { background: var(--idx-navy); color: rgba(255,255,255,.86); }
.idx-section--navy h2,
.idx-section--navy h3 { color: var(--idx-white); }

/* eyebrow label - mirrors the small blue headings in the PDF */
.idx-eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--idx-blue);
  margin-bottom: 16px;
}

.idx-h2 {
  font-size: clamp(30px, 4vw, 44px);
  margin: 0 0 22px;
}

.idx-lead {
  font-size: 18px;
  line-height: 1.8;
  color: var(--idx-grey);
  max-width: 780px;
}

.idx-section--navy .idx-lead { color: rgba(255,255,255,.75); }

.idx-rule {
  width: 56px;
  height: 3px;
  background: var(--idx-blue);
  border: 0;
  margin: 0 0 28px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.idx-btn {
  display: inline-block;
  padding: 15px 34px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: var(--idx-radius);
  transition: all .2s ease;
  border: 2px solid transparent;
}
.idx-btn--primary {
  background: var(--idx-blue);
  color: var(--idx-white) !important;
  border-color: var(--idx-blue);
}
.idx-btn--primary:hover {
  background: var(--idx-blue-dark);
  border-color: var(--idx-blue-dark);
  color: var(--idx-white) !important;
}
.idx-btn--ghost {
  background: transparent;
  color: var(--idx-white) !important;
  border-color: rgba(255,255,255,.55);
}
.idx-btn--ghost:hover {
  background: var(--idx-white);
  color: var(--idx-navy) !important;
  border-color: var(--idx-white);
}
.idx-btn--outline {
  background: transparent;
  color: var(--idx-blue) !important;
  border-color: var(--idx-blue);
}
.idx-btn--outline:hover {
  background: var(--idx-blue);
  color: var(--idx-white) !important;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.idx-hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: var(--idx-white);
}
.idx-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,31,58,.92) 0%, rgba(11,31,58,.72) 55%, rgba(11,31,58,.42) 100%);
}
.idx-hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--idx-maxw);
  margin: 0 auto;
  padding: 120px 24px;
  width: 100%;
}
.idx-hero__brand {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.82);
  margin-bottom: 22px;
}
.idx-hero__title {
  font-size: clamp(40px, 6.2vw, 68px);
  font-weight: 700;
  line-height: 1.08;
  color: var(--idx-white);
  margin: 0 0 26px;
  max-width: 900px;
}
.idx-hero__tagline {
  font-size: clamp(17px, 2vw, 21px);
  color: rgba(255,255,255,.9);
  margin-bottom: 14px;
  font-weight: 500;
}
.idx-hero__region {
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  margin-bottom: 40px;
}
.idx-hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* page banner (inner pages) */
.idx-banner {
  background: var(--idx-navy);
  color: var(--idx-white);
  padding: 96px 0 84px;
  position: relative;
  background-size: cover;
  background-position: center;
}
.idx-banner--image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,31,58,.94) 0%, rgba(11,31,58,.76) 100%);
}
.idx-banner__inner { position: relative; z-index: 2; }

/* Contact page (page-id-13) banner ships without a hero image, so the
   transparent header would show the flat navy block instead of a hero.
   Give it a hero background + navy scrim to match About/Services, so the
   "transparent over hero, glass on scroll" header behaves identically
   site-wide (desktop + mobile). */
.page-id-13 .idx-banner {
  background-image: url('/wp-content/uploads/2026/08/index-fleet-hero.jpg');
}
.page-id-13 .idx-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,31,58,.94) 0%, rgba(11,31,58,.76) 100%);
}
.idx-banner__eyebrow {
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-bottom: 16px;
}
.idx-banner__title {
  font-size: clamp(32px, 4.6vw, 50px);
  color: var(--idx-white);
  margin: 0 0 18px;
}
.idx-banner__sub {
  font-size: 17px;
  color: rgba(255,255,255,.78);
  max-width: 720px;
  margin: 0;
}

/* ==========================================================================
   PILLARS / CARDS
   ========================================================================== */
.idx-grid { display: grid; gap: 28px; }
.idx-grid--3 { grid-template-columns: repeat(3, 1fr); }
.idx-grid--2 { grid-template-columns: repeat(2, 1fr); }
.idx-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.idx-card {
  background: var(--idx-white);
  border: 1px solid var(--idx-border);
  border-radius: var(--idx-radius);
  padding: 38px 32px;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
  height: 100%;
}
.idx-card:hover {
  box-shadow: 0 16px 40px rgba(11,31,58,.10);
  transform: translateY(-4px);
  border-color: #c3cede;
}
.idx-card__num {
  font-size: 13px;
  font-weight: 700;
  color: var(--idx-blue);
  letter-spacing: .1em;
  margin-bottom: 14px;
}
.idx-card__title {
  font-size: 21px;
  margin: 0 0 8px;
  color: var(--idx-ink);
}
.idx-card__meta {
  font-size: 13px;
  color: var(--idx-grey);
  margin-bottom: 16px;
}
.idx-card__text {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--idx-grey);
  margin: 0 0 22px;
}
.idx-card__link {
  font-size: 14px;
  font-weight: 600;
  color: var(--idx-blue);
}
.idx-card__link::after { content: " \2192"; }

/* media card with image top */
.idx-mcard {
  background: var(--idx-white);
  border: 1px solid var(--idx-border);
  border-radius: var(--idx-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow .25s ease, transform .25s ease;
}
.idx-mcard:hover { box-shadow: 0 16px 40px rgba(11,31,58,.10); transform: translateY(-4px); }
.idx-mcard__img { aspect-ratio: 16 / 10; background-size: cover; background-position: center; }
.idx-mcard__body { padding: 30px 28px 34px; flex: 1; display: flex; flex-direction: column; }
.idx-mcard__title { font-size: 20px; margin: 0 0 6px; }
.idx-mcard__meta { font-size: 12.5px; color: var(--idx-blue); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.idx-mcard__text { font-size: 15px; color: var(--idx-grey); line-height: 1.7; margin: 0 0 20px; flex: 1; }

/* ==========================================================================
   STATS
   ========================================================================== */
.idx-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.idx-stat { padding: 8px 24px; border-left: 2px solid rgba(22,119,255,.35); }
.idx-stat:first-child { border-left-color: var(--idx-blue); }
.idx-stat__num {
  font-size: clamp(32px, 3.6vw, 44px);
  font-weight: 700;
  color: var(--idx-white);
  line-height: 1.1;
  margin-bottom: 8px;
}
.idx-stat__label {
  font-size: 13.5px;
  color: rgba(255,255,255,.66);
  letter-spacing: .04em;
}

/* ==========================================================================
   SERVICE LISTS (from PDF bullet lists)
   ========================================================================== */
.idx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.idx-list--2 { grid-template-columns: repeat(2, 1fr); gap: 2px 32px; }
.idx-list li {
  position: relative;
  padding: 13px 0 13px 30px;
  border-bottom: 1px solid var(--idx-border);
  font-size: 15.5px;
  color: var(--idx-ink);
}
.idx-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 21px;
  width: 7px;
  height: 7px;
  background: var(--idx-blue);
  border-radius: 50%;
}

/* ==========================================================================
   SPLIT / ALTERNATING SECTIONS
   ========================================================================== */
.idx-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.idx-split__media {
  min-height: 420px;
  background-size: cover;
  background-position: center;
  border-radius: var(--idx-radius);
}
.idx-split--reverse .idx-split__media { order: 2; }

/* ==========================================================================
   VISION / MISSION
   ========================================================================== */
.idx-vm {
  background: var(--idx-white);
  border-top: 3px solid var(--idx-blue);
  padding: 36px 32px 40px;
  height: 100%;
  border-right: 1px solid var(--idx-border);
  border-bottom: 1px solid var(--idx-border);
  border-left: 1px solid var(--idx-border);
}
.idx-vm__title { font-size: 20px; color: var(--idx-blue); margin: 0 0 16px; }
.idx-vm__text { font-size: 15.5px; line-height: 1.8; color: var(--idx-grey); margin: 0; }

/* ==========================================================================
   CTA STRIP
   ========================================================================== */
.idx-cta {
  background: var(--idx-navy);
  padding: 78px 0;
  text-align: center;
}
.idx-cta__title { font-size: clamp(26px, 3.4vw, 38px); color: var(--idx-white); margin: 0 0 16px; }
.idx-cta__text { font-size: 17px; color: rgba(255,255,255,.72); max-width: 640px; margin: 0 auto 34px; }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.idx-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.idx-info { display: grid; gap: 4px; }
.idx-info__item {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--idx-border);
}
.idx-info__icon {
  flex: 0 0 42px;
  width: 42px; height: 42px;
  background: rgba(22,119,255,.09);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--idx-blue);
}
.idx-info__label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--idx-grey); margin-bottom: 5px; }
.idx-info__value { font-size: 16px; color: var(--idx-ink); font-weight: 500; line-height: 1.6; }
.idx-info__value a { color: var(--idx-ink); }
.idx-info__value a:hover { color: var(--idx-blue); }
.idx-note { font-size: 13px; color: var(--idx-grey); font-style: italic; }

.idx-map {
  border: 1px solid var(--idx-border);
  border-radius: var(--idx-radius);
  overflow: hidden;
  line-height: 0;
}
.idx-map iframe { width: 100%; height: 420px; border: 0; display: block; }

.idx-formbox {
  background: var(--idx-soft);
  border: 1px solid var(--idx-border);
  border-radius: var(--idx-radius);
  padding: 40px 38px 34px;
}

/* WPForms restyle to match brand */
.idx-formbox .wpforms-field-label { font-size: 13px !important; font-weight: 600 !important; color: var(--idx-ink) !important; letter-spacing: .02em; }
.idx-formbox input[type=text],
.idx-formbox input[type=email],
.idx-formbox input[type=tel],
.idx-formbox textarea,
.idx-formbox select {
  border: 1px solid var(--idx-border) !important;
  border-radius: var(--idx-radius) !important;
  padding: 12px 14px !important;
  font-family: var(--idx-font) !important;
  font-size: 15px !important;
  background: var(--idx-white) !important;
  color: var(--idx-ink) !important;
  box-shadow: none !important;
}
.idx-formbox input:focus,
.idx-formbox textarea:focus,
.idx-formbox select:focus {
  border-color: var(--idx-blue) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(22,119,255,.12) !important;
}
.idx-formbox .wpforms-submit {
  background: var(--idx-blue) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: var(--idx-radius) !important;
  padding: 15px 40px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  font-family: var(--idx-font) !important;
  cursor: pointer;
  transition: background .2s ease;
}
.idx-formbox .wpforms-submit:hover { background: var(--idx-blue-dark) !important; }

/* ==========================================================================
   HEADER / FOOTER TWEAKS
   ========================================================================== */
.site-branding .site-title { font-weight: 700 !important; letter-spacing: -.01em; }
.site-header-row { --global-palette-btn-bg: var(--idx-blue); }

/* Keep the transparent header pinned to the top of the viewport while
   scrolling (mobile + desktop). Kadence sets position:absolute for the
   transparent header, which lets it scroll away with the page; forcing
   fixed keeps the logo + hamburger visible at all times instead of
   disappearing on scroll. */
.transparent-header #masthead,
.mobile-transparent-header #masthead,
.transparent-header header.site-header,
.mobile-transparent-header header.site-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
}

/* Stuck (scrolled) transparent header: replace Kadence's stark-white
   background with a branded translucent glass bar. This only triggers once
   the header is stuck on scroll (mirrors Kadence's :not(.item-at-start)
   condition), so the top-of-page hero-transparent state is untouched and the
   logo + hamburger stay readable instead of snapping to white. */
.transparent-header #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .site-header-row-container-inner,
.mobile-transparent-header #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .site-header-row-container-inner,
.transparent-header #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start).site-main-header-wrap,
.mobile-transparent-header #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start).site-main-header-wrap {
  background: rgba(11, 31, 58, 0.72) !important;
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Scroll-state glass bar driven by the child-theme scroll listener
   (.idx-scrolled on <body>). Breakpoint-independent and does NOT rely on
   Kadence's header-mobile-sticky toggle, so the mobile header also turns into
   the dark-blue frosted bar on scroll -- identical to desktop. The top-of-page
   hero-transparent state is preserved because idx-scrolled is only added once
   scrollY > 24px. */
.transparent-header.idx-scrolled #masthead .kadence-sticky-header .site-header-row-container-inner,
.mobile-transparent-header.idx-scrolled #masthead .kadence-sticky-header .site-header-row-container-inner,
.transparent-header.idx-scrolled #masthead .kadence-sticky-header.site-main-header-wrap,
.mobile-transparent-header.idx-scrolled #masthead .kadence-sticky-header.site-main-header-wrap {
  background: rgba(11, 31, 58, 0.72) !important;
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Mobile header frosted bar on scroll.
   Kadence's MOBILE header lives in `.site-mobile-header-wrap` and does NOT
   carry the `.kadence-sticky-header` class that the desktop glass rules key
   off (desktop frosts, mobile stayed transparent). Target the mobile wrap
   directly, keyed off `.idx-scrolled` (added by the child-theme scroll
   listener on every page). Scoped to `.site-mobile-header-wrap` so it never
   touches the desktop header. */
.mobile-transparent-header.idx-scrolled .site-mobile-header-wrap .site-header-row-container-inner,
.transparent-header.idx-scrolled .site-mobile-header-wrap .site-header-row-container-inner,
.idx-scrolled .site-mobile-header-wrap .site-header-row-container-inner,
.mobile-transparent-header.idx-scrolled .site-mobile-header-wrap,
.transparent-header.idx-scrolled .site-mobile-header-wrap {
  background: rgba(11, 31, 58, 0.72) !important;
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.site-footer { background: var(--idx-navy) !important; }
.site-footer, .site-footer a { color: rgba(255,255,255,.7) !important; }
.site-footer a:hover { color: var(--idx-white) !important; }
.site-footer h2, .site-footer h3, .site-footer .widget-title { color: var(--idx-white) !important; }

/* footer: 3 equal columns, each in its own container */
.idx-foot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px;
}
.idx-foot-col { min-width: 0; }

.idx-foot-h { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin: 0 0 18px; font-weight: 700; }
.idx-foot-list { list-style: none; margin: 0; padding: 0; }
.idx-foot-list li { margin-bottom: 11px; font-size: 14.5px; }

/* copyright bar: separate container, 100% footer width, sits at the very bottom */
.idx-foot-copy {
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 13.5px;
  color: rgba(255,255,255,.5);
  text-align: center;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Desktop breakpoint (>=1025px): container spans 100% of its parent; the four
   children share that width equally with a fixed 44px gutter between them.
   grid-template-columns: repeat(4, minmax(0, 1fr)) means:

     column width = (100% - 3 x 44px) / 4

   The fr algorithm subtracts the 3 gaps automatically, so no calc() is needed.
   minmax(0, 1fr) (instead of plain 1fr) sets each track's min-width to 0, so a
   long unbreakable word or fixed card padding can never push a column wider
   than its 1/4 share and cause overflow. width:100% on the container makes the
   "fill the parent" intent explicit even inside flex/grid ancestors. */
@media (min-width: 1025px) {
  .idx-grid.idx-grid--4 {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 44px;
  }
  .idx-grid.idx-grid--4 > * {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 1024px) {
  .idx-grid--3, .idx-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .idx-stats { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .idx-split { gap: 40px; }
  .idx-section { padding: 84px 0; }
}

@media (max-width: 860px) {
  .idx-split { grid-template-columns: 1fr; gap: 32px; }
  .idx-split--reverse .idx-split__media { order: 0; }
  .idx-split__media { min-height: 300px; }
  .idx-contact-grid { grid-template-columns: 1fr; gap: 44px; }
  .idx-grid--2 { grid-template-columns: 1fr; }
  .idx-foot-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .idx-foot-col:nth-child(3) { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .idx-section { padding: 62px 0; }
  .idx-section--tight { padding: 50px 0; }
  .idx-grid--3, .idx-grid--4 { grid-template-columns: 1fr; }
  .idx-foot-grid { grid-template-columns: 1fr; gap: 30px; }
  .idx-foot-col:nth-child(3) { grid-column: auto; }
  .idx-list--2 { grid-template-columns: 1fr; }
  .idx-stats { grid-template-columns: 1fr; row-gap: 26px; }
  .idx-stat { border-left: 2px solid var(--idx-blue); }
  .idx-hero { min-height: 540px; }
  .idx-hero__inner { padding: 92px 20px; }
  .idx-hero__actions { flex-direction: column; align-items: stretch; }
  .idx-hero__actions .idx-btn { text-align: center; }
  .idx-banner { padding: 68px 0 58px; }
  .idx-wrap { padding: 0 20px; }
  .idx-formbox { padding: 28px 22px 24px; }
  .idx-card { padding: 30px 24px; }
  .idx-map iframe { height: 320px; }
}

/* ============================================================
   Brand logo in the header (set via custom_logo). Kadence also
   renders the site-title text next to the image, so we hide it
   to avoid double branding. The image is sized to a tidy header
   height and keeps its white-on-transparent artwork (with black
   outline) crisp over the dark glass bar and the hero.
   ============================================================ */
.wp-custom-logo .site-branding .site-title-wrap,
.site-branding .site-title-wrap {
  display: none !important;
}
.site-branding a.brand img.custom-logo,
.site-branding img.custom-logo {
  /* Lock the logo to a tidy header height. !important beats Kadence's
     Customizer-driven max-width (desktop) so it stays consistent on both
     breakpoints; width:auto preserves the lockup's aspect ratio. */
  height: 42px !important;
  width: auto !important;
  max-width: none !important;
  max-height: none !important;
}
.site-branding { line-height: 0; }
