/* ============================================================
   HOME PAGE — styles/pages/home.css
   Prefix: hm-
   ============================================================ */


/* ── Hero ──────────────────────────────────────────────────── */

.hm-hero {
  margin-top: 64px; /* clear fixed nav */
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 580px;
}

/* ── Orientation bar — floats over image at top of hero ─────── */

.hm-orient {
  position: relative;
  z-index: 3;
  background: rgba(0, 0, 0, 0.28);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 9px 24px;
  text-align: center;
}

.hm-orient-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.4;
  margin: 0;
}

/* Background images — one per persona, cross-fade */
.hm-hero-bgs {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hm-hero-bg-img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hm-hero-bg-img.is-active {
  opacity: 1;
}

.hm-hero-bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

/* Overlay — dark on left for text, fades to lighter on right */
.hm-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to right,
    rgba(12, 11, 9, 0.90) 0%,
    rgba(12, 11, 9, 0.72) 45%,
    rgba(12, 11, 9, 0.25) 75%,
    rgba(12, 11, 9, 0.10) 100%
  );
}

/* Inner wrapper */
.hm-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 56px 48px 56px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Persona slides container */
.hm-slides {
  width: 100%;
  max-width: 800px;
  margin-bottom: 36px;
  display: grid;
}

/* All slides stack in the same grid cell */
.hm-slide {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.3s ease;
  visibility: hidden;
  pointer-events: none;
}

.hm-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hm-slide h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.08;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}

.hm-slide h1 em {
  font-style: italic;
  color: var(--o);
}

.hm-slide-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
  margin: 0;
  max-width: 520px;
}

.hm-slide-sub strong {
  color: #fff;
  font-weight: 700;
}

/* Slide-in animation */
@keyframes hmSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hm-slide.is-active h1 {
  animation: hmSlideIn 0.4s ease both;
}

.hm-slide.is-active .hm-slide-sub {
  animation: hmSlideIn 0.4s ease 0.1s both;
}

/* Persona tab buttons — sits above slides now */
.hm-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}

.hm-tab {
  appearance: none;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all var(--t-base);
  font-family: var(--font-body);
  line-height: 1;
}

.hm-tab-short { display: none; }

.hm-tab:hover {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.hm-tab.is-active {
  background: var(--o);
  border-color: var(--o);
  color: #fff;
}

/* Scroll hint indicator */
@keyframes hm-scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50%       { transform: translateY(8px); opacity: 1; }
}

.hm-scroll-hint {
  position: absolute;
  bottom: 28px;
  right: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.75);
  animation: none;
  transition: opacity 0.6s ease, color 0.2s ease;
  z-index: 10;
  opacity: 0;
  padding: 8px;
}

.hm-scroll-hint:hover {
  color: #fff;
}

.hm-scroll-hint.is-visible {
  animation: hm-scroll-bounce 1.8s ease-in-out infinite;
}

.hm-scroll-hint.is-hidden {
  animation: none;
  opacity: 0;
  pointer-events: none;
}

.hm-scroll-hint-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

.hm-scroll-hint svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Progress bar under active tab */
.hm-tab-progress {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 40px;
  gap: 6px;
}

.hm-tab-pip {
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.hm-tab-pip.is-active {
  background: rgba(255, 255, 255, 0.2);
}

.hm-tab-pip-fill {
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 2px;
}

.hm-tab-pip.is-active .hm-tab-pip-fill {
  animation: hmPipFill 11s linear forwards;
}

@keyframes hmPipFill {
  from { width: 0%; }
  to   { width: 100%; }
}

/* Persona page link — sits above progress pips */
.hm-slide-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--o);
  text-decoration: none;
  margin-bottom: 14px;
  transition: opacity 0.2s ease;
}
.hm-slide-link:hover {
  opacity: 0.8;
}
.hm-slide-link-arr {
  font-size: 14px;
  transition: transform 0.2s ease;
}
.hm-slide-link:hover .hm-slide-link-arr {
  transform: translateX(3px);
}

