/**
 * 全球化布局页面 — 1:1 复刻 demo.reemoon.com/global
 * 依赖: common/base.css（设计令牌）
 */

/* ================================================================
   隐藏 base.html 的 hr 分隔线
   ================================================================ */
#main-content + hr { display: none; }

/* ================================================================
   页面级别名 — 全部指向 base.css 设计令牌，不重复定义色值
   ================================================================ */
.global-page {
    --global-brand: var(--rm-color-brand);
    --global-brand-dark: var(--rm-color-brand-800);
    --global-brand-light: var(--rm-color-brand-400);
    --global-brand-bright: var(--rm-color-brand-300);
    --global-brand-muted: var(--rm-color-brand-50);
    --global-text: var(--rm-color-neutral-800);
    --global-text-muted: var(--rm-color-neutral-500);
    --global-max: min(var(--rm-container-full), 100%);
    --global-gutter: var(--rm-gutter-fluid);
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: clip;
    color: var(--global-text);
    background: var(--rm-color-neutral-0);
}

/* ---- Container ---- */
.global-container {
    width: 100%;
    max-width: var(--global-max);
    margin: 0 auto;
    padding-left: var(--global-gutter);
    padding-right: var(--global-gutter);
    box-sizing: border-box;
}

/* ---- Typography ---- */
.global-eyebrow {
    margin: 0 0 var(--rm-space-3);
    font-size: 13px;
    font-weight: var(--rm-font-semibold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--global-brand);
}

.global-heading {
    margin: 0 0 var(--rm-space-4);
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    font-weight: var(--rm-font-bold);
    line-height: var(--rm-leading-tight);
    letter-spacing: var(--rm-tracking-tight);
}

.global-heading--light { color: var(--rm-color-neutral-0); }

.global-lead {
    margin: 0;
    font-size: clamp(1rem, 1.15vw, 1.125rem);
    line-height: 1.8;
    color: var(--global-text-muted);
}

.global-lead--light { color: rgba(255, 255, 255, 0.82); }

.global-section {
    width: 100%;
    padding: clamp(64px, 8vw, 112px) 0;
}

/* ---- Buttons ---- */
.global-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: var(--rm-space-4) var(--rm-space-8);
    font-size: var(--rm-text-base);
    font-weight: var(--rm-font-semibold);
    line-height: var(--rm-leading-none);
    text-decoration: none;
    border-radius: var(--rm-radius-pill);
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.global-page a.global-btn:hover,
.global-page a.global-btn:focus,
.global-page a.global-btn:visited {
    text-decoration: none;
}

.global-btn--light {
    color: var(--global-brand-dark);
    background: var(--rm-color-neutral-0);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}

.global-btn--light:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
}

.global-btn__icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: currentColor;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.global-btn__icon--rotate {
    transform: rotate(90deg);
}

.global-btn--outline {
    color: var(--rm-color-neutral-0);
    background: transparent;
    border-color: rgba(255, 255, 255, 0.45);
}

.global-btn--outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
}

/* ================================================================
   Hero — 视频背景 + 叠加层
   ================================================================ */
.global-hero {
    position: relative;
    min-height: clamp(520px, 68vh, 720px);
    display: flex;
    align-items: flex-end;
    padding-bottom: clamp(64px, 8vw, 112px);
    overflow: hidden;
}

.global-hero__media {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 75% 35%, rgba(0, 168, 138, 0.28), transparent 55%),
        linear-gradient(145deg, #001a16 0%, var(--rm-color-brand-800) 40%, var(--rm-color-brand-700) 100%);
}

.global-hero__video,
.global-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 45%;
    opacity: 0.38;
}

.global-hero__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 70% at 15% 40%, var(--rm-color-brand-glow, rgba(0, 133, 111, 0.25)), transparent 55%),
        linear-gradient(155deg, rgba(0, 20, 18, 0.94) 0%, rgba(0, 45, 38, 0.82) 50%, rgba(0, 80, 66, 0.65) 100%);
}

.global-hero__inner {
    position: relative;
    z-index: 2;
    max-width: 920px;
}

/* ---- Breadcrumb ---- */
.global-hero .techd-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--rm-space-2);
    margin-bottom: clamp(20px, 3vw, 28px);
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.62);
}

.global-hero .techd-breadcrumb a {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.8125rem;
    text-decoration: none;
}

.global-hero .techd-breadcrumb a:hover {
    color: var(--global-brand-bright);
}

.global-hero .techd-breadcrumb span[aria-hidden] {
    color: rgba(255, 255, 255, 0.62);
}

.global-hero .techd-breadcrumb span[aria-current] {
    color: rgba(255, 255, 255, 0.62);
    font-weight: 400;
}

/* ---- Eyebrow ---- */
.global-hero__eyebrow {
    margin: 0 0 14px;
    font-size: var(--rm-text-xs);
    font-weight: var(--rm-font-semibold);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--global-brand-bright);
}

