/* ==========================================================
   益儿教育 · 视觉基调
   作业本方格纸 + 产品实拍的灰蓝布景 + 校车黄点缀
   ========================================================== */

:root {
    --paper: #edf0f3;
    --paper-2: #e3e8ed;
    --mist: #bfc8d2;
    --ink: #16212c;
    --ink-2: #4b5966;
    --ink-3: #7a8692;
    --line: rgba(22, 33, 44, 0.14);
    --grid: rgba(22, 33, 44, 0.045);
    --bus: #f2ae1c;
    --bus-deep: #d9940a;
    --night: #121c26;

    --font-display: "LXGW WenKai Screen", "Kaiti SC", "STKaiti", "KaiTi", "BiauKai", serif;
    --font-body: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;

    --wrap: 1180px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.75;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 32px 32px;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

p {
    text-wrap: pretty;
}

h1,
h2,
h3 {
    text-wrap: balance;
}

ul,
ol {
    list-style: none;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 32px;
}

.title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2rem, 4.2vw, 3.25rem);
    line-height: 1.25;
    letter-spacing: 0.01em;
}

/* ---------- 导航 ---------- */

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.site-header.is-solid,
.site-header.menu-open {
    background-color: rgba(237, 240, 243, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--line);
}

.nav {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    text-decoration: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease, transform 0.4s var(--ease);
    pointer-events: none;
}

.show-brand .nav-brand {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.nav-links {
    display: flex;
    gap: 32px;
    margin-left: auto;
}

.nav-links a {
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--ink-2);
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--ink);
}

.nav-call {
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    padding-bottom: 2px;
    border-bottom: 2px solid var(--bus);
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    margin-left: auto;
    border: 0;
    background: none;
    cursor: pointer;
    position: relative;
}

.nav-toggle span {
    position: absolute;
    left: 9px;
    right: 9px;
    height: 2px;
    background: var(--ink);
    transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.nav-toggle span:first-child { top: 15px; }
.nav-toggle span:last-child { top: 23px; }

.menu-open .nav-toggle span:first-child { top: 19px; transform: rotate(45deg); }
.menu-open .nav-toggle span:last-child { top: 19px; transform: rotate(-45deg); }

/* ---------- 首屏 ---------- */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: radial-gradient(120% 100% at 15% 45%, #f4f6f8 0%, #dde3e9 52%, #c2cbd5 100%);
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 70%;
    height: 100%;
    object-fit: cover;
    object-position: 30% 55%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 24%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 24%);
    animation: heroImage 2.8s var(--ease) both;
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding-top: 68px;
}

.hero-inner > * {
    animation: rise 0.9s var(--ease) both;
}

.hero-inner > :nth-child(1) { animation-delay: 0.2s; }
.hero-inner > :nth-child(2) { animation-delay: 0.32s; }
.hero-inner > :nth-child(3) { animation-delay: 0.5s; }
.hero-inner > :nth-child(4) { animation-delay: 0.62s; }
.hero-inner > :nth-child(5) { animation-delay: 0.76s; }

.hero-sub-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    letter-spacing: 0.3em;
    color: var(--ink-2);
}

.hero-sub-brand::before {
    content: "";
    width: 28px;
    height: 3px;
    background: var(--bus);
}

.hero-brand {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(4rem, 8.4vw, 7.5rem);
    line-height: 1.05;
    letter-spacing: 0.04em;
    margin: 14px 0 28px;
}

.hero-line {
    font-size: clamp(1.15rem, 1.7vw, 1.4rem);
    font-weight: 600;
    max-width: 22em;
}

.hero-desc {
    margin-top: 10px;
    max-width: 30em;
    color: var(--ink-2);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 28px;
    margin-top: 40px;
}

.btn {
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background-color 0.2s ease, transform 0.25s var(--ease);
}

.btn-primary {
    background: var(--bus);
    color: var(--ink);
    padding: 15px 26px;
    border-radius: 6px;
}

.btn-primary:hover {
    background: var(--bus-deep);
    transform: translateY(-2px);
}

.btn-link {
    position: relative;
    text-decoration: none;
    font-weight: 600;
    padding-right: 26px;
}

.btn-link::after {
    content: "→";
    position: absolute;
    right: 0;
    transition: transform 0.25s var(--ease);
}

.btn-link:hover::after {
    transform: translateX(5px);
}

/* ---------- 关于 ---------- */

.about {
    padding: 150px 0 130px;
}

.about-head {
    display: grid;
    grid-template-columns: 5fr 6fr;
    gap: 72px;
    align-items: start;
}

