/* Invest 4 Life — static rebuild of the original AccessPress Parallax Pro design */

:root {
  --teal: #32809e;
  --teal-dark: #2d738e;
  --navy: #014656;
  --aqua: #77ccce;
  --aqua-light: #5fc6d3;
  --footer-bottom: #367f9d;
  --grey-band: #ededed;
  --grey-partners: #e4e4e4;
  --text: #4f4f4f;
  --heading: #333333;
  --white: #ffffff;
  --container: 1170px;
  --gutter: 20px;
  --font: "Open Sans", Arial, Helvetica, sans-serif;
  --font-alt: "PT Sans", Arial, Helvetica, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--navy);
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.25;
  color: var(--heading);
}

h1,
.h1 {
  font-size: 32px;
  color: var(--teal);
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 22px;
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0 0 1em;
  padding-left: 1.2em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--white);
}

.skip-link:focus {
  left: 10px;
  top: 10px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header ---------- */

.top-bar {
  background: var(--teal);
  color: var(--white);
  font-size: 13px;
  line-height: 38px;
}

.top-bar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}

.top-bar a {
  color: var(--white);
}

.top-bar a:hover,
.top-bar a:focus-visible {
  color: var(--aqua);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 90px;
  gap: 20px;
}

.site-logo img {
  width: 260px;
}

.nav-toggle {
  display: none;
  border: 2px solid var(--teal);
  border-radius: 4px;
  background: transparent;
  color: var(--teal);
  font: 700 14px var(--font);
  padding: 8px 14px;
  cursor: pointer;
}

.main-nav > ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav li {
  position: relative;
}

.main-nav a,
.main-nav .submenu-toggle {
  display: block;
  padding: 10px 14px;
  border: 0;
  background: none;
  color: var(--teal);
  font: 700 14px/1.4 var(--font);
  cursor: pointer;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav .submenu-toggle:hover,
.main-nav .submenu-toggle:focus-visible,
.main-nav a[aria-current="page"] {
  color: var(--aqua);
  text-decoration: none;
}

.submenu-toggle::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  border: 5px solid transparent;
  border-top-color: currentColor;
  border-bottom: 0;
  vertical-align: middle;
}

.main-nav .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: var(--white);
  border-top: 3px solid var(--teal);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.main-nav .has-submenu:hover > .submenu,
.main-nav .has-submenu:focus-within > .submenu,
.main-nav .has-submenu.open > .submenu {
  display: block;
}

.main-nav .submenu a {
  font-weight: 600;
  padding: 8px 18px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: clamp(380px, 72vh, 720px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--navy);
}

.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero {
  align-items: center;
  justify-content: center;
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero p {
  max-width: 1130px;
  margin: 0 auto;
  color: var(--white);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hero__lead {
  font-size: clamp(18px, 1.65vw, 26px);
  font-weight: 700;
  line-height: 1.6;
}

.hero__sub {
  margin-top: 10px !important;
  font-size: clamp(15px, 1.25vw, 20px);
  font-weight: 300;
}

/* ---------- Generic sections ---------- */

.section {
  padding: 60px 0;
}

.section--teal {
  background: var(--teal);
  color: var(--white);
}

.section--teal h1,
.section--teal h2,
.section--teal h3,
.section--teal a {
  color: var(--white);
}

.section--teal .lead strong {
  color: var(--white);
}

.section--grey {
  background: var(--grey-band);
}

.section--partners {
  background: var(--grey-partners);
}

.lead {
  font-size: 18px;
}

.lead strong {
  color: var(--teal);
}

.center {
  text-align: center;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

/* ---------- Home: service cards ---------- */

.service-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.service-card {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
}

.service-card img + img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.service-card:hover img + img,
.service-card:focus-within img + img {
  opacity: 1;
}

/* ---------- Home: partners ---------- */

.partner-logos {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 14px;
  margin: 30px 0;
  padding: 0;
  list-style: none;
}

.partner-logos li {
  background: var(--white);
  border-radius: 50%;
  overflow: hidden;
}

.partner-logos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* ---------- Financial Planning Areas ---------- */

.area {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}

.area__title img {
  width: 140px;
  margin-bottom: 14px;
}

.area__title h2 {
  font-size: 28px;
  color: var(--teal);
}

.section--teal .area__title h2 {
  color: var(--white);
}

.area ul {
  padding-left: 0;
  list-style: none;
}

.area li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 4px;
}

.area li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.65em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aqua-light);
}

