/* =========================================================
   Is this room for you? — yes / not-for-you cards
   ========================================================= */
.fit {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(50% 70% at 50% 100%, rgba(110, 30, 210, .28), transparent 70%),
    radial-gradient(30% 50% at 100% 70%, rgba(140, 40, 240, .3), transparent 70%),
    radial-gradient(30% 50% at 0% 80%, rgba(120, 30, 220, .26), transparent 70%),
    #050307;
}
.fit::before {                              /* seamless join with the section above */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 110px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, #050307, rgba(5, 3, 7, 0));
}
.fit::after {                               /* melt glow + mountains into the next section */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: clamp(120px, 14vw, 200px);
  z-index: 0;                               /* behind the mountains: fades only the background glow */
  pointer-events: none;
  background: linear-gradient(to top, #050307 0%, rgba(5, 3, 7, .85) 35%, rgba(5, 3, 7, 0) 100%);
}

.fit__sky {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

.fit__arc {                                 /* faint orbital arc, top right */
  position: absolute;
  right: -18%; top: -55%;
  width: 70%; aspect-ratio: 1;
  border-radius: 50%;
  border-bottom: 1px solid rgba(200, 150, 255, .28);
  border-left: 1px solid rgba(200, 150, 255, .12);
  box-shadow: 0 30px 60px -40px rgba(170, 90, 255, .45);
  transform: rotate(-12deg);
  z-index: 0;
  pointer-events: none;
  animation: fArc 60s linear infinite;
}

/* ---------- mountain layers (split from one PNG; GSAP parallax on the <img>) ---------- */
.fit__mtn {
  position: absolute;
  bottom: 0;                                /* bottom of the art is masked to transparent, so no bleed needed */
  width: clamp(200px, 30vw, 500px);
  z-index: 1;
  pointer-events: none;
  transform: translate3d(var(--rx, 0px), 0, 0);   /* cursor drift (fit.js) lives on the wrapper */
  transition: transform .8s var(--ease, ease);
}
.fit__mtn--l { left: -24px; }
.fit__mtn--r { right: -24px; }
.fit__mtn-img {
  display: block;
  width: 100%;
  height: auto;
  will-change: transform;
  backface-visibility: hidden;
  filter: drop-shadow(0 0 18px rgba(150, 60, 255, .25));
  /* only the bottom edge melts into the next section; the rest of the mountain stays fully visible */
  -webkit-mask-image: linear-gradient(to bottom, #000 52%, rgba(0, 0, 0, .5) 72%, transparent 88%);
          mask-image: linear-gradient(to bottom, #000 52%, rgba(0, 0, 0, .5) 72%, transparent 88%);
}

.fit__inner {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(28px, 3vw, 48px) clamp(16px, 3vw, 40px) clamp(48px, 6vw, 88px);
  text-align: center;
}

/* ---------- heading + divider ---------- */
.fit__title {
  margin: 0;
  font-family: "Crimson Text", Georgia, serif;
  font-weight: 400;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.15;
  color: #f7f3fb;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s var(--ease, ease), transform 1s var(--ease, ease);   /* no blur in the reveal: a blur transition per element re-rasterises every frame and made reveals stutter */
}
.fit.is-in .fit__title { opacity: 1; transform: none; filter: none; }

.fit__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px auto 0;
}
.fit__line {
  width: clamp(70px, 10vw, 110px);
  height: 1px;
  background: linear-gradient(90deg, transparent, #f7c47c);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 1.1s var(--ease, ease) .4s;
}
.fit__line:last-child { background: linear-gradient(90deg, #f7c47c, transparent); transform-origin: left center; }
.fit.is-in .fit__line { transform: scaleX(1); }
.fit__star {
  width: 16px; height: 16px;
  fill: #f7c47c;
  filter: drop-shadow(0 0 6px rgba(247, 196, 124, .9));
  transform: scale(0) rotate(-180deg);
  transition: transform .9s cubic-bezier(.34, 1.56, .64, 1) .2s;
}
.fit.is-in .fit__star { transform: scale(1) rotate(0); animation: fTwinkle 3.2s ease-in-out 1.4s infinite; }

/* ---------- cards ---------- */
.fit__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.6vw, 32px);
  margin-top: clamp(20px, 2.4vw, 30px);
  perspective: 1200px;
}
.fcard {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg; --lift: 0px;
  --accent: 190, 120, 255;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: clamp(14px, 1.6vw, 22px);
  padding: clamp(22px, 2.4vw, 32px) clamp(20px, 2.6vw, 40px);
  border-radius: 20px;
  text-align: left;
  overflow: hidden;
  outline: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(260px 200px at var(--mx) var(--my), rgba(var(--accent), .14), transparent 70%),
    linear-gradient(150deg, rgba(58, 22, 98, .6), rgba(20, 9, 36, .62));
  border: 1px solid rgba(190, 130, 255, .26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 18px 50px rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  opacity: 0;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translate3d(var(--fx, 0), calc(30px + var(--lift)), 0);
  transition: opacity 1s var(--ease, ease), transform 1s var(--ease, ease), border-color .4s, box-shadow .4s;
}
.fcard--yes { --fx: -40px; --accent: 247, 196, 124; }
.fcard--no  { --fx: 40px;  --accent: 255, 120, 190; }
.fit.is-in .fcard { opacity: 1; transform: rotateX(var(--rx)) rotateY(var(--ry)) translate3d(0, var(--lift), 0); }
.fit.is-in .fcard--yes { transition-delay: .5s, .5s, 0s, 0s; }
.fit.is-in .fcard--no  { transition-delay: .65s, .65s, 0s, 0s; }
.fit.is-in .fcard.is-tilting { transition-delay: 0s; transition-duration: .2s, .2s, .4s, .4s; }

.fcard::before {                            /* travelling light around the border */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--fang, 0deg), transparent 0 65%, rgba(var(--accent), .95) 78%, rgba(190, 120, 255, .9) 88%, transparent 97%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .5s;
  pointer-events: none;
}
.fcard:hover, .fcard:focus-visible {
  --lift: -6px;
  border-color: rgba(var(--accent), .45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 24px 60px rgba(110, 30, 220, .35), 0 0 0 1px rgba(var(--accent), .08);
}
.fcard:hover::before, .fcard:focus-visible::before { opacity: 1; animation: fRim 3.5s linear infinite; }

.fcard__glow {                              /* warm bloom, bottom-left (as in the design) */
  position: absolute;
  left: -15%; bottom: -45%;
  width: 70%; height: 90%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--accent), .22), transparent);   /* already soft: no filter blur */
  will-change: transform, opacity;
  pointer-events: none;
  animation: fGlow 7s ease-in-out infinite;
}
.fcard--no .fcard__glow { left: auto; right: -20%; bottom: -55%; opacity: .55; animation-delay: -3s; }

/* badge */
.fcard__badge {
  position: relative;
  flex: 0 0 auto;
  width: clamp(44px, 4vw, 54px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(150, 60, 240, .55), rgba(60, 16, 110, .7));
  box-shadow: 0 0 0 1px rgba(var(--accent), .25), 0 0 22px rgba(160, 70, 255, .55);
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), box-shadow .4s;
}
.fcard__badge::after {                      /* expanding pulse ring */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent), .6);
  opacity: 0;
}
.fit.is-in .fcard__badge::after { animation: fPulse 2.8s ease-out 1.8s infinite; }
.fcard--no .fcard__badge::after { animation-delay: 2.4s; }
.fcard__badge svg { width: 100%; height: 100%; overflow: visible; }
.fcard__ring {
  fill: none;
  stroke: rgba(var(--accent), .85);
  stroke-width: 1.6;
  stroke-dasharray: 132;
  stroke-dashoffset: 132;
  transform: rotate(-90deg);
  transform-origin: 24px 24px;
  transition: stroke-dashoffset 1.2s var(--ease, ease) .8s;
}
.fcard__mark {
  fill: none;
  stroke: #fff4e2;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  filter: drop-shadow(0 0 4px rgba(var(--accent), .9));
  transition: stroke-dashoffset .8s var(--ease, ease) 1.5s;
}
.fcard--no .fcard__mark { stroke: #ffd2e6; }
.fit.is-in .fcard__ring, .fit.is-in .fcard__mark { stroke-dashoffset: 0; }
.fcard:hover .fcard__badge, .fcard:focus-visible .fcard__badge { transform: scale(1.1) rotate(-8deg); box-shadow: 0 0 0 1px rgba(var(--accent), .5), 0 0 34px rgba(var(--accent), .55); }
.fcard--no:hover .fcard__badge, .fcard--no:focus-visible .fcard__badge { transform: scale(1.1) rotate(90deg); }
.fcard.is-redraw .fcard__mark { animation: fRedraw .7s var(--ease, ease); }
.fcard.is-redraw .fcard__badge { animation: fBounce .6s cubic-bezier(.34, 1.56, .64, 1); }

/* text */
.fcard__body { position: relative; flex: 1; min-width: 0; padding-top: 4px; }
.fcard__title {
  margin: 0;
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  font-weight: 600;
  font-size: clamp(17px, 1.5vw, 20px);
  color: #f7f3fb;
}
.fcard__list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.fcard__list li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 6px;
  margin-left: -6px;
  border-radius: 8px;
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  font-size: clamp(14px, 1.15vw, 15.5px);
  color: #ddd6e8;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity .6s var(--ease, ease), transform .6s var(--ease, ease), background-color .3s, color .3s;
}
.fit.is-in .fcard__list li { opacity: 1; transform: none; }
.fit.is-in .fcard--yes li:nth-child(1) { transition-delay: 1.0s, 1.0s, 0s, 0s; }
.fit.is-in .fcard--yes li:nth-child(2) { transition-delay: 1.12s, 1.12s, 0s, 0s; }
.fit.is-in .fcard--yes li:nth-child(3) { transition-delay: 1.24s, 1.24s, 0s, 0s; }
.fit.is-in .fcard--no li:nth-child(1)  { transition-delay: 1.15s, 1.15s, 0s, 0s; }
.fit.is-in .fcard--no li:nth-child(2)  { transition-delay: 1.27s, 1.27s, 0s, 0s; }
.fit.is-in .fcard--no li:nth-child(3)  { transition-delay: 1.39s, 1.39s, 0s, 0s; }
.fit.is-in .fcard .fcard__list li:hover {
  background-color: rgba(var(--accent), .08);
  color: #fff;
  transform: translateX(4px);
  transition-delay: 0s;
}
.fcard__spark {
  flex: 0 0 auto;
  width: 10px; height: 10px;
  fill: #e8c9ff;
  filter: drop-shadow(0 0 3px rgba(200, 140, 255, .9));
  transition: transform .5s var(--ease, ease), fill .3s;
}
.fcard__list li:hover .fcard__spark { transform: rotate(180deg) scale(1.5); fill: rgb(var(--accent)); }

