/* 最开始一版的紧凑高度版本 */
:root {
    --green-950: #071d19;
    --green-900: #0c2d27;
    --green-800: #12443a;
    --green-700: #1c5d50;
    --gold-500: #c99b55;
    --gold-400: #ddb978;
    --gold-200: #ead7af;
    --ivory-100: #f7f4ec;
    --ivory-50: #fbfaf6;
    --text-main: #18332d;
    --text-soft: #62736f;
    --line: rgba(12, 45, 39, 0.12);
    --page-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text-main);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    background:
        radial-gradient(circle at 12% 8%, rgba(221, 185, 120, 0.14), transparent 27%),
        radial-gradient(circle at 88% 76%, rgba(28, 93, 80, 0.09), transparent 31%),
        linear-gradient(rgba(12, 45, 39, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(12, 45, 39, 0.022) 1px, transparent 1px),
        var(--ivory-100);
    background-size: auto, auto, 34px 34px, 34px 34px, auto;
}

.main-container {
    width: min(calc(100% - 36px), var(--page-width));
    margin: 0 auto;
    padding: 14px 0;
}

.hero {
    position: relative;
    display: grid;
    min-height: 154px;
    place-items: center;
    overflow: hidden;
    padding: 26px 48px;
    color: #fffdf7;
    border: 1px solid rgba(234, 215, 175, 0.22);
    border-radius: 24px;
    background:
        linear-gradient(105deg, rgba(255, 255, 255, 0.035), transparent 44%),
        linear-gradient(135deg, var(--green-950), var(--green-800));
    box-shadow: 0 20px 48px rgba(7, 29, 25, 0.15);
}

.hero::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 31%;
    left: 25%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(221, 185, 120, 0.58));
}

.hero::after {
    content: "";
    position: absolute;
    top: -160px;
    right: -76px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(221, 185, 120, 0.33);
    border-radius: 50%;
    box-shadow:
        0 0 0 46px rgba(28, 93, 80, 0.18),
        0 0 0 92px rgba(28, 93, 80, 0.1);
}

.hero h1 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-family: "STSong", "SimSun", "Songti SC", serif;
    font-size: clamp(2.5rem, 4.4vw, 4.1rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: 0.08em;
    text-align: center;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

.items-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    margin-top: 12px;
}

.item-box {
    position: relative;
    min-width: 0;
    min-height: 118px;
    overflow: hidden;
    padding: 18px 28px 17px 32px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 9px 25px rgba(7, 29, 25, 0.065);
    backdrop-filter: blur(8px);
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.item-box::before {
    content: "";
    position: absolute;
    top: 32%;
    bottom: 32%;
    left: 0;
    width: 4px;
    background: linear-gradient(var(--gold-400), var(--green-700));
    animation: accent-breathe 3.2s ease-in-out infinite;
}

.item-box::after {
    content: "";
    position: absolute;
    right: -35px;
    bottom: -35px;
    width: 78px;
    height: 78px;
    border: 1px solid rgba(201, 155, 85, 0.28);
    border-radius: 50%;
}

.item-box:hover {
    border-color: rgba(201, 155, 85, 0.42);
    box-shadow: 0 13px 30px rgba(7, 29, 25, 0.1);
    transform: translateY(-2px);
}

.item-box h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 6px;
    color: var(--green-800);
    font-family: "STSong", "SimSun", "Songti SC", serif;
    font-size: clamp(1.18rem, 1.6vw, 1.42rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.06em;
}

.item-box p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--text-soft);
    font-size: clamp(0.86rem, 1.15vw, 0.98rem);
    line-height: 1.58;
    overflow-wrap: anywhere;
}

.contacts-section {
    display: grid;
    grid-template-columns: minmax(300px, 1.4fr) repeat(3, minmax(175px, 0.72fr));
    gap: 9px;
    align-items: stretch;
    margin-top: 12px;
    padding: 8px;
    border: 1px solid rgba(234, 215, 175, 0.2);
    border-radius: 18px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        var(--green-900);
    background-size: 18px 18px;
    box-shadow: 0 16px 36px rgba(7, 29, 25, 0.14);
}