/* ---- Title ---- */
.global-hero__title {
    margin: 0 0 var(--rm-space-5);
    font-size: clamp(2.25rem, 5.5vw, 3.75rem);
    font-weight: var(--rm-font-bold);
    line-height: var(--rm-leading-none);
    letter-spacing: -0.03em;
    color: var(--rm-color-neutral-0);
}

/* ---- Tagline ---- */
.global-hero__tagline {
    margin: 0 0 clamp(28px, 4vw, 36px);
    max-width: 680px;
    font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.88);
}

/* ---- Actions ---- */
.global-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* ---- Scroll indicator ---- */
.global-hero__scroll {
    position: absolute;
    bottom: clamp(20px, 3vw, 32px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.global-hero__scroll-line {
    display: block;
    width: 1px;
    height: 52px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent);
    animation: globalScrollPulse 2.4s ease-in-out infinite;
}

@keyframes globalScrollPulse {
    0%, 100% { opacity: 0.35; transform: scaleY(0.85); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ================================================================
   Map Section — 深色地球图
   ================================================================ */
.global-map {
    position: relative;
    padding-bottom: clamp(80px, 10vw, 120px);
    overflow: hidden;
}

.global-map__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 40%, rgba(0, 168, 138, 0.12), transparent 70%),
        linear-gradient(180deg, #061f1a 0%, var(--rm-color-brand-900) 40%, var(--rm-color-brand-800) 100%);
}

.global-map__inner {
    position: relative;
    z-index: 1;
}

.global-map__head {
    max-width: var(--rm-container-sm);
    margin: 0 auto clamp(40px, 5vw, 56px);
    text-align: center;
}

/* ---- Globe ---- */
.global-globe {
    position: relative;
    margin-bottom: clamp(40px, 5vw, 56px);
}

.global-globe__stage {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.global-globe__sphere {
    position: absolute;
    left: var(--hub-left, 34.9%);
    top: var(--hub-top, 49.7%);
    width: min(200px, 24vw);
    height: min(200px, 24vw);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2;
}

.global-globe__core {
    position: absolute;
    inset: 28%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(110, 231, 199, 0.25), rgba(0, 133, 111, 0.08) 50%, transparent 70%);
    box-shadow: 0 0 80px rgba(0, 133, 111, 0.2);
    animation: globalCorePulse 4s ease-in-out infinite;
}

.global-globe__ring {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(110, 231, 199, 0.15);
    border-radius: 50%;
}

.global-globe__ring--1 { animation: globalRingSpin 24s linear infinite; }

.global-globe__ring--2 {
    inset: 12%;
    animation: globalRingSpin 18s linear infinite reverse;
    border-color: rgba(0, 133, 111, 0.2);
}

.global-globe__ring--3 {
    inset: 24%;
    animation: globalRingSpin 30s linear infinite;
    border-style: dashed;
    border-color: rgba(110, 231, 199, 0.12);
}

@keyframes globalRingSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes globalCorePulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.04); }
}

.global-globe__map {
    position: relative;
    z-index: 1;
    margin: 0;
    border-radius: var(--rm-radius-card);
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(110, 231, 199, 0.12);
    line-height: 0;
}

.global-globe__map-img {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0.88;
    filter: saturate(0.85) brightness(0.95);
}

.global-globe__svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.global-globe__beam {
    stroke: rgba(110, 231, 199, 0.35);
    stroke-width: 1;
    stroke-dasharray: 4 6;
    animation: globalBeamFlow 3s linear infinite;
    animation-delay: var(--beam-delay, 0s);
    opacity: 0;
}

.global-globe.is-active .global-globe__beam {
    opacity: 1;
}

@keyframes globalBeamFlow {
    0% { stroke-dashoffset: 40; opacity: 0.15; }
    50% { opacity: 0.55; }
    100% { stroke-dashoffset: 0; opacity: 0.15; }
}

/* ---- HQ Marker ---- */
.global-globe__hub-marker {
    position: absolute;
    left: var(--hub-left, 34.9%);
    top: var(--hub-top, 49.7%);
    z-index: 5;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}

.global-globe__hub-pin {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.global-globe__hub-pin-core {
    position: relative;
    z-index: 2;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--rm-color-neutral-0);
    box-shadow: 0 0 0 4px rgba(0, 133, 111, 0.45), 0 0 20px rgba(110, 231, 199, 0.85);
}

.global-globe__hub-pin-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(110, 231, 199, 0.65);
    animation: globalHubPinRing 2.4s ease-out infinite;
}

@keyframes globalHubPinRing {
    0% { transform: scale(0.85); opacity: 0.95; }
    100% { transform: scale(1.8); opacity: 0; }
}

.global-globe__hub-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + var(--rm-space-3));
    transform: translateX(-50%) translateY(6px);
    min-width: max-content;
    padding: 10px 14px;
    text-align: center;
    line-height: var(--rm-leading-snug);
    color: var(--rm-color-neutral-0);
    background: rgba(0, 77, 65, 0.94);
    border: 1px solid rgba(110, 231, 199, 0.35);
    border-radius: var(--rm-radius-lg);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    white-space: nowrap;
}

