/* Tol Engineering - Index4 Design System (Clean White/Red + Animations) */
:root {
    --primary-red: #d90707;
    --text-dark: #111111;
    --text-lead: #333333;
    --text-light: #666666;
    --bg-white: #ffffff;
    --bg-offwhite: #f4f4f4;
    --font-primary: 'Inter', sans-serif;
    --transition-slow: 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    --primary-orange: #CE6B28;
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* REUSABLE ANIMATION CLASSES */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

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

.expand-width {
    width: 0;
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.expand-width.active {
    width: 100%;
}

.scale-up {
    transform: scale(0.9);
    opacity: 0;
    transition: var(--transition-slow);
}

.scale-up.active {
    transform: scale(1);
    opacity: 1;
}

/* HEADER */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 40px;
    /* Slight adjustment for logo height */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.95);
    /* White background for logo */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* Subtle separation */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--text-dark);
}

header .logo {
    display: flex;
    align-items: center;
    /* Optional: Ensure white bg strictly behind logo if needed, but header handles it */
}

.lang-switcher {
    margin-left: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    gap: 5px;
}

.lang-btn {
    background: none;
    border: none;
    color: inherit;
    font-weight: 500;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.3s;
    font-family: inherit;
}

.lang-btn:hover,
.lang-btn.active {
    opacity: 1;
    color: var(--primary-orange);
}

/* HERO SECTION */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 5%;
}



.hero-bg-curtain {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    /* Expands to 100% on load */
    background-color: var(--primary-orange);
    z-index: -1;
    animation: curtainOpen 1.5s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes curtainOpen {
    0% {
        width: 0%;
        left: 0;
    }

    50% {
        width: 100%;
        left: 0;
    }

    100% {
        width: 0%;
        left: 100%;
    }
}

/* Text that appears after curtain */
.hero-content {
    max-width: 900px;
    opacity: 0;
    animation: fadeIn 1s 1s forwards;
    /* Delay until curtain passes */
}

.hero h1 {
    font-size: 5rem;
    letter-spacing: -2px;
    margin-bottom: 30px;
}

.hero-sub {
    font-size: 50%;
    /* relative to parent h1 */
    font-weight: 300;
    display: inline-block;
}

.hero p {
    font-size: 1.5rem;
    color: var(--text-light);
    max-width: 600px;
}

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


/* SECTION: INTRO (Expanding Text) */
.intro-section {
    padding: 150px 5%;
    background-color: var(--bg-white);
}

.intro-container {
    max-width: 1200px;
    margin: 0 auto;
    border-left: 1px solid #ddd;
    padding-left: 40px;
}

.intro-big-text {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text-lead);
    line-height: 1.4;
}

.highlight-red {
    color: var(--primary-red);
    font-weight: 600;
}

.highlight-orange {
    color: var(--primary-orange);
    font-weight: 600;
}

/* SECTION: SERVICES (ZIG ZAG LAYOUT) */
.services-section {
    background-color: var(--bg-offwhite);
    padding: 120px 5%;
}

.services-container {
    max-width: 1200px;
    margin: 0 auto;
}

.service-row {
    display: flex;
    align-items: center;
    gap: 80px;
    margin-bottom: 150px;
    /* Good spacing between rows */
}

.service-row:last-child {
    margin-bottom: 0;
}

.service-row.reverse {
    flex-direction: row-reverse;
}

.service-text {
    flex: 1;
}

.service-image {
    flex: 1;
    height: 400px;
    /* Reduced height compared to stacking cards */
    overflow: hidden;
    border-radius: 4px;
    /* Slight softening if desired, or keep sharp */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.service-image img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-row:hover .service-image img {
    transform: scale(1.05);
}

.service-number {
    font-size: 3rem;
    font-weight: 900;
    color: #e0e0e0;
    margin-bottom: 10px;
    line-height: 1;
}

.service-text h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.service-text p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--primary-orange);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}


/* SECTION: PROJECTS (Zig-Zag) */
.projects-section {
    padding: 150px 5%;
}

.project-row {
    display: flex;
    align-items: center;
    gap: 80px;
    margin-bottom: 150px;
}

.project-row:last-child {
    margin-bottom: 0;
}

.project-row.reverse {
    flex-direction: row-reverse;
}

.project-text {
    flex: 0.4;
}

.project-image {
    flex: 0.6;
    height: 500px;
    overflow: hidden;
    position: relative;
    border-radius: 4px;
}

.project-image img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.project-row:hover .project-image img {
    transform: scale(1.05);
    /* Gentle zoom */
}

.project-text h3 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.project-text p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.project-meta {
    font-family: monospace;
    color: var(--primary-red);
    margin-bottom: 10px;
    display: block;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* SECTION: CONTACT */
.contact-section {
    padding: 120px 5%;
    background-color: #111;
    /* Dark footer area */
    color: #fff;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 50px;
}

.contact-info h2 {
    font-size: 3rem;
    margin-bottom: 40px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 600px;
}

.contact-item h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 10px;
}

.contact-item p {
    font-size: 1.2rem;
    font-weight: 500;
}

.contact-item a {
    border-bottom: 1px solid #444;
    padding-bottom: 2px;
}

.contact-item a:hover {
    color: var(--primary-red);
    border-color: var(--primary-red);
}


/* FOOTER */
footer {
    background-color: #111;
    color: #444;
    padding: 30px 5%;
    text-align: center;
    border-top: 1px solid #222;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {

    .service-row,
    .service-row.reverse {
        flex-direction: column;
        gap: 40px;
        text-align: left;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .contact-section {
        flex-direction: column;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .service-image {
        height: 300px;
        width: 100%;
    }
}

/* COOKIE BANNER */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-top: 1px solid #ddd;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    flex-wrap: wrap;
    gap: 20px;
}

.cookie-content p {
    font-size: 0.95rem;
    color: var(--text-lead);
    max-width: 800px;
}

.cookie-content a {
    color: var(--primary-red);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 15px;
}

.btn-cookie-primary,
.btn-cookie-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: 0.3s;
}

.btn-cookie-primary {
    background-color: var(--primary-red);
    color: #fff;
}

.btn-cookie-primary:hover {
    background-color: #b00606;
}

.btn-cookie-secondary {
    background-color: #f4f4f4;
    color: var(--text-dark);
    border: 1px solid #ddd;
}

.btn-cookie-secondary:hover {
    background-color: #e0e0e0;
}

.hidden {
    display: none !important;
}

/* COOKIE MODAL */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.cookie-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.cookie-modal-content h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.cookie-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.cookie-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    cursor: pointer;
}

.cookie-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-red);
}

.cookie-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-actions {
        width: 100%;
        justify-content: space-between;
    }

    .btn-cookie-primary,
    .btn-cookie-secondary {
        flex: 1;
        text-align: center;
    }
}