/* (Hero CTA removed — no buttons in hero) */


/* ── Trust strip ────────────────────────────────────────────── */

@keyframes hm-trust-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.hm-trust {
  background: var(--o);
  overflow: hidden;
}

/* Default: centred static layout — hide duplicate set */
.hm-trust-track {
  display: flex;
  justify-content: center;
  width: 100%;
}

.hm-trust-track .hm-trust-set:last-child {
  display: none;
}

/* Scrolling state — added by JS when items overflow */
.hm-trust.is-scrolling .hm-trust-track {
  width: max-content;
  animation: hm-trust-scroll 22s linear infinite;
  justify-content: flex-start;
}

.hm-trust.is-scrolling .hm-trust-track .hm-trust-set:last-child {
  display: flex;
}

.hm-trust.is-scrolling:hover .hm-trust-track {
  animation-play-state: paused;
}

.hm-trust-set {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  white-space: nowrap;
}

.hm-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}

.hm-trust-item svg {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
}

.hm-trust-sep {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.25);
}


/* ── Platform overview / What is Qualzy ─────────────────────── */

.hm-overview {
  padding: 96px 48px 0;
  background: var(--wh);
}

.hm-overview-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Top — centred text block */
.hm-ov-top {
  max-width: 720px;
  margin: 0 auto 52px;
  text-align: center;
}

.hm-ov-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--dk);
  letter-spacing: -0.02em;
  margin: 12px 0 20px;
  text-wrap: balance;
}

.hm-ov-headline em {
  font-style: italic;
  color: var(--o);
}

.hm-ov-desc {
  font-size: 17px;
  color: var(--mid);
  line-height: 1.65;
  margin: 0 0 28px;
}


/* Full-width platform image */
.hm-ov-img-wrap {
  margin-bottom: 64px;
}

.hm-ov-fullimg {
  display: block;
  width: 100%;
  height: auto;
}

/* SEO paragraph — present for crawlers, visually de-emphasised */
.hm-ov-seo {
  font-size: 13px;
  color: var(--mu);
  line-height: 1.7;
  max-width: 900px;
  margin: 0 auto 56px;
  text-align: center;
  opacity: 0.7;
}

/* Four capability pillars */
.hm-ov-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-bottom: 56px;
  border: 1.5px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
  background: var(--rule);
}

.hm-ov-pillar {
  background: #fff;
  padding: 32px 28px;
}

.hm-ov-pillar-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--op);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.hm-ov-pillar-icon svg {
  width: 20px;
  height: 20px;
  color: var(--o);
}

.hm-ov-pillar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dk);
  margin: 0 0 10px;
  line-height: 1.3;
}

.hm-ov-pillar-body {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.6;
  margin: 0;
}

/* Stats row */
.hm-ov-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1.5px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
}

.hm-ov-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 28px 20px;
  flex: 1;
  min-width: 120px;
  border-right: 1.5px solid var(--rule);
}

.hm-ov-stat:last-child {
  border-right: none;
}

.hm-ov-sn {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  color: var(--o);
  line-height: 1;
  white-space: nowrap;
}

.hm-ov-sl {
  font-size: 12px;
  color: var(--mu);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}


/* ── Testimonials marquee ───────────────────────────────────── */

.hm-tq {
  background: #fff;
  padding: 100px 0 96px;
  overflow: hidden;
}

.hm-tq-head {
  max-width: 720px;
  margin: 0 auto 64px;
  text-align: center;
  padding: 0 48px;
}

/* Rail: clip overflow, apply edge fade */
.hm-tq-rail {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 9%, black 91%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 9%, black 91%, transparent 100%);
  margin-bottom: 18px;
  padding: 6px 0; /* breathing room so card shadows aren't clipped */
}

