/* ══════════════════════════════════════════
   FOLD 3 — FEATURES (dark chrome, light chat)
══════════════════════════════════════════ */
#fold-features {
  background: var(--bg);
}

.features-intro {
  text-align: center;
  padding: 100px 52px 80px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border2);
}
.fi-ey {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple-l);
  margin-bottom: 16px;
}
.fi-h {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--t1);
  max-width: 680px;
  margin: 0 auto 18px;
}
.fi-h em {
  font-style: italic;
  color: var(--purple-l);
}
.fi-p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--t2);
  max-width: 500px;
  margin: 0 auto;
}

/* Feature fold rows — each with subtle ambient mesh */
.ff {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
  border-top: 1px solid var(--border2);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.ff::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 50% 60% at 88% 50%,
      rgba(123, 108, 240, 0.06) 0%,
      transparent 65%
    ),
    radial-gradient(
      ellipse 30% 40% at 5% 15%,
      rgba(123, 108, 240, 0.03) 0%,
      transparent 55%
    );
}
.ff:nth-child(even) {
  background: var(--bg-alt);
}
.ff:nth-child(even)::before {
  background:
    radial-gradient(
      ellipse 50% 60% at 12% 50%,
      rgba(123, 108, 240, 0.06) 0%,
      transparent 65%
    ),
    radial-gradient(
      ellipse 30% 40% at 95% 15%,
      rgba(123, 108, 240, 0.03) 0%,
      transparent 55%
    );
}
.ff-grid {
  position: relative;
  z-index: 1;
}

.ff-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 52px;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
}

/* Left text pane */
.ff-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple-l);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ff-num-line {
  width: 24px;
  height: 1px;
  background: var(--purple);
}
.ff-title {
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--t1);
  margin-bottom: 16px;
}
.ff-sub {
  font-size: 16px;
  line-height: 1.72;
  color: var(--t2);
  margin-bottom: 28px;
}
.ff-chips {
  margin-bottom: 36px;
}
.ff-cta {
  margin-top: 4px;
}

/* ══════════════════════════════════════════
   CHAT WINDOW — blended with dark sections
   The wrapper casts a soft purple halo into the
   dark background so the transition is gradual.
══════════════════════════════════════════ */

/* Wrapper creates the ambient glow that bleeds into the section */
.chat-win-wrap {
  position: relative;
}
.chat-win-wrap::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: radial-gradient(
    ellipse 80% 70% at 50% 50%,
    rgba(123, 108, 240, 0.13) 0%,
    rgba(123, 108, 240, 0.06) 40%,
    transparent 70%
  );
  pointer-events: none;
  border-radius: 40px;
  z-index: 0;
}

.chat-win {
  position: relative;
  z-index: 1;
  background: rgba(250, 250, 254, 0.94);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid rgba(123, 108, 240, 0.18);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 32px 80px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(123, 108, 240, 0.08);
  display: flex;
  flex-direction: column;
  height: 540px;
}

.cw-hdr {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.cw-hdr-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cw-hdr-av svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #fff;
  color: #fff;
}
.cw-hdr-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--chat-t1);
}
.cw-hdr-status {
  font-size: 11px;
  color: var(--purple);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cw-hdr-sdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.cw-msgs {
  flex: 1;
  min-height: 0; /* lets flex child shrink so overflow-y scrolls inside fixed-height .chat-win */
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
  background: rgba(248, 248, 252, 0.85);
}
.cw-msgs::-webkit-scrollbar {
  width: 4px;
}
.cw-msgs::-webkit-scrollbar-thumb {
  background: rgba(123, 108, 240, 0.2);
  border-radius: 2px;
}

.mrow {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.mrow.user {
  flex-direction: row-reverse;
}

.mav {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.mav.g {
  background: var(--purple);
}
.mav.g svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: #fff;
  color: #fff;
}
.mav.u {
  background: #eeeef8;
  border: 1px solid rgba(123, 108, 240, 0.15);
}
.mav.u svg {
  width: 13px;
  height: 13px;
  fill: #8888a8;
}

.mbody {
  max-width: 86%;
  display: flex;
  flex-direction: column;
}
.mrow.user .mbody {
  max-width: 72%;
  align-items: flex-end;
}

.mcrd {
  background: var(--chat-surface);
  border: 1px solid var(--chat-border);
  border-radius: 14px;
  border-top-left-radius: 4px;
  padding: 13px 16px;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--chat-t1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.mrow.user .mcrd {
  background: var(--chat-surface);
  border-color: rgba(123, 108, 240, 0.18);
  border-radius: 14px;
  border-top-right-radius: 4px;
}
.mtime {
  font-size: 10px;
  color: var(--chat-t3);
  margin-top: 4px;
  padding: 0 2px;
}
.mrow.user .mtime {
  text-align: right;
}

/* Structured content — light palette kept */
.ms-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--chat-t1);
  margin: 11px 0 6px;
}
.ms-title:first-child {
  margin-top: 2px;
}
.ms-quote {
  background: rgba(123, 108, 240, 0.04);
  border: 1px solid rgba(123, 108, 240, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--chat-t2);
  margin-bottom: 10px;
}
.ms-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}
.ms-pill {
  background: rgba(123, 108, 240, 0.06);
  border: 1px solid rgba(123, 108, 240, 0.18);
  color: var(--purple);
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
}
.ms-pill.green {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.25);
  color: #16a34a;
}
.ms-pill.amber {
  background: rgba(234, 179, 8, 0.08);
  border-color: rgba(234, 179, 8, 0.25);
  color: #b45309;
}
.ms-pill.red {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #dc2626;
}
.ms-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 4px;
}
.ms-list li {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--chat-t2);
  line-height: 1.5;
}
.ms-list li::before {
  content: "•";
  color: var(--purple);
  flex-shrink: 0;
  margin-top: 1px;
}

/* Action buttons — light */
.mactions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--chat-border);
}
.mact-edit {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--chat-t2);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-color 150ms,
    color 150ms;
}
.mact-edit:hover {
  border-color: var(--purple);
  color: var(--purple);
}
.mact-cont {
  background: var(--purple);
  color: #fff;
  border: none;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 150ms,
    transform 100ms;
}
.mact-cont:hover {
  background: var(--purple-d);
  transform: translateY(-1px);
}
.mact-cont:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.mact-cont.done {
  background: #22c55e;
}

/* Typing dots */
.mtyping {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 5px 2px;
}
.tdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
  opacity: 0.4;
  animation: tdota 1.2s ease-in-out infinite;
}
.tdot:nth-child(2) {
  animation-delay: 0.2s;
}
.tdot:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes tdota {
  0%,
  60%,
  100% {
    opacity: 0.4;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}
