:root {
  --cream: #fffff0;
  --blue: #013648;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Karla', sans-serif;
  background: var(--cream);
  color: var(--blue);
  overflow-x: hidden;
}

/* ── Page shell ─────────────────────────────────────────────── */

.pf-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 96px;
}

.pf-back {
  display: inline-block;
  margin-bottom: 40px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.pf-back:hover {
  border-bottom-color: var(--blue);
}

.pf-block {
  margin-bottom: 80px;
}

/* ── Cards (landing + othernav) ─────────────────────────────── */

.pf-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.pf-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--blue);
}

.pf-card__thumb {
  border-radius: 24px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.35s ease;
}
.pf-card:hover .pf-card__thumb {
  transform: scale(1.02);
}

.pf-card__thumb img {
  max-width: 30%;
  max-height: 40%;
  object-fit: contain;
  display: block;
}

.pf-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 2px 0;
}

.pf-card__name {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.pf-card__date {
  font-size: 0.85rem;
  color: rgba(1, 54, 72, 0.55);
}

/* ── Section header ─────────────────────────────────────────── */

.pf-header {
  display: flex;
  gap: 48px;
  align-items: center;
  margin-bottom: 80px;
}

.pf-header__left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.pf-header__eyebrow {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pf-header__date,
.pf-header__meta-label {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pf-header__title {
  font-size: clamp(2.5rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.pf-header__desc {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.65;
}

.pf-header__meta {
  display: flex;
  gap: 24px;
}

.pf-header__meta-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pf-header__meta-list {
  list-style: disc;
  padding-left: 1.1em;
  font-size: 1.125rem;
  line-height: 1.7;
}

.pf-header__right {
  flex-shrink: 0;
  width: 480px;
}

.pf-header__right .pf-img {
  border-radius: 24px;
  aspect-ratio: 2 / 3;
}

.pf-header__right .pf-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Lazy-loaded image wrapper ──────────────────────────────── */

.pf-img {
  position: relative;
  overflow: hidden;
}
.pf-img img {
  display: block;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.pf-img.is-loaded img {
  opacity: 1;
}

/* ── Masonry grid ───────────────────────────────────────────── */

.pf-grid {
  /* Break out to viewport width, capped at 2400px */
  margin-left: calc(-50vw + 50%);
  width: 100vw;
  max-width: 2400px;
  padding: 0 32px;
}

.pf-grid__inner {
  position: relative;
  width: 100%;
}

.pf-grid__item {
  position: absolute;
}

.pf-grid__item .pf-img,
.pf-grid__video {
  border-radius: 6px;
}

.pf-grid__item .pf-img img {
  width: 100%;
  height: auto;
}

.pf-grid__video {
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.pf-grid__video wistia-player,
.pf-textimg__img .pf-wistia-embed wistia-player {
  display: block;
  width: 100%;
  height: 100%;
}
.pf-textimg__img .pf-wistia-embed {
  border-radius: 8px;
  overflow: hidden;
}

.pf-grid__caption,
.pf-slideshow__caption {
  font-size: 0.72rem;
  color: rgba(1, 54, 72, 0.55);
  line-height: 1.4;
}
.pf-grid__caption {
  margin-top: 7px;
}

/* ── Slideshow ──────────────────────────────────────────────── */

.pf-slideshow {
  /* Break out to full viewport */
  margin-left: calc(-50vw + 50%);
  width: 100vw;
  overflow: hidden;
}

.pf-slideshow__intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 32px;
  padding: 0 32px;
}

.pf-slideshow__heading,
.pf-textblock__heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.pf-slideshow__heading { margin-bottom: 12px; }
.pf-textblock__heading { margin-bottom: 32px; }
.pf-textimg__text > .pf-textblock__heading {
  margin-bottom: 1rem;
}

.pf-slideshow__text {
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.6;
  color: rgba(1, 54, 72, 0.75);
}

/* Custom cursor: arrow icons swap with mouse position */
.pf-slideshow__track[data-cursor='left'] {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 24 24'><circle cx='12' cy='12' r='11' fill='%23013648'/><path d='M17 10h-6V7L6 12l5 5v-3h6z' fill='%23fffff0'/></svg>") 60 60, pointer;
}
.pf-slideshow__track[data-cursor='right'] {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 24 24'><circle cx='12' cy='12' r='11' fill='%23013648'/><path d='M7 10h6V7l5 5-5 5v-3H7z' fill='%23fffff0'/></svg>") 60 60, pointer;
}

.pf-slideshow__swipe-hint {
  display: none;
  text-align: center;
  padding: 0 0 12px;
}
.pf-slideshow__swipe-hint span {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(1, 54, 72, 0.45);
  animation: swipeHint 2.4s ease-in-out infinite;
}

@keyframes swipeHint {
  0%, 100% { transform: translateX(0);    opacity: 0.3; }
  40%, 60% { transform: translateX(18px); opacity: 1;   }
}

.pf-slideshow__track {
  display: flex;
  position: relative;                  /* anchor for offsetLeft */
  gap: 20px;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pf-slideshow__slide {
  flex-shrink: 0;
  height: 60vh;
  opacity: 0.35;
  transition: opacity 0.45s ease;
}
.pf-slideshow__slide.is-active {
  opacity: 1;
}
.pf-slideshow__slide .pf-img {
  height: 100%;
  border-radius: 8px;
}
.pf-slideshow__slide .pf-img img {
  height: 100%;
  width: auto;
}

.pf-slideshow__caption {
  text-align: center;
  margin-top: 14px;
  padding: 0 32px;
  min-height: 1.2em;
  transition: opacity 0.25s ease;
}

/* ── Text + media ───────────────────────────────────────────── */

.pf-textimg {
  display: flex;
  gap: 56px;
  align-items: center;
  margin-bottom: 48px;
}
.pf-textimg--reversed {
  flex-direction: row-reverse;
}
.pf-textimg:last-child {
  margin-bottom: 0;
}

.pf-textimg__text {
  flex: 1;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.7;
}
.pf-textimg__text p + p {
  margin-top: 1em;
}

.pf-textimg__img {
  flex: 1;
}
.pf-textimg__img .pf-img {
  border-radius: 8px;
}
.pf-textimg__img .pf-img img {
  width: 100%;
  height: auto;
}

/* ── Other sections nav (dark footer) ───────────────────────── */

.pf-othernav {
  /* Break out to full viewport, cancel parent padding-bottom */
  margin-left: calc(-50vw + 50%);
  margin-bottom: -96px;
  width: 100vw;
  background: var(--blue);
  padding: 72px 48px 96px;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.pf-othernav.is-visible {
  opacity: 1;
}

.pf-othernav__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.pf-othernav__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.pf-othernav .pf-card {
  color: var(--cream);
}
.pf-othernav .pf-card__date {
  color: rgba(255, 255, 240, 0.55);
}

/* ── Standalone video ───────────────────────────────────────── */

.pf-video {
  max-width: 720px;
  margin: 0 auto;
}
.pf-video wistia-player {
  display: block;
  width: 100%;
}

/* ── Mobile ─────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .pf-page {
    padding: 32px 20px 64px;
  }

  .pf-block {
    margin-bottom: 56px;
  }

  /* Header: stack with image first */
  .pf-header {
    flex-direction: column-reverse;
    gap: 32px;
  }
  .pf-header__right {
    width: 100%;
  }
  .pf-header__meta {
    flex-wrap: wrap;
  }

  /* Card grid: single column */
  .pf-card-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Masonry: stack vertically */
  .pf-grid {
    width: auto;
    max-width: none;
    padding: 0 20px;
  }
  .pf-grid__inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .pf-grid__item {
    position: static;
    width: 100%;
  }

  /* Slideshow: single full-width image, no peeking sides */
  .pf-slideshow__slide {
    height: auto;
    width: 100vw;
  }
  .pf-slideshow__slide .pf-img {
    height: auto;
  }
  .pf-slideshow__slide .pf-img img {
    width: 100%;
    height: auto;
  }
  .pf-slideshow__swipe-hint {
    display: block;
  }
  .pf-slideshow__intro {
    margin-bottom: 20px;
    padding: 0 20px;
  }

  /* Text+media: stack */
  .pf-textimg,
  .pf-textimg--reversed {
    flex-direction: column;
    gap: 24px;
  }

  /* Othernav: 1 column, smaller breakout */
  .pf-othernav {
    margin-bottom: -64px;
    padding: 56px 20px 72px;
  }
  .pf-othernav__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
