:root {
    --bg-color: #050505;
    --text-main: #ffffff;
    --text-muted: #888888;
    --accent: #2cfca3; /* Tech/Growth color */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Noto Sans TC', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none; /* Hide default cursor for custom cursor */
}

/* Lenis Recommended */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* Custom Cursor */
.cursor {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
}
.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, background 0.3s ease;
}
body:hover .cursor { opacity: 1; }

/* Container */
.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 0;
    z-index: 100;
    mix-blend-mode: difference;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}
.logo,
.logo:hover,
.logo:visited,
.logo:active,
.logo:focus {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-decoration: none;
    color: var(--text);
}
.logo span { color: var(--accent); }
.nav-links {
    display: flex;
    gap: 2rem;
}
.nav-item {
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn-cta {
    border: 1px solid var(--text-main);
    padding: 0.8rem 1.5rem;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}
.btn-cta:hover {
    background: var(--text-main);
    color: var(--bg-color);
}

/* Global Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.1;
}
.section {
    padding: 15vh 0;
    position: relative;
}
.section-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 1rem;
}
.section-subtitle {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-family: var(--font-body);
}
.section-desc {
    max-width: 600px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Mobile Menu Variables */
.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    z-index: 1001;
    position: relative;
}
.menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-main);
    transition: all 0.3s ease;
    border-radius: 2px;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
}
.mobile-nav-item {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--text-main);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: -1px;
    transition: color 0.3s ease;
}
.mobile-nav-item:hover, .mobile-nav-item.active-link {
    color: var(--accent);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero-background {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: var(--bg-color); /* Removed static gradient for clean Vanta canvas */
    z-index: -1;
}
/* 降低 3D Canvas 動態畫布的透明度，避免搶走白色標題的視覺焦點 */
.hero-background canvas {
    opacity: 0.6;
    mix-blend-mode: screen;
}
.hero-title {
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -3px;
    margin-bottom: 4rem;
}
.headline-mask {
    overflow: hidden;
    line-height: 0.9;
}
.headline-text {
    display: block;
    transform: translateY(110%);
}
.headline-text.accent {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-muted);
}
.hero-bottom-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.hero-subtitle {
    max-width: 400px;
    font-size: 1.2rem;
    color: var(--text-muted);
}
.scroll-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.scroll-line {
    width: 60px;
    height: 1px;
    background: var(--text-main);
    transform-origin: left;
}

/* Amazon Operations */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 10vh;
}
.card {
    background: #0d0d0d;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: border-color 0.3s ease;
}
.card:hover { border-color: rgba(255, 255, 255, 0.2); }
.card-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent);
    opacity: 0.5;
    display: block;
    margin-bottom: 2rem;
}
.card h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.card p { color: var(--text-muted); }
.card-1 { transform: translateY(0); }
.card-2 { transform: translateY(10vh); }
.card-3 { transform: translateY(5vh); }

/* Data Strategy */
.data-split {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* 置頂對齊 */
    min-height: 120vh; /* 預留足夠的高度讓右側滾動 */
    padding-bottom: 20vh;
}
.data-text { 
    flex: 1; 
    position: sticky;
    top: 30vh; /* 將左側文字黏在畫面的偏上方位置 */
    height: fit-content;
}
.data-visuals {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30vh; /* 讓兩個數字有很大的上下間距，享受滾動的視覺節奏 */
    align-items: flex-end;
    margin-top: 15vh; /* 讓第一個數字稍微往下掉一點，形成完美的視覺起點 */
}
.data-stat {
    text-align: right;
}
.stat-num {
    font-family: var(--font-heading);
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    color: var(--accent);
}
.stat-unit {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
}
.stat-label {
    display: block;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Tech Engine */
.tech-section {
    background-color: #030303;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.tech-bg-matrix {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
    background-size: 40px 40px;
    z-index: 0;
}
.tech-content {
    position: relative;
    z-index: 1;
    text-align: center;
}
.tech-title, .tech-subtitle, .tech-desc { margin-left: auto; margin-right: auto; }
.tech-tags {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.tag {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    padding: 1rem 2rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 50px;
    text-transform: uppercase;
}

/* Growth Process */
.process-section {
    border-top: 1px solid rgba(255,255,255,0.05);
}
.process-timeline {
    margin-top: 8vh;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    counter-reset: step;
}
.process-step {
    position: relative;
    padding: 2.5rem 2rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    transition: border-color 0.35s, transform 0.35s;
}
.process-step:hover {
    border-color: rgba(44,252,163,0.35);
    transform: translateY(-5px);
}
.process-num {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 1.5rem;
}
.process-content h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}
.process-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* B2B Section */
.b2b-section {
    background: #030303;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.b2b-phases {
    margin-top: 8vh;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.b2b-phase {
    padding: 3rem 2.5rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    transition: border-color 0.35s, transform 0.35s;
    position: relative;
    overflow: hidden;
}
.b2b-phase::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(44,252,163,0.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.35s;
}
.b2b-phase:hover {
    border-color: rgba(44,252,163,0.4);
    transform: translateY(-5px);
}
.b2b-phase:hover::before { opacity: 1; }
.b2b-phase-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}
.b2b-phase-tag {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}
.b2b-phase h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.b2b-phase-label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--accent);
    opacity: 0.7;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}