.section--teal .area li::before {
  background: var(--white);
}

/* ---------- Financial Planning Process ---------- */

.page-intro {
  background: #f0f0f0;
  padding: 40px 0 30px;
}

.page-intro h1 {
  margin: 0;
}

.process-stages {
  background: #efefef url("../../images/BG-1.jpg") center calc(100% + 80px) / 100% auto no-repeat;
  padding: 50px 0 480px;
}

.stages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stages img {
  width: 120px;
  margin: 0 auto 12px;
}

.stages h2 {
  font-size: 22px;
  color: var(--teal);
  margin-bottom: 0.4em;
}

.process-steps {
  display: grid;
  grid-template-columns: 6fr 6fr;
  gap: 40px;
  align-items: start;
}

.process-steps h2 {
  font-size: 24px;
  color: var(--teal);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  margin-bottom: 1.1em;
}

.steps strong {
  display: block;
  color: var(--navy);
}

/* ---------- Contact ---------- */

.contact-details dt {
  font-weight: 700;
  color: var(--heading);
}

.contact-details dd {
  margin: 0 0 14px;
}

.contact-form label {
  display: block;
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--heading);
}

.contact-form .req {
  color: #c0392b;
}

.contact-form .field {
  margin-bottom: 16px;
}

.contact-form fieldset {
  min-width: 0;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.contact-form .name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #b9c4c9;
  border-radius: 3px;
  background: var(--white);
  color: var(--heading);
  font: 16px/1.4 var(--font);
}

.contact-form textarea {
  min-height: 170px;
  resize: vertical;
}

.contact-form .hp {
  position: absolute;
  left: -9999px;
}

.button {
  display: inline-block;
  padding: 11px 26px;
  border: 0;
  border-radius: 3px;
  background: var(--teal);
  color: var(--white);
  font: 700 16px var(--font);
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
}

.button.is-loading,
.button:disabled {
  cursor: progress;
  opacity: 0.85;
}

.button.is-loading::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 10px;
  vertical-align: -0.15em;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .button.is-loading::before {
    animation-duration: 2s;
  }
}

.form-status {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-left: 4px solid #c0392b;
  background: #fbeeee;
  color: #7a1f16;
}

.form-status[hidden] {
  display: none;
}

.map {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}

/* ---------- Blog ---------- */

.post-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  align-items: start;
  padding-bottom: 30px;
  border-bottom: 1px solid #e3e3e3;
}

.post-card h2 a {
  color: var(--navy);
}

.post-meta {
  margin-bottom: 0.8em;
  color: #777;
  font-size: 14px;
}

.article {
  max-width: 820px;
}

.article h1 {
  color: var(--navy);
}

.article .featured {
  float: right;
  width: 260px;
  margin: 0 0 20px 30px;
}

.growth-table {
  border-collapse: collapse;
  margin: 0 0 1.4em;
  min-width: 300px;
}

.growth-table th,
.growth-table td {
  padding: 6px 16px;
  border-bottom: 1px solid #e3e3e3;
  text-align: left;
}

.growth-table td + td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: var(--white);
  font-size: 15px;
}

.site-footer .container.cols {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 1.4fr 1fr;
  gap: 36px;
  padding-top: 50px;
  padding-bottom: 40px;
}

.site-footer h2 {
  margin-bottom: 14px;
  color: var(--white);
  font: 400 18px var(--font-alt);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.site-footer a {
  color: var(--aqua-light);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--white);
}

.footer-logo img {
  width: 220px;
}

