/* ============================================================
   Novo Core Labs — Homepage (front-page) styles
   Ported from website/index2.html. Loaded only on the front page.
   Generic class names (.container/.btn/.badge/.h1…) are scoped to
   the homepage sections and don't collide with theme .ncl-* classes.
   ============================================================ */

/* ─── Typography scale ─────────────────────────────────────── */
.home .h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.home .h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.home .h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 600; line-height: 1.3; }
.home .label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.home .body-lg { font-size: 1.05rem; font-weight: 400; line-height: 1.65; }

/* ─── Layout ───────────────────────────────────────────────── */
/* Match .ncl-container so section content aligns with header + nav */
.home .container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}
.home .section { padding: 80px 0; }

/* ─── Buttons (homepage variants) ──────────────────────────── */
.home .btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: var(--radius); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.02em; transition: all 0.2s ease; cursor: pointer; border: 1.5px solid transparent; }
.home .btn-primary { background: var(--cobalt); color: var(--white); }
.home .btn-primary:hover { background: var(--cobalt-hover); transform: translateY(-1px); box-shadow: 0 6px 20px var(--cobalt-shadow); }
.home .btn-outline { background: transparent; color: var(--white); border: 1.5px solid var(--white-mid); }
.home .btn-outline:hover { border-color: var(--white); background: rgba(3, 11, 39, 0.6); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
.home .btn-outline-dark { background: transparent; color: var(--cobalt); border: 1.5px solid var(--cobalt); }
.home .btn-outline-dark:hover { background: var(--cobalt); color: var(--white); transform: translateY(-1px); box-shadow: 0 6px 20px var(--cobalt-shadow); }
.home .btn-sm { padding: 10px 20px; font-size: 0.8125rem; }

/* ─── Badges ───────────────────────────────────────────────── */
.home .badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 2px; font-size: 0.675rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.home .badge-green { background: var(--green-bg); color: var(--green); }
.home .badge-cobalt { background: var(--cobalt-tint); color: var(--cobalt); }

/* ─── Hero ─────────────────────────────────────────────────── */
#hero {
  background-color: var(--navy-deep);
  background-image: url('../images/background-hero-1.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 72px 0 60px;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    var(--navy-deep) 0%,
    rgba(3, 11, 39, 1) 30%,
    rgba(3, 11, 39, 0.75) 55%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.hero-content { max-width: 640px; }

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  min-height: clamp(420px, 52vw, 620px);
  overflow: hidden;
}

.hero-products {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  margin-left: auto;
}

.hero-product {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 28px 56px rgba(0, 0, 0, 0.38));
}

.hero-product-wrap {
  position: absolute;
  will-change: transform;
  animation: hero-float 3.5s ease-in-out infinite;
}

/* Foreground — right-anchored, larger, wider float range */
.hero-product-wrap--front {
  right: 10%;
  left: auto;
  bottom: 8%;
  width: 100%;
  z-index: 2;
  --hero-float-range: -20px;
}

/* Background — right, higher, smaller */
.hero-product-wrap--back {
  right: -8%;
  top: 0;
  width: 70%;
  z-index: 1;
  --hero-float-range: -10px;
}

@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(var(--hero-float-range, -10px)); }
}
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; background: var(--cobalt-glow); border: 1px solid var(--cobalt-shadow); padding: 6px 14px; border-radius: 2px; margin-bottom: 24px; }
.hero-kicker-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cobalt-light); animation: ncl-pulse 2s infinite; }
@keyframes ncl-pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.6;transform:scale(1.3)} }
.hero-kicker span { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cobalt-light); }
.hero-headline { color: var(--white); margin-bottom: 24px; }
.hero-headline em { color: var(--cobalt-light); font-style: normal; }
.hero-sub { color: var(--white-soft); font-size: 1.05rem; line-height: 1.7; margin-bottom: 36px; max-width: 520px; }
.hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-dispatch { display: inline-flex; align-items: center; gap: 10px; background: rgba(3, 11, 39, 0.8); border: 1px solid var(--white-low); padding: 12px 18px; border-radius: var(--radius); }
.hero-dispatch-icon { color: var(--cobalt-light); flex-shrink: 0; }
.hero-dispatch-text { font-size: 0.8rem; line-height: 1.4; }
.hero-dispatch-text strong { display: block; color: var(--white); font-weight: 600; font-size: 0.8125rem; }
.hero-dispatch-text span { color: var(--white-dim); }

/* ─── Stats bar ────────────────────────────────────────────── */
#stats-bar { background: var(--white); border-bottom: 1px solid var(--border); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}
.stat-item { padding: 36px 24px; text-align: center; border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-number { font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; color: var(--cobalt); line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: 0.775rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); }

/* ─── Section header / labels ──────────────────────────────── */
.section-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cobalt); margin-bottom: 8px; }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 48px; flex-wrap: wrap; gap: 16px; }

