/* ==========================================================================
   Avien Bio — homepage compositions
   ========================================================================== */

/* 2. Hero ------------------------------------------------------------------ */
.hero { padding-block: clamp(32px, 4vw, 56px) clamp(48px, 5vw, 72px); }
.hero-grid { align-items: center; row-gap: 40px; }
.hero-copy { grid-column: 1 / span 5; container-type: inline-size; }
/* Sized to the text column so "Move care forward." always holds one line (≈58px on desktop) */
.hero-copy h1 { margin-bottom: 24px; font-size: clamp(2.375rem, 11.3cqi, 3.625rem); }
.hero-copy .lede { max-width: 25em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-ranges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 48px 0 0;
  border-top: 1px solid var(--line);
}
.hero-ranges > div { padding: 14px 16px 0 0; }
.hero-ranges > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.hero-ranges dt { font-size: var(--fs-meta); color: var(--muted); }
.hero-ranges dd { margin: 2px 0 0; color: var(--ink); font-family: var(--font-head); font-size: 0.9375rem; font-weight: 700; letter-spacing: .01em; }

.hero-media { grid-column: 6 / span 7; }

/* Product still life: real packshots staged on one studio set */
.still-life {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-m);
  background:
    linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 58%),
    linear-gradient(180deg, #E3E9E6 0%, #DCE3DF 61.9%, #CFD8D4 62%, #E9EEEB 62.4%, #F0F3F1 100%);
  isolation: isolate;
}
.sl-item { position: absolute; }
.sl-item img { width: 100%; height: auto; position: relative; }
.sl-item::after {
  /* contact shadow on the bench */
  content: "";
  position: absolute;
  left: 4%; right: 4%;
  bottom: -2.5%;
  height: 9%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(18, 44, 64, .30), rgba(18, 44, 64, 0));
}
.sl-bs240 { width: 42%; left: 7%; bottom: 26%; z-index: 1; }
.sl-bc5130 { width: 27%; right: 9%; bottom: 28%; z-index: 1; }
.sl-glucose { width: 21%; right: 15%; bottom: 7%; z-index: 3; }
.sl-dengue { width: 31%; left: 27%; bottom: 6%; z-index: 4; }
.sl-glucose::after, .sl-dengue::after { bottom: -4%; height: 12%; left: 2%; right: 2%; }

.hero-media figcaption {
  display: flex;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  padding-top: 14px;
  font-size: var(--fs-meta);
  color: var(--muted);
}
.caption-main { color: var(--ink); font-family: var(--font-head); font-weight: 700; letter-spacing: .04em; }

/* 3. Product discovery ----------------------------------------------------- */
.discover { padding-top: clamp(56px, 5vw, 88px); }
.discover-head { align-items: end; row-gap: 32px; margin-bottom: 40px; }
.discover-title { grid-column: 1 / span 6; }
.discover-search { grid-column: 7 / span 6; }
.discover-results { margin-bottom: 48px; }
.discover-results .results-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--col-gap); }

.dir-features { row-gap: var(--col-gap); }
.dir-feature {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  text-decoration: none;
  background: var(--white);
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: border-color .2s var(--ease);
}
.dir-feature--wide { grid-column: span 6; }
.dir-feature:hover { border-color: var(--line-strong); }
.dir-feature:hover h3 { color: var(--blue); }
.dir-feature:hover .link-arrow { text-decoration: underline; }
.dir-feature:hover .link-arrow svg { transform: translateX(3px); }
.dir-stage { height: clamp(200px, 20vw, 264px); }
.dir-stage img { padding: 10% 14%; transition: transform .35s var(--ease); }
.dir-feature:hover .dir-stage img { transform: scale(1.03); }
.dir-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 20px 22px 22px; }
.dir-body h3 { font-size: 1.25rem; }
.dir-body .count, .cat-row .count { display: block; margin: 2px 0 0; }
.dir-body p { font-size: var(--fs-small); color: var(--ink-2); margin-bottom: 8px; }
.dir-body .link-arrow { margin-top: auto; }
.count { margin-left: 6px; color: var(--muted); font-family: var(--font-body); font-size: var(--fs-small); font-weight: 400; letter-spacing: 0; white-space: nowrap; }