.global-globe__hub-tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 10px;
    height: 10px;
    background: rgba(0, 77, 65, 0.94);
    border-right: 1px solid rgba(110, 231, 199, 0.35);
    border-bottom: 1px solid rgba(110, 231, 199, 0.35);
    transform: translateX(-50%) rotate(45deg);
}

.global-globe__hub-tooltip strong {
    display: block;
    font-size: var(--rm-text-sm);
    font-weight: var(--rm-font-bold);
}

.global-globe__hub-tooltip span {
    display: block;
    margin-top: var(--rm-space-1);
    font-size: var(--rm-text-xs);
    color: rgba(255, 255, 255, 0.78);
}

.global-globe__hub-marker:hover .global-globe__hub-tooltip,
.global-globe__hub-marker:focus-within .global-globe__hub-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

@media (min-width: 992px) {
    .global-globe__hub-tooltip {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

@media (max-width: 991px) {
    .global-globe__hub-tooltip {
        bottom: auto;
        top: calc(100% + 10px);
        transform: translateX(-50%) translateY(-6px);
    }
    .global-globe__hub-marker:hover .global-globe__hub-tooltip,
    .global-globe__hub-marker:focus-within .global-globe__hub-tooltip {
        transform: translateX(-50%) translateY(0);
    }
    .global-globe__hub-tooltip::after {
        top: -6px;
        bottom: auto;
        border-right: none;
        border-bottom: none;
        border-left: 1px solid rgba(110, 231, 199, 0.35);
        border-top: 1px solid rgba(110, 231, 199, 0.35);
    }
}

/* ---- Network info card ---- */
.global-network {
    max-width: 920px;
    margin: 0 auto;
    padding: clamp(28px, 4vw, 40px);
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(110, 231, 199, 0.12);
    border-radius: var(--rm-radius-card);
    backdrop-filter: blur(12px);
}

.global-network__title {
    margin: 0 0 var(--rm-space-4);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: var(--rm-font-bold);
    color: var(--rm-color-neutral-0);
}

.global-network__body {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.78);
}

/* ================================================================
   CTA Section
   ================================================================ */
.global-cta {
    width: 100%;
    padding: clamp(36px, 4.5vw, 52px) 0;
    background: linear-gradient(135deg, var(--global-brand-dark) 0%, var(--global-brand) 50%, var(--rm-color-brand-600) 100%);
}

.global-cta__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--rm-space-5);
}

@media (min-width: 768px) {
    .global-cta__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.global-cta__copy {
    max-width: 640px;
}

.global-cta .global-heading--light {
    margin: 0 0 var(--rm-space-2);
    font-size: clamp(1.25rem, 2.2vw, 1.625rem);
    line-height: 1.3;
}

.global-cta .global-lead--light {
    font-size: clamp(0.9375rem, 1vw, 1rem);
    line-height: var(--rm-leading-relaxed);
}

.global-cta .global-btn {
    padding: var(--rm-space-3) var(--rm-space-6);
    font-size: var(--rm-text-sm);
}

/* ---- SVG 节点光点 + 波纹 ---- */
.global-globe__dot,
.global-globe__hub-dot {
    fill: var(--global-brand-bright);
}

.global-globe__hub-dot {
    fill: var(--rm-color-neutral-0);
    filter: drop-shadow(0 0 6px rgba(110, 231, 199, 0.9));
}

.global-globe__hub-glow {
    animation: globalHubGlow 3s ease-in-out infinite;
}

@keyframes globalHubGlow {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 1; }
}

.global-globe__ripple {
    fill: none;
    stroke: var(--global-brand-bright);
    stroke-width: 1;
    opacity: 0;
    transform-origin: center;
    animation: globalRipple 2.8s ease-out infinite;
    animation-delay: var(--node-delay, 0s);
}

.global-globe__ripple--2 {
    animation-delay: calc(var(--node-delay, 0s) + 0.6s);
}

.global-globe__ripple--3 {
    animation-delay: calc(var(--node-delay, 0s) + 1.2s);
}

.global-globe.is-active .global-globe__ripple {
    animation-play-state: running;
}

@keyframes globalRipple {
    0% { r: 3; opacity: 0.75; }
    100% { r: 22; opacity: 0; }
}

.global-globe__hub-ripple {
    fill: none;
    stroke: var(--rm-color-neutral-0);
    stroke-width: 1.5;
    opacity: 0;
    animation: globalHubRipple 2.4s ease-out infinite;
}

.global-globe__hub-ripple--2 {
    animation-delay: 0.8s;
}

@keyframes globalHubRipple {
    0% { r: 8; opacity: 0.95; }
    100% { r: 38; opacity: 0; }
}

/* ================================================================
   Reduced motion
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
    .global-globe__ring,
    .global-globe__core,
    .global-globe__beam,
    .global-globe__ripple,
    .global-globe__hub-ripple,
    .global-globe__hub-glow,
    .global-globe__hub-pin-ring {
        animation: none !important;
    }
    .global-btn--light:hover {
        transform: none;
    }
}