.section-header__actions {
  --header-action-height: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.section-header__actions .btn.btn-sm {
  height: var(--header-action-height);
  padding-block: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.ncl-carousel-nav {
  display: none;
  align-items: center;
  gap: 8px;
}

.ncl-carousel-nav:not([hidden]) {
  display: flex;
}

.ncl-carousel-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--header-action-height);
  height: var(--header-action-height);
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--silver-light);
  cursor: pointer;
  transition: color 0.2s ease;
}

.ncl-carousel-nav__btn:hover {
  color: var(--cobalt);
}

.ncl-carousel-nav__btn:active {
  color: var(--cobalt-hover);
}

.ncl-carousel-nav__btn:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
}

/* ─── Value props ──────────────────────────────────────────── */
#value-props { background: var(--white); }
.vp-header { text-align: center; margin-bottom: 56px; }
.vp-header .section-label { margin-bottom: 12px; }
.vp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.vp-card { background: var(--white); padding: 40px 32px; position: relative; overflow: hidden; transition: background 0.25s; }
.vp-card:hover { background: var(--fog); }
.vp-number { font-size: 5rem; font-weight: 600; line-height: 1; color: var(--fog); position: absolute; top: 16px; right: 20px; pointer-events: none; user-select: none; transition: color 0.25s; }
.vp-card:hover .vp-number { color: var(--cobalt-dim); }
.vp-icon { width: 48px; height: 48px; background: var(--cobalt-subtle); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; color: var(--cobalt); }
.vp-title { font-size: 1.05rem; font-weight: 600; color: var(--navy); margin-bottom: 10px; }
.vp-desc { font-size: 0.875rem; color: var(--slate); line-height: 1.6; }

/* ─── Featured products carousel ───────────────────────────── */
#home-products {
  background: var(--fog);
  overflow-x: hidden;
  overscroll-behavior-x: none;
  max-width: 100%;
}

#home-products .container { padding-bottom: 0; }

.ncl-carousel {
  width: 100%;
  max-width: 100%;
  padding: 8px 0 48px;
  mask-image: linear-gradient(90deg, transparent 0, black 3%, black 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 3%, black 97%, transparent 100%);
}

.ncl-carousel:not(.ncl-carousel--fit):not(.ncl-carousel--scroll) {
  cursor: grab;
}

/* Desktop transform carousel — JS handles horizontal drag + wheel */
.ncl-carousel:not(.ncl-carousel--fit):not(.ncl-carousel--scroll) {
  touch-action: pan-y pinch-zoom;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
  overflow-x: hidden;
  contain: layout style;
  mask-image: none;
  -webkit-mask-image: none;
}

.ncl-carousel--dragging {
  cursor: grabbing;
  user-select: none;
  touch-action: none;
  scroll-snap-type: none;
}

.ncl-carousel--dragging .ncl-product-card__link,
.ncl-carousel--dragging .ncl-product-card__footer a,
.ncl-carousel--dragging .ncl-product-card__footer button {
  pointer-events: none;
}

.ncl-carousel__track {
  display: flex;
  gap: 20px;
  will-change: transform;
}

/* Fix card width so exactly 4 fit in the carousel viewport */
.ncl-carousel__track .ncl-product-card {
  flex: 0 0 280px;
  width: 280px;
}

/* Mobile / touch: native horizontal scroll (no JS transform loop) */
.ncl-carousel--scroll {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y pinch-zoom;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: clamp(1rem, 4vw, 2.5rem);
  padding-inline: clamp(1rem, 4vw, 2.5rem);
  mask-image: none;
  -webkit-mask-image: none;
  scrollbar-width: none;
}

.ncl-carousel--scroll::-webkit-scrollbar { display: none; }


.ncl-carousel--scroll .ncl-carousel__track .ncl-product-card {
  scroll-snap-align: start;
}

/* Trailing inset so the last card can scroll flush with heading padding */
.ncl-carousel--scroll .ncl-carousel__track::after {
  content: '';
  flex: 0 0 clamp(1rem, 4vw, 2.5rem);
}

/* Fewer products than viewport width — centre the row, no empty strip on the right */
.ncl-carousel--fit {
  overflow-x: hidden;
  mask-image: none;
  -webkit-mask-image: none;
}

.ncl-carousel--fit .ncl-carousel__track {
  justify-content: center;
  transform: none !important;
  transition: none !important;
}

.ncl-carousel--scroll.ncl-carousel--fit {
  overflow-x: hidden;
  scroll-snap-type: none;
}

/* Reduced motion: static grid on desktop transform mode; keep native scroll on mobile */
@media (prefers-reduced-motion: reduce) {
  .ncl-carousel:not(.ncl-carousel--scroll) { mask-image: none; -webkit-mask-image: none; overflow-x: clip; }
  .ncl-carousel:not(.ncl-carousel--scroll) .ncl-carousel__track { flex-wrap: wrap; }
  .ncl-carousel__track .ncl-product-card[aria-hidden="true"] { display: none; }
}

