:root {
    --qg-ink: #0b3d3b;
    --qg-ink-soft: #3d5f5d;
    --qg-teal: #0f8a84;
    --qg-teal-deep: #0b6e6a;
    --qg-mist: #e8f5f3;
    --qg-sand: #f3f7f2;
    --qg-line: rgba(11, 61, 59, 0.12);
    --qg-white: #ffffff;
    --qg-radius: 14px;
    --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--qg-ink);
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(31, 166, 160, 0.18), transparent 60%),
        radial-gradient(900px 420px at 100% 0%, rgba(180, 210, 150, 0.22), transparent 55%),
        linear-gradient(180deg, #f7fbf9 0%, var(--qg-sand) 45%, #eef4f0 100%);
    line-height: 1.7;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--qg-teal-deep);
    text-decoration: none;
}

a:hover {
    color: var(--qg-teal);
}

.container {
    width: min(1120px, calc(100% - 2.5rem));
    margin-inline: auto;
}

.narrow {
    width: min(760px, calc(100% - 2.5rem));
    margin-inline: auto;
}

/* Nav */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(247, 251, 249, 0.86);
    border-bottom: 1px solid var(--qg-line);
}

.site-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 1rem;
}

.site-brand {
    display: inline-flex;
    align-items: center;
}

.site-nav__links {
    display: flex;
    gap: 1.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav__links a {
    color: var(--qg-ink-soft);
    font-weight: 500;
    position: relative;
    padding: 0.25rem 0;
}

.site-nav__links a.is-active,
.site-nav__links a:hover {
    color: var(--qg-ink);
}

.site-nav__links a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.35rem;
    height: 2px;
    background: var(--qg-teal);
}

.site-nav__toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--qg-line);
    border-radius: 10px;
    background: transparent;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.site-nav__toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--qg-ink);
}

.site-nav__collapse {
    display: block !important;
}

/* Mobile panel */
.navbar-mobile {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
}

.navbar-mobile .navbar-collapse {
    pointer-events: auto;
    position: absolute;
    inset: 0;
    background: rgba(11, 61, 59, 0.96);
    padding: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.28s ease;
}

.navbar-mobile .navbar-collapse.show {
    transform: translateX(0);
}

.navbar-mobile__close {
    text-align: right;
    margin-bottom: 2rem;
}

.navbar-mobile__close button {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
}

.navbar-mobile__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.25rem;
}

.navbar-mobile__links a {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 500;
}

/* Hero */
.hero {
    position: relative;
    min-height: min(88vh, 760px);
    display: flex;
    align-items: flex-end;
    padding: 7rem 0 5rem;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(11, 61, 59, 0.72) 0%, rgba(15, 138, 132, 0.45) 48%, rgba(11, 61, 59, 0.2) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='900' viewBox='0 0 1600 900'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop stop-color='%230b6e6a'/%3E%3Cstop offset='1' stop-color='%231fa6a0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1600' height='900' fill='url(%23g)'/%3E%3Ccircle cx='1180' cy='220' r='260' fill='%23cfe8b8' opacity='.22'/%3E%3Ccircle cx='320' cy='680' r='320' fill='%23e8f5f3' opacity='.18'/%3E%3Cpath d='M0 620 C 280 540 420 740 720 660 C 980 590 1180 700 1600 620 L1600 900 L0 900 Z' fill='%23f7fbf9' opacity='.35'/%3E%3C/svg%3E") center/cover no-repeat;
    animation: heroShift 16s ease-in-out infinite alternate;
}

