/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin-block-end: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  line-height: 1.5;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

/* .headlines .headline-wrapper {
  display: none;
} */

/* Balance text wrapping on headings */
h1, h2,
h3, h4 {
  text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

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

/* Ensure the body takes the full height and uses smooth scrolling */
body {
  min-height: 100vh;
  line-height: 1.5;
  font-family: var(--font-helvetica);
}

html {
  scroll-behavior: smooth;
}

/* Ensure images and videos are responsive */
img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

@font-face {
  font-family: 'Built Tiling';
  src: url('/assets/fonts/BuiltTitlingRg-Regular.woff2') format('woff2'),
      url('/assets/fonts/BuiltTitlingRg-Regular.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Dark Grey = #57585b
Light Grey = var(--color-light-grey);
Orange = var(--color-orange)
Forrest Green = var(--color-forrest-green) */

:root {
  --font-built-tiling: 'Built Tiling', sans-serif;
  --font-helvetica: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-montserrat: "Montserrat", sans-serif;
  --color-dark-grey: #57585b;
  --color-mid-grey: #888;
  --color-light-grey: #ccc;
  --color-orange: #ef5a28;
  --color-forrest-green: #255323;
}

body {
  font-family: var(--font-helvetica);
}

html {
  scroll-behavior: smooth;
}

p {
  display: block;
  margin: 0 auto;
  line-height: 2;
}

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

.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-family: var(--font-helvetica);
  font-size: 2rem;
  z-index: 9999;
}

.loading.hide {
  display: none;
}

.loading img {
  width: 100%;
  max-width: 250px;
}

#video {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  position: fixed;
  top: 0;
  left: 0;
}

#vimeo-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 101vw;
  height: 101vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  top: 87px !important;
}
#vimeo-container iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
}

.scroll-indicator img {
  width: 100%;
  max-width: 120px;
}

.scroll-indicator {
  position: fixed;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}
.scroll-indicator,.video-progress {
  display: none !important;
} 

.mouse {
  width: 20px;
  height: 36px;
  border: 2px solid #fff;
  border-radius: 12px;
  position: relative;
  margin: 0 auto 10px;
}

.gsap-marker-scroller-start {
  display: none !important;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background-color: #fff;
  border-radius: 4px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 1.5s infinite;
}

