/* ZOLX.bio — Dark Theme Stylesheet (Microfluidic Bioseparations) */
/* © 2025 ZOLX Inc. */

/* ───────────── 1) Root & Design System ───────────── */
:root {
  --c-background: #0D1117;
  --c-surface: #161B22;
  --c-primary: #30E0A1;
  --c-primary-hover: #40FAC0;
  --c-text-primary: #E6EDF3;
  --c-text-secondary: #8B949E;
  --c-border: #30363D;
  --c-border-accent: rgba(48, 224, 161, 0.6);

  /* Mobile hero nudge helpers — tweak these to shift the headline & CTA vertically on phones */
  --hero-mobile-title-shift: 0rem;
  --hero-mobile-cta-shift: 0rem;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --transition: all 0.25s cubic-bezier(0.08, 0.82, 0.17, 1);
}

/* ───────────── 2) Base & Reset ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--c-text-primary);
  background-color: var(--c-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.2; font-weight: 700; }
p { margin: 0; color: var(--c-text-secondary); }
a { color: var(--c-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--c-primary-hover); }
img { max-width: 100%; display: block; }

.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ───────────── 3) Layout & Reusable ───────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 6rem 0;
  border-bottom: 1px solid var(--c-border);
}
section:last-of-type { border-bottom: none; }
.section__header { text-align: center; margin-bottom: 4rem; }
.section__title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  color: var(--c-text-primary);
  margin-bottom: 1rem;
}
.section__subtitle {
  max-width: 840px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.65;
}

/* Buttons */
.btn {
  display: inline-block;
  background-color: var(--c-primary);
  color: #061811;
  font-weight: 700;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--c-primary);
  transition: var(--transition);
}
.btn:hover { background-color: var(--c-primary-hover); border-color: var(--c-primary-hover); }

/* ───────────── 4) Header & Nav ───────────── */
.header {
  position: sticky;
  top: 0; z-index: 100;
  background: rgba(13, 17, 23, 0.7);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: 1rem 24px;
}
.header__logo img { height: 36px; width: auto; }
.header__nav { display: flex; align-items: center; gap: 2rem; }
.header__nav-link {
  color: var(--c-text-secondary);
  font-weight: 600;
  letter-spacing: 0.2px;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.header__nav-link:hover {
  color: var(--c-text-primary);
  border-bottom-color: var(--c-primary);
}
.header__nav-link.btn {
  border: 1px solid var(--c-primary);
  background: transparent;
  color: var(--c-primary);
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
}

/* Mobile toggle (hidden desktop) */
.header__toggle { display: none; }

/* ───────────── 5) Hero ───────────── */
.hero {
  position: relative;
  min-height: clamp(540px, 84vh, 820px);
  padding: clamp(5rem, 11vw, 8rem) 0;
  text-align: center;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; filter: saturate(0.95) contrast(1.05) brightness(0.9);
}
.hero__scrim {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(120% 100% at 50% 10%, rgba(4,8,10,0.0) 0%, rgba(4,8,10,0.5) 55%, rgba(4,8,10,0.72) 100%);
}
.hero__content {
  position: relative;
  z-index: 1;
  width: min(100%, 960px);
  margin: 0 auto;
  height: clamp(420px, 64vh, 620px);
}
.hero__title {
  position: absolute;
  top: clamp(7%, 10vw, 18%);
  left: 50%;
  transform: translate(-50%, -120px);
  width: min(100%, 920px);
  font-size: clamp(2.8rem, 8vw, 3.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
}
.hero__actions {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-52%, -30%);
  display: flex;
  justify-content: center;
  width: 100%;
  pointer-events: none;
}
.hero__actions .btn {
  pointer-events: auto;
  padding: 1.1rem 2.25rem;
  font-size: 1.05rem;
  box-shadow: 0 12px 32px rgba(48, 224, 161, 0.25);
}

.intro {
  background: rgba(13, 17, 23, 0.92);
  padding: 3rem 0;
}

.intro__lead {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--c-text-secondary);
}

/* ───────────── 6) Process / Platform ───────────── */
.process__video-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-lg);
}
.process__video { display: block; width: 100%; height: auto; }
.process__caption {
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  text-align: center;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
}

.process__grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.process-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.process-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.process-card p {
  color: var(--c-text-secondary);
  line-height: 1.6;
}

