/* ==========================================================================
   LoadTesting.ca | Main Stylesheet
   Theme: Zero-Defect (Dark/Cyber/High-Tech)
   ========================================================================== */

:root {
    /* Color Palette from Zero-Defect */
    --bg-base: #160D2B;
    --bg-surface: #26164A;
    --bg-panel: rgba(22, 13, 43, 0.7);
    
    --text-primary: #FFEDD9;
    --text-secondary: rgba(255, 237, 217, 0.7);
    --text-muted: rgba(255, 237, 217, 0.5);
    
    --accent-cyan: #F9BB6E; /* Name kept for consistency, but color is Orange */
    --accent-cyan-dim: rgba(249, 187, 110, 0.15);
    --accent-purple: #834FFF;
    --accent-purple-dim: rgba(131, 79, 255, 0.15);
    --accent-orange: #F9BB6E;
    --accent-green: #4ADE80;
    
    /* Glows & Shadows */
    --border-glow: 0 0 15px var(--accent-cyan-dim), inset 0 0 10px var(--accent-cyan-dim);
    --border-purple-glow: 0 0 15px var(--accent-purple-dim), inset 0 0 10px var(--accent-purple-dim);
    --box-shadow-heavy: 0 20px 40px rgba(0,0,0,0.5);
    
    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    /* Animation Speeds */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    /* Grid background pattern for high-tech feel */
    background-image: 
        linear-gradient(rgba(249, 187, 110, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(249, 187, 110, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 20px;
}

h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 800;
    letter-spacing: -1px;
}

h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    margin-bottom: 20px;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 800px;
}

.mono-text {
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 10px;
}

.mono-text.purple {
    color: var(--accent-purple);
}

.highlight {
    color: var(--accent-cyan);
}

/* ==========================================================================
   Layout & Components
   ========================================================================== */

section {
    padding: 100px 5%;
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-primary);
    background: transparent;
    border: 1px solid rgba(249, 187, 110, 0.4);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    border-color: var(--accent-cyan);
    background: rgba(249, 187, 110, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--border-glow);
}

.btn-primary {
    background: var(--accent-cyan);
    color: #000000 !important;
    border: none;
    font-weight: 800;
}

.btn-primary:hover {
    background: #FFD49F;
    color: #000000 !important;
    box-shadow: 0 10px 20px rgba(249, 187, 110, 0.3);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(22, 13, 43, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    transition: var(--transition-base);
}

header.scrolled {
    padding: 15px 5%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent-cyan);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-base);
}

.nav-links a:hover {
    color: var(--accent-cyan);
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-base);
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-toggle .active {
    color: var(--accent-cyan);
    font-weight: bold;
}

/* Language Visibility Logic */
html[lang="en"] .lang-fr {
    display: none !important;
}

html[lang="fr"] .lang-en {
    display: none !important;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
    position: relative;
}

.hero-visual {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: var(--bg-surface);
    border: 1px solid rgba(131, 79, 255, 0.3);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--border-purple-glow);
}

/* ==========================================================================
   Service Pillars (Pillar Cards)
   ========================================================================== */

.pillar-card {
    background: linear-gradient(145deg, rgba(38, 22, 74, 0.4), rgba(22, 13, 43, 0.8));
    border: 1px solid rgba(131, 79, 255, 0.2);
    border-radius: 16px;
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pillar-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top right, rgba(249, 187, 110, 0.1), transparent 50%);
    opacity: 0;
    transition: 0.5s ease;
    pointer-events: none;
}

.pillar-card:hover {
    transform: translateY(-10px);
    border-color: rgba(249, 187, 110, 0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(249, 187, 110, 0.1);
}

.pillar-card:hover::before {
    opacity: 1;
}

.pillar-icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(131, 79, 255, 0.1);
    border: 1px solid rgba(131, 79, 255, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    color: var(--accent-cyan);
    box-shadow: inset 0 0 10px rgba(131, 79, 255, 0.2);
}

.pillar-icon-wrapper svg {
    width: 30px;
    height: 30px;
    stroke-width: 1.5;
}

.pillar-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
}

