@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');

:root {
  --color-dark: #111111; /* Matching Oblo's very dark feel */
  --color-blush: #F5D0D6;
  --color-ivory: #FDFBF7;
  --color-accent: #bf1e2e; /* Slightly brighter red for oblo accent */
  
  --font-main: 'pandora', 'Playfair Display', serif;
  --font-body: 'Montserrat', sans-serif;
}

/* Hide scrollbar site-wide */
::-webkit-scrollbar {
  display: none;
}

html {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

body, html {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background: var(--color-dark);
  color: var(--color-ivory);
  overflow-x: clip;
  scroll-behavior: smooth;
  user-select: none; /* Disable text selection */
  -webkit-user-select: none;
  -webkit-touch-callout: none; /* Disable long-press context menu on mobile */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  font-weight: bold;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
}

.click-cursor {
  position: fixed;
  width: 90px;
  height: 90px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10000;
}
.click-cursor.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 768px) {
  .click-cursor {
    display: none !important;
  }
}

/* ------------------- CONTACT FORM ------------------- */
.contact-section {
  padding: 120px 10%;
  background: #0d0d0d;
}

.contact-container {
  max-width: 900px;
  margin: 0 auto;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-top: 60px;
}

.form-group {
  position: relative;
}

.form-group.full-width {
  grid-column: span 2;
}

.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 18px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}

.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--color-accent);
}

.contact-form textarea {
  height: 120px;
  resize: none;
}

.submit-btn {
  margin-top: 40px;
  padding: 20px 50px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  width: fit-content;
}

.submit-btn:hover {
  background: #fff;
  color: #000;
  transform: translateY(-5px);
}

/* ------------------- KPI TILES & ABOUT ------------------- */
.kpi-section {
  padding: 80px 10%;
  background: var(--color-dark);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.kpi-tile {
  background: #151515;
  padding: 50px 30px;
  border: 1px solid rgba(255,255,255,0.05);
  text-align: center;
  transition: all 0.4s ease;
}

.kpi-tile:hover {
  background: #1a1a1a;
  border-color: var(--color-accent);
  transform: translateY(-10px);
}

.kpi-icon {
  margin-bottom: 25px;
  color: var(--color-accent);
}

.kpi-title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 15px;
}

.kpi-content {
  font-family: var(--font-main);
  font-size: 1.4rem;
  color: #fff;
}

.map-section {
  width: 100%;
  height: 450px;
  background: #111;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.map-section iframe {
  width: 100%;
  height: 100%;
  filter: grayscale(1) invert(1) contrast(1.2); /* Cinematic dark map */
  opacity: 0.7;
}

/* ------------------- FOOTER ------------------- */
.site-footer {
  padding: 80px 10% 40px;
  background: #000;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-main);
  font-size: 2.5rem;
  letter-spacing: 4px;
  margin-bottom: 40px;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-nav a {
  color: #888;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: color 0.3s;
}

.footer-nav a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 40px;
  color: #444;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .contact-form { grid-template-columns: 1fr; }
  .form-group.full-width { grid-column: span 1; }
  .kpi-grid { grid-template-columns: 1fr; }
  .footer-nav { flex-direction: column; gap: 20px; }
}

/* ------------------- HEADER & Hamburger MENU ------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 30px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-sizing: border-box;
  pointer-events: none; /* Let clicks pass through except on logo/menu */
}

.logo {
  font-family: var(--font-main);
  font-size: 1.8rem;
  color: #fff;
  letter-spacing: 2px;
  text-transform: uppercase;
  pointer-events: auto;
}
.logo span {
  color: var(--color-accent);
}

.menu-btn {
  width: 35px;
  height: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 1001;
  pointer-events: auto;
}

.menu-btn .line {
  width: 100%;
  height: 2px;
  background-color: #fff;
  transition: transform 0.4s ease, opacity 0.4s ease;
  transform-origin: center right;
}

.menu-btn.open .line:nth-child(1) {
  transform: translateY(-2px) rotate(-45deg);
  width: 35px;
}
.menu-btn.open .line:nth-child(2) {
  transform: translateY(2px) rotate(45deg);
  width: 35px;
}

