/* CampusConnect "flow" layer: the premium touches (scroll progress, glass chips, gradient CTA,
   word-by-word title, scroll-lit statement). Additive only: nothing here is needed to read the page,
   and every motion is off under prefers-reduced-motion. */
:root {
  --font-display: 'Sora', 'Inter', system-ui, sans-serif;
  --grad-cta: linear-gradient(100deg, #3cf0a8 0%, #00d084 45%, #19c3c0 100%);
  --glass-bg: rgba(255, 255, 255, .72);
  --glass-line: rgba(0, 0, 0, .08);
  --glass-ink: #0b1620;
  --glass-sub: #475467;
}
:root[data-theme="dark"] {
  --glass-bg: rgba(22, 40, 58, .55);
  --glass-line: rgba(255, 255, 255, .14);
  --glass-ink: #f1f5f9;
  --glass-sub: #aab7c8;
}

/* ---- Display type: Sora on the big headlines, tighter tracking like the reference ---- */
.hero-title, .section-title, .cc-statement, .page-title {
  font-family: var(--font-display);
  letter-spacing: -0.035em;
}
.hero-title { font-weight: 700; line-height: 1.04; }
.section-title { font-weight: 700; }

/* ---- Scroll progress bar ---- */
.cc-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 6000; pointer-events: none;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, #00d084, #19c3c0 60%, #7c8cff);
}

/* ---- Navbar: frosted glass once the page scrolls ---- */
.top-navbar.is-scrolled, .cc-top-navbar.is-scrolled {
  -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px);
}

/* ---- Hero title: words rise out of a blur, one after another ---- */
.cc-word { display: inline-block; white-space: pre; }
html.js-motion .cc-split:not(.is-in) .cc-word { opacity: 0; transform: translateY(.45em); filter: blur(10px); }
html.js-motion .cc-split.is-in .cc-word {
  animation: ccWordIn .8s var(--ease-out, cubic-bezier(.22, 1, .36, 1)) backwards;
  animation-delay: calc(var(--w, 0) * 55ms + 120ms);
}
@keyframes ccWordIn { from { opacity: 0; transform: translateY(.45em); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }

/* ---- Primary call to action: gradient pill, text rolls up on hover, arrow in its own circle ---- */
.cc-cta {
  display: inline-flex !important; flex-direction: row !important; align-items: center !important; gap: .6rem; padding: .35rem .35rem .35rem 1.35rem !important; white-space: nowrap;
  border: 0; border-radius: 999px !important; background: var(--grad-cta) !important; color: #06281c !important;
  font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1;
  box-shadow: 0 8px 24px -8px rgba(0, 208, 132, .6);
  transition: transform .35s var(--ease-out, cubic-bezier(.22, 1, .36, 1)), box-shadow .35s;
}
.cc-cta:hover { transform: translateY(-2px) scale(1.02) !important; box-shadow: 0 14px 30px -8px rgba(0, 208, 132, .7) !important; color: #06281c !important; }
.cc-cta__text { position: relative; display: inline-block; overflow: hidden; height: 1.25em; line-height: 1.25em; }
.cc-cta__text > span { display: block; transition: transform .45s var(--ease-out, cubic-bezier(.22, 1, .36, 1)); }
.cc-cta:hover .cc-cta__text > span { transform: translateY(-100%); }
.cc-cta__arrow {
  display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 50%;
  background: #0b1620; color: #fff; transition: transform .45s var(--ease-out, cubic-bezier(.22, 1, .36, 1)), background .3s;
}
.cc-cta:hover .cc-cta__arrow { transform: rotate(45deg); background: #fff; color: #0b1620; }
.cc-cta__arrow .bi { margin: 0 !important; transition: none; }

/* ---- Hero visual with floating glass chips ---- */
.hero-visual { position: relative; display: inline-block; }
.hero-visual > img { position: relative; z-index: 1; }
.cc-chip {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: .65rem; text-align: left;
  padding: .7rem .95rem; border-radius: 18px; color: var(--glass-ink);
  background: var(--glass-bg); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .45);
  --px: 0px; --py: 0px;
  transform: translate3d(var(--px), var(--py), 0);
  transition: transform .5s var(--ease-out, cubic-bezier(.22, 1, .36, 1));
}
.cc-chip__icon { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 12px; font-size: 1.1rem; color: #06281c; background: var(--grad-cta); flex: none; }
.cc-chip__big { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.1; letter-spacing: -.02em; }
.cc-chip__sub { display: block; font-size: .72rem; color: var(--glass-sub); }
.cc-chip--a { top: 8%; left: -6%; }
.cc-chip--b { top: 40%; right: -8%; }
.cc-chip--c { bottom: 10%; left: 2%; }
.cc-chip__float { animation: ccFloat 6s ease-in-out infinite; }
.cc-chip--b .cc-chip__float { animation-duration: 7.2s; animation-delay: -2s; }
.cc-chip--c .cc-chip__float { animation-duration: 6.6s; animation-delay: -4s; }
@keyframes ccFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.cc-chip__float { display: flex; align-items: center; gap: .65rem; }

/* ---- Statement band: words light up as you scroll ---- */
.cc-statement-band { padding: clamp(3rem, 9vw, 6rem) 1rem; }
.cc-statement-band .container { max-width: 980px; }
.cc-statement { font-size: clamp(1.5rem, 4.2vw, 2.75rem); font-weight: 600; line-height: 1.25; text-align: center; margin: 0; text-wrap: balance; }
.cc-statement .cw { color: var(--ink-400, #98a2b3); opacity: .38; transition: opacity .35s var(--ease-out, ease), color .35s; }
.cc-statement .cw.on { opacity: 1; color: var(--text-primary, #0b1620); }
.cc-statement .cw.on.hl { color: var(--brand-text, #007a4d); }
:root[data-theme="dark"] .cc-statement .cw.on { color: var(--text-primary, #f1f5f9); }
:root[data-theme="dark"] .cc-statement .cw.on.hl { color: var(--brand-400, #00d084); }
html:not(.js-motion) .cc-statement .cw { opacity: 1; color: var(--text-primary, inherit); }

@media (max-width: 991.98px) { .cc-chip { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .cc-progress { display: none; }
  .cc-chip__float { animation: none; }
  .cc-chip { transition: none; }
  html.js-motion .cc-split .cc-word { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
  .cc-statement .cw { opacity: 1; transition: none; }
}
