body {
    overflow-x: hidden;
    max-width: 100%;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

* {
    box-sizing: border-box;
}

.nav-link {
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #0f766e;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: #374151;
    font-weight: 600;
}

.mobile-nav-link:hover {
    background: #f0fdfa;
    color: #0f766e;
}

.section-label {
    color: #0f766e !important;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.2em;
}

.section-heading {
    margin-top: 0.75rem;
    color: #132a13 !important;
    font-family: "Ubuntu", sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.hero-grid {
    background-image:
        linear-gradient(
            rgba(15, 118, 110, 0.045) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(15, 118, 110, 0.045) 1px,
            transparent 1px
        );

    background-size: 40px 40px;
}

.reveal,
.hero-reveal {
    opacity: 0;
    transform: translateY(18px);

    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.reveal.is-visible,
.hero-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}


/* =========================================
   PROJECT CARDS
========================================= */

.project-card {
    position: relative;
    min-width: 0;
}

.project-card::before {
    content: "";

    position: absolute;
    inset: 0;

    border-radius: 1.5rem;

    pointer-events: none;

    background: linear-gradient(
        135deg,
        rgba(20, 184, 166, 0.08),
        transparent 45%
    );

    opacity: 0;

    transition: opacity 0.3s ease;
}

.project-card:hover::before {
    opacity: 1;
}


/* =========================================
   APPROACH CARDS
========================================= */

.approach-card {
    position: relative;

    padding: 1.25rem;

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.25rem;

    background: rgba(255, 255, 255, 0.045);

    transition:
        transform 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease;
}

.approach-card:hover {
    transform: translateY(-4px);

    background: rgba(20, 184, 166, 0.09);

    border-color: rgba(45, 212, 191, 0.25);
}

.approach-card .step-number {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 2.25rem;
    height: 2.25rem;

    margin-bottom: 1rem;

    border-radius: 0.75rem;

    background: rgba(45, 212, 191, 0.12);

    color: #5eead4;

    font-size: 0.75rem;
    font-weight: 800;
}

.approach-card h3 {
    margin-bottom: 0.5rem;

    font-family: "Ubuntu", sans-serif;

    font-size: 1.2rem;
    font-weight: 700;

    color: white;
}

.approach-card p {
    color: rgba(255, 255, 255, 0.62);

    font-size: 0.875rem;
    line-height: 1.65;
}


/* =========================================
   SERVICE CARDS
========================================= */

.service-card {
    padding: 1.4rem;

    border: 1px solid #e5e7eb;
    border-radius: 1.25rem;

    background: white;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);

    border-color: #99f6e4;

    box-shadow:
        0 18px 40px rgba(19, 42, 19, 0.07);
}

.service-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 2.5rem;
    height: 2.5rem;

    margin-bottom: 1rem;

    border-radius: 0.8rem;

    background: #f0fdfa;

    color: #0f766e;
}

.service-card h3 {
    color: #132a13;

    font-family: "Ubuntu", sans-serif;

    font-size: 1.15rem;
    font-weight: 700;
}

.service-card p {
    margin-top: 0.5rem;

    color: #6b7280;

    font-size: 0.875rem;
    line-height: 1.65;
}


/* =========================================
   LOGO
========================================= */

.logo-wrapper {
    display: flex;

    align-items: center;
    justify-content: center;

    min-width: 0;
}


/* =========================================
   FLOATING WHATSAPP
========================================= */

@media (max-width: 640px) {
    .fixed.bottom-5.right-5 span:first-child {
        display: none;
    }
}


/* =========================================
   LANTERN PAGE LOADER
========================================= */

#pageLoader {
    position: fixed;
    inset: 0;

    z-index: 99999;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    max-width: 100vw;

    height: 100dvh;

    background: #07140f;

    opacity: 1;
    visibility: visible;

    transition:
        opacity 0.7s ease,
        visibility 0.7s ease;
}

#pageLoader.page-loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.lantern-loader {
    position: relative;

    width: 120px;
    height: 120px;

    display: flex;

    align-items: center;
    justify-content: center;
}

.lantern-glow {
    position: absolute;

    width: 35px;
    height: 35px;

    border-radius: 50%;

    background: radial-gradient(
        circle,
        rgba(45, 212, 191, 0.85) 0%,
        rgba(45, 212, 191, 0.35) 30%,
        rgba(45, 212, 191, 0.08) 60%,
        transparent 75%
    );

    transform: scale(0.2);

    animation:
        lanternGlow 1.4s ease-out forwards;
}

