:root {
    --primary: #1f8abe;
    --primary-dark: #1870a0;
    --primary-light: #40a8d8;
    --secondary: #f6b428;
    --secondary-light: #f8c850;
    --bg: #f5f7fc;
    --card-bg: #ffffff;
    --text: #1d1d1f;
    --text-secondary: #6e6e73;
    --border: #d2d2d7;
    --radius: 18px;
    --radius-lg: 28px;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.10);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 44px;
    background: var(--bg);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Background layer ── */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--bg);
}

.bg-layer::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 18% 25%, rgba(31,138,190,0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 82% 60%, rgba(246,180,40,0.08) 0%, transparent 50%);
    animation: bg-shift 18s ease-in-out infinite alternate;
}

@keyframes bg-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.bg-layer::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image: radial-gradient(circle, #1f8abe 0.6px, transparent 0.6px);
    background-size: 36px 36px;
}

/* ── Floating orbs ── */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(70px);
}

.bg-orb-1 {
    width: 500px;
    height: 500px;
    background: rgba(31,138,190,0.10);
    top: -120px;
    right: -120px;
    animation: float-drift 22s ease-in-out infinite alternate;
}

.bg-orb-2 {
    width: 400px;
    height: 400px;
    background: rgba(246,180,40,0.07);
    bottom: -80px;
    left: -100px;
    animation: float-drift 28s ease-in-out infinite alternate-reverse;
}

.bg-orb-3 {
    width: 350px;
    height: 350px;
    background: rgba(31,138,190,0.06);
    top: 55%;
    left: 50%;
    animation: float-drift 32s ease-in-out infinite alternate;
}

@keyframes float-drift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(25px, -18px); }
    50% { transform: translate(-15px, 22px); }
    75% { transform: translate(20px, 10px); }
    100% { transform: translate(-25px, -12px); }
}

.snap-section {
    scroll-snap-align: start;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 72px 24px 60px;
}

.snap-section-hero {
    justify-content: center;
    padding: 72px 24px 80px;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.90);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(210,210,215,0.5);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-logo img {
    height: 24px;
    width: auto;
    border-radius: 5px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2px;
}

.nav-links a {
    padding: 4px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: all 0.2s;
}

.nav-sep {
    width: 1px;
    margin: 6px 8px;
    background: var(--border);
    flex-shrink: 0;
}

.nav-dropdown-menu .nav-sep {
    width: auto;
    height: 0;
    margin: 5px 8px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: rgba(31,138,190,0.06);
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.nav-dropdown-trigger i {
    font-size: 0.65rem;
    transition: transform 0.2s;
}

.nav-dropdown:hover .nav-dropdown-trigger i {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 160px;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease, margin-top 0.2s ease;
    margin-top: 4px;
    z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    margin-top: 0;
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s;
}

.nav-dropdown-menu a:hover {
    color: var(--text);
    background: rgba(31,138,190,0.08);
}

.nav-dropdown-menu a i {
    width: 16px;
    text-align: center;
    font-size: 0.8rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
}

/* Nav button for admin */
.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.83rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}
.nav-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(31,138,190,0.05);
}
.nav-btn.admin-logged-in {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(31,138,190,0.08);
}
.nav-btn.admin-logged-in:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(231,76,60,0.06);
}

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 72px 24px 80px;
}

.hero-visual {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(31,138,190,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    pointer-events: none;
}

.shape-1 {
    width: 500px;
    height: 500px;
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(31,138,190,0.10) 0%, transparent 70%);
}

.shape-2 {
    width: 400px;
    height: 400px;
    bottom: -50px;
    left: -80px;
    background: radial-gradient(circle, rgba(246,180,40,0.08) 0%, transparent 70%);
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 600px;
}

