/* CONNEX CaseTrack — brand colours sampled from the logo */
:root {
  --navy: #1f2a5c;
  --navy-deep: #161f47;
  --yellow: #f0c400;
  --yellow-soft: #fff6cc;
  --graphite: #424242;
  --ink: #1b1f2e;
  --muted: #5b6275;
  --line: #e4e6ee;
  --paper: #ffffff;
  --mist: #f5f6fa;
  --radius: 14px;
  --font-display: "Jost", "Gill Sans", "Gill Sans MT", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; margin: 0; color: var(--navy); }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 3px; background: var(--yellow); border-radius: 2px; }
.eyebrow-y { color: var(--yellow); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 500; font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 14px 26px; border-radius: 999px;
  background: var(--yellow); color: var(--navy-deep);
  text-decoration: none; border: 2px solid var(--yellow);
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(240,196,0,.7); }
.btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); box-shadow: none; }
.btn-sm { padding: 9px 18px; font-size: .92rem; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-mark { height: 28px; width: auto; }
.brand-word { display: flex; flex-direction: column; line-height: 1; font-family: var(--font-display); }
.bw-connex { color: var(--navy); font-size: 1.05rem; letter-spacing: .3em; font-weight: 500; }
.bw-ct { color: var(--yellow); font-size: .62rem; letter-spacing: .52em; margin-top: 4px; font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--muted); font-size: .98rem; }
.nav-links a:not(.btn):hover { color: var(--navy); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: 88px 0 104px;
  background:
    radial-gradient(900px 420px at 85% 10%, rgba(240,196,0,.16), transparent 60%),
    linear-gradient(180deg, var(--mist), var(--paper));
}
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.lede { font-size: 1.2rem; color: var(--muted); margin-top: 24px; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* Product mock */
.hero-visual { position: relative; }
.hero-visual::before {
  content: ""; position: absolute; inset: 40px -40px -30px 40px;
  background: var(--navy); border-radius: 24px; transform: rotate(3deg); opacity: .08;
}
.mock {
  position: relative; background: var(--paper); border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -24px rgba(31,42,92,.35), 0 2px 6px rgba(31,42,92,.06);
  overflow: hidden; font-size: .9rem;
}
.mock-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: var(--navy); color: rgba(255,255,255,.75); font-size: .8rem; letter-spacing: .04em; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.25); }
.mock-bar i:first-child { background: var(--yellow); }
.mock-bar span { margin-left: 10px; font-family: var(--font-display); }
.mock-body { padding: 22px; display: grid; gap: 18px; }
.mock-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mock-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mock-title { font-family: var(--font-display); font-size: 1.35rem; color: var(--navy); font-weight: 500; }
.pill { font-size: .75rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; }
.pill-open { background: var(--yellow-soft); color: #7a6300; }

.mock-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.step { font-size: .75rem; color: var(--muted); display: grid; gap: 8px; }
.step b { display: block; height: 6px; border-radius: 3px; background: var(--line); }
.step.done b { background: var(--navy); }
.step.now b { background: linear-gradient(90deg, var(--yellow) 55%, var(--line) 55%); }
.step.now { color: var(--navy); font-weight: 600; }

.mock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mock-card { background: var(--mist); border-radius: 10px; padding: 12px 14px; }
.mock-val { font-weight: 600; color: var(--ink); margin-top: 2px; }
.mock-sub { color: var(--muted); font-size: .8rem; }
.mock-feed { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.feed-item { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-y { background: var(--yellow); } .dot-n { background: var(--navy); } .dot-g { background: var(--graphite); }

/* Sections */
.section { padding: 104px 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head p:not(.eyebrow) { color: var(--muted); margin-top: 18px; font-size: 1.1rem; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature {
  padding: 28px 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); transition: border-color .2s ease, transform .2s ease;
}
.feature:hover { border-color: var(--navy); transform: translateY(-2px); }
.feature h3 { margin: 18px 0 8px; }
.feature p { color: var(--muted); font-size: .98rem; }
.f-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--yellow-soft); display: grid; place-items: center; }
.f-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--navy); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.section-navy { background: var(--navy); color: rgba(255,255,255,.78); }
.section-navy h2, .section-navy h3 { color: #fff; }
.flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: none; }
.flow li { border-top: 2px solid rgba(255,255,255,.16); padding-top: 24px; position: relative; }
.flow li::before { content: ""; position: absolute; top: -2px; left: 0; width: 48px; height: 2px; background: var(--yellow); }
.flow-n { font-family: var(--font-display); color: var(--yellow); font-size: .9rem; letter-spacing: .2em; }
.flow h3 { margin: 10px 0 10px; font-size: 1.4rem; font-weight: 500; }
.flow p { font-size: 1rem; }

.who { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.who-copy p:not(.eyebrow) { color: var(--muted); margin-top: 20px; font-size: 1.1rem; }
.who-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.who-list li { padding: 24px 26px; background: var(--mist); border-radius: var(--radius); border-left: 4px solid var(--yellow); }
.who-list p { color: var(--muted); margin-top: 6px; font-size: 1rem; }

/* CTA */
.cta { padding: 0 0 104px; }
.cta-inner {
  display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: center;
  background: var(--mist); border-radius: 24px; padding: 56px;
}
.cta-logo { width: 100%; height: auto; }
.cta p { color: var(--muted); margin: 14px 0 28px; max-width: 34em; }
.cta .cta-alt { margin: 16px 0 0; font-size: .95rem; }
.cta-alt a { color: var(--navy); }

/* Legal pages */
.legal { padding: 72px 0 104px; background: linear-gradient(180deg, var(--mist), var(--paper) 320px); }
.legal-inner { max-width: 760px; }
.legal h1 { font-size: clamp(2.2rem, 4vw, 3rem); }
.legal-updated { color: var(--muted); margin: 12px 0 36px; font-size: .95rem; }
.legal h2 { font-size: 1.35rem; margin: 44px 0 12px; }
.legal p, .legal li { color: #353a4a; }
.legal p + p { margin-top: 14px; }
.legal ul { padding-left: 1.2em; margin: 12px 0 0; display: grid; gap: 8px; }
.legal li::marker { color: var(--yellow); }
.legal a { color: var(--navy); text-decoration-color: var(--yellow); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.legal a:hover { text-decoration-color: var(--navy); }

/* Footer */
.footer { background: var(--navy-deep); color: rgba(255,255,255,.6); padding: 40px 0; font-size: .9rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-logo { height: 56px; width: auto; }
.footer-meta { display: grid; gap: 10px; justify-items: end; text-align: right; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: flex-end; }
.footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.footer a:hover { color: var(--yellow); }
.footer-links a { font-family: var(--font-display); letter-spacing: .02em; }
@media (max-width: 560px) {
  .footer-meta { justify-items: start; text-align: left; }
  .footer-links { justify-content: flex-start; }
}

/* ---------- Motion ---------- */
:root { --ease-out: cubic-bezier(.22, 1, .36, 1); }

/* Font loading: hold the page briefly, then fade in once fonts are ready */
.js body { opacity: 0; }
.js.fonts-ready body { opacity: 1; transition: opacity .45s ease; }

/* Scroll reveal */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }
.js .hero-visual[data-reveal] { transform: translateY(30px) scale(.97); transition-delay: 220ms; }
.js .hero-visual[data-reveal].in { transform: none; }

/* Hero mock: gentle float once it has arrived */
.hero-visual.in .mock { animation: float 7s ease-in-out 1.6s infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Case progress fills step by step */
.js .step b { transform-origin: left; transform: scaleX(0); }
.js .hero-visual.in .step b { animation: fill .6s var(--ease-out) forwards; }
.js .hero-visual.in .step:nth-child(1) b { animation-delay: .7s; }
.js .hero-visual.in .step:nth-child(2) b { animation-delay: 1.0s; }
.js .hero-visual.in .step:nth-child(3) b { animation-delay: 1.3s; }
.js .hero-visual.in .step:nth-child(4) b { animation-delay: 1.6s; }
@keyframes fill { to { transform: scaleX(1); } }

/* Current step keeps a soft shimmer */
.step.now b { position: relative; overflow: hidden; }
.step.now b::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
  transform: translateX(-100%);
  animation: shimmer 2.4s ease-in-out 2.2s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* "Open" status pill pulses */
.pill-open { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.pill-open::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: #c9a200;
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(240,196,0,.7); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(240,196,0,0); }
}

/* Info cards and activity feed arrive in sequence */
.js .mock-card, .js .feed-item { opacity: 0; transform: translateY(8px); }
.js .hero-visual.in .mock-card,
.js .hero-visual.in .feed-item { animation: pop .55s var(--ease-out) forwards; }
.js .hero-visual.in .mock-card:nth-child(1) { animation-delay: 1.1s; }
.js .hero-visual.in .mock-card:nth-child(2) { animation-delay: 1.25s; }
.js .hero-visual.in .feed-item:nth-child(1) { animation-delay: 1.7s; }
.js .hero-visual.in .feed-item:nth-child(2) { animation-delay: 2.1s; }
.js .hero-visual.in .feed-item:nth-child(3) { animation-delay: 2.5s; }
@keyframes pop { to { opacity: 1; transform: none; } }

/* Feature cards: icon lifts on hover */
.f-icon { transition: transform .3s var(--ease-out), background .3s ease; }
.feature:hover .f-icon { transform: translateY(-3px) rotate(-4deg); background: var(--yellow); }
.feature { box-shadow: 0 0 0 rgba(31,42,92,0); transition: border-color .2s ease, transform .3s var(--ease-out), box-shadow .3s ease; }
.feature:hover { box-shadow: 0 18px 36px -22px rgba(31,42,92,.45); }

/* Workflow: the yellow marker draws across each step */
.js .flow li::before { width: 0; transition: width .9s var(--ease-out); transition-delay: calc(var(--reveal-delay, 0ms) + 250ms); }
.js .flow li.in::before { width: 48px; }

/* Buttons: subtle sheen on hover */
.btn { position: relative; overflow: hidden; }
.btn:not(.btn-ghost)::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn:not(.btn-ghost):hover::after { transform: translateX(120%); transition: transform .7s ease; }

/* Responsive */
@media (max-width: 1024px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
}
@media (max-width: 860px) {
  .hero { padding: 56px 0 72px; }
  .hero-inner, .who { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual::before { display: none; }
  .nav-links a:not(.btn) { display: none; }
  .cta-inner { grid-template-columns: 1fr; padding: 36px 28px; gap: 32px; }
  .cta-logo { max-width: 220px; }
  .section { padding: 72px 0; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .features, .flow { grid-template-columns: 1fr; }
  .mock-grid { grid-template-columns: 1fr; }
  .bw-connex { font-size: .95rem; }
  .brand-mark { height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js .mock-card, .js .feed-item { opacity: 1; transform: none; }
  .js .step b { transform: none; }
  .js .flow li::before { width: 48px; }
}