/* ------------------- CINEMATIC LOADER ------------------- */
.loader {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: var(--color-dark);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
  overflow: hidden;
}
.loader.hide {
  transform: translateY(-110vh);
  opacity: 0;
  visibility: hidden;
}
.loader-center {
  position: relative;
  z-index: 2;
  padding: 0 40px;
}
.loader-subquote {
  font-family: var(--font-main);
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--color-ivory);
  opacity: 0.9;
  text-align: center;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.roller {
  height: 4rem; /* Consistent height on desktop */
  overflow: hidden;
  position: relative;
  display: inline-block;
  vertical-align: middle;
  contain: paint;
}
.roller-inner {
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.roller-inner span {
  height: 4rem;
  line-height: 4rem;
  display: block;
  color: var(--color-accent);
  font-style: italic;
  font-weight: 700;
  flex-shrink: 0;
  opacity: 0; /* Completely hidden when not active */
  transition: opacity 0.2s ease;
}
.roller-inner span.active {
  opacity: 1;
}
.loader-bottom {
  position: absolute;
  bottom: 60px;
  left: 60px;
  width: calc(100% - 120px);
  z-index: 2;
}
.loader-counter {
  font-family: var(--font-body);
  font-size: clamp(5rem, 12vw, 10rem);
  font-weight: 400;
  color: var(--color-ivory);
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -2px;
}
.loader-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 15px;
  position: relative;
}
.loader-line-progress {
  position: absolute;
  top: 0; left: 0; width: 0%; height: 100%;
  background: var(--color-accent);
}
.loader-status {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ------------------- FULLSCREEN MENU OVERLAY ------------------- */
.fullscreen-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(17, 17, 17, 0.98);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
}
.fullscreen-menu.active {
  opacity: 1; visibility: visible;
}
.fullscreen-menu nav {
  display: flex; flex-direction: column; text-align: center; gap: 30px;
}
.menu-link {
  font-family: var(--font-main); font-size: 4rem; color: #fff;
  text-decoration: none; transition: color 0.3s ease;
}
.menu-link:hover { color: var(--color-accent); }

/* ------------------- SLIDER (PREMIUM CUT) ------------------- */

.services-slider {
  position: relative;
  width: 100%;
  height: 100vh; /* Premium state-controlled transition */
  background: #000;
}

.slider-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.05);
  transition: opacity 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              visibility 0.85s, 
              transform 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
  cursor: pointer;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 2;
}

.slide-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
}
/* Gives an overall 30% overlay directly over the image */
.slide-bg::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.slide-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 30%; /* Keeps faces/center vertically stable regardless of device orientation */
  filter: url('#liquid-glitch');
  transform: scale(1.1) translateX(5%);
  transition: transform 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.4s ease;
}

@media (min-width: 769px) {
  .slide-bg img.align-center-desktop {
    object-position: center center;
  }
}

.slide.active .slide-bg img {
  transform: scale(1.02) translateX(0);
}

.slide-content {
  position: absolute;
  top: 50%;
  left: 60px;
  transform: translateY(-50%);
  z-index: 10;
}

.text-mask {
  display: block;
  overflow: hidden;
  line-height: 1.1;
  padding-bottom: 5px; /* give some room for descenders */
}

.text-mask span {
  display: block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
}

.slide-subtitle {
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 5px;
  display: block;
}

.slide-title {
  color: #fff;
  font-family: var(--font-main);
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 700;
  margin: 0;
  line-height: 1;
  text-transform: capitalize;
}

/* Animations for Active Slide Text */
.slide.active .text-mask span {
  transform: translateY(0);
  opacity: 1;
}

.slide.active .slide-subtitle .text-mask span {
  transition-delay: 0.1s;
}

.slide.active .slide-title .text-mask span {
  transition-delay: 0.2s;
}

/* Glitch applied via JS during slide change (Image only) */
.slide.glitch-anim .slide-bg img {
  filter: url('#liquid-glitch') saturate(1.2); /* Enhance the water distortion softly */
}

/* Static Elements on top of slider */

.slider-arrows {
  position: absolute;
  right: 60px;
  bottom: 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 10;
}
.arrow-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
  padding: 0;
}
.arrow-btn:hover {
  color: var(--color-accent);
  transform: scale(1.1);
}

