/* ===== BASE & RESET ===== */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  /* To make fonts 'uniform' across browsers (hopefully) */
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

body {
  margin: 0 !important;
  padding: 0 !important;
  background-color: #063971 !important;
  background-image: url('https://static.igem.wiki/teams/5716/home/network.webp');
  background-repeat: repeat;
  background-size: 801px 525px;
  background-position: top left;
  -webkit-background-blend-mode: multiply;
  background-blend-mode: multiply;
}

/* Navbar positioning */
.navbar, header.navbar, header.fixed-top {
  margin-bottom: 0 !important;
  top: 0 !important;
}

/* ===== HOME SECTION ===== */
.home {
  position: relative;
  z-index: 1;
  background-color: transparent;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #ffff;
  line-height: 1.6;
  width: 100% !important;
  margin: auto;
  height: auto !important;
  overflow: visible !important;
}

/* ===== VIDEO CONTAINER ===== */
.home .video-container {
  position: relative !important;
  width: 100% !important;
  height: 100vh;
  overflow: hidden !important;
  display: block !important;
  visibility: visible !important;
  background-color: #11153B !important;
  background-size: 100% auto;
  background-repeat: no-repeat;
  background-position: center center;
  margin: 0 !important;
  z-index: 2 !important;
}

/* Gradient fade at bottom of video */
.home .video-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 130px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(20, 16, 59, 0.4) 30%,
    rgba(20, 16, 59, 0.8) 60%,
    #063971 100%
  );
  pointer-events: none;
  z-index: 4;
}

.home .video-container img#heroFrames {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  display: block !important;
  visibility: visible !important;
  z-index: 3 !important;
}

/* ===== MAIN CONTAINER ===== */
.home .main-container {
  background: transparent !important;
  position: relative !important;
  display: block !important;
  width: 85% !important;
  max-width: 1600px !important;
  margin: 0 auto !important;
  padding: 40px 3% 0 3% !important;
  z-index: 2 !important;
  visibility: visible !important;
  opacity: 1 !important;
  box-sizing: border-box;
}

.home .section {
  margin: 0 !important;
  display: block !important;
  visibility: visible !important;
  background-color: transparent !important;
}

/* ===== INTRO BLOCKS ===== */
.home .intro-block {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: clamp(2rem, 5vw, 4rem);
  padding-top: clamp(4%, 6vw, 7%);
  padding-bottom: clamp(4%, 6vw, 7%);
  margin: 0 1% !important;
  flex-wrap: wrap;
}

.home .intro-block:nth-child(2) {
  flex-direction: row-reverse;
}

/* ===== PARAGRAPHS ===== */
.home .dramatic-paragraph {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 300;
  line-height: 1.75;
  text-align: justify;
  flex: 1 1 300px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease-out, transform 1s ease-out;
  min-width: 280px;
}

.home .dramatic-paragraph.visible {
  opacity: 1;
  transform: translateY(0);
}

.home .dramatic-paragraph a.link-highlight {
  color: #FFA500;
  text-decoration: underline;
  font-weight: 700;
  transition: all 0.3s ease;
}

.home .dramatic-paragraph a.link-highlight:hover {
  color: #FFB84D;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
}

.home strong {
  font-weight: 800 !important;
  color: inherit;
  display: block;
  font-size: clamp(1.3em, 1.5em, 1.6em);
  margin-bottom: 0.5rem;
  line-height: 1.05;
  letter-spacing: 0.2px;
}

.home strong.big_title {
  font-size: clamp(1.8em, 2.5em, 3em) !important;
  margin-bottom: 0.75rem;
}

/* ===== LIPID PERCENTAGE COUNTER ===== */
#lipid-percentage {
  display: inline-block;
  font-size: clamp(1.5rem, 3vw, 2rem);
  transition: font-size 0.05s linear;
  color: #FFA500;
  font-weight: 700;
}

@keyframes pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

#lipid-percentage.pop {
  animation: pop 700ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* ===== HIGHLIGHT KEYS ===== */
