/*
Theme Name: ESI Theme
Theme URI: https://teamesi.com
Author: Tag Strategies
Description: Custom theme for Event Strategies, Inc. — replaces Elementor.
Version: 1.0.0
Text Domain: esi
*/

/* ═══════════════════════════════════════════════════
   DESIGN TOKENS (from Elementor Kit ID 6)
   ═══════════════════════════════════════════════════ */
:root {
  /* Colors */
  --esi-gold: #D4AF37;
  --esi-black: #020212;
  --esi-white: #FFFFFF;
  --esi-text: #FFFFFFCC;
  --esi-text-muted: #FFFFFF80;
  --esi-placeholder: #FFFFFF33;
  --esi-toggle-bg: #2A293B;
  --esi-toggle-border: #454454;
  --esi-toggle-darker: #21202F;
  --esi-toggle-darkest: #191823;
  --esi-blue: #375CD4;
  --esi-red: #D4375C;
  --esi-green: #37D4AF;
  --esi-transparent: transparent;
  --esi-border-subtle: rgba(255, 255, 255, 0.05);

  /* Typography — Adobe TypeKit vcu0jsf */
  --font-body: 'degular', sans-serif;
  --font-heading: 'century-old-style-std', serif;

  /* Spacing — matches Elementor container padding */
  --section-pad-y: clamp(3rem, 6vw, 5rem);
  --section-pad-x: 5%;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;

  /* Responsive type scale (clamp from Elementor) */
  --h1: clamp(2.8rem, 2.341vw + 2.332rem, 4rem);
  --h2: clamp(2.4rem, 1.561vw + 2.088rem, 3.2rem);
  --h3: clamp(2rem, 1.561vw + 1.688rem, 2.8rem);
  --h4: clamp(1.6rem, 1.561vw + 1.288rem, 2.4rem);
  --h5: clamp(1.4rem, 1.171vw + 1.166rem, 2rem);
  --h6: clamp(1.2rem, 0.78vw + 1.044rem, 1.6rem);

  /* Breakpoints */
  --bp-mobile: 767px;
  --bp-tablet: 1024px;
}

/* ═══════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root { overscroll-behavior: none; }
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--esi-text);
  background-color: var(--esi-black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  padding-bottom: 50px;
}

a { color: var(--esi-white); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--esi-gold); }

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; color: var(--esi-white); line-height: 1.4; }
h3 { line-height: 1.25; }
h5, h6 { font-family: var(--font-body); font-weight: 600; color: var(--esi-white); line-height: 1.4; }
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
h4 { font-size: var(--h4); }
h5 { font-size: var(--h5); }
h6 { font-size: var(--h6); }

p { margin-bottom: 1em; }
strong, b { font-weight: 700; }

::placeholder { text-transform: uppercase; }
::selection { background: var(--esi-gold); color: var(--esi-black); }

.post, .page { margin: 0 !important; }
*:focus { outline: none; }
*:focus-visible { outline: 2px solid var(--esi-gold); outline-offset: 2px; }

/* ═══════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--section-pad-x);
}
.section {
  padding: var(--section-pad-y) 20px;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 767px) {
  .section { padding: var(--section-pad-y) 20px; }
}

/* ═══════════════════════════════════════════════════
   PRELOADER (GIF)
   ═══════════════════════════════════════════════════ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader img {
  max-width: 400px;
  max-height: 400px;
}

/* ═══════════════════════════════════════════════════
   HEADER / NAV (replaces template 249)
   ═══════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 16px;
  right: max(20px, calc(50vw - 570px));
  left: auto;
  z-index: 1000;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.75rem;
  background: var(--esi-black);
  border-radius: 30px;
  box-shadow: 0 0 10px 5px rgba(1, 0, 18, 0.5);
}
.site-header__logo {
  display: none;
}
.site-header__nav {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}
.site-header__nav a {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--esi-text);
  transition: color 0.3s ease;
  opacity: 0;
  transform: translateY(-8px);
  animation: navLinkIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(0.2s + var(--i, 0) * 60ms);
}
.site-header__nav a:hover,
.site-header__nav a.active {
  color: var(--esi-white);
}

/* Mobile burger — shared by hero__nav and site-header__nav */
.nav__burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 22px;
  position: relative;
  z-index: 1002;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.nav__burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--esi-white);
  position: absolute;
  left: 0;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              opacity 0.25s ease,
              top 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              bottom 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.nav__burger span:nth-child(1) { top: 0; }
