/* Root variables */
:root {
    --color-brand: #d71920;
    --color-brand-dark: #a31319;
    --color-bg: #ffffff;
    --color-bg-alt: #f5f6f8;
    --color-border: #dde1e6;
    --color-text: #222222;
    --color-text-muted: #555555;
    --color-link: #d71920;
    --radius-sm: 4px;
    --radius-md: 8px;
    --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.06);
    --transition-fast: 0.2s ease;
    --max-width: 1120px;
  }
  
  /* Global reset-ish */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  html {
    font-size: 16px;
  }
  
  body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
      sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.5;
  }
  
  /* Header / nav */
  .site-header {
    border-bottom: 1px solid var(--color-border);
    background-color: #ffffff;
  }
  
  .header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  
  .site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--color-text);
  }
  
  .logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-brand);
    color: #ffffff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  .logo-text {
    font-weight: 600;
    font-size: 0.95rem;
  }
  
  .logo-sub {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--color-text-muted);
  }
  
  /* Nav */
  .nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
    font-size: 1.1rem;
    cursor: pointer;
  }
  
  .main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .main-nav > ul {
    display: flex;
    align-items: center;
    gap: 1.25rem;
  }
  
  .nav-item > a {
    text-decoration: none;
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
  }
  
  .nav-item > a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.25rem;
    width: 0;
    height: 2px;
    background-color: var(--color-brand);
    transition: width var(--transition-fast);
  }
  
  .nav-item > a:hover::after,
  .nav-item > a:focus-visible::after {
    width: 100%;
  }
  
  /* Dropdowns */
  .has-children {
    position: relative;
  }
  
  .subnav {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.4rem;
    min-width: 220px;
    background-color: #ffffff;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    z-index: 40;
  }
  
  .has-children:hover > .subnav,
  .has-children:focus-within > .subnav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  
  .subnav li a {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: var(--color-text);
    text-decoration: none;
  }
  
  .subnav li a:hover,
  .subnav li a:focus-visible {
    background-color: var(--color-bg-alt);
  }
  
  /* Mobile nav */
  @media (max-width: 820px) {
    .header-inner {
      flex-wrap: wrap;
    }
  
    .nav-toggle {
      display: inline-block;
    }
  
    .main-nav {
      width: 100%;
      display: none;
    }
  
    .main-nav.nav-open {
      display: block;
    }
  
    .main-nav > ul {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
      padding-top: 0.5rem;
    }
  
    .has-children .subnav {
      position: static;
      margin-top: 0.25rem;
      border: none;
      box-shadow: none;
      transform: none;
      opacity: 1;
      pointer-events: auto;
    }
  
    .subnav li a {
      padding-left: 1.25rem;
    }
  }
  
  /* Home hero */
  .home-hero {
    position: relative;
    min-height: 60vh;
    background-image: url("https://morningstarinvestments.com.au/wp-content/uploads/2025/06/MIM-Carousel-Hero-1904x620-%CE%93Co-C2-2.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
  }
  
  .home-hero-overlay {
    position: relative;
    width: 100%;
    min-height: inherit;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
  }
  
  .home-hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3.5rem 1rem 3.5rem;
  }
  
  .home-hero-inner h1 {
    margin: 0 0 0.75rem;
    font-size: 2rem;
    font-weight: 650;
  }
  
  .home-hero-inner p {
    max-width: 680px;
    margin: 0 0 1.5rem;
    font-size: 0.98rem;
  }
  
  /* Intro actions reused */
  .intro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  /* Make hero secondary button white-outline */
  .home-hero .btn-outline {
    color: #ffffff;
    border-color: #ffffff;
  }
  
  .home-hero .btn-outline:hover,
  .home-hero .btn-outline:focus-visible {
    background-color: #ffffff;
    color: #000000;
  }
  
  /* Main layout */
  .page-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
  }
  
  /* Why Morningstar */
  .why-section {
    margin-bottom: 2.5rem;
  }
  
  .why-image-wrapper {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  }
  
  .why-image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
  }
  
  /* Portfolio suite section */
  .suite-section {
    margin-bottom: 2.5rem;
  }
  
  .section-heading {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }
  
  .suite-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
  }
  
  /* UPDATED: use flex so button can sit at the bottom consistently */
  .suite-card {
    background-color: var(--color-bg-alt);
    border-radius: 16px;
    padding: 1.1rem 1rem 1.3rem;
    text-align: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .suite-logo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--color-brand);
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .suite-card h3 {
    margin: 0 0 0.9rem;
    font-size: 0.95rem;
  }
  
  /* this is the key: push button to the bottom */
  .suite-card .btn {
    margin-top: auto;
  }
  
  /* Platform section */
  .platform-section {
    margin-bottom: 3rem;
  }
  
  .platform-carousel {
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
  }
  
  .platform-track {
    display: inline-flex;
    white-space: nowrap;
    gap: 2.5rem;
    padding: 0.9rem 1.5rem;
    animation: platform-scroll 30s linear infinite;
  }
  
  .platform-item {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
  }
  
  /* Auto-scroll keyframes */
  @keyframes platform-scroll {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(-50%);
    }
  }
  
  /* Related content */
  .related-section {
    margin-bottom: 3rem;
  }
  
  .related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }
  
  .related-card {
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.25rem 1.5rem;
    box-shadow: var(--shadow-soft);
  }
  
  .related-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
  }
  
  .related-card p {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-text-muted);
  }
  
  /* Bottom CTA boxes */
  .cta-grid-section {
    margin-bottom: 3rem;
  }
  
  .cta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
  
  .cta-box {
    border-radius: 16px;
    border: none;
    background-color: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    padding: 1.2rem 1.25rem 1.3rem;
    text-align: left;
    cursor: pointer;
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
  }
  
  .cta-box h3 {
    margin: 0 0 0.4rem;
    font-size: 1rem;
  }
  
  .cta-box p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
  }
  
  .cta-box:hover,
  .cta-box:focus-visible {
    outline: none;
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.1);
  }
  
  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: background-color var(--transition-fast),
      color var(--transition-fast), border-color var(--transition-fast),
      box-shadow var(--transition-fast);
  }
  
  .btn-primary {
    background-color: var(--color-brand);
    color: #ffffff;
    border-color: var(--color-brand);
  }
  
  .btn-primary:hover,
  .btn-primary:focus-visible {
    background-color: var(--color-brand-dark);
    border-color: var(--color-brand-dark);
    box-shadow: 0 0 0 2px rgba(215, 25, 32, 0.25);
  }
  
  .btn-outline {
    background-color: transparent;
    color: var(--color-link);
    border-color: var(--color-link);
  }
  
  .btn-outline:hover,
  .btn-outline:focus-visible {
    background-color: var(--color-link);
    color: #ffffff;
  }
  
  .btn-small {
    padding: 0.3rem 0.9rem;
    font-size: 0.8rem;
  }
  
  /* Generic form styles */
  .form-intro {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
  }
  
  .form-row {
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
  }
  
  .form-row label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }
  
  .form-row input,
  .form-row select,
  .form-row textarea {
    font: inherit;
    padding: 0.45rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    outline: none;
    transition: border-color var(--transition-fast),
      box-shadow var(--transition-fast);
  }
  
  .form-row input:focus-visible,
  .form-row select:focus-visible,
  .form-row textarea:focus-visible {
    border-color: var(--color-brand);
    box-shadow: 0 0 0 2px rgba(215, 25, 32, 0.15);
  }
  
  .form-disclaimer {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin: 0.5rem 0 0.9rem;
  }
  
  .form-disclaimer a {
    color: var(--color-link);
  }
  
  /* Footer */
  .site-footer {
    border-top: 1px solid var(--color-border);
    background-color: #f8f9fb;
    padding: 1.5rem 1rem 1rem;
  }
  
  .footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    font-size: 0.85rem;
    color: var(--color-text-muted);
  }
  
  .footer-main {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
  }
  
  .footer-left {
    flex: 1 1 260px;
    max-width: 360px;
  }
  
  .footer-left h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
  }
  
  .footer-left p {
    margin: 0 0 0.9rem;
  }
  
  .footer-newsletter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .footer-newsletter input {
    flex: 1 1 180px;
    min-width: 0;
    font: inherit;
    padding: 0.45rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
  }
  
  .footer-right {
    flex: 2 1 360px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }
  
  .footer-column h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text);
  }
  
  .footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .footer-column li {
    margin-bottom: 0.35rem;
  }
  
  .footer-column a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
  }
  
  .footer-column a:hover,
  .footer-column a:focus-visible {
    text-decoration: underline;
  }
  
  .footer-meta {
    border-top: 1px solid var(--color-border);
    padding-top: 0.9rem;
  }
  
  .footer-legal {
    margin: 0 0 0.4rem;
    font-size: 0.8rem;
  }
  
  .footer-links {
    margin: 0 0 0.4rem;
    font-size: 0.8rem;
  }
  
  .footer-links a {
    color: var(--color-link);
    text-decoration: none;
  }
  
  .footer-links a:hover,
  .footer-links a:focus-visible {
    text-decoration: underline;
  }
  
  .footer-links span {
    margin: 0 0.3rem;
  }
  
  /* BDM banner — floating pill */
  .bdm-banner {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
    padding: 0.45rem 0.85rem;
    z-index: 200;
    min-width: 260px;
    max-width: calc(100% - 2rem);
  }
  
  .bdm-banner.hidden {
    display: none;
  }
  
  .bdm-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }
  
  .bdm-banner-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
  }
  
  .bdm-banner-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }
  
  .bdm-close {
    border: none;
    background: none;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    color: var(--color-text-muted);
  }
  
  /* Enquiry modal (centered) */
  .enquiry-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.98);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    z-index: 250;
  }
  
  .enquiry-modal.open {
    pointer-events: auto;
    opacity: 1;
    transform: scale(1);
  }
  
  .enquiry-modal-inner {
    width: 90%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    background-color: #ffffff;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    padding: 1.5rem 1.5rem 1.6rem;
    border-top: 4px solid var(--color-brand);
    position: relative;
  }
  
  .enquiry-modal-inner h3 {
    margin: 0 0 0.4rem;
  }
  
  .enquiry-modal-close {
    position: absolute;
    right: 0.9rem;
    top: 0.75rem;
    border: none;
    background: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--color-text-muted);
  }
  
  /* Backdrop */
  .enquiry-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    z-index: 240;
  }
  
  .enquiry-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
  }
  
  /* Responsive tweaks */
  @media (max-width: 900px) {
    .related-grid {
      grid-template-columns: 1fr;
    }
  
    .suite-row {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  
    .footer-right {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  
    .cta-grid {
      grid-template-columns: 1fr;
    }
  }
  
  @media (max-width: 640px) {
    .suite-row {
      grid-template-columns: 1fr;
    }
  
    .footer-main {
      flex-direction: column;
    }
  
    .footer-right {
      grid-template-columns: 1fr 1fr;
    }
  
    .home-hero-inner {
      padding: 3rem 1rem 2.5rem;
    }
  
    .home-hero-inner h1 {
      font-size: 1.6rem;
    }
  
    .platform-track {
      gap: 1.5rem;
      padding-inline: 1rem;
    }
  
    .bdm-banner {
      bottom: 1rem;
    }
  }  