.home .highlight-key {
  background: linear-gradient(90deg, #FFA500, #FF6B35, #FFA500);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
  font-weight: 700 !important;
  color: #FFA500;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ===== INTRO IMAGES ===== */
.home .intro-image {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease-out, transform 1s ease-out;
  flex: 0 1 auto;
  max-width: 300px;
  min-width: 175px;
}

.home .intro-image.visible {
  opacity: 1;
  transform: translateY(0);
}

.home .intro-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 300px;
  border: none;
  box-shadow: none;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: block !important;
  object-fit: contain;
}

.home .intro-image img:hover {
  transform: scale(1.08) rotate(2deg);
}

/* ===== HIGHLIGHT BOXES ===== */
.home .highlight-boxes {
  display: flex !important;
  flex-direction: column;
  gap: clamp(2rem, 3vw, 4rem);
  width: 100vw;
  position: relative;
  margin-left: calc(-1 * (50vw - 50%));
  margin-right: calc(-1 * (50vw - 50%));
  margin-top: 3rem;
  margin-bottom: 3rem;
  align-items: stretch;
  box-sizing: border-box;
  padding: 0;
}

.home .highlight-box {
  background: #152A59;
  border-top: 2px solid #ffff;
  border-bottom: 2px solid #ffff;
  box-shadow: 0 0 25px rgba(10, 14, 39, 0.8);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, opacity 0.8s ease;
  position: relative !important;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: clamp(2rem, 4vw, 3rem) clamp(5%, 10vw, 15%);
  border-radius: 0px;
  overflow: hidden;
  opacity: 0;
}

/* Problem box slides in from RIGHT */
.home .highlight-box:nth-child(1) {
  transform: translateX(100%);
}

/* Solution box slides in from LEFT */
.home .highlight-box:nth-child(2) {
  transform: translateX(-100%);
}

/* Visible state - slides into position */
.home .highlight-box.slide-in {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

.home .highlight-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 165, 0, 0.15), transparent);
  animation: shimmerBox 3s infinite;
  pointer-events: none;
}

@keyframes shimmerBox {
  0% { left: -100%; }
  100% { left: 100%; }
}

.home .highlight-box:hover {
  transform: translateX(0) scale(1.005) !important;
  box-shadow: 0 0 40px rgba(255, 165, 0, 0.4);
}

.home .highlight-box img {
  border-radius: 0px;
  max-width: 100%;
  height: auto;
}

/* Prevent intro-block visible class from affecting highlight boxes */
.home .highlight-box .dramatic-paragraph {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.home .highlight-box .intro-image {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ===== COMIC SECTION ===== */
.home #section2 {
  margin: 0 !important;
  width: 100% !important;
  padding: 0 !important;
}

.home #section2 img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

.home #section2 img:last-child {
  border-bottom: 4px solid rgb(180, 117, 1);
}

/* ===== HERO TITLE ===== */
.home #hero-title {
  text-align: center;
  padding-top: clamp(5%, 8vw, 10%);
  margin: 0 auto !important;
  display: block !important;
  visibility: visible !important;
}

.home .hero-main {
  font-family: 'Inter', 'Montserrat', sans-serif;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  background: linear-gradient(90deg, #FFA500, #FF8C00, #FFB84D, #FF8C00, #FFA500);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #FFA500;
  animation: shimmer 3s linear infinite;
  letter-spacing: 0.02em;
  text-align: center;
  margin: 0 auto;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
  padding: 0 1rem;
}

.home .hero-sub {
  font-family: 'Roboto', sans-serif;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 300;
  font-style: italic;
  color: #ffff !important;
  margin: 8px 0 0 0;
  display: block !important;
  padding: 0 1rem;
  text-align: center;
}

/* ===== HERO PARTS SECTION ===== */
.home #HeroParts {
  display: block !important;
  visibility: visible !important;
  margin-bottom: clamp(4rem, 8vw, 8rem);
  padding: 0 2%;
}

.home .parts-container {
  position: relative !important;
  width: 100% !important;
  max-width: 1600px !important;
  height: auto;
  margin: 0 auto 6rem auto !important;
  overflow: visible !important;
  display: block !important;
  padding-bottom: clamp(4rem, 8vw, 8rem) !important;
  min-height: clamp(300px, 40vw, 500px);
}

.home .parts-container.separated {
  min-height: clamp(400px, 50vw, 520px) !important;
}

