/* ============================
   Omni-Channel Intelligence Hub
   High-end Portal Styles
   ============================ */

:root {
    --bg-deep: #0e1830;
    --bg-card: rgba(34, 47, 74, 0.42);
    --bg-card-hover: rgba(46, 62, 96, 0.58);
    --border-card: rgba(160, 178, 210, 0.22);
    --border-card-hover: rgba(120, 160, 255, 0.6);
    --text-primary: #f4f8ff;
    --text-secondary: #b8c4d8;
    --text-muted: #8493ad;
    --accent-cyan: #2ee0f5;
    --accent-blue: #4d93ff;
    --accent-indigo: #7c83ff;
    --accent-violet: #a06bff;
    --accent-pink: #ff5fae;
    --accent-orange: #ff8a3d;
    --accent-green: #2dd4a0;
    --shadow-glow: 0 0 60px rgba(120, 140, 255, 0.28);
    --glass-highlight: rgba(255, 255, 255, 0.09);
    --radius: 24px;
    --radius-sm: 16px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(1200px 600px at 50% -10%, rgba(80, 110, 220, 0.22) 0%, transparent 60%),
        radial-gradient(900px 500px at 85% 20%, rgba(255, 95, 174, 0.10) 0%, transparent 55%),
        linear-gradient(160deg, #101d3a 0%, #0e1830 45%, #0c1428 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.62;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-indigo) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-pink) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 30px) scale(1.02); }
}

.light-spot {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
    will-change: top;
    opacity: 0.55;
    mix-blend-mode: screen;
    animation: lightFloat 18s ease-in-out infinite;
    top: calc(var(--base-top) + var(--parallax-y, 0px));
}

.spot-1 {
    --base-top: 15%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(46, 224, 245, 0.65) 0%, transparent 70%);
    left: 8%;
    animation-delay: 0s;
}

.spot-2 {
    --base-top: 55%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(124, 131, 255, 0.65) 0%, transparent 70%);
    right: 10%;
    animation-delay: -4s;
}

.spot-3 {
    --base-top: 75%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 95, 174, 0.55) 0%, transparent 70%);
    left: 25%;
    animation-delay: -8s;
}

.spot-4 {
    --base-top: 30%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(160, 107, 255, 0.55) 0%, transparent 70%);
    right: 30%;
    animation-delay: -12s;
}

.spot-5 {
    --base-top: 80%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(46, 224, 245, 0.45) 0%, transparent 70%);
    right: 40%;
    animation-delay: -6s;
}

.spot-6 {
    --base-top: 45%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 138, 61, 0.45) 0%, transparent 70%);
    left: 15%;
    animation-delay: -10s;
}

@keyframes lightFloat {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    20% { transform: translate3d(40px, -25px, 0) scale(1.08); }
    40% { transform: translate3d(-25px, 35px, 0) scale(0.95); }
    60% { transform: translate3d(30px, 20px, 0) scale(1.05); }
    80% { transform: translate3d(-15px, -30px, 0) scale(0.98); }
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(160, 190, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(160, 190, 255, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
    will-change: transform;
}

#particle-canvas {
    position: absolute;
    inset: 0;
    opacity: 0.6;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 48px;
    background: rgba(16, 27, 52, 0.6);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    color: var(--accent-cyan);
    animation: logoPulse 3s ease-in-out infinite;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo-path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawLogo 2s ease forwards;
}

@keyframes drawLogo {
    to { stroke-dashoffset: 0; }
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.4)); }
    50% { filter: drop-shadow(0 0 20px rgba(34, 211, 238, 0.8)); }
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.logo-subtitle {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-green);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* Main Container */
.main-container {
    padding-top: 120px;
    padding-bottom: 80px;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 0 80px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    background: rgba(124, 131, 255, 0.14);
    border: 1px solid rgba(124, 131, 255, 0.35);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: #b9c0ff;
    margin-bottom: 32px;
    box-shadow: 0 0 24px rgba(124, 131, 255, 0.18);
}

.badge-pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-indigo);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.hero-title {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
}

.title-line {
    display: block;
}

.title-accent {
    background: linear-gradient(120deg, #5ff0ff 0%, #7c83ff 35%, #a06bff 65%, #ff5fae 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 8s ease-in-out infinite;
    background-size: 220% 220%;
    filter: drop-shadow(0 0 24px rgba(124, 131, 255, 0.35));
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-desc {
    max-width: 680px;
    margin: 0 auto 48px;
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.section-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-indigo), transparent);
}

.section-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-indigo);
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 56px;
    color: var(--text-primary);
}

