/* ==========================================================================
   Plexus - Coming soon
   Palette taken from the Plexus Suite brand proposal.
   ========================================================================== */

:root {
  /* Brand */
  --navy: #211f73;        /* institutional dark blue */
  --blue: #356afa;        /* institutional vibrant blue */
  --deep: #000844;        /* background of the "rainbow" key visual */
  --light: #f7f7f7;
  --white: #ffffff;

  /* Suite */
  --cl: #902d90;          /* Clinical Laboratory */
  --tm: #ff7b06;          /* Transfusion Medicine */
  --ap: #00b4e5;          /* Anatomic Pathology */
  --rc: #00a58f;          /* Renal Care */
  --spectrum: linear-gradient(90deg, #356afa 0%, #902d90 24%, #ff7b06 46%, #00b4e5 68%, #00a58f 86%, #356afa 100%);

  /* Text on light */
  --text: #2a2960;
  --muted: #66658a;
  --line: rgba(33, 31, 115, 0.1);

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Hero ------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--deep);
  /* Fills the viewport. The key visual is 16:9 and cropped symmetrically, so the
     band stays at the vertical center and the right-hand blocks keep landing on it. */
  height: 100svh;
  min-height: 560px;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  animation: hero-img 1.8s var(--ease) both;
}
.hero__scrim { position: absolute; inset: 0; pointer-events: none; }
.hero__stage { position: absolute; inset: 0; }

/* Everything on the right shares one right edge, like the wordmark in the brand deck */
.hero__wordmark,
.hero__top,
.hero__bottom { position: absolute; right: 13.25%; }

.hero__wordmark {
  top: 50%;
  width: 14.5%;
  transform: translateY(-50%);
  color: var(--white);
  text-decoration: none;
  animation: fade-up-center 1.2s var(--ease) 0.6s both;
}
.hero__wordmark .wordmark { width: 100%; height: auto; }
.hero__wordmark .wordmark .x { fill: currentColor; }

.hero__top {
  bottom: 58.5%;
  max-width: 44%;
  text-align: right;
  animation: fade-up 1.2s var(--ease) 0.25s both;
}
.hero__top .eyebrow {
  font-size: clamp(0.68rem, 0.85vw, 0.95rem);
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: clamp(0.5rem, 1vw, 1rem);
}
.hero h1 {
  font-size: clamp(2.25rem, 4.6vw, 5.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  text-wrap: balance;
}

.hero__bottom {
  top: 59.5%;
  max-width: 36%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: clamp(1rem, 1.6vw, 1.75rem);
  text-align: right;
  animation: fade-up 1.2s var(--ease) 0.9s both;
}
.hero__lead {
  font-size: clamp(0.92rem, 1.12vw, 1.25rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
  max-width: 38ch;
  text-wrap: pretty;
}

.chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; max-width: 27vw; /* two chips per row on the desktop stage */ }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem 0.45rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.72rem, 0.82vw, 0.9rem);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.chip img { width: auto; height: 1.15em; }
.chip:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.3); transform: translateY(-1px); }

.hero__cue {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  animation: fade-up 1.2s var(--ease) 1.4s both;
}
.hero__cue svg { width: 16px; height: 16px; animation: nudge 2.2s ease-in-out 2s infinite; }
.hero__cue:hover { color: var(--white); }