/* BASE POSITIONING - ALL START AT THE SAME POSITION */
.home .parts-wrapper {
  position: absolute !important;
  top: 48px !important;
  left: 50% !important;
  margin-left: 0 !important;
  transform: translateX(-50%);
  display: flex !important;
  flex-direction: column;
  align-items: center;
  transition: all 800ms cubic-bezier(0.2,0.8,0.2,1);
  will-change: transform;
}

.home .parts-wrapper img {
  width: clamp(100px, 15vw, 250px);
  height: auto;
  display: block !important;
  transition: transform 0.8s cubic-bezier(0.2,0.8,0.2,1);
  visibility: visible !important;
}

.home .parts-wrapper img:hover {
  transform: translateY(-5px) !important;
  filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.7));
}

/* FRONT CAPE PARTS - SAME BASE POSITION */
.home .frontcape-wrapper {
  position: absolute !important;
  left: 50% !important;
  top: 48px !important;
  margin-left: 0 !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
}

.home .frontcape-wrapper img {
  width: clamp(100px, 15vw, 250px);
  height: auto;
  display: block !important;
}

/* Front cape stays hidden in separated state */
.home .parts-container.separated .frontcape-wrapper {
  display: none !important;
}

/* Z-index order */
.home .cape-wrapper { z-index: 1 !important; }
.home .character-wrapper { z-index: 2 !important; }
.home .frontcape-wrapper { z-index: 3 !important; }
.home .helmet-wrapper { z-index: 4 !important; }

/* Separated transformations */
.home .parts-container.separated .cape-wrapper {
  transform: translateX(calc(-50% - clamp(25vw, 32vw, 38vw))) translateY(-5vw) scale(1.25);
}

.home .parts-container.separated .character-wrapper {
  transform: translateX(-50%);
}

.home .parts-container.separated .helmet-wrapper {
  transform: translateX(calc(-50% + clamp(20vw, 28vw, 34vw))) translateY(clamp(8vw, 12vw, 16vw)) scale(1.75);
}

/* ===== CAPTIONS ===== */
.home .parts-caption {
  position: absolute !important;
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
  pointer-events: none;
  max-width: clamp(200px, 25vw, 400px);
  text-align: center;
  background-color: #063971;
  color: #fff;
  font-weight: 500;
  border-radius: 10px;
  border: 3px solid #fff;
  padding: clamp(0.8rem, 1.5vw, 1.2rem);
  font-size: clamp(0.9rem, 1.5vw, 1.3rem);
  box-sizing: border-box;
}

.home .cape-caption,
.home .hero-caption,
.home .helmet-caption {
  top: 60%;
  left: 50%;
  transform: translate(-50%, 0);
  opacity: 0;
}

.home .parts-container.separated .cape-caption {
  left: 50%;
  transform: translateX(calc(-50% - 32vw)) translateY(10vw);
}

.home .parts-container.separated .hero-caption {
  left: 50%;
  transform: translateX(-50%) translateY(10vw);
}

.home .parts-container.separated .helmet-caption {
  left: 50%;
  transform: translateX(calc(-50% + 32vw)) translateY(10vw);
}

.home .parts-container.separated.show-captions .cape-caption,
.home .parts-container.separated.show-captions .hero-caption,
.home .parts-container.separated.show-captions .helmet-caption {
  opacity: 1;
}

/* ===== PAGE LINKS ===== */
.home .page-links {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: clamp(1rem, 2vw, 2rem);
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
  width: calc(100% + 6%);
  margin-left: -3%;
}

.home .page {
  flex: 0 0 auto;
  width: clamp(120px, 16vw, 180px);
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  gap: 0.5rem;
}

.home .page-link {
  display: block;
  width: 100%;
  text-align: center;
}

.home .page-link img {
  width: 100%;
  height: auto;
  max-height: clamp(200px, 20vw, 200px);
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.home .page-link:hover img {
  transform: translateY(-6px);
  filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.55));
}

.home .page-label {
  font-size: clamp(0.8rem, 1.1vw, 1.2rem);
  font-weight: 600;
  color: #fff;
  margin-top: 0.4rem;
  white-space: nowrap;
}

/* Wider view: try to keep everything on a single line when there is space */
@media (min-width: 1200px) {
  .home .page-links { flex-wrap: nowrap; gap: clamp(1rem, 2vw, 2rem); }
  .home .page { width: clamp(140px, 12vw, 200px); }
}