/* click burst particles */
.fburst {
  position: absolute;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: rgb(var(--accent));
  box-shadow: 0 0 8px rgb(var(--accent));
  pointer-events: none;
  animation: fBurst .8s cubic-bezier(.2, .8, .3, 1) forwards;
}

/* ---------- keyframes ---------- */
@property --fang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes fRim     { to { --fang: 360deg; } }
@keyframes fArc     { to { transform: rotate(348deg); } }
@keyframes fTwinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(1.35) rotate(45deg); opacity: .8; } }
@keyframes fGlow    { 0%, 100% { transform: translate(0, 0) scale(1); opacity: 1; } 50% { transform: translate(8%, -6%) scale(1.12); opacity: .7; } }
@keyframes fPulse   { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes fRedraw  { 0% { stroke-dashoffset: 40; } 100% { stroke-dashoffset: 0; } }
@keyframes fBounce  { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1.1); } }
@keyframes fBurst   { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; } }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .fit__grid { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .fcard--yes, .fcard--no { --fx: 0px; }
}
@media (max-width: 560px) {
  .fcard { padding: 20px 18px; border-radius: 16px; }
  .fit__mtn { width: clamp(150px, 42vw, 240px); }
}
@media (prefers-reduced-motion: reduce) {
  .fit *, .fit *::before, .fit *::after { animation: none !important; transition: none !important; }
  .fit__title, .fcard, .fcard__list li { opacity: 1 !important; transform: none !important; filter: none !important; }
  .fit__line, .fit__star { transform: none !important; }
  .fcard__ring, .fcard__mark { stroke-dashoffset: 0 !important; }
}
