/* =============================================
   Pipeline Monitoring System - Design System
   ============================================= */

:root {
    /* Colors */
    --bg-primary: #09090b;
    --bg-secondary: #000000;
    --bg-card: #09090b;
    --bg-card-hover: #18181b;
    --surface: #27272a;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.2);
    
    /* Text */
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    /* Accent Colors */
    --accent-blue: #3b82f6;
    --accent-purple: #6366f1;
    --accent-teal: #14b8a6;
    --accent-orange: #f59e0b;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-pink: #d946ef;
    
    /* Text Accents replaced with single colors */
    --grad-blue-purple: #f4f4f5;
    --grad-teal-blue: #3b82f6;
    --grad-orange-pink: #f59e0b;
    --grad-green-teal: #10b981;
    
    /* Spacing */
    --section-gap: 5rem;
    --card-radius: 6px;
    --card-radius-sm: 4px;
    
    /* Shadows - replace glow with deep structural shadow */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.8);
    --shadow-glow-blue: var(--shadow-md);
    --shadow-glow-purple: var(--shadow-md);
    --shadow-glow-teal: var(--shadow-md);
    --shadow-glow-orange: var(--shadow-md);
    --accent-cf-orange: #f59e0b;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    background-image: 
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: -1px -1px;
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Particles Removed */
.bg-particles {
    display: none;
}

/* =============================================
   Header
   ============================================= */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(10, 14, 26, 0.8);
    border-bottom: 1px solid var(--border);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon svg {
    width: 40px;
    height: 40px;
}

.header-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--grad-blue-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
}

.header-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.15);
    font-size: 0.78rem;
    color: var(--accent-blue);
    font-weight: 500;
}

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

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
}

/* =============================================
   Main Content
   ============================================= */
.main-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* =============================================
   Hero Section
   ============================================= */
.hero-section {
    padding: 4rem 0 3rem;
    text-align: center;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

.gradient-text {
    background: var(--grad-blue-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* =============================================
   Section Titles
   ============================================= */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.section-title.center {
    text-align: center;
}

.section-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.section-desc.center {
    text-align: center;
}

/* =============================================
   Architecture Diagram
   ============================================= */
.diagram-section {
    padding: var(--section-gap) 0;
}

.architecture-diagram {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Layer Base */
.arch-layer {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.arch-layer:hover {
    border-color: var(--border-hover);
}

.layer-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border);
}

.layer-number {
    font-size: 1.5rem;
    font-weight: 800;
    opacity: 0.15;
    font-variant-numeric: tabular-nums;
}

.layer-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.layer-info p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.layer-content {
    padding: 1.75rem;
}

/* Field Layer */
.layer-field {
    border-color: rgba(34, 211, 238, 0.15);
}

.layer-field:hover {
    box-shadow: var(--shadow-glow-teal);
}

.layer-field .layer-number {
    color: var(--accent-teal);
    opacity: 0.35;
}

.layer-field .layer-info h3 {
    color: var(--accent-teal);
}

/* Sensor Cards */
.sensor-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.sensor-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--card-radius-sm);
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: default;
}

.sensor-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.sensor-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.temp-icon { color: var(--accent-red); }
.pressure-icon { color: var(--accent-blue); }
.ampere-icon { color: var(--accent-orange); }

.sensor-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.sensor-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.sensor-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.meta-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.08);
    color: var(--accent-blue);
    font-weight: 500;
    border: 1px solid rgba(96, 165, 250, 0.12);
}

/* Connection Arrow */
.connection-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0;
    gap: 0.5rem;
}

.arrow-line {
    width: 2px;
    height: 28px;
    background: linear-gradient(180deg, var(--accent-blue), var(--accent-purple));
    border-radius: 2px;
    position: relative;
}

.arrow-line::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--accent-purple);
}

.cloud-line {
    background: linear-gradient(180deg, var(--accent-purple), var(--accent-green));
}

.cloud-line::after {
    border-top-color: var(--accent-green);
}

.secure-line {
    background: linear-gradient(180deg, var(--accent-orange), var(--accent-blue));
}

.secure-line::after {
    border-top-color: var(--accent-blue);
}

.arrow-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.protocol-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.protocol-badge.modbus {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.2);
    color: var(--accent-blue);
}

.protocol-badge.replication {
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
    color: var(--accent-purple);
}

.protocol-badge.cloudflare-badge {
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.2);
    color: var(--accent-orange);
}

