/* ==========================================================================
   Larum.am Stylesheet - Professional Electrification & Home Automation
   ========================================================================== */

/* Design Tokens & Custom Variables */
:root {
    /* Color Palette */
    --color-bg-main: #0B0D11;
    --color-bg-card: #131822;
    --color-bg-card-hover: #192233;
    --color-border: #212C3F;
    --color-border-glow: rgba(0, 130, 138, 0.25);
    
    /* Branding Colors */
    --color-teal: #00828A;       /* Top-Left Logo Cell Color */
    --color-teal-rgb: 0, 130, 138;
    --color-yellow: #F9B233;     /* Bottom-Right Logo Cell Color */
    --color-yellow-rgb: 249, 178, 51;
    --color-dark-grey: #2B2D2F;   /* Neutral Logo Gray */
    
    /* Utility States */
    --color-text-primary: #F3F4F6;
    --color-text-secondary: #9CA3AF;
    --color-text-muted: #6B7280;
    --color-success: #10B981;
    --color-danger: #EF4444;
    
    /* Typography */
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-title: 'Space Grotesk', sans-serif;
    
    /* Spacing & Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-elastic: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --shadow-glow-teal: 0 0 20px rgba(0, 130, 138, 0.35);
    --shadow-glow-yellow: 0 0 20px rgba(249, 178, 51, 0.35);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--color-bg-main);
    color: var(--color-text-primary);
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    background-color: var(--color-bg-main);
    overflow-x: hidden;
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 5px;
    border: 2px solid var(--color-bg-main);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-teal);
}

/* Scroll Progress */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-teal), var(--color-yellow));
    z-index: 1000;
    width: 0%;
    transition: width 0.1s linear;
}

/* Language Switcher Styling */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 16px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    transition: var(--transition-fast);
    border-radius: 4px;
}

.lang-btn.active {
    color: var(--color-teal);
    background: rgba(0, 130, 138, 0.1);
    box-shadow: 0 0 8px rgba(0, 130, 138, 0.2);
}

.lang-btn:hover:not(.active) {
    color: var(--color-text-primary);
}

.lang-divider {
    color: var(--color-border);
    font-size: 0.85rem;
}

.mobile-lang-switch {
    margin: 16px 0;
}

/* Utility Layout Classes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.grid {
    display: grid;
    gap: 32px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

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

/* Shared Typography Styles */
h1, h2, h3, h4 {
    font-family: var(--font-title);
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    font-size: 2.75rem;
    margin-bottom: 16px;
    color: var(--color-text-primary);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 700px;
    margin: 0 auto 56px;
}

.text-gradient-teal {
    background: linear-gradient(135deg, #00A896, var(--color-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-yellow {
    background: linear-gradient(135deg, #FFE066, var(--color-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-teal {
    color: var(--color-teal);
}

.text-yellow {
    color: var(--color-yellow);
}

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

/* Interactive Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--color-teal);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 130, 138, 0.2);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease-out;
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow-teal);
    transform: translateY(-2px);
}

.btn-primary:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

.btn-secondary {
    background: var(--color-yellow);
    color: #0b0d11;
    border: none;
    box-shadow: 0 4px 15px rgba(249, 178, 51, 0.2);
}

.btn-secondary:hover {
    box-shadow: var(--shadow-glow-yellow);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-text-primary);
}

.btn-outline:hover {
    border-color: var(--color-teal);
    color: #fff;
    background-color: rgba(0, 130, 138, 0.05);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Header & Navigation */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 500;
    border-bottom: 1px solid rgba(33, 44, 63, 0.3);
    background: rgba(11, 13, 17, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition-fast);
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 48px;
}

.logo-img {
    height: 100%;
    object-fit: contain;
}

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

.nav-link {
    text-decoration: none;
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    position: relative;
    padding: 6px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-teal);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--color-text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Hamburger Menu */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    width: 24px;
    height: 18px;
    flex-direction: column;
    justify-content: space-between;
}

.mobile-nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* Mobile nav active state */
.mobile-nav-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.mobile-nav-toggle.open span:nth-child(2) {
    opacity: 0;
}
.mobile-nav-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100vh;
    background: var(--color-bg-main);
    z-index: 499;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    padding: 24px;
}

.mobile-nav-overlay.open {
    left: 0;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
}

.mobile-link {
    font-family: var(--font-title);
    font-size: 1.75rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--color-text-primary);
    transition: var(--transition-fast);
}

.mobile-link:hover {
    color: var(--color-teal);
    transform: scale(1.05);
}