@keyframes scroll {
  0% {
    opacity: 1;
    top: 8px;
  }
  100% {
    opacity: 0;
    top: 24px;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.headline {
  font-family: var(--font-built-tiling);
  color: var(--color-orange);
  font-size: 7rem;
  max-width: 1200px;
  line-height: 1;
}

.headlines {
  position: relative;
  /* height: 100vh; */
  overflow: visible;
  z-index: 5;
}

.line, body .arrow-headline h2 {
  display: block;
  white-space: nowrap;
  font-family: var(--font-built-tiling);
  color: var(--color-orange);
  font-size: 7rem;
}

body .black-bg .arrow-headline h2 {
  color: var(--color-dark-grey);
}
body .white-bg .arrow-headline h2 {
  color: var(--color-light-grey);
}
body .grey-bg .arrow-headline h2 {
  color: #fff;
}

.last-skew .headline {
  font-family: var(--font-montserrat);
  color: var(--color-dark-grey);
  font-size: 3.5rem;
  letter-spacing: 10px;
  font-weight: normal;
  text-transform: uppercase;
}

/* Typing animation */
.typing {
  visibility: visible;
  animation: typing 1.5s steps(20, end) forwards;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

.headlines .headline {
  font-family: var(--font-built-tiling);
  color: var(--color-orange);
  font-size: 7rem;
  max-width: 1200px;
  line-height: 1;
  position: fixed;
  top: calc(40px + 2rem);
  left: 2rem;
  opacity: 1;
  z-index: 5;
  transform-origin: top left;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

@media (min-width: 1600px) {
  #initial-headline {
    font-size: 9vw;
    max-width: 75vw;
  }
}

@media (max-width: 480px) {
  .headlines .headline,
  .headline,
  .line {
    font-size: 4.5rem;
  }
  .arrow-headline h2 {
    white-space: normal !important;
  }
  body .arrow-headline h2 {
    font-size: 3.5rem;
    margin-bottom: 4rem;
  }
  div.work-samples-header {
    margin-top: 0;
  }
  div.work-samples {
    margin-top: 0;
  }
  .last-skew .headline {
    font-size: 1.7rem;
    letter-spacing: 0;
    line-height: 1.1;
    padding: 0;
    margin: 0;
  }

  .swiper-slide {
    max-width: 97vw;
    border-width: 2px!important;
  }

  .last-skew .button {
    margin: 1rem auto !important;
  }
  
  /* Adjust headline positioning for mobile */
  .headlines .headline {
    top: calc(88px + 1rem); /* Smaller margin on mobile */
    left: 1rem; /* Less left spacing on mobile */
  }
}
.overlay {
  position: relative;
  max-width: 1200px;
}

.triangles {
  position: relative;
  width: 100%;
  height: 100%;
}

.triangle {
  position: fixed;
  width: 250px;
  height: 250px;
  color: #000;
  font-family: var(--font-helvetica);
  background: url('/assets/images/MCC-Web-Triangle1.svg') no-repeat center center;
  background-size: contain;
  right: 80vw;
  bottom: -30vh;
}

.triangle p {
  position: absolute;
  font-size: 1.2rem;
  font-weight: 500;
  text-align: right;
  bottom: 2rem;
  right: 2rem;
  width: 250px;
  z-index: 9;
}

.triangle a {
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  padding: 10px 20px;
  cursor: pointer;
  min-width: 150px;
  background: url('/assets/images/MCC-Web-Button1.svg') no-repeat center center;
  background-size: contain;
  text-align: center;
  z-index: 99;
  text-decoration: none;
}

.logo {
  width: 100%;
  z-index: 9;
}

.logo img {
  width: 100%;
  max-width: 50px;
  display: block;
  margin: 0 auto;
}

/* All .navbar, .hamburger-menu, .menu, .social-media (related to nav), 
   and their media queries for desktop/mobile nav styling
   have been moved to static/css/navigation.css */

/* Desktop Navigation Media Query */
@media screen and (min-width: 992px) {
  /* Add padding to body for fixed navbar */
  body {
    padding-top: 88px; /* This might be needed if navbar is fixed height */
  }
}

@media screen and (max-width: 991px) {
  /* Mobile adjustments for main content spacing */
  #main {
    padding-top: 100px; /* Slightly less padding on mobile */
  }
  
  body.home #main {
    padding-top: 88px; /* Navigation height only for homepage mobile */
  }
  
  .overlay {
    padding-top: 100px; /* Consistent with main content on mobile */
  }
}

/* Homepage specific - reduce padding since headlines handle their own spacing */
body.home #main {
  padding-top: 88px; /* Just navigation height, headlines position themselves */
}

/* Specific overrides for pages that already have margin-top */
#main.after-video {
  background-color: #000;
  margin-top: 88px;
  padding-top: 40px; /* Reduced since margin-top already provides some space */
}

/* Ensure video containers don't overlap navigation */
#vimeo-container,
.video-container {
  margin-top: 0; /* Remove margin-top since #main handles spacing */
}

/* Overlay sections need proper spacing too */
.overlay {
  padding-top: 120px; /* Give overlays breathing room from navigation */
}

/* Service page overlays need proper spacing from navigation */
.overlay .headlines {
  padding-top: 2rem; /* Additional breathing room for service page headlines */
}

/* Homepage overlays - reset padding since headlines position themselves absolutely */
body.home .overlay .headlines {
  padding-top: 0; /* Reset for homepage since headlines are positioned absolutely */
}

/* Mobile logo positioning - hide logo from hamburger menu on mobile */
/* This section was related to .navbar .logo and .navbar.open .logo, moved to navigation.css */

.video-progress {
  position: fixed;
  bottom: 10px;
  left: 50px;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.7rem;
}

.social-media {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10;
}
.navbar.open .social-media {
  display: flex;
}

.social-media img {
  width: 50px;
  margin: 0 5px;
}

.about {
  background: #000;
  position: relative;
}

.skew-background {
  position: absolute;
  bottom: -14rem;
  max-width: 400px;
  width: 100%;
  left: 2rem;
}
.skew-background {
  position: absolute;
  bottom: inherit;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  z-index: 1;
}
@media (max-width: 1200px) {
  .skew-background.new {
    width: 20%;
  }
}
@media (max-width: 768px) {
  .skew-background.new {
    display: none;
  }
  
  /* Add mobile-specific styles to show background images at the bottom */
  .skew.grey-bg.skew-multitool::after,
  .skew.grey-bg.skew-compass::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    right: 0;
    width: 250px;
    height: 250px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom right;
    z-index: 2;
  }
  .skew.grey-bg.skew-multitool,
  .skew.grey-bg.skew-compass {
    padding-bottom: 15rem !important;
  }
  
  .skew.grey-bg.skew-multitool::after {
    background-image: url('/assets/images/projects/infrastructure/MountaineerAgency-Infrastructure-Multitool1-2024-12.png');
  }
  
  .skew.grey-bg.skew-compass::after {
    background-image: url('/assets/images/projects/engineering/MountaineerAgency-Engineering-Compass.png');
  }
}