.lantern-flare {
    position: absolute;

    width: 18px;
    height: 18px;

    border-radius: 50%;

    background: #ffffff;

    opacity: 0;

    box-shadow:
        0 0 10px rgba(255, 255, 255, 0.9),
        0 0 25px rgba(45, 212, 191, 0.9),
        0 0 55px rgba(45, 212, 191, 0.6);

    animation:
        lanternFlare 1.2s ease-out forwards;
}

.lantern-loader-logo {
    position: relative;

    z-index: 2;

    width: 72px;
    height: 72px;

    object-fit: contain;

    background: #ffffff;

    border-radius: 50%;

    padding: 5px;

    opacity: 0;

    transform: scale(0.65);

    animation:
        lanternLogo
        1s
        cubic-bezier(0.22, 1, 0.36, 1)
        0.25s
        forwards;

    box-shadow:
        0 0 0 rgba(45, 212, 191, 0),
        0 0 0 rgba(45, 212, 191, 0);
}


/* =========================================
   LANTERN ANIMATIONS
========================================= */

@keyframes lanternGlow {
    0% {
        opacity: 0;
        transform: scale(0.2);
    }

    20% {
        opacity: 0.8;
    }

    45% {
        opacity: 1;
        transform: scale(2);
    }

    75% {
        opacity: 0.85;
        transform: scale(4);
    }

    100% {
        opacity: 0.35;
        transform: scale(6);
    }
}

@keyframes lanternFlare {
    0% {
        opacity: 0;
        transform: scale(0.2);
    }

    25% {
        opacity: 1;
        transform: scale(1);
    }

    40% {
        opacity: 0.7;
        transform: scale(2);
    }

    60% {
        opacity: 0;
        transform: scale(4);
    }

    100% {
        opacity: 0;
        transform: scale(4);
    }
}

@keyframes lanternLogo {
    0% {
        opacity: 0;
        transform: scale(0.65);

        filter: brightness(0.4);
    }

    45% {
        opacity: 1;

        transform: scale(1.08);

        filter: brightness(1.6);

        box-shadow:
            0 0 25px rgba(45, 212, 191, 0.8),
            0 0 60px rgba(45, 212, 191, 0.4);
    }

    65% {
        transform: scale(0.98);

        filter: brightness(1.15);
    }

    100% {
        opacity: 1;

        transform: scale(1);

        filter: brightness(1);

        box-shadow:
            0 0 18px rgba(45, 212, 191, 0.35),
            0 0 40px rgba(45, 212, 191, 0.15);
    }
}


/* =========================================
   PROJECT MODAL
========================================= */

#projectModal {
    position: fixed;

    inset: 0;

    z-index: 100;

    display: none;

    align-items: center;
    justify-content: center;

    width: 100%;
    max-width: 100vw;

    height: 100dvh;

    padding: 16px;

    overflow: hidden;

    box-sizing: border-box;
}

#projectModal:not(.hidden) {
    display: flex;
}

#modalBackdrop {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    background: rgba(7, 20, 15, 0.80);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#modalPanel {
    position: relative;

    z-index: 1;

    width: min(100%, 1000px);
    max-width: 100%;

    max-height: calc(100dvh - 32px);

    margin: 0 auto;

    overflow-x: hidden;
    overflow-y: auto;

    box-sizing: border-box;

    border-radius: 24px;

    background: #ffffff;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.25);

    overscroll-behavior: contain;

    scrollbar-width: thin;
}


/* =========================================
   MODAL GRID
========================================= */

#modalPanel > .grid {
    width: 100%;
    max-width: 100%;

    min-width: 0;
}

#modalPanel > .grid > * {
    min-width: 0;
    max-width: 100%;
}


/* =========================================
   MODAL IMAGE
========================================= */

#modalPanel > .grid > div:first-child {
    min-width: 0;
    max-width: 100%;

    overflow: hidden;
}

#modalPanel > .grid > div:first-child > div {
    width: 100%;
    max-width: 100%;

    min-width: 0;

    overflow: hidden;
}

#modalImage {
    display: block;

    width: 100%;
    max-width: 100%;

    height: 100%;

    min-width: 0;

    object-fit: contain;
    object-position: center;

    background: linear-gradient(
        135deg,
        #f5f4ef 0%,
        #e8f3ed 50%,
        #d9eee6 100%
    );
}