.nav__burger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav__burger span:nth-child(3) { bottom: 0; }
/* Burger → X animation */
.is-open .nav__burger span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.is-open .nav__burger span:nth-child(2) { opacity: 0; transform: translateY(-50%) scale(0); }
.is-open .nav__burger span:nth-child(3) { bottom: auto; top: 50%; transform: translateY(-50%) rotate(-45deg); }

@media (max-width: 1024px) {
  .site-header { gap: 1.25rem; padding: 1rem; }
}
@media (max-width: 767px) {
  .site-header {
    top: 0;
    left: 0;
    right: 0;
    border-radius: 0 0 1.5rem 1.5rem;
    padding: 0.75rem 1.25rem;
    justify-content: center;
    box-shadow: none;
  }
  .site-header.is-open { background: transparent; border-radius: 0; }
  .site-header__nav { width: 100%; justify-content: space-between; }
  .site-header {
    border-bottom: 1px solid #2A293B;
  }
  .site-header__nav > a:not(.nav__logo) { display: none; }
  .site-header__nav .nav__logo { display: flex; align-items: center; }
  .nav__burger { display: block; }
}

/* ═══════════════════════════════════════════════════
   PAGE HERO — Shared base for all hero sections
   ═══════════════════════════════════════════════════ */
.page-hero { display: grid; grid-template-columns: 1fr 1fr; }
.page-hero__image { position: relative; overflow: hidden; border-radius: 0 0 5rem 0; border-bottom: 1px solid #2A293B; }
.page-hero__image img,
.page-hero__image video { width: 100%; height: 100%; object-fit: cover; }
.page-hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 20px 4rem 3rem;
  gap: 1.5rem;
  max-width: 570px;
}
.page-hero__title {
  font-family: var(--font-heading);
  font-size: var(--h1);
  color: var(--esi-white);
  line-height: 1;
}
.page-hero__title .gold { color: var(--esi-gold); }
.page-hero__title .typed-word { color: var(--esi-gold); display: inline-block; min-width: 150px; }
.page-hero__desc {
  font-size: 1.2rem;
  color: var(--esi-text);
  line-height: 1.4;
  max-width: 480px;
}
.hero__logo { width: 8rem; }
.page-hero__image .hero__logo-mobile { display: none; }

@media (max-width: 1024px) {
  .page-hero__content { padding: 5rem 20px 3rem 2rem; }
  .page-hero__title { font-size: 3rem; }
}
@media (max-width: 767px) {
  .page-hero { grid-template-columns: 1fr; }
  .page-hero__content { order: 1; padding: 5rem 20px 3rem; max-width: none; }
  .page-hero__image { order: 2; height: 30vh; max-height: 350px; border-radius: 0; }
  .page-hero__image img,
  .page-hero__image video { object-position: top center; }
  .page-hero__title { font-size: 2.4rem; }
  .page-hero__image .hero__logo-mobile {
    display: block; position: absolute; bottom: 1.5rem;
    left: 50%; transform: translateX(-50%); max-width: 80px; z-index: 2;
  }
  .page-hero__content .hero__logo { display: none; }
}

/* ═══════════════════════════════════════════════════
   FRONT-PAGE HERO — Overrides
   ═══════════════════════════════════════════════════ */
.hero__title { font-size: 3.8rem; }
.hero__subtitle { max-width: 420px; }
.hero__nav {
  position: fixed;
  top: 16px;
  right: max(20px, calc(50vw - 570px));
  display: flex;
  gap: 1.75rem;
  align-items: center;
  padding: 1rem 1.5rem;
  z-index: 1000;
  background: var(--esi-black);
  border-radius: 30px;
  box-shadow: 0 0 10px 5px rgba(1, 0, 18, 0.5);
}
/* Nav logo — hidden on desktop, shown on mobile */
.nav__logo { display: none; }
.nav__logo img { width: 50px; height: 50px; }

.hero__nav a {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--esi-text);
  transition: color 0.3s ease;
  opacity: 0;
  transform: translateY(-8px);
  animation: navLinkIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(1.4s + var(--i, 0) * 60ms);
}
@keyframes navLinkIn {
  to { opacity: 1; transform: translateY(0); }
}
.hero__nav a:hover {
  color: var(--esi-white);
}
@media (max-width: 1024px) {
  .hero__nav { gap: 1.25rem; padding: 1rem; }
}
@media (max-width: 767px) {
  .hero__nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    border-radius: 0 0 1.5rem 1.5rem;
    padding: 0.75rem 1.25rem;
    gap: 1rem;
    justify-content: space-between;
    box-shadow: none;
  }
  .hero__nav {
    border-bottom: 1px solid #2A293B;
  }
  .hero__nav > a:not(.nav__logo) { display: none; }
  .hero__nav .nav__logo { display: flex; align-items: center; }
  .nav__logo:hover { opacity: 0.8; }
}