/* Small screens: stack / allow wrapping cleanly */
@media (max-width: 500px) {
  .home .page-links { gap: 0.5rem; padding: 0 0.25rem; }
  .home .page { width: 46%; }            /* two columns on tiny phones */
  .home .page-label { white-space: normal; }
}

.home .intro-block.special-cards {
  margin-top: clamp(3%, 5vw, 5%);
}

.pages-fade-in {
  margin-top: clamp(5rem, 10vw, 10rem);
  padding-top: clamp(2rem, 4vw, 4rem);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.pages-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== TABLET RESPONSIVE ===== */
@media (max-width: 992px) {
  /* Pattern fix for tablet */
  body {
    background-image: none !important;
    background-color: #063971 !important;
  }
  
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://static.igem.wiki/teams/5716/home/network.webp');
    background-repeat: repeat;
    background-size: 600px 393px;
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
  }
  
  .home {
    position: relative;
    z-index: 1;
  }
  
  .home .intro-block {
    flex-direction: column !important;
    gap: 1.5rem !important;
    text-align: center;
  }
  
  .home .intro-block:nth-child(2) {
    flex-direction: column !important;
  }
  
  .home .dramatic-paragraph {
    text-align: left;
  }
  
  .home .intro-image {
    max-width: clamp(180px, 35vw, 220px);
  }
  
  /* Ensure all intro-block images scale properly */
  .home .intro-block img {
    max-width: 100% !important;
    height: auto !important;
  }
  
  .home .main-container {
    width: 90% !important;
    padding: 30px 2% 0 2% !important;
  }

  .home .page-links {
    gap: clamp(0.3rem, 1vw, 0.7rem) !important;
    padding: 0.6rem 0.4rem;
  }
  
  .home .page {
    width: clamp(60px, 14vw, 100px) !important;
    min-width: 0 !important;
  }
  
  .home .page-link img {
    height: clamp(120px, 14vw, 150px);
    max-height: 150px;
  }
  
  .home .page-label {
    font-size: clamp(0.6rem, 0.95vw, 0.85rem) !important;
  }
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
  /* NO PATTERN - Just solid background color */
  body {
    background-image: none !important;
    background-color: #063971 !important;
    background-attachment: scroll;
  }
  
  /* Remove the pattern overlay completely */
  body::before {
    display: none !important;
  }

  .home {
    padding-top: 0 !important;
    position: relative;
    z-index: 1;
  }
  
  .home .video-container {
    padding-top: 75% !important;
  }
  
  .home .video-container img#heroFrames {
    height: 102% !important;
    object-position: center 85% !important;
  }
  
  .home .main-container {
    width: 95% !important;
    padding: 15px 2.5% 0 2.5% !important;
  }
  
  .home .dramatic-paragraph {
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.55;
    padding: 0.9rem 0.65rem;
  }

  .home strong {
    font-size: 1.25em;
  }

  .home strong.big_title {
    font-size: 1.7em !important;
  }
  
  .home .intro-image {
    max-width: clamp(110px, 28vw, 140px);
  }
  
  /* Make all intro-block images responsive */
  .home .intro-block img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
  }
  
  .home .intro-block {
    padding-top: 3%;
    padding-bottom: 3%;
    gap: 1rem;
  }

  .home .highlight-box {
    padding: 1.3rem 5% !important;
  }
  
  /* HERO PARTS - Keep assembled on mobile */
  .home .parts-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 2rem !important;
    min-height: auto !important;
  }
  
  .home .parts-wrapper {
    position: relative !important;
    transform: none !important;
    margin: 1.5rem 0 0.5rem 0;
  }
  
  /* Don't separate the parts on mobile - keep HERO dressed */
  .home .parts-container.separated .cape-wrapper,
  .home .parts-container.separated .character-wrapper,
  .home .parts-container.separated .helmet-wrapper {
    position: relative !important;
    transform: none !important;
  }
  
  /* Show captions below HERO on mobile */
  .home .parts-caption {
    position: relative !important;
    opacity: 1 !important;
    transform: none !important;
    max-width: 90vw;
    margin: 1rem auto;
    display: block !important;
    font-size: 0.7rem;
    padding: 0.65rem;
  }
  
  .home .parts-container.separated .cape-caption,
  .home .parts-container.separated .hero-caption,
  .home .parts-container.separated .helmet-caption {
    position: relative !important;
    transform: none !important;
    opacity: 1 !important;
  }
  
  #lipid-percentage {
    font-size: 1.15rem !important;
  }
  
  .home .hero-main {
    font-size: 2.1rem;
  }

  .home .hero-sub {
    font-size: 0.9rem;
  }
  
  .home .page-links {
    gap: 0.3rem !important;
    padding: 0.4rem 0.2rem;
  }
  
  .home .page {
    width: clamp(50px, 15vw, 80px) !important;
  }
  
  .home .page-link img {
    height: clamp(70px, 10vw, 90px);
    max-height: 90px;
  }
  
  .home .page-label {
    font-size: 0.58rem !important;
    white-space: normal;
    line-height: 1.2;
  }

  .home #section2 img {
    margin-bottom: 10px !important;
  }

  #lipid-percentage.pop {
    animation: popMobile 700ms cubic-bezier(0.2, 0.9, 0.2, 1);
  }
  
  @keyframes popMobile {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.15); }
    100% { transform: scale(1); }
  }
  
  /* FIX PARAGRAPH SHADING - Make it fit the text better */
  .home .intro-block:not(.highlight-box) .dramatic-paragraph {
    padding: 0.9rem 0.65rem;
    background: radial-gradient(
        ellipse 110% 100% at center,
        #063971 0%,
        rgba(6, 57, 113, 0.95) 20%,
        rgba(6, 57, 113, 0.85) 35%,
        rgba(6, 57, 113, 0.65) 50%,
        rgba(6, 57, 113, 0.4) 65%,
        rgba(6, 57, 113, 0.15) 80%,
        transparent 100%
    );
    background-size: 100% 100%;
    background-position: center;
  }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 576px) {
  .home .dramatic-paragraph {
    font-size: 0.85rem;
    padding: 0.85rem 0.55rem;
  }
  
  .home strong {
    font-size: 1.2em;
  }

  .home strong.big_title {
    font-size: 1.6em !important;
  }
  
  .home .intro-image {
    max-width: clamp(95px, 33vw, 125px);
  }
  
  /* Ensure highlight box images are also responsive */
  .home .highlight-box .intro-image {
    max-width: clamp(95px, 43vw, 145px);
  }
  
  /* HERO parts stay dressed - captions below */
  .home .parts-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 2rem !important;
    min-height: auto !important;
  }
  
  .home .parts-wrapper {
    position: relative !important;
    transform: none !important;
    margin: 1rem 0;
  }
  
  .home .parts-container.separated .cape-wrapper,
  .home .parts-container.separated .character-wrapper,
  .home .parts-container.separated .helmet-wrapper {
    transform: none !important;
    position: relative !important;
  }
  
  .home .parts-caption {
    position: relative !important;
    transform: none !important;
    max-width: 90vw;
    margin: 0.75rem auto;
    opacity: 1 !important;
    display: block !important;
    font-size: 0.65rem;
    padding: 0.55rem;
  }
  
  .home .parts-container.separated .cape-caption,
  .home .parts-container.separated .hero-caption,
  .home .parts-container.separated .helmet-caption {
    position: relative !important;
    transform: none !important;
    opacity: 1 !important;
  }
  
  .home .hero-main {
    font-size: 1.9rem;
  }

  .home .hero-sub {
    font-size: 0.85rem;
  }
  
  .home .page-links {
    gap: clamp(0.15rem, 0.6vw, 0.35rem) !important;
    padding: 0.35rem 0.1rem;
    justify-content: space-between !important;
  }
  
  .home .page {
    width: clamp(42px, 15vw, 65px) !important;
    min-width: 0 !important;
  }
  
  .home .page-link img {
    height: clamp(60px, 8.5vw, 75px);
    max-height: 75px;
  }
  
  .home .page-label {
    font-size: clamp(0.46rem, 0.72vw, 0.62rem) !important;
  }
  
  /* FIX PARAGRAPH SHADING for small mobile */
  .home .intro-block:not(.highlight-box) .dramatic-paragraph {
    padding: 0.85rem 0.55rem;
    background: radial-gradient(
        ellipse 105% 100% at center,
        #063971 0%,
        rgba(6, 57, 113, 0.95) 22%,
        rgba(6, 57, 113, 0.85) 38%,
        rgba(6, 57, 113, 0.65) 52%,
        rgba(6, 57, 113, 0.4) 67%,
        rgba(6, 57, 113, 0.15) 82%,
        transparent 100%
    );
    background-size: 100% 100%;
    background-position: center;
  }
}

