/* Tri Text Section: top paragraph + dual lower columns */
.tri-text {
  --tri-max-width: 1240px;
  --tri-gap: clamp(2.2rem, 2vw + 1rem, 4rem);
  --tri-outer-space: clamp(7rem, 14vh, 18rem); /* separation from showcase */
  --tri-inner-pad: clamp(2.4rem, 3vw, 4.4rem);
  --tri-blur-bg: 22px;
  --tri-radius: 2.4rem;
  position: relative;
  margin: var(--tri-outer-space) auto 0;
  padding-inline: 1.2rem; /* keep gutters aligned with rest of layout */
  isolation: isolate;
}

.tri-text__inner {
  max-width: var(--tri-max-width);
  margin: 0 auto;
  padding: var(--tri-inner-pad) clamp(1.2rem, 2vw, 2.6rem) clamp(3.2rem, 4vw, 4.8rem);
  background: var(--panel-bg);
  border: 1px solid hsl(220 10% 22% / 0.5);
  border-radius: var(--tri-radius);
  backdrop-filter: blur(var(--tri-blur-bg)) saturate(1.15) contrast(1.02);
  -webkit-backdrop-filter: blur(var(--tri-blur-bg)) saturate(1.15) contrast(1.02);
  box-shadow:
    0 0 0 1px hsl(0 0% 100% / 0.03) inset,
    0 4px 14px -4px rgba(0,0,0,0.55),
    0 18px 38px -12px rgba(0,0,0,0.55);
  position: relative;
  overflow: hidden;
}

/* Subtle moving highlight */
/* Soft vignette highlight (simplified from animated sweep) */
.tri-text__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 65% 25%, hsl(0 0% 100% / 0.05), transparent 65%),
    linear-gradient(180deg, hsl(0 0% 100% / 0.03), transparent 55%);
  mix-blend-mode: overlay;
  pointer-events: none;
  opacity: .9;
}

/* animation removed (no motion needed for neutral panel) */

.tri-text__lead-block { text-align: center; margin: 0 0 clamp(2.6rem, 4.5vh, 4.2rem); }

.tri-text__lead-title {
  font-size: clamp(2.3rem, 1.9rem + 1.4vw, 3.8rem);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: .7px;
  margin: 0 0 1.4rem;
  background: linear-gradient(90deg, var(--icon-1) 10%, var(--icon-2-light) 55%, var(--icon-1) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-wrap: balance;
  filter: drop-shadow(0 0 14px hsla(var(--active-color), 95%, 60%, 0.5)) drop-shadow(0 0 30px hsla(var(--active-color), 95%, 60%, 0.2));
  position: relative;
}

.tri-text__lead-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.8rem;
  transform: translateX(-50%);
  width: clamp(10rem, 24%, 18rem);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--icon-2) 45%, var(--icon-2-light) 55%, transparent);
  filter: drop-shadow(0 0 6px var(--theme));
  opacity: .75;
  pointer-events: none;
}

.tri-text__lead-body {
  font-size: clamp(1.4rem, 1.25rem + .5vw, 2rem);
  line-height: 1.42;
  max-width: 76ch;
  margin: 0 auto;
  color: var(--icon-8);
  text-wrap: pretty;
}

.tri-text__title {
  font-size: clamp(1.5rem, 1.3rem + .6vw, 2.1rem);
  font-weight: 600;
  margin: 0 0 .9rem;
  letter-spacing: .5px;
  background: linear-gradient(90deg, var(--icon-1), var(--icon-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 4px hsla(var(--active-color), 95%, 60%, 0.35));
}

.tri-text__body {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: var(--icon-8);
}

.tri-text__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(38ch, 100%), 1fr));
  gap: var(--tri-gap);
  align-items: start;
}

.tri-text__col {
  font-size: clamp(1.3rem, 1.15rem + .3vw, 1.6rem);
  line-height: 1.55;
  letter-spacing: .35px;
  margin: 0;
  color: var(--icon-8);
  text-wrap: pretty;
  position: relative;
  opacity: 0;
  animation: triFade .9s var(--easing-standard) forwards;
}

.tri-text__col:nth-child(2) { animation-delay: .18s; }

@keyframes triFade {
  from { opacity: 0; transform: translateY(1.2rem) scale(.985); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* Light dividers inside columns on wider screens */
@media (min-width: 880px) {
  .tri-text__col { padding-inline: .5rem; }
  .tri-text__col + .tri-text__col { border-left: 1px solid hsla(var(--active-color), 70%, 65%, 0.12); }
}

/* Desktop refinements: narrower max width & tighter lower text to emphasize lead */
@media (min-width: 1100px) {
  .tri-text { --tri-max-width: 1020px; }
  .tri-text__inner { padding: var(--tri-inner-pad) 3.2rem 4.6rem; }
  .tri-text__col { font-size: 1.45rem; line-height: 1.5; }
}

/* Adjust spacing for tighter mobile view */
@media (max-width: 640px) {
  .tri-text { --tri-outer-space: clamp(5rem, 12vh, 10rem); }
  .tri-text__inner { padding: clamp(2rem, 5vw, 3rem) 1.4rem clamp(2.6rem, 5vw, 3.6rem); }
  .tri-text__lead { margin-bottom: 2rem; }
}

/* Reduced motion compliance */
@media (prefers-reduced-motion: reduce) {
  .tri-text__inner::before { animation: none; }
  .tri-text__col { animation: none; opacity: 1; }
}
