/* Home page (front-page.php), top to bottom. */

/* Sections reached from the menu stop below the fixed header. */
.nz-main section[id] {
  scroll-margin-top: 100px;
}

/* ---------- Hero: video under a white fade, headline and button ---------- */

.nz-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.nz-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center;
}

.nz-hero-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.69) 100%);
  opacity: 0.7;
}

.nz-hero-content {
  position: relative;
  z-index: 1;
  padding: 222px var(--nz-gutter) 80px 0;
}

.nz-hero-title {
  font-size: 40px;
  line-height: 1.2;
  margin-bottom: 25px;
}

/* Outline button that fills black from the bottom on hover. */
.nz-btn {
  position: relative;
  display: inline-block;
  overflow: hidden;
  padding: 12px 24px;
  border: 1.5px solid var(--nz-black);
  border-radius: 5px;
  color: var(--nz-black);
  font-size: 18px;
  letter-spacing: 2px;
  line-height: 1;
  text-decoration: none;
  transition: color 0.4s ease;
}

.nz-btn::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0;
  background-color: var(--nz-black);
  transition: height 0.4s ease;
}

.nz-btn span {
  position: relative;
}

.nz-btn:hover,
.nz-btn:focus {
  color: #ffffff;
}

.nz-btn:hover::before,
.nz-btn:focus::before {
  height: 100%;
}

/* ---------- About: headline beside the text ---------- */

.nz-about {
  display: grid;
  grid-template-columns: 7fr 5fr;
}

.nz-about-title {
  font-size: 35px;
  padding: 100px var(--nz-gutter) 0 0;
}

.nz-about-text {
  margin: 12px 0 0;
  padding: 100px var(--nz-gutter) 0;
}

/* ---------- Services: a row of square cards that scrolls sideways ---------- */

.nz-services {
  --nz-cards: 3.3;
  --nz-card-gap: 40px;
  padding: 100px 0;
}

.nz-services-track {
  display: flex;
  gap: var(--nz-card-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--nz-gutter);
  padding-inline: var(--nz-gutter);
  scrollbar-width: none;
  cursor: grab;
}

.nz-services-track::-webkit-scrollbar {
  display: none;
}

.nz-services-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.nz-service {
  position: relative;
  flex: 0 0 calc((100vw - var(--nz-gutter) - (var(--nz-cards) - 1) * var(--nz-card-gap)) / var(--nz-cards));
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  scroll-snap-align: start;
  transition: box-shadow 0.4s ease;
}

.nz-service:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.nz-service img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(80%) brightness(0.9) blur(0.5px);
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1), filter 0.5s ease;
  pointer-events: none;
}

.nz-service:hover img {
  transform: scale(1.08);
  filter: grayscale(0%) brightness(1.1) blur(0);
}

.nz-service::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.7) 100%);
  pointer-events: none;
}

.nz-service-num,
.nz-service-title {
  position: absolute;
  z-index: 1;
  right: 26px;
  color: #ffffff;
}

.nz-service-num {
  top: 30px;
  font-size: 3.2rem;
  font-weight: 200;
  line-height: 1;
  letter-spacing: -1px;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.4s ease;
}

.nz-service:hover .nz-service-num {
  color: #ffffff;
}

.nz-service-title {
  bottom: 30px;
  left: 26px;
  font-size: 30px;
  line-height: 1.25;
}

.nz-services-nav {
  display: flex;
  gap: 16px;
  margin-top: 35px;
  padding-right: var(--nz-gutter);
}

.nz-services-arrow {
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: none;
  color: #888888;
  cursor: pointer;
  line-height: 0;
}

.nz-services-arrow:hover,
.nz-services-arrow:focus {
  background: none;
  color: var(--nz-black);
}

.nz-services-arrow:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  color: #888888;
}

.nz-services-arrow svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Tailored insurance: picture beside text and specialty tags ---------- */

.nz-tailor {
  display: grid;
  grid-template-columns: 55% 45%;
  background-color: var(--nz-cream);
}

