:root {
    --bg: #08110e;
    --bg-deep: #040806;
    --panel: rgba(9, 20, 16, 0.66);
    --panel-strong: rgba(10, 18, 15, 0.9);
    --border: rgba(212, 164, 102, 0.18);
    --border-strong: rgba(212, 164, 102, 0.4);
    --text: #f7f1e6;
    --muted: #b8af9e;
    --accent: #d6995f;
    --accent-soft: #ffbf80;
    --forest: #20423b;
    --shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
    --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.22);
    --panel-border: rgba(255, 255, 255, 0.05);
    --panel-bg: linear-gradient(180deg, rgba(11, 20, 16, 0.72), rgba(8, 13, 11, 0.9));
    --panel-bg-hover: linear-gradient(180deg, rgba(12, 23, 18, 0.84), rgba(7, 12, 10, 0.95));
    --radius-pill: 999px;
    --radius-lg: 28px;
    --radius-md: 24px;
    --font-body: "Noto Sans TC", "Segoe UI", sans-serif;
    --font-display: "Fraunces", Georgia, serif;
    --content-width: min(1280px, calc(100vw - 3rem));
    --hero-width: min(1520px, calc(100vw - 3rem));
    --header-height: 88px;
    --scroll-ratio: 0;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: var(--font-body);
    background:
        radial-gradient(circle at 20% 18%, rgba(84, 145, 120, 0.16), transparent 0 28%),
        radial-gradient(circle at 78% 16%, rgba(219, 140, 64, 0.2), transparent 0 24%),
        linear-gradient(180deg, #09100d 0%, #07100d 38%, #040705 100%);
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 72px 72px;
    opacity: 0.14;
    transform: translateY(calc(var(--scroll-ratio) * -36px));
}

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 1rem;
    z-index: 100;
    padding: 0.75rem 1.25rem;
    background: var(--accent);
    color: #170e05;
    border-radius: var(--radius-pill);
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}

.skip-link:focus {
    left: 1rem;
}

button,
input,
textarea {
    font: inherit;
}

.page-shell {
    position: relative;
    isolation: isolate;
}

.ambient-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.ambient-glow {
    position: absolute;
    border-radius: var(--radius-pill);
    filter: blur(16px);
    opacity: 0.85;
}

.ambient-glow-a {
    width: 32vw;
    height: 32vw;
    left: -8vw;
    top: 8vh;
    background: radial-gradient(circle, rgba(48, 113, 87, 0.52) 0%, transparent 70%);
    transform: translateY(calc(var(--scroll-ratio) * 56px));
}

.ambient-glow-b {
    width: 30vw;
    height: 30vw;
    right: -8vw;
    top: 12vh;
    background: radial-gradient(circle, rgba(224, 134, 59, 0.5) 0%, transparent 72%);
    transform: translateY(calc(var(--scroll-ratio) * -82px));
}

.ambient-grid {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(214, 153, 95, 0.08), transparent 34%),
        radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.035), transparent 52%);
    opacity: 0.9;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: var(--hero-width);
    margin: 0 auto;
    min-height: var(--header-height);
    padding: 1rem 0;
    backdrop-filter: blur(16px);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header.scrolled {
    background: rgba(4, 8, 6, 0.88);
    border-bottom: 1px solid var(--border);
}

.brand-mark {
    display: inline-flex;
    flex-direction: column;
    gap: 0.2rem;
}

.brand-mark-en,
.hero-brand-en,
.footer-brand {
    font-family: var(--font-display);
}