.hm-tq-rail:last-child {
  margin-bottom: 0;
}

/* Track: flex row of two identical sets */
.hm-tq-track {
  display: flex;
  width: max-content;
}

/* Each set of 8 cards */
.hm-tq-set {
  display: flex;
  flex-shrink: 0;
  gap: 20px;
  padding-right: 20px; /* matches gap so spacing loops seamlessly */
}

/* Directional animations */
.hm-tq-rail--fwd .hm-tq-track {
  animation: hmqFwd 42s linear infinite;
}

.hm-tq-rail--rev .hm-tq-track {
  animation: hmqRev 36s linear infinite;
}

/* Pause on hover — only for real pointer devices.
   Touch devices use a JS toggle (.is-user-paused) instead,
   because :hover is sticky on mobile and can't be un-stuck by tapping. */
@media (hover: hover) {
  .hm-tq-rail:hover .hm-tq-track {
    animation-play-state: paused;
  }
}

/* JS-toggled pause — works on both touch and pointer devices */
.hm-tq-rail.is-user-paused .hm-tq-track {
  animation-play-state: paused;
}

@keyframes hmqFwd {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes hmqRev {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .hm-tq-track { animation: none !important; }
}

/* Individual testimonial card */
.hm-tq-card {
  flex-shrink: 0;
  width: 340px;
  background: var(--wh);
  border: 1px solid #E4DDD6;
  border-radius: 12px;
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.hm-tq-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  border-color: rgba(250,88,2,.2);
}

/* Quote text */
.hm-tq-quote {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-style: normal;
  line-height: 1.6;
  color: #2A2724;
  margin: 0;
  flex: 1; /* pushes attribution to bottom of every card */
}

.hm-tq-quote::before {
  content: '\201C';
  color: var(--o);
  font-size: 22px;
  line-height: 0;
  vertical-align: -9px;
  margin-right: 1px;
}

.hm-tq-quote::after {
  content: '\201D';
  color: var(--o);
  font-size: 22px;
  line-height: 0;
  vertical-align: -9px;
  margin-left: 1px;
}

/* Attribution — sits tight under the quote like a signature */
.hm-tq-attr {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,.06);
}

.hm-tq-name {
  font-size: 12px;
  font-weight: 700;
  color: #2A2724;
  font-style: normal;
}

.hm-tq-org {
  font-size: 11.5px;
  color: #9A8F87;
  font-style: normal;
}


/* ── Client logo marquee ─────────────────────────────────────── */

.hm-logos {
  background: var(--wh);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 20px 0;
  overflow: hidden;
}

/* The scrolling rail — two identical sets laid end-to-end */
.hm-logos-track {
  display: flex;
  width: max-content;
  animation: hm-logos-scroll 38s linear infinite;
  will-change: transform;
}

.hm-logos-track:hover {
  animation-play-state: paused;
}

.hm-logos-set {
  display: flex;
  align-items: center;
  gap: 72px;
  padding: 0 36px;
}

@keyframes hm-logos-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .hm-logos-track { animation: none; }
}

img.hm-logo-itm {
  display: block;
  height: 48px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  flex-shrink: 0;
  filter: grayscale(1) opacity(0.48);
  mix-blend-mode: multiply;
}

img.hm-logo-itm[src*="veylinx"] {
  max-width: 110px;
}


/* ── See it in action — demo video ─────────────────────────── */

.hm-demo {
  background: var(--op);
  padding: 100px 80px;
}

.hm-demo-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hm-demo-head {
  text-align: center;
  max-width: 680px;
  margin-bottom: 52px;
}

/* Video trigger card */
.hm-demo-trigger {
  display: block;
  position: relative;
  width: 100%;
  max-width: 880px;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
  background: var(--d2);
  box-shadow: 0 20px 72px rgba(0,0,0,.18);
  transition: transform var(--t-base), box-shadow var(--t-base);
}

