:root {
    --bg: #07090d;
    --surface: rgba(13, 20, 32, 0.72);
    --surface-soft: rgba(11, 16, 27, 0.56);
    --line: rgba(131, 183, 255, 0.25);
    --text: #edf3ff;
    --muted: #b8c8e7;
    --accent: #f8b84a;
    --accent-strong: #ff9e2c;
    --secondary: #79d8ff;
    --shadow: rgba(3, 7, 15, 0.55);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 158, 44, 0.16), transparent 35%),
        radial-gradient(circle at 82% 12%, rgba(121, 216, 255, 0.15), transparent 33%),
        linear-gradient(130deg, #06070b 0%, #0a1020 46%, #090b15 100%);
    color: var(--text);
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

.bg-glow {
    position: fixed;
    border-radius: 999px;
    filter: blur(80px);
    z-index: -3;
    pointer-events: none;
}

.bg-glow-1 {
    width: 420px;
    height: 420px;
    top: -90px;
    left: -90px;
    background: rgba(255, 176, 62, 0.25);
}

.bg-glow-2 {
    width: 380px;
    height: 380px;
    right: -120px;
    bottom: 8%;
    background: rgba(121, 216, 255, 0.2);
}

#webgl-container {
    position: fixed;
    inset: 0;
    z-index: -2;
}

.glass-nav {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1180px, calc(100% - 24px));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 14px 22px;
    background: var(--surface-soft);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    border-radius: 16px;
    z-index: 100;
    box-shadow: 0 14px 40px var(--shadow);
}

.logo,
.footer-logo {
    font-family: 'Syne', 'Segoe UI', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.11em;
}

.logo,
.logo span,
.footer-logo,
.footer-logo span {
    color: #ffffff;
}

#header-logo-wrap img {
    max-height: 52px;
    width: auto;
    filter: brightness(0) invert(1) !important;
    max-width: 180px !important;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
}

nav ul li a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: color 0.25s ease;
}

nav ul li a:hover {
    color: var(--secondary);
}

.btn-primary,
.btn-secondary {
    text-decoration: none;
    padding: 11px 22px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, #030583, #0056b3);
    color: #f9fafb;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.6);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.85);
}

.btn-secondary {
    border: 1px solid rgba(121, 216, 255, 0.56);
    color: var(--secondary);
    background: rgba(10, 20, 35, 0.5);
    display: inline-block;
}

.btn-secondary:hover {
    color: #09111f;
    background: var(--secondary);
    transform: translateY(-2px);
}

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 130px 20px 70px;
}

.hero-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    object-fit: cover;
    z-index: -3;
}

.hero-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: none !important;
    z-index: -2;
}

.hero-content {
    width: min(900px, 100%);
    position: relative;
    z-index: 2 !important;
}

.hero-kicker {
    color: #ffffff !important;
    text-shadow: 0px 4px 10px rgba(0,0,0,0.8);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.75rem;
    margin-bottom: 16px;
}

.hero-title {
    font-family: 'Syne', 'Segoe UI', sans-serif;
    font-size: clamp(2.2rem, 8vw, 5rem);
    line-height: 1.05;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 16px;
    color: #ffffff !important;
    text-shadow: 0px 4px 10px rgba(0,0,0,0.8);
}

.hero-subtitle {
    max-width: 680px;
    margin: 0 auto 30px;
    font-size: clamp(1rem, 3vw, 1.22rem);
    color: #ffffff !important;
    text-shadow: 0px 4px 10px rgba(0,0,0,0.8);
    line-height: 1.75;
}

.services-section,
.portfolio-section,
.contact-section {
    padding: 90px 20px;
    position: relative;
    z-index: 10;
}

.section-title {
    font-family: 'Syne', 'Segoe UI', sans-serif;
    font-size: clamp(1.7rem, 5vw, 2.8rem);
    letter-spacing: 0.08em;
    margin-bottom: 42px;
    text-transform: uppercase;
    text-align: center;
}

.services-grid,
.portfolio-grid {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
}

.service-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 28px 22px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(121, 216, 255, 0.48);
    box-shadow: 0 20px 34px rgba(0, 0, 0, 0.38);
}

.service-card .icon {
    width: fit-content;
    margin-bottom: 16px;
    color: var(--accent);
    font-family: 'Syne', 'Segoe UI', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 0.14em;
}

