:root {
    --ink: #e7eefc;
    --muted: #93a4c4;
    --paper: #05060a;
    --card: rgba(8, 14, 28, 0.88);
    --line: rgba(90, 150, 255, 0.28);
    --blue: #2f6bff;
    --blue-bright: #7eb6ff;
    --header: 4.4rem;
    --wrap: 72rem;
    color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(47, 107, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(47, 107, 255, 0.055) 1px, transparent 1px),
        radial-gradient(ellipse at 85% -10%, rgba(47, 107, 255, 0.28), transparent 36rem);
    background-size: 52px 52px, 52px 52px, auto;
    background-attachment: fixed;
    font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    font-size: 1.0625rem;
    line-height: 1.7;
}

a { color: var(--blue-bright); }

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

.wrap {
    width: min(var(--wrap), calc(100% - 2rem));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
    min-height: var(--header);
    padding: 0.7rem 1rem;
    background: rgba(5, 6, 10, 0.82);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(47, 107, 255, 0.35);
    backdrop-filter: blur(16px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.brand-logo {
    width: 3.6rem;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(47, 107, 255, 0.55));
}

.brand strong,
.brand small { display: block; }

.brand strong { font-size: 1.05rem; line-height: 1.2; }

.brand small {
    color: var(--muted);
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.nav-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nav-burger {
    display: none;
    margin-left: auto;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 0.2rem;
    background: rgba(12, 20, 40, 0.9);
    color: var(--ink);
    cursor: pointer;
}

.site-nav,
.footer-nav {
    display: flex;
    gap: 1.25rem;
    margin-left: auto;
}

.site-nav a,
.footer-nav a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
}

.site-nav a {
    padding-bottom: 0.15rem;
    border-bottom: 2px solid transparent;
}

.site-nav a[aria-current="page"] {
    color: white;
    border-bottom-color: var(--blue);
}

.site-nav a:hover,
.footer-nav a:hover { color: var(--blue-bright); }

main { flex: 1; }

.hero {
    display: grid;
    gap: 1.5rem;
    padding: 2.5rem 0 1rem;
}

.eyebrow {
    margin: 0 0 0.4rem;
    color: var(--blue-bright);
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1, h2 { line-height: 1.25; letter-spacing: 0; }

h1 { margin: 0; font-size: clamp(2.2rem, 6vw, 4.2rem); }

.accent-rule {
    width: 4.5rem;
    height: 0.18rem;
    margin: 0.9rem 0 1rem;
    background: linear-gradient(90deg, var(--blue), transparent);
    box-shadow: 0 0 12px rgba(47, 107, 255, 0.8);
}

.lede {
    max-width: 38rem;
    margin: 0;
    color: var(--muted);
    font-size: 1.125rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.4rem;
}

.button,
.contact-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.55rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 0.2rem;
    background: var(--blue);
    color: white;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 0 18px rgba(47, 107, 255, 0.35);
    cursor: pointer;
}

.button.secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
    box-shadow: none;
}

.button:hover,
.contact-form button:hover { background: #4d82ff; }

.button.secondary:hover {
    background: rgba(47, 107, 255, 0.12);
    color: white;
}

.hero-mark {
    display: grid;
    place-items: center;
}

.hero-mark img {
    width: min(100%, 26rem);
    filter: drop-shadow(0 0 28px rgba(47, 107, 255, 0.45));
}

.section { padding: 1.5rem 0 2.5rem; }

.section h2 { margin: 0 0 1rem; font-size: clamp(1.5rem, 3vw, 2rem); }

.service-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-grid a {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    height: 100%;
    padding: 1rem 1.05rem 1.1rem;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(16, 28, 56, 0.92), rgba(7, 11, 22, 0.92));
    color: inherit;
    text-decoration: none;
}

.service-grid a:hover {
    border-color: var(--blue-bright);
    box-shadow: inset 0 0 0 1px rgba(126, 182, 255, 0.35), 0 10px 28px rgba(0, 0, 0, 0.28);
}

.service-index {
    color: var(--blue-bright);
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
}

.service-name { font-weight: 700; }

.note,
.module-body {
    max-width: 46rem;
    padding: 1.25rem 1.3rem;
    border: 1px solid var(--line);
    background: var(--card);
}

.note h2 { font-size: 1.35rem; }

.note p,
.module-body p { margin: 0.7rem 0 0; }

.module-body p:first-child { margin-top: 0; }

.redFColor { color: #ff5d6c; }

.page-intro { padding-top: 2.5rem; }

.page-intro h1 { font-size: clamp(2rem, 5vw, 3.2rem); }

.contact-layout {
    width: min(36rem, calc(100% - 2rem));
    margin-inline: auto;
    padding: 3rem 0 4rem;
}

.contact-layout .eyebrow,
.contact-layout h1,
.contact-layout .lede,
.contact-layout .form-ok,
.contact-layout .form-error {
    text-align: center;
}

.contact-layout .accent-rule { margin-inline: auto; }

.contact-layout .lede { margin-inline: auto; }

.form-error,
.form-ok,
.form-note { margin: 0.4rem 0; }

.form-error { color: #ff8d98; }

.form-ok { color: #5dface; font-weight: 700; }

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

.contact-form {
    display: grid;
    gap: 0.35rem;
    width: 100%;
    margin: 1.25rem auto 0;
    padding: 1.2rem;
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.contact-form label { font-weight: 700; margin-top: 0.45rem; }

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 0.15rem;
    background: #070b14;
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
}

.contact-form button { margin-top: 0.8rem; justify-self: start; }

.site-footer {
    margin-top: auto;
    padding: 1.3rem 0 1.5rem;
    background: #03040a;
    border-top: 1px solid var(--line);
    color: white;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.5rem;
    align-items: center;
    justify-content: space-between;
}

.footer-nav { margin-left: 0; }

.footer-meta { margin: 0.35rem 0 0; color: rgba(231, 238, 252, 0.72); font-size: 0.92rem; }

.footer-id { color: var(--blue-bright); }

@media (max-width: 760px) {
    .nav-burger { display: inline-flex; }
    .site-nav {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        gap: 0.2rem;
        margin: 0;
        padding-bottom: 0.4rem;
    }
    .nav-toggle:checked ~ .site-nav { display: flex; }
    .site-nav a { padding: 0.45rem 0; }
    .contact-form button { width: 100%; }
    .footer-nav { width: 100%; }
}

@media (min-width: 720px) {
    .service-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1040px) {
    .hero {
        grid-template-columns: 1.15fr 0.85fr;
        align-items: center;
        padding-top: 4rem;
    }
    .service-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