.brand-mark-en {
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.brand-mark-zh {
    color: var(--muted);
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.12em;
}

html[lang="en"] .brand-mark {
    gap: 0;
}

html[lang="en"] .brand-mark-zh {
    display: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-nav a,
.lang-toggle {
    position: relative;
    color: var(--muted);
    transition: color 0.25s ease, transform 0.25s ease;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.35rem;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transform: scaleX(0.2);
    opacity: 0;
    transform-origin: center;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.lang-toggle:hover,
.lang-toggle:focus-visible {
    color: var(--text);
    transform: translateY(-1px);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
}

.lang-toggle {
    border: 1px solid var(--border);
    background: rgba(7, 12, 10, 0.55);
    border-radius: var(--radius-pill);
    padding: 0.65rem 1rem;
    cursor: pointer;
}

main,
.site-footer {
    width: var(--content-width);
    margin: 0 auto;
}

.hero {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(620px, 1.1fr) minmax(360px, 0.9fr);
    gap: clamp(2.5rem, 4vw, 5rem);
    align-items: center;
    min-height: calc(100svh - var(--header-height));
    padding: 2rem max(1.5rem, calc((100vw - var(--hero-width)) / 2)) 6rem;
}

.hero-copy {
    max-width: 760px;
    min-width: 0;
}

.hero-kicker,
.section-label,
.scenario-tag {
    margin: 0 0 1rem;
    color: var(--accent-soft);
    font-size: 0.8rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
}

.hero-brand {
    display: grid;
    gap: 0.7rem;
    margin-bottom: 1.15rem;
}

.hero-brand-zh {
    margin: 0;
    color: #ddd2c1;
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.18em;
}

.hero-brand-en {
    margin: 0;
    max-width: 8.4ch;
    font-size: clamp(2.8rem, 7vw, 5.9rem);
    line-height: 0.92;
    letter-spacing: 0.01em;
}

.hero-title {
    margin: 0;
    max-width: 11ch;
    font-size: clamp(2rem, 3.2vw, 3.55rem);
    line-height: 1.08;
}

html[lang="en"] .hero-brand {
    gap: 0;
    margin-bottom: 0.9rem;
}

html[lang="en"] .hero-brand-zh {
    display: none;
}

html[lang="en"] .hero-brand-en {
    max-width: 8.2ch;
    font-size: clamp(2.8rem, 5.8vw, 5rem);
}

html[lang="en"] .hero-title {
    max-width: 14ch;
    font-size: clamp(1.8rem, 2.45vw, 2.85rem);
    line-height: 1.04;
}

.hero-lead,
.section-intro p,
.service-copy p,
.process-step p,
.capability-copy p,
.scenario-item p,
.contact-copy p,
.form-note,
.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

.hero-lead {
    max-width: 62ch;
    margin: 1.5rem 0 0;
    font-size: 1rem;
}

.hero-actions,
.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    min-width: 160px;
    padding: 0.9rem 1.4rem;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease,
        box-shadow 0.22s ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
}

.button-primary {
    background: linear-gradient(135deg, #cb8746, #e4b27d);
    color: #170e05;
    box-shadow: 0 18px 40px rgba(203, 135, 70, 0.24);
}

.button-primary:hover,
.button-primary:focus-visible {
    box-shadow: 0 22px 48px rgba(203, 135, 70, 0.32);
}

.button-secondary {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.button-secondary:hover,
.button-secondary:focus-visible {
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.05);
}

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

.signal-panel {
    position: relative;
    width: min(420px, 100%);
    aspect-ratio: 1 / 1.2;
    border: 1px solid rgba(214, 153, 95, 0.18);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(12, 26, 21, 0.82), rgba(6, 12, 10, 0.95)),
        radial-gradient(circle at 50% 34%, rgba(214, 153, 95, 0.18), transparent 36%);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.signal-panel::before,
.signal-panel::after {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
}

.signal-panel::after {
    inset: auto 18px 18px;
    height: 44%;
    border-top: 0;
}

.signal-line {
    position: absolute;
    inset-inline: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(223, 174, 118, 0.7), transparent);
    transform-origin: left;
    animation: pulse-line 4.6s ease-in-out infinite;
}

.signal-line-a {
    top: 32%;
}

.signal-line-b {
    top: 64%;
    animation-delay: 0.8s;
}

.signal-core {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 0.65rem;
    align-content: center;
    font-family: var(--font-display);
    letter-spacing: 0.2em;
    color: rgba(247, 241, 230, 0.82);
}

.signal-core span {
    position: relative;
}

.signal-core span::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -0.4rem;
    width: 86px;
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(214, 153, 95, 0.75), transparent);
}

.section {
    padding: 6rem 0;
}

.section-intro {
    display: grid;
    gap: 1rem;
    max-width: 760px;
    margin-bottom: 2.5rem;
}

.section-intro h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.14;
}

.section-intro p {
    margin: 0;
}

