:root {
    --sand: #efede9;
    --ink: #141411;
    --muted: #7d7d7d;
    /* Base font size scales with viewport */
    font-size: clamp(12px, 1vw, 16px);
}

/* HK Gothic fonts from local fonts folder */
@font-face {
    font-family: 'HK Gothic';
    src: url('fonts/hk-gothic/HK Gothic Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'HK Gothic';
    src: url('fonts/hk-gothic/HK Gothic SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

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

body {
    font-family: 'HK Gothic', sans-serif;
    font-weight: 600;
    background: var(--sand);
    color: var(--ink);
    overflow-x: hidden;
    overflow-y: auto;
    font-size: clamp(14px, 1.2vw, 16px);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: transparent;
    padding: clamp(15px, 1.56vw, 30px) clamp(20px, 3.65vw, 70px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
    pointer-events: none;
}

.header>* {
    pointer-events: auto;
}

.logo-image {
    height: clamp(40px, 4.17vw, 80px);
    width: clamp(116px, 12.08vw, 232px);
    max-width: 100%;
    object-fit: contain;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    position: relative;
    z-index: 10001;
}

body.menu-open .menu-toggle {
    opacity: 0;
    pointer-events: none;
}

.menu-toggle span {
    width: clamp(20px, 1.56vw, 30px);
    height: clamp(2px, 0.16vw, 3px);
    background: #000000;
    transition: all 0.3s ease;
}


.services-frame {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    width: 100%;
    will-change: transform;
}

/* Frame 1 – Hero */
.services-frame-1 {
    background: #ffffff;
    display: flex;
    align-items: flex-start;
    /* move content towards top */
    justify-content: flex-start;
    padding: clamp(120px, 11.46vw, 220px) clamp(20px, 3.65vw, 70px) 0;
    /* position hero text slightly lower */
    z-index: 100;
    overflow: hidden;
}

.services-frame-1::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: clamp(-60px, -6.25vw, -120px);
    width: 100%;
    /* span from left to right corners */
    height: clamp(400px, 49.48vw, 950px);
    /* slightly larger image height */
    background: url('assets/service1.png') center bottom/contain no-repeat;
    background-size: contain;
    z-index: 1;
}

@media (min-width: 1025px) {
    .services-frame-1::after {
        bottom: clamp(-100px, -10vw, -180px);
        background-position: center calc(100% - 1vh);
    }
}

.services-hero-content {
    position: relative;
    z-index: 2;
    max-width: clamp(300px, 34.48vw, 662px);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 1.25vw, 24px);
}

.services-hero-title {
    font-size: clamp(36px, 6.25vw, 120px);
    line-height: 1;
    letter-spacing: clamp(-2px, -0.21vw, -4px);
    font-weight: 540;
    color: #141411;
    white-space: nowrap;
    /* keep "Our Services" on a single line */
}

.services-hero-description {
    font-size: clamp(14px, 1.04vw, 20px);
    line-height: clamp(24px, 2.08vw, 40px);
    font-weight: 300;
    color: #546B7C;
    text-align: justify;
    letter-spacing: -0.02em;
}

.services-hero-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: clamp(12px, 1.25vw, 24px) clamp(28px, 2.92vw, 56px);
    gap: clamp(5px, 0.52vw, 10px);
    width: clamp(160px, 12.5vw, 240px);
    height: clamp(40px, 3.13vw, 60px);
    background: #00223B;
    border-radius: clamp(4px, 0.42vw, 8px);
    border: none;
    font-family: 'HK Gothic', sans-serif;
    font-weight: 500;
    font-size: clamp(14px, 0.94vw, 18px);
    line-height: clamp(18px, 1.15vw, 22px);
    letter-spacing: -0.04em;
    color: #FFFFFF;
    cursor: pointer;
}

/* Frame 2 – Services List (long scroll) */
.services-frame-2 {
    background: #ffffff;
    z-index: 200;
    padding: clamp(80px, 7.29vw, 140px) 0 0;
    /* no extra space after last row */
    overflow: hidden;
}

.services-list-container {
    width: 100%;
    padding: 0 clamp(20px, 3.65vw, 70px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 2.81vw, 54px);
    /* match spacing in design */
    will-change: transform;
}

.services-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: clamp(20px, 2.08vw, 40px);
    flex-wrap: wrap;
}

.services-list-title {
    font-size: clamp(32px, 4.48vw, 86px);
    line-height: 1;
    letter-spacing: clamp(-1.5px, -0.16vw, -3px);
    font-weight: 600;
}