.about-text p {
    font-size: 1.05rem;
    color: var(--ink-2);
}

.about-text p + p {
    margin-top: 1.1em;
}

.scenes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 80px;
}

.scene {
    overflow: hidden;
}

.scene img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.8s var(--ease);
}

.scene:hover img {
    transform: scale(1.03);
}

.scene figcaption {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-top: 14px;
}

/* ---------- 服务 ---------- */

.services {
    padding: 120px 0 100px;
    background-color: var(--paper-2);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 32px 32px;
}

.services .title {
    margin-bottom: 56px;
}

.service {
    display: grid;
    grid-template-columns: 110px 1fr 1fr;
    grid-template-areas: "no body media";
    gap: 56px;
    align-items: center;
    padding: 64px 0;
    border-top: 1px solid var(--line);
}

.service--flip {
    grid-template-areas: "no media body";
}

.service-no {
    grid-area: no;
    align-self: start;
    font-family: var(--font-display);
    font-size: 5.5rem;
    line-height: 1;
    color: var(--bus);
}

.service-body {
    grid-area: body;
}

.service-body h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.9rem;
    line-height: 1.3;
    margin-bottom: 14px;
}

.service-body > p {
    color: var(--ink-2);
}

.service-points {
    margin-top: 22px;
}

.service-points li {
    position: relative;
    padding-left: 22px;
    font-size: 0.95rem;
    line-height: 2;
}

.service-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.95em;
    width: 10px;
    height: 2px;
    background: var(--bus);
}

.service-quote {
    grid-area: media;
    padding-left: 28px;
    border-left: 3px solid var(--bus);
}

.service-quote p {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.2vw, 1.85rem);
    line-height: 1.6;
}

.service-media {
    grid-area: media;
}

.service-media img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 4px;
}

.service-media--beds {
    background: #fff;
    border-radius: 4px;
    padding: 28px 24px;
    display: grid;
    gap: 20px;
}

.service-media--beds img {
    aspect-ratio: auto;
    object-fit: contain;
    border-radius: 0;
}

/* ---------- 产品 ---------- */

.product {
    background: var(--mist);
}

.product-visual {
    overflow: hidden;
}

.product-visual img {
    width: 100%;
    height: clamp(340px, 64vh, 720px);
    object-fit: cover;
    object-position: 50% 45%;
}

.product-inner {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 72px;
    padding-top: 72px;
    padding-bottom: 120px;
}

.kicker {
    font-size: 0.9rem;
    letter-spacing: 0.18em;
    color: var(--ink-2);
    margin-bottom: 10px;
}

.product-head .title {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.product-lead {
    margin-top: 18px;
    font-size: 1.1rem;
    max-width: 20em;
}

.specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
}

.specs > div {
    padding: 18px 0;
    border-top: 1px solid rgba(22, 33, 44, 0.2);
}

.specs dt {
    font-size: 0.85rem;
    color: var(--ink-2);
}

.specs dd {
    margin-top: 2px;
    font-size: 1.05rem;
    font-weight: 600;
}

/* ---------- 流程 ---------- */

.flow {
    padding: 130px 0;
}

.flow .title {
    margin-bottom: 64px;
}

.flow-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}

.flow-step img {
    height: 440px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 0 0 1px var(--line);
    margin-bottom: 28px;
}

.flow-no {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--bus-deep);
}

.flow-step h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.6rem;
    line-height: 1.3;
    margin: 2px 0 8px;
}

.flow-step p {
    color: var(--ink-2);
    max-width: 19em;
}

.flow-step:nth-child(2) { transition-delay: 0.12s; }
.flow-step:nth-child(3) { transition-delay: 0.24s; }

/* ---------- 三心 ---------- */

.promise {
    padding: 140px 0 150px;
    border-top: 1px solid var(--line);
}

.promise-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px 48px;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5.4vw, 4.8rem);
    line-height: 1.2;
}

.promise-word em {
    font-style: normal;
    background: linear-gradient(var(--bus), var(--bus)) no-repeat 0 92% / 0% 0.26em;
    transition: background-size 0.9s var(--ease) 0.35s;
}

.promise-word.is-in em {
    background-size: 100% 0.26em;
}

.promise-word:nth-child(2) { transition-delay: 0.15s; }
.promise-word:nth-child(2) em { transition-delay: 0.5s; }
.promise-word:nth-child(3) { transition-delay: 0.3s; }
.promise-word:nth-child(3) em { transition-delay: 0.65s; }

/* ---------- 联系 ---------- */

.contact {
    padding: 130px 0;
    color: var(--paper);
    background-color: var(--night);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 32px 32px;
}

