:root {
    --primary: #00e5ff;
    --bg-dark: #0a0e14;
    --bg-card: #141b25;
    --text-main: #e0e6ed;
    --text-muted: #94a3b8;
    --dash-bg: #1e2633;
    --wa-green: #25D366;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    text-align: center;
}
.container { max-width: 1000px; margin: 0 auto; padding: 0 2rem; }

/* Typography & Layout */
h1 { font-size: 4rem; font-weight: 800; margin-bottom: 1rem; line-height: 1.1; }
.accent { color: var(--primary); }
.subtitle { font-size: 1.25rem; color: var(--text-muted); max-width: 700px; margin: 0 auto; }
.section { padding: 8rem 0; }
.section.dark { background: #0d131b; }
.section-title { font-size: 3rem; font-weight: 800; margin-bottom: 1rem; }
.section-intro { font-size: 1.2rem; color: var(--text-muted); max-width: 700px; margin: 0 auto 4rem auto; }

/* Nav */
nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.5rem 5%; position: fixed; width: 100%; top: 0; z-index: 1000;
    background: rgba(10, 14, 20, 0.9); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.logo { font-weight: 800; font-size: 1.2rem; }
.logo span { color: var(--primary); }
.nav-links a { color: var(--text-muted); text-decoration: none; margin-left: 2rem; font-size: 0.8rem; text-transform: uppercase; }

header {
    height: 70vh; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at center, rgba(0, 229, 255, 0.05) 0%, transparent 60%);
    padding-top: 5rem;
}

/* =========================================
   THE 2-DASHBOARD ANIMATION 
   ========================================= */
.animation-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4rem;
    position: relative;
    padding: 2rem;
    background: rgba(255,255,255,0.02);
    border-radius: 20px;
}