/* Hero Section */
.hero-section {
    padding-top: 180px;
    padding-bottom: 120px;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Grid Circuits Background Pattern */
.circuit-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 130, 138, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(249, 178, 51, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(33, 44, 63, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(33, 44, 63, 0.05) 1px, transparent 1px);
    background-size: 200px 200px, 150px 150px, 40px 40px, 40px 40px;
    z-index: 1;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    z-index: 2;
    pointer-events: none;
}

.hero-glow-teal {
    width: 600px;
    height: 600px;
    background-color: var(--color-teal);
    top: -10%;
    left: -10%;
    animation: pulse-glow 8s infinite alternate;
}

.hero-glow-yellow {
    width: 500px;
    height: 500px;
    background-color: var(--color-yellow);
    bottom: -10%;
    right: -5%;
    animation: pulse-glow 10s infinite alternate-reverse;
}

@keyframes pulse-glow {
    0% { transform: scale(1) translate(0, 0); opacity: 0.1; }
    100% { transform: scale(1.2) translate(30px, 20px); opacity: 0.22; }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
    position: relative;
    z-index: 10;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(0, 130, 138, 0.12);
    border: 1px solid rgba(0, 130, 138, 0.3);
    color: #4cd5df;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-teal);
    border-radius: 50%;
    animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(0, 130, 138, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 130, 138, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(0, 130, 138, 0); }
}

.hero-title {
    font-size: 3.8rem;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

/* Hero House Visualizer Card */
.hero-visual {
    position: relative;
}

.hero-visual-card {
    background: rgba(19, 24, 34, 0.75);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    padding: 24px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.hero-visual-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-teal), var(--color-yellow), transparent);
}

.card-header-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(33, 44, 63, 0.5);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.card-header-bar .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.card-header-bar .dot.red { background-color: var(--color-danger); }
.card-header-bar .dot.yellow { background-color: var(--color-yellow); }
.card-header-bar .dot.green { background-color: var(--color-success); }

.card-status-title {
    font-family: var(--font-title);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-left: auto;
    letter-spacing: 0.05em;
}

.house-vector-wrapper {
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.house-vector {
    width: 100%;
    max-height: 280px;
}

/* SVG Circuit Line Animation Details */
.glowing-line {
    stroke-dasharray: 600;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.8s ease-in-out, stroke 0.4s, opacity 0.4s;
    opacity: 0.2;
}

.glowing-line.line-active {
    opacity: 1;
    animation: flow-electricity 4s linear infinite;
}

@keyframes flow-electricity {
    0% { stroke-dashoffset: 600; }
    100% { stroke-dashoffset: 0; }
}

.appliance-node {
    transition: fill var(--transition-smooth), r 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s;
    fill: #2D3748;
    filter: drop-shadow(0 0 0px transparent);
}

.appliance-node.active {
    fill: var(--color-teal);
    r: 12px;
    filter: drop-shadow(0 0 8px rgba(0, 130, 138, 0.8));
}

#node-automation.active {
    fill: var(--color-yellow);
    filter: drop-shadow(0 0 8px rgba(249, 178, 51, 0.8));
}

.hero-visual-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    border-top: 1px solid rgba(33, 44, 63, 0.5);
    padding-top: 16px;
}

.stat-bubble {
    background: rgba(33, 44, 63, 0.3);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.stat-bubble .label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.stat-bubble .value {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.15rem;
}

/* About & Stats Section */
.about-section {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--color-bg-main) 0%, rgba(19, 24, 34, 0.4) 50%, var(--color-bg-main) 100%);
    position: relative;
    border-top: 1px solid rgba(33, 44, 63, 0.3);
}

.about-text-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lead-text {
    font-size: 1.25rem;
    color: var(--color-text-primary);
    margin-bottom: 20px;
    font-weight: 500;
    border-left: 4px solid var(--color-teal);
    padding-left: 20px;
}

.body-text {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
}

.tech-stack-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tech-tag {
    background-color: rgba(33, 44, 63, 0.4);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-family: var(--font-title);
    font-weight: 500;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.stat-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    padding: 32px 24px;
    border-radius: var(--border-radius-md);
    text-align: center;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 130, 138, 0.4);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.stat-icon-wrapper {
    display: inline-flex;
    padding: 12px;
    background: rgba(0, 130, 138, 0.1);
    color: var(--color-teal);
    border-radius: 50%;
    margin-bottom: 16px;
    transition: var(--transition-fast);
}

.stat-card:hover .stat-icon-wrapper {
    background: var(--color-teal);
    color: #fff;
    transform: scale(1.1);
}

