/* ============================================================
   Bayan Healthcare Analytics — styles
   Inspired by the webgamma.ca aesthetic: white, minimal,
   oversized light-weight headlines, colorful rounded cards.
   ============================================================ */

:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #757677;
  --line: #e9e9e9;
  --card: #f0f0f0;
  --card-soft: #f6f6f6;

  --blue: #0056a7;
  --green: #0aa342;
  --orange: #f45e09;
  --gold: #e6a100;
  --purple: #7b5ea7;
  --teal: #0a8f8f;

  --radius-card: 20px;
  --radius-pill: 100px;

  --maxw: 1200px;
  --pad-x: 24px;
  --sect-y: 100px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --font: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

h1, h2, h3 {
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  padding: 16px 26px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease),
              color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }

.btn--pill {
  background: #fff; color: var(--ink);
  border-color: var(--line);
  padding: 12px 22px; font-size: 15px;
}
.btn--pill:hover { background: var(--accent, var(--ink)); color: #fff; border-color: transparent; }

.btn--big {
  background: var(--ink); color: #fff;
  font-size: 18px; padding: 20px 40px;
}
.btn--big:hover { background: #000; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { display: inline-flex; }
.brand__text {
  display: flex; flex-direction: column;
  color: var(--ink); font-weight: 600; font-size: 19px;
  line-height: 1; letter-spacing: -0.01em;
}
.brand__sub {
  font-weight: 400; font-size: 11px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); margin-top: 3px;
}

.nav { display: flex; align-items: center; gap: 30px; }
.nav a { color: var(--ink); font-size: 16px; font-weight: 500; position: relative; }
.nav a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--ink);
  transition: width .28s var(--ease);
}
.nav a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  background: var(--ink); color: #fff !important;
  padding: 11px 20px; border-radius: var(--radius-pill);
  transition: transform .25s var(--ease);
}
.nav__cta:hover { transform: translateY(-2px); }

