/* 
   AetherForge AI Premium Design System
   Color tokens, layout configurations, keyframe animations, glassmorphism, 
   custom range sliders, terminal simulator, and mobile responsive designs.
*/

/* Reset & Variables */
:root {
    --bg-dark: #07070a;
    --bg-card: rgba(25, 25, 35, 0.45);
    --bg-card-hover: rgba(35, 35, 50, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    
    --primary: #8b5cf6; /* neon violet */
    --primary-glow: rgba(139, 92, 246, 0.35);
    --secondary: #06b6d4; /* neon cyan */
    --secondary-glow: rgba(6, 182, 212, 0.35);
    
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --text-dark: #71717a;
    
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Orbitron', sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    overflow-x: hidden;
}

body {
    position: relative;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Typography & Core Layouts */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

p {
    line-height: 1.6;
    color: var(--text-muted);
}

.limit-width {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Custom Cursor Follower */
#custom-cursor {
    width: 32px;
    height: 32px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
    mix-blend-mode: difference;
}

#custom-cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--secondary);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
}

/* Cursor Hover states */
#custom-cursor.cursor-hover {
    width: 50px;
    height: 50px;
    background-color: rgba(139, 92, 246, 0.15);
    border-color: var(--secondary);
}

/* Neural Canvas */
#canvas-neural {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.55;
}

/* Glowing Background Orbs */
.glowing-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.4;
    mix-blend-mode: screen;
    pointer-events: none;
}

.orb-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--primary) 0%, rgba(0,0,0,0) 70%);
    top: -10%;
    right: 10%;
    animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--secondary) 0%, rgba(0,0,0,0) 70%);
    top: 30%;
    left: -10%;
    animation: floatOrb2 22s ease-in-out infinite alternate;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-80px, 80px) scale(1.15); }
}

@keyframes floatOrb2 {
    0% { transform: translate(0, 0) scale(1.1); }
    100% { transform: translate(100px, -60px) scale(0.9); }
}

/* Magnetic Buttons & Universal Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px var(--primary-glow);
}

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

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5), 0 0 10px var(--secondary);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-full {
    width: 100%;
}

/* Glassmorphism Card Style */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

/* Header & Navigation */
.navbar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(7, 7, 10, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.navbar-container.scrolled {
    background: rgba(7, 7, 10, 0.85);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    padding: 8px 0;
}

.navbar-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    transition: var(--transition-smooth);
}

.navbar-container.scrolled .navbar-wrapper {
    height: 64px;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: 0.1em;
    color: #fff;
    display: flex;
    align-items: center;
}

.logo-accent {
    color: var(--secondary);
    text-shadow: 0 0 12px var(--secondary-glow);
}

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

.nav-item {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    position: relative;
    padding: 8px 0;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: var(--transition-fast);
}

.nav-item:hover {
    color: #fff;
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

.nav-item.active {
    color: #fff;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

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

.mobile-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.open span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Navigation Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(24px);
    border-left: 1px solid var(--border-color);
    z-index: 999;
    padding: 100px 40px 40px;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.mobile-drawer.open {
    right: 0;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.mobile-nav-item {
    font-size: 1.15rem;
    font-family: var(--font-heading);
    color: var(--text-muted);
}

.mobile-nav-item:hover {
    color: var(--secondary);
}

.mobile-cta {
    margin-top: 20px;
}

/* Section Common Styling */
section {
    padding: 120px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 64px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.gradient-text {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
}

/* Hero Section Styles */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 140px;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 99px;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--secondary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--secondary);
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 14px var(--secondary); }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.badge-text {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--secondary);
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.15rem;
    margin-bottom: 36px;
    max-width: 520px;
}

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

/* Hero Mockup Frame */
.hero-visual {
    position: relative;
    width: 100%;
}

.visual-mockup-frame {
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.frame-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
}

.frame-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background-color: #ef4444; }
.dot.yellow { background-color: #eab308; }
.dot.green { background-color: #22c55e; }

.frame-url {
    margin-left: 16px;
    font-size: 0.75rem;
    color: var(--text-dark);
    font-family: var(--font-sans);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 16px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.frame-body {
    position: relative;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d0d13;
}

.hero-dashboard-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: var(--transition-smooth);
}

/* Floating Widgets in Hero */
.floating-widget {
    position: absolute;
    background: rgba(15, 15, 25, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    animation: floatWidget 6s ease-in-out infinite alternate;
}

.widget-1 {
    top: 20px;
    left: -20px;
}

.widget-2 {
    bottom: 30px;
    right: -20px;
    animation-delay: 2s;
}

.widget-icon {
    font-size: 1.4rem;
}

.widget-label {
    font-size: 0.7rem;
    color: var(--text-dark);
    text-transform: uppercase;
    font-weight: 700;
}

.widget-value {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-heading);
}

@keyframes floatWidget {
    0% { transform: translateY(0); }
    100% { transform: translateY(-12px); }
}

/* Services Grid Styles */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.service-card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 36px 28px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.card-border-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--secondary), var(--primary), transparent);
    opacity: 0;
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--bg-card-hover);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3), 0 0 15px rgba(6, 182, 212, 0.08);
}

