/* EPB V2 layout */
@font-face {
  font-family: "Open Sans Regular";
  src: url("../assets/fonts/open-sans-regular.eot");
  src: url("../assets/fonts/open-sans-regular.eot?#iefix") format("embedded-opentype"),
    url("../assets/fonts/open-sans-regular.woff2") format("woff2"),
    url("../assets/fonts/open-sans-regular.woff") format("woff"),
    url("../assets/fonts/open-sans-regular.ttf") format("truetype"),
    url("../assets/fonts/open-sans-regular.svg#open-sans-regular") format("svg");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Open Sans Light";
  src: url("../assets/fonts/open-sans-light.eot");
  src: url("../assets/fonts/open-sans-light.eot?#iefix") format("embedded-opentype"),
    url("../assets/fonts/open-sans-light.woff2") format("woff2"),
    url("../assets/fonts/open-sans-light.woff") format("woff"),
    url("../assets/fonts/open-sans-light.ttf") format("truetype"),
    url("../assets/fonts/open-sans-light.svg#open-sans-light") format("svg");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "Open Sans Bold";
  src: url("../assets/fonts/open-sans-bold.eot");
  src: url("../assets/fonts/open-sans-bold.eot?#iefix") format("embedded-opentype"),
    url("../assets/fonts/open-sans-bold.woff2") format("woff2"),
    url("../assets/fonts/open-sans-bold.woff") format("woff"),
    url("../assets/fonts/open-sans-bold.ttf") format("truetype"),
    url("../assets/fonts/open-sans-bold.svg#open-sans-bold") format("svg");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "Prata";
  src: url("../assets/fonts/prata-regular.eot");
  src: url("../assets/fonts/prata-regular.eot?#iefix") format("embedded-opentype"),
    url("../assets/fonts/prata-regular.woff2") format("woff2"),
    url("../assets/fonts/prata-regular.woff") format("woff"),
    url("../assets/fonts/prata-regular.ttf") format("truetype"),
    url("../assets/fonts/prata-regular.svg#prata-regular") format("svg");
  font-weight: normal;
  font-style: normal;
}
.epb-v2 {
  --ink: #0f1f2b;
  --muted: #445566;
  --accent: #083450;
  --accent-2: #d2d6dc;
  --surface: #ffffff;
  --surface-2: #eef3f7;
  background: linear-gradient(135deg, #f1f6fb 0%, #e5edf5 100%);
  color: var(--ink);
  font-family: "Open Sans Regular", sans-serif;
}

/* Default text color; overridden on specific components when needed */
.epb-v2 * {
  color: var(--ink);
}

.epb-v2 a {
  color: var(--ink);
}

.epb-v2 a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Visible keyboard focus for accessibility */
.epb-v2 a:focus-visible,
.epb-v2 button:focus-visible,
.epb-v2 .epb-btn:focus-visible,
.epb-v2 .epb-burger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Layout container aligns with section grid gutters */
.epb-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.epb-shell {
  padding-top: 0;
  padding-bottom: 0;
}

/* Header */
/* Sticky header keeps visual continuity over hero video */
.epb-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(250, 248, 244, 0.9);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.epb-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 0;
  padding-bottom: 0;
}

.epb-brand {
  display: inline-flex;
  align-items: center;
  height: 136px;
}

.epb-brand img {
  height: 136px;
  width: auto;
  display: block;
  padding: 5px 0;
}

/* Primary navigation is centered between logo and controls */
.epb-nav {
  display: flex;
  gap: 24px;
  font-size: 15px;
  letter-spacing: 0.02em;
  margin: 0;
  flex: 1;
  justify-content: center;
}

/* Mobile-only panel lives under header; hidden by default */
.epb-nav-panel {
  display: none;
}

.epb-nav a {
  position: relative;
  padding-bottom: 6px;
}

/* Micro-underline on hover for clarity without heavy borders */
.epb-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width 0.3s ease;
}

.epb-nav a:hover::after {
  width: 100%;
}

.epb-nav a.is-active {
  color: var(--accent);
  font-weight: 600;
}

.epb-nav a.is-active::after {
  width: 100%;
}

.epb-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.epb-lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(8, 52, 80, 0.2);
  border-radius: 999px;
  background: #ffffff;
  padding: 2px;
  width: 30px;
  height: 30px;
}

.epb-flag {
  width: 24px;
  height: 24px;
  display: block;
  border-radius: 999px;
  object-fit: cover;
}