.contact-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 72px;
    align-items: end;
}

.contact-desc {
    margin-top: 16px;
    max-width: 34em;
    color: rgba(237, 240, 243, 0.7);
}

.contact-phone {
    display: inline-block;
    margin-top: 40px;
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    line-height: 1.1;
    color: var(--bus);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.contact-phone:hover {
    color: #ffc845;
}

.contact-list {
    margin-top: 40px;
    display: grid;
    gap: 12px;
}

.contact-list > div {
    display: grid;
    grid-template-columns: 6em 1fr;
    gap: 16px;
}

.contact-list dt {
    color: rgba(237, 240, 243, 0.5);
}

.contact-list a {
    text-decoration: none;
    border-bottom: 1px solid rgba(237, 240, 243, 0.3);
    transition: border-color 0.2s ease;
}

.contact-list a:hover {
    border-color: var(--bus);
}

.contact-qr {
    text-align: center;
}

.contact-qr img {
    width: 168px;
    height: 168px;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
}

.contact-qr figcaption {
    margin-top: 14px;
    font-size: 0.9rem;
    color: rgba(237, 240, 243, 0.7);
}

/* ---------- 页脚 ---------- */

.site-footer {
    background: #0c141c;
    color: rgba(237, 240, 243, 0.5);
    font-size: 0.85rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding-top: 24px;
    padding-bottom: 24px;
}

.site-footer a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--paper);
}

/* ---------- 动效 ---------- */

.js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.8s ease, transform 0.9s var(--ease);
}

.js .reveal.is-in {
    opacity: 1;
    transform: none;
}

@keyframes heroImage {
    from { opacity: 0; transform: scale(1.08); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
    .js .reveal { opacity: 1; transform: none; }
    .promise-word em { background-size: 100% 0.26em; }
}

/* ---------- 响应式 ---------- */

@media (max-width: 960px) {
    .nav-links {
        gap: 22px;
    }

    .about-head,
    .product-inner {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .service {
        grid-template-columns: 72px 1fr;
        grid-template-areas:
            "no body"
            "no media";
        gap: 32px 28px;
    }

    .service--flip {
        grid-template-areas:
            "no body"
            "no media";
    }

    .service-no {
        font-size: 4rem;
    }

    .flow-steps {
        gap: 28px;
    }

    .flow-step img {
        height: 360px;
    }
}

@media (max-width: 780px) {
    .wrap {
        padding: 0 22px;
    }

    .nav {
        height: 60px;
    }

    .nav-call {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 8px 22px 20px;
        background: rgba(237, 240, 243, 0.98);
        box-shadow: 0 1px 0 var(--line);
    }

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

    .nav-links a {
        display: block;
        padding: 14px 0;
        font-size: 1.05rem;
        color: var(--ink);
        border-bottom: 1px solid var(--line);
    }

    .menu-open .nav-brand {
        opacity: 1;
        transform: none;
    }

    .hero {
        align-items: flex-end;
    }

    .hero-bg {
        width: 100%;
        height: 58%;
        object-position: 50% 50%;
        -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
        mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
    }

    .hero-inner {
        padding-top: 0;
        padding-bottom: 56px;
    }

    .hero-brand {
        margin: 8px 0 18px;
    }

    .hero-actions {
        gap: 20px;
        margin-top: 28px;
    }

    .about {
        padding: 96px 0 88px;
    }

    .scenes {
        grid-template-columns: 1fr 1fr;
        margin-top: 52px;
    }

    .scene:first-child {
        grid-column: 1 / -1;
    }

    .services,
    .flow,
    .contact {
        padding: 88px 0;
    }

    .services .title {
        margin-bottom: 24px;
    }

    .service {
        grid-template-columns: 1fr;
        grid-template-areas:
            "no"
            "body"
            "media";
        gap: 18px;
        padding: 48px 0;
    }

    .service--flip {
        grid-template-areas:
            "no"
            "body"
            "media";
    }

    .service-no {
        font-size: 3.2rem;
    }

    .product-inner {
        padding-top: 52px;
        padding-bottom: 88px;
    }

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

    .flow .title {
        margin-bottom: 40px;
    }

    .flow-steps {
        grid-template-columns: 1fr;
        gap: 56px;
    }

    .flow-step img {
        height: 400px;
    }

    .promise {
        padding: 96px 0 104px;
    }

    .promise-line {
        flex-direction: column;
        gap: 12px;
    }

    .contact-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .contact-qr {
        text-align: left;
    }

    .contact-list > div {
        grid-template-columns: 5em 1fr;
    }
}