.services-list-subtitle {
    max-width: clamp(280px, 26.04vw, 500px);
    width: 100%;
    font-size: clamp(14px, 1.04vw, 20px);
    line-height: clamp(20px, 1.67vw, 32px);
    font-weight: 300;
    color: #555555;
}

.services-items {
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 2.81vw, 54px);
}

.service-row {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: clamp(20px, 4.17vw, 80px);
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: auto;
    /* let content define row height */
    padding-bottom: 0;
    border-bottom: 1px solid #E6E9EB;
    box-sizing: border-box;
    flex-wrap: wrap;
}

.service-row:last-child {
    min-height: auto;
    padding-bottom: 0;
    border-bottom: none;
}

.service-info {
    position: relative;
    /* anchor the index in the top-left of this block */
    max-width: clamp(280px, 28.65vw, 550px);
    width: 100%;
    flex: 1 1 clamp(280px, 28.65vw, 550px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: clamp(4px, 0.42vw, 8px);
    padding-left: 0;
    padding-top: clamp(100px, 11.46vw, 220px);
    /* controls how high the whole text block sits */
    padding-bottom: 0;
    align-self: stretch;
    height: 100%;
}

.service-index {
    position: absolute;
    /* place number in the top-left corner */
    top: clamp(30px, 3.13vw, 60px);
    left: 0;
    font-size: clamp(24px, 2.4vw, 46px);
    line-height: clamp(36px, 3.44vw, 66px);
    letter-spacing: clamp(-1.32px, -0.14vw, -2.64px);
    text-transform: uppercase;
    color: #000000;
}

.service-title {
    font-size: clamp(32px, 4.48vw, 86px);
    /* match design heading size */
    line-height: clamp(40px, 5.21vw, 100px);
    /* as per spec: 86px text on 100px line-height */
    font-weight: 550;
    /* slightly lighter weight for cleaner look */
    letter-spacing: -0.05em;
    margin: 0 0 clamp(4px, 0.42vw, 8px) 0;
    /* small space before description */
}

.service-description {
    font-size: clamp(16px, 1.25vw, 24px);
    line-height: clamp(24px, 2.08vw, 40px);
    font-weight: 300;
    color: #000000;
    letter-spacing: 0.02em;
    margin-top: 0;
}

.service-cta {
    margin-top: clamp(4px, 0.42vw, 8px);
    font-size: clamp(16px, 1.25vw, 24px);
    line-height: clamp(24px, 1.98vw, 38px);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #00223B;
    text-decoration: none;
}

.service-cta:hover {
    text-decoration: underline;
}

.service-image-placeholder {
    width: clamp(380px, 52vw, 800px);
    /* increased image width */
    max-width: 100%;
    height: clamp(450px, 58vw, 900px);
    /* increased image height */
    border-radius: clamp(6px, 0.63vw, 12px);
    overflow: hidden;
    align-self: center;
    /* vertically align with content */
    margin-left: auto;
    /* sit to the right of the text block */
    margin-right: 0;
    margin-top: 0;
    position: relative;
    padding-left: 0;
    box-sizing: border-box;
    flex: 0 0 auto;
    /* don't stretch wider than the set width */
}

.service-image-placeholder::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #E6E9EB;
    z-index: 1;
}

.service-image-placeholder img {
    width: 100%;
    height: auto;
    /* shrink-wrap to image aspect ratio */
    object-fit: cover;
    display: block;
}

/* Frame 3 – Contact CTA */
.services-frame-3 {
    background: url('assets/service9.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 50;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: clamp(20px, 4.17vw, 80px);
    will-change: transform;
}

.services-contact-pill-top {
    position: absolute;
    top: clamp(120px, 12.5vw, 240px);
    left: clamp(20px, 4.17vw, 80px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 0.83vw, 16px) clamp(20px, 2.08vw, 40px);
    border-radius: clamp(20px, 2.08vw, 40px);
    border: 1px solid #FFFFFF;
    background: transparent;
    font-family: 'HK Gothic', sans-serif;
    font-size: clamp(10px, 0.73vw, 14px);
    font-weight: 700;
    text-transform: uppercase;
    color: #FFFFFF;
    z-index: 2;
}

.services-contact-content {
    position: absolute;
    left: clamp(20px, 4.17vw, 80px);
    top: clamp(190px, 19.79vw, 380px);
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 2;
    width: calc(100% - clamp(40px, 8.33vw, 160px));
    max-width: clamp(500px, 65vw, 1000px);
}



.services-contact-title {
    font-size: clamp(32px, 4.48vw, 86px);
    line-height: clamp(38px, 5.21vw, 100px);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    margin: 0;
    max-width: 100%;
}

.services-contact-button {
    position: absolute;
    bottom: clamp(60px, 6.25vw, 120px);
    left: clamp(20px, 4.17vw, 80px);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: clamp(14px, 1.46vw, 28px) clamp(32px, 3.33vw, 64px);
    background: #FFFFFF;
    border-radius: clamp(6px, 0.63vw, 12px);
    border: none;
    font-family: 'HK Gothic', sans-serif;
    font-weight: 700;
    font-size: clamp(14px, 1.04vw, 20px);
    line-height: clamp(18px, 1.25vw, 24px);
    letter-spacing: -0.01em;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
}

.services-contact-button:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}