/* ------------------- OTHER SECTIONS ------------------- */
.page-content {
  background: var(--color-dark);
  position: relative;
  z-index: 5;
}

.hero {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 20px;
  background: #151515;
}
.hero h1 { font-size: 3rem; color: #fff; }
.hero h2 { color: var(--color-accent); font-family: var(--font-body); font-weight: 300; letter-spacing: 2px; margin-top: 10px;}

.cta {
  margin-top: 30px; padding: 15px 35px; background: var(--color-accent); color: #fff;
  border: none; border-radius: 4px; font-family: var(--font-body); font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px; cursor: pointer; transition: 0.3s;
}
.cta:hover { background: #fff; color: var(--color-dark); }



.timeline-section {
  padding: 100px 5%;
  background: var(--color-dark);
  text-align: center;
  position: relative;
}
.section-title {
  color: #fff;
  font-family: var(--font-main);
  font-size: 3.5rem;
  margin-bottom: 20px;
}
.section-subtitle {
  color: #aaa;
  font-family: var(--font-body);
  font-size: 1.1rem;
  max-width: 650px;
  margin: 0 auto 80px auto;
  line-height: 1.6;
}
.timeline-wrap {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}
.timeline-wrap::before {
  content: '';
  position: absolute;
  width: 2px;
  background: rgba(255,255,255,0.1);
  top: 0; bottom: 0; left: 50%;
  transform: translateX(-50%);
}
.timeline-progress {
  position: absolute;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-accent) 0%, #ff5266 50%, var(--color-accent) 100%);
  background-size: 100% 150px;
  animation: progress-sweep 1s infinite linear;
  top: 0; left: 50%;
  transform: translateX(-50%);
  height: 0%; 
  z-index: 1;
  box-shadow: 0 0 10px rgba(191, 30, 46, 0.6);
}

@keyframes progress-sweep {
  0% { background-position: 0 -150px; }
  100% { background-position: 0 150px; }
}
.timeline-node {
  padding: 10px 40px;
  position: relative;
  background: inherit;
  width: 50%;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
  z-index: 5; /* Forces the dots to render completely over the loading beam */
}
.timeline-node.left { left: 0; text-align: right; }
.timeline-node.right { left: 50%; text-align: left; }

.timeline-node::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--color-dark);
  border: 4px solid rgba(255,255,255,0.2);
  top: 15px;
  border-radius: 50%;
  z-index: 2;
  transition: border-color 0.4s ease, background 0.4s ease;
}
.timeline-node.left::after {
  right: 0;
  transform: translateX(50%);
}
.timeline-node.right::after {
  left: 0;
  transform: translateX(-50%);
}
/* Dots 'light up' exactly as progress passes them or when active */
.timeline-node.in-view::after {
  border-color: var(--color-accent);
  background: var(--color-accent);
}
.timeline-date {
  font-family: var(--font-body);
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 2px;
  margin-bottom: 20px;
}
.timeline-img {
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 20px;
}
.timeline-img img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.timeline-node:hover .timeline-img img {
  transform: scale(1.05);
}
.timeline-content h3 {
  color: #fff;
  font-family: var(--font-main);
  font-size: 2rem;
  margin: 0;
}

/* Animations Trigger Layer */
.timeline-node.in-view {
  opacity: 1;
  transform: translateY(0);
}



/* ------------------- HORIZONTAL SCROLL CLIENTS ------------------- */
.clients-section {
  position: relative;
  height: 500vh; /* Adjust based on content */
  background: var(--color-dark);
}

.clients-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 60px;
  margin-bottom: 30px;
  max-width: 100%;
  box-sizing: border-box;
}

.header-text {
  text-align: left;
}

.header-text .section-title {
  margin-bottom: 10px;
  text-align: left;
}

.header-text .section-subtitle {
  margin: 0;
  text-align: left;
}

.scroll-hint {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.scroll-hint svg {
  animation: arrow-slide 2s infinite;
}

/* ------------------- BENTO PORTFOLIO GRID ------------------- */
.portfolio-main-section {
  padding: 150px 5% 100px;
  background: var(--color-dark);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 250px;
  gap: 20px;
}

.bento-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  opacity: 1; /* Always bright as requested */
  transform: scale(1);
  transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}