.service-card:hover .card-border-glow {
    opacity: 1;
}

.service-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(139, 92, 246, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    border: 1px solid rgba(139, 92, 246, 0.15);
    transition: var(--transition-smooth);
}

.service-card:hover .service-icon-wrapper {
    color: var(--secondary);
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.2);
    box-shadow: 0 0 12px var(--secondary-glow);
}

.service-icon {
    width: 28px;
    height: 28px;
}

.service-card-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: #fff;
}

.service-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    flex-grow: 1;
}

.service-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-features li {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-features li span {
    color: var(--secondary);
    font-weight: 700;
}

/* Estimator Styles */
.estimator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 48px;
}

.estimator-controls {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.slider-value {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
    background: rgba(6, 182, 212, 0.08);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(6, 182, 212, 0.15);
}

/* Custom Range Input Track/Thumb styles */
.custom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    transition: var(--transition-fast);
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--secondary);
    cursor: pointer;
    box-shadow: 0 0 10px var(--secondary-glow);
    transition: var(--transition-fast);
}

.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    background: var(--primary);
    box-shadow: 0 0 14px var(--primary-glow);
}

.custom-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--secondary);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px var(--secondary-glow);
    transition: var(--transition-fast);
}

.custom-slider::-moz-range-thumb:hover {
    transform: scale(1.25);
    background: var(--primary);
    box-shadow: 0 0 14px var(--primary-glow);
}

.estimator-readouts {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    padding: 28px;
    border: 1px solid rgba(255,255,255,0.04);
}

.readout-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.readout-card.highlight {
    background: rgba(139, 92, 246, 0.05);
    border-color: rgba(139, 92, 246, 0.25);
}

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

.readout-val {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
}

.roi-bar-container {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.roi-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
}

.roi-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: hidden;
}

.roi-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* AI Simulator Section */
.simulator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: stretch;
}

.simulator-console {
    display: flex;
    flex-direction: column;
}

.console-header, .preview-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.console-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
}

.console-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.console-body {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prompt-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prompt-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

#simulator-prompt {
    width: 100%;
    height: 90px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    padding: 12px;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    resize: none;
    outline: none;
    transition: var(--transition-fast);
}

#simulator-prompt:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 10px var(--secondary-glow);
}

.terminal-logs-wrapper {
    background: #050508;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 180px;
}

.terminal-log-header {
    background: rgba(255,255,255,0.02);
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dark);
}

.btn-clear-terminal {
    background: transparent;
    border: none;
    color: var(--text-dark);
    font-size: 0.72rem;
    cursor: pointer;
    font-family: var(--font-sans);
}

.btn-clear-terminal:hover {
    color: var(--text-muted);
}

.terminal-body {
    padding: 12px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 140px;
}

.terminal-line {
    word-break: break-all;
    line-height: 1.4;
}

.terminal-line.system {
    color: var(--text-dark);
}

.terminal-line.ai {
    color: var(--secondary);
}

.terminal-line.compiling {
    color: var(--primary);
}

.terminal-line.success {
    color: #22c55e;
}

/* Simulator Preview Panel */
.simulator-preview {
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 480px;
}

.preview-tabs {
    display: flex;
    gap: 16px;
}

.preview-tab {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}

.preview-tab.active {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

.preview-status {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dark);
}

.preview-viewport {
    background: #0a0a0f;
    flex-grow: 1;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.viewport-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.85);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.viewport-loader {
    text-align: center;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,0.06);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

.viewport-overlay.loading .spinner {
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-message {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 250px;
    line-height: 1.5;
}

.preview-content-frame {
    padding: 24px;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Simulated Website Styles (dynamic generation markup classes) */
.simulated-hero {
    border: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    padding: 20px;
    animation: simFadeIn 0.8s ease forwards;
}

.simulated-heading {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.simulated-desc {
    font-size: 0.72rem;
    margin-bottom: 12px;
}

.simulated-btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
}

.simulated-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    animation: simFadeIn 0.8s ease 0.4s forwards;
    opacity: 0;
}

.simulated-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 6px;
}

