/* Founder's Letter Section Styles */

.letter-section {
    padding: 100px 0;
    background-color: #E8E4E4;
    overflow: hidden;
    position: relative;
}

/* Background effects */
.letter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.3;
}

/* Ambient Animated Blobs */
.letter-ambient-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: floatOrb 15s infinite ease-in-out alternate;
}

.ambient-orb-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: rgba(180, 244, 97, 0.15); /* Green, brand color */
    animation-delay: 0s;
}

.ambient-orb-3 {
    top: 30%;
    left: 40%;
    width: 500px;
    height: 500px;
    background: rgba(255, 100, 150, 0.08); /* Soft pink/orange */
    animation-delay: -10s;
    animation-duration: 22s;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

.letter-layout {
    display: flex;
    align-items: flex-start;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Image Column */
.letter-image-container {
    flex: 0 0 450px;
    position: sticky;
    top: 120px;
    perspective: 1000px;
}

.letter-image-wrapper {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255,255,255,0.5) inset;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.6s ease;
}

.letter-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.4) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.letter-image-container:hover .letter-image-wrapper {
    transform: translateY(-10px) rotateX(2deg) rotateY(-2deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255,255,255,0.7) inset;
}

.letter-image-container:hover .letter-image-wrapper::after {
    opacity: 1;
}

.founder-photo {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-origin: center center;
}

.letter-image-container:hover .founder-photo {
    transform: scale(1.08);
}

.letter-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: #B4F461;
    color: #1a1a1a;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(180, 244, 97, 0.4);
    z-index: 2;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.letter-image-container:hover .letter-badge {
    transform: translateY(0);
    opacity: 1;
}

/* Content Column (The Card) */
.letter-content-wrapper {
    flex: 1;
}

.letter-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 60px;
    border-radius: 40px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.letter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

/* Quote Mark Background */
.letter-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 200px;
    font-family: Georgia, serif;
    color: rgba(0, 0, 0, 0.03);
    line-height: 1;
    pointer-events: none;
    transform: rotate(10deg);
    transition: transform 0.5s ease;
}

.letter-card:hover::before {
    transform: rotate(0deg) scale(1.1);
}

.letter-header {
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.letter-date {
    display: block;
    font-size: 14px;
    color: #888;
    margin-bottom: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.letter-title {
    font-size: 38px;
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1.2;
    background: linear-gradient(90deg, #1a1a1a, #4a4a4a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
}

.letter-body {
    color: #444;
    font-size: 18px;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.letter-body p {
    margin-bottom: 24px;
    opacity: 0.9;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.letter-card:hover .letter-body p {
    opacity: 1;
}

.letter-body strong {
    color: #1a1a1a;
    background: linear-gradient(120deg, rgba(180, 244, 97, 0.4) 0%, rgba(180, 244, 97, 0) 100%);
    background-size: 100% 40%;
    background-repeat: no-repeat;
    background-position: 0 100%;
}

/* Footer & Signature */
.letter-footer {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.letter-signature {
    display: flex;
    flex-direction: column;
    position: relative;
}

.founder-name {
    font-size: 28px;
    font-weight: 900;
    color: #1a1a1a;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
}

.founder-name::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 0;
    height: 3px;
    background: #B4F461;
    transition: width 0.4s ease;
}

.letter-card:hover .founder-name::after {
    width: 100%;
}

.founder-role {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
    font-weight: 500;
}

.letter-cta {
    background: #1a1a1a;
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.letter-cta:hover {
    background: #B4F461;
    color: #1a1a1a;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 25px rgba(180, 244, 97, 0.4);
}

/* Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 991px) {
    .letter-layout {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
    
    .letter-image-container {
        position: relative;
        top: 0;
        flex: 0 0 auto;
        width: 100%;
        max-width: 500px;
    }
    
    .letter-card {
        padding: 40px;
    }
}

@media (max-width: 576px) {
    .letter-section {
        padding: 60px 0;
    }
    
    .letter-card {
        padding: 30px;
        border-radius: 30px;
    }
    
    .letter-title {
        font-size: 28px;
    }
    
    .letter-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }
    
    .letter-cta {
        width: 100%;
        text-align: center;
    }
}