.bento-item:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 2;
}

.bento-item.active {
  opacity: 1;
  transform: scale(1);
}

.bento-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.bento-item:hover img {
  transform: scale(1.08);
}

.bento-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.bento-title {
  font-family: var(--font-main);
  font-size: 1.5rem;
  color: #fff;
  margin: 0;
}

.bento-category {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 5px;
}

/* Bento Spans for Portrait/Square Layout (3:4 and 9:16 focus) */
.bento-item.l { grid-column: span 2; grid-row: span 3; } /* Large Portrait */
.bento-item.t { grid-column: span 1; grid-row: span 3; } /* Tall 9:16 style */
.bento-item.w { grid-column: span 2; grid-row: span 2; } /* Wide but slightly square-ish */
.bento-item.s { grid-column: span 1; grid-row: span 2; } /* Small Portrait */

@media (max-width: 992px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 300px; }
  .bento-item.l, .bento-item.t, .bento-item.w, .bento-item.s { grid-column: span 1; grid-row: span 1; }
  .bento-item.l, .bento-item.w { grid-column: span 2; }
}

@media (max-width: 600px) {
  .bento-grid { grid-template-columns: 1fr; grid-auto-rows: 450px; }
  .bento-item.l, .bento-item.t, .bento-item.w, .bento-item.s { grid-column: span 1; grid-row: span 1; }
}

@keyframes arrow-slide {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

.clients-scroll-container {
  width: 100%;
  overflow: visible; /* Let JS handle the positioning */
  padding: 20px 0;
}

.clients-scroll-track {
  display: flex;
  gap: 40px;
  width: max-content;
  padding: 0 60px;
  transition: transform 0.1s ease-out; /* Smooth follow */
}

.client-card {
  width: 300px;
  height: 450px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: none; /* Hide real cursor to show custom one */
  flex-shrink: 0;
  transform: scale(0.95);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  background: #1a1a1a;
}

.client-card:hover {
  transform: scale(1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.client-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.client-card:hover img {
  transform: scale(1.05);
}

.client-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px 20px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
  text-align: left;
  transform: translateY(10px);
  transition: transform 0.4s ease;
}

.client-card:hover .client-card-overlay {
  transform: translateY(0);
}

.client-card-name {
  color: #fff;
  font-family: var(--font-main);
  font-size: 1.8rem;
  margin: 0 0 5px 0;
}

.client-card-service {
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

/* ------------------- IMAGE PROTECTION ------------------- */
img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}
a img { pointer-events: auto; }
.client-card img,
.portfolio-gallery img,
.slide-bg img,
.service-hero img,
.portfolio-hero img { pointer-events: none; }

/* ------------------- SUCCESS POPUP MODAL ------------------- */
#formSuccessModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

#formSuccessModal.active {
  display: flex;
  animation: fadeInOverlay 0.35s ease forwards;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.success-modal-card {
  background: #111;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 60px 50px 50px;
  max-width: 520px;
  width: 90%;
  text-align: center;
  position: relative;
  animation: slideUpCard 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpCard {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.success-modal-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
}

.success-modal-icon svg {
  width: 34px;
  height: 34px;
  stroke: var(--color-accent);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success-modal-title {
  font-family: var(--font-main);
  font-size: 1.8rem;
  color: #fff;
  margin: 0 0 16px;
  letter-spacing: 2px;
  font-weight: 400;
}

.success-modal-msg {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
  margin: 0 0 36px;
  letter-spacing: 0.5px;
}

.success-modal-close {
  display: inline-block;
  padding: 14px 40px;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.success-modal-close:hover {
  background: #fff;
  color: #000;
  transform: translateY(-3px);
}

/* ------------------- CONTACT FORM CONTAINER ------------------- */
.contact-form-container {
  max-width: 800px;
  width: calc(100% - 40px);
  margin: 40px auto 0;
  padding: 50px 40px;
  background: rgba(26, 26, 26, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-sizing: border-box;
  text-align: left;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ------------------- ZOHO FORM OVERRIDE ------------------- */
/* Override Zoho form styles to match site dark aesthetic */
#crmWebToEntityForm.zcwf_lblLeft {
  background-color: transparent !important;
  color: var(--color-ivory) !important;
  max-width: 100% !important;
  padding: 0 !important;
  font-family: var(--font-body) !important;
}

#crmWebToEntityForm .zcwf_row {
  margin: 20px 0 !important;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

#crmWebToEntityForm .zcwf_col_lab {
  width: 220px !important;
  min-width: 220px;
  color: rgba(255,255,255,0.5) !important;
  font-family: var(--font-body) !important;
  font-size: 0.75rem !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  padding-top: 14px !important;
  margin-right: 0 !important;
  float: none !important;
}

#crmWebToEntityForm .zcwf_col_lab label {
  color: rgba(255,255,255,0.5) !important;
}

#crmWebToEntityForm .zcwf_col_fld {
  flex: 1 !important;
  float: none !important;
  width: auto !important;
  padding: 0 !important;
  position: relative !important;
}

#crmWebToEntityForm .zcwf_col_fld input[type=text],
#crmWebToEntityForm .zcwf_col_fld input[type=password],
#crmWebToEntityForm .zcwf_col_fld textarea {
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.2) !important;
  border-radius: 0 !important;
  color: #fff !important;
  font-family: var(--font-body) !important;
  font-size: 1rem !important;
  padding: 14px 0 !important;
  outline: none !important;
  float: none !important;
  transition: border-color 0.3s ease !important;
  box-sizing: border-box !important;
}

#crmWebToEntityForm .zcwf_col_fld input[type=text]:focus,
#crmWebToEntityForm .zcwf_col_fld input[type=password]:focus,
#crmWebToEntityForm .zcwf_col_fld textarea:focus {
  border-bottom-color: var(--color-accent) !important;
}