.footer-icons {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.footer-icons img {
  width: 44px;
}

.site-footer address {
  font-style: normal;
}

.site-footer ul {
  padding: 0;
  list-style: none;
}

.footer-bottom {
  background: var(--footer-bottom);
  color: #eeeeee;
  font-size: 14px;
}

.footer-bottom .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.footer-bottom a {
  color: var(--white);
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .service-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .partner-logos {
    grid-template-columns: repeat(4, 1fr);
  }

  .stages {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer .container.cols {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  }

  .main-nav.open {
    display: block;
  }

  .main-nav > ul {
    flex-direction: column;
    padding: 8px 0;
  }

  .main-nav a,
  .main-nav .submenu-toggle {
    width: 100%;
    padding: 12px var(--gutter);
    text-align: left;
  }

  .main-nav .submenu {
    position: static;
    border: 0;
    box-shadow: none;
    padding: 0 0 0 16px;
  }

  .main-nav .has-submenu:hover > .submenu {
    display: none;
  }

  .main-nav .has-submenu.open > .submenu {
    display: block;
  }
}

@media (max-width: 760px) {
  h1,
  .h1 {
    font-size: 27px;
  }

  .section {
    padding: 44px 0;
  }

  .two-col,
  .area,
  .process-steps,
  .post-card {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .service-cards {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .partner-logos {
    grid-template-columns: repeat(3, 1fr);
  }

  .stages {
    grid-template-columns: 1fr;
  }

  .process-stages {
    padding-bottom: 350px;
    background-color: #efefef;
    background-position: 68% bottom;
    background-size: 150% auto;
  }

  .contact-form .name-row {
    grid-template-columns: 1fr;
  }

  .article .featured {
    float: none;
    width: 200px;
    margin: 0 0 20px;
  }

  .site-logo img {
    width: 200px;
  }

  .site-header .container {
    min-height: 74px;
  }

  .site-footer .container.cols {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .service-card img + img {
    transition: none;
  }
}

/* ---------- Animations ----------
   Everything here is switched off for visitors who prefer reduced motion.
   Scroll-reveal groups are listed below AND in assets/js/main.js (keep both lists in step). */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-zoom {
  from {
    transform: scale(1.08);
  }

  to {
    transform: scale(1);
  }
}

/* Hover polish (works with or without JavaScript) */
:where(.service-card, .partner-logos li, .button) {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.2s ease;
}

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(1, 70, 86, 0.25);
}

.partner-logos li:hover {
  transform: scale(1.07);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button:disabled,
.button.is-loading {
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  /* On load: hero and page headings (pure CSS, so they can never get stuck hidden) */
  .hero > img {
    animation: hero-zoom 16s ease-out both;
  }

  .hero__lead {
    animation: fade-up 0.9s 0.15s ease-out both;
  }

  .hero__sub {
    animation: fade-up 0.9s 0.45s ease-out both;
  }

  main h1:not(.visually-hidden) {
    animation: fade-up 0.8s ease-out both;
  }

  /* On scroll: starting (hidden) state. :where() keeps specificity at zero so hover rules still win. */
  :where(html.js) :where(
    .lead.center, .service-card, #about .two-col > div,
    .section--partners h2, .section--partners > .container > p,
    .stages > div, .process-steps h2, .steps li,
    .contact-details, .contact-form .field, .contact-form .button,
    .post-card, .article .featured, .growth-table,
    .site-footer .cols > div
  ) {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  :where(html.js) :where(.area__title) {
    opacity: 0;
    transform: translateX(-34px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  :where(html.js) :where(.area > div:not(.area__title)) {
    opacity: 0;
    transform: translateX(34px);
    transition: opacity 0.7s ease 0.12s, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.12s;
  }

  :where(html.js) :where(.partner-logos li) {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  :where(html.js) :where(.process-steps > img) {
    opacity: 0;
    transform: scale(0.88) rotate(-10deg);
    transition: opacity 0.9s ease, transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  /* Revealed state */
  :where(html.js) .is-visible {
    opacity: 1;
    transform: none;
  }

  /* Once revealed, go back to quick hover transitions */
  :where(html.js) .reveal-done {
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.2s ease;
  }
}