:root {
  --width: min(100vw, 1200px);
  --full-width: 100vw;
  
  --angle: -11deg;
  /* Make sure we always have the absolute value */
  /* negative values don't work with CSS tan() */
  --abs-angle: max(var(--angle), var(--angle) * -1);
  --tan-alpha: tan(var(--abs-angle));
  --skew-padding: calc(var(--width) * var(--tan-alpha) / 2);
  --clip-padding: calc(var(--full-width) * var(--tan-alpha) / 2);
}

.skew {
  position: relative;
  padding: var(--skew-padding) 0;
  margin-top: -1px;
  background: unset !important;
  clip-path: inset(0 calc(-1 * var(--tan-alpha) / 2) 0 0);
  width: 100%;
  display: block;
}

.skew::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  transform: skewY(var(--angle));
  transform-origin: 50% 0;
  outline: 1px solid transparent;
  backface-visibility: hidden;
}
body, html {
  width: 100%;
  max-width: 100%;
}
.grey-bg::before {
  background-color: var(--color-light-grey);
}

.white-bg::before {
  background-color: #fff;
}

.black-bg::before {
  background-color: #000;
}

.last-skew {
  position: relative;
  margin-top: calc( ( var(--clip-padding) * -1 ) - 2px );
  background-image: 
    linear-gradient(rgba(0,0,0,0.05) 50%, 0, transparent 100%),
    linear-gradient(-135deg, #0cc, #066);
  background-size: .5em .5em, 100% 100%;
  padding: calc( ( var(--clip-padding) * 2 ) - ( var(--clip-padding) - var(--skew-padding) ) ) 0 4em;
  clip-path: polygon(
    0% calc(var(--clip-padding) * 2),
    100% 0%,
    100% 100%,
    0% 100%);
  -webkit-clip-path: polygon(
    0% calc(var(--clip-padding) * 2),
    100% 0%,
    100% 100%,
    0% 100%);
}

#logo-shatter {
  width: 100vw;
  margin-top: 6rem !important;
  max-width: none;
  margin: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
  padding:59.9% 0 0 0;position:relative;
}

#logo-shatter iframe {
  width: 100vw;
  height: auto;
  min-width: 100%;
  display: block;
  object-fit: contain;
  position:absolute;top:0;left:0;width:100%;height:100%;
}

.container {
  margin: 0 auto;
  padding: 0 2rem;
  display: block;
  width: 100%;
  max-width: var(--width);
  position: relative;
  width: 100%;
}

@media (min-width: 1200px) {
  .skew-compass .container,
  .skew-multitool .container {
    display: flex;
    align-items: center;
    gap: 6rem;
    padding-left: 2rem;
    padding-right: 2rem;
  }
    .skew-compass .content-wrapper,
  .skew-multitool .content-wrapper {
    flex: 1;
    order: 2;
    margin-left: 6rem;
  }
  
  /* Position the background image on the left with more space */
  .skew-compass .skew-background,
  .skew-multitool .skew-background {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    max-width: 500px;
    width: 100%;
    flex: 0 0 500px;
    order: 1;
  }
}

/* @media (min-width: 1050px) {
  .container {
    padding: 0 10rem;
  }
} */

.arrow-text {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.arrow-text p {
  position: relative;
  color: #999 !important;
  font-size: 6rem;
  padding: 0 2.5rem;
  font-family: var(--font-helvetica);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 auto;
  margin-top: 3rem;
}

.arrow-text p::after {
  content: '';
  display: block;
  margin: auto;
  height: 5px;
  width: 100%;
  margin-top: 2rem;
  overflow: hidden;
  bottom: -2rem;
  background: var(--color-forrest-green);
  left: 0;
  right: 0;
}

.arrow-text span {
  color: #fff;
}

/* .arrow-text:before {
  content: '';
  display: block;
  width: 0;
  width: 15px;
  height: 15px;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%) rotate(90deg);
  background-color: #fff;
} */

.white-bg {
  background: #fff;
}

.grey-bg {
  background: var(--color-light-grey);
}

.grey-line {
  border-color: var(--color-mid-grey);
}

.black-bg {
  background: #000;
}

.black-bg p {
  color: #fff;
}
.black-bg h2 {
  color: #fff;
}

.spacer {
  height: 4000vh;
}

#main.after-video {
  background-color: #000;
  margin-top: 88px;
  padding-top: 40px; /* Breathing room from navigation */
}