#crmWebToEntityForm .zcwf_col_fld_slt {
  width: 100% !important;
  background: #1a1a1a !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  border-radius: 4px !important;
  color: #fff !important;
  font-family: var(--font-body) !important;
  font-size: 0.95rem !important;
  padding: 12px 10px !important;
  float: none !important;
  outline: none !important;
  transition: border-color 0.3s ease !important;
  box-sizing: border-box !important;
}

#crmWebToEntityForm .zcwf_col_fld_slt:focus {
  border-color: var(--color-accent) !important;
}

#crmWebToEntityForm .zcwf_col_fld_slt option {
  background: #1a1a1a;
  color: #fff;
}

#crmWebToEntityForm .formsubmit.zcwf_button {
  margin-top: 30px !important;
  padding: 18px 50px !important;
  background: var(--color-accent) !important;
  color: #fff !important;
  border: none !important;
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 2px !important;
  cursor: pointer !important;
  border-radius: 0 !important;
  font-size: 0.85rem !important;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

#crmWebToEntityForm .formsubmit.zcwf_button:hover {
  background: #fff !important;
  color: #000 !important;
  transform: translateY(-5px) !important;
}

#crmWebToEntityForm .zcwf_button[name=reset] {
  margin-top: 30px !important;
  padding: 18px 30px !important;
  background: transparent !important;
  color: rgba(255,255,255,0.4) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  font-family: var(--font-body) !important;
  font-size: 0.85rem !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
}

#crmWebToEntityForm .zcwf_button[name=reset]:hover {
  border-color: var(--color-accent) !important;
  color: var(--color-accent) !important;
}

/* Mandatory asterisk */
#crmWebToEntityForm [style*='color:red'] {
  color: var(--color-accent) !important;
}

/* ------------------- ZOHO CALENDAR NAV CSS ------------------- */
/* These are required for the month/year navigation arrows to render */
.tempCalDiv {
  background: #1a1a1a !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  color: #fff !important;
  border-top: 0 !important;
  position: absolute !important;
  z-index: 10000 !important;
  top: 100% !important;
  left: 0 !important;
  display: none;
  -webkit-box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

#calenDiv {
  padding: 10px;
  display: table;
  width: 210px;
  background: #1a1a1a !important;
  color: #ccc !important;
  font-family: var(--font-body), helvetica, sans-serif;
}

