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

html, body {
    height: 100%;
    overflow: hidden;
    background-color: #020204;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}

#main-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.section-wrapper {
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    flex-shrink: 0;
}

.section-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.section-content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    /* bottom padding leaves room for the fixed scroll button */
    padding: 80px 20px 90px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.8rem;
    overflow: hidden;
}

.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-strong {
    background: rgba(5, 5, 8, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.text-gradient {
    background: linear-gradient(135deg, #00d4ff 0%, #00fff9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── single fixed scroll-down button ── */
#scroll-down-btn {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 200;
    animation: bounce 2s infinite;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    padding: 12px;
    border: 2px solid rgba(255,255,255,0.35);
    box-shadow: 0 4px 30px rgba(0,0,0,0.8);
    transition: opacity 0.3s ease;
    line-height: 0;
}

#scroll-down-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

.mobile-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    backdrop-filter: blur(10px);
    overflow: visible;
}

/* ── Contact form expand / collapse ── */
.expandable-form {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

.expandable-form.open {
    max-height: 600px;
    opacity: 1;
}

/* ── Success message animation ── */
#success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(5, 5, 8, 0.98);
    backdrop-filter: blur(20px);
    border: 2px solid #00d4ff;
    border-radius: 20px;
    padding: 40px;
    z-index: 300;
    text-align: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.5);
}

#success-message.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

#success-message .checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff, #00fff9);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 0.6s ease-out;
}

#success-message .checkmark svg {
    width: 50px;
    height: 50px;
    stroke: #020204;
    stroke-width: 3;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw-check 0.5s ease-out 0.2s forwards;
}

@keyframes pulse {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes draw-check {
    to { stroke-dashoffset: 0; }
}

/* Social links that collapse when form opens */
.contact-social-link {
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease;
    max-height: 200px;
    overflow: hidden;
}

.contact-social-link.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    border: none;
}

/* ── Mobile optimisations ── */
@media (max-width: 768px) {
    .section-content {
        padding: 60px 14px 80px 14px;
        gap: 0.8rem;
    }

    .mobile-card {
        padding: 8px;
    }

    #scroll-down-btn {
        bottom: 22px;
        padding: 14px;
    }

    /* tighter sections */
    #services .section-content,
    #tech .section-content {
        gap: 0.5rem;
        padding-top: 58px;
        padding-bottom: 80px;
    }

    #contact .section-content {
        gap: 0.6rem;
        padding-top: 58px;
        padding-bottom: 80px;
    }

    h1 { font-size: 3rem !important; }
    h2 { font-size: 2rem !important; }
}

@media (max-width: 390px) {
    .section-content {
        padding: 55px 10px 75px 10px;
        gap: 0.6rem;
    }

    #services .section-content,
    #tech .section-content {
        gap: 0.4rem;
        padding-top: 52px;
    }

    #contact .section-content {
        gap: 0.5rem;
        padding-top: 52px;
    }

    h1 { font-size: 2.5rem !important; }
    h2 { font-size: 1.75rem !important; }

    #scroll-down-btn {
        bottom: 18px;
        padding: 12px;
    }
}

::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}