/* Page-level headlines (h1) need proper spacing from navigation */
main h1:first-child,
#main h1:first-child,
.container > h1:first-child {
  margin-top: 2rem; /* Ensure page titles have breathing room */
}

/* Contact page wrapper already handles its own spacing correctly */
.contact-page-wrapper h1 {
  margin-top: 0; /* Reset since wrapper handles spacing */
}

#main p {
  max-width: none;
  margin: 0;
  line-height: normal;
}

.overlay.after-video::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: 1;
}

/* Ensure navbar-sticky doesn't conflict with content */
.navbar-sticky {
  min-height: 200vh;
  position: relative;
  background-color: #000;
  z-index: 8;
  margin-top: -20vw;
  padding-top: 120px; /* Add breathing room for content below sticky nav */
}

@keyframes expandWidth {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.arrow-headline {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
}

.arrow-headline.left {
  max-width: 600px;
  margin: 0 auto;
  width: auto;
}

.arrow-headline h2 {
  text-align: right;
  margin: 6rem 0;
  margin-bottom: 2rem;
  width: fit-content;
  display: block;
  color: var(--color-mid-grey);
  font-family: var(--font-helvetica);
  font-weight: 400;
  font-size: 2.5rem;
  position: relative;
  width: 100%;
  display: flex;
  text-transform: uppercase;
  justify-self: flex-start;
}

.arrow-headline.left h2 {
  text-align: left !important;
}

@media (max-width: 1200px) {
  .arrow-headline h2 {
    margin: 4rem 0;
  }
}

@media (max-width: 480px) {
  .arrow-headline h2 {
    font-size: 2rem;
    margin-left: auto;
    margin-right: auto; /* Center the headline */
  }
}

.arrow-headline h2 {
  width: fit-content;
  display: block;
  opacity: 0;
  overflow: hidden;
}

.arrow-headline h2:after {
  content: '';
  display: block;
  margin: 0; /* Changed from auto to 0 to align with text */
  height: 5px;
  width: 0;
  margin-top: 2rem;
  overflow: hidden;
  bottom: -2rem;
  background: var(--color-forrest-green);
  left: 0;
  right: auto; /* Changed from 0 to auto */
}

.arrow-headline span {
  color: white;
}

.arrow-headline:not(.no-arrow) h2 {
  margin-right: 2rem;
  margin-left: auto;
}

.arrow-headline:not(.no-arrow)::after {
  content: '';
  display: block;
  width: 50px;
  height: 50px;
  clip-path: polygon(20% 50%, 100% 0%, 100% 100%);
  position: absolute;
  top: 30%;
  right: 0;
  transform: translateX(100%); /* Move triangle completely off the container */
  background-color: var(--color-orange);
  opacity: 0;
}


@media (max-width: 480px) {
  .arrow-headline:not(.no-arrow)::after {
    right: -2rem;
    transform: unset !important;
  }
}

@keyframes slideInTriangle {
  0% {
    transform: translateX(50px) translateX(100%); /* Start position outside container */
    opacity: 0;
  }
  100% {
    transform: translateX(0) translateX(100%); /* End position still outside container */
    opacity: 1;
  }
}

@keyframes fadeInText {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes growBorder {
  0% {
    width: 0;
  }
  100% {
    width: 100%; 
  }
}
.arrow-headline.animated h2{
  animation: fadeInText 0.5s forwards 0.5s;
}
.arrow-headline.animated:after {
  animation: slideInTriangle 0.5s forwards;
}
.arrow-headline.animated h2:after {
  animation: growBorder 0.5s forwards 1s; 
}

.arrow-headline.animated.left {
  animation-delay: calc(0.5s* var(--i));
}

.arrow-button {
  display: block;
  width: 30px;
  height: 30px;
  clip-path: polygon(50% 0%, 0% 86.6%, 100% 86.6%);
  background-color: var(--color-orange);
  transform: rotate(-90deg);
  cursor: pointer;
  margin: 0 1rem;
  border-color: transparent;
  border: none;
  transition: all 0.2s ease-in-out;
  opacity: 1;
}

.arrow-button:hover {
  opacity: 0.8;
  transform: rotate(-90deg) scale(1.1);
}

.arrow-button.right {
  transform: rotate(90deg);
}

.arrow-button.right:hover {
  opacity: 0.8;
  transform: rotate(90deg) scale(1.1);
}

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1200px;
  margin: 2rem 0 3rem; /* Increased bottom margin */
  gap: 4rem 3rem; /* Adjusted gap to provide more room */
}

.cards.left {
  justify-content: left;
}

/* Common card styles for all cards */
.card {
  flex: 1 1 300px;
  max-width: 350px;
  margin-bottom: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  position: relative;
  padding-bottom: 2rem; /* Add space for hanging button */
}

.card:not(.home-card) {
  background-color: #fff; /* Move background color to non-home cards only */
}

.card h3 {
  color: var(--color-mid-grey);
  font-family: var(--font-built-tiling);
  border-top: 5px solid var(--color-light-grey);
  border-bottom: 5px solid var(--color-light-grey);
  font-size: 2.4rem;
  line-height: 1.2;
  padding: 0.8rem 0;
  margin: 0.5rem 0 1rem;
  text-align: left;
}

.card li {
  list-style: none;
  position: relative;
  padding-left: 1rem;
  color: black;
  font-weight: bold;
  font-size: 1.2rem;
}

.card li:before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 2px;
  background-color: var(--color-orange);
}

