/* ===========================
   Noosfera Hero (Plexus)
   =========================== */

/* --------- Design tokens (override as needed) --------- */
:root {
  --nf-hero-min-h: clamp(28.75rem, 62vh, 47.5rem);
  --nf-hero-min-h-sm: clamp(26.25rem, 52vh, 40.625rem);

  --nf-hero-pad-x: clamp(1rem, 3vw, 2rem);
  --nf-hero-pad-y: clamp(0.5rem, 0.1vw, 0.5rem);

  --nf-hero-content-w: min(42rem, 80%); /* ~40/60 composition */

  --nf-hero-text-shadow: 0 0 0.5px rgba(0,0,0,.25);

  --nf-color-text: var(--c-text, #1a1f36);
  --nf-color-muted: var(--c-text-muted, #596480);
  --nf-color-title: var(--wp-surface-inverse, #163578);

  --nf-divider-height: clamp(5rem, 9vw, 10rem);

  --nf-divider-fill: var(--shape-fill, #fff);
  --nf-divider-purple-fill: var(--shape-purple-fill, #F4F2FE);
}

/* --------- Stage / container --------- */
.nf-hero {
  position: relative;
  overflow: visible;

  padding-top: 0.625rem !important;
  padding-bottom: 0 !important;
  padding-right: 0 !important;

  color: var(--nf-color-text);
}

.nf-hero__inner {
  position: relative;
}

.nf-hero__stage {
  position: relative;
  min-height: var(--nf-hero-min-h);
}

/* Smaller screens */
@media (max-width: 61.25rem) {
  .nf-hero__stage { min-height: var(--nf-hero-min-h-sm); }
}

@media (max-width: 37.5rem) {
  .nf-hero__stage { min-height: calc(var(--nf-hero-min-h) / 1); }
}

/* --------- Background animation layer --------- */
.nf-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.nf-plexus {
  position: absolute;
  inset: 0;

  -webkit-mask-image: radial-gradient(85% 85% at 60% 50%, #000 75%, transparent);
          mask-image: radial-gradient(85% 85% at 60% 50%, #000 75%, transparent);
}

@media (max-width: 78.125rem) {
  .nf-plexus { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .nf-plexus { opacity: 0.25; }
}

/* --------- Foreground content layer --------- */
.nf-hero__content {
  position: relative;
  z-index: 2;
  background: transparent !important;

  margin-inline-start: 0 !important;
  margin-inline-end: auto !important;

  text-align: start;

  width: var(--nf-hero-content-w);

  padding: var(--nf-hero-pad-y) var(--nf-hero-pad-x);
}

@media (min-width: 61.3125rem) {
  .nf-hero__content {
    margin-top: clamp(0.5rem, 3vh, 1.5rem);
  }
}

@media (max-width: 61.25rem) {
  .nf-hero__content {
    width: min(42.5rem, 100%);
    padding-right: clamp(0.5rem, 3vw, 1.5rem);
  }
}

/*
@media (max-width: 25rem) {
  .nf-hero__content {
    min-height: 37.5rem;
  }
}*/

/* --------- Typography --------- */

.nf-eyebrow,
.nf-hero__title,
.nf-hero__lead {
  text-shadow: var(--nf-text-shadow, var(--nf-hero-text-shadow));
}

.nf-eyebrow {
  margin: 0 0 0.6rem;
  letter-spacing: .02em;
  color: var(--nf-color-muted);
  font-weight: 600;
  max-width: 35ch;

  padding-top: clamp(0.1rem, 1vw, 4rem);
  padding-left: 0 !important;
}

.nf-hero__title {
  margin: .1em 0 .25em;

  color: var(--nf-color-title);

  font-style: normal;
  font-weight: 600;

  font-size: clamp(4.7rem, 7vw, 6rem);

  line-height: 1.06;
}

.nf-hero__lead {
  margin: 0 0 1.2rem;
  color: var(--nf-color-muted);
  max-width: 55ch;
}

.nf-hero__cta .wp-block-button {
  margin-right: 0.5rem;
}

/* --------- Divider --------- */

.nf-shape-divider {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;

  line-height: 0;
  z-index: 3;

  pointer-events: none;
}

.nf-shape-divider svg {
  display: block;
  width: 100%;
  height: var(--nf-divider-height);
  fill: var(--nf-divider-fill);
}

.nf-shape-divider .nf-shape-fill {
  fill: var(--nf-divider-fill);
}

.nf-shape-divider .nf-shape-purple-fill {
  fill: var(--nf-divider-purple-fill);
}

.purple-fill {
  fill: var(--nf-divider-purple-fill);
}

.nf-shape-divider.shape-invert svg {
  transform: scaleY(-1);
  transform-origin: center;
}

/* --------- Optional helpers --------- */

.nf-hero__content.alignwide {
  margin-left: 0 !important;
  margin-right: auto !important;
}

.nf-hero .wp-block-group__inner-container {
  padding: 0;
}

.nf-hero {
  isolation: isolate;
}

.wp-block-group.noosfera-pattern.noosfera-pattern--hero-noosfera.is-layout-flow.wp-block-group-is-layout-flow {
  padding: 0;
}

.noosfera-pattern--hero-noosfera .wp-block-group__inner-container {
  padding: 0;
}




/* 1) Reserve bottom space equal to the divider height (+ a little breathing room) */
.nf-hero__stage{
  padding-bottom: calc(var(--nf-divider-height) + 1.5rem);
}

/* 2) Make sure content is ABOVE the divider */
.nf-hero__content{ 
  z-index: 3; 
}
.nf-shape-divider{ 
  z-index: 2; 
}

/* Optional but recommended: CTA behaves better at zoom/small widths */
.nf-hero__cta{
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.nf-hero__cta .wp-block-button{
  margin-right: 0; /* gap replaces margin */
}