.epb-burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(8, 52, 80, 0.25);
  border-radius: 999px;
  padding: 10px 12px;
}

.epb-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--accent);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Burger morphs to X via transforms for smooth GPU animation */
.epb-burger.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.epb-burger.is-open span:nth-child(2) {
  opacity: 0;
}

.epb-burger.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hero */
.epb-hero {
  position: relative;
  padding: 90px 0 0;
  overflow: hidden;
}

/* Video sits behind a gradient overlay to preserve contrast */
.epb-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  z-index: 0;
}

/* Hero overlay ensures text contrast on video */
.epb-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(241, 246, 251, 0.22), rgba(229, 237, 245, 0.1));
  z-index: 1;
}

/* Decorative gradient blob */
.epb-hero::before {
  content: "";
  position: absolute;
  right: -120px;
  top: -170px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(11, 95, 116, 0.18), rgba(11, 95, 116, 0));
  border-radius: 50%;
}

.epb-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 2;
  padding-top: 0;
  padding-bottom: 70px;
}

/* Staggered reveal for hero content */
.epb-hero__content {
  animation: epb-fade-up 0.6s ease both;
}

.epb-hero__content h1 {
  font-family: "Prata", serif;
  font-size: 44px;
  line-height: 1.15;
  margin-bottom: 16px;
}

.epb-hero__content > *:nth-child(1) {
  animation-delay: 0.05s;
}

.epb-hero__content > *:nth-child(2) {
  animation-delay: 0.1s;
}

.epb-hero__content > *:nth-child(3) {
  animation-delay: 0.15s;
}

.epb-hero__content > *:nth-child(4) {
  animation-delay: 0.2s;
}

/* Secondary hero cards (right column) */
.epb-hero__panel {
  display: grid;
  gap: 18px;
}

.epb-hero__card {
  background: var(--surface);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.epb-hero__card h3 {
  font-family: "Prata", serif;
  font-size: 20px;
  margin-bottom: 6px;
}

.epb-hero__card p {
  margin-bottom: 0;
}

.epb-eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 12px;
}

.epb-lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 560px;
}

.epb-cta {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

/* Buttons */
/* Primary CTA baseline */
.epb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  background: var(--accent);
  color: #fff !important;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.epb-btn:not(.epb-btn--ghost):hover,
.epb-btn:not(.epb-btn--ghost):focus {
  color: #fff !important;
  transform: translateY(-1px);
  background: #0a4466;
  box-shadow: 0 10px 20px rgba(8, 52, 80, 0.25);
}

.epb-btn.epb-btn--ghost:hover,
.epb-btn.epb-btn--ghost:focus {
  color: var(--accent) !important;
  background: #f7f9fc;
  border-color: #0a4466;
  box-shadow: 0 10px 20px rgba(8, 52, 80, 0.18);
  transform: translateY(-1px);
}

.epb-btn:visited,
.epb-btn:active {
  color: #fff !important;
}

.epb-btn--ghost:visited,
.epb-btn--ghost:active {
  color: var(--accent) !important;
}

/* Ghost CTA keeps contrast over light surfaces */
.epb-btn--ghost {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--accent);
  color: var(--accent) !important;
}

/* Sections */
.epb-section {
  padding: 70px 0;
}

.epb-section--alt {
  background: var(--surface-2);
}

.epb-section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
}

.epb-section__head h2 {
  font-family: "Prata", serif;
  font-size: 32px;
}

.epb-section__head p {
  color: var(--muted);
  max-width: 480px;
}

.epb-section__cta {
  margin-top: 36px;
  display: flex;
  justify-content: flex-start;
}

/* Grid + cards */
/* Layout grids */
.epb-grid {
  display: grid;
  gap: 24px;
}

.epb-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.epb-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.epb-grid--clients-home {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.epb-grid--logo-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.epb-card,
.epb-step,
.epb-case {
  background: var(--surface);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

.epb-card:hover,
.epb-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.1);
}

.epb-case {
  position: relative;
}

.epb-case--linked {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.epb-case--linked:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.1);
}

.epb-card h3,
.epb-step h3,
.epb-case h3 {
  font-family: "Prata", serif;
  font-size: 20px;
  margin-bottom: 10px;
}

.epb-card p {
  margin-bottom: 0;
}

.epb-step span {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 12px;
}

.epb-case__meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 10px;
}

.epb-case__media {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
}

.epb-case__media--static {
  pointer-events: none;
}