/* ===== SAFARI COMPATIBILITY ===== */
.home .highlight-box {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.home .highlight-key,
.home .hero-main {
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home .intro-block,
.home .page-links,
.home .highlight-boxes,
.home .page {
  display: -webkit-flex !important;
}

.home .intro-block {
  -webkit-align-items: center;
  -webkit-justify-content: space-between;
}

.home .page-links {
  -webkit-flex-wrap: wrap !important;
  -webkit-justify-content: center !important;
  -webkit-align-items: flex-end !important;
}

.home .highlight-boxes {
  -webkit-flex-direction: column;
}

.home .page {
  -webkit-flex-direction: column !important;
  -webkit-align-items: center !important;
  -webkit-justify-content: flex-end !important;
}

.home .intro-image img,
.home .parts-wrapper img,
.home .page-link img {
  -webkit-transform: translateZ(0);
  -webkit-backface-visibility: hidden;
}

.home .intro-image img:hover {
  -webkit-transform: scale(1.08) rotate(2deg);
}

.home .parts-wrapper img:hover,
.home .page-link:hover img {
  -webkit-transform: translateY(-5px) !important;
}

@-webkit-keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@-webkit-keyframes shimmerBox {
  0% { left: -100%; }
  100% { left: 100%; }
}

@-webkit-keyframes pop {
  0%   { -webkit-transform: scale(1); transform: scale(1); }
  50%  { -webkit-transform: scale(1.25); transform: scale(1.25); }
  100% { -webkit-transform: scale(1); transform: scale(1); }
}

@-webkit-keyframes popMobile {
  0%   { -webkit-transform: scale(1); transform: scale(1); }
  50%  { -webkit-transform: scale(1.15); transform: scale(1.15); }
  100% { -webkit-transform: scale(1); transform: scale(1); }
}

html {
  -webkit-overflow-scrolling: touch;
}

body {
  -webkit-text-size-adjust: 100%;
}

.home .video-container,
.home .video-container img#heroFrames {
  min-height: 0;
  -webkit-transform: translateZ(0);
  -webkit-backface-visibility: hidden;
}

/* Backface visibility without transform overrides */
.home .cape-wrapper,
.home .character-wrapper,
.home .frontcape-wrapper,
.home .helmet-wrapper {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Hide scrollbar */
body {
  scrollbar-width: thin;  /* Firefox */
}

body::-webkit-scrollbar {
  width: 0px;  /* Chrome/Safari/Opera */
}

.home img, 
.home video, 
.home .video-container {
  margin-left: auto !important;
  margin-right: auto !important;
  left: 0 !important;
  right: 0 !important;
}

.home .parts-wrapper {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Readability improvement */
.home .intro-block:not(.highlight-box) .dramatic-paragraph {
  position: relative;
  margin: 0;
  -webkit-border-radius: 3%;
  border-radius: 3%;
  padding: clamp(1rem, 3vw, 1.5rem) clamp(0.5rem, 2vw, 1rem);
  background: -webkit-radial-gradient(
      ellipse 140% 110% at center,
      #063971 0%,
      rgba(6, 57, 113, 0.95) 25%,
      rgba(6, 57, 113, 0.85) 40%,
      rgba(6, 57, 113, 0.65) 55%,
      rgba(6, 57, 113, 0.4) 70%,
      rgba(6, 57, 113, 0.15) 85%,
      transparent 100%
  );
  background: radial-gradient(
      ellipse 140% 110% at center,
      #063971 0%,
      rgba(6, 57, 113, 0.95) 25%,
      rgba(6, 57, 113, 0.85) 40%,
      rgba(6, 57, 113, 0.65) 55%,
      rgba(6, 57, 113, 0.4) 70%,
      rgba(6, 57, 113, 0.15) 85%,
      transparent 100%
  );
  background-size: 100% 100%;
  background-position: center;
}