/* Portals Grid */
.portals-section {
    margin-bottom: 120px;
}

.portals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.portal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 32px;
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.08) 0%, transparent 42%),
        var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: var(--transition);
    transform-style: preserve-3d;
    perspective: 1000px;
    opacity: 0;
    transform: translateY(30px);
}

.portal-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.portal-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(255,255,255,0.30) 0%, rgba(120,160,255,0.18) 45%, rgba(255,255,255,0.09) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.portal-card:hover {
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.12) 0%, transparent 45%),
        var(--bg-card-hover);
    border-color: var(--border-card-hover);
    box-shadow: var(--shadow-glow), 0 24px 70px rgba(0, 0, 0, 0.45);
    transform: translateY(-8px) rotateX(2deg) rotateY(2deg);
}

.card-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.portal-card:hover .card-shine {
    left: 100%;
}

.card-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
    color: var(--accent-cyan);
    background: rgba(46, 224, 245, 0.14);
    border-radius: var(--radius-sm);
    padding: 14px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 26px rgba(46, 224, 245, 0.18);
    transition: var(--transition);
}

.portal-card[data-category="cooked"] .card-icon { color: var(--accent-orange); background: rgba(249, 115, 22, 0.1); }
.portal-card[data-category="security"] .card-icon { color: var(--accent-green); background: rgba(16, 185, 129, 0.1); }
.portal-card[data-category="audit"] .card-icon { color: var(--accent-violet); background: rgba(139, 92, 246, 0.1); }
.portal-card[data-category="search"] .card-icon { color: var(--accent-pink); background: rgba(236, 72, 153, 0.1); }
.portal-card[data-category="download"] .card-icon { color: var(--accent-blue); background: rgba(77, 147, 255, 0.1); }

.portal-card:hover .card-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 0 30px currentColor;
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

.card-content {
    flex: 1;
    margin-bottom: 24px;
}

.card-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-blue);
    margin-bottom: 14px;
    font-family: 'Inter', monospace;
    letter-spacing: 0.5px;
}

.card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-green);
}

.status-dot-sm {
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-green);
    animation: pulse 2s ease-in-out infinite;
}

.card-arrow {
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.portal-card:hover .card-arrow {
    color: var(--accent-cyan);
    transform: translateX(6px);
}

.card-arrow svg {
    width: 100%;
    height: 100%;
}

/* Pipeline Section */
.pipeline-section {
    margin-bottom: 60px;
}

.pipeline-flow {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    flex-wrap: wrap;
}

.pipeline-step {
    flex: 1;
    min-width: 260px;
    max-width: 320px;
    padding: 32px;
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.07) 0%, transparent 45%),
        var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    text-align: center;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

.pipeline-step.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.pipeline-step:hover {
    border-color: var(--border-card-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.step-number {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-indigo) 0%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 16px;
}

.step-content h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.step-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.pipeline-connector {
    width: 60px;
    min-width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--border-card), var(--accent-indigo), var(--border-card));
    align-self: center;
    position: relative;
    margin: 20px 0;
}

.pipeline-connector::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid var(--accent-indigo);
}

/* Footer */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 32px 48px;
    background: rgba(16, 27, 52, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
}

.footer-copy {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

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

/* Responsive */
@media (max-width: 1024px) {
    .site-header { padding: 16px 24px; }
    .main-container { padding-top: 100px; }
    .hero-title { font-size: clamp(32px, 8vw, 56px); }
    .portals-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
    .pipeline-flow { flex-direction: column; align-items: center; }
    .pipeline-connector {
        width: 2px;
        height: 40px;
        background: linear-gradient(180deg, var(--border-card), var(--accent-indigo), var(--border-card));
        margin: 0;
    }
    .pipeline-connector::after {
        right: auto;
        bottom: 0;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        border-top: 8px solid var(--accent-indigo);
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-bottom: none;
    }
}

@media (max-width: 640px) {
    .site-header { padding: 14px 16px; }
    .logo-subtitle { display: none; }
    .header-status { padding: 6px 12px; font-size: 12px; }
    .main-container { padding-left: 16px; padding-right: 16px; }
    .hero-section { padding: 40px 0 60px; }
    .hero-badge { font-size: 12px; padding: 8px 16px; }
    .hero-desc { font-size: 16px; }
    .hero-stats { gap: 32px; }
    .stat-number { font-size: 36px; }
    .section-title { font-size: 26px; margin-bottom: 40px; }
    .portals-grid { grid-template-columns: 1fr; }
    .portal-card { padding: 24px; }
    .site-footer { padding: 24px 16px; }
    .footer-content { flex-direction: column; text-align: center; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