.epb-case__media img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
  display: block;
}

.epb-case--home {
  padding: 20px;
}

.epb-case__media--home {
  margin-bottom: 12px;
}

.epb-case__media--home img {
  height: 132px;
}

.epb-case__link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 18px;
}

.epb-logo-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 22px 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 150px;
  scroll-snap-align: start;
}
.epb-carousel .epb-logo-card {
  box-shadow: 0 12px 18px -14px rgba(0, 0, 0, 0.12);
}

.epb-logo-card img {
  width: 100%;
  max-width: 170px;
  height: 72px;
  object-fit: contain;
  object-position: center;
  display: block;
}

.epb-logo-card--listing {
  min-height: 170px;
}

.epb-carousel {
  position: relative;
}

.epb-carousel__bottombar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: -32px;
  margin-bottom: calc(-18px - 0);
}

.epb-carousel__btn {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(8, 52, 80, 0.16);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.epb-carousel__btn:hover {
  transform: translateY(-1px);
  border-color: rgba(8, 52, 80, 0.28);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.epb-carousel__btn:disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.epb-carousel__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: none;
  padding: 0 0 50px;
}

.epb-carousel__viewport::-webkit-scrollbar {
  display: none;
}

.epb-carousel__viewport.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.epb-carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 48px) / 3);
  gap: 24px;
}

/* Case detail */
/* Case detail split view: media + copy */
.epb-case-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.epb-case-detail__media img {
  width: 100%;
  border-radius: 18px;
  display: block;
}

.epb-case-detail__content h3 {
  font-family: "Prata", serif;
  margin: 0 0 8px;
  font-size: 22px;
}

.epb-hero--compact {
  padding: 70px 0 0;
}

/* Client detail pages: slightly different header background for separation */
body[id^="clients_"] .epb-hero {
  background: linear-gradient(135deg, #f1f6fb 0%, #e2edf5 100%);
}

body[id^="clients_"] .epb-section {
  background: #ffffff;
}

body[id^="clients_"] .epb-shell {
  padding-bottom: 0;
}

/* Footer */
.epb-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: #f6f4ef;
  padding: 30px 0;
}

.epb-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 0.8fr));
  gap: 24px;
  align-items: start;
}

.epb-footer__brand img {
  height: 136px;
  width: auto;
  margin-bottom: 12px;
}

.epb-footer__item h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 10px;
}

.epb-footer__bottom {
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
}

/* Motion */
@keyframes epb-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 980px) {
  .epb-hero__inner {
    grid-template-columns: 1fr;
  }

  .epb-section__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .epb-grid--2,
  .epb-grid--3 {
    grid-template-columns: 1fr;
  }

  .epb-grid--clients-home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .epb-grid--logo-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .epb-nav {
    gap: 16px;
  }

  .epb-footer__grid {
    grid-template-columns: 1fr;
  }

  .epb-case-detail {
    grid-template-columns: 1fr;
  }

  .epb-carousel__track {
    grid-auto-columns: calc((100% - 24px) / 2);
  }
}

@media (max-width: 720px) {
  /* Mobile header: burger + collapsible nav panel */
  .epb-header__inner {
    flex-direction: row;
    align-items: center;
  }

  .epb-burger {
    display: inline-flex;
  }

  .epb-nav--desktop {
    display: none;
  }

  .epb-nav-panel {
    display: block;
    width: 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
    background: linear-gradient(135deg, #f1f6fb 0%, #e5edf5 100%);
    border-top: 1px solid rgba(8, 52, 80, 0.12);
  }

  .epb-nav-panel.is-open {
    max-height: 360px;
    opacity: 1;
    transform: translateY(0);
  }

  .epb-nav--mobile {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 24px 20px;
  }

  .epb-controls {
    margin-left: auto;
  }

  .epb-brand img {
    height: 110px;
  }

  .epb-footer__brand img {
    height: 130px;
  }

  .epb-nav a {
    font-size: 14px;
  }

  .epb-hero {
    padding-top: 60px;
  }

  .epb-hero__content h1 {
    font-size: 34px;
  }

  .epb-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .epb-grid--clients-home {
    grid-template-columns: 1fr;
  }

  .epb-grid--logo-list {
    grid-template-columns: 1fr;
  }

  .epb-case__media--home img {
    height: 152px;
  }

  .epb-carousel__track {
    grid-auto-columns: 100%;
  }

  .epb-carousel__bottombar {
    justify-content: flex-start;
  }
}