/* ═══════════════════════════════════════════════════
   ABOUT SECTION (text + image split)
   ═══════════════════════════════════════════════════ */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 500px;
  padding: var(--section-pad-y) 0;
}
.about-section__text {
  padding: var(--section-pad-y) 20px;
  padding-right: 2rem;
  max-width: 570px;
  margin-left: auto;
}
.about-section__text h3 {
  margin-bottom: 1.5rem;
}
.about-section__divider {
  border: none;
  height: 2px;
  width: 60px;
  background: var(--esi-gold);
  margin: 0 0 1.5rem;
  transform-origin: left center;
  scale: 0 1;
  opacity: 0;
  transition: scale 700ms cubic-bezier(0.16, 1, 0.3, 1), opacity 400ms ease;
}
[data-reveal="text"].is-visible > .about-section__divider {
  scale: 1 1;
  opacity: 1;
  transform: none;
}
.about-section__text p {
  color: var(--esi-text);
  line-height: 1.4;
  font-size: 1.2rem;
}
.about-section__image {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 400px;
  border-radius: 5rem 0 0 5rem;
  border-bottom: 1px solid #2A293B;
}
.about-section__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
@media (max-width: 1024px) {
  .about-section__text { padding-right: 1.5rem; }
}
@media (max-width: 767px) {
  .about-section { grid-template-columns: 1fr; min-height: auto; }
  .about-section__text { order: 1; }
  .about-section__image { order: 2; height: 265px; max-height: 350px; min-height: auto; border-radius: 0; }
}

/* ═══════════════════════════════════════════════════
   SERVICES GRID (replaces icon-box widgets)
   ═══════════════════════════════════════════════════ */
.services-section {
  text-align: center;
}
.services-section h2 {
  margin-bottom: var(--space-2xl);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.service-card {
  text-align: center;
  padding: 1rem 0.5rem;
}
.service-card__icon {
  width: 6rem;
  height: 6rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.service-card h6 {
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 1rem;
  color: var(--esi-white);
}
.service-card p {
  font-size: 1rem;
  color: var(--esi-text);
  line-height: 1.4;
}

/* Service toggles (bottom 6 — event types) */
.services-grid--toggles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}
.service-toggle {
  background: var(--esi-toggle-bg);
  border: 1px solid var(--esi-toggle-border);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  transition: all 0.3s ease;
}
.service-toggle:hover {
  border-color: var(--esi-gold);
  transform: translateY(-4px);
}
.service-toggle__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-toggle__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.service-toggle h6 {
  font-weight: 600;
  margin-bottom: var(--space-xs);
}
.service-toggle p {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 1024px) {
  .services-grid, .services-grid--toggles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .services-grid, .services-grid--toggles { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════
   PORTFOLIO (carousel + logo grid)
   ═══════════════════════════════════════════════════ */
.portfolio-section {
  text-align: center;
  padding-bottom: 2rem;
  padding-left: 0;
  padding-right: 0;
  max-width: 100%;
}
.portfolio-section h2 {
  margin-bottom: var(--space-2xl);
  padding-left: 20px;
  padding-right: 20px;
}

/* Portfolio carousels (2 rows, opposite directions, full width) */
.portfolio-carousel {
  overflow: hidden;
}
.portfolio-carousel-1 {
  margin-bottom: 16px;
}
.portfolio-carousel-2 {
  margin-bottom: var(--space-sm);
}
.portfolio-carousel .swiper-wrapper {
  transition-timing-function: linear !important;
}
.portfolio-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  background: var(--esi-toggle-darker);
}
.portfolio-card > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: filter 0.25s ease-in-out;
}
.portfolio-card:hover > img {
  filter: blur(5px);
}
.portfolio-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 2, 18, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 5%;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}
.portfolio-card:hover .portfolio-card__overlay {
  opacity: 1;
}
.portfolio-card__logo {
  max-width: 200px;
  max-height: 60px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.portfolio-card__name {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--esi-white);
  text-align: center;
}
@media (max-width: 1024px) {
  .portfolio-card { min-height: 200px; }
}
@media (max-width: 767px) {
  .portfolio-card { min-height: 175px; }
  .portfolio-card__logo { max-width: 150px; }
}

/* Client logo carousels (Swiper) */
.client-carousel {
  overflow: hidden;
  margin-bottom: 3rem;
}
.client-carousel:first-of-type {
  margin-top: 3rem;
}
.client-carousel:last-of-type {
  margin-bottom: 0;
}
.client-carousel .swiper-wrapper {
  transition-timing-function: linear !important;
}
.client-carousel .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}
.client-carousel .swiper-slide img {
  max-height: 55px;
  max-width: 180px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}