.arrow-sublabel {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Edge Layer */
.layer-edge {
    border-color: rgba(167, 139, 250, 0.15);
}

.layer-edge:hover {
    box-shadow: var(--shadow-glow-purple);
}

.layer-edge .layer-number {
    color: var(--accent-purple);
    opacity: 0.35;
}

.layer-edge .layer-info h3 {
    color: var(--accent-purple);
}

.gateway-diagram {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
}

.gateway-box {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--card-radius-sm);
    overflow: hidden;
}

.gateway-header-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: rgba(167, 139, 250, 0.06);
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.gateway-dots {
    display: flex;
    gap: 4px;
}

.gateway-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.3;
}

.gateway-dots span:first-child { background: var(--accent-red); opacity: 0.6; }
.gateway-dots span:nth-child(2) { background: var(--accent-orange); opacity: 0.6; }
.gateway-dots span:last-child { background: var(--accent-green); opacity: 0.6; }

.gateway-internals {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.gateway-component {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.3s;
}

.gateway-component:hover {
    border-color: var(--border-hover);
}

.component-icon {
    color: var(--accent-purple);
    flex-shrink: 0;
}

.influx-icon {
    color: var(--accent-blue);
}

.nodered-icon {
    color: #ef4444;
}

/* Node-RED Flow Visualization */
.gateway-nodered-details {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.1);
    border-radius: 8px;
}

.nr-flow-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.3rem 0.55rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    white-space: nowrap;
}

.nr-flow-item svg {
    color: #ef4444;
    flex-shrink: 0;
}

.nr-flow-arrow {
    font-size: 0.8rem;
    color: #ef4444;
    opacity: 0.6;
    flex-shrink: 0;
    font-weight: 600;
}

.gateway-component strong {
    font-size: 0.85rem;
    font-weight: 600;
    display: block;
}

.gateway-component small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.gateway-flow-arrow {
    color: var(--text-muted);
    opacity: 0.5;
}

.gateway-features {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 0.5rem;
}

.gw-feature {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    padding: 0.35rem 0.7rem;
    background: rgba(167, 139, 250, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(167, 139, 250, 0.08);
}

.gw-feature svg { color: var(--accent-purple); flex-shrink: 0; }

/* Network Options */
.gateway-network {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--card-radius-sm);
    min-width: 180px;
    justify-content: center;
}

.network-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.network-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: transform 0.3s;
}

.network-icon:hover {
    transform: scale(1.1);
}

.network-icon.wifi {
    background: rgba(96, 165, 250, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(96, 165, 250, 0.15);
}

.network-icon.fiber {
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent-teal);
    border: 1px solid rgba(34, 211, 238, 0.15);
}

.network-option span {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.network-divider {
    font-size: 1.25rem;
    color: var(--text-muted);
    opacity: 0.3;
    font-weight: 300;
}

/* Security Layer - Cloudflare */
.layer-security {
    border-color: rgba(249, 115, 22, 0.15);
}

.layer-security:hover {
    box-shadow: var(--shadow-glow-orange);
}

.layer-security .layer-number {
    color: var(--accent-orange);
    opacity: 0.35;
}

.layer-security .layer-info h3 {
    color: var(--accent-orange);
}

/* Cloudflare Diagram */
.cloudflare-diagram {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
}

.cf-main-box {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--card-radius-sm);
    padding: 1.5rem;
}

.cf-logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.cf-logo {
    color: var(--accent-orange);
    flex-shrink: 0;
}

.cf-title strong {
    font-size: 1rem;
    font-weight: 700;
    display: block;
    color: var(--accent-orange);
}

.cf-title small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cf-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.cf-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.3s;
}

.cf-feature-item:hover {
    border-color: rgba(249, 115, 22, 0.25);
}

.cf-feature-icon {
    color: var(--accent-orange);
    flex-shrink: 0;
    margin-top: 1px;
}

.cf-feature-item strong {
    font-size: 0.82rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.15rem;
}

.cf-feature-item small {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.cf-side-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 180px;
}

.cf-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--card-radius-sm);
    transition: border-color 0.3s;
}

.cf-stat:hover {
    border-color: rgba(249, 115, 22, 0.2);
}

.cf-stat-icon {
    color: var(--accent-orange);
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.12);
}

.cf-stat strong {
    font-size: 0.88rem;
    font-weight: 700;
    display: block;
}