.service-card h3 {
    font-family: 'Syne', 'Segoe UI', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.service-card p {
    color: var(--muted);
    line-height: 1.7;
}

.portfolio-section {
    background: linear-gradient(180deg, rgba(5, 8, 13, 0.35) 0%, rgba(8, 14, 23, 0.7) 100%);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    cursor: pointer;
    border: 1px solid rgba(121, 216, 255, 0.2);
    min-height: 210px;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    min-height: 210px;
    object-fit: cover;
    display: block;
    transition: transform 0.55s ease;
}

.portfolio-item:hover img {
    transform: scale(1.08);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 14, 29, 0.08) 0%, rgba(8, 22, 37, 0.82) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    opacity: 0;
    transition: opacity 0.35s ease;
    padding: 18px;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay span {
    color: #fff;
    font-family: 'Syne', 'Segoe UI', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 999;
    padding: 38px 20px 20px;
    inset: 0;
    background-color: rgba(2, 6, 12, 0.92);
    backdrop-filter: blur(6px);
}

.lightbox-inner {
    position: relative;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: min(1000px, 100%);
    max-height: 78vh;
    border-radius: 12px;
    border: 1px solid rgba(121, 216, 255, 0.3);
    animation: zoomIn 0.35s ease;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 3rem;
    padding: 4px 10px;
    cursor: pointer;
    border-radius: 999px;
    z-index: 9999;
}

.lightbox-prev {
    left: 18px;
}

.lightbox-next {
    right: 18px;
}

#lightbox-caption {
    margin: 12px auto 0;
    width: min(1000px, 100%);
    text-align: center;
    color: var(--secondary);
    font-family: 'Syne', 'Segoe UI', sans-serif;
    letter-spacing: 0.08em;
    animation: zoomIn 0.35s ease;
}

.close-lightbox {
    position: absolute;
    top: 8px;
    right: 20px;
    color: #fff;
    font-size: 2.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.25s ease;
    background: none;
    border: none;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--accent);
    outline: none;
}

@keyframes zoomIn {
    from {
        transform: scale(0.92);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.contact-container {
    max-width: 680px;
    margin: 0 auto;
}

.glass-form {
    background: var(--surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.input-group {
    position: relative;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 14px;
    background: rgba(4, 9, 17, 0.72);
    border: 1px solid rgba(121, 216, 255, 0.18);
    border-radius: 10px;
    color: #f3f7ff;
    font-size: 0.96rem;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(121, 216, 255, 0.12);
}

.input-group label {
    position: absolute;
    top: 14px;
    left: 12px;
    color: #92a2c0;
    pointer-events: none;
    transition: 0.25s ease;
    background: transparent;
    padding: 0 6px;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
    top: -9px;
    left: 8px;
    font-size: 0.78rem;
    color: var(--secondary);
    background: #0a1222;
    border-radius: 4px;
}

.input-group select {
    appearance: none;
    color: #d9e7ff;
}

.form-submit {
    width: 100%;
    justify-content: center;
    cursor: pointer;
}

header.glass-nav .btn-primary,
.glass-form .form-submit {
    background: linear-gradient(135deg, #030583, #0056b3) !important;
    color: #ffffff !important;
    border: none !important;
}

.form-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.form-feedback {
    min-height: 1.2em;
    font-size: 0.9rem;
    color: var(--muted);
}

.form-feedback.success {
    color: #6df0ad;
}

.form-feedback.error {
    color: #ff7f94;
}

.glass-footer {
    background: rgba(8, 13, 22, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(121, 216, 255, 0.2);
    padding: 34px 20px 18px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.footer-content p {
    color: var(--muted);
    margin-top: 10px;
    font-size: 0.94rem;
}

.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.social-links a {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid rgba(121, 216, 255, 0.4);
    padding: 6px 14px;
    border-radius: 999px;
    transition: all 0.25s ease;
}

.social-links a:hover {
    background: var(--secondary);
    color: #061021;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 12px;
    font-size: 0.8rem;
    color: #8596b5;
}

@media (max-width: 920px) {
    .glass-nav {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 10px;
    }

    nav ul {
        gap: 12px;
    }

    .hero-section {
        padding-top: 150px;
    }
}

@media (max-width: 640px) {
    .glass-nav {
        top: 8px;
        width: calc(100% - 16px);
        border-radius: 14px;
        padding: 12px;
    }

    .logo {
        font-size: 1.3rem;
    }

    nav ul li a {
        font-size: 0.85rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .services-section,
    .portfolio-section,
    .contact-section {
        padding: 72px 14px;
    }

    .glass-form {
        padding: 22px 16px;
    }

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

    .hero-video {
        height: 50vh;
        max-height: 380px;
    }
}