.client-carousel .swiper-slide img:hover {
  opacity: 1;
}
.client-carousel-2 { display: none; }
@media (max-width: 767px) {
  .client-carousel .swiper-slide img {
    max-height: 35px;
    max-width: 120px;
  }
  .client-carousel { margin-bottom: 1.5rem; }
  .client-carousel:first-of-type { margin-top: 1.5rem; }
}
@media (min-width: 768px) {
  .client-carousel-2 { display: block; }
}

/* ═══════════════════════════════════════════════════
   CONTACT SECTION
   ═══════════════════════════════════════════════════ */
.contact-section {
  text-align: center;
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.contact-section h4 {
  margin-bottom: var(--space-xl);
  font-style: italic;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Gravity Forms overrides */
.gform_wrapper {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper textarea,
.gform_wrapper select {
  background: var(--esi-toggle-bg) !important;
  border: 1px solid var(--esi-toggle-border) !important;
  color: var(--esi-white) !important;
  font-family: var(--font-body) !important;
  font-size: 0.9rem !important;
  padding: 0.8rem 1rem !important;
  border-radius: 6px !important;
  width: 100% !important;
}
.gform_wrapper input:focus,
.gform_wrapper textarea:focus {
  border-color: var(--esi-gold) !important;
  outline: none !important;
}
.gform_wrapper input::placeholder,
.gform_wrapper textarea::placeholder {
  color: var(--esi-placeholder) !important;
  font-family: var(--font-body) !important;
}
.gform_wrapper .gfield_label {
  display: none !important;
}
.gform_wrapper .gfield_checkbox,
.gform_wrapper .gfield_radio {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.75rem 1rem !important;
}
.gform_wrapper .gchoice {
  display: flex !important;
  align-items: center !important;
}
.gform_wrapper .gfield_checkbox label,
.gform_wrapper .gfield_radio label {
  color: var(--esi-text) !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
}
/* Custom checkboxes */
.gform_wrapper .gfield_checkbox input[type="checkbox"],
.gform_wrapper .gfield_radio input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--esi-toggle-border);
  border-radius: 4px;
  background: var(--esi-toggle-bg);
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  margin-right: 0.4rem;
  transition: all 0.2s ease;
}
.gform_wrapper .gfield_radio input[type="radio"] {
  border-radius: 50%;
}
.gform_wrapper .gfield_checkbox input[type="checkbox"]:checked,
.gform_wrapper .gfield_radio input[type="radio"]:checked {
  background: var(--esi-gold);
  border-color: var(--esi-gold);
}
.gform_wrapper .gfield_checkbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid var(--esi-black);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.gform_wrapper .gfield_radio input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--esi-black);
}
.gform_wrapper .gfield_checkbox input[type="checkbox"]:hover,
.gform_wrapper .gfield_radio input[type="radio"]:hover {
  border-color: var(--esi-gold);
}
.gform_wrapper .ginput_container_phone input {
  letter-spacing: 0.5px;
}
.gform_wrapper .gform_footer input[type="submit"],
.gform_wrapper .gform_button {
  background: transparent !important;
  border: 2px solid var(--esi-gold) !important;
  color: var(--esi-gold) !important;
  font-family: var(--font-body) !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  padding: 0.75rem 2.5rem !important;
  border-radius: 50px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  text-transform: capitalize !important;
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
}
.gform_wrapper .gform_footer input[type="submit"]:hover,
.gform_wrapper .gform_button:hover {
  background: var(--esi-gold) !important;
  color: var(--esi-black) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3) !important;
}
.gform_validation_errors { border: none !important; box-shadow: none !important; }
.ginput_container_phone .validation_message { display: none; }