.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px; background: var(--ink);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: flex; flex-direction: column;
  padding: 8px var(--pad-x) 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.mobile-nav a {
  color: var(--ink); font-size: 20px; font-weight: 500;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.mobile-nav a:last-child { border-bottom: 0; }

/* ---------------- Hero ---------------- */
.hero {
  padding-top: clamp(64px, 12vw, 140px);
  padding-bottom: clamp(56px, 9vw, 110px);
}
.hero__title {
  font-size: clamp(2.7rem, 7.4vw, 5rem);
  max-width: 15ch;
  margin-bottom: 34px;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .word { display: inline-block; }
/* Only hide the words when JS is present to animate them back in. */
.js .hero__title .word {
  transform: translateY(110%);
  opacity: 0;
}
.hero__title .accent { color: var(--blue); }
.hero.is-in .hero__title .word {
  animation: wordUp .8s var(--ease) forwards;
}
/* Safety net resolves directly to the visible end-state (no animation needed). */
.fallback-visible .hero__title .word { transform: none; opacity: 1; }
.hero__title .line:nth-child(1) .word:nth-child(1) { animation-delay: .05s; }
.hero__title .line:nth-child(1) .word:nth-child(2) { animation-delay: .12s; }
.hero__title .line:nth-child(1) .word:nth-child(3) { animation-delay: .19s; }
.hero__title .line:nth-child(2) .word:nth-child(1) { animation-delay: .26s; }
.hero__title .line:nth-child(2) .word:nth-child(2) { animation-delay: .33s; }
.hero__title .line:nth-child(2) .word:nth-child(3) { animation-delay: .40s; }
@keyframes wordUp { to { transform: translateY(0); opacity: 1; } }

.hero__lead {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  max-width: 46ch;
  color: var(--muted);
  margin-bottom: 34px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------------- Section scaffolding ---------------- */
.section { padding-block: var(--sect-y); }
.section__head { max-width: 640px; margin-bottom: 56px; }
.section__head h2 { font-size: clamp(2rem, 5vw, 3.6rem); margin-bottom: 18px; }
.section__head p { font-size: clamp(1rem, 1.5vw, 1.2rem); }
.section__head-lead { max-width: 52ch; }

/* ---------------- Featured work ---------------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.project {
  background: var(--card);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.project:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .28);
}
.project__preview {
  padding: 34px 34px 0;
  overflow: hidden;
}
.project__preview .mock {
  width: 100%; height: auto; display: block;
  border-radius: 12px 12px 0 0;
  transition: transform .5s var(--ease);
}
.project:hover .project__preview .mock { transform: scale(1.03); }

.project__body { padding: 26px 34px 34px; }
.project__meta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--accent);
  text-transform: none; margin-bottom: 12px;
}
.project__meta .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
}
.project__title {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  color: var(--ink); margin-bottom: 12px;
}
.project__body p { font-size: 16px; margin-bottom: 22px; max-width: 42ch; }

.tag-internal {
  display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 500; color: var(--muted);
  background: rgba(0, 0, 0, .05);
  padding: 8px 16px; border-radius: var(--radius-pill);
}

/* ---------------- Services ---------------- */
.section--services { background: var(--card-soft); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 32px 30px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.service:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -30px rgba(0, 0, 0, .22); }
.service__num {
  font-size: 14px; font-weight: 600; letter-spacing: .08em;
  color: var(--blue); margin-bottom: 20px;
}
.service h3 { font-size: 1.5rem; margin-bottom: 12px; }
.service p { font-size: 15.5px; }

/* ---------------- Mission band ---------------- */
.section--mission { background: var(--ink); }
.mission__inner { max-width: 900px; text-align: center; margin-inline: auto; }
.section--mission h2 {
  color: #fff; font-size: clamp(2rem, 4.6vw, 3.4rem);
  margin-bottom: 26px;
}
.section--mission p {
  color: rgba(255, 255, 255, .72);
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  max-width: 60ch; margin: 0 auto 34px;
}

/* ---------------- Why teams ---------------- */
.why-list { list-style: none; margin: 0; padding: 0; }
.why-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 28px 4px;
  border-top: 1px solid var(--line);
}
.why-row:last-child { border-bottom: 1px solid var(--line); }
.why-row__label {
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
  color: var(--ink); font-weight: 400; letter-spacing: -0.01em;
}
.why-row__tags { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-flex; align-items: center;
  font-size: 14px; font-weight: 500; color: var(--ink);
  background: var(--card); padding: 9px 16px;
  border-radius: var(--radius-pill);
}

/* ---------------- Platforms marquee ---------------- */
.section--platforms { padding-block: 70px; }
.platforms__label {
  text-align: center; font-size: 15px;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); margin-bottom: 42px;
}
.marquee { overflow: hidden; width: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track {
  display: flex; align-items: center; gap: 72px;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 500; color: #c4c4c4;
  white-space: nowrap; letter-spacing: -0.01em;
  transition: color .3s var(--ease);
}
.marquee__item:hover { color: var(--ink); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------- Contact ---------------- */
.section--contact { padding-block: clamp(90px, 12vw, 160px); }
.contact__inner { text-align: center; max-width: 800px; margin-inline: auto; }
.contact__eyebrow {
  font-size: 15px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); margin-bottom: 16px;
}
.contact__title { font-size: clamp(2.6rem, 7vw, 5rem); margin-bottom: 26px; }
.contact__lead {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  max-width: 50ch; margin: 0 auto 40px;
}

/* ---------------- Footer ---------------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px 30px; }
.footer__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__name { color: var(--ink); font-weight: 600; font-size: 17px; }
.footer__loc { font-size: 14px; color: var(--muted); }
.footer__links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer__links a { color: var(--ink); font-size: 15px; font-weight: 500; }
.footer__links a:hover { color: var(--blue); }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-top: 26px; font-size: 14px; color: var(--muted);
}

/* ---------------- Reveal animation ---------------- */
/* Hidden only when JS is available; no-JS keeps content visible. */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
/* Safety net jumps straight to the end-state (no transition dependency). */
.fallback-visible .reveal { opacity: 1; transform: none; transition: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  :root { --sect-y: 72px; }
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  body { font-size: 17px; }
  .work-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .why-row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .project__preview { padding: 24px 24px 0; }
  .project__body { padding: 22px 24px 28px; }
}
