/* ========================================
   Masawa Fund — Global Styles
   ======================================== */

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --purple: #48386B;
  --purple-light: #c8b8e8;
  --white: #ffffff;
  --body-font: 'Mulish', sans-serif;
  --heading-font: 'Martel', serif;
  --max-width: 1200px;
  --section-padding: 100px 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-weight: 300;
  font-size: 21px;
  line-height: 1.7;
  color: var(--purple);
  background: var(--white);
}

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

a {
  color: var(--purple);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.7;
}

h1, h2, h3, h4 {
  font-family: var(--heading-font);
  font-weight: 500;
  line-height: 1.25;
}

h1 {
  font-size: 55px;
}

h2 {
  font-size: 52px;
  margin-bottom: 24px;
}

h3 {
  font-size: 28px;
  margin-bottom: 16px;
}

h4 {
  font-size: 22px;
  margin-bottom: 12px;
}

p {
  margin-bottom: 20px;
}

ul {
  list-style: none;
}

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


/* ========================================
   Navigation
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--white);
  z-index: 1000;
  border-bottom: 1px solid rgba(72, 56, 107, 0.08);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-family: var(--body-font);
  font-size: 16px;
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--purple);
  transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover {
  opacity: 1;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--purple);
  margin: 5px 0;
  transition: 0.3s;
}

.nav-toggle-checkbox {
  display: none;
}

/* Spacer for fixed nav */
.nav-spacer {
  height: 80px;
}


/* ========================================
   Sections — General
   ======================================== */

.section {
  padding: var(--section-padding);
}

.section-alt {
  background: #faf9fc;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.two-col.reverse {
  direction: rtl;
}

.two-col.reverse > * {
  direction: ltr;
}


/* ========================================
   Hero
   ======================================== */

.hero {
  padding: 120px 0 100px;
}

.hero h1 {
  margin-bottom: 30px;
}

.hero p {
  font-size: 21px;
}

.circle-image-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.circle-image {
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 30px;
}

.circle-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.circle-image.lavender {
  background: var(--purple-light);
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image img {
  max-height: 500px;
  object-fit: contain;
}

/* Button */
.btn {
  display: inline-block;
  padding: 14px 36px;
  border: 2px solid var(--purple);
  color: var(--purple);
  font-family: var(--body-font);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  transition: background 0.3s, color 0.3s;
  margin-top: 10px;
}

.btn:hover {
  background: var(--purple);
  color: var(--white);
  opacity: 1;
}


/* ========================================
   Mental Health Section
   ======================================== */

.content-section .subtitle {
  font-family: var(--heading-font);
  font-weight: 500;
  font-size: 24px;
  margin-bottom: 24px;
  color: var(--purple);
}

.content-section ul {
  margin-bottom: 24px;
}

.content-section ul li {
  padding-left: 24px;
  position: relative;
  margin-bottom: 16px;
  font-size: 19px;
  line-height: 1.6;
}

.content-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
}

.section-image img {
  width: 100%;
  border-radius: 8px;
}


/* ========================================
   Portfolio / Investments
   ======================================== */

.investments {
  text-align: center;
}