/* ─── COA callout ──────────────────────────────────────────── */
#coa-callout { background: linear-gradient(to bottom right, var(--navy-deep), var(--navy)); position: relative; overflow: hidden; }
#coa-callout::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--cobalt-dim) 1px, transparent 1px), linear-gradient(90deg, var(--cobalt-dim) 1px, transparent 1px); background-size: 40px 40px; }
.coa-inner { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; max-width: var(--max-width); margin: 0 auto; padding: 72px clamp(1rem, 4vw, 2.5rem); position: relative; }
.coa-headline { font-size: clamp(1.75rem, 3.5vw, 2.75rem); font-weight: 600; color: var(--white); line-height: 1.2; margin-bottom: 16px; }
.coa-headline em { color: var(--cobalt-light); font-style: normal; }
.coa-sub { color: var(--white-muted); font-size: 1rem; line-height: 1.65; max-width: 520px; }
.coa-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.coa-stat { text-align: center; }
.coa-stat-n { font-size: 2.25rem; font-weight: 600; color: var(--white); line-height: 1; }
.coa-stat-l { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--white-half); margin-top: 4px; }
.coa-btn { margin-top: 28px; display: inline-block; }

/* ─── Newsletter ───────────────────────────────────────────── */
#newsletter { background: var(--fog); }
.nl-inner { max-width: 600px; margin: 0 auto; text-align: center; }
.nl-inner h2 { color: var(--navy); margin: 12px 0 16px; }
.nl-inner p { color: var(--slate); margin-bottom: 32px; }
.nl-form { display: flex; align-items: stretch; flex-wrap: wrap; gap: 10px; }
.nl-input { flex: 1; padding: 15.5px 18px; border: 1.5px solid var(--white); border-radius: var(--radius); font-family: var(--font); font-size: 0.9rem; outline: none; transition: border-color 0.2s; background: var(--white); -webkit-appearance: none; appearance: none;    box-shadow: 0 4px 24px rgba(13, 27, 75, 0.06); }
.nl-input:focus { border-color: var(--cobalt); }
.nl-input::placeholder { color: var(--silver); }
.nl-consent { display: flex; align-items: flex-start; gap: 8px; flex-basis: 100%; text-align: left; font-size: 0.78rem; line-height: 1.45; color: var(--slate); cursor: pointer; }
.nl-consent input {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  position: relative;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: calc((1.45em - 20px) / 2) 0 0;
  border: none;
  border-radius: 4px;
  background: var(--white);
  box-shadow: 0 4px 24px rgba(13, 27, 75, 0.06);
  cursor: pointer;
  transition: background 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.nl-consent input:checked { background: var(--cobalt); }
.nl-consent input:checked::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 45%;
  width: 5px;
  height: 10px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}
.nl-consent input:focus-visible {
  outline: none;
  box-shadow: 0 4px 24px rgba(13, 27, 75, 0.06), 0 0 0 2px var(--cobalt-tint);
}
.nl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.nl-inner .nl-status { min-height: 1.2em; margin: 12px 0 0; font-size: 0.86rem; font-weight: 600; color: var(--slate); }
.nl-status.is-error { color: #b42318; }
.nl-status.is-success { color: #027a48; }
.nl-inner .nl-disclaimer { font-size: 0.775rem; color: var(--silver); margin: 14px 0 0; }

/* ─── Scroll-reveal initial states ─────────────────────────────
   Gated behind .ncl-anim, which home.js adds to <body> only when GSAP
   is present and motion is allowed. If JS/GSAP fails, content stays
   visible (no permanently-hidden sections). */
.home.ncl-anim .fade-up { opacity: 0; transform: translateY(40px); }
.home.ncl-anim .fade-in { opacity: 0; }
.home.ncl-anim .stagger-child { opacity: 0; transform: translateY(32px); }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .vp-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}
@media (max-width: 768px) {
  .ncl-carousel-nav { display: none !important; }

  #hero::before {
    background: linear-gradient(
      160deg,
      var(--navy-deep) 0%,
      rgba(3, 11, 39, 0.88) 45%,
      rgba(3, 11, 39, 0.55) 70%,
      transparent 100%
    );
  }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .stat-item:last-child { border-bottom: none; }
  .coa-inner { grid-template-columns: 1fr; }
  .nl-form { flex-direction: column; }
  .vp-grid { grid-template-columns: 1fr; }
  .home .section { padding: 56px 0; }
}

/* ─── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .home .fade-up, .home .fade-in, .home .stagger-child { opacity: 1; transform: none; }
  .hero-product-wrap--front,
  .hero-product-wrap--back { animation: none; }
}
