/*
Theme Name: TBX logistics
*/

/* === Base === */

html {
  scroll-behavior: smooth;
}

@font-face {
  font-family: "CustomFont";
  src: url("fonts/MarkCompPro.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CustomFont";
  src: url("fonts/MarkCompProBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.arrow-hidden {
  clip-path: inset(0 100% 0 0);
  opacity: 0;
  transform: translateX(-10px);
  display: inline-block;
  transition:
    clip-path 0.5s ease,
    opacity 0.5s ease,
    transform 0.5s ease;
}

.link-with-arrow:hover .arrow-hidden {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  transform: translateX(0);
  animation:
    slideReveal 0.5s forwards ease-out,
    shake 0.3s 0.5s infinite;
}

@keyframes slideReveal {
  0% {
    clip-path: inset(0 100% 0 0);
    transform: translateX(-10px);
    opacity: 0;
  }
  80% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    clip-path: inset(0 0 0 0);
    transform: translateX(-2px);
  }
}

[data-collab-text] {
  position: relative;
  overflow: hidden;
  background-color: black !important; /* Default background for all tabs */
  transition: background-color 0.3s ease;
}

.link-with-arrow > span.arrow-hidden {
  transition: transform 0.3s ease;
}
.link-with-arrow:hover > span.arrow-hidden {
  transform: translateX(0.25rem);
}

#mainImageImg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%; /* 20% taller than container */
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

[data-collab-text].active-tan {
  background-color: #ff7f7f !important; /* Tan background for active tab only */
}

.progress-fill-vertical {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: #ff0000; /* red fill */
  z-index: 10;
  transition-property: height;
  transition-timing-function: linear;
  transition-duration: 5s;
  pointer-events: none;
}

[data-collab-text] > span {
  position: relative;

  z-index: 20;
  color: white; /* Ensure text color contrasts */
}
/* Apply your custom font globally */
body {
  margin: 0;
  background: #000;
  font-family: "CustomFont", "Segoe UI", Roboto, sans-serif;
  color: #fff;
}

.curtain-container {
  display: inline-block;
  overflow: hidden;
  height: 1.2em; /* adjust to your line height */
  vertical-align: bottom;
}

.curtain-span {
  display: inline-block;
  transform: translateY(100%);
}

/* Disable background-attachment fixed on mobile for better UX */
@media (max-width: 768px) {
  .parallax-bg {
    background-attachment: scroll;
  }
}

.tbx-hero-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  will-change: transform;
  /* Optional for smoother GPU-accelerated scrolling */
  transform: translateZ(0);
}

/* Disable on mobile for performance & compatibility */
@media (max-width: 768px) {
  .tbx-hero-bg {
    background-attachment: scroll;
  }
}

/* === Logo === */
.logo img {
  height: 36px;
  width: auto;
  display: block;
}

@layer components {
  .tbx-title {
    font-weight: 700;
    font-size: clamp(14px, 4.8vw, 35px);
    line-height: 1.2;
  }

  .tbx-title-light {
    font-weight: 400;
    font-size: clamp(14px, 4vw, 35px);
    line-height: 1.3;
  }
  .tbx-title-light-lg {
    font-weight: 400;
    font-size: clamp(22px, 2.4vw, 50px);
    line-height: 1.3;
  }

  .tbx-subtitle {
    font-weight: 700;
    font-size: clamp(10px, 4vw, 25px);
    line-height: 1.3;
  }

  .tbx-subtitle-form {
    font-weight: 400;
    font-size: clamp(10px, 3vw, 20px);
    line-height: 1.3;
  }

  .tbx-body {
    font-weight: 400;
    font-size: clamp(10px, 3.5vw, 20px);
    line-height: 1.3;
    /* $26/16$ from Figma */
  }

  .tbx-hero-title {
    font-weight: 700;
    font-size: clamp(22px, 7vw, 72px);
    line-height: 1.1; /* bigger line spacing */
    letter-spacing: 0.035em; /* wider tracking */
  }

  .tbx-title-lg {
    font-weight: 700;
    font-size: clamp(1px, 2vw, 36px);
    line-height: 1.2;
  }

  .tbx-subtitle-lg {
    font-weight: 700;
    font-size: clamp(1px, 1.2vw, 24px);
    line-height: 1.3;
  }

  .tbx-subtitle-lg-form {
    font-weight: 400;
    font-size: clamp(1px, 1.2vw, 24px);
    line-height: 1.5;
  }

  .tbx-body-lg {
    font-weight: 400;
    font-size: clamp(1px, 1.2vw, 24px);
    line-height: 1.5; /* $26/16$ */
  }

  .tbx-hero-title-lg {
    font-weight: 700;
    font-size: clamp(22px, 4vw, 72px);
    line-height: 1.1;
    letter-spacing: 0.035em;
  }

  .tbx-tab-text-lg {
    font-weight: 700;
    font-size: clamp(1px, 1.5vw, 32px);
    line-height: 1.2;
  }
}

/* Full-screen black loader overlay */
#tbx-page-loader.tbx-page-loader {
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  background-color: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0; /* will be animated in JS */
  transform-origin: bottom center; /* for curtain going down */
  transform: scaleY(1); /* full height initially */
}

/* Centered content */
.tbx-page-loader-inner {
  text-align: center;
  color: #ffffff;
  opacity: 0; /* will fade in with JS */
}

/* Logo */
.tbx-loader-logo {
  max-width: 160px;
  height: auto;
  margin-bottom: 12px;
}

/* Percentage text */
.tbx-loader-percent {
  font-size: 18px;
  letter-spacing: 0.08em;
  font-weight: 500;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

main.site-main {
  opacity: 0;
  transition: opacity 0.35s ease;
}

body.tbx-loading {
  overflow: hidden;
}

body.tbx-loading > *:not(#tbx-page-loader) {
  pointer-events: none;
  user-select: none;
}

.curtain-container {
  overflow: hidden;
  display: inline-block;
  height: 1.2em;
  vertical-align: bottom;
}

.word {
  display: inline-block;
  white-space: nowrap;
}

.char-container {
  display: inline-block;
}
.char {
  display: inline-block;
  white-space: nowrap;
}

.horizontal-wrapper {
  height: 100vh;
  display: flex;
  align-items: center;
  background-color: #222;
  color: white;
  font-family: Arial, sans-serif;
  padding-left: 1rem;
  box-sizing: border-box;
}

@keyframes zoomIn {
  0% {
    opacity: 0;
    transform: scale(0.75);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-zoomIn {
  animation: zoomIn 0.6s forwards;
}

/* Optional: base category styles */
.category {
  opacity: 0.3;
  transition: opacity 0.5s ease;
}
.category.active {
  opacity: 1;
}

.thermo__image__text {
  color: white !important;
}

#ifs-logistics,
#ifs-logistics .curtain-container {
  height: auto !important;
  min-height: 3rem; /* enough height for 2 lines or adjust */
  line-height: 1;
  overflow: visible !important;
  display: block; /* make sure spans behave like blocks/inline-block */
}