.hm-demo-trigger:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 96px rgba(0,0,0,.26);
}

.hm-demo-trigger:hover .hm-demo-play-btn {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--o);
  border-color: var(--o);
}

.hm-demo-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.hm-demo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.4;
}

.hm-demo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,25,21,.75) 0%, rgba(26,25,21,.35) 100%);
}

.hm-demo-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--t-base), background var(--t-base), border-color var(--t-base);
}

.hm-demo-play-btn svg {
  width: 30px;
  height: 30px;
  color: #fff;
  margin-left: 5px; /* optical centre for play triangle */
}

.hm-demo-thumb-meta {
  position: absolute;
  bottom: 22px;
  left: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hm-demo-dur {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--o);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
}

.hm-demo-meta-text {
  font-size: 12px;
  color: rgba(255,255,255,.65);
  font-weight: 400;
}

/* Feature points row */
.hm-demo-pts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 36px;
  margin-top: 36px;
  max-width: 880px;
  width: 100%;
}

.hm-demo-pt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--mid);
}

.hm-demo-pt svg {
  width: 15px;
  height: 15px;
  color: var(--o);
  flex-shrink: 0;
}

/* Lightbox modal */
.hm-demo-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.hm-demo-modal[hidden] { display: none; }

.hm-demo-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.9);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.hm-demo-modal-box {
  position: relative;
  width: 100%;
  max-width: 980px;
  z-index: 1;
}

.hm-demo-modal-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.65);
  padding: 8px;
  transition: color var(--t-fast);
  line-height: 0;
}

.hm-demo-modal-close:hover { color: #fff; }

.hm-demo-modal-close svg { width: 24px; height: 24px; }

.hm-demo-modal-ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.hm-demo-modal-ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}


/* ── Security & Trust ───────────────────────────────────────── */

.hm-sec {
  background: var(--dk);
  padding: 100px 80px;
}

.hm-sec-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hm-sec-head {
  text-align: center;
  max-width: 680px;
  margin-bottom: 56px;
}

.hm-sec-head .slbl { color: rgba(250,88,2,.8); }
.hm-sec-head .stit { color: #fff; }
.hm-sec-head .sbod { color: rgba(255,255,255,.48); }
.hm-sec-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--o);
  text-decoration: none;
  transition: opacity var(--t-fast);
}
.hm-sec-link:hover { opacity: 0.75; }

/* Compliance badges grid */
.hm-sec-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 60px;
  width: 100%;
}

.hm-sec-cert {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 22px 16px 18px;
  text-align: center;
  transition: background var(--t-base), border-color var(--t-base);
}

.hm-sec-cert:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(250,88,2,.4);
}

.hm-sec-cert-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--o);
}

.hm-sec-cert-icon svg {
  width: 28px;
  height: 28px;
}

.hm-sec-cert-badge {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.hm-sec-cert-name {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--o);
}

/* Security feature items */
.hm-sec-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 56px;
  max-width: 840px;
  width: 100%;
}

.hm-sec-feat {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.hm-sec-feat svg {
  width: 22px;
  height: 22px;
  color: var(--o);
  flex-shrink: 0;
  margin-top: 2px;
}

.hm-sec-feat-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
}

.hm-sec-feat-desc {
  font-size: 13px;
  color: rgba(255,255,255,.48);
  line-height: 1.6;
}


/* ── Human support ──────────────────────────────────────────── */

.hm-support {
  background: #fff;
  padding: 80px 48px;
  border-top: 1px solid var(--rule);
}

.hm-support-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 80px;
  align-items: center;
}

.hm-support-copy {
  flex: 1;
  min-width: 0;
}

.hm-support-copy .slbl { margin-bottom: 12px; }

.hm-support-copy .stit {
  font-size: clamp(26px, 3vw, 36px);
  margin-bottom: 16px;
}

.hm-support-copy .sbod { margin-bottom: 32px; }

