@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=block');

/* ========================================= */
/* 1. CORE VARIABLES & SETUP                 */
/* ========================================= */
:root {
  --bg: #fdfbf7;
  --panel: #fdfbf7;
  --text: #141211;
  --muted: rgba(20, 18, 17, 0.5); 
  --accent: #305CDE;
  --hover-blue: #305CDE; /* --- UPDATED: The new Royal Blue for all interactive hovers --- */
}

* { box-sizing: border-box; }

html { 
  min-height: 100%; 
  -webkit-text-size-adjust: 100%; /* Stops iOS Safari from inflating text */
  text-size-adjust: 100%;         /* Standard property for all browsers */
  overflow-y: scroll;             /* --- THE FIX: Forces scrollbar track to stay --- */
  scrollbar-gutter: stable;       /* --- MODERN FIX: Prevents layout shift from scrollbars --- */
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

.hero__title, 
.detail-title, 
.service-hero__title,
.video-hero__title {
  font-family: Georgia, serif;
  font-weight: 400;
}

/* ========================================= */
/* 2. GLOBAL HEADER & LOGO                   */
/* ========================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;         /* <-- THE FIX: Ignores scrollbar math entirely */
  max-width: 100vw;     /* <-- Safety lock */
  z-index: 1000;
  padding: 28px 64px;
  background: #f5f5f5;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  transition: transform 0.5s cubic-bezier(0.33, 1, 0.68, 1);
  /* will-change: transform; <-- REMOVE THIS LINE completely */
}

.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  pointer-events: none; 
  position: relative; /* --- NEW: Anchors the menu --- */
}

.site-header__inner a,
.site-header__inner button {
  pointer-events: auto;
}

.site-logo { display: flex; align-items: center; text-decoration: none; }
.site-logo img, .site-logo svg {
  height: 22px;
  width: 227px; /* Reserves the exact space before the image loads */
  object-fit: contain; /* Keeps the SVG sharp and perfectly proportioned */
  display: block;
  shape-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  transition: filter 0.4s ease, transform 0.3s ease; 
}

/* Nudge logo up by 1px on screens larger than mobile */
@media (min-width: 769px) {
  .site-logo {
    transform: translateY(-1px);
  }
}

body.home .site-header {
  background: transparent;
  box-shadow: none;
  left: 40%;
  width: 60%;
  padding-left: clamp(40px, 10vw, 160px);
  padding-right: clamp(40px, 5vw, 64px);
}

.site-header.site-header--hidden {
  transform: translate3d(0, -110%, 0);
}

/* ========================================= */
/* 3. NAVIGATION (INLINE & DRAWER)           */
/* ========================================= */

/* --- NEW: Lock body scroll when menu is open --- */
body.is-menu-open {
    overflow: hidden !important;
}

/* --- NEW: Force header to stay visible when menu is open (overrides JS) --- */
body.is-menu-open .site-header {
    transform: translate3d(0, 0, 0) !important;
}

.subpage-nav {
  /* --- THE FIX: Removed position: absolute entirely --- */
  display: flex;
  align-items: center;
  gap: 36px; /* Slightly tightened from 40px to keep the group cohesive */
  margin: 0;
}

.subpage-nav a {
  font-family: 'Inter', sans-serif;
  font-weight: 500; 
  /* Bumped font size slightly to compensate for losing the bulk of the caps */
  font-size: 16px; 
  color: #333333; 
  /* THE FIX: Remove the forced caps */
  text-transform: none; 
  /* THE DESIGN TWEAK: Remove the wide letter spacing. 
     Wide tracking looks great on all-caps, but makes normal casing look very weird! */
  letter-spacing: 0.00em; 
  text-decoration: none;
  transition: color 0.3s ease;
  white-space: nowrap;
}
.subpage-nav a:hover { color: var(--hover-blue); } 
.subpage-nav a.active { color: var(--text); } 

.menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: transparent;
  border: 0;
  color: #333333; 
  cursor: pointer;
  transition: color 0.4s ease;
  min-width: 44px;
  min-height: 44px;
  margin-right: -11px;
}
.menu-btn * { pointer-events: none; }
.menu-btn:hover { color: var(--hover-blue); }
.menu-btn__text { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; font-family: system-ui, sans-serif; font-weight: 500; transition: color 0.4s ease, text-shadow 0.4s ease; min-width: 48px; display: inline-block; text-align: left; }
.menu-btn__lines { width: 22px; height: 2px; background: currentColor; position: relative; transition: background 0.4s ease, transform 0.4s ease, top 0.4s ease, box-shadow 0.4s ease; }
.menu-btn__lines::before, .menu-btn__lines::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: background 0.4s ease, transform 0.4s ease, top 0.4s ease, box-shadow 0.4s ease; }
.menu-btn__lines::before { top: -7px; } 
.menu-btn__lines::after { top: 7px; }
.menu-btn:hover .menu-btn__lines { transform: scaleX(1.15); }

body.is-menu-open .menu-btn__lines { background: transparent !important; box-shadow: none !important; }
body.is-menu-open .menu-btn__lines::before { transform: rotate(45deg); top: 0; background: var(--text) !important; box-shadow: none !important; }
body.is-menu-open .menu-btn__lines::after { transform: rotate(-45deg); top: 0; background: var(--text) !important; box-shadow: none !important; }

.nav-backdrop { position: fixed; inset: 0; background: rgba(20, 18, 17, 0.4); opacity: 0; pointer-events: none; z-index: 90; transition: opacity 0.6s ease; }
body.is-menu-open .nav-backdrop { opacity: 1; pointer-events: auto; }

.site-nav-panel { position: fixed; z-index: 100; display: flex; flex-direction: column; }
.nav-panel__inner { width: 100%; max-width: 1200px; display: flex; flex-direction: column; }

