/* ============================================================
   Visual effects: ambient light, texture, motion.
   Everything here is decorative — the page must read correctly
   with all of it disabled (reduced motion, or JS off).
   ============================================================ */

/* ---------- animated aurora ---------- */
.aurora {
  position: absolute;
  inset: -20% -10% auto;
  height: 900px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.aurora i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--aurora-opacity);
  will-change: transform;
}
.aurora i:nth-child(1) {
  width: 620px; height: 620px;
  background: radial-gradient(circle, #7b3fb0 0%, transparent 70%);
  top: 4%; left: 46%;
  animation: drift-a 22s ease-in-out infinite;
}
.aurora i:nth-child(2) {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #4a2277 0%, transparent 70%);
  top: 22%; left: 18%;
  animation: drift-b 27s ease-in-out infinite;
}
.aurora i:nth-child(3) {
  width: 460px; height: 460px;
  background: radial-gradient(circle, #9b5fd0 0%, transparent 72%);
  top: 12%; left: 70%;
  animation: drift-c 31s ease-in-out infinite;
}

@keyframes drift-a {
  0%, 100% { transform: translate3d(-20%, 0, 0) scale(1); }
  50%      { transform: translate3d(10%, 40px, 0) scale(1.12); }
}
@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); }
  50%      { transform: translate3d(60px, -30px, 0) scale(.92); }
}
@keyframes drift-c {
  0%, 100% { transform: translate3d(0, 10px, 0) scale(.95); }
  50%      { transform: translate3d(-50px, 50px, 0) scale(1.1); }
}

/* ---------- grid lines with a soft radial fade ---------- */
.gridlines::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 78%);
}

/* keeps hero content above the ambient layers */
.hero__inner, .section > .container { position: relative; z-index: 1; }

/* ---------- scroll reveal ----------
   Hidden only when JS is present AND motion is welcome. main.js adds a
   hard timeout fallback so a missed observer can never leave the page blank. */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: .09s; }
.js .reveal[data-delay="2"] { transition-delay: .18s; }
.js .reveal[data-delay="3"] { transition-delay: .27s; }

/* ---------- cards that light up ---------- */
.glow {
  position: relative;
  isolation: isolate;
  transition: transform .25s ease, border-color .25s ease;
}
.glow::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(155,95,208,.75), rgba(89,44,130,.1) 55%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .28s ease;
  pointer-events: none;
  z-index: -1;
}
.glow:hover { transform: translateY(-4px); }
.glow:hover::after { opacity: 1; }

/* ---------- stat row ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, var(--panel-tint), transparent 60%), var(--bg-elevated);
  padding: var(--space-7) var(--space-6);
}
.stat { text-align: center; }
.stat__figure {
  font-size: clamp(2.1rem, 4.4vw, 3.1rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
  background: linear-gradient(100deg, var(--grad-from) 10%, var(--grad-to) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label { color: var(--text-muted); font-size: .95rem; margin-top: var(--space-3); }
.stat + .stat { border-inline-start: 1px solid var(--border-soft); }
@media (max-width: 760px) {
  .stat + .stat { border-inline-start: 0; border-top: 1px solid var(--border-soft); padding-top: var(--space-5); }
}

/* ---------- marquee of functions ---------- */
.marquee {
  overflow: hidden;
  padding-block: var(--space-5);
  border-block: 1px solid var(--border-soft);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track {
  display: flex;
  gap: var(--space-6);
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-faint);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
}
.marquee__item::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--purple-500);
  flex: none;
}
@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
/* RTL reads the other way, so the belt travels the other way too */
html[dir="rtl"] .marquee__track { animation-direction: reverse; }

/* ---------- bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
.bento > * { min-width: 0; }
.bento__wide { grid-column: span 2; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .bento__wide { grid-column: span 1; }
}

/* ---------- the proposal mock ---------- */
.proposal {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--panel-tint), transparent 55%), var(--bg-elevated);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
}
.proposal__bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: var(--space-5);
}
.proposal__dots { display: flex; gap: 6px; }
.proposal__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); display: block; }
.proposal__title { font-size: .9rem; color: var(--text-muted); font-weight: 600; }

.teams { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.team {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  padding: var(--space-5);
}
.team__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.team__name { font-weight: 700; font-size: 1rem; }
.team__count { font-size: .8rem; color: var(--text-faint); }
.role {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 0;
  border-top: 1px solid var(--border-soft);
}
.role__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--purple-600), var(--purple-800));
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.role__text { min-width: 0; }
.role__title { font-size: .92rem; font-weight: 600; }
.role__meta { font-size: .78rem; color: var(--text-faint); }
.role__free {
  margin-inline-start: auto;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft-bg);
  border: 1px solid var(--accent-soft-border);
  color: var(--accent-soft-fg);
  white-space: nowrap;
  flex: none;
}
.team__activate {
  margin-top: var(--space-4);
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--purple-700);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  border: 0;
  cursor: default;
}

/* ---------- motion off ---------- */
@media (prefers-reduced-motion: reduce) {
  .aurora i { animation: none; }
  .marquee__track { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .glow:hover { transform: none; }
  html { scroll-behavior: auto; }
}
