/* ============================================
   IP HUSE - Employer page (iph-* prefix)
   Page-specific layer on top of employer-magazine.css.
   Shared rules (em-opening, v-glance, em-nudge) are only overridden
   under .employer-page--iph. The open-position panels live in
   ip-huse-positions.css.
   ============================================ */

.employer-page--iph {
  --iph-gutter: clamp(1.25rem, 4vw, 3rem);
  --iph-pad: clamp(4.5rem, 9vw, 8.5rem);
  --iph-max: 1200px;
  --iph-ease: cubic-bezier(0.22, 0.8, 0.2, 1);
  --iph-blush: #ddbab4; /* light tint of --color-gold: kickers, hover states */
  background: var(--color-cream);
}

/* ---- Shared pieces ---- */
.iph-section {
  padding: var(--iph-pad) var(--iph-gutter);
  font-family: var(--font-body);
  color: var(--color-text-primary);
}
.iph-section--cream { background: var(--color-cream); }
.iph-section--white { background: var(--color-warm-white); }
.iph-section--midnight { background: var(--color-midnight); color: var(--color-text-inverse); }

.iph-wrap {
  max-width: var(--iph-max);
  margin: 0 auto;
}

.iph-head {
  max-width: var(--iph-max);
  margin: 0 auto clamp(2.5rem, 5vw, 4.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.25rem clamp(2rem, 7vw, 7rem);
}
.iph-head__title { flex: 1 1 320px; }
.iph-head__lead {
  flex: 1.3 1 380px;
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  line-height: 1.6;
  margin: 0;
  text-wrap: pretty;
}

.iph-h2 {
  font-family: var(--font-body);
  font-size: clamp(2.25rem, 4.6vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

.iph-rule {
  display: block;
  width: 120px;
  height: 3px;
  margin-top: 1.25rem;
  background: #2d6a3f;
  transform-origin: left center;
}
.iph-rule--light { background: #7dbb8d; }

.iph-kicker {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--iph-blush);
  margin-bottom: 0.875rem;
}

.iph-credit {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: #666;
  margin-top: 0.625rem;
}
.iph-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.iph-credit--over {
  position: absolute;
  right: var(--iph-gutter);
  bottom: 0.875rem;
  margin: 0;
  font-size: 0.75rem;
  color: rgba(250, 248, 245, 0.85);
}

.iph-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  padding: 0.8em 1.6em;
  border: 1.5px solid transparent;
  border-radius: var(--radius-full);
  box-sizing: border-box;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.iph-btn:hover { transform: translateY(-2px); }
.iph-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.iph-btn--primary {
  color: var(--color-midnight);
  background: var(--color-gold);
  border-color: var(--color-gold);
}
.iph-btn--primary:hover { background: var(--iph-blush); border-color: var(--iph-blush); }
.iph-btn--outline {
  color: var(--color-text-inverse);
  background: rgba(250, 248, 245, 0.08);
  border-color: rgba(250, 248, 245, 0.55);
}
.iph-btn--outline:hover {
  background: rgba(250, 248, 245, 0.2);
  border-color: var(--color-text-inverse);
}

/* ---- 1. Hero ---- */
.employer-page--iph .em-opening {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: auto;
  min-height: max(100vh, 640px);
  min-height: max(100dvh, 640px);
  padding: 0 var(--iph-gutter);
  box-sizing: border-box;
}
.employer-page--iph .em-opening__gradient {
  background: linear-gradient(
    to top,
    rgba(10, 22, 40, 0.96) 0%,
    rgba(10, 22, 40, 0.7) 30%,
    rgba(10, 22, 40, 0.2) 65%,
    rgba(10, 22, 40, 0.1) 100%
  );
}
.employer-page--iph .em-opening__content {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: var(--iph-max);
  margin: 0 auto;
  padding: 140px 0 0;
  box-sizing: border-box;
}
.employer-page--iph .em-opening__kicker {
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  backdrop-filter: none;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--iph-blush);
}
.employer-page--iph .em-opening__title {
  font-family: var(--font-body);
  font-size: clamp(4rem, 13vw, 12.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.85;
  margin: 0 0 clamp(1rem, 2vw, 1.75rem);
}
.employer-page--iph .em-opening__subtitle {
  font-size: clamp(1.25rem, 2.5vw, 2.125rem);
  line-height: 1.3;
  color: rgba(250, 248, 245, 0.88);
  margin: 0;
}
.iph-hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2.5rem;
}
.iph-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  opacity: 0;
  animation: emReveal 0.9s var(--ease-out-expo) 1.3s forwards;
}
.iph-hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 0 2rem;
  margin: clamp(1.75rem, 3.5vw, 3.25rem) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(250, 248, 245, 0.28);
  font-family: var(--font-body);
  opacity: 0;
  animation: emReveal 0.9s var(--ease-out-expo) 1.5s forwards;
}
.iph-hero__stat { padding: 1.25rem 0 clamp(1.5rem, 3vw, 2.25rem); }
.iph-hero__figure {
  display: block;
  font-size: clamp(1.75rem, 3vw, 2.625rem);
  line-height: 1;
  margin-bottom: 0.625rem;
  color: var(--color-text-inverse);
}
.iph-hero__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(250, 248, 245, 0.8);
}