.card img {
  width: 100%;
  height: auto;
  max-width: 400px;
  display: block;
  margin: 0 auto;
}

/* Standard card styles (non-home cards) */
.card:not(.home-card) {
  padding: 1.5rem 1.5rem 4rem; /* Top/sides padding + extra bottom for button */
  display: flex;
  flex-direction: column;
  min-height: 400px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:not(.home-card):hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-5px);
}

.card:not(.home-card) ul {
  flex-grow: 1;
  margin: 0 0 2rem;
}

.card:not(.home-card) .logo-container {
  margin-bottom: 0;
  max-height: 80px;
  display: flex;
  align-items: center;
}

/* Button positioning - default for all cards */
.card .button {
  position: absolute;
  bottom: -1.25rem; /* Make button hang below card */
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  font-size: 1.25rem;
  padding: 0.75rem 1.5rem;
  width: auto;
  display: inline-block;
}

/* Home card specific button positioning (override) */
.home-card .button {
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  margin: 0.5rem auto 0;
}

/* Homepage specific flip card styles */
.home-card {
  perspective: 1000px;
  height: 340px;
  background-color: transparent;
  padding-bottom: 0;
  box-shadow: unset;
}

.home-card .card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: left;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.home-card:hover .card-inner {
  transform: rotateY(180deg);
}

.home-card .card-front, 
.home-card .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  background-color: #fff;
}

.home-card .card-front {
  padding: 0 2rem 2rem;
  z-index: 2;
}

.home-card .card-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  z-index: 1;
}

/* Hide the back logo by making its container invisible */
.back-logo {
  display: none !important;
}

.home-card .card-back .services-list {
  margin-top: 0;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  max-height: none;
}

.home-card .card-back .services-list ul {
  padding-bottom: 0;
}

/* Engineering card specific styles */
.engineering-card {
  height: auto;
  min-height: 450px;
  display: flex;
  flex-direction: column;
}

.engineering-card .card-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.engineering-card .button {
  position: absolute;
  bottom: -1.25rem;
  left: 50%;
  transform: translateX(-50%);
}

/* Remove any rules that would've been inherited from old card styles */
.card:not(.home-card) .card-inner,
.card:not(.home-card):hover .card-inner {
  transform: none !important;
  box-shadow: none;
  transform-style: flat;
}

/* Ensure the button is positioned correctly on all cards */
.card-back .services-list {
  margin-top: 2rem;
}

.services-list {
  margin-top: 1rem;
}

/* Fix corner angle for all buttons to 45 degrees */
.button {
  font-family: var(--font-helvetica);
  position: relative;
  padding: 1rem 2rem;
  color: #fff;
  background-color: var(--color-orange);
  text-align: center;
  text-decoration: none;
  /* Replace the octagon shape with a simple rectangle with 45-degree corners */
  -webkit-clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  transition: background-color 0.3s ease;
  font-size: 1.5rem;
  letter-spacing: 2px;
  font-weight: 400;
}

.button:hover {
  background-color: #d94a24;
}