.hm-support-regions {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hm-sregion {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--wh);
  border: 1.5px solid var(--rule);
  border-radius: 14px;
  padding: 20px 24px;
}

.hm-sregion-flag {
  font-size: 28px;
  flex-shrink: 0;
}

.hm-sregion-info {}

.hm-sregion-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--dk);
}

.hm-sregion-detail {
  font-size: 13px;
  color: var(--mu);
}


/* ── Project Duration Timeline ──────────────────────────────── */

.hm-tl {
  background: var(--dk);
  padding: 100px 48px;
}

.hm-tl-inner { }

.hm-tl-head {
  text-align: center;
  margin: 0 auto 72px;
  max-width: 600px;
}

.hm-tl .stit { color: #fff; }
.hm-tl .stit em { color: var(--o); font-style: italic; }
.hm-tl .sbod { color: rgba(255,255,255,0.5); }
.hm-tl .slbl { color: var(--o); }

/* Rail — nodes flex row, line sits at dot-centre Y */
.hm-tl-rail {
  position: relative;
  margin-bottom: 0;
}

.hm-tl-nodes {
  display: flex;
  justify-content: space-between;
}

/* Each node: labels above, dot at bottom */
.hm-tl-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  gap: 8px;
}

.hm-tl-ntime {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--o);
  opacity: 0.45;
  transition: opacity 0.25s ease;
  white-space: nowrap;
}

.hm-tl-nname {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  font-family: var(--font-body);
  white-space: nowrap;
  transition: color 0.25s ease;
}

.hm-tl-node.is-active .hm-tl-ntime  { opacity: 1; }
.hm-tl-node.is-active .hm-tl-nname  { color: #fff; }
.hm-tl-node:hover:not(.is-active) .hm-tl-nname { color: rgba(255,255,255,0.65); }
.hm-tl-node:hover:not(.is-active) .hm-tl-ntime  { opacity: 0.75; }

/* Dot — sits at bottom of each node, z-index above the line */
.hm-tl-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  background: var(--dk);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.hm-tl-node.is-active .hm-tl-dot {
  background: var(--o);
  border-color: var(--o);
  transform: scale(1.25);
  box-shadow: 0 0 0 5px rgba(250, 88, 2, 0.2);
}

.hm-tl-node:hover:not(.is-active) .hm-tl-dot {
  border-color: rgba(255,255,255,0.5);
}

/* Horizontal line — positioned absolutely at dot-centre Y (8px = half of 16px dot, from bottom) */
.hm-tl-line {
  position: absolute;
  bottom: 8px;           /* aligns with dot vertical centre */
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255,255,255,0.1);
  pointer-events: none;
  z-index: 1;
}

.hm-tl-line-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--o);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Connector — vertical animated line dropping from active dot to panel */
.hm-tl-connector {
  position: relative;
  height: 36px;
}

.hm-tl-connector-line {
  position: absolute;
  top: 0;
  width: 2px;
  height: 0;
  opacity: 0;
  background: linear-gradient(to bottom, var(--o), rgba(250,88,2,0.15));
  transform: translateX(-50%);
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1), left 0s, opacity 0.1s;
  border-radius: 1px;
}

/* Panel entry animation */
@keyframes tlPanelIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes tlItemIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes tlTagIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes tlDotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(250,88,2,0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(250,88,2,0); }
  100% { box-shadow: 0 0 0 12px rgba(250,88,2,0); }
}

.hm-tl-node.is-active .hm-tl-dot {
  animation: tlDotPulse 0.65s ease-out forwards;
}

/* Detail panel — light warm background */
.hm-tl-panel {
  background: #FEF6F1;
  border: 1px solid rgba(250, 88, 2, 0.18);
  border-radius: 8px;
  overflow: hidden;
  min-height: 268px;
}

