/* 
  SmartVend IA - Premium Dark Theme 
  Color Palette: Deep Blacks, Sleek Greys, Electric Blue/Cyan Gradients
*/

:root {
    --bg-base: #0a0a0c;
    --bg-surface: #121318;
    --bg-surface-elevated: #1a1c23;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    --accent-primary: #0ea5e9;
    --accent-secondary: #38bdf8;
    --accent-glow: rgba(14, 165, 233, 0.4);
    
    --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    --gradient-text: linear-gradient(to right, #38bdf8, #a78bfa);
    
    --glass-bg: rgba(26, 28, 35, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    color-scheme: dark;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

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

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

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

.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }

/* Utilities - Glassmorphism */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Utilities - Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
}

.glow-effect {
    animation: pulse-glow 3s infinite;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 var(--accent-glow); }
    70% { box-shadow: 0 0 0 15px rgba(14, 165, 233, 0); }
    100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    background: transparent;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(10, 10, 12, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a:not(.btn) {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-links a:not(.btn):hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 6rem;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 30%, rgba(14, 165, 233, 0.15) 0%, rgba(10, 10, 12, 1) 60%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    margin: 1.5rem auto 2.5rem;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

/* Abstract Machine Mockup */
.hero-image-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 350px;
    margin: 0 auto;
    perspective: 1000px;
}

.machine-mockup {
    width: 300px;
    height: 450px;
    margin: 0 auto;
    background: linear-gradient(180deg, #1f222e 0%, #15161d 100%);
    border-radius: 20px;
    padding: 15px;
    position: relative;
    transform: rotateX(15deg) translateY(-20px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.machine-mockup::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 10%;
    width: 80%;
    height: 20px;
    background: rgba(14, 165, 233, 0.5);
    filter: blur(20px);
    border-radius: 50%;
}

.mockup-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid #333;
}

.glass-reflection {
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(to right, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.03) 50%, 
        rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    animation: reflect 8s infinite linear;
}

@keyframes reflect {
    0% { transform: skewX(-20deg) translateX(-100%); }
    100% { transform: skewX(-20deg) translateX(100%); }
}

.mockup-content h3 {
    color: var(--accent-secondary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.mockup-content p {
    font-size: 0.9rem;
    margin: 0;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 13px;
    display: block;
    position: relative;
}

.wheel {
    width: 4px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% { top: 6px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

/* Sections General */
.section {
    padding: 6rem 0;
}

.alt-bg {
    background-color: var(--bg-surface);
}

.section-header {
    max-width: 700px;
    margin: 0 auto 4rem;
}

/* How it Works Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.step-card {
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition-smooth);
}

.step-card:hover {
    transform: translateY(-10px);
    border-color: rgba(14, 165, 233, 0.3);
}

.step-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 20px var(--accent-glow);
}

/* Split Layout / Benefits */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

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

.feature-list {
    list-style: none;
    margin-top: 2rem;
}

.feature-list li {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-icon {
    font-size: 2rem;
    background: var(--bg-surface-elevated);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.feature-text strong {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.feature-text p {
    margin: 0;
    font-size: 1rem;
}

.benefits-stats {
    padding: 3rem;
    display: grid;
    gap: 2rem;
}

.stat {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.stat:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
}

/* Contact Section */
.contact-section {
    background: radial-gradient(circle at 50% 100%, rgba(14, 165, 233, 0.1) 0%, var(--bg-base) 60%);
}

.contact-info {
    max-width: 500px;
    margin: 2rem auto 0;
    padding: 3rem;
}

.contact-info p {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--text-primary);
}

/* Footer */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--glass-border);
    background: var(--bg-surface);
}

.logo-footer {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

footer p {
    font-size: 0.9rem;
    margin: 0;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 8px;
    color: var(--text-primary) !important;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow);
    background: rgba(255, 255, 255, 0.08);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

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

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem top 50%;
    background-size: 0.65em auto;
}

select.form-control option {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
}

/* Animations Base Classes */
.fade-in { opacity: 0; transition: opacity 0.8s ease-out; }
.fade-in-up { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in-left { opacity: 0; transform: translateX(-30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in-right { opacity: 0; transform: translateX(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }

.visible { opacity: 1; transform: translate(0); }

/* Alerts and Loaders */
.alert {
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: center;
    transition: var(--transition-smooth);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.hidden {
    display: none !important;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* Vending Machine Door Animation */
.vm-doors {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    pointer-events: all;
}

.vm-door {
    width: 50%;
    height: 100%;
    background: rgba(18, 19, 24, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    position: relative;
    transition: transform 1.5s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: inset 0 0 100px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    border: 2px solid rgba(255, 255, 255, 0.05);
}

.vm-door-left {
    transform: translateX(0);
    border-right: 4px solid #111;
    justify-content: flex-end;
}

.vm-door-right {
    transform: translateX(0);
    border-left: 4px solid #111;
    justify-content: flex-start;
}

.door-handle {
    width: 15px;
    height: 300px;
    background: linear-gradient(to right, #2a2d35, #444955, #2a2d35);
    border-radius: 10px;
    margin: 0 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5), inset 0 0 5px rgba(255,255,255,0.2);
}

.vm-doors.open .vm-door-left {
    transform: translateX(-100%);
}

.vm-doors.open .vm-door-right {
    transform: translateX(100%);
}

.vm-doors.hidden {
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0s linear 1.5s;
}

.vm-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 100000;
    transition: opacity 0.5s ease;
}

.vm-overlay-text h2 {
    font-size: 3rem;
    font-family: var(--font-heading);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.vm-doors.open .vm-overlay-text {
    opacity: 0;
}

.glass-glare {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.02) 50%, 
        rgba(255,255,255,0) 100%);
    transform: rotate(30deg);
    pointer-events: none;
}

/* Products Page */
.pt-6 { padding-top: 8rem; }
.pt-4 { padding-top: 4rem; }
.pb-0 { padding-bottom: 0; }

.product-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px var(--accent-glow);
}

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

.product-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 280px;
    max-width: 350px;
    overflow: hidden;
    transition: var(--transition-smooth);
    border-radius: 20px;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5), 0 0 20px var(--accent-glow);
    border-color: rgba(14, 165, 233, 0.4);
}

.hidden-product {
    display: none !important;
}

.product-image {
    height: 220px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image::after {
    content: '';
    position: absolute;
    bottom: -20px;
    width: 60%;
    height: 20px;
    background: rgba(0,0,0,0.5);
    filter: blur(10px);
    border-radius: 50%;
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.product-desc {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
}

.calories {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}

/* CSS Drawn Placeholders for Products */
.placeholder-can {
    width: 50px;
    height: 120px;
    border-radius: 5px;
    background: linear-gradient(90deg, #d35400 0%, #e67e22 50%, #d35400 100%);
    position: relative;
    box-shadow: inset 5px 0 15px rgba(255,255,255,0.3), inset -5px 0 15px rgba(0,0,0,0.4);
}
.placeholder-can::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 10%;
    width: 80%;
    height: 10px;
    background: #bdc3c7;
    border-radius: 5px 5px 0 0;
}

.placeholder-can.white {
    background: linear-gradient(90deg, #ecf0f1 0%, #bdc3c7 50%, #ecf0f1 100%);
}

.placeholder-bottle {
    width: 55px;
    height: 140px;
    border-radius: 10px 10px 5px 5px;
    background: linear-gradient(90deg, rgba(52,152,219,0.7) 0%, rgba(41,128,185,0.8) 50%, rgba(52,152,219,0.7) 100%);
    position: relative;
    box-shadow: inset 5px 0 15px rgba(255,255,255,0.5), inset -5px 0 15px rgba(0,0,0,0.5);
}
.placeholder-bottle::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 30%;
    width: 40%;
    height: 20px;
    background: #ecf0f1;
    border-radius: 3px 3px 0 0;
}

.placeholder-bag {
    width: 90px;
    height: 110px;
    border-radius: 5px;
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    box-shadow: inset 5px 5px 15px rgba(255,255,255,0.2), inset -5px -5px 15px rgba(0,0,0,0.3);
    position: relative;
    clip-path: polygon(10% 0, 90% 0, 100% 10%, 100% 90%, 90% 100%, 10% 100%, 0 90%, 0 10%);
}

.placeholder-bag.chips {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
}

.placeholder-box {
    width: 110px;
    height: 60px;
    background: rgba(255,255,255,0.9);
    border-radius: 5px;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}
.placeholder-box::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 2px dashed #e74c3c;
    border-radius: 3px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .split-layout { grid-template-columns: 1fr; gap: 3rem; }
    .hero-cta { flex-direction: column; }
    .nav-links { display: none; /* In a real app, add a hamburger menu */ }
}