/* Dashboard Windows */
.dash { width: 40%; }
.dash-label { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.dash-window {
    background: var(--dash-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    height: 250px;
}
.dash-header {
    background: #151a22; padding: 10px; display: flex; gap: 6px; border-bottom: 1px solid #2a3441;
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.dash-body { padding: 20px; text-align: left; position: relative; height: calc(100% - 31px); }

/* Backend Specifics */
.input-group label { display: block; font-size: 0.8rem; color: #888; margin-bottom: 5px; }
.input-box { background: #11151c; padding: 10px; border-radius: 6px; border: 1px solid #333; height: 40px; display: flex; align-items: center;}
.typing-text::after {
    content: "Cleared Customs";
    animation: typeText 8s infinite;
    color: #fff;
    font-size: 0.9rem;
}
.cursor {
    display: inline-block; width: 2px; height: 15px; background: var(--primary); margin-left: 2px;
    animation: blink 1s infinite;
}
.action-btn {
    background: var(--primary); color: #000; padding: 10px; text-align: center; border-radius: 6px;
    margin-top: 20px; font-weight: 600; font-size: 0.8rem;
    animation: buttonPress 8s infinite;
}
.mouse-pointer {
    position: absolute; width: 15px; height: 20px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="white" d="M302.189 329.126H196.105l55.831 135.993c3.889 9.428-.555 19.999-9.444 23.999l-49.165 21.427c-9.165 4-19.443-.571-23.332-9.714l-53.053-129.136-86.664 89.138C22.279 468.829 0 453.398 0 439.12V44.111C0 25.556 21.11 15.556 34.444 28.889l276.663 277.663c11.666 11.666 3.889 30.574-12.778 30.574z"/></svg>') no-repeat;
    z-index: 10;
    animation: moveMouse 8s infinite;
}

/* Frontend Specifics */
.table-header, .table-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 0.8rem; border-bottom: 1px solid #333; }
.table-header { color: #888; font-weight: 600; }
.status-badge { padding: 4px 10px; border-radius: 20px; font-weight: 600; font-size: 0.7rem; }
.status-badge::before {
    content: "Pending";
    animation: changeStatusText 8s infinite;
}
.status-badge {
    background: rgba(255, 189, 46, 0.2); color: #ffbd2e;
    animation: changeStatusColor 8s infinite;
}
.whatsapp-alert {
    position: absolute; bottom: 20px; right: 20px;
    background: var(--wa-green); color: white; padding: 10px 15px; border-radius: 8px;
    font-size: 0.8rem; font-weight: 600; display: flex; align-items: center; gap: 8px;
    opacity: 0; transform: translateY(10px);
    animation: popWhatsApp 8s infinite;
}
.wa-icon {
    width: 16px; height: 16px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="white" d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zM223.9 414.7c-32 0-64-8.6-92-24.8l-6.6-3.9-68.3 18 18.2-66.6-4.3-6.9c-17.7-28.2-27-60.8-27-94.5 0-103.5 84.3-187.8 187.9-187.8 51.5 0 99.9 20.1 136.3 56.5 36.4 36.4 56.5 84.8 56.5 136.3 0 103.5-84.3 187.8-187.8 187.8z"/></svg>') no-repeat;
}

/* The Bridge Connection */
.connection-bridge {
    flex: 1; position: relative; height: 2px; background: rgba(255,255,255,0.1); margin: 0 20px;
}
.bridge-label {
    position: absolute; top: -25px; left: 50%; transform: translateX(-50%);
    font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; text-transform: uppercase;
}
.data-packet {
    position: absolute; top: -4px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    opacity: 0;
    animation: sendData 8s infinite;
}

/* Keyframes for Main Animation Loop (8s Total) */
/* 0-1.5s: Mouse moves. 1.5-3s: Typing. 3-3.5s: Mouse to button. 3.5s: Click. 4s: Data sends. 4.5s: UI Updates. */

@keyframes moveMouse {
    0%, 100% { top: 80%; left: 80%; opacity: 0; }
    10% { opacity: 1; top: 80%; left: 80%; }
    20%, 40% { top: 40px; left: 50px; opacity: 1; } /* At input box */
    45%, 55% { top: 120px; left: 100px; opacity: 1; } /* At button */
    60% { opacity: 0; }
}
@keyframes typeText {
    0%, 20% { content: ""; }
    25% { content: "Cl"; }
    30% { content: "Clear"; }
    35%, 100% { content: "Cleared Customs"; }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes buttonPress {
    0%, 48% { transform: scale(1); background: var(--primary); }
    50% { transform: scale(0.95); background: #00b3cc; }
    52%, 100% { transform: scale(1); background: var(--primary); }
}
@keyframes sendData {
    0%, 50% { opacity: 0; left: 0; }
    52% { opacity: 1; left: 0; }
    60% { opacity: 1; left: 100%; }
    62%, 100% { opacity: 0; left: 100%; }
}
@keyframes changeStatusText {
    0%, 60% { content: "Pending"; }
    62%, 100% { content: "Cleared"; }
}
@keyframes changeStatusColor {
    0%, 60% { background: rgba(255, 189, 46, 0.2); color: #ffbd2e; }
    62%, 100% { background: rgba(37, 211, 102, 0.2); color: var(--wa-green); box-shadow: 0 0 15px rgba(37, 211, 102, 0.3); }
}
@keyframes popWhatsApp {
    0%, 65% { opacity: 0; transform: translateY(10px); }
    70%, 90% { opacity: 1; transform: translateY(0); }
    95%, 100% { opacity: 0; transform: translateY(-10px); }
}


/* =========================================
   PROCESS FLOW SECTION
   ========================================= */
.process-flow { margin-top: 4rem; }
.process-step {
    display: flex; align-items: center; justify-content: center; gap: 4rem; margin-bottom: 4rem;
    text-align: left;
}
.process-step.reverse { flex-direction: row-reverse; }
.step-content { flex: 1; max-width: 400px; }
.step-content h3 { font-size: 1.5rem; color: var(--primary); margin-bottom: 1rem; }
.step-animation {
    width: 150px; height: 150px; background: var(--bg-card); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid rgba(255,255,255,0.05);
}

/* Step 1 Anim: Pulse */
.anim-circle { width: 50px; height: 50px; background: var(--primary); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.4); } 70% { transform: scale(1.1); box-shadow: 0 0 0 20px rgba(0, 229, 255, 0); } 100% { transform: scale(1); } }

/* Step 2 Anim: Typing Line */
.anim-pulse { width: 60px; height: 4px; background: #333; position: relative; overflow: hidden; border-radius: 2px;}
.anim-pulse::after { content: ''; position: absolute; left: -100%; width: 100%; height: 100%; background: var(--primary); animation: drawLine 2s infinite; }
@keyframes drawLine { 100% { left: 100%; } }

/* Step 3 Anim: Radio Waves */
.anim-wave { position: relative; width: 40px; height: 40px; }
.anim-wave span { position: absolute; border: 2px solid var(--wa-green); border-radius: 50%; opacity: 0; animation: wave 2s infinite; top:0; left:0; right:0; bottom:0;}
.anim-wave span:nth-child(2) { animation-delay: 0.5s; }
.anim-wave span:nth-child(3) { animation-delay: 1s; }
@keyframes wave { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }

/* Step 4 Anim: Checkmark */
.anim-check {
    width: 40px; height: 20px; border-bottom: 4px solid var(--green); border-right: 4px solid var(--green);
    transform: rotate(45deg); margin-top: -10px;
    animation: drawCheck 2s infinite alternate;
}
@keyframes drawCheck { 0% { width: 0; height: 0; } 50%, 100% { width: 40px; height: 20px; } }

/* Benefits */
.benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2rem;}
.benefit-card { background: var(--bg-card); padding: 3rem 2rem; border-radius: 20px; border-top: 4px solid var(--primary); }
.benefit-card h3 { margin-bottom: 1rem; }

footer { padding: 4rem 0; font-size: 0.9rem; color: var(--text-muted); border-top: 1px solid rgba(255,255,255,0.05);}

@media (max-width: 768px) {
    body { overflow-x: hidden; width: 100%; }
    h1 { font-size: 1.8rem; line-height: 1.2; word-wrap: break-word; }
    .section-title { font-size: 1.8rem; }
    .subtitle { font-size: 1rem; }
    nav { flex-direction: column; padding: 1rem; }
    .nav-links { display: flex; flex-direction: column; margin-top: 0.5rem; gap: 0.5rem; width: 100%; align-items: center; }
    .nav-links a { margin: 0; font-size: 0.8rem; padding: 5px; }
    .animation-container { flex-direction: column; gap: 2rem; padding: 1rem; width: 100%; }
    .dash { width: 100%; }
    .dash-window { height: 220px; }
    .connection-bridge { width: 2px; height: 40px; margin: 10px 0; }
    .data-packet { top: 0; left: -4px; animation: sendDataVert 8s infinite; }
    @keyframes sendDataVert { 0%, 50% { opacity: 0; top: 0; } 52% { opacity: 1; top: 0; } 60% { opacity: 1; top: 100%; } 62%, 100% { opacity: 0; top: 100%; } }
    .process-step, .process-step.reverse { flex-direction: column; text-align: center; gap: 2rem; }
    .benefits-grid { grid-template-columns: 1fr; }
    .status-badge::before { animation: changeStatusTextMobile 8s infinite; }
}

@keyframes changeStatusTextMobile {
    0%, 60% { content: "Pending"; }
    62%, 100% { content: "Cleared"; }
}