.hero-logo {
    width: min(384px, 72vw);
    margin: 0 auto 20px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(31,138,190,0.20);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-logo:hover {
    transform: scale(1.06);
}

.hero-logo img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-title {
    font-size: 3.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 6px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 450;
    margin-bottom: 14px;
}

.hero-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #7ac8ea, #3ab0d8);
    color: white;
    box-shadow: 0 4px 14px rgba(31,138,190,0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #96d6f0, #50bce0);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(31,138,190,0.30);
}

.btn-secondary {
    background: rgba(31,138,190,0.06);
    color: var(--primary);
    border: 1px solid rgba(31,138,190,0.15);
}

.btn-secondary:hover {
    background: rgba(31,138,190,0.12);
    transform: translateY(-2px);
}

.btn-accent {
    background: linear-gradient(135deg, #fef3d0, #f5d870);
    color: #7A6B30;
    border: none;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #fff8e0, #f8e488);
    color: #5C4A00;
    transform: translateY(-2px);
}

.section {
    padding: 80px 24px;
}

.services-section,
.projects-section {
    min-height: auto;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
    width: 100%;
    max-width: 780px;
}

.section-header h2 {
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Services Section */

.services-showcase {
    width: min(80vw, 1400px);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.services-sub-label {
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    padding: 8px 0 4px;
}

.services-divider {
    width: 100%;
    height: 0;
    margin: 4px 0 8px;
    border-bottom: none;
    display: flex;
    justify-content: center;
}

.services-divider::after {
    content: '';
    width: 696px;
    max-width: 100%;
    border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
    .services-divider::after {
        border-bottom-color: rgba(255,255,255,0.25);
    }
}

.service-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.35s ease;
    width: 100%;
    max-width: 340px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: opacity 0.35s ease;
}

.service-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

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

.service-visual {
    height: 120px;
    background: linear-gradient(135deg, #0a1628 0%, #1a2a4a 50%, #0d2137 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.service-visual::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.06);
    animation: pulse-ring 3s ease-out infinite;
}

.service-visual::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.04);
    animation: pulse-ring 3s ease-out infinite 0.8s;
}

@keyframes pulse-ring {
    0% { transform: scale(0.6); opacity: 0.6; }
    100% { transform: scale(1.5); opacity: 0; }
}

.service-visual i {
    font-size: 2.5rem;
    color: rgba(255,255,255,0.15);
    position: relative;
    z-index: 1;
}

.service-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.service-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.service-info p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-card {
    margin-top: auto;
    align-self: flex-start;
    flex-shrink: 0;
    white-space: nowrap;
}

.btn-card-group {
    margin-top: auto;
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.btn-hint {
    display: inline-flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    white-space: normal;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.service-features span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.service-features span i {
    color: var(--primary);
    font-size: 0.75rem;
}

/* Projects Section */

.projects-showcase {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.project-showcase-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: all 0.35s ease;
    display: flex;
    flex-direction: column;
    width: 340px;
    position: relative;
}

.project-showcase-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: opacity 0.35s ease;
}

.project-showcase-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

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

.showcase-visual {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.showcase-visual::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.06);
    animation: pulse-ring 3s ease-out infinite;
}

.showcase-visual::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.04);
    animation: pulse-ring 3s ease-out infinite 0.8s;
}

.showcase-visual i {
    font-size: 2.5rem;
    color: rgba(255,255,255,0.85);
    position: relative;
    z-index: 1;
}

.showcase-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.showcase-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.showcase-info p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.showcase-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    margin-top: auto;
    align-self: flex-start;
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 14px rgba(31,138,190,0.25);
}

.project-showcase-card:hover .showcase-link {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(31,138,190,0.30);
    gap: 10px;
}

.footer {
    position: relative;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-top: 1px solid rgba(210,210,215,0.5);
    margin-top: 40px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 6px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

.footer-brand img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

@media (max-width: 768px) {
    html {
        scroll-snap-type: none;
    }

    .snap-section {
        min-height: auto;
        padding: 56px 20px 40px;
    }

    .services-section,
    .projects-section {
        padding-top: 20px;
    }

    .services-section .section-header,
    .projects-section .section-header {
        margin-bottom: 20px;
    }

    .snap-section-hero {
        padding: 56px 20px 60px;
    }

    .hero {
        min-height: 100dvh;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .section-header p {
        font-size: 0.9rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 44px;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 8px 16px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-sep {
        display: block;
        width: 36px;
        min-width: 0;
        height: 1px;
        margin: 8px 14px;
        background: #999;
        border: none;
        flex: none;
        align-self: flex-start;
        padding: 0;
    }

    .nav-toggle {
        display: block;
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-trigger {
        width: 100%;
    }

    .nav-dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(31,138,190,0.04);
        margin-top: 4px;
        padding: 4px 0 4px 16px;
        display: none;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .nav-dropdown:hover .nav-dropdown-menu {
        margin-top: 4px;
    }

    .services-showcase {
        align-self: stretch;
        padding-bottom: 60px;
        width: min(80vw, 340px);
    }

    .service-card {
        max-width: none;
    }

    .projects-showcase {
        flex-direction: column;
        align-items: center;
        align-self: stretch;
        padding-bottom: 60px;
    }

    .project-showcase-card {
        width: 100%;
        max-width: 340px;
    }

    .footer-inner {
        padding: 12px 20px;
        flex-direction: column;
        text-align: center;
    }

    .footer {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

}