/* =========================================
   MODAL CONTENT
========================================= */

#modalPanel > .grid > div:last-child {
    min-width: 0;
    max-width: 100%;

    overflow-wrap: anywhere;
    word-break: break-word;
}

#modalType {
    max-width: 100%;

    overflow-wrap: anywhere;
    word-break: break-word;
}

#modalTitle {
    max-width: 100%;

    overflow-wrap: anywhere;
    word-break: break-word;

    line-height: 1.15;
}

#modalDescription {
    max-width: 100%;

    overflow-wrap: anywhere;
    word-break: break-word;

    line-height: 1.7;
}

#modalTech {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    width: 100%;
    max-width: 100%;

    min-width: 0;
}

#modalTech > * {
    max-width: 100%;

    min-width: 0;

    overflow-wrap: anywhere;
    word-break: break-word;
}


/* =========================================
   MODAL BUTTONS
========================================= */

#modalLink,
#modalCloseButton {
    max-width: 100%;

    min-width: 0;

    box-sizing: border-box;

    white-space: normal;

    overflow-wrap: anywhere;
}

#closeModal {
    max-width: calc(100% - 16px);
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 767px) {

    #projectModal {
        align-items: flex-end;

        padding: 0;
    }

    #modalPanel {
        width: 100%;
        max-width: 100%;

        max-height: 94dvh;

        border-radius: 22px 22px 0 0;

        overflow-x: hidden;
        overflow-y: auto;
    }

    #modalPanel > .grid {
        display: block;
    }

    #modalPanel > .grid > div {
        width: 100%;
        max-width: 100%;
    }

    #modalPanel > .grid > div:first-child {
        height: auto;
    }

    #modalPanel > .grid > div:first-child > div {
        width: 100%;

        min-height: 210px;
        height: 210px;

        max-height: 260px;

        display: flex;

        align-items: center;
        justify-content: center;

        overflow: hidden;
    }

    #modalImage {
        width: 100%;
        height: 100%;

        object-fit: contain;
    }

    #modalPanel > .grid > div:last-child {
        width: 100%;
        max-width: 100%;

        padding: 24px;

        overflow: hidden;
    }

    #modalTitle {
        font-size: 1.7rem;
    }

    #modalDescription {
        font-size: 0.95rem;
    }

    #modalLink,
    #modalCloseButton {
        width: 100%;
        max-width: 100%;

        min-height: 48px;

        display: flex;

        align-items: center;
        justify-content: center;

        text-align: center;
    }
}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    #projectModal {
        padding: 0;
    }

    #modalPanel {
        width: 100%;
        max-width: 100%;

        max-height: 95dvh;

        border-radius: 20px 20px 0 0;
    }

    #modalPanel > .grid > div:first-child > div {
        min-height: 180px;
        height: 180px;

        max-height: 210px;
    }

    #modalPanel > .grid > div:last-child {
        padding: 20px;
    }

    #modalTitle {
        font-size: 1.45rem;

        padding-right: 32px;
    }

    #modalDescription {
        font-size: 0.9rem;

        line-height: 1.65;
    }

    #modalType {
        font-size: 0.7rem;
    }

    #modalTech {
        gap: 6px;
    }

    #modalTech > * {
        font-size: 0.7rem;
    }

    #modalLink,
    #modalCloseButton {
        padding-left: 16px;
        padding-right: 16px;

        font-size: 0.85rem;
    }

    #closeModal {
        top: 12px;
        right: 12px;

        width: 36px;
        height: 36px;
    }
}


/* =========================================
   VERY SMALL PHONES
========================================= */

@media (max-width: 380px) {

    #modalPanel {
        max-height: 96dvh;

        border-radius: 18px 18px 0 0;
    }

    #modalPanel > .grid > div:first-child > div {
        min-height: 155px;
        height: 155px;
    }

    #modalPanel > .grid > div:last-child {
        padding: 16px;
    }

    #modalTitle {
        font-size: 1.3rem;
    }

    #modalDescription {
        font-size: 0.85rem;
    }

    #modalLink,
    #modalCloseButton {
        min-height: 46px;
    }
}


/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

    #pageLoader {
        transition: none;
    }

    .lantern-glow,
    .lantern-flare,
    .lantern-loader-logo {
        animation: none;
    }

    .lantern-loader-logo {
        opacity: 1;
        transform: scale(1);
    }

    .reveal,
    .hero-reveal {
        opacity: 1;
        transform: none;

        transition: none;
    }
}