.work-samples {
  text-align: center;
  margin: 2rem 0;
  position: relative;
}

.work-samples.gradient::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 150%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 500px);
  z-index: 0;
}

@media (max-width: 480px) {
  .work-samples.gradient::before {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 240px);
  }
}

/* Responsive breakpoints for height */
@media (max-width: 768px) {
  .work-samples::before {
    height: 200%;
  }
}

@media (max-width: 480px) {
  .work-samples::before {
    height: 300%;
  }
  .skew-background {
    display: none;
  }
}

* {
  z-index: 2;
}

.work-samples .work-samples-slider {
  position: relative;
  z-index: 3;
}

h2.work-samples-title {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-orange);
  font-weight: lighter;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.slick-slide {
  margin: 0 27px;
}

.slick-list {
  margin: 0 -27px;
}

.logo-container {
  max-width: 450px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: -1.5rem; /* Negative margin to pull content up */
}

.logo-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* Maintain aspect ratio */
}

.back-logo {
  display: none !important;
}

.swiper {
  width: 100%;
  padding: 20px;
  margin: 0 auto;
  overflow: hidden;
}

.swiper-wrapper {
  display: flex;
  /* gap: 40px; */
}

.swiper-slide {
  flex: 0 0 auto;
  width: auto !important;
  height: 250px !important;
}

.swiper-container {
  overflow: visible !important;
}

.work-samples-header {
  margin: 4rem 0 2rem 0;
}

.swiper-pagination {
  position: static;
  margin-top: 20px;
  position: relative;
  bottom: auto;
  z-index: 11;
}

.swiper-pagination-bullet {
  margin: 0 5px;
  width: 10px;
  height: 10px;
  background: var(--color-dark-grey);
  opacity: 0.5;
}

.swiper-pagination-bullet-active {
  background: var(--color-orange);
  opacity: 1;
}

.grey-bg .swiper-pagination-bullet {
  background: var(--color-mid-grey);
}

.grey-bg .swiper-pagination-bullet-active {
  background: var(--color-orange);
}

.swiper-slide {
  height: 500px !important;
  transition: transform 0.3s ease;
}

.swiper-slide {
  height: 100%;
  border-radius: 5px;
  border: 5px solid var(--color-dark-grey);
  object-fit: contain;
}
.swiper-slide video {
  transform: scale(1.05);
}

.swiper-slide.video-container {
  overflow: hidden;
}

#video-slider {
  width: 100%;
  height: 100%;
  object-fit: cover;
  width: 880px;

}

@media (max-width: 480px) {
  .swiper-slide {
    height: 250px !important;
  }
}

/* Add padding for arrow navigation */
.grey-bg .work-samples .arrow-button {
  background-color: var(--color-orange);
}

/* .grey-bg .swiper-slide img,
.grey-bg .swiper-slide .video-container video {
  border: 5px solid var(--color-mid-grey);
} */

.video-container {
  border-radius: 4px;
  margin: 0 auto;
  position: relative;
  width: 100%;
  height: 100%;
  box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.4);
}

.video-container video {
  border-radius: 4px;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.play-button-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px; /* Ensure the play button wrapper has a fixed size */
  height: 100px; /* Ensure the play button wrapper has a fixed size */
  pointer-events: none;
}

.play-button-wrapper .play-gif {
  cursor: pointer;
  pointer-events: auto;
}

.play-button-wrapper .play-gif svg {
  width: 100%;
  height: 100%;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  opacity: 0.9;
}

.work-samples-header {
  display: flex;
  justify-content: center;
}


.line {
  display: block;
  white-space: nowrap;
}