/* ───────────── 7) Use Cases Grid ───────────── */
.products__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}
.product-card {
  grid-column: span 6;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: var(--shadow-md);
}
@media (max-width: 900px) {
  .product-card { grid-column: span 12; }
}
.product-card__title { font-size: 1.2rem; margin-bottom: 0.5rem; }
.product-card p { margin-bottom: 0.75rem; }
.product-card__bullets { margin: 0; padding-left: 18px; color: var(--c-text-secondary); }
.product-card__bullets li { margin-bottom: 0.35rem; }

.section--surface {
  background: linear-gradient(135deg, rgba(48, 224, 161, 0.04) 0%, rgba(48, 224, 161, 0) 45%), var(--c-surface);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.insights__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.insight {
  background: rgba(22, 27, 34, 0.85);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.insight::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(140% 100% at 100% 0%, rgba(48, 224, 161, 0.18), transparent 55%);
  opacity: 0.35;
  pointer-events: none;
}

.insight__label {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: 0.5rem;
}

.insight__value {
  display: block;
  font-size: clamp(1.75rem, 4vw, 2.3rem);
  color: var(--c-text-primary);
  margin-bottom: 0.75rem;
}

.insight p {
  position: relative;
  z-index: 1;
  line-height: 1.6;
}

/* ───────────── 8) Leadership Gallery ───────────── */
.leadership-gallery {
  position: relative;
}

.gallery {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.gallery__viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-lg);
  background: rgba(13, 17, 23, 0.75);
  padding: clamp(1rem, 2.5vw, 1.75rem);
}

.gallery__track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery__slide {
  flex: 0 0 100%;
  min-width: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(0.85rem, 2.5vw, 1.4rem);
  background: linear-gradient(145deg, rgba(22, 27, 34, 0.92), rgba(10, 12, 16, 0.88));
  border-radius: calc(var(--radius-lg) - 4px);
  border: 1px solid rgba(48, 224, 161, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.gallery__slide img {
  width: 100%;
  height: clamp(260px, 45vw, 420px);
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.gallery__slide figcaption {
  padding: 0;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--c-text-secondary);
}

.gallery__control {
  background: rgba(13, 17, 23, 0.82);
  color: var(--c-primary);
  border: 1px solid rgba(48, 224, 161, 0.35);
  border-radius: 999px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: var(--transition);
}

.gallery__control:hover,
.gallery__control:focus-visible {
  outline: none;
  color: var(--c-primary-hover);
  border-color: var(--c-primary-hover);
  box-shadow: 0 0 0 4px rgba(48, 224, 161, 0.18);
}

.gallery__control--prev span,
.gallery__control--next span {
  font-size: 1.6rem;
  line-height: 1;
}

.gallery__note {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 1.02rem;
  color: var(--c-text-secondary);
}

@media (max-width: 768px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery__control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }

  .gallery__control--prev { left: 16px; }
  .gallery__control--next { right: 16px; }

  .gallery__viewport { grid-column: 1; }
}

.subpage-hero {
  padding: clamp(4rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
  background: radial-gradient(circle at top right, rgba(48, 224, 161, 0.08), transparent 55%),
              linear-gradient(180deg, rgba(13, 17, 23, 0.85) 0%, rgba(13, 17, 23, 0.65) 100%);
  position: relative;
  overflow: hidden;
}

.subpage-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url('img/figure_asli.webp') center/cover no-repeat;
  opacity: 0.12;
  mix-blend-mode: lighten;
  pointer-events: none;
}

.subpage-hero .container {
  position: relative;
  z-index: 1;
}

.subpage-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--c-primary);
  margin-bottom: 0.75rem;
}

.subpage-hero__title {
  font-size: clamp(2.25rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.subpage-hero__lede {
  max-width: 640px;
  color: var(--c-text-secondary);
  font-size: 1.05rem;
}

.team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.team-card {
  background: rgba(13, 17, 23, 0.75);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.team-card__photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(48, 224, 161, 0.65);
  box-shadow: 0 12px 28px rgba(8, 12, 18, 0.35);
}

.team-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(48, 224, 161, 0.18);
  border: 1px solid var(--c-primary);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--c-primary);
  letter-spacing: 0.08em;
}