.pillar-desc {
    color: var(--text-secondary);
    line-height: 1.7;
    flex-grow: 1;
    font-size: 0.95rem;
}

.pillar-benefit {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed rgba(255,255,255,0.1);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================================
   Comparison Table
   ========================================================================== */

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 40px;
    background: rgba(22, 13, 43, 0.4);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.comparison-table th, .comparison-table td {
    padding: 20px 25px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.comparison-table th {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    background: rgba(255,255,255,0.02);
}

.comparison-table th.zd-col {
    background: rgba(131, 79, 255, 0.1);
    color: var(--accent-cyan);
    border-top: 2px solid var(--accent-purple);
}

.comparison-table td.zd-col {
    background: rgba(131, 79, 255, 0.05);
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   Logic Flow Stepper
   ========================================================================== */

.logic-flow {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin-top: 60px;
}

.logic-flow::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.flow-step {
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
    padding: 0 15px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--bg-surface);
    border: 2px solid var(--accent-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 auto 20px;
    box-shadow: 0 0 20px rgba(131, 79, 255, 0.3);
    transition: var(--transition-base);
}

.flow-step:hover .step-number {
    background: var(--accent-purple);
    color: var(--bg-base);
    transform: scale(1.1);
}

.step-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--accent-cyan);
}

.step-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Contact Form
   ========================================================================== */

.contact-form {
    background: rgba(22, 13, 43, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition-base);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(131, 79, 255, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
    background: #0D0819;
    padding: 60px 5% 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 400px;
}

.footer-title {
    font-family: var(--font-mono);
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-mono);
}

/* ==========================================================================
   Animations & Utils
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.terminal-box {
    background: #0D0819;
    border-radius: 8px;
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #4ade80;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

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

.cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: #4ade80;
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}

/* ==========================================================================
   Graph Animation
   ========================================================================== */

.graph-container {
    background: #0D0819;
    border-radius: 8px;
    padding: 20px;
    height: 100%;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
    position: relative;
    display: flex;
    flex-direction: column;
}

.graph-header {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    z-index: 10;
    margin-bottom: 90px; /* Space for the live metrics overlay */
}

.graph-bars {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex-grow: 1;
    position: relative;
    padding: 10px 0;
    gap: 8px;
}

.graph-bar-wrapper {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    position: relative;
}

.graph-bar {
    height: 80%;
    background: linear-gradient(to right, var(--accent-purple), var(--accent-cyan));
    border-radius: 0 4px 4px 0;
    opacity: 0.8;
    transform-origin: left;
    width: 10%; /* Default starting width */
    transition: width 0.5s ease-in-out, background 0.5s ease;
}

.bar-label {
    width: 120px;
    flex-shrink: 0;
    text-align: right;
    padding-right: 15px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0.9;
}

.graph-bar.warning {
    background: linear-gradient(to right, var(--accent-purple), #ffbd2e);
}

.graph-bar.danger {
    background: linear-gradient(to right, #ffbd2e, #ff5f56);
}

.graph-target-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 85%;
    width: 2px;
    background: #ff5f56;
    box-shadow: 0 0 10px #ff5f56;
    border-left: 1px dashed rgba(255,255,255,0.5);
    z-index: 5;
}

.target-label {
    position: absolute;
    top: -20px;
    left: 85%;
    transform: translateX(-50%);
    color: #ff5f56;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: bold;
}

/* Live Metrics Styling */
.live-metrics {
    position: absolute;
    top: 50px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    z-index: 10;
    background: rgba(22, 13, 43, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 10px 15px;
}

.metric-box {
    text-align: center;
}

.metric-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.metric-val {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-val.highlight {
    color: var(--accent-cyan);
}

.metric-val.danger {
    color: #ff5f56;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .logic-flow {
        flex-direction: column;
        gap: 30px;
    }
    
    .logic-flow::before {
        left: 30px;
        top: 0;
        bottom: 0;
        width: 2px;
        height: auto;
    }
    
    .flow-step {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 20px;
        width: 100%;
    }
    
    .step-number {
        margin: 0;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none; /* In a real app, add a hamburger menu */
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .comparison-table {
        display: block;
        overflow-x: auto;
    }
}
