/* Basic reset and full-screen layout */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    position: relative;
    overflow: hidden; /* ONLY CHANGE: Prevent scrolling */
}

/* Splash screen styling */
#splash {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #fff;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1; /* Behind main content */
    overflow: visible;
}

/* Logo container with transition */
#logo-container {
    cursor: pointer;
    transform: scale(1) translate(0, 0);
    transition: transform 8s ease-in-out;
    will-change: transform;
    width: 500px;
    height: 500px;
    overflow: visible;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* Zoom-in effect */
#logo-container.zoom {
    transform-origin: 50% 50%;
    transform: scale(40) translate(0, 0);
    transition: transform 8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Reverse zoom-out effect */
#logo-container.reverse-zoom {
    transform-origin: 50% 50%;
    transform: scale(1) translate(0, 0);
    transition: transform 5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Force crisp rendering after zoom completes */
#logo-container.reverse-zoom #iso-logo {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    transform: scale(1.0001); /* Force re-render */
    animation: forceRedraw 0.1s ease-out;
}

@keyframes forceRedraw {
    0% { opacity: 0.9999; }
    100% { opacity: 1; }
}

/* Ensure text stays crisp during and after animations */
#logo-container.zoom *, #logo-container.reverse-zoom * {
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure logo is visible and properly sized */
#iso-logo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    max-width: 500px;
    max-height: 500px;
    vector-effect: non-scaling-stroke;
}

/* Main content styling */
#main-content {
    transition: opacity 3.5s ease-in-out; /* Fade duration */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    background: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), url('concrete.jpg') no-repeat center center; /* White overlay */
    background-size: cover; /* Fills the area */
    opacity: 0; /* Start invisible */
    z-index: 2;
    overflow: hidden; /* ONLY CHANGE: Prevent scrolling in main content */
}

/* Fix text distortion after zoom animations */
#main-content p, #main-content h1, #main-content h2, #main-content h3, 
#main-content span, #main-content div {
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
	
/* Ensure SVG stays sharp when zooming */
#iso-logo {
    width: 100%;
    height: 100%;
    vector-effect: non-scaling-stroke; /* Prevents stroke thickness from changing */
    text-rendering: geometricPrecision; /* Ensures high-quality text rendering */
    shape-rendering: geometricPrecision; /* Prevents pixelation on curves */
    image-rendering: optimizeQuality; /* Forces browser to use the best rendering quality */
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Make sure zoom-in transformation does not blur the logo */
#logo-container.zoom {
    transform-origin: 50% 50%;
    transform: scale(40) translate(0, 0);
    image-rendering: crisp-edges;
    will-change: transform;
}
/* Apply Inter globally */
body {
    font-family: "Inter", sans-serif !important;
    font-weight: 200; /* Regular weight */
}

/* Make headers bold */
h1, h2, h3 {
    font-family: "Inter", sans-serif !important;
    font-weight: 300; /* Bold */
}

/* Ensure text elements use Inter */
p, button, span, div {
    font-family: "Inter", sans-serif !important;
    font-weight: 400;
	
}
#iso-logo {
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}
#main-content #main-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

#main-content.active {
    opacity: 1; /* Fade to visible */
}

/* Force smaller logo on mobile */
@media screen and (max-width: 768px) {
    #logo-container {
        width: 200px; /* Bigger logo on mobile for better visibility */
        height: 200px;
        max-width: 200px;
        max-height: 200px;
        overflow: visible; /* Ensure SVG isn't clipped */
    }
    #iso-logo {
        width: 100%;
        height: auto;
        max-width: 200px;
        max-height: 200px;
        object-fit: contain; /* Maintain aspect ratio */
    }
    
    #main-content #main-logo {
        width: 40px;
        height: 40px;
    }
    
    /* Mobile text sizing */
    #main-content p {
        font-size: 1rem !important;       /* Smaller text for mobile */
        line-height: 1.6 !important;      /* Tighter line height */
        margin: 0.6rem 0 !important;      /* Even less margin */
        padding: 6px 10px !important;     /* Consistent padding with rounded style */
        border-radius: 6px !important;    /* Rounded corners on mobile too */
    }
    
    /* Ensure mobile content fits in viewport */
    #main-content {
        padding: 10px !important;
        box-sizing: border-box;
        justify-content: flex-start !important;
        padding-top: 10px !important;     /* Move everything higher up on mobile */
    }
    
    /* Make sure logo is also moved up on mobile */
    #main-content #main-logo {
        margin-bottom: 0.5rem !important; /* Less space after logo */
    }
    
    /* Ensure Go Back button is visible and accessible */
    #main-content button {
        margin-top: 0.5rem !important;    /* Less margin above button */
        margin-bottom: 30px !important;   /* Space at bottom so it's not cut off */
        padding: 8px 16px !important;     /* Better button padding */
        border-radius: 6px !important;    /* Rounded button corners */
    }
}

/* Ensure text readability over background */
#main-content p, #main-content button {
    position: relative;
    z-index: 3; /* Above background */
    background: rgba(255, 255, 255, 0.4); /* More transparent white for contrast */
    padding: 8px 12px; /* Better padding for aesthetics */
    border-radius: 8px; /* Rounded corners */

}
#main-content p {
  font-size: 1.25rem;       /* Slightly larger text for clarity */
  line-height: 1.8;         /* Adds vertical breathing room */
  margin: 1.2rem 0;         /* Space above and below the text */
  text-align: center;
}

#main-content strong {
  font-weight: 600;         /* Polished bold weight */
}

.phone-link {
  font-family: inherit;
  color: inherit;
  text-decoration: underline;
}
.phone-link:hover { text-decoration: none; }

.contact-link {
  color: blue;               /* Same color for phone and email */
  text-decoration: underline;
  font-family: inherit;      /* Matches surrounding font */
}

.contact-link:hover {
  text-decoration: none;     /* Removes underline on hover for a cleaner look */
}