/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --overlay-color: rgba(25, 55, 95, 0.6);
    --card-bg: rgba(255, 255, 255, 0.12);
    --card-bg-hover: rgba(255, 255, 255, 0.22);
    --card-border: rgba(255, 255, 255, 0.6);
    --card-border-hover: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.75);

    --card-size: 230px;
    --card-gap: 20px;
    --cards-total-width: 980px; /* 4*230 + 3*20 */

    --logo-to-cards-gap: 110px;
    --cards-to-footer-gap: 85px;

    --font-cn: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    --font-en: "Helvetica Neue", Arial, sans-serif;

    --ease: 0.3s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-cn);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
}

/* ============================================
   Background — only this scales responsively
   ============================================ */
.bg-wrapper {
    position: fixed;
    inset: 0;
    z-index: -1;
}

.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.bg-overlay {
    position: absolute;
    inset: 0;
    background: var(--overlay-color);
}

/* ============================================
   Content Wrapper — fixed width, centered
   ============================================ */
.content-wrapper {
    position: relative;
    width: var(--cards-total-width);
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Header - Logos (original size)
   ============================================ */
.header {
    text-align: center;
    margin-bottom: var(--logo-to-cards-gap);
    width: 100%;
}

.logo-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.logo-item {
    display: flex;
    align-items: center;
}

/* Logo — original dimensions, no scaling */
.logo-img {
    height: auto;
    width: auto;
    max-width: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.logo-brain {
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ============================================
   Navigation Cards — 230x230px fixed
   ============================================ */
.nav-cards {
    display: flex;
    justify-content: center;
    gap: var(--card-gap);
    margin: 0;
}

.nav-card {
    width: var(--card-size);
    height: var(--card-size);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    transition: background var(--ease), border-color var(--ease), transform var(--ease), box-shadow var(--ease);
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    flex-shrink: 0;
}

.nav-card:hover,
.nav-card:focus-visible {
    background: var(--card-bg-hover);
    border-color: var(--card-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    outline: none;
}

.nav-card:active {
    transform: translateY(-2px);
}

.nav-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: transform var(--ease);
}

.nav-card:hover .nav-card-icon {
    transform: scale(1.1);
}

.nav-card-icon svg {
    width: 100%;
    height: 100%;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-card-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* 标题 24px, 副标题 14px, line-height 1.8 */
.nav-card-title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
    line-height: 1.8;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nav-card-sub {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 1.8;
}

/* Icon image — 56px, white-on-transparent needs darkening to be visible */
.nav-card-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
    transition: transform var(--ease);
}

.nav-card:hover .nav-card-img {
    transform: scale(1.1);
}

/* ============================================
   Footer — normal flow, below cards
   QR: left-aligned to card 1 left + 40px, top: card bottom + 85px
   Contact: right-aligned to card 4 right + 10px, top: card bottom + 85px
   ============================================ */
.footer {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: var(--cards-to-footer-gap);
    padding-left: 40px;   /* QR left = card 1 left + 40px */
    padding-right: 10px;  /* Contact right = card 4 right - 10px */
}

/* QR Codes */
.qr-codes {
    display: flex;
    gap: 24px;
    flex-shrink: 0;
}

.qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.qr-box {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform var(--ease), box-shadow var(--ease);
    background: #fff;
}

.qr-box:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.qr-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qr-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    text-align:center;
}

/* Contact Info — right-aligned */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
    text-align: right;
    flex-shrink: 0;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-primary);
    opacity: 0.9;
    order: 1;
}

.addr-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.contact-icon svg {
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    order: 2;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-wrapper {
    animation: fadeInUp 0.6s ease-out;
}

.nav-card:nth-child(1) { animation: fadeInUp 0.6s ease-out 0.1s both; }
.nav-card:nth-child(2) { animation: fadeInUp 0.6s ease-out 0.2s both; }
.nav-card:nth-child(3) { animation: fadeInUp 0.6s ease-out 0.3s both; }
.nav-card:nth-child(4) { animation: fadeInUp 0.6s ease-out 0.4s both; }

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .bg-wrapper {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
    }

    .nav-card {
        border: 1px solid #ccc;
        background: #f9f9f9;
    }

    .nav-card-title,
    .nav-card-sub,
    .logo-img,
    .qr-label,
    .contact-text {
        color: #333;
        text-shadow: none;
        filter: none;
    }
}
