/* =========================================================
   师心驿站 · 前台样式
   ========================================================= */

:root {
    --bg: #fff9f4;
    --card: #fffdfb;
    --ink: #453631;
    --ink-soft: #6f5b53;
    --muted: #9a867d;
    --brand: #c46b58;
    --brand-deep: #a9533f;
    --brand-soft: #f9e7df;
    --line: #f1e1d6;
    --green: #6f9276;
    --serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
    --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    background:
        radial-gradient(900px 540px at 12% -10%, #ffe7d8 0%, rgba(255, 231, 216, 0) 62%),
        radial-gradient(760px 500px at 92% 2%, #fde4e9 0%, rgba(253, 228, 233, 0) 58%),
        linear-gradient(180deg, #fffaf5 0%, #fff6ef 55%, #fdf0e9 100%);
    -webkit-font-smoothing: antialiased;
}

[hidden] {
    display: none !important;
}

button,
input,
textarea {
    font-family: inherit;
}

/* ---------- 背景装饰 ---------- */

.ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    opacity: 0.55;
}

.blob-1 {
    width: 520px;
    height: 520px;
    left: -160px;
    top: -180px;
    background: #ffdccb;
}

.blob-2 {
    width: 430px;
    height: 430px;
    right: -150px;
    top: 40px;
    background: #fbdde4;
}

.blob-3 {
    width: 580px;
    height: 580px;
    left: 50%;
    bottom: -420px;
    transform: translateX(-50%);
    background: #ffeede;
    opacity: 0.65;
}

.floater {
    position: absolute;
    color: rgba(196, 107, 88, 0.22);
    animation: drift 15s ease-in-out infinite alternate;
}

.floater-1 {
    width: 22px;
    left: 12%;
    top: 22%;
    animation-delay: -2s;
}

.floater-2 {
    width: 15px;
    right: 14%;
    top: 34%;
    color: rgba(185, 88, 69, 0.18);
    animation-delay: -7s;
}

.floater-3 {
    width: 18px;
    left: 20%;
    bottom: 16%;
    color: rgba(200, 130, 110, 0.2);
    animation-delay: -11s;
}

@keyframes drift {
    from {
        transform: translate3d(0, 0, 0) rotate(-8deg);
    }
    to {
        transform: translate3d(8px, -26px, 0) rotate(10deg);
    }
}

/* ---------- 页面骨架 ---------- */

.page {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 58px 20px 40px;
}

.site-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.brand-mark {
    width: 74px;
    height: 74px;
    filter: drop-shadow(0 18px 26px rgba(184, 90, 70, 0.26));
    animation: fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-mark svg {
    width: 100%;
    height: 100%;
    display: block;
}

.brand-logo {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 22px;
    object-fit: cover;
}

.site-title {
    margin: 20px 0 0;
    font-family: var(--serif);
    font-size: 40px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.16em;
    text-indent: 0.16em;
    color: #4a352e;
    animation: fade-up 0.8s 0.06s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tagline {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    animation: fade-up 0.8s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tagline p {
    margin: 0;
    font-size: 13.5px;
    letter-spacing: 0.18em;
    text-indent: 0.18em;
    color: var(--muted);
}

.tagline-line {
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, rgba(196, 107, 88, 0), rgba(196, 107, 88, 0.45));
}

.tagline-line:last-child {
    background: linear-gradient(90deg, rgba(196, 107, 88, 0.45), rgba(196, 107, 88, 0));
}

/* ---------- 卡片 ---------- */

.card {
    position: relative;
    margin-top: 32px;
    padding: 38px 40px 34px;
    background: rgba(255, 253, 251, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    box-shadow:
        0 34px 80px -44px rgba(168, 101, 79, 0.55),
        0 4px 18px -10px rgba(168, 101, 79, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    animation: fade-up 0.9s 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.card::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    left: 50%;
    width: 88px;
    height: 3px;
    transform: translateX(-50%);
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, #f0c3b2, #d98a72, #f0c3b2);
    opacity: 0.85;
}

.card-head h2 {
    margin: 16px 0 0;
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #4a352e;
}

.card-head > p {
    margin: 10px 0 0;
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--muted);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #fdf0e9;
    color: var(--brand);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-indent: 0.1em;
}

.chip svg {
    width: 14px;
    height: 14px;
}

/* ---------- 提示 ---------- */

.notice {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
}

.notice-dot {
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.notice-success {
    background: #eff6f0;
    color: #4f7457;
}

.notice-error {
    background: #fdf0ec;
    color: #b0544a;
}

/* ---------- 表单 ---------- */

.msg-form {
    margin-top: 26px;
}

.field + .field {
    margin-top: 22px;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.label-row label {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
    letter-spacing: 0.02em;
}

.req {
    margin-left: 8px;
    padding: 1px 6px;
    border-radius: 5px;
    background: #fceee8;
    color: #bd7662;
    font-style: normal;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.06em;
}

.counter {
    font-size: 11.5px;
    color: #b7a49a;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.control {
    position: relative;
}

.control-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    width: 19px;
    height: 19px;
    transform: translateY(-50%);
    color: #c6ab9f;
    pointer-events: none;
}

input[type="text"],
textarea {
    width: 100%;
    color: var(--ink);
    font-size: 15px;
    background: #fff9f5;
    border: 1.5px solid #f2e2d8;
    border-radius: 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input[type="text"] {
    padding: 14px 16px 14px 45px;
}

textarea {
    display: block;
    padding: 15px 17px;
    min-height: 152px;
    line-height: 1.9;
    resize: vertical;
}

input[type="text"]::placeholder,
textarea::placeholder {
    color: #c0ada3;
}

input[type="text"]:focus,
textarea:focus {
    background: #fffdfb;
    border-color: #d68e7c;
    box-shadow: 0 0 0 4px rgba(196, 107, 88, 0.1);
}

.hint {
    margin: 8px 0 0 2px;
    font-size: 12px;
    color: #b3a097;
}

.captcha-box {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.captcha-box .control {
    flex: 1 1 auto;
    min-width: 0;
}

.captcha-box input[type="text"] {
    height: 52px;
    padding-top: 0;
    padding-bottom: 0;
}

.captcha-thumb {
    position: relative;
    flex: 0 0 auto;
    width: 132px;
    height: 52px;
    padding: 3px;
    border: 1.5px solid #f2e2d8;
    border-radius: 16px;
    background: #fffaf4;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.captcha-thumb:hover,
.captcha-thumb:focus-visible {
    border-color: #d68e7c;
    box-shadow: 0 0 0 4px rgba(196, 107, 88, 0.08);
    outline: none;
}

.captcha-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 11px;
    object-fit: contain;
    background: #fffaf4;
}

.captcha-thumb-tip {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 250, 244, 0.88);
    color: #a9634f;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.1em;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.captcha-thumb:hover .captcha-thumb-tip,
.captcha-thumb:focus-visible .captcha-thumb-tip {
    opacity: 1;
}

@media (max-width: 420px) {
    .captcha-thumb {
        width: 108px;
    }

    .captcha-box input[type="text"] {
        padding-left: 40px;
        font-size: 14px;
    }
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.btn-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 28px;
    padding: 15px 24px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #d7806c 0%, #c1614e 55%, #b35540 100%);
    color: #fff;
    font-size: 15.5px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-indent: 0.14em;
    cursor: pointer;
    box-shadow: 0 18px 34px -16px rgba(179, 85, 64, 0.75);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 38px -16px rgba(179, 85, 64, 0.8);
    filter: brightness(1.03);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 12px 24px -14px rgba(179, 85, 64, 0.8);
}

.btn-submit:focus-visible {
    outline: 3px solid rgba(196, 107, 88, 0.32);
    outline-offset: 3px;
}

.btn-submit:disabled {
    cursor: not-allowed;
    opacity: 0.8;
    transform: none;
}

.btn-arrow {
    width: 19px;
    height: 19px;
    transition: transform 0.2s ease;
}

.btn-submit:hover .btn-arrow {
    transform: translateX(3px);
}

.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-submit.is-loading .spinner {
    display: block;
}

.btn-submit.is-loading .btn-arrow {
    display: none;
}

.privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 16px 0 0;
    font-size: 12px;
    color: #a8958c;
}

.privacy svg {
    width: 13px;
    height: 13px;
}

/* ---------- 底部 ---------- */

.stat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 26px 0 0;
    font-size: 13px;
    color: #a18c83;
    animation: fade-up 0.9s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stat strong {
    margin: 0 2px;
    color: var(--brand);
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.stat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #93ab94;
    box-shadow: 0 0 0 3px rgba(147, 171, 148, 0.18);
}

.site-foot {
    margin-top: 16px;
    padding-bottom: 12px;
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #b9a69d;
    animation: fade-up 0.9s 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.foot-heart {
    display: inline-block;
    margin-right: 6px;
    color: #d29a89;
}

/* ---------- 成功弹层 ---------- */

.success-layer {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(255, 247, 241, 0.74);
    backdrop-filter: blur(9px);
    animation: fade-in 0.28s ease both;
}

.success-card {
    width: min(420px, 100%);
    padding: 42px 34px 30px;
    text-align: center;
    background: #fffdfb;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 28px;
    box-shadow: 0 40px 90px -40px rgba(150, 90, 70, 0.55);
    animation: pop-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}

.success-icon {
    width: 82px;
    height: 82px;
    margin: 0 auto;
}

.success-icon svg {
    width: 100%;
    height: 100%;
}

.check-ring {
    stroke-dasharray: 214;
    stroke-dashoffset: 214;
    animation: draw-ring 0.7s 0.1s ease-out forwards;
}

.check-tick {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: draw-ring 0.45s 0.55s ease-out forwards;
}

.success-card h2 {
    margin: 14px 0 0;
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #46362f;
}

.success-card > p {
    margin: 10px 0 0;
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--muted);
}

.btn-ghost {
    margin-top: 24px;
    padding: 10px 30px;
    border: 1.5px solid #eddbd1;
    border-radius: 999px;
    background: #fffaf6;
    color: var(--brand);
    font-size: 13.5px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-ghost:hover {
    background: #fdf1ea;
    border-color: #e4c8bb;
    transform: translateY(-1px);
}

.success-meta {
    margin: 16px 0 0;
    font-size: 11.5px;
    color: #b9a79e;
    letter-spacing: 0.04em;
}

/* ---------- Toast ---------- */

.toast {
    position: fixed;
    top: 22px;
    left: 50%;
    z-index: 100;
    max-width: min(90vw, 460px);
    padding: 11px 20px;
    border-radius: 12px;
    background: #4a3831;
    color: #fff8f3;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    box-shadow: 0 18px 40px -18px rgba(74, 56, 49, 0.65);
    transform: translate(-50%, -150%);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
    pointer-events: none;
}

.toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

/* ---------- 动画 ---------- */

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pop-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes draw-ring {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- 响应式 ---------- */

@media (max-width: 640px) {
    .page {
        padding: 40px 16px 30px;
    }

    .site-title {
        margin-top: 16px;
        font-size: 33px;
        letter-spacing: 0.13em;
        text-indent: 0.13em;
    }

    .brand-mark {
        width: 64px;
        height: 64px;
    }

    .tagline {
        gap: 10px;
        margin-top: 12px;
    }

    .tagline p {
        font-size: 12.5px;
        letter-spacing: 0.12em;
        text-indent: 0.12em;
    }

    .tagline-line {
        width: 22px;
    }

    .card {
        margin-top: 26px;
        padding: 28px 20px 26px;
        border-radius: 24px;
    }

    .card-head h2 {
        font-size: 22px;
    }

    .card-head > p {
        font-size: 13px;
    }

    textarea {
        min-height: 138px;
    }

    .btn-submit {
        margin-top: 24px;
    }

    .stat {
        font-size: 12.5px;
    }

    .success-card {
        padding: 36px 24px 26px;
    }
}

@media (max-width: 380px) {
    .site-title {
        font-size: 28px;
    }

    .tagline p {
        font-size: 11.5px;
    }

    .card {
        padding: 24px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.001ms !important;
    }
}