@keyframes heroShift {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.hero__content {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 640px;
    animation: riseIn 0.9s ease both;
}

@keyframes riseIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero__brand {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 700;
    margin: 0 0 0.75rem;
    letter-spacing: 0.04em;
    line-height: 1.15;
}

.hero h1 {
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    font-weight: 500;
    margin: 0 0 1rem;
    color: rgba(255, 255, 255, 0.92);
}

.hero__lead {
    margin: 0 0 1.75rem;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.05rem;
    max-width: 34rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

/* Buttons */
.btn-primary,
.btn-ghost,
.btn-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.65rem 1.35rem;
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    background: var(--qg-teal);
    color: #fff;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: var(--qg-teal-deep);
    color: #fff;
    transform: translateY(-1px);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.btn-text {
    padding: 0;
    color: var(--qg-teal-deep);
}

.btn-text:hover {
    color: var(--qg-teal);
}

/* Sections */
.section {
    padding: 4.5rem 0;
}

.section--intro {
    text-align: center;
}

.section--intro h2,
.section__head h2,
.page-banner h1,
.section--cta h2,
.section--404 h1 {
    font-family: var(--font-serif);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.section--intro h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    margin: 0 0 1rem;
}

.section--intro p {
    color: var(--qg-ink-soft);
    margin: 0;
    font-size: 1.05rem;
}

.section__head {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section__head h2 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.section__head p {
    margin: 0;
    color: var(--qg-ink-soft);
}

.section__cta {
    text-align: center;
    margin-top: 2rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.service-item {
    padding: 1.5rem 1.35rem;
    border-top: 2px solid var(--qg-teal);
    background: rgba(255, 255, 255, 0.55);
    animation: riseIn 0.7s ease both;
}

.service-item:nth-child(2) { animation-delay: 0.08s; }
.service-item:nth-child(3) { animation-delay: 0.16s; }
.service-item:nth-child(4) { animation-delay: 0.24s; }

.service-item h3 {
    margin: 0 0 0.65rem;
    font-size: 1.1rem;
}

.service-item p {
    margin: 0;
    color: var(--qg-ink-soft);
    font-size: 0.96rem;
}

.section--cta {
    text-align: center;
}

.section--cta p {
    color: var(--qg-ink-soft);
    margin: 0.75rem 0 1.5rem;
}

/* Page banner */
.page-banner {
    padding: 4.5rem 0 2.5rem;
    background:
        linear-gradient(180deg, rgba(15, 138, 132, 0.12), transparent),
        linear-gradient(90deg, rgba(11, 61, 59, 0.04), transparent);
}

.page-banner h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.9rem, 3.5vw, 2.5rem);
}

.page-banner p {
    margin: 0;
    color: var(--qg-ink-soft);
    max-width: 36rem;
}

/* Services page */
.service-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.service-list article {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--qg-line);
    border-radius: var(--qg-radius);
}

.service-list h2 {
    margin: 0 0 0.85rem;
    font-size: 1.2rem;
    font-family: var(--font-serif);
}

.service-list ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--qg-ink-soft);
}

.service-list li + li {
    margin-top: 0.35rem;
}

.service-note {
    margin-top: 2rem;
    color: var(--qg-ink-soft);
    font-size: 0.92rem;
}

/* About */
.about-intro p {
    color: var(--qg-ink-soft);
    font-size: 1.05rem;
    margin: 0 0 2rem;
}

.info-table {
    border-top: 1px solid var(--qg-line);
}

.info-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--qg-line);
}

.info-row span {
    color: var(--qg-ink-soft);
}

.info-row strong {
    font-weight: 600;
}

/* Contact */
.contact-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 2.5rem;
    align-items: start;
}

.contact-info h2 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    font-family: var(--font-serif);
}

.contact-info h2:not(:first-child) {
    margin-top: 1.75rem;
}

.contact-info p {
    margin: 0.25rem 0;
    color: var(--qg-ink-soft);
}

.contact-form {
    padding: 1.75rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--qg-line);
    border-radius: var(--qg-radius);
}

.contact-form h2 {
    margin: 0 0 0.35rem;
    font-family: var(--font-serif);
    font-size: 1.35rem;
}

.contact-form > p {
    margin: 0 0 1.25rem;
    color: var(--qg-ink-soft);
}

.form-field {
    margin-bottom: 1rem;
}

.form-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-field input,
.form-field textarea {
    width: 100%;
    border: 1px solid var(--qg-line);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    background: #fff;
    color: var(--qg-ink);
    font: inherit;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: 2px solid rgba(15, 138, 132, 0.25);
    border-color: var(--qg-teal);
}

.form-success {
    padding: 1rem 1.1rem;
    background: var(--qg-mist);
    border-radius: 10px;
}

.form-success h3 {
    margin: 0 0 0.4rem;
}

.form-success p {
    margin: 0;
    color: var(--qg-ink-soft);
}

.section--404 {
    text-align: center;
    padding: 6rem 0;
}

.section--404 p {
    color: var(--qg-ink-soft);
    margin: 0.75rem 0 1.5rem;
}

/* Footer */
.site-footer {
    margin-top: 2rem;
    padding: 3.5rem 0 2rem;
    background: #0b3d3b;
    color: rgba(255, 255, 255, 0.82);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1.2fr;
    gap: 2rem;
}

.site-footer__brand p,
.site-footer__info p {
    margin: 0.85rem 0 0;
    font-size: 0.95rem;
}

.site-footer h3 {
    margin: 0 0 0.85rem;
    font-size: 1rem;
    color: #fff;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.78);
}

.site-footer a:hover,
.site-footer a.is-active {
    color: #fff;
}

.site-footer__copy {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer__copy p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 992px) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .site-nav__toggle {
        display: inline-flex;
    }

    .site-nav__collapse {
        display: none !important;
    }

    .hero {
        min-height: 78vh;
        padding: 6rem 0 3.5rem;
        align-items: center;
    }

    .service-grid,
    .service-list,
    .contact-layout,
    .site-footer__grid {
        grid-template-columns: 1fr;
    }

    .info-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}
