:root {
  --primary-color: #84ac8c;
  /* --primary-color: #c4944e; */
  /* --secondary-color: #395144; */
  --secondary-color: #84ac8c;
  --accent-color: #3498db;
  --text-color: #333;
  --light-gray: #f5f5f5;
  --dark-gray: #777;
  --white: #ffffff;
  --off-white: #f0f0f0;
  --black: #000000d7;

  --page-bg: #f3efe8;
  --card-bg: var(--white);
  --card-icon-size: 2.5rem;
  --hero-height: min(38vh, 320px);
  --avatar-size: 7.5rem;
  --max-width: 26rem;
  --font-display: "Poppins", sans-serif;
  --font-body: "Poppins", sans-serif;
  --font-accent: "Poppins", sans-serif;
}
 
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--text-color);
  background: var(--page-bg);
  line-height: 1.4;
}

.tree {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.tree__hero {
  flex: 0 0 var(--hero-height);
  height: var(--hero-height);
  max-height: var(--hero-height);
  width: 100%;
  position: relative;
  overflow: hidden;
  animation: hero-in 1.1s ease-out both;
}

.tree__hero--epz {
  margin-top: 1.5rem;
}

.hero-swiper,
.epz-swiper,
.hero-swiper .swiper-wrapper,
.epz-swiper .swiper-wrapper {
  width: 100%;
  height: 100%;
}

.hero-swiper .swiper-slide,
.epz-swiper .swiper-slide {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.hero-swiper .swiper-slide::after,
.epz-swiper .swiper-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, rgb(243 239 232 / 0.35));
  pointer-events: none;
  z-index: 1;
}

.hero-swiper .swiper-slide img,
.epz-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

.hero-swiper .swiper-pagination,
.epz-swiper .swiper-pagination {
  bottom: 0.75rem;
  z-index: 2;
}

.hero-swiper .swiper-pagination-bullet,
.epz-swiper .swiper-pagination-bullet {
  background: var(--white);
  opacity: 0.55;
}

.hero-swiper .swiper-pagination-bullet-active {
  background: var(--primary-color);
  opacity: 1;
}

.epz-swiper .swiper-pagination-bullet-active {
  background: var(--secondary-color);
  opacity: 1;
}

.tree__body {
  position: relative;
  width: 100%;
  height: 100%;
  /* display: flex;
  justify-content: center;
  align-items: center; */
}

.tree__body::before {
   content: "";
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: var(--tree-links-bg);
   background-size: cover;
   background-position: center;
   background-repeat: no-repeat;
   opacity: 0.015;
   z-index: 1;
 }

 /* .tree__body::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--tree-links-bg);
  z-index: 2;
 } */

 .tree__body--epz {
  padding-bottom: 2rem !important;
 }

 .tree__content {
  position: relative;
  z-index: 20;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, var(--max-width));
  margin-inline: auto;
  padding: calc(var(--avatar-size) / 2 + 0.75rem) 1.5rem 2.75rem;
  text-align: center;
  padding-bottom: 0 !important;
 }

.tree__group {
  margin-top: 0.85rem;
  margin-bottom: 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dark-gray);
  animation: rise-in 0.55s ease-out 0.2s both;
}

.company {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  --company-accent: var(--primary-color);
}

.company--estate {
  --company-accent: var(--primary-color);
  margin-top: -4rem;
}

.company--epz {
  --company-accent: var(--secondary-color);
  margin-top: -4rem;
}

.company__logo {
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  border: 3px solid var(--white);
  background: var(--black);
  overflow: hidden;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
  animation: avatar-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.company--estate .company__logo,
.company--epz .company__logo {
  margin-top: calc(var(--avatar-size) / -2 - 0.75rem);
}

.company--epz .company__logo {
  animation-delay: 0.35s;
}

.company__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.company__eyebrow {
  margin-top: 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--company-accent);
  animation: rise-in 0.55s ease-out 0.25s both;
}

.company__name {
  margin-top: 0.25rem;
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.85rem, 5.5vw, 2.35rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-color);
  animation: rise-in 0.65s ease-out 0.28s both;
}

.company__name span {
  color: var(--company-accent);
}

.company__tagline {
  margin-top: 0.35rem;
  max-width: 18rem;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--dark-gray);
  animation: rise-in 0.65s ease-out 0.34s both;
}

.company-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin: 3rem 0 1.5rem 0;
  color: var(--dark-gray);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.company-divider::before,
.company-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--secondary-color),
    var(--primary-color),
    transparent
  );
  opacity: 0.55;
}

.company-divider span {
  flex-shrink: 0;
}

.tree__name {
  font-family: "Poppins", sans-serif;
  font-size: clamp(3rem, 3.5vw, 4.5rem);
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-color);
  animation: rise-in 0.65s ease-out 0.28s both;
}

.tree__name span {
  color: var(--secondary-color);
}

.tree__role {
  margin-top: 0.2rem;
  font-family: var(--font-accent);
  font-size: 1rem;
  font-style: italic;
  font-weight: 400;
  color: var(--primary-color);
  letter-spacing: 0.01em;
  animation: rise-in 0.65s ease-out 0.38s both;
}

.tree__links {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
  margin-top: 1.25rem;
  position: relative;
  z-index: 2;
}

.tree__card {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
  padding: 0.75rem 1.25rem 0.75rem 0.85rem;
  border-radius: 1.15rem;
  background: var(--card-bg);
  color: var(--text-color);
  text-decoration: none;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.06);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  border: 1px solid transparent;
  animation: rise-in 0.55s ease-out both;
}

.tree__card:nth-child(1) { animation-delay: 0.48s; }
.tree__card:nth-child(2) { animation-delay: 0.56s; }
.tree__card:nth-child(3) { animation-delay: 0.64s; }
.tree__card:nth-child(4) { animation-delay: 0.72s; }

.tree__card-icon {
  flex-shrink: 0;
  width: var(--card-icon-size);
  height: var(--card-icon-size);
  border-radius: 0.65rem;
  object-fit: cover;
  display: block;
}

.tree__card-label {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: left;
}

.tree__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgb(196 148 78 / 0.18);
  border-color: var(--company-accent, var(--secondary-color));
}

.tree__card:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

.tree__card:active {
  transform: translateY(0);
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: scale(1.04);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes avatar-in {
  from {
    opacity: 0;
    transform: scale(0.82);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tree__hero,
  .company__logo,
  .company__eyebrow,
  .company__name,
  .company__tagline,
  .tree__group,
  .tree__card {
    animation: none;
  }

  .tree__card:hover {
    transform: none;
  }
}

@media (min-width: 640px) {
  :root {
    --hero-height: min(42vh, 380px);
    --avatar-size: 8.5rem;
  }

  .tree__content {
    padding-inline: 2rem;
  }
}