/* Rapid-test grouping: three AVISURE kits in one composition */
.dir-feature--wide .dir-stage .kit { position: absolute; inset: auto; height: auto; padding: 0; }
.dir-feature--wide .dir-stage .kit-a { width: 27%; left: 17%; bottom: 34%; }
.dir-feature--wide .dir-stage .kit-c { width: 27%; right: 17%; bottom: 35%; }
.dir-feature--wide .dir-stage .kit-b { width: 34%; left: 33%; bottom: 12%; z-index: 2; }

.dir-index { margin-top: 40px; border-bottom: 1px solid var(--line); }
.dir-index .cat-row .stage { background: var(--white); }
.dir-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
  margin-top: 24px;
  font-size: var(--fs-small);
  color: var(--muted);
}

/* 4. Selected products ----------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 48px var(--col-gap);
}

/* 4. Plan your requirements ------------------------------------------------ */
.plan-head { align-items: end; row-gap: 20px; margin-bottom: clamp(40px, 4vw, 56px); }
.plan-title { grid-column: 1 / span 7; }
.plan-title h2 { max-width: 15em; }
.plan-intro { grid-column: 10 / span 3; color: var(--ink-2); max-width: 18em; }
.plan-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 var(--col-gap);
  margin: 0; padding: 0;
  list-style: none;
  counter-reset: step;
}
.plan-steps li {
  counter-increment: step;
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
}
.plan-steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 28px;
  color: var(--green);
  font-family: var(--font-head);
  font-size: var(--fs-meta);
  font-weight: 700;
  letter-spacing: .06em;
}
.plan-steps h3 { margin-bottom: 14px; font-size: 1.375rem; }
.plan-steps p { max-width: 27em; color: var(--ink-2); }
.plan-link {
  margin-top: 36px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
}
.plan-link:hover { color: var(--blue); border-bottom-color: var(--blue); text-decoration: none; }

/* 5. Company story --------------------------------------------------------- */
.story-grid { align-items: center; row-gap: 40px; }
.story-media { grid-column: 1 / span 6; }
.story-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 12% 40%; border-radius: var(--radius-m); }
.story-media figcaption { margin-top: 12px; font-size: var(--fs-meta); color: var(--muted); }
.story-copy { grid-column: 8 / span 5; }
.story-copy h2 { margin-bottom: 24px; }
.story-copy .lede { margin-bottom: 20px; color: var(--ink); }
.story-copy p:not(.lede):not(.eyebrow) { max-width: 32em; }
.story-link { margin-top: 32px; }