.team-card h3 { font-size: 1.15rem; }
.team-card p {
  color: var(--c-primary);
  font-weight: 600;
}
.team-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--c-text-secondary);
  line-height: 1.6;
}

.subpage-cta {
  margin-top: clamp(3rem, 8vw, 4rem);
  padding: clamp(2.5rem, 6vw, 3.5rem);
  background: rgba(13, 17, 23, 0.75);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(48, 224, 161, 0.2);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.subpage-cta p {
  color: var(--c-text-secondary);
  max-width: 640px;
}

.header__nav-link[aria-current="page"] {
  color: var(--c-primary);
}

.contact-form {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  background: rgba(22, 27, 34, 0.8);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.form__row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form__row label {
  font-weight: 600;
  color: var(--c-text-primary);
}

.form__row input,
.form__row textarea {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
  background: var(--c-background);
  color: var(--c-text-primary);
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: var(--transition);
}

.form__row input:focus,
.form__row textarea:focus {
  outline: none;
  border-color: var(--c-border-accent);
  box-shadow: 0 0 0 3px rgba(48, 224, 161, 0.12);
}

.form__row--full { grid-column: 1 / -1; }

.form__actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.form-status {
  grid-column: 1 / -1;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(48, 224, 161, 0.1);
  border: 1px solid transparent;
}

.form-status.success {
  border-color: rgba(48, 224, 161, 0.45);
  color: var(--c-primary);
}

.form-status.error {
  border-color: rgba(255, 95, 109, 0.4);
  color: #ff5f6d;
  background: rgba(255, 95, 109, 0.08);
}

/* ───────────── 9) Footer ───────────── */
.footer { padding: 2rem 0 3rem; text-align: center; color: var(--c-text-secondary); }
.footer__logo { height: 28px; width: auto; display: inline-block; margin-bottom: 1rem; }
.footer__nav { display: flex; gap: 1.25rem; justify-content: center; margin-bottom: 0.75rem; flex-wrap: wrap; }
.footer__nav a { color: var(--c-text-secondary); }
.footer__nav a:hover { color: var(--c-primary); }

/* ───────────── 10) Mobile Nav ───────────── */
@media (max-width: 960px) {
  .header__toggle {
    display: flex;
    width: 36px; height: 24px;
    flex-direction: column; justify-content: space-between; align-items: center;
    background: transparent; border: none; cursor: pointer; padding: 0; z-index: 101;
  }
  .header__toggle span { width: 100%; height: 3px; background-color: var(--c-text-primary); border-radius: 2px; transition: all 0.3s ease-in-out; }
  .header.nav-open .header__toggle span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
  .header.nav-open .header__toggle span:nth-child(2) { opacity: 0; }
  .header.nav-open .header__toggle span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

  .header__nav-wrapper {
    position: fixed; inset: 0;
    background-color: var(--c-background);
    display: none; align-items: center; justify-content: center;
  }
  .header.nav-open .header__nav-wrapper { display: flex; }
  .header__nav { 
    flex-direction: column; gap: 2rem; font-size: 1.5rem;
  }
  .header__nav-link.btn { font-size: 1.25rem; padding: 0.75rem 2rem; }

  .container { padding: 0 20px; }
  .section { padding: 4rem 0; }
  .hero {
    min-height: 70vh;
    padding: clamp(4rem, 10vw, 5.5rem) 0;
  }
  .hero__content {
    min-height: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
  }
  .hero__title {
    position: static;
    transform: none;
    width: min(96%, 620px);
  }
  .hero__title { font-size: clamp(2.4rem, 9vw, 3.2rem); }
  .hero__subtitle {
    font-size: 1.05rem;
    margin: 1rem auto 2rem;
    padding: 0.8rem 1rem;
  }
  .hero__actions {
    position: static;
    transform: none;
    width: auto;
    pointer-events: auto;
  }
  .chatbox__log { max-height: 60vh; height: auto; padding: 1rem; }
}

/* Process video polish: crop/center, subtle grading */
.process__video-wrapper {
  aspect-ratio: 16 / 9;        /* consistent frame */
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;             /* enables cropping */
  position: relative;
}

/* Zoom in a touch and bias frame to the right to hide left-side arrows/logo */
.process__video {
  width: 100%;                  /* gentle zoom to crop edges */
  height: 100%;
  object-fit: cover;
  object-position: 50% center;  /* 50% is center; >50 shifts view right (cropping the left) */
  filter: saturate(1.04) contrast(1.05) brightness(0.97);
}

/* Soft vignette so edges melt into the dark page */
.process__video-wrapper::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 100% at 60% 40%,
              rgba(0,0,0,0) 0%,
              rgba(0,0,0,0.18) 70%,
              rgba(0,0,0,0.32) 100%);
}