/* Mobile Adjustments for Services Contact Section */
@media (max-width: 768px) {
    /* Removed frame overrides to allow JS control */

    .services-contact-pill-top {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        margin-bottom: 20px;
    }

    .services-contact-content {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        margin-top: 20px;
    }

    .services-contact-title {
        font-size: 32px !important;
        line-height: 1.2 !important;
        letter-spacing: -1px !important;
        text-align: left;
        margin-bottom: 0 !important;
    }

    .services-contact-button {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        margin-top: 30px;
        width: auto !important;
        /* Fix large button */
        min-width: 150px;
        font-size: 16px;
        padding: 15px 30px;
    }
}





@media (max-width: 1024px) {
    .service-row {
        flex-direction: column;
        gap: clamp(20px, 2.34vw, 24px);
    }

    .service-image-placeholder {
        width: clamp(240px, 75vw, 380px);
        /* slightly increased width on tablets */
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        height: auto;
        min-height: 260px;
        align-self: center;
    }

    .service-info {
        max-width: 100%;
        flex: 1 1 100%;
    }

    .services-list-header {
        flex-direction: column;
    }

    .services-contact-content {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
    }

    .services-contact-button {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: clamp(20px, 2.08vw, 40px);
    }
}

@media (max-width: 768px) {
    .services-hero-title {
        white-space: normal;
    }

    .service-image-placeholder {
        width: clamp(220px, 85vw, 340px);
        min-height: 260px;
    }
}

@media (max-width: 640px) {
    .services-frame-1::after {
        height: clamp(300px, 50vh, 500px);
        bottom: 20px;
        background-position: center bottom;
        background-size: cover;
    }

    .services-hero-content {
        gap: 8px !important;
        max-width: 100% !important;
    }

    .service-title {
        margin-bottom: 2px !important;
    }

    .services-frame-1 {
        /* Allow JS to control positioning */
    }

    .services-frame-2 {
        background: #ffffff;
    }

    .services-frame-3 {
        padding: 180px 20px 40px !important;
        /* Visual change: Bring content much lower */
        /* Allow JS to control positioning and dimensions */
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        text-align: left;
        overflow-y: hidden !important;
        /* JS handles scrolling */
        box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.3);
        /* Visual lift/slide effect */
    }

    /* Fix potential overflow from long single-line text */
    .services-contact-title {
        text-align: left;
        width: 100%;
        font-size: clamp(20px, 6vw, 28px) !important;
        /* Responsive font size */
        line-height: 1.2 !important;
        letter-spacing: -0.5px !important;
        margin-bottom: 0 !important;
        word-wrap: break-word;
        /* Safety net */
    }

    .services-contact-pill-top {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        margin-bottom: 10px;
        /* Reduced gap */
    }

    .services-contact-content {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 30px;
        text-align: left;
    }

    .services-contact-title {
        text-align: left;
        width: 100%;
        font-size: 28px !important;
        line-height: 1.2 !important;
        letter-spacing: -0.5px !important;
        margin-bottom: 0 !important;
    }

    .services-contact-button {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        bottom: auto !important;
        margin-top: 30px;
        width: 100%;
        font-size: 16px;
        padding: 15px;
    }
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
}

.toast {
    background: #FFFFFF;
    color: #333;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 5px solid #00223B;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left-color: #27ae60;
}

.toast.error {
    border-left-color: #e74c3c;
}

.toast-icon {
    font-size: 20px;
    font-weight: bold;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
}

/* Mobile Toast Adjustments */
@media (max-width: 768px) {
    .toast-container {
        bottom: 20px;
        right: 20px;
        left: 20px;
        pointer-events: none;
        /* Allow clicks pass through */
    }

    .toast {
        min-width: 0;
        width: 100%;
        padding: 12px 16px;
        pointer-events: auto;
        /* Enable clicks on toast */
    }
}