/* 6. Real-world presence --------------------------------------------------- */
.presence-head { row-gap: 12px; margin-bottom: 40px; }
.presence-head h2 { grid-column: 1 / span 8; }
.presence-sub { grid-column: 1 / span 8; color: var(--ink-2); font-size: var(--fs-lede); }
.presence-strip { row-gap: var(--col-gap); }
.presence-strip figure { overflow: hidden; border-radius: var(--radius-s); background: var(--stone); }
.presence-strip img { width: 100%; height: clamp(200px, 22vw, 296px); object-fit: cover; }
.ps-a { grid-column: span 5; }
.ps-b { grid-column: span 4; }
.ps-c { grid-column: span 3; }
.ps-c img { object-position: 60% 50%; }
.presence-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* 7. Enquiry --------------------------------------------------------------- */
.enquiry {
  position: relative;
  background: var(--ink-deep);
  color: #C9D5DE;
  padding-block: var(--section-y);
}
.enquiry::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: min(33%, 420px);
  height: 3px;
  background: var(--green-mark);
}
.enquiry-grid { row-gap: 48px; align-items: start; }
.enquiry-copy { grid-column: 1 / span 5; }
.enquiry .eyebrow { color: var(--green-on-ink); }
.enquiry .eyebrow::before { background: var(--green-on-ink); }
.enquiry h2 { color: var(--white); margin-bottom: 24px; }
.enquiry .lede { color: #C9D5DE; }
.enquiry-direct { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); }
.meta-on-ink { font-size: var(--fs-small); color: #9FB2C0; }
.enquiry-mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 8px;
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1.375rem;
  font-weight: 650;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.enquiry-mail svg { width: 22px; height: 22px; color: var(--green-on-ink); }
.enquiry-mail:hover { color: var(--white); text-decoration: underline; text-decoration-color: var(--green-on-ink); }
.enquiry-mail:focus-visible { outline-color: var(--green-on-ink); }
.enquiry-direct p + p { margin-top: 0; }

.enquiry-form {
  grid-column: 7 / span 6;
  padding: clamp(24px, 3vw, 40px);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-m);
}
.preview-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-size: var(--fs-small);
  color: #C9D5DE;
}
.preview-note svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--green-on-ink); }
.enquiry .form-status {
  margin-top: 20px;
  padding: 16px 18px;
  border-left: 2px solid var(--green-on-ink);
  background: rgba(255,255,255,.06);
  color: var(--white);
}
.enquiry .form-status.is-error { border-left-color: #FFB4AB; }
.enquiry .form-status a { color: var(--white); font-weight: 600; }
.enquiry .form-status:focus { outline: none; }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1100px) {
  .hero-copy { grid-column: 1 / span 6; }
  .hero-media { grid-column: 7 / span 6; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dir-feature--wide { grid-column: 1 / -1; }
  .dir-feature { grid-column: span 6; }
}
@media (max-width: 960px) {
  .hero-copy, .hero-media { grid-column: 1 / -1; }
  .hero-ranges { max-width: 520px; margin-top: 36px; }
  .still-life { aspect-ratio: 16 / 11; }
  .discover-title, .discover-search { grid-column: 1 / -1; }
  .story-media, .story-copy { grid-column: 1 / -1; }
  .story-copy { max-width: 640px; }
  .presence-head h2, .presence-head p { grid-column: 1 / -1; }
  .plan-title, .plan-intro { grid-column: 1 / -1; }
  .plan-steps { grid-template-columns: 1fr; }
  .plan-steps li { padding-bottom: 32px; }
  .plan-steps li::before { margin-bottom: 16px; }
  .plan-link { margin-top: 24px; }
  .ps-a { grid-column: 1 / -1; }
  .ps-b, .ps-c { grid-column: span 6; }
  .enquiry-copy, .enquiry-form { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  /* Mobile hero: products appear between the introduction and the actions, inside the first screen */
  .hero { padding-top: 24px; }
  .hero-grid { display: flex; flex-direction: column; align-items: stretch; row-gap: 0; }
  .hero-copy { display: contents; }
  .hero-copy .eyebrow { order: 1; margin-bottom: 16px; }
  .hero-copy h1 { order: 2; margin-bottom: 16px; font-size: clamp(2.125rem, 10.4vw, 2.75rem); }
  .hero-copy .lede { order: 3; }
  .hero-media { order: 4; margin-top: 24px; }
  .hero-actions { order: 5; margin-top: 24px; }
  .hero-ranges { order: 6; margin-top: 32px; }
  .hero-media figcaption { padding-top: 10px; }
  .caption-detail { display: none; }
  .still-life { aspect-ratio: 4 / 3; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-ranges > div { padding-right: 8px; }
  .hero-ranges > div + div { padding-left: 12px; }
  .discover-results .results-list { grid-template-columns: 1fr; }
  .dir-feature { grid-column: 1 / -1; }
  .dir-feature:not(.dir-feature--wide) { flex-direction: row; }
  .dir-feature:not(.dir-feature--wide) .dir-stage { width: 38%; height: auto; min-height: 168px; flex: none; }
  .dir-feature:not(.dir-feature--wide) .dir-stage img { padding: 12%; }
  .dir-feature--wide .dir-stage { height: 200px; }
  .dir-body { padding: 18px; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 40px 16px; }
  .pc-name { font-size: 1.0625rem; }
  .presence-strip img { height: 220px; }
  .ps-b, .ps-c { grid-column: 1 / -1; }
  .ps-c { display: none; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-card .stage { aspect-ratio: 4 / 3; }
  .dir-feature:not(.dir-feature--wide) { flex-direction: column; }
  .dir-feature:not(.dir-feature--wide) .dir-stage { width: 100%; height: 200px; }
}