/* ---- 2. Ingress (VillageGlance) with image ---- */
.employer-page--iph .v-glance {
  background: var(--color-midnight);
  padding: 0;
}
.employer-page--iph .v-glance__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 43rem) minmax(0, 29rem) minmax(0, 1fr);
  align-items: center;
  margin-top: 0;
  padding-bottom: var(--iph-pad);
  background: var(--color-midnight);
  /* The shared intro opens with a horizontal scale. Here the panel matches its
     backdrop, so the scale would only squeeze the image: keep the fade alone. */
  transform: none;
}
.employer-page--iph .v-glance__intro > .v-page-nav,
.employer-page--iph .v-glance__intro > .v-page-nav-placeholder {
  grid-column: 1 / -1;
}
.employer-page--iph .v-glance__intro > p {
  grid-column: 2;
  max-width: none;
  margin: var(--iph-pad) 0 0;
  padding: 0 clamp(2rem, 6vw, 7rem) 0 0;
  border-left: none;
  font-size: clamp(1.5rem, 2.5vw, 2.125rem);
  line-height: 1.5;
  color: rgba(250, 248, 245, 0.92);
  text-wrap: pretty;
}
.employer-page--iph .v-glance__dropcap { color: var(--color-gold); }
.iph-intro__figure {
  grid-column: 3;
  margin: var(--iph-pad) 0 0;
}
.iph-intro__figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 42% center;
  border-radius: var(--radius-md);
}
.iph-intro__figure figcaption {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: rgba(250, 248, 245, 0.65);
  margin-top: 0.75rem;
}

/* ---- 3. What we do ---- */
.iph-sectors {
  max-width: var(--iph-max);
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  color: var(--color-text-inverse);
  background: var(--color-cream);
}
.iph-sectors__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1px;
}
.iph-sector {
  background: var(--surface-utility);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  transition: background 0.3s ease;
}
.iph-sector:hover { background: #2e4d63; }
.iph-sector__name {
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 400;
  margin: 0 0 0.75rem;
}
.iph-sector__desc {
  font-size: clamp(0.875rem, 1.3vw, 1rem);
  line-height: 1.65;
  color: rgba(250, 248, 245, 0.8);
  margin: 0;
}
.iph-creds {
  margin-top: 1px;
  background: var(--surface-utility);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.75rem clamp(2rem, 6vw, 6rem);
}
.iph-creds__label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-gold);
  margin: 0 0 0.875rem;
}
.iph-creds__text {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.7;
  color: rgba(250, 248, 245, 0.85);
  margin: 0;
}
.iph-creds__text--large {
  font-size: clamp(1.125rem, 1.7vw, 1.25rem);
  color: var(--color-text-inverse);
}

/* ---- 4. Film ---- */
.iph-film__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: var(--iph-max);
  margin: 0 auto;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.iph-film__frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The overlay only exists with JS; without it the native controls are used. */
.iph-film__play { display: none; }
.iph-ready .iph-film__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.25rem, 4.5vw, 4rem);
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--color-text-inverse);
  text-align: left;
  background: linear-gradient(to top, rgba(10, 22, 40, 0.88) 0%, rgba(10, 22, 40, 0.3) 50%, rgba(10, 22, 40, 0.1) 100%);
}
.iph-ready .iph-film__play[hidden] { display: none; }
.iph-film__title {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5.2vw, 4.75rem);
  font-style: italic;
  line-height: 1.05;
}
.iph-film__icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(60px, 7vw, 96px);
  height: clamp(60px, 7vw, 96px);
  border-radius: 50%;
  background: var(--color-gold);
  transition: transform 0.3s var(--iph-ease), background 0.3s ease;
}
.iph-film__icon svg {
  width: 32%;
  height: 32%;
  margin-left: 4%;
  fill: var(--color-midnight);
}
.iph-film__play:hover .iph-film__icon,
.iph-film__play:focus-visible .iph-film__icon {
  transform: scale(1.12);
  background: var(--iph-blush);
}

