@font-face {
    font-family: 'Poppins';
    src: url('Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('Poppins-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
}

:root {
    --bg-color: #D4FFA8;
    --text-color: #000000;
    --dark-bg: #07090f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 7.32rem;
    /* Fix to prevent content jump when absolute/fixed header resizes */
}

/* Header Entrance Animation */
@keyframes slideDownHeader {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header {
    padding: 1.5rem 1.5rem;
    /* Reduced from 3rem to move logo left */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--bg-color);
    transition: padding 0.8s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    animation: slideDownHeader 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.header.scrolled {
    padding: 1rem 1.5rem;
    /* Reduced from 3rem to move logo left */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    /* subtle shadow */
}

.logo {
    font-weight: 700;
    font-size: 1.8rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
    position: relative;
    height: 4.32rem;
    width: 8rem;
    /* 1.8rem * 1.2 * 2 lines */
    display: inline-block;
    transition: height 0.8s cubic-bezier(0.16, 1, 0.3, 1), width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    color: inherit;
    text-decoration: none;
}

.header.scrolled .logo {
    height: 2.16rem;
    width: 12rem;
    /* 1 line */
}

.logo-ksm {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.logo-xtech {
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(0, 2.16rem);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    will-change: transform;
}

.header.scrolled .logo-xtech {
    /* Translate next to KSM based on calculated width */
    transform: translate(calc(var(--ksm-width, 3.5rem) + 0.4rem), 0);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Anthropic Word Reveal Animation */
.animate-word-container {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
}

.animate-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1), transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

/* Include hero-subtitle directly since it loads immediately, or just rely on IntersectionObserver setting is-visible */
.is-visible .animate-word,
.word-reveal.is-visible .animate-word {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
    color: var(--text-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #4a5c3e;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 3rem;
}

.button {
    display: inline-block;
    background-color: #1a3215;
    color: var(--bg-color);
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.button:hover {
    background-color: #000000;
    transform: translateY(-2px);
}

/* About Section */
.about {
    background-color: var(--dark-bg);
    color: #FFFFFF;
    padding: 4.5rem 3rem;
}

.about-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.about-heading {
    flex: 0 0 auto;
}

.about-heading h2 {
    color: var(--bg-color);
    font-size: 4.5rem;
    font-weight: 700;
    letter-spacing: -1.2px;
    line-height: 1;
}

.about-content {
    flex: 1;
    max-width: 550px;
}

.about-content p {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #e0e0e0;
    font-weight: 500;
}

.contact-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    /* Allows email to wrap under button on very tiny screens if needed */
    gap: clamp(0.75rem, 3.5vw, 2.5rem);
}

.contact-btn {
    border: 2px solid #FFFFFF;
    color: #FFFFFF;
    padding: clamp(0.35rem, 1vw + 0.2rem, 0.6rem) clamp(1rem, 3vw, 2rem);
    font-weight: 700;
    font-size: clamp(0.75rem, 1.5vw, 1rem);
    /* slightly smaller minimum */
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.contact-email {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    font-size: clamp(0.8rem, 1.8vw, 1.1rem);
    /* slightly smaller minimum */
    word-break: break-all;
    /* Ensures long emails break instead of overflowing if wrapping fails */
}

.contact-email:hover {
    text-decoration: underline;
    color: #FFFFFF;
}

/* Policy Pages */
.policy-page .header {
    background-color: var(--dark-bg);
    color: var(--bg-color);
}

.policy-content {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 2rem;
    flex: 1;
}

.policy-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.policy-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1a3215;
}

.policy-content h3 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.policy-content p {
    margin-bottom: 1rem;
}

.policy-content ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.policy-content li {
    margin-bottom: 0.5rem;
}

.policy-content hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.policy-content a {
    color: #1a3215;
    font-weight: 600;
}

/* Footer */
.footer {
    padding: 5rem 2rem 3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.footer-links a {
    color: #556b46;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
}

.footer-links a:hover {
    color: var(--text-color);
}

.separator {
    color: #000;
    font-weight: 800;
}

.copyright {
    font-size: 0.9rem;
    color: #556b46;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 900px) {
    .about-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .hero-title {
        font-size: 4rem;
    }

    .about-heading h2 {
        font-size: 3.5rem;
    }

    .about-content {
        max-width: 100%;
    }

    .hero-subtitle br {
        display: none;
    }
}