.stat-card:nth-child(even) .stat-icon-wrapper {
    background: rgba(249, 178, 51, 0.1);
    color: var(--color-yellow);
}

.stat-card:nth-child(even):hover .stat-icon-wrapper {
    background: var(--color-yellow);
    color: #0b0d11;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: var(--font-title);
}

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

/* Interactive Smart Panel Simulator */
.simulator-section {
    padding: 120px 0;
    position: relative;
    border-top: 1px solid rgba(33, 44, 63, 0.3);
}

.simulator-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    background: rgba(19, 24, 34, 0.4);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    backdrop-filter: blur(10px);
}

/* Panel Cabinet Hardware Styling */
.panel-hardware {
    background: #1c212c;
    border: 6px solid #2d3342;
    border-radius: var(--border-radius-md);
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8), 0 10px 30px rgba(0,0,0,0.5);
    padding: 24px;
    position: relative;
}

.panel-hardware::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 1px solid rgba(255,255,255,0.05);
    pointer-events: none;
}

.panel-casing {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.panel-header {
    background: #0f121a;
    border-bottom: 2px solid #2d3342;
    padding: 16px;
    border-radius: var(--border-radius-sm);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-brand {
    font-family: var(--font-title);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.digital-display {
    display: flex;
    justify-content: space-between;
    background: #080a0e;
    border: 1px solid #212c3f;
    border-radius: 4px;
    padding: 12px;
    font-family: var(--font-title);
}

.display-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.metric-label {
    font-size: 0.65rem;
    color: var(--color-text-muted);
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.1);
}

.panel-busbar-main {
    background: #141822;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.busbar-label {
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
}

/* Real MCB Breaker switch */
.breaker-switch {
    position: relative;
    display: inline-block;
    width: 28px;
    height: 70px;
    background: #090a0d;
    border: 2px solid #2d3342;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: inset 0 3px 8px rgba(0,0,0,0.8);
}

.breaker-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-handle {
    position: absolute;
    top: 4px;
    left: 2px;
    right: 2px;
    height: 28px;
    background: #3f4756;
    border: 2px solid #5d677a;
    border-radius: 3px;
    box-shadow: 0 3px 5px rgba(0,0,0,0.5);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
}

.switch-handle::before, .switch-handle::after {
    content: '';
    width: 12px;
    height: 2px;
    background: rgba(255,255,255,0.2);
}

/* When Checked (ON state - flipped UP) */
.breaker-switch input:checked + .switch-handle {
    transform: translateY(0);
    background: #10B981; /* Green handle when ON */
    border-color: #34D399;
}

.breaker-switch input:checked + .switch-handle::before,
.breaker-switch input:checked + .switch-handle::after {
    background: rgba(255,255,255,0.5);
}

/* When Unchecked (OFF state - flipped DOWN) */
.breaker-switch input:not(:checked) + .switch-handle {
    transform: translateY(32px);
    background: #4B5563; /* Gray handle when OFF */
    border-color: #6B7280;
}

/* Main breaker is double-width (orange-yellow toggle) */
.main-breaker.breaker-switch {
    width: 48px;
}

.main-breaker.breaker-switch .switch-handle {
    left: 4px;
    right: 4px;
}

.main-breaker.breaker-switch input:checked + .switch-handle {
    background: var(--color-yellow);
    border-color: #fbc25e;
}

/* Breakers Row inside panel */
.panel-breakers-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.breaker-slot {
    background: #0f121a;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    transition: border-color 0.3s;
}

.breaker-slot.tripped {
    border-color: var(--color-danger);
    animation: shake-breaker 0.4s ease-in-out;
}

@keyframes shake-breaker {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.breaker-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    color: var(--color-text-secondary);
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.breaker-current {
    font-family: var(--font-title);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    transition: var(--transition-fast);
}

.breaker-slot input:checked ~ .breaker-current {
    color: var(--color-teal);
}

.panel-footer-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #141822;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
}

.earth-leakage-test {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-test {
    background: #4A5568;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.65rem;
    font-family: var(--font-title);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 0 #2D3748;
    transition: background-color 0.1s;
}

.btn-test:active {
    transform: translateY(2px);
    box-shadow: none;
}

.test-label {
    font-size: 0.65rem;
    color: var(--color-text-muted);
}

.status-indicator-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-danger);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
    transition: var(--transition-fast);
}

.status-indicator-light.system-active {
    background-color: var(--color-success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
}

/* House Plan Visualizer Grid styling */
.panel-visualization {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.panel-card-title {
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.floorplan-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 16px;
    flex: 1;
    min-height: 280px;
    margin-bottom: 24px;
}

.floorplan-room {
    background: #0f121a;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.floorplan-room::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(0, 130, 138, 0) 0%, transparent 70%);
    transition: var(--transition-smooth);
    pointer-events: none;
}

.floorplan-room.room-active {
    background: rgba(0, 130, 138, 0.05);
    border-color: rgba(0, 130, 138, 0.4);
}

.floorplan-room.room-active::before {
    background: radial-gradient(circle at center, rgba(0, 130, 138, 0.12) 0%, transparent 70%);
}

#room-automation.room-active {
    background: rgba(249, 178, 51, 0.03);
    border-color: rgba(249, 178, 51, 0.3);
}

#room-automation.room-active::before {
    background: radial-gradient(circle at center, rgba(249, 178, 51, 0.08) 0%, transparent 70%);
}

.room-title {
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.room-icons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.room-icons svg {
    color: var(--color-text-muted);
    transition: var(--transition-smooth);
}

.room-active .room-icons svg {
    color: var(--color-teal);
    filter: drop-shadow(0 0 4px rgba(0, 130, 138, 0.4));
}

#room-automation.room-active .room-icons svg {
    color: var(--color-yellow);
    filter: drop-shadow(0 0 4px rgba(249, 178, 51, 0.4));
}

.appliance-status {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.room-active .appliance-status {
    color: var(--color-text-primary);
}

.visualization-legend {
    display: flex;
    gap: 24px;
    border-top: 1px solid rgba(33, 44, 63, 0.5);
    padding-top: 16px;
}

.legend-item {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-item .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-item .indicator.active {
    background-color: var(--color-teal);
    box-shadow: 0 0 6px var(--color-teal);
}

.legend-item .indicator.inactive {
    background-color: #2D3748;
}

/* Services Cards Section */
.services-section {
    padding: 120px 0;
    background-color: rgba(19, 24, 34, 0.2);
    position: relative;
    border-top: 1px solid rgba(33, 44, 63, 0.3);
}

.service-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 40px 32px;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.3s, box-shadow 0.3s;
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.service-card:hover {
    border-color: rgba(0, 130, 138, 0.35);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.service-icon-wrapper {
    background: rgba(0, 130, 138, 0.08);
    display: inline-flex;
    padding: 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 24px;
    transform: translateZ(20px);
    transition: var(--transition-fast);
}

.service-card:hover .service-icon-wrapper {
    background: rgba(0, 130, 138, 0.15);
    transform: translateZ(30px) scale(1.05);
}

.service-card:nth-child(2) .service-icon-wrapper {
    background: rgba(249, 178, 51, 0.08);
}
.service-card:nth-child(2):hover .service-icon-wrapper {
    background: rgba(249, 178, 51, 0.15);
}

.service-card-title {
    font-size: 1.35rem;
    margin-bottom: 16px;
    line-height: 1.3;
    transform: translateZ(20px);
}

.service-card-desc {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    transform: translateZ(10px);
}

.service-bullet-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform: translateZ(15px);
}

.service-bullet-list li {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    position: relative;
    padding-left: 20px;
}

.service-bullet-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-teal);
}

.service-card:nth-child(2) .service-bullet-list li::before {
    color: var(--color-yellow);
}

/* Our Process (Timeline) */
.process-section {
    padding: 120px 0;
    position: relative;
    border-top: 1px solid rgba(33, 44, 63, 0.3);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 56px auto 0;
    padding-left: 48px;
}

.timeline-line {
    position: absolute;
    top: 0;
    left: 19px;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-teal) 0%, var(--color-yellow) 80%, transparent 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 64px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -48px;
    top: 4px;
    width: 40px;
    height: 40px;
    background: #0f121a;
    border: 2px solid var(--color-teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-text-primary);
    z-index: 5;
    transition: var(--transition-smooth);
}