.hm-tl-panel.is-entering {
  animation: tlPanelIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hm-tl-pi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.hm-tl-pi-left {
  padding: 32px 40px;
  border-right: 1px solid rgba(250, 88, 2, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.hm-tl-pi-right {
  padding: 32px 40px;
  display: flex;
  gap: 40px;
}

.hm-tl-pi-desc {
  font-size: 14px;
  line-height: 1.75;
  color: #3d3630;
}

/* Footer row: badge(s) + case study link inline */
.hm-tl-pi-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Qualzy platform type badges */
.hm-tl-pi-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Case study link — sits inline after platform badge, separated by a divider */
.hm-tl-pi-case {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--o);
  text-decoration: none;
  white-space: nowrap;
  padding-left: 16px;
  border-left: 1px solid rgba(250, 88, 2, 0.25);
  opacity: 0;
  animation: tlTagIn 0.4s ease 0.15s forwards;
  transition: color 0.15s;
}
.hm-tl-pi-case:hover {
  color: rgba(250, 88, 2, 0.7);
  text-decoration: underline;
}

.hm-tl-pi-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--o);
  background: rgba(250, 88, 2, 0.1);
  border: 1px solid rgba(250, 88, 2, 0.28);
  border-radius: 100px;
  padding: 5px 14px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0;
  animation: tlTagIn 0.4s ease 0.05s forwards;
}

.hm-tl-pi-block {
  flex: 1;
}

.hm-tl-pi-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.3);
  margin-bottom: 12px;
}

.hm-tl-pi-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.hm-tl-pi-list li {
  font-size: 13px;
  color: #4a3f38;
  padding-left: 14px;
  position: relative;
  opacity: 0;
  animation: tlItemIn 0.35s ease forwards;
}
.hm-tl-pi-list li:nth-child(1) { animation-delay: 0.10s; }
.hm-tl-pi-list li:nth-child(2) { animation-delay: 0.17s; }
.hm-tl-pi-list li:nth-child(3) { animation-delay: 0.24s; }
.hm-tl-pi-list li:nth-child(4) { animation-delay: 0.31s; }

.hm-tl-pi-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 1px;
  background: var(--o);
  opacity: 0.7;
}

.hm-tl-pi-tags {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.hm-tl-pi-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: #3d3630;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 100px;
  padding: 5px 12px;
  width: fit-content;
  opacity: 0;
  animation: tlTagIn 0.35s ease forwards;
}
.hm-tl-pi-tags .hm-tl-pi-tag:nth-child(1) { animation-delay: 0.12s; }
.hm-tl-pi-tags .hm-tl-pi-tag:nth-child(2) { animation-delay: 0.20s; }
.hm-tl-pi-tags .hm-tl-pi-tag:nth-child(3) { animation-delay: 0.28s; }

/* CTA */
.hm-tl-cta {
  margin-top: 48px;
  text-align: center;
}