/* ═══════════════════════════════════════════════════
   FOOTER (replaces template 88)
   ═══════════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--esi-border-subtle);
  padding: var(--space-2xl) 20px var(--space-lg);
}
.site-footer__main {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
  max-width: 1140px;
  margin: 0 auto;
}
.site-footer__brand {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}
.site-footer__logo {
  width: 50px;
  flex-shrink: 0;
}
.site-footer__address {
  font-size: 0.85rem;
  color: var(--esi-text);
  line-height: 1.6;
}
.site-footer__nav a {
  display: block;
  font-size: 0.85rem;
  color: var(--esi-text);
  padding: 0.3rem 0;
}
.site-footer__nav a:hover { color: var(--esi-gold); }
.site-footer__contact a {
  display: block;
  font-size: 0.85rem;
  color: var(--esi-text);
  padding: 0.3rem 0;
}
.site-footer__social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}
.site-footer__social a {
  color: var(--esi-text);
  font-size: 1.2rem;
}
.site-footer__scroll-top {
  width: 40px;
  height: 40px;
  border: 1px solid var(--esi-toggle-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--esi-gold);
  transition: all 0.3s ease;
  justify-self: end;
}
.site-footer__scroll-top:hover {
  border-color: var(--esi-gold);
}
.site-footer__copyright {
  max-width: 1140px;
  margin: var(--space-xl) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--esi-border-subtle);
  font-size: 0.8rem;
  color: var(--esi-text-muted);
}

/* Footer children stagger */
.site-footer .site-footer__brand,
.site-footer .site-footer__nav a,
.site-footer .site-footer__contact a,
.site-footer .site-footer__social,
.site-footer .site-footer__scroll-top,
.site-footer .site-footer__copyright {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms var(--ease-reveal), transform 500ms var(--ease-reveal);
}
.site-footer.is-visible .site-footer__brand { opacity: 1; transform: translateY(0); transition-delay: 100ms; }
.site-footer.is-visible .site-footer__nav a { opacity: 1; transform: translateY(0); }
.site-footer.is-visible .site-footer__nav a:nth-child(1) { transition-delay: 180ms; }
.site-footer.is-visible .site-footer__nav a:nth-child(2) { transition-delay: 240ms; }
.site-footer.is-visible .site-footer__nav a:nth-child(3) { transition-delay: 300ms; }
.site-footer.is-visible .site-footer__nav a:nth-child(4) { transition-delay: 360ms; }
.site-footer.is-visible .site-footer__nav a:nth-child(5) { transition-delay: 420ms; }
.site-footer.is-visible .site-footer__contact a { opacity: 1; transform: translateY(0); }
.site-footer.is-visible .site-footer__contact a:nth-child(1) { transition-delay: 480ms; }
.site-footer.is-visible .site-footer__contact a:nth-child(2) { transition-delay: 540ms; }
.site-footer.is-visible .site-footer__social { opacity: 1; transform: translateY(0); transition-delay: 600ms; }
.site-footer.is-visible .site-footer__scroll-top { opacity: 1; transform: translateY(0); transition-delay: 660ms; }
.site-footer.is-visible .site-footer__copyright { opacity: 1; transform: translateY(0); transition-delay: 720ms; }

@media (max-width: 767px) {
  .site-footer__main {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }
  .site-footer__brand {
    flex-direction: column;
    align-items: center;
  }
  .site-footer__social { justify-content: center; }
  .site-footer__scroll-top { justify-self: center; }
  .site-footer__copyright { text-align: center; }
}

/* ═══════════════════════════════════════════════════
   STICKY FOOTER BAR (replaces templates 225/284)
   ═══════════════════════════════════════════════════ */
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--esi-black);
  border-top: 1px solid var(--esi-toggle-border);
  padding: 0.75rem 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.sticky-bar.is-visible {
  transform: translateY(0);
}
.sticky-bar__logo {
  height: 30px;
  display: none;
}
.sticky-bar a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--esi-text);
  font-size: 0.8rem;
}
.sticky-bar a:hover { color: var(--esi-gold); }
.sticky-bar svg { width: 16px; height: 16px; fill: var(--esi-gold); }
.sticky-bar__short { display: none; }

/* Desktop: show logo + full text */
@media (min-width: 1025px) {
  .sticky-bar__logo { display: block; }
}
/* Mobile: show Visit/Call/Email labels instead of full text */
@media (max-width: 767px) {
  .sticky-bar { justify-content: space-around; gap: 0; }
  .sticky-bar__full { display: none; }
  .sticky-bar__short { display: inline; }
  .sticky-bar a { flex-direction: column; font-size: 0.7rem; gap: 0.25rem; }
  .sticky-bar svg { width: 20px; height: 20px; }
}

/* ═══════════════════════════════════════════════════
   BLOG ARCHIVE (page 366 — Insights)
   ═══════════════════════════════════════════════════ */
/* Uses .page-hero base — no overrides needed */

/* Blog loop item */
.blog-list {
  max-width: 1140px;
  margin: 0 auto;
  padding: var(--space-2xl) 20px;
  text-align: center;
}
.blog-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-lg);
  border: 1px solid var(--esi-toggle-border);
  border-radius: 8px;
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  transition: border-color 0.3s ease;
  text-align: left;
}
.blog-card:hover { border-color: var(--esi-gold); }
.blog-card__image {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.blog-card__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--esi-white);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.blog-card__date {
  font-size: 0.8rem;
  color: var(--esi-gold);
}