.service-rail {
    display: grid;
    gap: 1rem;
}

.service-item,
.scenario-item,
.contact-form,
.process-step {
    position: relative;
    overflow: hidden;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
}

.service-item {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 1rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: border-color 0.22s ease, transform 0.22s ease, background 0.22s ease;
}

.service-item::before,
.scenario-item::before,
.contact-form::before {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(214, 153, 95, 0.75), transparent);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.service-item:hover,
.service-item:focus-within {
    transform: translateY(-4px);
    border-color: rgba(214, 153, 95, 0.25);
    background: var(--panel-bg-hover);
}

.service-item:hover::before,
.service-item:focus-within::before,
.scenario-item:hover::before,
.scenario-item:focus-within::before,
.contact-form:focus-within::before {
    opacity: 1;
}

.service-index {
    margin: 0;
    color: rgba(214, 153, 95, 0.52);
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-family: var(--font-display);
}

.service-copy {
    display: grid;
    gap: 1rem;
}

.service-copy h3,
.process-step h3,
.scenario-item h3,
.contact-copy h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 2rem);
}

.service-copy p {
    margin: 0;
    max-width: 58ch;
}

.service-list,
.capability-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-list {
    display: grid;
    gap: 0.65rem;
}

.service-list li,
.capability-list li {
    position: relative;
    padding-left: 1.15rem;
    color: #e5dccf;
    line-height: 1.7;
}

.service-list li::before,
.capability-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.78rem;
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 16px rgba(214, 153, 95, 0.45);
}

.process-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.process-track::before {
    content: "";
    position: absolute;
    top: calc(1.8rem + 0.7rem);
    left: 2.5rem;
    right: 2.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(214, 153, 95, 0.35) 20%, rgba(214, 153, 95, 0.35) 80%, transparent);
    pointer-events: none;
    z-index: 0;
}

.process-step {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 1px solid rgba(214, 153, 95, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: linear-gradient(180deg, rgba(11, 20, 16, 0.45), rgba(8, 13, 11, 0.58));
    box-shadow: none;
    padding: 1.8rem;
}

.process-step-no {
    display: inline-flex;
    margin-bottom: 1rem;
    color: var(--accent-soft);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
}

.process-step p,
.scenario-item p,
.contact-copy p,
.capability-copy p,
.site-footer p {
    margin: 0.9rem 0 0;
}

.capability-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.9fr);
    gap: 2rem;
    align-items: start;
}

.capability-copy {
    max-width: 58ch;
}