/* ---- 6. Next step ---- */
.iph-next {
  background: var(--color-midnight);
  color: var(--color-text-inverse);
  font-family: var(--font-body);
}
.iph-next__media {
  position: relative;
  height: clamp(380px, 50vw, 780px);
  overflow: hidden;
}
.iph-next__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}
.iph-next__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 22, 40, 0) 0%, rgba(10, 22, 40, 0) 58%, rgba(10, 22, 40, 0.6) 82%, var(--color-midnight) 100%);
}
.iph-next__media .iph-credit--over {
  z-index: 1;
  bottom: clamp(4rem, 8.5vw, 8.25rem);
}
.iph-next__body {
  position: relative;
  margin-top: clamp(-120px, -7.5vw, -56px);
  padding: 0 var(--iph-gutter) var(--iph-pad);
}
.iph-next__title {
  max-width: 1000px;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8.2vw, 7.75rem);
  font-weight: 400;
  font-style: italic;
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0 0 clamp(2.5rem, 5.5vw, 5rem);
  text-wrap: balance;
}
.iph-next__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2.5rem clamp(2.5rem, 8vw, 8rem);
}
.iph-next__about { flex: 1 1 340px; }
.iph-next__details { flex: 1.2 1 400px; }
.iph-next__brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.5rem;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  letter-spacing: 0.04em;
  color: rgba(250, 248, 245, 0.85);
}
.iph-next__brand img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  object-fit: cover;
}
.iph-next__text {
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  line-height: 1.6;
  color: rgba(250, 248, 245, 0.9);
  margin: 0 0 2rem;
  text-wrap: pretty;
}
.iph-next__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.iph-next__detail {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.375rem 2rem;
  padding: 1.375rem 0;
  border-top: 1px solid rgba(250, 248, 245, 0.22);
  color: var(--color-text-inverse);
  text-decoration: none;
  transition: color 0.2s ease;
}
.iph-next__detail:last-child { border-bottom: 1px solid rgba(250, 248, 245, 0.22); }
.iph-next__detail:hover { color: var(--color-gold); }
.iph-next__detail-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-gold);
}
.iph-next__detail-value {
  font-size: clamp(1.25rem, 2.3vw, 1.875rem);
  font-weight: 300;
  letter-spacing: -0.01em;
}