@media (max-width: 767px) {
  .blog-card { grid-template-columns: 120px 1fr; gap: var(--space-sm); }
}

.load-more {
  display: inline-block;
  margin: var(--space-xl) auto 0;
  background: transparent;
  color: var(--esi-gold);
  border: 2px solid var(--esi-gold);
  padding: 0.75rem 2.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}
.load-more:hover {
  background: var(--esi-gold);
  color: var(--esi-black);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

/* ═══════════════════════════════════════════════════
   BLOG SINGLE (replaces template 362)
   ═══════════════════════════════════════════════════ */
/* Uses .page-hero base — title size override only */
.post-single-hero .page-hero__title { font-size: var(--h3); line-height: 1.3; }

.post-content {
  max-width: 1140px;
  margin: 0 auto;
  padding: var(--space-2xl) 20px;
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--esi-text);
}
.post-content h2,
.post-content h3,
.post-content h4 {
  margin-top: 2em;
  margin-bottom: 0.75em;
}
.post-content p {
  line-height: 1.4;
  margin-bottom: 1.25em;
}
.post-content ul,
.post-content ol {
  margin: 1em 0;
  padding-left: 1.5em;
}
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li {
  margin-bottom: 0.5em;
  line-height: 1.6;
  color: var(--esi-text);
}
.post-content img {
  border-radius: 8px;
  margin: 2em 0;
}
.post-content a {
  color: var(--esi-gold);
  text-decoration: underline;
}
.post-content blockquote {
  border-left: 3px solid var(--esi-gold);
  padding: 1em 1.5em;
  margin: 2em 0;
  color: var(--esi-text);
  font-style: italic;
}

/* ═══════════════════════════════════════════════════
   JOIN THE TEAM (page 342)
   ═══════════════════════════════════════════════════ */
/* Uses .page-hero base — gap + mobile height overrides */
.join-hero .page-hero__content { gap: 1rem; }
@media (max-width: 767px) {
  .join-hero .page-hero__image { height: 23vh; }
}

/* Job listings */
.jobs-section {
  text-align: center;
  padding: var(--space-2xl) 20px;
}
.jobs-section h2 { margin-bottom: var(--space-xl); }
.jobs-list {
  max-width: 1140px;
  margin: 0 auto;
}
.job-card {
  display: block;
  border: 1px solid var(--esi-toggle-border);
  border-radius: 12px;
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-sm);
  transition: all 0.3s ease;
  text-align: left;
}
.job-card:hover {
  border-color: var(--esi-gold);
}
.job-card__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--esi-white);
  font-weight: 500;
}
.job-card__location {
  display: block;
  font-size: 0.85rem;
  color: var(--esi-text-muted);
  margin-top: 0.25rem;
}
.job-card__desc {
  font-size: 0.9rem;
  color: var(--esi-text);
  margin-top: 0.5rem;
  line-height: 1.5;
}
.job-card__link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--esi-gold);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s ease;
}
.job-card__link:hover { opacity: 0.8; }
.jobs-none {
  color: var(--esi-text-muted);
  font-style: italic;
  padding: var(--space-xl) 0;
}

/* ═══════════════════════════════════════════════════
   UTILITY
   ═══════════════════════════════════════════════════ */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.gold { color: var(--esi-gold); }
.text-center { text-align: center; }

/* ═══════════════════════════════════════════════════
   ABOUT ESI — blog post footer CTA
   ═══════════════════════════════════════════════════ */