body.home .site-nav-panel {
  top: 0; left: 40%; right: 0; bottom: 0; width: auto; max-width: none;
  padding: 100px clamp(40px, 5vw, 64px) 80px clamp(40px, 10vw, 160px);
  transform: translateX(100%);
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  background: var(--bg);
  border-left: none;
}
body.home.is-menu-open .site-nav-panel { transform: translateX(0); }
body.home .nav-panel__inner { align-items: flex-start; text-align: left; margin: 0; padding-left: 0; }

body:not(.home) .site-nav-panel {
  top: 0; left: 0; right: 0; bottom: 0;
  background: #f5f5f5; 
  padding: 134px 64px 40px; 
  transform: translateY(-100%);
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  overflow-y: auto;
  /* --- NEW: Forces the tray past the hero block --- */
  min-height: 420px;
}
body:not(.home).is-menu-open .site-nav-panel { transform: translateY(0); }
body:not(.home) .nav-panel__inner { align-items: flex-start; text-align: left; margin: 0 auto; } 

.nav-group, .nav-group__links { display: flex; flex-direction: column; align-items: flex-start !important; text-align: left !important; width: 100%; }
.nav-group__label { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: #999; margin-bottom: 20px; }
.nav-group__links { gap: 12px; }
.nav-group__links a { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 22px; color: #333; text-decoration: none; transition: color 0.3s ease, transform 0.3s ease; }
.nav-group__links a:hover { color: var(--hover-blue); transform: translateX(6px); }
.nav-group__links a:active { color: var(--hover-blue); transition: color 0.05s ease; }


/* ========================================= */
/* 4. HOMEPAGE SPLIT HERO                    */
/* ========================================= */
.hero { height: 100vh; min-height: 546px; display: grid; grid-template-columns: 0.8fr 1.2fr; width: 100%; overflow: hidden; }
.hero__left { position: relative; z-index: 1; background: var(--text); }
/* --- THE KIRKLAND-STYLE BRAND BLUE OVERLAY --- */
/* --- THE KIRKLAND-STYLE BRAND BLUE OVERLAY --- */
.hero__left::after {
  content: "";
  display: block !important;
  position: absolute;
  top: 50%;
  bottom: 0;
  left: 0;
  width: 100%;
  
  /* Matches their exact gradient logic using your Royal Blue */
  background-image: linear-gradient(180deg, rgba(48, 92, 222, 0), #305CDE);
  
  /* This is the secret sauce that softens the harshness */
  opacity: 0.35; 
  
  z-index: 15;
  pointer-events: none;
  
  /* UPDATED: Set to 1s so it fades IN smoothly alongside the new image */
  transition: opacity 1s ease-out, top 1s ease-out; 
}


/* --- SYNCHRONIZED OVERLAY FADE --- */
/* This MUST be outside the brackets of the previous block to work! */
.is-switching .hero__left::after,
body.is-switching .hero__left::after {
  opacity: 0 !important;
  /* Matches the exact 1-second fade of your images to fade OUT */
  transition: opacity 1s ease-out !important; 
}

/* NEW: Keep the blue overlay completely invisible until the image has downloaded */
body:not(.is-loaded) .hero__left::after {
  opacity: 0 !important;
}

/* Ensure the parent clips the overlay properly */
.hero__left {
  position: relative;
  overflow: hidden;
}
.hero__right { position: relative; z-index: 2; background: var(--bg); display: flex; flex-direction: column; justify-content: center; padding: 54px clamp(40px, 5vw, 64px) 54px clamp(40px, 10vw, 160px); }

.hero__img, .hero__img--incoming, [data-hero-img], [data-hero-img-in] {
  position: absolute; top: -10%; bottom: -10%; height: 120%; left: -5%; width: 115%;
  background-size: cover !important; background-position: left center !important; background-repeat: no-repeat !important;
  backface-visibility: hidden; opacity: 0; transform: translate3d(0%, 0, 0);
}
[data-hero-img-in] { z-index: 2; }
[data-hero-img] { opacity: 1; z-index: 1; transform: translate3d(-4.7%, 0, 0); transition: transform 7s ease-out, opacity 1s ease-out; }
.is-switching [data-hero-img] { opacity: 0; transform: translate3d(4%, 0, 0); transition: transform 1s ease-out, opacity 1s ease-out; }



@media (min-width: 1201px) {
  .hero__img, .hero__img--incoming, [data-hero-img], [data-hero-img-in] { width: 125%; }
  [data-hero-img] { transform: translate3d(-15%, 0, 0); }
}

body:not(.is-loaded) [data-hero-img] {
  transform: translate3d(0%, 0, 0) !important;
}

.hero__copy { max-width: 520px; margin: 0; margin-top: -24px; text-align: left; opacity: 1; transition: opacity 1s ease-out, transform 1s ease-out; }
.is-fading .hero__copy { opacity: 0; transform: translate3d(4%, 0, 0); }
.hero__title { font-size: clamp(32px, 3.5vw, 44px); line-height: 1.12; margin: 0 0 18px 0; color: #333; transition: color 0.3s ease; cursor: pointer; }
.hero__title:hover { color: var(--hover-blue); }
.hero__eyebrow { font-size: 11px; letter-spacing: .14em; color: var(--muted); margin-bottom: 12px; text-transform: uppercase; }

.hero__controls { position: absolute; left: clamp(40px, 10vw, 160px); bottom: 60px; display: flex; align-items: center; gap: 14px; opacity: 1; transition: opacity 0.4s ease; }

/* --- UPDATED ARROW --- */
.hero__arrow { 
  border: 0; 
  background: transparent; 
  color: var(--accent); 
  cursor: pointer; 
  font-size: 32px; 
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  padding: 16px; 
  line-height: 1; 
  /* --- THE NEW NUDGE --- */
  transform: translateY(-3px);
}

.hero__bars { display: flex; gap: 10px; align-items: center; }

/* --- EXISTING BAR STYLES --- */
.hero__bar { width: 92px; height: 6px; background: rgba(0,0,0,0.12); border: 0; padding: 0; cursor: pointer; position: relative; transition: background 0.3s ease; }
.hero__bar::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.7); transform: scaleX(0); transform-origin: left; transition: transform .35s ease, background 0.3s ease; }
.hero__bar[aria-selected="true"]::after { transform: scaleX(1); }

/* --- PREVENT STICKY HOVERS ON TOUCH DEVICES --- */
@media (hover: hover) and (pointer: fine) {
  .hero__arrow:hover { color: var(--hover-blue); }
  .hero__bar:hover { background: var(--hover-blue); }
  .hero__bar[aria-selected="true"]:hover::after { background: var(--hover-blue); }
}

/* --- NEW: INVISIBLE HITBOX FOR BARS --- */
.hero__bar::before {
  content: "";
  position: absolute;
  top: -20px;
  bottom: -20px;
  left: -8px;
  right: -8px;
  z-index: 10;
}

.is-detail-active .hero__copy, .is-detail-active .hero__controls { opacity: 0; pointer-events: none; }
.hero__detail-left { position: absolute; inset: 0; background: rgba(26, 26, 26, 0.85); z-index: 20; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; padding: 64px clamp(40px, 10vw, 140px) 64px clamp(40px, 5vw, 64px); opacity: 0; pointer-events: none; transition: opacity 1.2s ease; text-align: right; }
.is-detail-active .hero__detail-left { opacity: 1; pointer-events: auto; }

.detail-back {
  background: transparent !important; color: transparent !important; font-size: 0 !important; border: none !important; box-shadow: none !important;
  position: absolute !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; z-index: 10005 !important; cursor: pointer !important; display: block !important; opacity: 0; transition: opacity 0.3s ease; pointer-events: none !important;
}
.detail-back svg, .detail-back path { display: none !important; }
.is-detail-active .detail-back { opacity: 1 !important; pointer-events: auto !important; }

.detail-title { font-size: clamp(32px, 3.5vw, 44px); color: #fff; margin: 0; opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 1.2s cubic-bezier(0.4, 0, 0.2, 1); display: inline-flex; align-items: center; z-index: 10000; position: relative; }
.detail-title::before { 
  content: "\2190"; /* --- THE FIX: A proper, sleek left arrow (←) --- */
  font-family: 'Inter', sans-serif; /* --- THE FIX: Forces the clean UI font --- */
  font-size: 0.75em; /* Scales it down so it acts like an icon, not a letter */
  font-weight: 400; 
  color: #fdfbf7;
  opacity: 0.7; /* Softens it slightly so the title remains the star */
  margin-right: 18px; /* Adds elegant breathing room */
  position: relative; 
  top: -4px; /* Keeps it vertically centered with the title */
}
.is-detail-active .detail-title { opacity: 1; transform: translateY(-24px); }

/* --- LEFT HEADER SLIDE-FROM-RIGHT ANIMATION (DESKTOP) --- */
@media (min-width: 769px) {
  /* 1. Base state & Exit animation */
  .hero__detail-left .detail-back {
    opacity: 0;
    transform: translateX(40px) !important;
    transition: opacity 0.4s ease, transform 0.4s ease; 
  }
  .hero__detail-left .detail-title {
    opacity: 0;
    /* Start 40px right, and nudged 30px UP to optically match the paragraph */
    transform: translate(40px, -30px) !important;
    transition: opacity 0.4s ease, transform 0.4s ease; 
  }
  
  /* 2. Active state for the invisible back button */
  .is-detail-active .hero__detail-left .detail-back {
    opacity: 1;
    transform: translateX(0) !important;
    transition: opacity 0.9s ease 0.5s, transform 0.9s cubic-bezier(0.25, 1, 0.5, 1) 0.5s;
  }
  
  /* 3. Active state for the Title */
  .is-detail-active .hero__detail-left .detail-title {
    opacity: 1;
    /* Ends centered horizontally, but maintains the 30px upward nudge */
    transform: translate(0, -30px) !important;
    transition: opacity 0.9s ease 0.6s, transform 0.9s cubic-bezier(0.25, 1, 0.5, 1) 0.6s;
  }
}

.hero__detail-right { position: absolute; inset: 0; background: var(--bg) !important; backdrop-filter: blur(32px); z-index: 20; display: flex; flex-direction: column; justify-content: center; padding: 54px clamp(40px, 5vw, 64px) 54px clamp(40px, 10vw, 160px); transform: translateX(100%); transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1); }
.is-detail-active .hero__detail-right { transform: translateX(0); }
.detail-desc { color: #1a1a1a; font-size: 19px; line-height: 1.6; max-width: 435px; margin: 0 0 30px 0; opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.detail-full-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 700; text-decoration: none; opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease, color 0.3s ease; }
.is-detail-active .detail-desc, .is-detail-active .detail-full-link { opacity: 1; transform: translateY(0); }
.detail-full-link:hover { color: var(--hover-blue); }

/* ========================================= */
/* 5. SERVICE & ABOUT PAGES                  */
/* ========================================= */

body[class*="about"] { padding-top: 0 !important; }
body[class*="about"] .site-main, 
body[class*="about"] .page-content, 
body[class*="about"] .page__inner, 
body[class*="about"] .about-main { padding-top: 0px !important; }

/* --- REDUCE DESKTOP PADDING ON THE ABOUT PAGE ONLY --- */
@media (min-width: 769px) {
  /* 1. Shrink the dark hero section at the top */
  body[class*="about"] .service-hero {
    padding-top: 160px !important; /* Reduced from 320px */
    padding-bottom: 60px !important;
  }

  /* 2. Shrink the gap above the very first text block */
  body[class*="about"] .about-main .service-block:first-child,
  body[class*="about"] .service-main .service-block:first-child {
    padding-top: 80px !important; /* Reduced from 80px */
  }
}

.service-hero { 
  position: relative; 
  padding: 320px 64px 80px 64px; 
  background-color: #1a1a1a; 
  background-size: cover; 
  background-position: center; 
}
.service-hero::before { 
  content: ""; 
  position: absolute; 
  inset: 0; 
  /* Reduced top opacity to 20% (0.2) and bottom opacity to 60% (0.6) */
  background: linear-gradient(to bottom, rgba(20, 18, 17, 0.2) 0%, rgba(20, 18, 17, 0.6) 100%); 
  z-index: 1; 
}
.service-hero__inner { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; }
.service-hero__eyebrow { font-family: system-ui, sans-serif; font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: #f5f5f5; margin-bottom: 20px; display: block; }
.service-hero__title { 
  font-size: clamp(32px, 4.5vw, 54px); /* Scaled down from 40px/64px */
  line-height: 1.1; 
  margin: 0; 
  color: #f5f5f5; 
}

.video-hero { 
  position: relative; 
  height: 70vh; /* <-- INCREASED FROM 55vh: Makes the video taller so the top isn't cut off */
  min-height: 450px; 
  display: flex; 
  align-items: center; /* MATCHES EZ: Centers the text vertically */
  justify-content: center; 
  overflow: hidden; 
  background: #1a1a1a; 
  margin-top: 60px !important; 
  top: 0; 
  padding: 0 64px; 
}

.video-hero__media { 
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: 1; 
}

.video-hero__overlay { 
  position: absolute; 
  inset: 0; 
  /* UNIFORM TINT: A solid 40% dark overlay acts as a filter to hide video artifacts */
  background: rgba(0, 0, 0, 0.4); 
  z-index: 2; 
}

.video-hero__content { 
  position: relative; 
  z-index: 3; 
  text-align: center; 
  width: 100%;
  max-width: 1200px; 
  margin: 0 auto; 
  /* --- NEW: Nudge the entire text block down by 40px --- */
  transform: translateY(15px); 
}

/* --- OVERRIDE ARMOR FOR ABOUT PAGE HERO --- */
.video-hero__content .video-hero__title,
.video-hero__content h1,
.video-hero__content h2,
.video-hero__content .wp-block-heading { 
  font-size: clamp(32px, 4.5vw, 54px) !important; 
  line-height: 1.1 !important; 
  margin: 0 !important; 
  color: #ffffff !important; 
  font-family: Georgia, serif !important; 
  font-weight: 400 !important;
}

/* --- NEW ABOUT PAGE SUBTEXT --- */
.video-hero__subtext {
  font-family: 'Inter', sans-serif;
  font-size: 19px;
  line-height: 1.6;
  color: #ffffff;
  opacity: 0.9; 
  max-width: 600px;
  margin: 24px auto 0 auto; 
  /* --- UPDATED: Reduced from 400 to 300 for a lighter, sleeker look --- */
  font-weight: 300 !important; 
}

/* Mobile tweak for the subtext */
@media (max-width: 768px) {
  .video-hero__subtext {
    font-size: 16px;
    margin-top: 16px;
  }
}

.video-hero__content .video-hero__eyebrow {
  font-family: system-ui, sans-serif !important; 
  font-size: 11px !important; 
  letter-spacing: 0.15em !important; 
  text-transform: uppercase !important; 
  color: #ffffff !important; 
  margin-bottom: 20px !important; 
  display: block !important; 
}

.service-main { background: #f5f5f5; color: #333; padding: 0 64px 80px; position: relative; z-index: 1; }

/* FIX 3: align-items: baseline mathematically aligns the bottom of the title with the first line of the content */
/* FIX 3: Changed from baseline to flex-start to prevent expander containers from breaking the grid alignment */
.service-block { display: grid; grid-template-columns: 240px 1fr; gap: 60px; padding: 80px 0; border-bottom: 1px solid #e0e0e0; max-width: 1200px; margin: 0 auto; align-items: flex-start; }
.service-block:last-child { border-bottom: none; }

/* FIX 2: Brutally target ALL editor heading tags so "Representative Work" stays 24px and never randomly inflates or wraps */
.service-block__label, 
.service-main h1, .service-main h2, .service-main h3, .service-main h4,
.about-main h1, .about-main h2, .about-main h3, .about-main h4,
.page-content h1, .page-content h2, .page-content h3, .page-content h4,
.wp-block-heading { 
  font-family: 'Adamina', serif !important; 
  font-size: 24px !important; 
  line-height: 1.3 !important; 
  color: #333 !important; 
  margin-top: 0 !important; 
  margin-bottom: 12px !important; 
  font-weight: 400 !important; 
}

.service-block__content { max-width: 900px; min-width: 0; font-size: 19px; line-height: 1.8; color: #555; overflow-wrap: break-word; word-wrap: break-word; }
.service-block__content > *:first-child { margin-top: 0 !important; padding-top: 0 !important; }
.service-quote { font-family: 'Bodoni Moda', serif; font-size: 28px; font-weight: 500; line-height: 1.5; color: #111; margin: 0 0 40px 0; }

/* Default Expandable Text */
.expand-container { position: relative; }
/* Forces the first item inside an expander to sit flush at the top */
.expand-content > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
.expand-toggle { display: none; }
.expand-content { max-height: 300px; overflow: hidden; position: relative; transition: max-height 0.8s cubic-bezier(0.25, 1, 0.5, 1); }
.expand-content::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 160px; background: linear-gradient(to bottom, rgba(245,245,245,0), rgba(245,245,245,1)); pointer-events: none; transition: opacity 0.4s ease; }
.expand-toggle:checked + .expand-content { max-height: 3000px; }
.expand-toggle:checked + .expand-content::after { opacity: 0; }
.expand-btn { display: inline-block; background: transparent; border: 1px solid #ccc; padding: 10px 24px; margin-top: 20px; cursor: pointer; font-family: system-ui, sans-serif; font-size: 13px; color: var(--accent); transition: all 0.3s ease; position: relative; z-index: 50; }
.expand-btn:hover { background: #fff; border-color: var(--hover-blue); color: var(--hover-blue); }
.expand-btn .text-less { display: none; }
.expand-toggle:checked ~ .expand-btn .text-more { display: none; }
.expand-toggle:checked ~ .expand-btn .text-less { display: inline; }

/* Mobile-Only Expander Overrides */
@media (min-width: 769px) {
  .expand-mobile-only .expand-content { max-height: none !important; overflow: visible; }
  .expand-mobile-only .expand-content::after { display: none !important; }
  .expand-mobile-only .expand-btn { display: none !important; }
}

.process-tabs { 
  display: flex; 
  gap: 40px; 
  border-bottom: 1px solid #e0e0e0; 
  margin-bottom: 40px; 
  margin-top: 10px; 
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; 
}
.process-tabs::-webkit-scrollbar { display: none; }
.tab-btn { 
  background: transparent; 
  border: none; 
  padding: 0 0 16px; 
  font-family: system-ui, sans-serif; 
  font-size: 12px; 
  font-weight: 600; 
  text-transform: uppercase; 
  color: #777; /* Returns inactive tabs to a crisp grey */
  cursor: pointer; 
  position: relative; 
  transition: color 0.3s ease; 
  white-space: nowrap; 
}

.tab-btn::after { 
  content: ""; 
  position: absolute; 
  bottom: -1px; 
  left: 0; 
  right: 0; 
  height: 2px; 
  background: var(--hover-blue); 
  transform: scaleX(0); 
  transform-origin: left; /* Forces the line to animate from the left edge */
  transition: transform 0.8s ease; 
}

/* Turns the text blue on hover OR when active */
.tab-btn:hover, .tab-btn.active { 
  color: var(--hover-blue); 
}

/* Triggers the left-to-right line animation on hover OR when active */
.tab-btn:hover::after, .tab-btn.active::after { 
  transform: scaleX(1); 
}
.tab-pane { display: none; animation: fadeIn 0.4s ease; }
.tab-pane.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Cards & Links */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card { border: 1px solid #999; padding: 30px 24px; background: transparent; transition: all 0.3s ease; }
.news-card .news-date { color: var(--hover-blue); font-size: 12px; font-weight: 600; display: block; margin-bottom: 16px; transition: color 0.3s ease; }
.news-card p { color: var(--text); transition: color 0.3s ease; }
.news-card:hover { border-color: var(--hover-blue); }
.news-card:hover .news-date { color: var(--hover-blue); }
.news-card:hover p { color: var(--hover-blue) !important; }
.related-links { display: flex; flex-wrap: wrap; align-items: center; }
.related-links a { color: #305cded5; font-size: 16px; font-weight: 500; text-decoration: none; transition: color 0.3s ease; }
.related-links a:hover { color: var(--hover-blue); }
.related-links a:not(:last-child)::after { content: " / "; color: #999; margin: 0 12px; pointer-events: none; }

/* ========================================= */
/* 6. REPRESENTATIVE WORK SLIDER             */
/* ========================================= */
.work-slider-wrapper { position: relative; width: 100%; margin-top: -6px; overflow: hidden; z-index: 10; }

.work-slider__track { 
  display: flex; 
  gap: 20px; 
  overflow-x: auto; 
  scrollbar-width: none; 
  justify-content: flex-start; /* <-- CHANGED: Pushes track to the left naturally */
  padding: 20px max(0px, calc(50% - 170px)) 40px; /* Safely stops at 0px on tiny screens */
  margin: 0; 
  width: 100%; 
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%); 
  scroll-snap-type: x mandatory; /* <-- CHANGED: Enables native smooth scroll snapping */
}
.work-slider__track::-webkit-scrollbar { display: none; }

.work-card { 
  flex: 0 0 340px; 
  background: #f5f5f5; /* Makes the card a crisp white/ivory */
  border: 1px solid #999; /* Reverts to a clean, subtle grey line */
  padding: 40px; display: flex; flex-direction: column; cursor: pointer; 
  transition: transform 0.4s ease, filter 0.4s ease, opacity 0.4s ease, border-color 0.1s ease, box-shadow 0.4s ease; 
  transform-origin: center center; 
  scroll-snap-align: center; /* <-- CHANGED: Forces the card to lock into the exact center */
}

/* Out of focus (blurred sides & resting state) */
.work-card:not(.is-in-focus) { 
  transform: scale(0.95); 
  filter: blur(1.5px); 
  opacity: 0.65; 
  box-shadow: none; 
  border-color: #999; 
  background: #f5f5f5;
}

/* Centered active card (Automatically gets the highlight effects) */
.work-card.is-in-focus { 
  transform: scale(1); 
  filter: blur(0); 
  opacity: 1; 
  border-color: var(--hover-blue) !important; 
  background: #ffffff; 
  box-shadow: 0 15px 40px rgba(0,0,0,0.08); 
}

.work-card__role { font-family: 'Inter', sans-serif; font-size: 20px; font-weight: 600; color: #222; margin-bottom: 3px; line-height: 1.3; letter-spacing: -0.02em; }
.work-card__industry { font-family: 'Inter', sans-serif; font-weight: 400; font-size: 14px; color: #305CDE; margin-bottom: 8px; line-height: 1.5; }
.work-card__tag { display: inline-block; font-family: 'Inter', sans-serif; font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: #555; background: rgba(0,0,0,0.04); padding: 4px 8px; border-radius: 4px; margin-top: 12px; }
.work-card__divider { width: 100%; height: 1px; background: rgba(0,0,0,0.06); margin: 24px 0; }
.card-label { font-family: 'Inter', sans-serif; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: #999; display: block; margin-bottom: 6px; font-weight: 600; }
.work-card__detail { font-family: 'Inter', sans-serif; font-size: 14px; line-height: 1.6; color: #222; margin-bottom: 20px; }
.work-card__detail:last-child { margin-bottom: 0; }
.work-card__meta { color: #777; font-weight: 400; font-size: 13.5px; }

.slider-hover-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 100; background: transparent; border: none; color: var(--accent); font-size: 32px; opacity: 0.6; padding: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.work-slider-wrapper:hover .slider-hover-arrow { opacity: 1; transform: translateY(-50%) scale(1.05); }
.slider-hover-arrow:hover { color: var(--hover-blue); }
.slider-prev { left: 10px; } .slider-next { right: 10px; }

/* ========================================= */
/* 7. FOOTER                                 */
/* ========================================= */
.site-footer { background: #f5f5f5; padding: 80px 64px 30px; border-top: 1px solid #e0e0e0; font-family: system-ui, sans-serif; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-bottom: 60px; }
.footer-eyebrow { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: #333; margin: 0 0 24px; }
.footer-column address, .footer-links a { font-style: normal; font-size: 15px; line-height: 1.8; color: #555; text-decoration: none; display: block; margin-bottom: 12px; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--hover-blue); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 30px; border-top: 1px solid #e0e0e0; }
.copyright { font-size: 12px; color: #999; margin: 0; }
.legal-links { display: flex; gap: 24px; }
.legal-links a { color: #999; text-decoration: none; font-size: 12px; transition: color 0.3s ease; }
.legal-links a:hover { color: var(--hover-blue); }


/* ========================================= */
/* 10. LEGAL PAGE FORMATTING                 */
/* ========================================= */
.legal-document h3 {
    font-family: Georgia, serif !important; 
    font-size: 24px !important;      /* <-- Increased to perfectly match the service pages */
    margin-top: 64px !important;     /* <-- Reduced from 96px for a tighter layout */
    margin-bottom: 16px !important;  /* <-- Tweaked to match the 16px gap on service pages */
    color: #333 !important;          /* <-- Matches the exact dark shade of your other headers */
    font-weight: 400 !important;
}

/* Prevents the very first title from creating a massive gap under the intro text */
.legal-document h3:first-of-type {
    margin-top: 48px !important;     /* <-- Scaled down to match the new proportions */
}

/* Snaps the very first line of text perfectly flush with the "Policy" label */
.legal-document > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ========================================= */
/* 8. RESPONSIVE DESIGN & MOBILE LOCKS       */
/* ========================================= */

@media (max-width: 1100px) {
  .site-header { padding: 28px 40px; }
  .service-hero, .service-main { padding-left: 40px; padding-right: 40px; }
  .subpage-nav { display: none; }
  
  body:not(.home) .site-nav-panel { padding: 132px 40px 40px; align-items: flex-start; text-align: left; overflow-y: auto; }
  
  body.home .site-nav-panel { 
    padding-top: 100px; /* Or whatever value you used in the previous step */
    padding-bottom: 40px;
    /* THE FIX: Re-apply the clamp math so it perfectly locks to the logo */
    padding-left: clamp(40px, 10vw, 160px); 
    padding-right: clamp(40px, 5vw, 64px);
  }

  .slider-hover-arrow { display: none; }
}

@media (max-width: 768px) {
  body.home .site-header { left: 0; width: 100%; padding-left: 20px; padding-right: 20px; }
  
  /* FIX 4: Visual nudge UP inside the container to hit the dead center alignment */
  .site-header { padding: 20px; }
  .site-header__inner { transform: translateY(-1px); }
  .site-logo img, .site-logo svg { height: 15px; width: auto; } 
  .menu-btn__text { display: none !important; }

  /* --- NORMALIZE MOBILE SPACING FOR ALL SERVICE BLOCKS --- */
  .expand-content > *:first-child,
  .process-tabs,
  .work-slider-wrapper,
  .news-grid {
      margin-top: 0 !important;
      padding-top: 0 !important;
  }
  
  body:not(.home) .site-nav-panel { 
      padding: 110px 24px 30px; 
      bottom: auto; 
      height: auto; 
      box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
      overflow: hidden !important; 
  }
  
  /* --- NEW: Slower, smoother header animation for mobile --- */
  .site-header {
      transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1) !important;
  }
  
  /* FIX 4: Added more space under SERVICES to exactly match the request */
  .nav-group__label { margin-top: 0; margin-bottom: 23px !important; } 
  .nav-group__links { gap: 12px !important; }
  .nav-group__links a { font-size: 20px; }
  .nav-group[style] { margin-top: 20px !important; } 

  /* --- ULTIMATE SYNC: Homepage Mobile Menu to Subpage Menu --- */
  body.home .site-nav-panel { 
      left: 0 !important; 
      padding: 110px 24px 30px !important; 
      height: 100dvh !important; 
      bottom: auto !important; 
      transform: translateY(-100%); 
      transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1); 
      box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
  }

  body.home .nav-panel__inner { 
      padding: 5px 0 0 0 !important; 
      margin: 0 !important; 
      justify-content: flex-start !important; 
      min-height: 100% !important; 
  }
  
  body.home.is-menu-open .site-nav-panel { transform: translateY(0); }

  /* --- SMOOTH LOGO COLOR TRANSITION (Bypasses the Brightness Flash) --- */
  body.home:not(.is-menu-open) .site-header .brand img { 
      filter: brightness(0) invert(1) drop-shadow(0px 2px 6px rgba(0,0,0,0.5)); 
      transition: filter 0.4s ease 0.5s; 
  }
  body.home:not(.is-menu-open) .menu-btn__lines, body.home:not(.is-menu-open) .menu-btn__lines::before, body.home:not(.is-menu-open) .menu-btn__lines::after { background: #fdfbf7; box-shadow: 0 1px 4px rgba(0,0,0,0.3); transition: background 0.3s ease 0.5s, box-shadow 0.3s ease 0.5s, transform 0.4s ease, top 0.4s ease; }
  body.home.is-menu-open .site-header .brand img { 
      filter: brightness(0) invert(0); 
      transition: filter 0.2s ease 0s; 
  }
  body.home.is-menu-open .menu-btn__lines, body.home.is-menu-open .menu-btn__lines::before, body.home.is-menu-open .menu-btn__lines::after { background: var(--text); box-shadow: none; transition: background 0.1s ease 0s, box-shadow 0.1s ease 0s, transform 0.4s ease, top 0.4s ease; }

  .service-hero { padding: 200px 20px 60px; min-height: auto; }
  
  body[class*="about"] .service-main, body[class*="about"] .about-main { padding-top: 0px !important; }
  
  .service-main { padding: 0 20px 60px; overflow-x: hidden; }
  .service-block { grid-template-columns: 1fr; gap: 20px; padding: 40px 0; max-width: 100%; box-sizing: border-box; }
  .service-quote { font-size: 20px; line-height: 1.4; margin-bottom: 24px; }
  
  .service-block__content { font-size: 16px; line-height: 1.6; max-width: 100%; box-sizing: border-box; overflow-wrap: break-word; word-wrap: break-word; }
  .service-block__content ul { padding-left: 20px; padding-right: 10px; box-sizing: border-box; }
  .service-block__content ul.news-list { 
    padding-left: 0; 
    padding-right: 0; 
  }
  .news-grid { grid-template-columns: 1fr; }
  
  .process-tabs { gap: 24px; flex-wrap: nowrap !important; white-space: nowrap !important; overflow-x: auto !important; margin-bottom: 24px; touch-action: pan-x; }
  .tab-btn { font-size: 11px; flex: 0 0 auto; text-align: center; margin: -10px -8px 0; padding: 10px 8px 16px; }
  .tab-btn::after { left: 8px; right: 8px; }

  .work-slider__track { gap: 16px; justify-content: flex-start; padding: 20px 10px 40px; mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%); }
  .work-card { flex: 0 0 280px; padding: 30px; }
  .work-card:not(.is-in-focus) { transform: scale(0.97); filter: blur(1px); opacity: 0.75; }

  .site-footer { padding: 60px 20px 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; margin-bottom: 40px; }
  .footer-bottom { flex-direction: column-reverse; align-items: flex-start; gap: 16px; }
  .legal-links { flex-direction: column; gap: 10px; }

  .detail-title { margin-top: 50px; }

  body.home { 
    min-height: 100dvh; 
    width: 100%; 
    background-color: #141211; 
  }
  
  body.home .hero { 
    width: 100%; 
    min-height: 100dvh; 
    z-index: 10; 
    display: flex; 
    flex-direction: column; 
    overflow: visible; 
  }
  
  body.home .site-header { position: fixed; z-index: 9999; }
  
  /* 1. Top Image Block gets 40% */
  body.home .hero__left { 
    flex: 0 0 38%; 
    height: 38%; 
    width: 100%; 
  }
  
  /* 2. Bottom Text Block gets 60% */
  body.home .hero__right { 
    flex: 0 0 62%; 
    height: 62%; 
    width: 100%; 
  }
  
  body.home .hero__right { overflow: hidden; padding: 30px 20px; justify-content: flex-start; }
  body.home .hero__copy { 
      margin: 60px auto 0 auto; 
      text-align: center; 
  }
  body.home .hero__title { text-align: center; margin-bottom: 20px; }
  body.home .hero__controls { margin: 20px auto auto auto; padding-bottom: 20px; position: relative; left: auto; bottom: auto; justify-content: center; gap: 8px; }
  body.home .hero__bar { width: 40px; height: 4px; }
  body.home .hero__arrow { font-size: 24px; padding: 16px; }
  
  /* 1. Left-align the top title section */
  .hero__detail-left { 
    background: rgba(26, 26, 26, 0.85); 
    padding: 40px 24px 20px 24px; 
    align-items: flex-start; 
    text-align: left; 
    justify-content: flex-end; 
    overflow: hidden; 
  }
  .detail-title { 
    text-align: left; 
    margin-top: 50px;
  }

  /* 2. Left-align the bottom text section */
  .hero__detail-right { 
    background: var(--bg); 
    padding: 40px 24px 30px; 
    transform: translateY(100%); 
    border-left: none; 
    justify-content: flex-start; 
    overflow-y: auto; 
    cursor: pointer; 
  }

  /* 3. Apply the precise offset to bypass the "<" arrow */
  .is-detail-active .hero__detail-right { transform: translateY(0); }
  
  .detail-desc { 
    text-align: justify; 
    hyphens: auto; 
    -webkit-hyphens: auto; 
    
    margin: 0 0 24px 0; 
    padding-left: 28px; 
    padding-right: 24px; 
    width: 100%; 
    max-width: 100%; 
    font-size: 17px; 
    color: var(--text); 
  }
  
  .detail-full-link { 
    display: inline-flex; 
    justify-content: flex-start; 
    width: 100%; 
    max-width: 100%; 
    margin: 0; 
    padding-left: 28px; 
    padding-right: 24px;
    padding-top: 12px; 
    padding-bottom: 20px; 
  }

  /* --- 1. REVERT TO STABLE IMAGE SIZING --- */
  body.home .hero__img, 
  body.home .hero__img--incoming, 
  body.home [data-hero-img], 
  body.home [data-hero-img-in] {
   top: -10% !important;     
   height: 120% !important;  
   background-position: center center !important; 
   background-size: cover !important; 
  }

  /* --- HORIZONTAL SCROLL LOCK --- */
  html, body {
   overflow-x: hidden; 
   width: 100%; 
  } 

  body.home .hero {
   overflow-x: clip; 
  } 
   
  /* --- TALLER IMMERSIVE VIDEO HERO ON MOBILE --- */
  .video-hero {
    height: 60vh !important;       
    min-height: 420px !important;  
    aspect-ratio: unset !important; 
    margin-top: 55px !important;
    padding: 0 20px;
  }

  .video-hero__content .video-hero__title,
  .video-hero__content h1 {
    font-size: 34px !important;    
    line-height: 1.15 !important;
    margin-bottom: 16px !important;
  }

  .video-hero__subtext {
    font-size: 17px !important;
    line-height: 1.5 !important;
    margin-top: 0 !important;
    padding: 0 10px;               
  }

  /* --- NEW: Slower, smoother dropdown menu animation for mobile --- */
  .site-nav-panel {
      transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1) !important;
  }
  
  /* Matches the dark overlay fade to the new, slower menu speed */
  .nav-backdrop {
      transition: opacity 1.2s ease !important;
  }

  /* --- THE FIX: Create visual hierarchy for stacked mobile headings --- */
  .service-block__content h1, 
  .service-block__content h2, 
  .service-block__content h3, 
  .service-block__content h4,
  .service-block__content .wp-block-heading { 
      font-size: 20px !important; 
      line-height: 1.35 !important;
  }

  /* --- 2. INCREASE MOBILE IMAGE PANNING --- */
  body.home .hero__img, 
  body.home .hero__img--incoming, 
  body.home [data-hero-img], 
  body.home [data-hero-img-in] {
      width: 130% !important;    /* Creates extra image bleed to allow for a wider pan */
      left: -15% !important;     /* Centers the wider image */
  }

  /* The resting/panning destination */
  body.home.is-loaded [data-hero-img] { 
      transform: translate3d(-10%, 0, 0) !important; 
  }

  /* The starting position when a new slide fires */
  body.home .is-switching [data-hero-img] { 
      transform: translate3d(10%, 0, 0) !important; 
  }
}


/* ========================================= */
/* 9. NEWS & INSIGHTS LIST FORMAT            */
/* ========================================= */

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Removed the top/bottom border rules entirely for a cleaner look */
.news-list__item {
  border: none; 
}

.news-list__link {
  display: grid;
  grid-template-columns: 1fr 30px; /* 1 column for all text, 1 column for the arrow */
  grid-template-rows: auto auto;   /* Row 1: Date, Row 2: Headline */
  gap: 8px 30px; /* 8px vertical gap between text, 30px horizontal gap to arrow */
  align-items: center;
  padding: 16px 0; /* Slightly tighter padding since the lines are gone */
  text-decoration: none;
  transition: all 0.3s ease;
  transform: translateZ(0); 
  backface-visibility: hidden; 
  -webkit-font-smoothing: subpixel-antialiased;
}

.news-list__meta {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--hover-blue);
  line-height: 1.4;
}

.news-list__title {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: #555; /* Changed to the lighter grey normal text color */
  transition: color 0.3s ease;
}

/* The hover arrow - Spans both rows to stay dead-center vertically */
.news-list__arrow {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  color: var(--accent);
  font-size: 20px;
  opacity: 0;
  transform: translateX(-15px);
  transition: all 0.3s ease;
  text-align: right;
}

/* Hover Effects */
.news-list__link:hover .news-list__title {
  color: #333333;
}
.news-list__link:hover .news-list__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* --- THE FIX: Ultra-Subtle, Polite Shake --- */
@keyframes shake-reject {
  0%, 100% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(-3px, 0, 0); } /* Max swing is now only 3px */
  40% { transform: translate3d(2px, 0, 0); }
  60% { transform: translate3d(-1px, 0, 0); }
  80% { transform: translate3d(1px, 0, 0); }
}

.news-list__link.is-shaking {
  /* Slowed down slightly to 0.5s for a lazier, softer feel */
  animation: shake-reject 0.5s cubic-bezier(.36,.07,.19,.97) both;
  transition: transform 0s !important; 
}


/* Custom Expander Height */
.news-expand-content {
  max-height: 220px; 
}
.expand-toggle:checked + .news-expand-content {
  max-height: 2000px; 
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .news-list__link {
    grid-template-columns: 1fr; 
    padding: 16px 0;
  }
  .news-list__arrow {
    display: none; 
  }
  .news-expand-content {
    max-height: 200px; 
  }
}

/* ========================================= */
/* LANGUAGE SWITCHER                         */
/* ========================================= */

.language-switcher-group .language-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 16px; /* Spacing between language codes */
    flex-wrap: wrap;
}

.language-switcher-group .language-list li {
    margin: 0;
}

.language-switcher-group .language-list a {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    color: #999; /* Inactive languages are grey */
    transition: color 0.3s ease;
}

/* Hover state and Active Language state */
.language-switcher-group .language-list a:hover,
.language-switcher-group .language-list li.current-lang a {
    color: #111; /* Active language is bold dark grey/black */
}