.timeline-item:nth-child(even) .timeline-dot {
    border-color: var(--color-yellow);
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.15);
    background-color: var(--color-teal);
    box-shadow: var(--shadow-glow-teal);
}

.timeline-item:nth-child(even):hover .timeline-dot {
    background-color: var(--color-yellow);
    color: #0b0d11;
    box-shadow: var(--shadow-glow-yellow);
}

.timeline-content {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 32px;
    position: relative;
    transition: var(--transition-smooth);
}

.timeline-content:hover {
    border-color: rgba(33, 44, 63, 0.8);
    transform: translateX(8px);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 14px;
    left: -8px;
    width: 14px;
    height: 14px;
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    border-left: 1px solid var(--color-border);
    transform: rotate(45deg);
}

.timeline-title {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.timeline-text {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.timeline-tag {
    display: inline-block;
    background: rgba(33, 44, 63, 0.4);
    border: 1px solid var(--color-border);
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: var(--font-title);
    font-weight: 500;
}



/* Contact Form & Info */
.contact-section {
    padding: 120px 0;
    position: relative;
    border-top: 1px solid rgba(33, 44, 63, 0.3);
}

.contact-form-wrapper {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.form-group {
    position: relative;
    width: 100%;
}

.form-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--color-border);
    color: var(--color-text-primary);
    padding: 10px 0;
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    transition: var(--transition-fast);
}

.form-input:focus {
    border-bottom-color: var(--color-teal);
}

.form-label {
    position: absolute;
    top: 10px;
    left: 0;
    color: var(--color-text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: var(--transition-fast);
}

/* Floating Label Animation */
.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
    top: -16px;
    font-size: 0.75rem;
    color: var(--color-teal);
}

.text-area {
    resize: none;
}

/* Custom submission animations */
.btn-submit {
    position: relative;
}

.btn-submit .btn-success-icon,
.btn-submit .spinner {
    display: none;
}

.btn-submit.loading .btn-text {
    opacity: 0;
}

.btn-submit.loading .spinner {
    display: block;
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-submit.success {
    background-color: var(--color-success);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-submit.success .btn-text {
    display: none;
}

.btn-submit.success .btn-success-icon {
    display: block;
    color: #fff;
}

/* Contact Info Panel & Map */
.contact-info-panel {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-info-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-item-card {
    background: rgba(19, 24, 34, 0.4);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition-smooth);
}

.info-item-card:hover {
    border-color: rgba(33, 44, 63, 0.8);
    transform: translateY(-2px);
}

.info-card-icon {
    background: #0f121a;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-teal);
    flex-shrink: 0;
}

.info-card-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-value {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a.card-value:hover {
    color: var(--color-teal);
}

/* Dark Map Placeholder style */
.dark-map-placeholder {
    height: 250px;
    background-color: #0c0f16;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-grid-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(rgba(0, 130, 138, 0.15) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.6;
}

.map-pulse-marker {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--color-yellow);
    border-radius: 50%;
    z-index: 5;
}

.map-pulse-marker::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 48px;
    height: 48px;
    background-color: rgba(249, 178, 51, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: map-ping 2s infinite ease-out;
}

@keyframes map-ping {
    0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

.map-tag {
    position: absolute;
    bottom: 20px;
    background: rgba(19, 24, 34, 0.85);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-family: var(--font-title);
    font-weight: 600;
    color: var(--color-text-primary);
    backdrop-filter: blur(4px);
    z-index: 10;
}

/* Scroll-Driven Animations: Hidden by default, revealed via IntersectionObserver */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Animations for hero elements on load */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: slide-up-fade 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.fade-in.delay-1 { animation-delay: 0.15s; }
.fade-in.delay-2 { animation-delay: 0.3s; }
.fade-in.delay-3 { animation-delay: 0.45s; }

@keyframes slide-up-fade {
    to { opacity: 1; transform: translateY(0); }
}

/* Footer styling */
.footer {
    background-color: #07090d;
    border-top: 1px solid var(--color-border);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 56px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-logo {
    height: 40px;
    object-fit: contain;
    align-self: flex-start;
}

.footer-desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    max-width: 320px;
}

.footer-col-title {
    font-size: 1rem;
    color: var(--color-text-primary);
    margin-bottom: 24px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.footer-links a:hover {
    color: var(--color-teal);
    padding-left: 4px;
}

.contact-list li {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.contact-list li span {
    color: var(--color-text-muted);
}

.footer-bottom {
    border-top: 1px solid rgba(33, 44, 63, 0.5);
    padding-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.footer-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(33, 44, 63, 0.3);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-family: var(--font-title);
    font-weight: 500;
    color: var(--color-text-secondary);
}

.footer-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.footer-badge .dot.green {
    background-color: var(--color-success);
    box-shadow: 0 0 6px var(--color-success);
}

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

/* Tablet (1024px and down) */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .simulator-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Screens / Mobile (768px and down) */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    

    
    .section-title {
        font-size: 2.25rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-nav-toggle {
        display: flex;
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .timeline {
        padding-left: 32px;
    }
    
    .timeline-line {
        left: 11px;
    }
    
    .timeline-dot {
        left: -32px;
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    .timeline-content::before {
        top: 8px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .panel-breakers-row {
        grid-template-columns: repeat(2, 1fr);
    }
}