.about-esi {
  background: var(--esi-toggle-darker);
  padding: var(--space-xl) var(--section-pad-x);
  margin-top: var(--space-2xl);
  border-radius: 12px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.about-esi h3 { margin-bottom: var(--space-sm); }
.about-esi p { color: var(--esi-text); }
.about-esi a { color: var(--esi-gold); text-decoration: underline; }

/* ═══════════════════════════════════════════════════
   MOBILE NAV DRAWER
   ═══════════════════════════════════════════════════ */
@media (max-width: 767px) {
  /* ── Full-screen drawer open state ── */
  .hero__nav.is-open,
  .site-header__nav.is-open {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 2rem;
    background: var(--esi-black);
    backdrop-filter: none;
    border-radius: 0;
    z-index: 1000;
  }

  /* Show links in drawer */
  .hero__nav.is-open > a:not(.nav__logo),
  .site-header__nav.is-open > a:not(.nav__logo) {
    display: block;
    font-size: 2rem;
    font-family: var(--font-heading);
    color: var(--esi-white);
    padding: 0.75rem 0;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: drawerLinkIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .hero__nav.is-open > a:not(.nav__logo):hover,
  .site-header__nav.is-open > a:not(.nav__logo):hover { color: var(--esi-gold); }
  .hero__nav.is-open > a.active,
  .site-header__nav.is-open > a.active { color: var(--esi-gold); }

  /* Stagger link entrances */
  .hero__nav.is-open > a:nth-child(2),
  .site-header__nav.is-open > a:nth-child(2) { animation-delay: 0.05s; }
  .hero__nav.is-open > a:nth-child(3),
  .site-header__nav.is-open > a:nth-child(3) { animation-delay: 0.1s; }
  .hero__nav.is-open > a:nth-child(4),
  .site-header__nav.is-open > a:nth-child(4) { animation-delay: 0.15s; }
  .hero__nav.is-open > a:nth-child(5),
  .site-header__nav.is-open > a:nth-child(5) { animation-delay: 0.2s; }
  .hero__nav.is-open > a:nth-child(6),
  .site-header__nav.is-open > a:nth-child(6) { animation-delay: 0.25s; }
  .hero__nav.is-open > a:nth-child(7),
  .site-header__nav.is-open > a:nth-child(7) { animation-delay: 0.3s; }

  /* Logo at top center of drawer */
  .hero__nav.is-open .nav__logo,
  .site-header__nav.is-open .nav__logo {
    position: absolute;
    top: 2rem;
    left: calc(50vw - 1rem);
    transform: translateX(-50%);
  }
  .hero__nav.is-open .nav__logo img,
  .site-header__nav.is-open .nav__logo img {
    width: 50px;
    height: 50px;
  }

  /* X button at top right of drawer */
  .hero__nav.is-open .nav__burger,
  .site-header__nav.is-open .nav__burger {
    position: absolute;
    top: 1.75rem;
    right: 1.5rem;
  }
}
@keyframes drawerLinkIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════
   MOTION SYSTEM — "Precision Reveal"
   ═══════════════════════════════════════════════════ */

/* ESI Ease tokens */
:root {
  --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);   /* ease-out-expo — enter */
  --ease-exit:   cubic-bezier(0.5, 0, 0.75, 0);    /* accelerating  — exit  */
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  .reveal-child,
  .hero__nav a,
  .site-header__nav a,
  .site-footer .site-footer__brand,
  .site-footer .site-footer__nav a,
  .site-footer .site-footer__contact a,
  .site-footer .site-footer__social,
  .site-footer .site-footer__scroll-top,
  .site-footer .site-footer__copyright,
  [data-reveal] > p,
  [data-reveal] > img,
  [data-reveal] > figure,
  [data-reveal] > h2,
  [data-reveal] > h3,
  [data-reveal] > h4,
  [data-reveal] > h5,
  [data-reveal] > ul,
  [data-reveal] > ol,
  [data-reveal] > blockquote,
  [data-reveal] > .wp-block-image,
  [data-reveal] > .wp-block-embed { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
}

/* ── 1. Section / Container Reveal ────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 800ms var(--ease-reveal), transform 800ms var(--ease-reveal);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── 1b. Content Children Stagger (p, img, h*, etc.) ── */
[data-reveal] > p,
[data-reveal] > img,
[data-reveal] > figure,
[data-reveal] > h2,
[data-reveal] > h3,
[data-reveal] > h4,
[data-reveal] > h5,
[data-reveal] > ul,
[data-reveal] > ol,
[data-reveal] > blockquote,
[data-reveal] > .wp-block-image,
[data-reveal] > .wp-block-embed {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms var(--ease-reveal), transform 500ms var(--ease-reveal);
}
[data-reveal].is-visible > p,
[data-reveal].is-visible > img,
[data-reveal].is-visible > figure,
[data-reveal].is-visible > h2,
[data-reveal].is-visible > h3,
[data-reveal].is-visible > h4,
[data-reveal].is-visible > h5,
[data-reveal].is-visible > ul,
[data-reveal].is-visible > ol,
[data-reveal].is-visible > blockquote,
[data-reveal].is-visible > .wp-block-image,
[data-reveal].is-visible > .wp-block-embed {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(100ms + var(--i, 0) * 80ms);
}

/* ── 2. Staggered Grid Children ───────────────── */
[data-reveal="stagger"] > .service-card,
[data-reveal="stagger"] > .blog-card,
[data-reveal="stagger"] > .job-card,
[data-reveal="stagger"] > .swiper {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 600ms var(--ease-reveal), transform 600ms var(--ease-reveal);
}
[data-reveal="stagger"].is-visible > .service-card,
[data-reveal="stagger"].is-visible > .blog-card,
[data-reveal="stagger"].is-visible > .job-card,
[data-reveal="stagger"].is-visible > .swiper {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger delays applied via --i custom property set in JS */
[data-reveal="stagger"].is-visible > .service-card,
[data-reveal="stagger"].is-visible > .blog-card,
[data-reveal="stagger"].is-visible > .job-card,
[data-reveal="stagger"].is-visible > .swiper {
  transition-delay: calc(150ms + var(--i, 0) * 75ms);
}

/* ── 3. Internal Content Stacking (Card Internals) ── */
.service-card .service-card__icon {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 600ms var(--ease-reveal), transform 600ms var(--ease-reveal);
}
.service-card h6 {
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 500ms var(--ease-reveal), transform 500ms var(--ease-reveal);
  overflow: hidden;
}
.service-card p {
  opacity: 0;
  transition: opacity 400ms var(--ease-reveal);
}
/* Trigger when parent card becomes visible */
[data-reveal="stagger"].is-visible .service-card .service-card__icon {
  opacity: 1;
  transform: scale(1);
}
[data-reveal="stagger"].is-visible .service-card h6 {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal="stagger"].is-visible .service-card p {
  opacity: 1;
}
/* Internal offsets relative to card entrance */
[data-reveal="stagger"].is-visible .service-card .service-card__icon {
  transition-delay: calc(150ms + var(--i, 0) * 75ms + 0ms);
}
[data-reveal="stagger"].is-visible .service-card h6 {
  transition-delay: calc(150ms + var(--i, 0) * 75ms + 200ms);
}
[data-reveal="stagger"].is-visible .service-card p {
  transition-delay: calc(150ms + var(--i, 0) * 75ms + 300ms);
}

/* ── 4. Image Mask Reveal ─────────────────────── */
[data-reveal="image"] {
  overflow: hidden;
}
[data-reveal="image"] img {
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 800ms var(--ease-reveal), transform 1200ms var(--ease-reveal);
}
[data-reveal="image"].is-visible img {
  opacity: 1;
  transform: scale(1);
}

/* ── 5. Text Reveal (About, Contact headings) ─── */
[data-reveal="text"] > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 600ms var(--ease-reveal), transform 600ms var(--ease-reveal);
}
[data-reveal="text"].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger text children */
[data-reveal="text"].is-visible > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal="text"].is-visible > *:nth-child(2) { transition-delay: 100ms; }
[data-reveal="text"].is-visible > *:nth-child(3) { transition-delay: 200ms; }
[data-reveal="text"].is-visible > *:nth-child(4) { transition-delay: 300ms; }
[data-reveal="text"].is-visible > *:nth-child(5) { transition-delay: 400ms; }
[data-reveal="text"].is-visible > *:nth-child(6) { transition-delay: 500ms; }

/* ── 6. Hero Content Entrance ─────────────────── */
[data-reveal="hero"] {
  opacity: 1;
  transform: none;
  will-change: auto;
}
[data-reveal="hero"] .hero__logo,
[data-reveal="hero"] .page-hero__title,
[data-reveal="hero"] .page-hero__desc,
[data-reveal="hero"] .hero__subtitle {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 700ms var(--ease-reveal), transform 700ms var(--ease-reveal);
}
[data-reveal="hero"].is-visible .hero__logo { opacity: 1; transform: translateY(0); transition-delay: 200ms; }
[data-reveal="hero"].is-visible .page-hero__title { opacity: 1; transform: translateY(0); transition-delay: 400ms; }
[data-reveal="hero"].is-visible .page-hero__desc,
[data-reveal="hero"].is-visible .hero__subtitle { opacity: 1; transform: translateY(0); transition-delay: 600ms; }

/* ── 7. Portfolio Carousel Section Reveal ─────── */
[data-reveal="carousel"] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 800ms var(--ease-reveal), transform 800ms var(--ease-reveal);
}
[data-reveal="carousel"].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── 9. Contact Form — Staggered Field Reveal ─── */
[data-reveal] .gform_wrapper {
  opacity: 0;
  transition: opacity 400ms var(--ease-reveal);
  transition-delay: 200ms;
}
[data-reveal].is-visible .gform_wrapper {
  opacity: 1;
}
[data-reveal] .gform_wrapper .gfield {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms var(--ease-reveal), transform 500ms var(--ease-reveal);
}
[data-reveal].is-visible .gform_wrapper .gfield {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(300ms + var(--i, 0) * 80ms);
}
[data-reveal] .gform_wrapper .gform_footer {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms var(--ease-reveal), transform 500ms var(--ease-reveal);
}
[data-reveal].is-visible .gform_wrapper .gform_footer {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(300ms + var(--gf-total, 6) * 80ms);
}