/* Typing animation */
.typing {
  visibility: visible;
  animation: typing 1s steps(20, end);
  width: 100%;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

/* =============================================================================
   SCROLL-TRIGGERED TYPING ANIMATION STYLES
   ============================================================================= */

/* Base styles for scroll typing animation */
.scroll-typing-ready {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.scroll-typing-ready.scroll-typing-complete {
  opacity: 1;
}

.scroll-typing-ready br {
  display: none;
}

/* Character-level animation styles */
.scroll-char {
  display: inline-block;
  transform: translateY(10px);
  transition: opacity 0.1s ease, transform 0.1s ease;
  will-change: opacity, transform;
}

.scroll-char.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-char-space {
  width: 0.3em; /* Ensure spaces maintain proper width */
}

/* Line-level container for scroll typing */
.scroll-typing-line {
  overflow: visible;
  white-space: nowrap;
}

/* Smooth transitions for headline visibility */
.headlines .headline.scroll-typing-ready {
  /* opacity: 0; */
  transition: opacity 0.2s ease;
}

.headlines .headline.scroll-typing-ready.scroll-typing-complete {
  opacity: 1;
}

/* Performance optimizations */
.scroll-typing-ready,
.scroll-char {
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .scroll-char {
    transition: opacity 0.08s ease, transform 0.08s ease;
  }
  
  /* Reduce motion for users who prefer it */
  @media (prefers-reduced-motion: reduce) {
    .scroll-char {
      transition: opacity 0.3s ease;
      transform: none !important;
    }
    
    .scroll-char.visible {
      transform: none;
    }
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .scroll-char {
    transition: opacity 0.2s ease;
    transform: none;
  }
}

/* Ensure compatibility with existing typing animations */
.line.typing {
  animation: none; /* Disable old typing animation when scroll typing is active */
}

.scroll-typing-ready .line.typing {
  animation: none;
  visibility: visible;
  width: auto;
}

/* Fallback for non-JavaScript users */
.no-js .scroll-typing-ready {
  opacity: 1;
}

.no-js .scroll-char {
  opacity: 1;
  transform: none;
}

hr {
  border: none;
  border-top: 5px solid var(--color-forrest-green);
  margin: 2rem 0;
}

@media (max-width: 480px) {
  .arrow-text p {
    font-size: 6.6vw;
  }
}

@media (min-width: 500px) {
  .arrow-text p {
    font-size: 4vw;
    max-width: 50vw;
  }
}

/* desktop */
@media (min-width: 1200px) {
  .arrow-text p {
    font-size: 2.5rem;
    max-width: 50vw;
  }
}

#vimeo-container .video-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background-color: #000;
}
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Combine transforms for centering and GPU acceleration */
  transform: translate3d(-50%, -50%, 0); 
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  /* Default inactive state */
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero-video.is-active,
.hero-video.is-in-transition {
  visibility: visible;
  opacity: 1;
}

.carabineer-section img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.carabineer-section .carabineer {
  position: absolute;
  top: 0;
  left: -23rem; /* Updated to position the image much further left */
  width: auto;
  object-fit: cover;
  z-index: 1;
  height: 120%;
  margin-top: -3.5rem;
  overflow: visible;
  transform: translateY(-2rem);
  transition: transform 0.1s ease-out;
  will-change: transform;
}

.carabineer-section .container p {
  /* max-width: 250px; */
  margin: 0 0 0 auto;
  padding-left: 0rem;
}

/* Mobile adjustments for carabineer */
@media (max-width: 768px) {
  .carabineer-section .carabineer {
    left: -22rem;
    top: -10rem;
    opacity: 1;
    object-fit: contain;
    z-index: 1;
    transform: translateY(-1rem) scale(0.7);
    transition: transform 0.1s ease-out;
    height: 158%;
    margin-top: -1rem;
    width: 500px;
    max-width: none;
  }
  
  /* Adjust text positioning for mobile */
  .carabineer-section .container {
    position: relative;
    z-index: 2;
    padding-left: 3rem; /* More left padding only */
  }
  
  .carabineer-section .container p {
    margin: 0 0 0 auto; /* Keep original text margins */
    text-align: right; /* Keep text aligned to the right */
    max-width: 200px;
  }
  
  .carabineer-section .container h2 {
    margin-right: 0; /* Ensure headline stays right-aligned */
  }
}

/* Services Icons Grid Styles */
.services-section {
  padding: 6rem 0;
}

.services-icons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem 0.5rem;
  margin: 4rem 0;
}

.service-icon-item {
  text-align: center;
  transition: transform 0.3s ease;
}

.service-icon-item:hover {
  transform: translateY(-10px);
}

.service-icon-item a {
  text-decoration: none;
  color: #fff;
  display: block;
}

.service-icon-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.service-icon-regular,
.service-icon-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.service-icon-hover {
  opacity: 0;
}

.service-icon-item:hover .service-icon-regular {
  opacity: 0;
}

.service-icon-item:hover .service-icon-hover {
  opacity: 1;
}

/* Mobile styles for services icons */
@media (max-width: 768px) {
  .services-icons-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0rem;
    margin: 0;
  }
  
  .service-icon-container {
    max-width: 200px;
    width: 100%;
  }
}