/* ---- 8–9. Village and region ---- */
.iph-place {
  font-family: var(--font-body);
}
.iph-place--cream { background: var(--color-cream); }
.iph-place--white { background: var(--color-warm-white); }
.iph-place__hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: clamp(420px, 52vw, 760px);
  padding: 0 var(--iph-gutter) clamp(2rem, 4.5vw, 4rem);
  overflow: hidden;
  color: var(--color-text-inverse);
}
.iph-place__hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.iph-place__hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 22, 40, 0.82) 0%, rgba(10, 22, 40, 0.25) 50%, rgba(10, 22, 40, 0) 75%);
}
.iph-place__hero .iph-credit--over { z-index: 1; }
.iph-place__heading {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--iph-max);
  margin: 0 auto;
}
.iph-place__title {
  font-family: var(--font-body);
  font-size: clamp(2.75rem, 7.4vw, 7rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0;
}
.iph-place__body {
  padding: clamp(3.5rem, 7vw, 6.5rem) var(--iph-gutter) var(--iph-pad);
}
.iph-place__lead {
  max-width: 900px;
  font-size: clamp(1.375rem, 2.4vw, 2rem);
  font-weight: 300;
  line-height: 1.5;
  color: var(--color-text-primary);
  margin: 0;
  text-wrap: pretty;
}
.iph-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  align-items: center;
  gap: 1.75rem clamp(2rem, 7vw, 6.5rem);
  margin-top: clamp(2.5rem, 6vw, 5.5rem);
}
.iph-split figure { margin: 0; }
.iph-split img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
}
.iph-split__text {
  font-size: clamp(1.125rem, 1.7vw, 1.25rem);
  line-height: 1.8;
  color: var(--color-text-secondary);
}
.iph-split__text p { margin: 0 0 1.5rem; }
.iph-split__text p:last-child { margin-bottom: 0; }
.iph-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: clamp(3rem, 6vw, 5.5rem);
  padding: 1.625rem 0;
  border-top: 1px solid rgba(26, 26, 26, 0.2);
  border-bottom: 1px solid rgba(26, 26, 26, 0.2);
  color: var(--color-text-primary);
  text-decoration: none;
  transition: background 0.25s ease, padding 0.3s ease;
}
.iph-more:hover {
  background: rgba(36, 61, 79, 0.07);
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.iph-more__title {
  display: block;
  font-size: clamp(1.25rem, 2vw, 1.625rem);
}
.iph-more__text {
  display: block;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-top: 0.25rem;
}
.iph-more__icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(26, 26, 26, 0.3);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.iph-more:hover .iph-more__icon {
  background: var(--surface-utility);
  border-color: var(--surface-utility);
  color: var(--color-text-inverse);
}
.iph-more__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* ---- 10. Quote ---- */
.iph-quote {
  background: var(--surface-utility);
  padding: var(--iph-pad) var(--iph-gutter);
  text-align: center;
}
.iph-quote blockquote {
  max-width: 960px;
  margin: 0 auto;
}
.iph-quote p {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.2;
  color: var(--color-cream);
  margin: 0;
  text-wrap: balance;
}

/* ---- 11. Gallery ---- */
.iph-gallery { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.iph-gallery__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: clamp(1.75rem, 3.5vw, 3rem);
}
.iph-gallery__nav {
  display: flex;
  gap: 0.625rem;
}
.iph-gallery__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(26, 26, 26, 0.3);
  background: transparent;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.iph-gallery__btn:hover {
  transform: scale(1.1);
  background: var(--surface-utility);
  border-color: var(--surface-utility);
  color: var(--color-text-inverse);
}
.iph-gallery__btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.iph-gallery__track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: var(--radius-md);
}
.iph-gallery__track::-webkit-scrollbar { display: none; }
.iph-gallery__frame {
  flex: 0 0 calc((100% - 2rem) / 3);
  min-width: min(260px, 78%);
  margin: 0;
  scroll-snap-align: start;
}
.iph-gallery__frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* ---- 12. Nudge: darker link for contrast on cream ---- */
.employer-page--iph .em-nudge__link {
  color: #8a554d;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.employer-page--iph .em-nudge__link:hover { color: #6f4039; }

/* ---- Scroll reveal ----
   ip-huse-page.js adds .is-armed only to elements below the fold, and only
   when motion is allowed. Without JS nothing is ever hidden.
   Images fade and rise like the text: a top-down wipe reads as an image
   that is still loading. */
[data-iph-reveal].is-armed {
  opacity: 0;
  transform: translateY(24px);
}
[data-iph-reveal="line"].is-armed {
  opacity: 1;
  transform: scaleX(0.02);
}
[data-iph-reveal].is-in {
  transition: opacity 0.6s ease-out, transform 0.6s var(--iph-ease);
}
[data-iph-reveal="media"].is-in { transition-duration: 0.8s; }

/* ---- Tablet: ingress stacks ---- */
@media (max-width: 900px) {
  .employer-page--iph .v-glance__intro {
    grid-template-columns: minmax(0, 1fr);
  }
  .employer-page--iph .v-glance__intro > p,
  .iph-intro__figure {
    grid-column: 1;
  }
  .employer-page--iph .v-glance__intro > p { padding-right: 0; }
  .iph-intro__figure { margin-top: 2.5rem; }
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
  /* Stacked hero text reaches higher up, and the film has very bright
     frames: keep the tint dense all the way behind the kicker. */
  .employer-page--iph .em-opening__gradient {
    background: linear-gradient(
      to top,
      rgba(10, 22, 40, 0.96) 0%,
      rgba(10, 22, 40, 0.84) 40%,
      rgba(10, 22, 40, 0.6) 74%,
      rgba(10, 22, 40, 0.15) 100%
    );
  }
  .iph-credit--over { bottom: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .iph-hero__actions,
  .iph-hero__stats {
    opacity: 1;
    animation: none !important;
  }
  .iph-btn,
  .iph-more,
  .iph-gallery__btn { transition: none; }
  .iph-gallery__track { scroll-behavior: auto; }
}