.simulated-card h5 {
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.simulated-card p {
    font-size: 0.65rem;
}

@keyframes simFadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Portfolio Section */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 10px 24px;
    border-radius: 30px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

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

.portfolio-item {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 11;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: var(--transition-smooth);
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(7, 7, 10, 0.95) 0%, rgba(7, 7, 10, 0.4) 60%, rgba(7, 7, 10, 0) 100%);
    opacity: 0;
    display: flex;
    align-items: flex-end;
    padding: 32px;
    transition: opacity 0.4s ease;
}

.portfolio-details {
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--secondary);
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.portfolio-details h4 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #fff;
}

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

/* Hover effects for portfolio */
.portfolio-item:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.08);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-details {
    transform: translateY(0);
}

/* Contact Section Styles */
.contact-wrapper {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 56px;
    align-items: center;
}

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

.contact-heading {
    font-size: 2.8rem;
    line-height: 1.15;
}

.contact-desc {
    font-size: 1.05rem;
}

.contact-details-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 16px;
}

.details-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.details-icon {
    font-size: 1.5rem;
    background: rgba(255,255,255,0.04);
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.details-item h5 {
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: #fff;
}

.details-item p {
    font-size: 0.85rem;
}

/* Form Styles */
.contact-form-panel {
    padding: 44px;
    position: relative;
    overflow: hidden;
}

.form-title {
    font-size: 1.4rem;
    margin-bottom: 32px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-group {
    position: relative;
    margin-bottom: 24px;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 18px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-fast);
}

.text-area-input {
    min-height: 100px;
    resize: vertical;
}

/* Floating Label Logic */
.floating-label {
    position: absolute;
    left: 18px;
    top: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
    transition: var(--transition-fast);
}

.text-area-input ~ .floating-label {
    top: 15px;
}

.form-input:focus ~ .floating-label,
.form-input:not(:placeholder-shown) ~ .floating-label {
    top: -9px;
    left: 12px;
    font-size: 0.75rem;
    background-color: #12121c;
    padding: 0 8px;
    border-radius: 4px;
    color: var(--secondary);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.form-input:focus {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 12px var(--secondary-glow);
}

/* Select Input custom styling */
.select-group select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.select-group::after {
    content: '▼';
    font-size: 0.65rem;
    color: var(--text-muted);
    position: absolute;
    right: 18px;
    top: 18px;
    pointer-events: none;
}

.form-input:focus ~ .select-label,
.form-input:valid ~ .select-label {
    top: -9px;
    left: 12px;
    font-size: 0.75rem;
    background-color: #12121c;
    padding: 0 8px;
    border-radius: 4px;
    color: var(--secondary);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

/* Validation Messages */
.input-validation-msg {
    display: block;
    color: #ef4444;
    font-size: 0.72rem;
    margin-top: 4px;
    padding-left: 4px;
    height: 0;
    opacity: 0;
    overflow: hidden;
    transition: var(--transition-fast);
}

.input-group.invalid .form-input {
    border-color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}

.input-group.invalid .input-validation-msg {
    height: 16px;
    opacity: 1;
}

/* Loading state for button */
.btn-loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
}

.btn-loading-spinner.hidden {
    display: none;
}

/* Success box */
.contact-success-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 24px 0;
}

.contact-success-state.hidden {
    display: none !important;
}

.success-icon-check {
    width: 56px;
    height: 56px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.contact-success-state h3 {
    color: #fff;
    font-size: 1.4rem;
}

.contact-success-state p {
    font-size: 0.88rem;
    margin-bottom: 12px;
}

/* Footer Styles */
.main-footer {
    background: #040406;
    border-top: 1px solid var(--border-color);
    padding: 64px 0 32px;
}

.footer-wrapper {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

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

.brand-desc {
    font-size: 0.85rem;
    margin-top: 16px;
}

.footer-links-grid {
    display: flex;
    gap: 80px;
}

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

.footer-links-column h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
    margin-bottom: 8px;
}

.footer-links-column a {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links-column a:hover {
    color: var(--secondary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.03);
    padding-top: 24px;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-dark);
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    font-size: 1rem;
    color: var(--text-muted);
}

.footer-socials a:hover {
    color: var(--secondary);
}

/* Scroll reveal triggers */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 56px;
        text-align: center;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .estimator-container {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 32px;
    }
    
    .simulator-container {
        grid-template-columns: 1fr;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    section {
        padding: 80px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.6rem;
    }
    
    .nav-links, .nav-actions {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .footer-top {
        flex-direction: column;
        gap: 32px;
    }
    
    .footer-links-grid {
        gap: 48px;
        width: 100%;
        justify-content: space-between;
    }
}

/* WhatsApp Chatbot Widget Styles */
.whatsapp-chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9990;
    font-family: var(--font-sans);
}

.wa-trigger-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(10, 10, 15, 0.8);
    border: 1.5px solid #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    box-shadow: 0 8px 32px rgba(37, 211, 102, 0.25), 0 0 15px rgba(37, 211, 102, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    padding: 0;
}

.wa-trigger-btn:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 12px 40px rgba(37, 211, 102, 0.4), 0 0 25px rgba(37, 211, 102, 0.25);
    border-color: #25D366;
}

