  /* --- CSS VARIABLES & RESET --- */
  :root {
    --bg-color: #ffffff;
    --text-color: #0a0a0a;
    --accent-color: #333333;
    --highlight: #1d70b7;
    --font-main: 'Poppins', Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0;}
body { font-family: var(--font-main); background-color: #f5f5f5; color: var(--text-color); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: var(--text-color); }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; position: relative; }
.separator { max-width: 1200px; margin: 0 auto; padding: 2px; background-color: var(--highlight);}
.separator-with-margin-top { max-width: 1200px; margin: 0 auto; margin-top: 100px; padding: 2px; background-color: var(--highlight);}

/* --- SCROLL REVEAL UTILITIES --- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* --- NAVIGATION & LOGO --- */
header { padding: 30px 0;  }
nav { display: flex; justify-content: space-between; align-items: center; }

.blue {color: var(--highlight); }
.white {color: #fff; }

/* Delete these old classes if they are still in your CSS: 
   .logo-wrap, .logo-i, .logo-i .dot, .logo-i .stem, @keyframes bounce */

/* --- NEW IMP LOGO ANIMATION --- */
.imp-logo {
  position: relative;
  display: block;
  width: 140px; /* Scales perfectly for the navbar */
  aspect-ratio: 1942 / 620;
  overflow: visible;
  cursor: pointer;
}

.imp-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.imp-logo__base {
  opacity: 1;
  transition: opacity .32s ease;
}

.imp-logo__dot {
  opacity: 1;
  transform-origin: 5.5% 16%;
  animation: imp-dot-arrive 1.55s cubic-bezier(.2,.82,.22,1) .25s both;
  transition: opacity .32s ease;
}

/* --- HEADER LOGO DOT COLOR --- */
header .imp-logo__dot {
  /* Recolor the black image to match your var(--highlight) blue */
  filter: invert(32%) sepia(99%) saturate(1143%) hue-rotate(188deg) brightness(89%) contrast(90%);
}

.imp-logo__colour {
  opacity: 0;
  transition: opacity .38s ease;
}

/* The Pixar Squash and Stretch */
@keyframes imp-dot-arrive {
  0%   { transform: translateY(-150%) scale(0.96,1.04); }
  34%  { transform: translateY(-12%) scale(0.98,1.02); }
  45%  { transform: translateY(9%) scale(1.26,.70); }
  56%  { transform: translateY(-34%) scale(.88,1.14); }
  67%  { transform: translateY(5%) scale(1.14,.84); }
  76%  { transform: translateY(-15%) scale(.95,1.07); }
  84%  { transform: translateY(3%) scale(1.07,.92); }
  91%  { transform: translateY(-5%) scale(.98,1.02); }
  96%  { transform: translateY(1%) scale(1.02,.98); }
  100% { transform: translateY(0) scale(1,1); }
}

.imp-logo:hover .imp-logo__colour {
  opacity: 1;
}

.imp-logo:hover .imp-logo__base,
.imp-logo:hover .imp-logo__dot {
  opacity: 0;
}

/* --- FOOTER LOGO ADJUSTMENT --- */
/* Your footer has a dark background, so this CSS filter magically turns the black base64 logo entirely white! */
footer .imp-logo__base,
footer .imp-logo__dot {
    filter: brightness(0) invert(1);
}

.nav-links { display: flex; align-items: center; gap: 30px; font-weight: 600}
.nav-links a:hover { color: gray; }
.nav-links .blue-btn { border: 1.5px solid var(--highlight); color: #fff; background-color: var(--highlight); padding: 8px 20px; cursor: pointer; border-radius: 30px; font-weight: bold; font-size: 0.9rem; transition: 0.3s; }
.nav-links .black-btn { margin-left: -1rem ; border: 1.5px solid #000; color: #fff; background-color: #000; padding: 8px 20px; cursor: pointer; border-radius: 30px; font-weight: bold; font-size: 0.9rem; transition: 0.3s; }
.nav-container {max-width: 1600px; margin: 0 auto; padding: 0 20px; position: relative; }
.nav-links .blue-btn:hover, .nav-links .blue-btn:focus { border: 1.5px solid #000; background-color: #000; color: #fff }


/* --- HERO & MARQUEE --- */
.hero { padding: 180px 20px; text-align: center; }
.hero-line { font-size: 4rem; line-height: 1.2; opacity: 0; animation: fadeIn 1s forwards; text-align: left; font-weight: 600; margin: 0.5rem 0} 
.hero-line:nth-child(1) { animation-delay: 0.3s; }
.hero-line:nth-child(2) { animation-delay: 1.2s; }
.hero-line:nth-child(3) { animation-delay: 2.1s; }
.hero-line .blue {color: var(--highlight); }
@keyframes fadeIn { to { opacity: 1; } }

.marquee-container { overflow: hidden; white-space: nowrap; padding: 8px 0; background-color: var(--highlight); color: #fff; margin-top: 40px; display: flex; }
.marquee { display: flex; width: max-content; animation: scroll 40s linear infinite; font-size: 1.2rem; letter-spacing: 2px; font-weight: 600; }
.marquee span { flex-shrink: 0; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- WORK SECTION --- */
#work { background-color: #f5f5f5; color: #000000; padding: 100px 0; }
#work .section-header { display: block; margin-bottom: 40px; }
#work h2 { font-size: 4rem; color: #000000; margin-bottom: 20px; line-height: 1.1; font-weight: 600;}

#work .filters { display: flex; gap: 10px; flex-wrap: nowrap;}
#work .filter-btn { background: transparent; border: 1.5px solid #000000; color: #000000; padding: 8px 20px; cursor: pointer; border-radius: 30px; font-weight: bold; font-size: 0.9rem; transition: 0.3s; }
#work .filter-btn.active, #work .filter-btn:hover { background: #0066cc; border-color: #0066cc; color: #ffffff; }
#work .filter-btn[data-filter="all"].active { background: #0066cc; border-color: #0066cc; color: #ffffff; }

/* Grid */
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; perspective: 1000px; }
.project-card.full-width { grid-column: span 2; }

.flip-card { background-color: transparent; height: 320px; perspective: 1000px; cursor: pointer; }
.flip-card.full-width { height: 360px; }
.flip-card-inner { position: relative; width: 100%; height: 100%; text-align: left; transition: transform 1.5s cubic-bezier(0.4, 0.2, 0.2, 1); transform-style: preserve-3d; }
.flip-card:hover .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back { position: absolute; width: 100%; height: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 16px;}
.flip-card-front { padding: 30px; }

/* Front */
.flip-card-front { display: flex; justify-content: center; align-items: center; border: none; }
.flip-card-front img { max-width: 60%; max-height: 70%; object-fit: contain; }
.flip-card-front img { max-width: 60%; max-height: 70%; object-fit: contain; }
.full-width .flip-card-front img { max-width: 60%; max-height: 100%; object-fit: contain; }

/* Front Background Colours*/
.bg-planet { background-color: #5687e8; }
.bg-leeds { background-color: #1771b8; }
.bg-amalia { background-color: #0202f5; }
.bg-lhfc { background-color: #e31821; }
.bg-saracens { background-color: #6b6b6b; }

/* Back */
.flip-card-back { color: white; transform: rotateY(180deg); display: flex; flex-direction: row; }
.flip-card-back.small-card.bg-lhfc, .flip-card-back.small-card.bg-lhfc .project-desc, .flip-card-back.small-card.bg-lhfc .project-tags, .flip-card-back.small-card.bg-lhfc .view-link { color: var(--text-color); background-color: var(--bg-color); }
.project-title { font-size: 1.8rem; margin-bottom: 10px; font-weight: bold; }
.project-desc { font-size: 2.15rem; line-height: 1.25; margin-bottom: 15px; color: #fff; font-weight: 600; }
.project-tags { font-size: 1.4rem; color: #fff; margin-bottom: auto; }
.view-link { font-weight: 600;  font-size: 1.2rem; letter-spacing: 1px; display: inline-block; margin-top: 15px; color: #fff; }
.view-link:hover { font-weight: bold;}
.flip-card-back .inner-text { display: flex; flex-direction: column; justify-content: space-between; padding: 2rem; }
.flip-card-back .inner-img-container { height: 100%; margin-right: 2rem;}
.flip-card-back .inner-img-container img { height: 100%; }
.flip-card-back.small-card .inner-text { display: flex; flex-direction: column; justify-content: space-between; padding: 2rem; padding-right: 40%; padding-top: 6rem;}
.flip-card-back.small-card .inner-img-container { height: 100%; margin-right: 2rem; margin-top: 1rem; position: absolute; right: 0; top: 50%; transform: translateY(-50%); height: 200px; width: 200px;}
.flip-card-back.small-card.bg-amalia .inner-img-container { width: 300px;}
.flip-card-back.small-card.bg-lhfc .inner-img-container { width: 180px; height: 180px;}
.flip-card-back.small-card .inner-img-container img { height: 100%; width: 100%;}
.flip-card-back.small-card .project-title { position: absolute; top: 1.5rem; left: 2rem; font-size: 1.8rem; margin-bottom: 10px; font-weight: bold; }
.flip-card-back.small-card .project-tags { font-size: 1.2rem; color: #fff; margin-bottom: auto; }

/* --- SERVICES SECTION --- */
#services { background-color: #f5f5f5; color: #000000; padding-top: 100px; padding-bottom: 100px; }
#services .section-header { display: block; margin-bottom: 40px; }
#services h2 { font-size: 4rem; color: #000000; margin-bottom: 20px; line-height: 1.1; font-weight: 600;}
.section-padding { padding: 100px 0; }
.services-wrapper { position: relative; }
.jumping-dot { width: 12px; height: 12px; background-color: var(--highlight); border-radius: 50%; position: absolute; top: 60px; left: 60px; opacity: 0; z-index: 10; pointer-events: none; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; position: relative; }
.service-item h3 { font-size: 1.2rem; margin: 15px 0; }
.service-num { font-size: 4rem; font-weight: 600; color: var(--highlight); opacity: 0; transition: opacity 0.3s ease; position: relative; display: inline-block; }

/* --- ABOUT SECTION --- */
.about-content { display: flex; flex-direction: column; }
.about-text { display: flex; justify-content: space-between; padding: 0 3rem;}
.about-content * {flex: 1;}
.about-text h2 { font-size: 4rem; line-height: 1.1; margin-bottom: 20px; font-weight: 600;}

/* Text Animations */
.small-team { opacity: 0; display: block; transform: translateX(-20px); transition: all 0.8s ease-out; }
.small-team.visible { opacity: 1; transform: translateX(0); }

.big-output { display: block; transform-origin: left center; }
@keyframes scaleTemp { 0% { transform: scale(1); } 30% { transform: scale(1.4); } 70% { transform: scale(1.4); } 100% { transform: scale(1); } }
.big-output.animate-scale { animation: scaleTemp 2.5s ease-in-out forwards; }

.about-text p { font-size: 1.1rem; margin-bottom: 20px; }

/* Slow Logo Carousel */
/* Slow Logo Carousel */
.logo-carousel-wrap { overflow: hidden; white-space: nowrap; padding: 20px 0; background: #fff; margin-top: -80px; height: 140px; display: flex; }
.logo-carousel { display: flex; align-items: center; width: max-content; animation: scroll-logos 60s linear infinite; height: 100%; padding: 1rem 0; }
.logo-carousel img { display: inline-block; margin: 0 1rem; width: 140px; height: auto; max-height: 100px; flex-shrink: 0; object-fit: contain}
@keyframes scroll-logos { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- CONTACT FORM --- */
#contact { padding-top: 100px; padding-bottom: 100px}
#contact h2 { font-size: 4rem; line-height: 1.1; margin-bottom: 20px; font-weight: 600; max-width: 600px;}
.form-container { }
.form-header { opacity: 0; transition: opacity 1.5s ease-in; }
.form-header.visible { opacity: 1; }

.form-flex-row { display: flex; width: 100%; gap: 1rem;}
.form-group { margin-bottom: 20px; width: 100%;}
.form-group.last-form-group { margin-bottom: 0}
input[type="text"], input[type="email"], textarea, select { width: 100%; padding: 15px; background: var(--bg-color);  color: var(--text-color); border: none;  border-radius: 6px; font-family: var(--font-main); }
textarea { height: 100px; resize: vertical; }
label { font-weight: 600; margin-bottom: 6px; display: block}
label sup { color: red}
/* --- SELECT2 CUSTOM STYLING --- */
.select2-container--default .select2-selection--multiple {background-color: var(--bg-color);border: none;border-radius: 6px;min-height: 50px; padding: 8px 10px;}
.select2-container--default .select2-selection--multiple .select2-selection__choice {background-color: var(--highlight);border: none;color: white;border-radius: 4px;padding: 5px 10px;margin-top: 5px;font-weight: 600;}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {color: white;margin-right: 8px;border-right: 1px solid rgba(255,255,255,0.3);padding-right: 8px;}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {background: transparent;color: #ffcccc;}

/* Dropdown menu styling */
.select2-dropdown {border: 1px solid #ddd;border-radius: 6px;box-shadow: 0 4px 15px rgba(0,0,0,0.1);}

/* Dynamic Button */
#submitBtn { background: grey; color: white; padding: 15px 30px; border: none; font-size: 1rem; font-weight: bold; cursor: pointer; border-radius: 16px; transition: background-color 0.4s ease; pointer-events: none; margin: auto; display: block}
#submitBtn.ready { background: var(--highlight); pointer-events: auto; }
#submitBtn.ready:hover { opacity: 0.9; }

.success-msg { color: #4caf50; margin-bottom: 20px; padding: 10px; border: 1px solid #4caf50; }
.error-msg { color: #f44336; margin-bottom: 20px; padding: 10px; border: 1px solid #f44336; }

/* --- CONSENT CHECKBOX STYLING --- */
.checkbox-group { display: flex; align-items: flex-start; gap: 12px; }
.checkbox-group input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; cursor: pointer; flex-shrink: 0; }
.checkbox-group label { font-size: 0.9rem; font-weight: 400; line-height: 1.5; margin-bottom: 0; cursor: pointer; }

/* --- FOOTER --- */
footer { padding: 80px 0; text-align: left; font-size: 0.9rem; background-color: var(--highlight); color: white }
.footer-grid { display: flex; gap: 2rem; }
.footer-grid > * {flex: 1}
.footer-grid .footer-logo-container { display: flex; flex-direction: column; justify-content: space-between; flex: unset; width: 150px }
.footer-links-container { display: flex; justify-content: space-evenly }
.footer-links { display: flex; flex-direction: column; gap: 20px; flex-wrap: wrap; justify-content: flex-start;}
.footer-links a { color: #fff; }
.footer-links a:hover, .footer-links a:focus { color: #000}
footer .logo-i .dot { width: 7px; height: 7px; background: #fff; border-radius: 50%; position: absolute; top: -8px; left: -0.5px; transition: transform 0.3s; }
footer .logo-i .stem { width: 6px; height: 16px; background: #fff; display: inline-block; position: absolute; bottom: 0; left: 0; }
footer .imp-logo:hover .imp-logo__base, footer .imp-logo:hover .imp-logo__dot { opacity: 1; }
footer .imp-logo__colour { filter: brightness(0); clip-path: inset(0 0 0 62%); }
#copyright-mobile {display: none;}
#copyright-desktop {display: flex; gap: 6px;}
/* --- MOBILE MENU TOGGLE --- */
.menu-toggle { display: none; flex-direction: column; cursor: pointer; gap: 6px; z-index: 100;}
.menu-toggle .bar { width: 30px; height: 3px; background-color: var(--text-color); transition: all 0.3s ease-in-out; border-radius: 3px; }

@media (max-width: 1700px) {
  .nav-container { padding-left: 3rem; padding-right: 3rem }

}
@media (max-width: 1024px) {
    .hero-line, #work h2, #services h2, .service-num, .about-text h2, #contact h2 { font-size: 3rem;}
    .about-content { grid-template-columns: 1fr; flex-direction: column; align-items: flex-start; gap: 20px; }
    .work-grid { grid-template-columns: 1fr; }
    .project-card.full-width { grid-column: span 1; }
    /* .nav-links { display: none; } */
    .nav-container { padding: 0 20px; }
}
@media (max-width: 768px) {
    .hero-line, #work h2, #services h2, .service-num, .about-text h2, #contact h2 { font-size: 1.9rem; }
    .about-text { flex-direction: column;}
    .about-content, .footer-grid { grid-template-columns: 1fr; flex-direction: column; align-items: flex-start; gap: 20px; }
    .footer-grid {gap: 40px;}
    .form-flex-row { flex-direction: column; gap: 0;}
    .footer-links-container { gap: 2rem;}
    .work-grid { grid-template-columns: 1fr; }
    .project-card.full-width { grid-column: span 1; }
    .nav-links { display: none; }
    .project-title, .flip-card-back.small-card .project-title {font-size: 1.2rem;}
    .project-desc, .flip-card-back.small-card .project-desc {font-size: 1.2rem;}
    .project-tags, .view-link, .flip-card-back.small-card .project-tags, .flip-card-back.small-card .view-link {font-size: 1rem;}
    .flip-card-back {flex-direction: column;}
    .flip-card.full-width { height: 500px}
    .flip-card { height: 450px}
    .flip-card-back .inner-img-container {height: 200px; margin: auto; margin-top: -20px;}
    .flip-card-back.small-card .inner-img-container {position: static; transform: translateY(0); height: 150px; width: 150px; margin: auto;margin-top: -10px;}
    .flip-card-back.small-card .project-title {position: static;}
    .flip-card-back.small-card .inner-text {padding: 2rem}
    #work .filters { overflow: scroll;}
    .marquee { font-size: 0.8rem}
    .menu-toggle { display: flex; }
    .nav-links { display: flex; position: absolute; top: 100%; left: 0; width: 100%; background-color: var(--bg-color); flex-direction: column; align-items: center; padding: 20px 0; gap: 25px; box-shadow: 0 10px 15px rgba(0,0,0,0.05); opacity: 0; visibility: hidden; transform: translateY(-20px); transition: all 0.3s ease; z-index: 99; }
    .nav-links.active { opacity: 1; visibility: visible; transform: translateY(0); }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
    .logo-carousel-wrap { overflow: hidden; white-space: nowrap; padding: 20px 0; background: #fff; margin-top: -80px; height: 100px; display: flex; }
    .logo-carousel img { display: inline-block; margin: 0 0.5rem; width: 120px; height: auto; max-height: 80px; flex-shrink: 0; object-fit: contain}
    .imp-logo {width: 120px}
    #copyright-mobile {display: block;}
    #copyright-desktop {display: none;}
    .form-group.last-form-group { margin-bottom: 20px}
}