.cf-stat small {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Cloud Layer */
.layer-cloud {
    border-color: rgba(96, 165, 250, 0.15);
}

.layer-cloud:hover {
    box-shadow: var(--shadow-glow-blue);
}

.layer-cloud .layer-number {
    color: var(--accent-blue);
    opacity: 0.35;
}

.layer-cloud .layer-info h3 {
    color: var(--accent-blue);
}

.cloud-architecture {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cloud-components {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.cloud-comp {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--card-radius-sm);
    padding: 1.5rem;
    transition: all 0.3s;
}

.cloud-comp:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.cloud-comp-icon {
    color: var(--accent-purple);
    margin-bottom: 1rem;
}

.grafana-icon-wrapper {
    color: var(--accent-orange);
}

.cloud-comp h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.cloud-comp p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.comp-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.comp-features li {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comp-features li::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-blue);
    flex-shrink: 0;
}

.cloud-flow-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.cloud-flow-arrow small {
    font-size: 0.68rem;
    font-weight: 500;
}

.cloud-users {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(96, 165, 250, 0.04);
    border: 1px solid rgba(96, 165, 250, 0.08);
    border-radius: var(--card-radius-sm);
}

.user-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.user-group:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.user-icon {
    color: var(--accent-blue);
    display: flex;
}

/* =============================================
   Workflow Section
   ============================================= */
.workflow-section {
    padding: var(--section-gap) 0;
}

.workflow-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-line {
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, 
        var(--accent-teal), 
        var(--accent-blue), 
        var(--accent-purple), 
        var(--accent-green), 
        var(--accent-orange));
    opacity: 0.3;
    border-radius: 2px;
}

.workflow-step {
    display: flex;
    gap: 1.75rem;
    padding: 1.5rem 0;
    position: relative;
}

.step-marker {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
    z-index: 2;
    transition: transform 0.3s;
}

.workflow-step:hover .step-marker {
    transform: scale(1.1);
}

.workflow-step[data-step="1"] .step-marker {
    background: rgba(34, 211, 238, 0.12);
    color: var(--accent-teal);
    border: 1.5px solid rgba(34, 211, 238, 0.25);
}

.workflow-step[data-step="2"] .step-marker {
    background: rgba(96, 165, 250, 0.12);
    color: var(--accent-blue);
    border: 1.5px solid rgba(96, 165, 250, 0.25);
}

.workflow-step[data-step="3"] .step-marker {
    background: rgba(167, 139, 250, 0.12);
    color: var(--accent-purple);
    border: 1.5px solid rgba(167, 139, 250, 0.25);
}

.workflow-step[data-step="4"] .step-marker {
    background: rgba(52, 211, 153, 0.12);
    color: var(--accent-green);
    border: 1.5px solid rgba(52, 211, 153, 0.25);
}

.workflow-step[data-step="5"] .step-marker {
    background: rgba(249, 115, 22, 0.12);
    color: var(--accent-orange);
    border: 1.5px solid rgba(249, 115, 22, 0.25);
}

.workflow-step[data-step="6"] .step-marker {
    background: rgba(244, 114, 182, 0.12);
    color: var(--accent-pink);
    border: 1.5px solid rgba(244, 114, 182, 0.25);
}

.step-content {
    flex: 1;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    transition: all 0.3s;
}

.workflow-step:hover .step-content {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.step-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.field-badge {
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent-teal);
    border: 1px solid rgba(34, 211, 238, 0.15);
}