.nz-tailor-image {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.nz-tailor-body {
  padding: clamp(60px, 7vw, 110px);
}

.nz-tags-title {
  margin: 30px 0 16px;
  font-size: 20px;
  letter-spacing: 1px;
}

.nz-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nz-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 5px;
  font-size: 0.95rem;
  color: var(--nz-gray);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.nz-tag:hover {
  color: var(--nz-black);
  border-color: var(--nz-black);
}

.nz-tag svg {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Team: three photos, the bio over the photo on hover ---------- */

.nz-team {
  padding: 100px var(--nz-gutter);
}

.nz-team-grid {
  display: flex;
  gap: 24px;
  margin-top: 20px;
}

.nz-member {
  flex: 1 1 0;
  min-width: 0;
  cursor: pointer;
}

.nz-member-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 6px;
  background-color: #e2e2e2;
  margin-bottom: 12px;
}

.nz-member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), filter 0.5s ease;
}

.nz-member:hover .nz-member-photo img,
.nz-member:focus-within .nz-member-photo img {
  transform: scale(1.05);
  filter: grayscale(0%);
}

.nz-member-bio {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow-y: auto;
  padding: 24px 20px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 18px;
  line-height: 1.55;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.nz-member:hover .nz-member-bio,
.nz-member:focus .nz-member-bio,
.nz-member:focus-within .nz-member-bio {
  opacity: 1;
  visibility: visible;
}

.nz-member-bio p {
  margin: 0 0 8px;
}

.nz-member-bio p:last-child {
  margin-bottom: 0;
}

.nz-member-name {
  margin-bottom: 3px;
  font-size: 20px;
  line-height: 1.3;
  color: #111111;
}

.nz-member-role {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  color: #777777;
}

/* ---------- Client logos: an endless strip ---------- */

.nz-logos {
  overflow: hidden;
  padding: 20px 0;
  direction: ltr;
  user-select: none;
}

.nz-logos-track {
  display: flex;
  width: max-content;
  animation: nzLogos var(--nz-logos-duration, 120s) linear infinite;
}

.nz-logos-set {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
}

.nz-logos-set img {
  width: auto;
  max-width: 180px;
  height: 100px;
  object-fit: contain;
}

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

/* ---------- Pro bono ---------- */

.nz-probono {
  padding: 60px var(--nz-gutter) 100px;
}

.nz-probono-title {
  margin: 0 0 16px;
}

.nz-probono-list {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.nz-probono-list li {
  margin-bottom: 14px;
  line-height: 1.6;
}

.nz-probono-list strong {
  font-weight: 600;
}

.nz-probono-footer {
  margin: 0;
}

/* ---------- Tablet ---------- */

@media (max-width: 1024px) {
  .nz-services {
    --nz-cards: 2.15;
    --nz-card-gap: 32px;
    padding: 70px 0;
  }

  .nz-services-nav {
    margin-top: 24px;
  }

  .nz-service-num {
    font-size: 2.8rem;
  }

  .nz-service-title {
    font-size: 24px;
  }

  .nz-tailor {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Phone ---------- */

@media (max-width: 767px) {
  .nz-hero-content {
    padding: 140px var(--nz-gutter) 60px;
  }

  .nz-hero-title {
    font-size: 26px;
  }

  .nz-about {
    grid-template-columns: 1fr;
  }

  .nz-about-title {
    font-size: 28px;
    padding: 60px var(--nz-gutter) 0;
  }

  .nz-about-text {
    padding: 20px var(--nz-gutter) 0;
  }

  .nz-services {
    --nz-cards: 1.15;
    --nz-card-gap: 24px;
    padding: 60px 0;
  }

  .nz-services-nav {
    justify-content: center;
    margin-top: 20px;
    padding-right: 0;
  }

  .nz-service-title {
    font-size: 22px;
  }

  .nz-tailor {
    grid-template-columns: 1fr;
  }

  .nz-tailor-image {
    min-height: 280px;
  }

  .nz-tailor-body {
    padding: 50px var(--nz-gutter);
  }

  .nz-tag {
    gap: 8px;
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .nz-team {
    padding: 60px var(--nz-gutter);
  }

  .nz-team-grid {
    flex-direction: column;
    gap: 28px;
  }

  .nz-logos-set {
    gap: 24px;
    padding-right: 24px;
  }

  .nz-logos-set img {
    max-width: 130px;
    height: 65px;
  }

  .nz-probono {
    padding: 40px var(--nz-gutter) 60px;
  }
}

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

  .nz-logos {
    overflow-x: auto;
  }
}