/* Calendar nav buttons (month/year arrows) */
.calNav {
  width: 20px;
  height: 15px;
  display: inline-block;
  position: relative;
  top: 4px;
  cursor: pointer;
}

#calenDiv .calNav { width: 15px; }
#calenDiv .yearNavLft { right: 10px; }
#calenDiv .yearNavRgt { left: 10px; }
#calenDiv .dLft { right: 5px; }
#calenDiv .dRgt { left: 5px; }

.dLft { right: 10px; opacity: 0.8; }
.dRgt { left: 10px; opacity: 0.8; }
.yearNavLft { right: 15px; }
.yearNavRgt { left: 15px; opacity: 0.8; }

.dIB { display: inline-block; }
.vaM { vertical-align: middle; }
.mLMinus2 { margin-left: -2px; }
.mRMinus2 { margin-right: -2px; }

/* The arrow icons — drawn with border trick */
.arrow {
  border: solid rgba(255,255,255,0.7);
  border-width: 0 2px 2px 0;
  display: inline-block;
  height: 6px;
  width: 6px;
}
#calenDiv .right {
  transform: rotate(-45deg);
  -webkit-transform: rotate(-45deg);
}
#calenDiv .left {
  transform: rotate(135deg);
  -webkit-transform: rotate(135deg);
}

/* Calendar header and month label */
.aligncenter { text-align: center; }
#calenDiv .sCalMon {
  cursor: default;
  display: inline-block;
  color: rgba(255,255,255,0.9) !important;
  width: 120px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* Calendar table */
#calenDiv table.calDay {
  border-spacing: 6px;
  margin-top: 0;
}
#calenDiv table.calDay td {
  padding: 3px 4px;
  font-size: 11px;
  color: #ccc !important;
}
#calenDiv table.calDay th {
  padding: 0 3px;
  font-size: 11px;
  color: #888 !important;
  width: 22px;
  cursor: default;
  border-radius: 3px;
  text-align: center;
  font-weight: normal;
}
#calenDiv #weekDays {
  margin-top: 10px;
  margin-bottom: 5px;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  border-spacing: 5px;
  margin-left: 0;
  color: rgba(255,255,255,0.5) !important;
}

table.calDay { color: #ccc !important; margin-left: -10px; border-spacing: 12px; }
table.calDay td, table.calDay th {
  font-size: 11px;
  cursor: default;
  border-radius: 3px;
  text-align: center;
  padding: 3px 5px;
}
table.calDay td:hover { background-color: rgba(255,255,255,0.1); }
table.calDay td.sel, table.calDay td.sel:hover {
  background: var(--color-accent) !important;
  color: #fff !important;
  border-radius: 3px;
}
table.calDay td.noNum, table.calDay td.lt-gray { color: rgba(255,255,255,0.25) !important; }

#calenDiv #calBtns {
  width: 183px;
  margin-left: 10px;
  border-top: 0;
  font-size: 11px;
  padding: 3px 0 12px !important;
}
#calBtns a { color: var(--color-accent) !important; text-decoration: none; font-size: 12px; }

/* ------------------- CUSTOM FUNCTION TYPE CHECKBOXES ------------------- */
.function-type-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 4px 0;
}

.function-type-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  transition: background 0.25s ease, border-color 0.25s ease;
  font-family: var(--font-body) !important;
  font-size: 0.9rem !important;
  color: rgba(255,255,255,0.75) !important;
  letter-spacing: 0.5px;
  user-select: none;
}

.function-type-group label:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.25);
  color: #fff !important;
}

/* Hide the native checkbox */
.function-type-group input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
  padding: 0 !important;
}