.investments h2 {
  margin-bottom: 50px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.portfolio-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(72, 56, 107, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(72, 56, 107, 0.15);
}

.portfolio-card img {
  width: 100%;
  height: auto;
}

.portfolio-card .card-label {
  padding: 20px;
  font-family: var(--heading-font);
  font-weight: 500;
  font-size: 20px;
  text-align: center;
}


/* ========================================
   Newsletter
   ======================================== */

.newsletter {
  position: relative;
  text-align: center;
}

.newsletter h2 {
  margin-bottom: 16px;
}

.newsletter .subtitle {
  font-size: 20px;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter .butterfly {
  position: absolute;
  right: 60px;
  top: 40px;
  width: 100px;
  opacity: 0.7;
}

.ml-subscribe-form {
  max-width: 500px;
  margin: 0 auto;
}

.ml-form-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.ml-form-fields input[type="email"],
.ml-form-fields input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(72, 56, 107, 0.25);
  border-radius: 4px;
  font-family: var(--body-font);
  font-size: 16px;
  color: var(--purple);
  outline: none;
  transition: border-color 0.2s;
}

.ml-form-fields input:focus {
  border-color: var(--purple);
}

.ml-form-privacy {
  font-size: 13px;
  opacity: 0.6;
  margin-bottom: 16px;
}

.ml-form-button {
  width: 100%;
  padding: 16px;
  background: var(--purple);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-family: var(--body-font);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.ml-form-button:hover {
  opacity: 0.9;
}

.ml-form-success {
  font-size: 20px;
  font-weight: 400;
  margin-top: 20px;
}


/* ========================================
   Footer
   ======================================== */

.footer {
  background: var(--purple);
  color: var(--white);
  padding: 50px 0;
  font-size: 15px;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 40px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-weight: 300;
  font-size: 15px;
}

.footer-social {
  text-align: center;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  transition: border-color 0.3s;
}

.footer-social a:hover {
  border-color: var(--white);
  opacity: 1;
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: var(--white);
}

.footer-address {
  text-align: right;
  line-height: 1.8;
  font-weight: 300;
}


/* ========================================
   About Page
   ======================================== */

.team-section {
  text-align: center;
}

.team-section h2 {
  margin-bottom: 12px;
}

.team-section .subtitle {
  font-size: 20px;
  margin-bottom: 60px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.about-hero-image {
  display: flex;
  justify-content: center;
}

.about-hero-image img {
  max-height: 500px;
  object-fit: contain;
}

.team-row {
  display: flex;
  justify-content: center;
  gap: 80px;
  margin-bottom: 60px;
}

.team-row-2 { max-width: 700px; margin-left: auto; margin-right: auto; margin-bottom: 60px; }
.team-row-3 { max-width: 1000px; margin-left: auto; margin-right: auto; margin-bottom: 0; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px 80px;
  max-width: 800px;
  margin: 0 auto;
}

.team-card {
  text-align: center;
}

.team-card .team-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(100%);
  margin: 0 auto 20px;
  transition: filter 0.3s;
}

.team-card:hover .team-photo {
  filter: grayscale(0%);
}

.team-card .team-name {
  font-family: var(--heading-font);
  font-weight: 500;
  font-size: 22px;
  margin-bottom: 4px;
}

.team-card .team-title {
  font-size: 16px;
  font-weight: 300;
  margin-bottom: 12px;
  opacity: 0.8;
}

.team-card .team-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(72, 56, 107, 0.3);
  border-radius: 50%;
  transition: border-color 0.3s;
}

.team-card .team-linkedin:hover {
  border-color: var(--purple);
  opacity: 1;
}

.team-card .team-linkedin svg {
  width: 14px;
  height: 14px;
  fill: var(--purple);
}


/* ========================================
   Library
   ======================================== */

.library-section {
  text-align: center;
}

.library-section h2 {
  margin-bottom: 12px;
}

.library-section .subtitle {
  font-size: 20px;
  margin-bottom: 60px;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
  text-align: left;
}

.library-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(72, 56, 107, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.library-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(72, 56, 107, 0.15);
}

.library-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.library-card .card-body {
  padding: 28px;
}

.library-card .card-body h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

.library-card .card-body p {
  font-size: 17px;
  line-height: 1.6;
}


/* ========================================
   Legal Pages (Impressum, Privacy, SFDR)
   ======================================== */

.legal-page {
  padding: 80px 0 120px;
}

.legal-page .container {
  max-width: 860px;
}

.legal-page h1 {
  margin-bottom: 12px;
}

.legal-page .date {
  font-size: 16px;
  opacity: 0.6;
  margin-bottom: 50px;
}

.legal-page h2 {
  font-size: 28px;
  margin-top: 50px;
  margin-bottom: 16px;
}

.legal-page h3 {
  font-size: 22px;
  margin-top: 36px;
  margin-bottom: 12px;
}

.legal-page h4 {
  font-size: 19px;
  margin-top: 28px;
  margin-bottom: 10px;
}

.legal-page p,
.legal-page li {
  font-size: 17px;
  line-height: 1.7;
}

.legal-page ul,
.legal-page ol {
  margin-bottom: 20px;
  padding-left: 28px;
}

.legal-page ul {
  list-style: disc;
}

.legal-page ol {
  list-style: decimal;
}

.legal-page li {
  margin-bottom: 8px;
}

.legal-page strong {
  font-weight: 600;
}

.legal-page a {
  text-decoration: underline;
}


/* ========================================
   Responsive — Tablet (1024px)
   ======================================== */

@media (max-width: 1024px) {
  h1 { font-size: 42px; }
  h2 { font-size: 38px; }
  body { font-size: 19px; }

  .two-col {
    gap: 40px;
  }

  .circle-image {
    width: 320px;
    height: 320px;
  }

  .portfolio-grid {
    gap: 24px;
  }

  .team-grid {
    gap: 40px 50px;
  }
}


/* ========================================
   Responsive — Mobile (768px)
   ======================================== */

@media (max-width: 768px) {
  h1 { font-size: 34px; }
  h2 { font-size: 30px; }
  h3 { font-size: 22px; }
  body { font-size: 17px; }

  .section {
    padding: 60px 0;
  }

  .hero {
    padding: 80px 0 60px;
  }

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

  .two-col.reverse {
    direction: ltr;
  }

  .two-col .circle-image-wrap {
    order: -1;
  }

  .circle-image {
    width: 260px;
    height: 260px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .library-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .team-row {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }

  .footer-links {
    align-items: center;
  }

  .footer-address {
    text-align: center;
  }

  /* Mobile Nav */
  .nav-toggle {
    display: block;
    z-index: 1001;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 100px 40px 40px;
    gap: 30px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    transition: right 0.3s;
  }

  .nav-links a {
    font-size: 20px;
  }

  .nav-toggle-checkbox:checked ~ .nav-links {
    right: 0;
  }

  .nav-toggle-checkbox:checked ~ .nav-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle-checkbox:checked ~ .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle-checkbox:checked ~ .nav-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .newsletter .butterfly {
    display: none;
  }

  .content-section ul li {
    font-size: 17px;
  }
}
