:root {
    --bg: #0b0c10;
    --surface: rgba(255,255,255,.06);
    --surface-2: rgba(255,255,255,.10);
    --text: rgba(255,255,255,.92);
    --muted: rgba(255,255,255,.70);
    --border: rgba(255,255,255,.14);
    --shadow: 0 10px 30px rgba(0,0,0,.28);
    --accent: #7dd3fc;
    --accent-2: #a78bfa;
    --success: #22c55e;
    --danger: #fb7185;
    --radius: 18px;
    --container: 980px;
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f6f7fb;
        --surface: rgba(0,0,0,.04);
        --surface-2: rgba(0,0,0,.07);
        --text: rgba(0,0,0,.90);
        --muted: rgba(0,0,0,.62);
        --border: rgba(0,0,0,.12);
        --shadow: 0 12px 30px rgba(15,23,42,.10);
        --accent: #0284c7;
        --accent-2: #7c3aed;
        --success: #16a34a;
        --danger: #e11d48;
    }
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: radial-gradient(900px 300px at 15% 0%, rgba(125,211,252,.15), transparent 60%), radial-gradient(800px 260px at 90% 0%, rgba(167,139,250,.16), transparent 55%), var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

    body.modal-open {
        overflow: hidden;
    }


[hidden] {
    display: none !important;
}

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

    a:hover {
        text-decoration: underline;
    }

strong {
    font-weight: 700;
}

.muted {
    color: var(--muted);
}

.dot {
    opacity: .6;
    padding: 0 .35rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 20px 16px 72px;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 10px;
    background: var(--text);
    color: var(--bg);
    padding: 10px 12px;
    border-radius: 10px;
}

    .skip-link:focus {
        left: 12px;
        z-index: 9999;
    }

.hero {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    border-bottom: 1px solid var(--border);
}

.hero__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 16px;
    max-width: var(--container);
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand__logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: rgba(0,0,0,.75);
    box-shadow: var(--shadow);
}

.brand__text {
    min-width: 0;
}

h1 {
    margin: 0;
    font-size: clamp(18px, 2.5vw, 24px);
    letter-spacing: .2px;
    line-height: 1.25;
}

.meta {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.actions {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    box-shadow: 0 6px 18px rgba(0,0,0,.10);
    font-size: 13px;
    cursor: pointer;
    color: inherit;
    transition: transform .2s ease, opacity .2s ease, border-color .2s ease, box-shadow .2s ease;
}

    .btn:hover {
        transform: translateY(-1px);
        text-decoration: none;
    }

    .btn:disabled {
        cursor: not-allowed;
        opacity: .7;
    }

.btn--ghost {
    background: transparent;
    box-shadow: none;
}

.card {
    margin-top: 16px;
    padding: 18px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 60%, transparent));
    box-shadow: var(--shadow);
}

.section h2 {
    margin: 0 0 10px;
    font-size: clamp(18px, 2.2vw, 22px);
    line-height: 1.3;
}

.lead p {
    margin: 0;
}

.lang-grid {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 16px;
    align-items: start;
}

.divider {
    width: 1px;
    height: 100%;
    background: var(--border);
}

.note {
    margin: 0 0 16px;
    padding: 12px 12px;
    border-left: 3px solid color-mix(in srgb, var(--accent) 65%, transparent);
    background: color-mix(in srgb, var(--surface-2) 65%, transparent);
    border-radius: 12px;
}

.form-status {
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    font-weight: 600;
    box-shadow: var(--shadow);
}

.form-status--success {
    border-color: color-mix(in srgb, var(--success) 35%, var(--border));
    background: color-mix(in srgb, var(--success) 12%, var(--surface));
}

.form-status--error {
    border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
    background: color-mix(in srgb, var(--danger) 10%, var(--surface));
}

.contact-form {
    display: grid;
    gap: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field--full {
    width: 100%;
}

label {
    font-size: 14px;
    font-weight: 600;
}

input, textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    color: var(--text);
    padding: 14px 14px;
    font: inherit;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

    input::placeholder, textarea::placeholder {
        color: var(--muted);
    }

    input:focus, textarea:focus {
        border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
    }

textarea {
    min-height: 180px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 24px;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 7, 18, .55);
    backdrop-filter: blur(8px);
}

.modal__dialog {
    position: relative;
    width: min(100%, 460px);
    padding: 28px 24px 22px;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 82%, transparent), color-mix(in srgb, var(--surface) 90%, transparent));
    box-shadow: 0 24px 60px rgba(0,0,0,.28);
    text-align: center;
}

.modal__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 32px;
    font-weight: 800;
    color: #fff;
}

.modal--success .modal__icon {
    background: linear-gradient(135deg, color-mix(in srgb, var(--success) 86%, white), color-mix(in srgb, var(--accent) 30%, var(--success)));
}

.modal--error .modal__icon {
    background: linear-gradient(135deg, color-mix(in srgb, var(--danger) 86%, white), color-mix(in srgb, var(--accent-2) 20%, var(--danger)));
}

.modal__title {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.2;
}

.modal__message {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.modal__actions {
    margin-top: 22px;
    display: flex;
    justify-content: center;
}

    .modal__actions .btn {
        min-width: 140px;
    }

@media (max-width: 720px) {
    .hero__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .lang-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .divider {
        display: none;
    }

    .meta {
        white-space: normal;
    }

    .form-actions > * {
        flex: 1 1 100%;
    }

    .modal {
        padding: 16px;
    }

    .modal__dialog {
        padding: 24px 18px 18px;
    }
}

@media print {
    :root {
        --bg: #fff;
        --text: #111;
        --muted: #444;
        --border: #ddd;
        --surface: #fff;
        --surface-2: #fff;
    }

    body {
        background: #fff;
    }

    .hero {
        position: static;
        backdrop-filter: none;
    }

    .skip-link, .actions, .modal {
        display: none !important;
    }

    .card {
        box-shadow: none;
    }
}