.function-type-group input[type=checkbox]:checked {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* Checkmark via pseudo-element */
.function-type-group input[type=checkbox]::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.function-type-group input[type=checkbox]:checked::after {
  opacity: 1;
}

/* Highlight the whole label when checked */
.function-type-group input[type=checkbox]:checked + span {
  color: #fff !important;
}
.function-type-group label:has(input:checked) {
  background: rgba(191,30,46,0.12);
  border-color: rgba(191,30,46,0.5);
  color: #fff !important;
}

/* The hidden select that Zoho reads */
.function-type-hidden-select {
  display: none !important;
}

@media (max-width: 600px) {
  .function-type-group {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  #crmWebToEntityForm .zcwf_row {
    flex-direction: column;
    gap: 5px;
  }
  #crmWebToEntityForm .zcwf_col_lab {
    width: 100% !important;
    min-width: unset !important;
    padding-top: 0 !important;
  }
  .contact-form-container {
    width: calc(100% - 30px);
    padding: 30px 20px;
    background: rgba(26, 26, 26, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin: 20px auto 0;
  }
}

/* ------------------- MOBILE: HIDE 16:9 GALLERY IMAGES ------------------- */
/* Hide 16:9 images from gallery on mobile (client-portfolio & service pages) */
@media (max-width: 767px) {
  /* In the default column layout, odd images are 9:16 */
  .portfolio-gallery img[data-aspect="16-9"],
  .portfolio-gallery img.landscape-16-9 {
    display: none !important;
  }

  /* Hide cover/hero images on mobile for client and service pages */
  .portfolio-hero {
    display: none !important;
  }

  .service-hero {
    display: none !important;
  }

  /* Add top padding to compensate for hidden hero on mobile */
  .portfolio-details-section {
    padding-top: 120px !important;
  }

  .service-info-section {
    padding-top: 120px !important;
  }
}

@media (max-width: 768px) {
  /* Disable glitch on mobile */
  .slide-bg img { filter: none !important; }
  .slide.glitch-anim .slide-bg img { filter: none !important; }
  
  .site-header { padding: 20px 30px; }
  .slide-content, .slider-arrows { left: 30px; }
  .slider-arrows { right: 30px; bottom: 30px; }

  .clients-section {
    height: 600vh; /* More scroll space for mobile */
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 30px;
    gap: 20px;
  }
  .scroll-hint {
    margin-bottom: 0;
  }
  .clients-scroll-track {
    padding: 0 30px;
    gap: 20px;
  }
  .client-card {
    width: 260px;
    height: 400px;
  }
  
  .timeline-wrap::before { left: 40px; transform: translateX(-50%); }
  .timeline-progress { left: 40px; transform: translateX(-50%); }
  .timeline-node { width: 100%; padding-left: 80px; padding-right: 25px; text-align: left; }
  .timeline-node.left, .timeline-node.right { left: 0; }
  .timeline-node.left::after, .timeline-node.right::after { 
    left: 40px; 
    right: auto;
    transform: translateX(-50%);
  }
  
  /* Mobile Scaling to fix Text Overlaps */
  .section-title { font-size: 2.2rem; margin-bottom: 10px; }

  /* LOADER MOBILE ADJUSTMENTS */
  .loader {
    justify-content: center;
    padding-top: 0;
  }

  .loader-center {
    transform: translateY(-10vh); /* Keeps it slightly higher but closer to the bottom than before */
  }

  .loader-subquote {
    flex-direction: column;
    gap: 15px; /* Increased gap for better spacing */
    font-size: 2.2rem;
  }

  .roller {
    height: 3rem !important; /* Fixed height to prevent overlap */
    overflow: hidden !important;
    display: block;
    margin: 0 auto;
  }

  .roller-inner span {
    height: 3rem !important;
    line-height: 3rem !important;
    display: block;
    flex-shrink: 0; /* Prevent shrinking which causes overlap */
  }

  .loader-bottom {
    bottom: 80px; /* Higher up to clear mobile browser bars */
    left: 30px;
    width: calc(100% - 60px);
  }

  .loader-counter {
    font-size: 5rem;
    margin-bottom: 10px;
  }

  /* SERVICES TRANSITION MOBILE */
  .slide {
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                visibility 1.2s, 
                transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  
  .slide.active .slide-bg img {
    transform: scale(1.1) translateX(0); /* Slightly more zoom on mobile for depth */
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 1.2s ease;
  }

  .slide-bg img {
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 1.2s ease;
  }

  /* SLOW DOWN TEXT ANIMATIONS ON MOBILE */
  .text-mask span {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s ease;
  }

  .slide.active .slide-subtitle .text-mask span {
    transition-delay: 0.3s;
  }

  .slide.active .slide-title .text-mask span {
    transition-delay: 0.5s;
  }
}