/* About Page - Simple & Smart Design */

/* Interactive Hero Section */
.hero-interactive {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #eeedeb 100%, #fff 100%);
}

.hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-bg-image {
    position: absolute;
    opacity: 0.99;
    transition: opacity 0.3s ease-out;
    will-change: transform, opacity;
    /* filter: blur(2px); */ /* TEMPORARY: Disabled for testing */
}

.hero-bg-image.moving {
    opacity: 0.98;
}

/* Slide out when scrolling - WITH DISTANCE LIMIT */
.hero-bg-image.slide-out {
    opacity: 0;
    transform: translate(
        clamp(-400px, var(--slide-x, 0), 400px), 
        clamp(-400px, var(--slide-y, 0), 400px)
    ) scale(0.8) !important;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.hero-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.line-space{
	margin-top:15px;
}

/* Background Image Positions */
/* Original 4 images - in screen */
.bg-1 {
    top: 50%;
    left: 5%;
    width: 20vw;
    transform: rotate(-15deg);
}

.bg-2 {
    top: 15%;
    right: 8%;
    width: 20vw;
    transform: rotate(10deg);
}

.bg-3 {
    bottom: 15%;
    left: 10%;
    width: 15vw;
    transform: rotate(15deg);
}

.bg-4 {
    bottom: -10%;
    right: 15%;
    width: 25vw;
    transform: rotate(-15deg);
}

.bg-5 {
    top: -10%;
    left: 40%;
    transform: rotate(20deg);
    width: 25vw;
}

.bg-6 {
    top: 50%;
    right: 15%;
    transform: rotate(-20deg);
    width: 40vw;
}

.bg-7 {
    bottom: -10%;
    left: 30%;
    transform: rotate(25deg);
    width: 25vw;
}

.bg-8 {
    top: 5%;
    left: -5%;
    transform: rotate(-25deg);
    width: 25vw;
}

.bg-9 {
    top: -15%;
    right: 25%;
    transform: rotate(18deg);
    width: 25vw;
}

.bg-10 {
    bottom: 20%;
    right: -10%;
    transform: rotate(-15deg);
    width: 20vw;
}

.bg-11 {
    bottom: 5%;
    right: 5%;
    transform: rotate(-15deg);
    width: 10vw;
}

.bg-12 {
    bottom: 30%;
    left: 20%;
    transform: rotate(15deg);
    width: 10vw;
}

/* Hero Overlay */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 100%);
    pointer-events: none;
}