.capability-list {
    display: grid;
    gap: 0.9rem;
    padding: 1.75rem;
    border-radius: var(--radius-md);
    background: rgba(8, 16, 13, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.scenario-item {
    min-height: 260px;
    padding: 1.8rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.scenario-item:hover,
.scenario-item:focus-within {
    transform: translateY(-4px);
    border-color: rgba(214, 153, 95, 0.22);
}

.scenario-tag {
    margin-bottom: 0.8rem;
}

.contact {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1fr);
    gap: 2rem;
    align-items: start;
}

.contact-copy {
    max-width: 58ch;
}

.contact-mail {
    display: inline-block;
    margin-top: 1.6rem;
    color: var(--accent-soft);
    font-size: clamp(1.05rem, 2vw, 1.4rem);
}

.contact-form {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 1.6rem;
}

.form-row {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.form-row label {
    color: #e7ddcf;
    font-size: 0.96rem;
}

.form-row input,
.form-row textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    padding: 0.95rem 1rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: 2px solid rgba(214, 153, 95, 0.6);
    outline-offset: 2px;
    border-color: rgba(214, 153, 95, 0.42);
    background: rgba(255, 255, 255, 0.05);
}

.form-note {
    margin: 0;
    max-width: 28ch;
    font-size: 0.92rem;
}

.form-status {
    margin: 0;
    min-height: 1.5em;
    font-size: 0.9rem;
    color: var(--muted);
}

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

.turnstile-container {
    min-height: 70px;
}

.form-status.is-success {
    color: #9fd7b7;
}

.form-status.is-error {
    color: #ffc08a;
}

.form-status.is-loading {
    color: var(--accent-soft);
}

.form-status.is-warning {
    color: #e8d08a;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 2rem 0 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand {
    margin: 0;
    font-size: 1.2rem;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    transition-delay: 0.08s;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-copy > * {
    opacity: 0;
    transform: translateY(18px);
    animation: hero-rise 0.7s ease forwards;
}

.hero-copy > *:nth-child(1) {
    animation-delay: 0.1s;
}

.hero-copy > *:nth-child(2) {
    animation-delay: 0.18s;
}

.hero-copy > *:nth-child(3) {
    animation-delay: 0.26s;
}

.hero-copy > *:nth-child(4) {
    animation-delay: 0.34s;
}

.hero-copy > *:nth-child(5) {
    animation-delay: 0.42s;
}

.hero-visual,
.signal-panel {
    animation: hero-float 1s ease forwards;
}

@keyframes hero-rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hero-float {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse-line {
    0%,
    100% {
        opacity: 0.25;
        transform: scaleX(0.72);
    }

    50% {
        opacity: 1;
        transform: scaleX(1);
    }
}

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

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .reveal,
    .hero-copy > * {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 1200px) {
    .hero,
    .contact,
    .capability-layout {
        grid-template-columns: 1fr;
    }

    .process-track,
    .scenario-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .process-track::before {
        display: none;
    }
}

@media (max-width: 720px) {
    :root {
        --content-width: min(100vw - 1.5rem, 1280px);
        --hero-width: min(100vw - 1.5rem, 1520px);
        --header-height: 102px;
    }

    .site-header {
        flex-wrap: wrap;
        justify-content: space-between;
        row-gap: 0.5rem;
        padding-top: 0.65rem;
        padding-bottom: 0.65rem;
    }

    .site-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        gap: 0.4rem;
        padding: 0.1rem 0 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .site-nav::-webkit-scrollbar {
        display: none;
    }

    .site-nav a {
        flex: 0 0 auto;
        padding: 0.55rem 0.8rem;
        border-radius: var(--radius-pill);
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.04);
    }

    .hero {
        min-height: auto;
        padding: 0.15rem 0 3.5rem;
        gap: 1.2rem;
    }

    .hero-kicker {
        margin-bottom: 0.5rem;
        letter-spacing: 0.14em;
        font-size: 0.72rem;
    }

    .hero-brand-zh {
        letter-spacing: 0.1em;
        font-size: 1rem;
    }

    .hero-brand-en {
        max-width: 100%;
        font-size: clamp(2.35rem, 13vw, 3.8rem);
    }

    html[lang="en"] .hero-brand-en {
        font-size: clamp(2.25rem, 12vw, 3.55rem);
    }

    .hero-title {
        max-width: 100%;
        font-size: clamp(1.62rem, 8.2vw, 2.28rem);
        line-height: 1.08;
    }

    html[lang="en"] .hero-title {
        font-size: clamp(1.55rem, 7.7vw, 2.12rem);
        line-height: 1.06;
    }

    .hero-lead {
        margin-top: 0.85rem;
        font-size: 0.95rem;
        line-height: 1.68;
    }

    .hero-actions,
    .form-actions {
        gap: 0.75rem;
    }

    .hero-actions .button,
    .form-actions .button {
        width: 100%;
    }

    .hero-visual {
        display: none;
    }

    .service-item {
        grid-template-columns: 1fr;
        padding: 1.35rem;
    }

    .service-index {
        font-size: 2rem;
    }

    .section-intro {
        margin-bottom: 1.8rem;
    }

    .process-track,
    .scenario-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 4.5rem 0;
    }

    .section-label {
        margin-bottom: 0.75rem;
        letter-spacing: 0.16em;
    }

    .section-intro h2 {
        font-size: clamp(1.55rem, 8vw, 2.15rem);
        line-height: 1.14;
    }

    .process-step,
    .scenario-item,
    .contact-form,
    .capability-list {
        padding: 1.35rem;
    }

    .scenario-item {
        min-height: auto;
    }

    .service-list li,
    .capability-list li,
    .scenario-item p,
    .process-step p {
        line-height: 1.65;
    }

    .contact-mail {
        font-size: 1rem;
        overflow-wrap: anywhere;
    }

    .form-note {
        max-width: none;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
