/* ESEN redesign — layout/responsive helpers; page content keeps prototype inline styles */
body.esen-body {
  margin: 0;
  background: #FEF8F5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
.esen-shell {
  max-width: 100%;
  margin: 0 auto;
  background: #FEF8F5;
  font-family: Lato, system-ui, sans-serif;
  color: #212529;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: clip;
}
.esen-shell *,
.esen-shell *::before,
.esen-shell *::after {
  box-sizing: border-box;
}
.esen-shell img {
  max-width: 100%;
}
.esen-shell a {
  color: #EB5D1E;
  text-decoration: none;
}
.esen-shell a:hover {
  color: #DE513A;
  text-decoration: underline;
}
.esen-shell summary::-webkit-details-marker {
  display: none;
}
@keyframes escFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes escPop {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .esen-shell *,
  .esen-shell *::before,
  .esen-shell *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

.esen-desktop-nav,
.esen-desktop-actions {
  display: flex !important;
}
.esen-mobile-actions {
  display: none !important;
}
.esen-only-narrow {
  display: none;
}
.esen-only-wide {
  display: block;
}

/* Responsive grids matching prototype state vars */
.esen-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  min-width: 0;
}
.esen-hero-visual {
  position: relative;
  min-width: 0;
  width: 100%;
}
.esen-float {
  /* Absolute overlays in heroes; repositioned on small screens */
}
.esen-act-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
.esen-act-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.esen-act-media {
  aspect-ratio: 16 / 10;
  width: 100%;
  overflow: hidden;
  flex: 0 0 auto;
}
.esen-act-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.esen-act-chip {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: Raleway, sans-serif;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  white-space: normal;
  border-radius: 999px;
  padding: 6px 12px;
  max-width: 100%;
  line-height: 1.2;
}
.esen-card-actions {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.esen-shell a.esen-card-cta,
.esen-card-cta {
  font-family: Raleway, sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  color: #fff !important;
  background: #EB5D1E;
  border-radius: 999px;
  padding: 13px 16px;
  text-decoration: none !important;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
}
.esen-shell a.esen-card-cta:hover,
.esen-card-cta:hover {
  background: #DE513A;
  text-decoration: none !important;
  color: #fff !important;
}
.esen-card-actions .esen-open-modal {
  align-self: center;
}

/* Tap targets ≥44px (mobile friendliness) */
.esen-shell .esen-open-modal,
.esen-shell button.esen-open-modal {
  min-height: 44px;
  box-sizing: border-box;
}
.esen-burger {
  min-width: 44px;
  min-height: 44px;
}
.esen-mobile-menu a {
  min-height: 44px;
  display: flex;
  align-items: center;
}
.esen-hero-ctas > button,
.esen-hero-ctas > a,
.esen-shell main .esen-open-modal {
  min-height: 44px;
}
.esen-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 60px);
  min-width: 0;
}
.esen-three-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  min-width: 0;
}
.esen-four-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  min-width: 0;
}
/* Prevents auto-fit minmax(Npx) from forcing horizontal scroll on phones */
.esen-auto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)) !important;
  min-width: 0;
}
.esen-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)) !important;
  min-width: 0;
}
.esen-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)) !important;
  min-width: 0;
}

@media (max-width: 1279px) {
  .esen-act-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 939px) {
  .esen-desktop-nav,
  .esen-desktop-actions {
    display: none !important;
  }
  .esen-mobile-actions {
    display: flex !important;
  }
  .esen-hero-grid,
  .esen-two-cols,
  .esen-three-cols {
    grid-template-columns: 1fr !important;
  }
  .esen-act-grid,
  .esen-four-cols {
    grid-template-columns: 1fr !important;
  }
  .esen-only-narrow {
    display: block;
  }
  .esen-only-wide {
    display: none;
  }

  /* Keep floating hero cards inside the viewport */
  .esen-hero-visual {
    margin-bottom: 28px;
  }
  .esen-hero-visual .esen-float {
    left: auto !important;
    right: 12px !important;
    bottom: -18px !important;
    top: auto !important;
    max-width: min(72%, 220px) !important;
    width: auto !important;
  }
  .esen-hero-visual .esen-float--badge {
    left: auto !important;
    right: 10px !important;
    top: 10px !important;
    bottom: auto !important;
    max-width: none !important;
  }
  .esen-hero-visual .esen-float--inset {
    left: 12px !important;
    right: auto !important;
    bottom: -18px !important;
    top: auto !important;
  }

  /* Soften section padding on tablets/phones */
  .esen-shell main > section,
  .esen-shell main > nav {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .esen-shell header > div {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

@media (max-width: 619px) {
  .esen-shell {
    font-size: 16px;
  }
  .esen-act-grid {
    gap: 18px;
  }
  .esen-auto-grid {
    grid-template-columns: 1fr !important;
  }
  .esen-hero-visual .esen-float {
    position: static !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-top: 12px;
    box-shadow: 0 8px 20px rgba(78, 64, 57, .12) !important;
  }
  .esen-hero-visual .esen-float--badge {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    bottom: auto !important;
    width: auto !important;
    max-width: calc(100% - 24px) !important;
    margin-top: 0;
  }
  .esen-hero-visual {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
  }
  /* Hero CTA pair stacks full-width on phones */
  .esen-hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }
  .esen-hero-ctas > button,
  .esen-hero-ctas > a {
    width: 100%;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
  }
  .esen-hero-grid > div:first-child > button.esen-open-modal {
    width: 100%;
    box-sizing: border-box;
  }
  .esen-modal-root {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  #esen-modal-dialog {
    margin: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    max-width: 100% !important;
  }
  .esen-only-narrow > div {
    padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
  }
}

.esen-modal-root[hidden] {
  display: none !important;
}
.esen-modal-root:not([hidden]) {
  display: flex !important;
}
body.esen-modal-open {
  overflow: hidden;
}
