/* Export page sections, built on the catalogue tokens (navy, gold, Luxia and Sohne) and the
   patterns used elsewhere on the site: eyebrow headings, gold accents and navy bands. */

/* Shared section type */
.nv-x-title {
  margin: 0;
  font-family: Luxia, Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.25rem, 3.6vw, 3.75rem);
  line-height: 1.1;
  color: var(--nv-navy);
}

.nv-x-title--light {
  color: #fff;
}

.nv-x-text {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--nv-ink);
}

.nv-x-text--light {
  color: rgba(255, 255, 255, 0.78);
}

/* Global presence: heading and paragraph only */
.nv-x-presence {
  padding: clamp(5rem, 9vw, 8rem) var(--nv-gutter);
  background: #fff;
}

.nv-x-presence__inner {
  max-width: var(--nv-col, 1680px);
  margin: 0 auto;
}

.nv-x-presence .nv-x-text {
  max-width: 48rem;
  font-size: 1.0625rem;
}

/* Figures band: a full-width band on the Our Presence banner photo under a soft white veil, with thin navy line squares that turn slowly as the page
   scrolls (novalis-export.js sets --spin), and figures that rise in and count up. */
.nv-x-figures {
  --spin: 0;
  position: relative;
  padding: clamp(6.25rem, 11vw, 10rem) var(--nv-gutter);
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.78)),
    url("../images/novalis-presence-banner.jpg") center / cover;
}

.nv-x-figures__square {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(38, 52, 80, 0.25);
  pointer-events: none;
}

.nv-x-figures__square:nth-child(1) {
  width: 78%;
  height: 120%;
  transform: translate(-50%, -50%) rotate(calc(-6deg + var(--spin) * 10deg));
}

.nv-x-figures__square:nth-child(2) {
  width: 60%;
  height: 95%;
  border-color: rgba(38, 52, 80, 0.2);
  transform: translate(-50%, -50%) rotate(calc(4deg - var(--spin) * 8deg));
}

.nv-x-figures__square:nth-child(3) {
  width: 42%;
  height: 70%;
  border-color: rgba(38, 52, 80, 0.16);
  transform: translate(-50%, -50%) rotate(calc(-2deg + var(--spin) * 6deg));
}

.nv-x-figures__row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  max-width: var(--nv-col, 1680px); /* same edges as the header and every other section */
  margin: 0 auto;
  text-align: center;
}

.nv-x-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.nv-x-figure__value {
  display: inline-flex;
  align-items: flex-start;
  font-family: Luxia, Georgia, serif;
  font-size: clamp(3.5rem, 6vw, 5.75rem);
  line-height: 1;
  color: var(--nv-navy);
}

.nv-x-figure__plus {
  margin: 0.02em 0 0 0.1em;
  font-size: 0.45em;
  color: var(--nv-gold);
}

.nv-x-figure__label {
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--nv-navy);
}

.nv-x-figures--ready .nv-x-figure {
  opacity: 0;
  transform: translateY(2rem);
  transition:
    opacity 0.8s ease calc(var(--i) * 0.12s),
    transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--i) * 0.12s);
}

.nv-x-figures--ready.is-inview .nv-x-figure {
  opacity: 1;
  transform: none;
}

/* Global reach: navy band, heading on top and two paragraphs across the full width */
.nv-x-reach {
  padding: clamp(5rem, 9vw, 8rem) var(--nv-gutter);
  background: var(--nv-navy);
}

.nv-x-reach__inner {
  max-width: var(--nv-col, 1680px);
  margin: 0 auto;
}

.nv-x-reach__text {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 5vw, 5rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}

.nv-x-reach__text p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.78);
  text-wrap: pretty;
}

/* Countries at the bottom of Global reach: two rows of large soft names gliding in opposite
   directions, each looping over two copies of its list. On hover devices a tilted flag card follows the cursor over a name
   (novalis-export.js); on touch screens each name shows its small flag instead. */
.nv-x-countries {
  position: relative;
  /* Edge to edge of the screen at any width, not just the content column. */
  margin: clamp(3rem, 5vw, 4.5rem) calc(50% - 50vw) 0;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  overflow: hidden;
}

.nv-x-countries__track {
  display: flex;
  width: max-content;
  animation: nv-x-countries 50s linear infinite;
}

/* Second row runs the other way. */
.nv-x-countries__track--reverse {
  margin-top: clamp(0.75rem, 1.5vw, 1.25rem);
  animation-direction: reverse;
}

.nv-x-countries:hover .nv-x-countries__track {
  animation-play-state: paused;
}

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

.nv-x-countries__list {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nv-x-countries__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 clamp(1.25rem, 2.5vw, 2.5rem);
  white-space: nowrap;
  cursor: default;
}

/* Gold dot between names. */
.nv-x-countries__item::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: clamp(1.25rem, 2.5vw, 2.5rem);
  border-radius: 50%;
  background: var(--nv-gold);
}

.nv-x-countries__name {
  font-family: Luxia, Georgia, serif;
  font-size: clamp(2.25rem, 4.5vw, 4.25rem);
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.42);
  transition: color 0.35s ease;
}

.nv-x-countries__item:hover .nv-x-countries__name {
  color: #fff;
}

.nv-x-countries__mini {
  display: none;
  width: 2rem;
  height: 1.5rem;
  object-fit: cover;
  border-radius: 2px;
}

.nv-x-countries__flag {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 7.5rem;
  aspect-ratio: 4 / 3;
  border: 3px solid #fff;
  box-shadow: 0 16px 36px rgba(10, 16, 30, 0.35);
  pointer-events: none;
  opacity: 0;
  transform: translate(var(--fx, 0), var(--fy, 0)) rotate(-6deg) scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nv-x-countries__flag.is-shown {
  opacity: 1;
  transform: translate(var(--fx, 0), var(--fy, 0)) rotate(-6deg) scale(1);
}

.nv-x-countries__flag img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Touch screens: no cursor to follow, so show the small flag beside each name. */
@media (hover: none) {
  .nv-x-countries__mini {
    display: block;
  }
  .nv-x-countries__flag {
    display: none;
  }
  .nv-x-countries__name {
    color: rgba(255, 255, 255, 0.6);
  }
}

/* Tablet */
@media (max-width: 991px) {
  .nv-x-reach__text {
    grid-template-columns: 1fr;
  }
}

/* Phones */
@media (max-width: 767px) {
  .nv-x-figures__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem 1rem;
  }
  .nv-x-figure__value {
    font-size: clamp(2.75rem, 13vw, 3.5rem);
  }
  .nv-x-figure__label {
    font-size: 0.6875rem;
    letter-spacing: 0.16em;
  }
  .nv-x-figures__square:nth-child(1) { width: 120%; }
  .nv-x-figures__square:nth-child(2) { width: 95%; }
  .nv-x-figures__square:nth-child(3) { width: 70%; }
}

@media (prefers-reduced-motion: reduce) {
  .nv-x-figures--ready .nv-x-figure {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .nv-x-figures {
    --spin: 0 !important;
  }
  .nv-x-countries__track {
    animation: none;
    width: auto;
  }
  .nv-x-countries__list {
    flex-wrap: wrap;
    row-gap: 1rem;
    padding: 0 var(--nv-gutter);
  }
  .nv-x-countries__list[aria-hidden="true"],
  .nv-x-countries__item[aria-hidden="true"] {
    display: none;
  }
  .nv-x-countries__flag {
    transition: none;
  }
}