.wa-trigger-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25D366;
    opacity: 0.15;
    z-index: -1;
    animation: waPulse 2s infinite;
}

@keyframes waPulse {
    0% { transform: scale(1); opacity: 0.3; }
    100% { transform: scale(1.4); opacity: 0; }
}

@keyframes waBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.wa-trigger-btn.bounce {
    animation: waBounce 0.8s ease 2;
}

.wa-avatar-wrapper {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-bot-icon {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 4px rgba(37, 211, 102, 0.5));
}

.wa-active-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background-color: #25D366;
    border: 1.5px solid #000;
    border-radius: 50%;
    box-shadow: 0 0 6px #25D366;
}

.wa-tooltip {
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: rgba(10, 10, 15, 0.9);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.wa-trigger-btn:hover .wa-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Chat Window */
.wa-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 60px);
    height: 480px;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: var(--transition-smooth);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 10000;
}

.wa-chat-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header */
.wa-chat-header {
    background: linear-gradient(135deg, rgba(20, 20, 25, 0.95) 0%, rgba(37, 211, 102, 0.15) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.wa-header-avatar {
    position: relative;
    width: 40px;
    height: 40px;
}

.wa-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--secondary);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.wa-avatar-online {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: #25D366;
    border: 1.5px solid #07070a;
    border-radius: 50%;
    box-shadow: 0 0 6px #25D366;
}

.wa-header-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 2px;
}

.wa-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.wa-close-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
    line-height: 1;
}

.wa-close-btn:hover {
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

/* Chat Messages */
.wa-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(10, 10, 15, 0.3);
}

/* Custom Scrollbar for Messages */
.wa-chat-messages::-webkit-scrollbar {
    width: 4px;
}
.wa-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.wa-message {
    max-width: 80%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: waMessageFadeIn 0.3s ease forwards;
}

.wa-message.bot {
    align-self: flex-start;
}

.wa-message.user {
    align-self: flex-end;
}

.wa-message-content {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.wa-message.bot .wa-message-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-top-left-radius: 2px;
}

.wa-message.user .wa-message-content {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
    color: #fff;
    border-top-right-radius: 2px;
}

.wa-message-time {
    font-size: 0.7rem;
    color: var(--text-dark);
    align-self: flex-end;
}

.wa-message.bot .wa-message-time {
    align-self: flex-start;
}

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

/* Suggestions chips */
.wa-chat-suggestions {
    padding: 8px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: rgba(10, 10, 15, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.02);
}

.wa-suggestion-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.wa-suggestion-chip:hover {
    background: rgba(37, 211, 102, 0.1);
    border-color: #25D366;
    color: #fff;
    transform: translateY(-1px);
}

/* Input Area */
.wa-chat-input-area {
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--border-color);
    background: rgba(15, 15, 20, 0.9);
}

.wa-chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition-fast);
}

.wa-chat-input:focus {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.06);
}

.wa-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--primary);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.wa-send-btn:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

.wa-send-icon {
    width: 16px;
    height: 16px;
}

/* Direct Action Link */
.wa-direct-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366;
    color: #000;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 12px;
    transition: var(--transition-smooth);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.wa-direct-link:hover {
    background: #20ba59;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.wa-link-icon {
    width: 18px;
    height: 18px;
}

.wa-link-icon path {
    fill: #000;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .wa-chat-window {
        width: 320px;
        bottom: 75px;
    }
}