.hm-tl-link {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.hm-tl-link:hover { color: #fff; }


/* ── Final CTA ──────────────────────────────────────────────── */

/* Uses shared .cta / .ctai / .ctab from components.css */


/* ── Responsive ─────────────────────────────────────────────── */

/* ─ 1000px: Timeline switches to vertical-left / panel-right split ── */
@media (max-width: 1000px) {
  .hm-tl { padding: 72px 0; }

  /* Use reduced side padding so there's room for the split layout */
  .hm-tl-inner {
    display: grid;
    grid-template-areas:
      "head head"
      "rail panel";
    grid-template-columns: 175px 1fr;
    align-items: start;
    gap: 0 24px;
    padding-left: 24px;
    padding-right: 24px;
  }

  .hm-tl-head      { grid-area: head; padding: 0; margin-bottom: 40px; }
  .hm-tl-rail      { grid-area: rail; }
  .hm-tl-connector { display: none; }
  .hm-tl-panel     { grid-area: panel; margin: 0; }

  /* Nodes: vertical list */
  .hm-tl-nodes {
    flex-direction: column;
    align-items: stretch;
    position: relative;
  }

  /* Vertical connecting line via pseudo-element (replaces horizontal line) */
  .hm-tl-nodes::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 18px;
    bottom: 18px;
    width: 1px;
    background: rgba(255,255,255,0.12);
    pointer-events: none;
    z-index: 1;
  }

  /* Hide the horizontal line (JS still targets it but it's invisible) */
  .hm-tl-line { display: none; }

  /* Each node: grid with dot left, time+name stacked right */
  .hm-tl-node {
    display: grid;
    grid-template-columns: 16px 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 2px;
    align-items: center;
    padding: 10px 12px;
    text-align: left;
    width: 100%;
  }

  .hm-tl-ntime { grid-column: 2; grid-row: 1; white-space: normal; }
  .hm-tl-nname { grid-column: 2; grid-row: 2; white-space: normal; font-size: 12px; }
  .hm-tl-dot   { grid-column: 1; grid-row: 1 / 3; align-self: center; }

  /* Panel: description + inline activities, no Best For */
  .hm-tl-pi          { grid-template-columns: 1fr; }
  .hm-tl-pi-left     { border-right: none; border-bottom: none; padding: 20px 24px 12px; }
  /* Stack badge above case study link so badge never wraps */
  .hm-tl-pi-footer   { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hm-tl-pi-case     { border-left: none; padding-left: 0; }

  /* Activities: show but compact; hide Best For */
  .hm-tl-pi-right                              { display: block; padding: 0 24px 20px; }
  .hm-tl-pi-right .hm-tl-pi-block:last-child  { display: none; }
  .hm-tl-pi-right .hm-tl-pi-label             { margin-bottom: 5px; }
  .hm-tl-pi-right .hm-tl-pi-list              { flex-direction: row; flex-wrap: wrap; gap: 0; }
  .hm-tl-pi-right .hm-tl-pi-list li           { padding-left: 0; animation: none; opacity: 1; }
  .hm-tl-pi-right .hm-tl-pi-list li::before   { display: none; }
  .hm-tl-pi-right .hm-tl-pi-list li:not(:last-child)::after { content: ',\00a0'; }
}

/* ─ 900px: tablet & below ─────────────────────────────────── */

@media (max-width: 900px) {
  /* Hero */
  .hm-hero-inner { padding: 48px 24px 48px; }
  .hm-slide h1   { font-size: clamp(26px, 6vw, 42px); }

  /* Trust strip */
  .hm-trust-set { gap: 28px; padding: 18px 32px; }

  /* What is Qualzy */
  .hm-overview { padding: 72px 24px; }

  /* Testimonials */
  .hm-tq      { padding: 72px 0 60px; }
  .hm-tq-head { margin-bottom: 44px; padding: 0 24px; }

  /* Demo */
  .hm-demo     { padding: 72px 24px; }
  .hm-demo-pts { gap: 10px 24px; }

  /* Security */
  .hm-sec          { padding: 72px 24px; }
  .hm-sec-features { grid-template-columns: 1fr; gap: 24px; }
}

/* ─ 768px: large mobile / small tablet ────────────────────── */
@media (max-width: 768px) {

  /* ── 4-pillar grid: 4 → 2 columns ── */
  .hm-ov-pillars {
    grid-template-columns: repeat(2, 1fr);
  }

  .hm-trust-item {
    font-size: 10.5px;
    letter-spacing: 0.07em;
  }
}

/* ─ 600px: mobile ─────────────────────────────────────────── */
@media (max-width: 600px) {
  /* Timeline: revert to horizontal scrollable above stacked panel */
  .hm-tl-inner {
    display: block;
    padding-left: 0;
    padding-right: 0;
  }

  .hm-tl-head { padding: 0 24px; margin-bottom: 40px; }

  /* Timeline rail: no scroll — dots fill the full width.
     padding-top reserves space for the floating active label. */
  .hm-tl-rail {
    overflow: visible;
    padding: 52px 24px 4px;
  }

  /* All 5 dots spread evenly across the full rail width */
  .hm-tl-nodes {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    gap: 0;
  }
  .hm-tl-nodes::before { display: none; }

  /* Each node shrinks to dot-width only — no min-width, no text in flow */
  .hm-tl-node {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    min-width: 0;
  }

  /* Hide ALL labels from layout on inactive nodes */
  .hm-tl-ntime,
  .hm-tl-nname {
    display: none;
  }

  /* Active node only: float label above the dot using absolute positioning
     so it doesn't affect node width or the spacing of other dots */
  .hm-tl-node.is-active .hm-tl-nname {
    display: block;
    position: absolute;
    bottom: calc(100% + 4px); /* just above the dot */
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
    grid-column: unset;
    grid-row: unset;
  }
  .hm-tl-node.is-active .hm-tl-ntime {
    display: block;
    position: absolute;
    bottom: calc(100% + 22px); /* above the name */
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 9px;
    grid-column: unset;
    grid-row: unset;
  }

  /* First node: left-align label so it doesn't bleed off screen */
  .hm-tl-node:first-child.is-active .hm-tl-ntime,
  .hm-tl-node:first-child.is-active .hm-tl-nname {
    left: 0;
    transform: none;
  }
  /* Last node: right-align label so it doesn't bleed off screen */
  .hm-tl-node:last-child.is-active .hm-tl-ntime,
  .hm-tl-node:last-child.is-active .hm-tl-nname {
    left: auto;
    right: 0;
    transform: none;
  }

  .hm-tl-dot        { grid-column: unset; grid-row: unset; align-self: auto; }
  .hm-tl-line       { display: none; }   /* line clutters at mobile width */
  .hm-tl-connector  { display: none; }
  .hm-tl-panel      { margin: 20px 24px 0; }

  /* Hero */
  .hm-hero   { min-height: 520px; }
  .hm-slide h1 { font-size: clamp(24px, 7vw, 36px); }
  .hm-tabs   { gap: 8px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; justify-content: flex-start; padding-bottom: 2px; }
  .hm-tabs::-webkit-scrollbar { display: none; }
  .hm-tab    { padding: 7px 14px; font-size: 12px; white-space: nowrap; flex-shrink: 0; }
  .hm-tab-full { display: none; }
  .hm-tab-short { display: inline; }

  /* Hero overlay: stronger on mobile (text over full-width image) */
  .hm-hero-overlay {
    background: linear-gradient(
      to bottom,
      rgba(12, 11, 9, 0.82) 0%,
      rgba(12, 11, 9, 0.75) 60%,
      rgba(12, 11, 9, 0.55) 100%
    );
  }

  /* What is Qualzy */
  .hm-ov-pillars { grid-template-columns: 1fr 1fr; } /* keep 2-col on small mobile */
  .hm-ov-pillar  { padding: 22px 18px; }
  .hm-ov-seo     { font-size: 12px; }

  /* Testimonial cards: slightly narrower so ~1.2 cards visible */
  .hm-tq-card { width: 288px; }

  /* Demo feature points: full stack */
  .hm-demo-pts {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Demo video metadata — stack label + description */
  .hm-demo-thumb-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    bottom: 14px;
    left: 16px;
  }

  /* Timeline font sizes handled in the nodes block above */
  .hm-tl-pi-left,
  .hm-tl-pi-right { padding: 18px 16px; }
  .hm-tl-pi-right  { flex-direction: column; gap: 20px; }

  /* Security */
  .hm-demo-modal-close { top: -40px; }
  .hm-sec-grid  { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .hm-sec-cert  { padding: 16px 12px; }
}

/* ─ Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hm-slide         { transition: none; }
  .hm-tab-pip-fill  { animation: none; width: 100%; }
}