/* Hero Logo */
.hero-logo {
    position: relative;
    z-index: 10;
    text-align: center;
    animation: fadeInScale 1.5s ease forwards;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.logo-main {
    width: clamp(200px, 50vw, 250px);
    height: auto;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease-out, width 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 1s ease;
    position: relative;
    z-index: 20;
}

.hero-subtitle {
    margin-top: 2rem;
    font-size: clamp(1.5rem, 2.5vw, 1.5rem);
    color: var(--dark);
    font-weight: 400;
    letter-spacing: 0.1em;
    opacity: 0;

    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

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

/* Scroll Down Indicator */
.scroll-down {
    position: absolute;
    bottom: 40px;
    /* left: 50%; */
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    opacity: 0;
    animation: fadeIn 1s ease forwards 1.5s;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.scroll-down span {
    display: block;
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 500;
}

.scroll-arrow {
    font-size: 1.5rem;
    color: #323232;
    animation: bounce 2s ease-in-out infinite;
}

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

/* Logo stays in hero - no scroll movement */
.logo-main.scrolled {
    /* Removed - logo stays in place */
}

/* Hero logo container */
.hero-logo {
    position: relative;
    z-index: 10;
    text-align: center;
    animation: fadeInScale 1.5s ease forwards;
}

/* Container */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 120px 40px 60px 40px;
    position: relative;
    background: white;
    z-index: 1;
    min-height: 100vh;
}

/* Add padding to first section */
.text-section.first-section {
    padding-top: 0;
    position: relative;
}

/* Article */
.about-article {
    position: relative;
}

/* Text Sections */
.text-section {
    margin-bottom: 5rem;
    opacity: 1;
    transform: translateY(0);
}

/* Small logo above first section title */
.section-logo {
    width: 100px;
    height: auto;
    display: block;
    margin: 0 auto -5px auto;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.text-section.animate {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.text-section.animate.visible {
    opacity: 1;
    transform: translateY(0);
}

.text-section h2 {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    margin-top: 0;
    line-height: 1.4;
	display: inline; 
}

/* Word-by-word animation for h2 */
.text-section h2 .word {
    display: inline-block;
    opacity: 0.3;
    color: #ccc;
    transform: translateY(0px);
    transition: opacity 0.5s ease, color 0.5s ease, transform 0.5s ease;
}

.text-section.visible h2 .word {
    opacity: 1;
    color: var(--primary);
    transform: translateY(0);
}

.text-section p {
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 2;
    color: var(--dark);
    margin: 0;
    text-align: justify;
    font-family: "Noto Sans HK", sans-serif;
    letter-spacing: 0.02em;
}

.text-section.closing {
    text-align: center;
    margin-top: 5rem;
    padding-top: 3rem;
    position: relative;
}

/* Animated line that grows from left to right */
.text-section.closing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0%;
    max-width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 2s cubic-bezier(0.5, 0, 0.2, 1);
}

/* When section becomes visible, grow the line */
.text-section.closing.visible::before {
    width: 100%;
}

.text-section.closing p {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--secondary);
    text-align: center;
}

/* Footer */
.about-footer {
    margin-top: 5rem;
    padding-top: 3rem;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-link {
    font-size: 1rem;
    color: var(--primary);
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--primary);
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(32, 164, 186, 0.3);
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 10000;
    transition: width 0.1s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-bg-image {\n        opacity: 0.99;\n    }\n    \n    .hero-bg-image.moving {\n        opacity: 0.98;\n    }
    
    /* Adjust positions for smaller screens */
    .bg-1 {
		top: 30%;
		left: 5%;
		width: 30vh;
		transform: rotate(-15deg);
	}

	.bg-2 {
		top: 5%;
		right: 0%;
		width: 30vh;
		transform: rotate(10deg);
	}

	.bg-3 {
		bottom: 15%;
		left: 10%;
		width: 25vh;
		transform: rotate(15deg);
	}

	.bg-4 {
		bottom: 10%;
		right: 5%;
		width: 30vh;
		transform: rotate(-15deg);
	}

	.bg-5 {
		top: 80%;
		left: 60%;
		transform: rotate(20deg);
		width: 25vh;
	}

	.bg-6 {
		top: 30%;
		right: -35%;
		transform: rotate(-20deg);
		width: 50vh;
	}

	.bg-7 {
		bottom: -10%;
		left: 20%;
		transform: rotate(25deg);
		width: 30vh;
	}

	.bg-8 {
		top: 10%;
		left: -5%;
		transform: rotate(-25deg);
		width: 30vh;
	}

	.bg-9 {
		top: -15%;
		right: 20%;
		transform: rotate(18deg);
		width: 30vh;
	}

	.bg-10 {
		bottom: 20%;
		right: -10%;
		transform: rotate(-15deg);
		width: 25vh;
	}
    
	.bg-11 {
		bottom: 5%;
		right: 5%;
		transform: rotate(-15deg);
		width: 15vh;
	}
	
	.bg-12 {
		bottom: 5%;
		right: left%;
		transform: rotate(-15deg);
		width: 15vh;
	}
	
    .logo-main {
        width: 55vw;
        max-width: 350px;
    }
    
    .logo-main.scrolled {
        width: 80px;
    }
    
    .text-section.first-section {
        padding-top: 0px;
    }
    
    .text-section.first-section.logo-visible {
        padding-top: 120px;
    }

    .about-container {
        padding: 80px 30px 50px 30px; 
    }

    .text-section {
        margin-bottom: 3.5rem;
    }

    .text-section p {
        text-align: left;
        line-height: 1.9;
    }

    .social-links {
        gap: 1rem;
    }

    .social-link {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
    
    .scroll-down {
        bottom: 30px;
    }
	
	.section-logo {
		width: 75px;
	}
}

@media (max-width: 480px) {
    .about-container {
        padding: 80px 20px 50px 20px;
    }

    .text-section h2 {
        margin-bottom: 1rem;
    }

    .about-footer {
        margin-top: 4rem;
        padding-top: 2rem;
    }

    .social-links {
        flex-direction: column;
        gap: 0.8rem;
    }

    .social-link {
        display: block;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
}

/* Print Styles */
@media print {
    .hero-interactive {
        height: auto;
        page-break-after: always;
    }
    
    .hero-bg-container,
    .scroll-down {
        display: none !important;
    }

    .about-container {
        padding: 20px;
        max-width: 100%;
    }

    .reading-progress,
    .about-footer {
        display: none !important;
    }

    .text-section {
        page-break-inside: avoid;
    }
}

/* Selection Color */
::selection {
    background: rgba(32, 164, 186, 0.2);
    color: var(--dark);
}

::-moz-selection {
    background: rgba(32, 164, 186, 0.2);
    color: var(--dark);
}