/* Mobile specific adjustments for card ordering */
@media (max-width: 767px) {
  /* Set the explicit order for all cards to maintain their original sequence */
  .cards .home-card:nth-child(1) {
    order: 1; /* Comfort Dental stays first */
  }
  
  .cards .home-card:nth-child(2) {
    order: 2; /* Bandimere stays second */
  }
  
  .cards .home-card:nth-child(3) {
    order: 3; /* Dish stays third */
  }
  
  /* Swap these two cards */
  .cards .home-card:nth-child(4) {
    order: 5; /* Move Red Robin to position 5 */
  }
  
  .cards .home-card:nth-child(5) {
    order: 4; /* Move O'Tooles to position 4 */
  }
  
  .cards .home-card:nth-child(6) {
    order: 6; /* ASEC stays sixth */
  }
  
  .cards .home-card:nth-child(7) {
    order: 7; /* ExtraHop stays seventh */
  }
  
  .cards .home-card:nth-child(8) {
    order: 8; /* Hero stays eighth */
  }
  
  .cards .home-card:nth-child(9) {
    order: 9; /* Gates stays ninth */
  }
}

/* Fix horizontal overflow on mobile */
html, body {
  position: relative;
  width: 100%;
}

/* Make sure arrow headlines don't cause horizontal scrolling */
@media (max-width: 768px) {
  .arrow-headline {
    max-width: 100%;
    overflow: visible; /* Change from hidden to visible to prevent text cutoff */
  }
  
  .arrow-headline h2 {
    max-width: 80%;
    word-wrap: break-word;
    white-space: normal;
    font-size: 1.8rem;
    overflow: visible; /* Add this to prevent text cutoff */
  }
  
  /* Make the container have overflow:hidden to capture any text overflow */
  .skew .container {
    overflow: hidden;
    width: 100%;
  }
}

/* =============================================================================
   CONTACT PAGE STYLES - CLEAN SINGLE COLUMN LAYOUT
   ============================================================================= */

.contact-page-wrapper {
  background: #fff;
  padding: 120px 0 3rem;
  min-height: 100vh;
}

.contact-page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.contact-page-header h1 {
  font-family: var(--font-built-tiling);
  color: var(--color-orange);
  font-size: 3rem;
  margin-bottom: 1rem;
}

.contact-page-header p {
  font-size: 1.2rem;
  color: var(--color-dark-grey);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Office Locations - Simple List */
.office-locations {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 3rem 0;
  text-align: center;
}

@media (max-width: 768px) {
  .office-locations {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.office-location h3 {
  color: var(--color-orange);
  font-family: var(--font-built-tiling);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.office-location p {
  color: var(--color-dark-grey);
  line-height: 1.8;
  margin: 0;
}

.office-location strong {
  color: var(--color-dark-grey);
  font-weight: 700;
}

/* Social Media Links - Clean Icons */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0 3rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--color-dark-grey);
  color: #fff;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.5rem;
}

.social-link:hover {
  background: var(--color-orange);
  transform: translateY(-2px);
}

/* Contact Form - No Card Styling */
.contact-form {
  max-width: 600px;
  margin: 2rem auto;
  padding: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.8rem;
  font-weight: 600;
  color: var(--color-dark-grey);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  font-family: var(--font-helvetica);
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-orange);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-group.recaptcha {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
}

.contact-button {
  width: 100%;
  padding: 1.2rem 2rem;
  background: var(--color-orange);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: var(--font-helvetica);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-button:hover {
  background: #d94a24;
  transform: translateY(-1px);
}

/* Maps Section - Full Width */
.maps-section {
  margin-top: 4rem;
}

.maps-section h2 {
  color: var(--color-dark-grey);
  font-family: var(--font-built-tiling);
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  text-transform: uppercase;
}

.maps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.arrow-headline, .arrow-headline h2 {
  margin-top: 0rem;
}

@media (max-width: 768px) {
  .maps-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.map-location h4 {
  color: var(--color-dark-grey);
  font-family: var(--font-built-tiling);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  text-align: center;
  text-transform: uppercase;
}

.map-location iframe {
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.map-location iframe:hover {
  border-color: var(--color-orange);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Content wrapper for compass and multitool sections */
.skew-compass .content-wrapper,
.skew-multitool .content-wrapper {
  max-width: 600px;
}

@media (max-width: 1199px) {
  .skew-compass .container,
  .skew-multitool .container {
    display: block;
    padding-left: 2rem;
    padding-right: 2rem;
  }
  
  .skew-compass .skew-background,
  .skew-multitool .skew-background {
    display: none;
  }
}