.highlight-title {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 8px 12px;
    color: #fffdf7;
    font-family: "STSong", "SimSun", "Songti SC", serif;
    font-size: clamp(1.18rem, 1.65vw, 1.48rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.035em;
}

.contact-box {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    overflow: hidden;
    padding: 8px 12px;
    color: var(--green-950);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 12px;
    background: linear-gradient(135deg, #f4deb2, var(--gold-400));
    animation: contact-breathe 2.8s ease-in-out infinite;
    transition: transform 180ms ease;
}

.contact-box:nth-of-type(2) {
    animation-delay: 0.35s;
}

.contact-box:nth-of-type(3) {
    animation-delay: 0.7s;
}

.contact-box:hover {
    animation: none;
    transform: translateY(-2px);
}

.contact-box img {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    object-fit: contain;
}

.contact-box span {
    min-width: 0;
    overflow: hidden;
    font-size: clamp(1rem, 1.15vw, 1.1rem);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.floating-buttons {
    position: fixed;
    top: 50%;
    right: max(14px, calc((100vw - var(--page-width)) / 2 - 66px));
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 9px;
    transform: translateY(-50%);
}

.floating-btn {
    position: relative;
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(234, 215, 175, 0.34);
    border-radius: 50%;
    background: var(--green-900);
    box-shadow: 0 9px 22px rgba(7, 29, 25, 0.22);
    animation: floating-breathe 2.5s ease-in-out infinite;
    transition:
        background-color 180ms ease,
        transform 180ms ease;
}

.floating-btn:nth-child(2) {
    animation-delay: 0.3s;
}

.floating-btn:nth-child(3) {
    animation-delay: 0.6s;
}

.floating-btn:hover {
    animation: none;
    background: var(--green-800);
    transform: scale(1.06);
}

.floating-btn img {
    width: 23px;
    height: 23px;
    object-fit: contain;
}

.floating-btn span {
    position: absolute;
    top: 50%;
    right: 62px;
    width: max-content;
    max-width: 240px;
    overflow: hidden;
    padding: 6px 10px;
    color: #fff;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 7px;
    background: var(--green-950);
    opacity: 0;
    pointer-events: none;
    transform: translate(7px, -50%);
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.floating-btn:hover span,
.floating-btn:focus-visible span {
    opacity: 1;
    transform: translate(0, -50%);
}

.contact-box:focus-visible,
.floating-btn:focus-visible {
    outline: 3px solid var(--gold-500);
    outline-offset: 3px;
}

@keyframes contact-breathe {
    0%,
    100% {
        filter: brightness(1);
        box-shadow: 0 0 0 0 rgba(234, 215, 175, 0);
    }

    50% {
        filter: brightness(1.055);
        box-shadow:
            0 0 0 4px rgba(234, 215, 175, 0.1),
            0 8px 18px rgba(0, 0, 0, 0.12);
    }
}

@keyframes floating-breathe {
    0%,
    100% {
        box-shadow:
            0 9px 22px rgba(7, 29, 25, 0.22),
            0 0 0 0 rgba(201, 155, 85, 0);
    }

    50% {
        box-shadow:
            0 12px 26px rgba(7, 29, 25, 0.28),
            0 0 0 6px rgba(201, 155, 85, 0.13);
    }
}

@keyframes accent-breathe {
    0%,
    100% {
        opacity: 0.7;
        box-shadow: 0 0 0 rgba(201, 155, 85, 0);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 12px rgba(201, 155, 85, 0.42);
    }
}

@media (min-width: 721px) {
    html,
    body {
        height: 100%;
        overflow: hidden;
    }

    .main-container {
        display: grid;
        height: 100vh;
        height: 100dvh;
        grid-template-rows:
            minmax(126px, 1.25fr)
            minmax(0, 3fr)
            minmax(72px, 0.65fr);
        gap: 12px;
        padding-block: 14px;
    }

    .hero {
        min-height: 0;
        height: 100%;
    }

    .items-section {
        grid-template-rows: repeat(3, minmax(0, 1fr));
        gap: 10px 12px;
        min-height: 0;
        margin-top: 0;
    }

    .item-box {
        display: flex;
        min-height: 0;
        height: 100%;
        flex-direction: column;
        justify-content: center;
    }

    .contacts-section {
        height: 100%;
        margin-top: 0;
    }
}

@media (min-width: 721px) and (max-height: 720px) {
    .main-container {
        grid-template-rows:
            minmax(104px, 1.2fr)
            minmax(0, 3fr)
            minmax(58px, 0.62fr);
        gap: 7px;
        padding-block: 7px;
    }

    .hero {
        min-height: 0;
        padding-block: 18px;
    }

    .hero h1 {
        font-size: clamp(2.25rem, 4vw, 3.5rem);
    }

    .items-section {
        grid-template-rows: repeat(3, minmax(0, 1fr));
        gap: 7px 10px;
        margin-top: 0;
    }

    .item-box {
        min-height: 0;
        padding: 12px 23px 11px 27px;
    }

    .item-box h3 {
        margin-bottom: 4px;
        font-size: 1.08rem;
    }

    .item-box p {
        font-size: 0.82rem;
        line-height: 1.45;
    }

    .contacts-section {
        margin-top: 0;
        padding: 6px;
    }

    .contact-box {
        min-height: 48px;
    }
}

@media (max-width: 980px) {
    .contacts-section {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .highlight-title {
        grid-column: 1 / -1;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 720px) {
    body {
        overflow: auto;
    }

    .main-container {
        width: min(calc(100% - 24px), var(--page-width));
        padding: 12px 0 88px;
    }

    .hero {
        min-height: 120px;
        padding: 20px 14px;
        border-radius: 18px;
    }

    .hero h1 {
        font-size: clamp(1.75rem, 8vw, 2.35rem);
    }

    .items-section {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 10px;
    }

    .item-box {
        min-height: auto;
        padding: 18px 20px 18px 25px;
    }

    .contacts-section {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 10px;
        padding: 10px;
    }

    .highlight-title {
        grid-column: auto;
        padding: 8px;
    }

    .contact-box {
        min-height: 54px;
    }

    .floating-buttons {
        top: auto;
        right: 12px;
        bottom: 14px;
        left: 12px;
        flex-direction: row;
        justify-content: center;
        padding: 8px;
        border: 1px solid rgba(234, 215, 175, 0.2);
        border-radius: 999px;
        background: rgba(7, 29, 25, 0.9);
        backdrop-filter: blur(12px);
        transform: none;
    }

    .floating-btn {
        width: 44px;
        height: 44px;
        box-shadow: none;
    }

    .floating-btn span {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