.comm-badge {
    background: rgba(96, 165, 250, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(96, 165, 250, 0.15);
}

.edge-badge {
    background: rgba(167, 139, 250, 0.1);
    color: var(--accent-purple);
    border: 1px solid rgba(167, 139, 250, 0.15);
}

.cloud-badge {
    background: rgba(52, 211, 153, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(52, 211, 153, 0.15);
}

.security-badge {
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent-orange);
    border: 1px solid rgba(249, 115, 22, 0.15);
}

.viz-badge {
    background: rgba(244, 114, 182, 0.1);
    color: var(--accent-pink);
    border: 1px solid rgba(244, 114, 182, 0.15);
}

.step-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.step-content > p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.step-detail-grid {
    display: grid;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.detail-item strong {
    font-size: 0.85rem;
    font-weight: 600;
}

.detail-item span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =============================================
   Features Section
   ============================================= */
.features-section {
    padding: var(--section-gap) 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.feature-card {
    padding: 1.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    transition: all 0.3s;
    cursor: default;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.feature-icon-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 1.25rem;
}

.feature-icon-wrapper.reliability {
    background: rgba(52, 211, 153, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(52, 211, 153, 0.15);
}

.feature-icon-wrapper.realtime {
    background: rgba(96, 165, 250, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(96, 165, 250, 0.15);
}

.feature-icon-wrapper.scalable {
    background: rgba(167, 139, 250, 0.1);
    color: var(--accent-purple);
    border: 1px solid rgba(167, 139, 250, 0.15);
}

.feature-icon-wrapper.secure {
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent-orange);
    border: 1px solid rgba(249, 115, 22, 0.15);
}

.feature-icon-wrapper.cloudflare-feature {
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent-orange);
    border: 1px solid rgba(249, 115, 22, 0.15);
}

.feature-icon-wrapper.industrial {
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent-teal);
    border: 1px solid rgba(34, 211, 238, 0.15);
}

.feature-icon-wrapper.alert {
    background: rgba(248, 113, 113, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(248, 113, 113, 0.15);
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* =============================================
   Tech Section
   ============================================= */
.tech-section {
    padding: var(--section-gap) 0;
}

.tech-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    transition: all 0.3s;
    min-width: 140px;
}

.tech-item:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.tech-logo {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    margin-bottom: 0.25rem;
}

.tech-item strong {
    font-size: 0.9rem;
    font-weight: 700;
}

.tech-item small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* =============================================
   Footer
   ============================================= */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.footer p {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.footer small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =============================================
   Animations
   ============================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.arch-layer,
.workflow-step,
.feature-card,
.tech-item {
    animation: fadeInUp 0.6s ease-out both;
}

.arch-layer:nth-child(1) { animation-delay: 0.1s; }
.arch-layer:nth-child(3) { animation-delay: 0.2s; }
.arch-layer:nth-child(5) { animation-delay: 0.3s; }

.workflow-step:nth-child(2) { animation-delay: 0.1s; }
.workflow-step:nth-child(3) { animation-delay: 0.15s; }
.workflow-step:nth-child(4) { animation-delay: 0.2s; }
.workflow-step:nth-child(5) { animation-delay: 0.25s; }
.workflow-step:nth-child(6) { animation-delay: 0.3s; }

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.15s; }
.feature-card:nth-child(3) { animation-delay: 0.2s; }
.feature-card:nth-child(4) { animation-delay: 0.25s; }
.feature-card:nth-child(5) { animation-delay: 0.3s; }
.feature-card:nth-child(6) { animation-delay: 0.35s; }
.feature-card:nth-child(7) { animation-delay: 0.4s; }

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 1024px) {
    .sensor-cards {
        grid-template-columns: 1fr;
    }
    
    .gateway-diagram {
        flex-direction: column;
    }
    
    .cloudflare-diagram {
        flex-direction: column;
    }
    
    .cf-features-grid {
        grid-template-columns: 1fr;
    }
    
    .cloud-components {
        flex-direction: column;
    }
    
    .cloud-flow-arrow {
        transform: rotate(90deg);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .logo-area {
        flex-direction: column;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        gap: 1rem;
    }
    
    .cloud-users {
        flex-direction: column;
    }
    
    .main-content {
        padding: 0 1rem;
    }
    
    .workflow-step {
        flex-direction: column;
        gap: 1rem;
        padding-left: 3.5rem;
    }
    
    .step-marker {
        position: absolute;
        left: 0;
    }
    
    .timeline-line {
        left: 24px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.65rem;
    }
    
    .header-badge {
        display: none;
    }
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tech-item {
        min-width: 0;
    }
}

/* =============================================
   Typography Overrides (Industrial / Tech)
   ============================================= */
.layer-number, 
.badge-dot, 
.protocol-badge, 
.meta-tag, 
.gateway-component small, 
.tech-item small,
.cf-title small,
.step-marker span {
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
}

.protocol-badge {
    text-transform: uppercase;
    font-size: 0.72rem;
    padding: 0.35rem 0.9rem;
    border-radius: 4px; /* More industrial sharp edges instead of pills */
}

.meta-tag {
    border-radius: 4px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.header-badge {
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

/* =============================================
   Miniature Workflow Summary
   ============================================= */
.mini-workflow {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
    padding: 1.25rem 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    gap: 0;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.mw-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
    transition: transform 0.3s ease;
}

.mw-node:hover {
    transform: translateY(-2px);
}

.mw-node svg {
    width: 28px;
    height: 28px;
    color: var(--text-secondary);
}

.mw-node span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.mw-arrow {
    width: 60px;
    height: 24px;
    display: flex;
    align-items: center;
    margin: 0 0.5rem;
    padding-bottom: 1.5rem;
}

.mw-line {
    width: 100%;
    height: 1px;
    background: var(--border-hover);
    position: relative;
    overflow: hidden;
}

.mw-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    animation: mwFlow 2s linear infinite;
}

.cloud-arrow .mw-line::after {
    background: linear-gradient(90deg, transparent, var(--accent-green), transparent);
}

@keyframes mwFlow {
    0% { left: -50%; }
    100% { left: 100%; }
}