.b2b-phase > p:last-child {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Data Arsenal */
.data-arsenal {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 8vh;
}
.arsenal-card {
    padding: 2.5rem 2rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(44,252,163,0.1);
    border-radius: 16px;
    transition: border-color 0.35s, transform 0.35s;
}
.arsenal-card:hover {
    border-color: rgba(44,252,163,0.4);
    transform: translateY(-4px);
}
.arsenal-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}
.arsenal-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}
.arsenal-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
}
.data-stats-row {
    display: flex;
    justify-content: center;
    gap: 10rem;
    padding-top: 4vh;
}
.data-stats-row .data-stat {
    text-align: center;
}
.data-stats-row .stat-num {
    font-size: 5rem;
}

/* Featured Cases */
.cases-section {
    border-top: 1px solid rgba(255,255,255,0.05);
}
.cases-grid {
    margin-top: 6vh;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.case-home-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.35s, transform 0.35s;
}
.case-home-card:hover {
    border-color: rgba(44,252,163,0.35);
    transform: translateY(-5px);
}
.case-home-thumb {
    width: 100%;
    aspect-ratio: 16/10;
}
.case-home-body {
    padding: 1.5rem 1.75rem 2rem;
}
.case-home-cat {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.6rem;
}
.case-home-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
}
.case-home-arrow {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    transition: color 0.3s;
}
.case-home-card:hover .case-home-arrow {
    color: var(--accent);
}

/* Footer */
.footer-section {
    padding: 20vh 0 5vh;
    text-align: center;
    background: #000;
}
.footer-title {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    margin-bottom: 1rem;
}
.footer-desc {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 4rem;
}
.btn-massive {
    display: inline-block;
    padding: 2rem 5rem;
    background: var(--text-main);
    color: var(--bg-color);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    border-radius: 100px;
    transition: transform 0.3s ease, background 0.3s ease;
}
.btn-massive:hover {
    transform: scale(1.05);
    background: var(--accent);
}
.footer-bottom {
    margin-top: 15vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
}

/* Blog / Knowledge Base — Homepage Section */
.blog-home-section {
    border-top: 1px solid rgba(255,255,255,0.06);
}
.blog-home-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
}
.blog-home-all-link {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(44,252,163,0.4);
    white-space: nowrap;
    transition: opacity 0.3s;
    flex-shrink: 0;
    margin-left: 2rem;
}
.blog-home-all-link:hover { opacity: 0.7; }

/* Layout B: asymmetric grid */
.blog-home-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1.5rem;
    align-items: start;
}
.blog-home-side {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Card base */
.blog-home-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    overflow: hidden;
    transition: border-color 0.35s, transform 0.35s;
}
.blog-home-card:hover {
    border-color: rgba(44,252,163,0.35);
    transform: translateY(-5px);
}

/* Featured card */
.blog-home-featured {
    display: flex;
    flex-direction: column;
}
.blog-home-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    flex-shrink: 0;
}

/* Small cards */
.blog-home-small {
    display: flex;
    flex-direction: row;
    gap: 0;
}
.blog-home-thumb-sm {
    width: 120px;
    flex-shrink: 0;
    min-height: 100%;
    border-radius: 0;
}

/* Card body */
.blog-home-body {
    padding: 1.75rem 1.75rem;
    flex: 1;
}
.blog-home-featured .blog-home-body { padding: 2rem 2.5rem 2.5rem; }

.blog-home-cat {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}
.blog-home-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.8rem;
}
.blog-home-title-sm {
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 0.6rem;
    color: var(--text-main);
}
.blog-home-excerpt {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
}
.blog-home-meta {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 768px) {
    /* Base Resets for Mobile */
    html, body { overflow-x: hidden; }
    body { cursor: auto; }
    .cursor, .cursor-follower { display: none !important; }
    .section { padding: 10vh 0; }
    
    /* Grid & Layouts */
    .cards-grid { grid-template-columns: 1fr; gap: 2rem; }
    .card-1, .card-2, .card-3 { transform: translateY(0) !important; }
    .process-timeline { grid-template-columns: 1fr; }
    .b2b-phases { grid-template-columns: 1fr; }
    .data-arsenal { grid-template-columns: 1fr 1fr; }
    .data-stats-row { gap: 4rem; flex-wrap: wrap; justify-content: center; }
    .data-stats-row .stat-num { font-size: 3.5rem; }
    .cases-grid { grid-template-columns: 1fr; }
    .blog-home-grid { grid-template-columns: 1fr; }
    .blog-home-small { flex-direction: column; }
    .blog-home-thumb-sm { width: 100%; height: 160px; }
    .data-stat { text-align: center; }
    .btn-massive { padding: 1rem 2rem; font-size: 1.2rem; }
    .hero-bottom-grid { flex-direction: column; align-items: flex-start; gap: 2rem; }
    
    /* Prevent tags from causing horizontal overflow */
    .tech-tags { gap: 0.8rem; }
    .tag { font-size: 0.9rem; padding: 0.7rem 1.2rem; }

    /* Navigation Handling */
    .nav-links { display: none; }
    .navbar .btn-cta { display: none; }
    .menu-toggle { display: flex; }
}

@media (max-width: 480px) {
    .process-timeline { grid-template-columns: 1fr; }
    .data-arsenal { grid-template-columns: 1fr; }
    .data-stats-row { gap: 2rem; }
    .section-title { font-size: clamp(2.2rem, 10vw, 4rem); }
}