/* Suite ------------------------------------------------------------------ */
.suite {
  background: var(--light);
  color: var(--text);
  padding-block: clamp(4rem, 9vw, 7.5rem);
}
.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head .eyebrow { color: var(--blue); }
.section-head h2 {
  margin: 0.85rem 0 1rem;
  font-size: clamp(1.85rem, 3.2vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--navy);
  text-wrap: balance;
}
.section-head p { font-size: 1.05rem; color: var(--muted); text-wrap: pretty; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.25rem;
}
.card {
  --c: var(--blue);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-height: 230px;
  padding: 1.75rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  scroll-margin-top: 2rem;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.45s;
}
.card--cl { --c: var(--cl); }
.card--tm { --c: var(--tm); }
.card--ap { --c: var(--ap); }
.card--rc { --c: var(--rc); }
.card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--c) 35%, transparent);
  box-shadow: 0 24px 48px -24px color-mix(in srgb, var(--c) 55%, transparent);
}
.card__logo { width: min(100%, 215px); height: auto; }
.card__text { font-size: 0.95rem; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.card__mark {
  position: absolute;
  right: -22px;
  bottom: -26px;
  width: 132px;
  height: 118px;
  color: var(--c);
  opacity: 0.08;
  transition: opacity 0.45s, transform 0.45s var(--ease);
}
.card:hover .card__mark { opacity: 0.14; transform: translate(-4px, -4px); }

/* Footer ----------------------------------------------------------------- */
.footer {
  position: relative;
  background: var(--navy);
  color: var(--white);
  padding-block: clamp(3.5rem, 7vw, 6rem) 2rem;
}
.footer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--spectrum); }
.footer__cta {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.footer__cta h2 {
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}
.footer__cta p { margin-top: 0.75rem; color: rgba(255, 255, 255, 0.72); max-width: 44ch; }
.footer__action { display: flex; justify-content: flex-end; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -14px rgba(53, 106, 250, 0.9); }
.btn:hover svg { transform: translateX(3px); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem 2rem;
  padding-top: 1.75rem;
}
.footer__brand { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__brand .wordmark { width: 132px; height: auto; color: var(--white); }
.footer__brand .wordmark .x { fill: var(--blue); }
.footer__tag { font-size: 0.78rem; color: rgba(255, 255, 255, 0.6); letter-spacing: 0.02em; }
.footer__legal { font-size: 0.78rem; color: rgba(255, 255, 255, 0.6); text-align: right; }

/* Reveal on scroll (only when JS is running) ----------------------------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* Animations ------------------------------------------------------------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-up-center {
  from { opacity: 0; transform: translateY(calc(-50% + 14px)); }
  to { opacity: 1; transform: translateY(-50%); }
}
@keyframes hero-img {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* Portrait / small screens: stacked hero, ribbons anchored left ---------- */
@media (max-width: 899px), (orientation: portrait) {
  .hero { height: auto; min-height: 100svh; display: flex; flex-direction: column; }
  .hero__bg { object-position: 6% 50%; }
  .hero__scrim {
    background:
      linear-gradient(to top, rgba(0, 8, 68, 0.96) 0%, rgba(0, 8, 68, 0.82) 32%, rgba(0, 8, 68, 0.28) 62%, rgba(0, 8, 68, 0) 85%),
      linear-gradient(to bottom, rgba(0, 8, 68, 0.55) 0%, rgba(0, 8, 68, 0) 22%);
  }
  .hero__stage {
    position: relative;
    inset: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: min(var(--container), 100% - 2 * var(--gutter));
    margin-inline: auto;
    padding-block: 1.5rem 5.5rem;
  }
  .hero__wordmark,
  .hero__top,
  .hero__bottom {
    position: static;
    right: auto;
    max-width: none;
    text-align: left;
    transform: none;
    align-items: flex-start;
  }
  .hero__wordmark { width: clamp(132px, 38vw, 176px); margin-bottom: auto; animation-name: fade-up; }
  .hero__wordmark .wordmark .x { fill: var(--blue); }
  .hero__top { margin-top: 3rem; }
  .hero__top .eyebrow { font-size: 0.7rem; }
  .hero h1 { font-size: clamp(2.3rem, 10vw, 4rem); }
  .hero__bottom { margin-top: 1.25rem; gap: 1.25rem; }
  .hero__lead { font-size: 1rem; max-width: 42ch; }
  .chips { justify-content: flex-start; max-width: none; }
  .chip { font-size: 0.78rem; }
  .hero__cue { bottom: 1.1rem; }

  .footer__cta { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer__action { justify-content: flex-start; }
  .footer__legal { text-align: left; }
}

@media (max-width: 480px) {
  .card { min-height: 0; padding: 1.5rem; }
  .hero__cue { display: none; }
}

/* Reduced motion --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__bg, .hero__wordmark, .hero__top, .hero__bottom, .hero__cue, .hero__cue svg { animation: none !important; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .chip, .btn { transition: none; }
}