/* Caption: slimmer, less bar-like */
.process__caption {
  background: transparent;
  border-top: none;
  color: var(--c-text-secondary);
  font-size: 0.95rem;
  padding: 0.75rem 0.5rem 0.25rem;
}








/* ===== Mobile hero fixes (phones) ===== */
@media (max-width: 600px) {
  :root {
    /* negative = up, positive = down */
    --hero-mobile-title-shift: -200px;  /* headline */
    --hero-mobile-cta-shift:   90px;   /* green button row */
  }

  .hero {
    min-height: 72vh;
    /* smaller top padding = everything moves up */
    padding-top: calc(4.5rem + env(safe-area-inset-top) - 0.5rem);
    padding-bottom: 3.25rem;
  }
}

  .hero__bg { object-position: 50% 52%; }

  .hero__title {
    font-size: clamp(1.6rem, 7.2vw, 2.2rem);
    line-height: 1.18;
    letter-spacing: -0.01em;
    max-width: 92vw;
    margin-inline: auto;
    /* Adjust in tandem with --hero-mobile-title-shift to move the headline up/down */
    margin-top: var(--hero-mobile-title-shift);
  }
  .hero__title br { display: none; }

  .hero__subtitle {
    font-size: 0.98rem;
    margin: 1rem auto 1.5rem;
    padding: 0.7rem 0.85rem;
  }

  .hero__actions {
    margin-top: var(--hero-mobile-cta-shift);
    transform: translateX(-10px);
  }

  .hero__actions .btn {
    font-size: 0.85rem;          /* smaller text */
    padding: 0.55rem 0.5rem;       /* less height & width */
    border-radius: 899px;        /* keep pill shape */
    margin-top: 0.6rem;          /* optional: tighten vertical spacing */
  }
}

/* (Optional) very small screens */
@media (max-width: 360px) {
  .hero__title { font-size: clamp(1.45rem, 7vw, 1.9rem); }
}

/* Landscape phones/tablets: keep hero proportions & gallery imagery balanced */
@media (max-width: 960px) and (orientation: landscape) {
  /* Knobs: negative = up / left, positive = down / right */
  :root {
    --hero-land-title-shift: -180px;  /* headline nudge */
    --hero-land-cta-shift:   -4px;  /* button row nudge */
  }

  .hero {
    /* Coarse move for the whole hero block: adjust padding to shift everything */
    min-height: 100vh;
    padding: clamp(3rem, 14vh, 5.5rem) 0; /* reduce top padding to move all content up */
  }

  .hero__content {
    height: auto;
    gap: clamp(2rem, 8vh, 3.5rem);
  }

  /* Title sizing + vertical nudge */
  .hero__title {
    position: static;          /* in-flow for landscape mobile */
    transform: none;
    font-size: clamp(2rem, 5vw, 2.6rem);
    max-width: 82vw;
    margin-inline: auto;
    margin-top: var(--hero-land-title-shift);  /* up/down */
  }

  /* Subtitle (optional) */
  .hero__subtitle {
    font-size: 1rem;
    margin: 0.75rem auto 1.25rem;
    padding: 0 0.5rem;
  }

  /* Button row: vertical nudge + optional horizontal nudge */
  .hero__actions {
    margin-top: var(--hero-land-cta-shift); /* up/down */
    transform: translate(-10%, 40px);            /* left/right; set to 0 if you don’t want a lateral nudge */
  }

  /* Button size (smaller/larger) */
  .hero__actions .btn {
    font-size: 0.6rem;        /* smaller text; try 0.85–0.95 */
    padding: 0.6rem 0.5rem;   /* less height/width; tweak as needed */
    border-radius: 999px;
    margin-top: 0.5rem;       /* tighten spacing to the title */
  }

  .gallery__viewport {
    aspect-ratio: 16 / 9;
  }

  .gallery__slide img {
    height: auto;
    max-height: clamp(220px, 70vh, 420px);
    width: 100%;
    object-fit: cover;
  }
}
