/* ==========================================================================
   Avatar Pages — "Why It Works" feature grid + animated Relationship flow
   Include AFTER pages.css and BEFORE mobile.css on every /group/*.php page
   ========================================================================== */

.section-avatar-inner {
  max-width: 1120px;
  margin: 0 auto;
}

/* ---------- Hero background video ---------- */

.avatar-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.avatar-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,8,6,0.72);
}

/* ---------- Hero dot texture — low-opacity, right side ---------- */

.page-hero-dots {
  position: absolute;
  top: -5%;
  right: -2%;
  width: 45%;
  height: 90%;
  background-image: radial-gradient(circle, rgba(255,255,255,0.12) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  mask-image: radial-gradient(ellipse 75% 75% at 65% 40%, black 5%, rgba(0,0,0,0.6) 35%, rgba(0,0,0,0.2) 60%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 65% 40%, black 5%, rgba(0,0,0,0.6) 35%, rgba(0,0,0,0.2) 60%, transparent 80%);
  pointer-events: none;
}

/* ---------- Why [X] Work With Altariss ---------- */

.section-avatar-why {
  padding: 130px 60px;
  background: #ffffff;
}

.section-avatar-why .eyebrow {
  text-align: center;
  display: block;
}

.section-avatar-why h2 {
  text-align: center;
  max-width: 620px;
  margin: 14px auto 68px;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 500;
  line-height: 1.18;
  color: #1a1815;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.why-card {
  background: var(--cream-bg);
  border-radius: 16px;
  padding: 44px 26px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 230px;
  transition: background .2s ease, color .2s ease, transform .28s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow .28s ease;
  opacity: 0;
  transform: translateY(26px);
}
.why-card.is-visible { opacity: 1; transform: translateY(0); }
.why-card:nth-child(2) { transition-delay: .12s, 0s, 0s, 0s; }
.why-card:nth-child(3) { transition-delay: .24s, 0s, 0s, 0s; }
.why-card:nth-child(4) { transition-delay: .36s, 0s, 0s, 0s; }

.why-card:hover {
  background: #1a1815;
  color: #ffffff;
  transform: translateY(-5px);
}

.why-card h3 {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 400;
  line-height: 1.2;
  flex: 1;
  color: inherit;
  margin: 0;
}

.why-card p {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.7;
  color: inherit;
  margin: 0;
}

.why-card-number {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 20px;
  opacity: 0.4;
  color: inherit;
}

/* ---------- The [X] Relationship — animated process flow ---------- */

.section-avatar-relationship {
  position: relative;
  overflow: hidden;
  padding: 70px 60px;
  background: #1a1815;
  text-align: center;
  border-radius: 22px;
}

.relationship-dots {
  position: absolute;
  top: -8%;
  right: -2%;
  width: 42%;
  height: 80%;
  background-image: radial-gradient(circle, rgba(255,255,255,0.18) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  mask-image: radial-gradient(ellipse 80% 80% at 65% 35%, black 5%, rgba(0,0,0,0.55) 38%, rgba(0,0,0,0.15) 62%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 65% 35%, black 5%, rgba(0,0,0,0.55) 38%, rgba(0,0,0,0.15) 62%, transparent 82%);
  pointer-events: none;
  z-index: 0;
}

.section-avatar-relationship .section-avatar-inner {
  position: relative;
  z-index: 1;
}

.section-avatar-relationship .eyebrow {
  text-align: center;
  display: block;
}

.section-avatar-relationship h2 {
  text-align: center;
  max-width: 620px;
  margin: 14px auto 0;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 500;
  line-height: 1.18;
  color: #ffffff;
}

.relationship-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 0 4px;
  margin: 48px 0 40px;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 210px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s ease, transform .65s ease;
}

.relationship-flow.is-visible .flow-step { opacity: 1; transform: translateY(0); }
.relationship-flow.is-visible .flow-step:nth-of-type(1) { transition-delay: .05s; }
.relationship-flow.is-visible .flow-step:nth-of-type(3) { transition-delay: .3s; }
.relationship-flow.is-visible .flow-step:nth-of-type(5) { transition-delay: .55s; }
.relationship-flow.is-visible .flow-step:nth-of-type(7) { transition-delay: .8s; }

.flow-step-num {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  margin-bottom: 20px;
  background: #1a1815;
  flex-shrink: 0;
}

.flow-step-label {
  font-size: 19px;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.4;
  max-width: 190px;
  margin: 0;
}

.flow-line {
  flex: 0 1 64px;
  height: 1px;
  background: rgba(255,255,255,.18);
  margin-top: 37px;
  position: relative;
  overflow: hidden;
  align-self: flex-start;
}

.flow-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #51b4d5;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s cubic-bezier(.16,.84,.44,1);
}

.relationship-flow.is-visible .flow-line:nth-of-type(2)::after { transform: scaleX(1); transition-delay: .25s; }
.relationship-flow.is-visible .flow-line:nth-of-type(4)::after { transform: scaleX(1); transition-delay: .5s; }
.relationship-flow.is-visible .flow-line:nth-of-type(6)::after { transform: scaleX(1); transition-delay: .75s; }

.section-avatar-relationship .btn {
  background: #ffffff;
  border: none;
  color: #1a1815;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .6s ease .9s, transform .6s ease .9s;
}

.relationship-flow.is-visible ~ .btn {
  opacity: 1;
  transform: translateY(0);
}
