/* 
===================================================
   CASTICARMO - Premium Dark Theme CSS
   Author: Web Dev Agent
=================================================== 
*/

:root {
    /* Color Palette - Premium Dark Slate & Amber theme */
    --bg-dark: #070B14;
    --bg-card: rgba(16, 24, 43, 0.6);
    --bg-alt: #0D1426;

    --primary: #FFB347;
    /* Elegant metallic amber / orange */
    --primary-hover: #FFA21A;
    --primary-glow: rgba(255, 179, 71, 0.3);

    --secondary: #3B82F6;
    /* Tech Blue for automation aspects */
    --secondary-glow: rgba(59, 130, 246, 0.3);

    --text-main: #F1F5F9;
    /* Bright grey for good readability */
    --text-muted: #94A3B8;

    --border-color: rgba(255, 255, 255, 0.08);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Animation Speeds */
    --trans-fast: 0.2s ease;
    --trans-normal: 0.3s ease;
    --trans-slow: 0.5s ease;

    /* Shadows */
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: #FFFFFF;
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 100px 0;
}

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

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

.mt-3 {
    margin-top: 1rem;
}

.mt-5 {
    margin-top: 3rem;
}

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

/* Typography Helpers */
.subtitle {
    display: inline-block;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.header-line {
    height: 4px;
    width: 60px;
    background: linear-gradient(90deg, var(--primary), transparent);
    margin-bottom: 1.5rem;
}

.text-center .header-line {
    margin: 0 auto 1.5rem auto;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    width: 100px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--trans-normal);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #000;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #FFF, transparent);
    opacity: 0;
    z-index: -1;
    transition: var(--trans-normal);
}

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

.btn-primary:hover:before {
    opacity: 0.2;
}

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

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-link {
    background: transparent;
    padding: 0;
    color: var(--primary);
}

.btn-link i {
    font-size: 0.8rem;
    transition: transform var(--trans-fast);
}

.btn-link:hover i {
    transform: translateX(5px);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-glass);
    transition: transform var(--trans-normal), border-color var(--trans-normal);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 179, 71, 0.3);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--trans-normal);
    background: transparent;
    padding: 20px 0;
}

.navbar.scrolled {
    background: rgba(7, 11, 20, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: var(--glass-border);
    padding: 15px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2rem;
    color: var(--primary);
    background: var(--primary-glow);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 179, 71, 0.2);
}

.logo-text h1 {
    font-size: 1.4rem;
    letter-spacing: 2px;
    margin: 0;
}

.logo-text span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    position: relative;
}

.nav-links a:not(.btn):after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary);
    transition: var(--trans-normal);
}

.nav-links a:not(.btn):hover:after,
.nav-links a.active:not(.btn):after {
    width: 100%;
}

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

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, #111A2F 0%, var(--bg-dark) 100%);
}

.gradient-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 10s infinite alternate;
}

.sphere-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-glow);
    top: -100px;
    right: -100px;
}

.sphere-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary-glow);
    bottom: 10%;
    left: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(30px) scale(1.1);
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-title span {
    color: var(--primary);
    background: linear-gradient(90deg, #FFF, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.trust-indicators {
    display: flex;
    gap: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.trust-item i {
    color: var(--secondary);
    font-size: 1.2rem;
}

/* Animations for Visual */
.main-showcase {
    padding: 2rem;
    position: relative;
    border: 1px solid rgba(59, 130, 246, 0.3);
    /* Tech blue border */
}

.showcase-header {
    display: flex;
    gap: 8px;
    margin-bottom: 2rem;
}

.showcase-header .circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.circle.red {
    background: #FF5F56;
}

.circle.yellow {
    background: #FFBD2E;
}

.circle.green {
    background: #27C93F;
}

.smart-door-animation {
    height: 150px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.door-frame {
    width: 60%;
    height: 80%;
    border: 4px solid #334155;
    border-bottom: none;
    position: relative;
    display: flex;
}

.door-panel {
    width: 50%;
    height: 100%;
    background: linear-gradient(to bottom, #475569, #1E293B);
    border: 1px solid #0f172a;
    transition: width 2s ease-in-out;
    animation: openDoor 5s infinite alternate;
}

.sensor-beam {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(100, 255, 218, 0.5);
    box-shadow: 0 0 10px #64ffda;
    opacity: 0;
    animation: pulseBeam 5s infinite alternate;
}

@keyframes openDoor {

    0%,
    20% {
        width: 50%;
    }

    40%,
    80% {
        width: 5%;
    }

    100% {
        width: 50%;
    }
}

@keyframes pulseBeam {

    0%,
    39% {
        opacity: 0;
    }

    40%,
    80% {
        opacity: 1;
    }

    81%,
    100% {
        opacity: 0;
    }
}


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

.service-card {
    padding: 2.5rem 2rem;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 1rem;
    background: rgba(255, 179, 71, 0.1);
    border-radius: 16px;
    transition: var(--trans-normal);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--primary);
    color: #000;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Products */
.products-carousel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.product-item {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.product-img {
    height: 250px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--trans-slow);
}

.product-item:hover .product-img img {
    transform: scale(1.05);
}

.product-content h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.product-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Video Showcase Section */
.video-showcase {
    max-width: 1000px;
    margin: 0 auto;
}

.video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16/9;
    padding: 0;
}

.portfolio-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem 2rem 2rem 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    align-items: flex-end;
}

.video-info h3 {
    font-size: 1.8rem;
    margin: 0.5rem 0;
}

.video-info p {
    color: #E2E8F0;
    max-width: 600px;
    margin-bottom: 0;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    display: grid;
    gap: 2rem;
    box-shadow: var(--shadow-glass);
}

.stat-box {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--text-muted);
}

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

.feature-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Contact Section */
.contact-card {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.contact-info {
    padding: 4rem;
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.1), transparent);
    border-right: var(--glass-border);
}

.contact-info h2 {
    margin-bottom: 1rem;
}

.contact-info>p {
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.info-items {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.icon-box {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
}

.info-item h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.info-item a,
.info-item p {
    font-size: 1.1rem;
    font-weight: 500;
}

.info-item a:hover {
    color: var(--primary);
}

.social-links {
    margin-top: 3rem;
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border: var(--glass-border);
}

.social-links a:hover {
    background: var(--primary);
    color: #000;
    transform: translateY(-3px);
}

.contact-form {
    padding: 4rem;
}

.contact-form h3 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 1.2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--trans-normal);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.1);
}

select option {
    background: var(--bg-dark);
}

/* Footer */
.footer {
    background: #000;
    padding-top: 5rem;
    border-top: var(--glass-border);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-muted);
    max-width: 300px;
}

.footer-links h4,
.footer-services h4 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-links h4:after,
.footer-services h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}

.footer-links ul li,
.footer-services ul li {
    margin-bottom: 0.8rem;
}

.footer-links a,
.footer-services a {
    color: var(--text-muted);
}

.footer-links a:hover,
.footer-services a:hover {
    color: var(--primary);
    padding-left: 5px;
}

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

.legal-links {
    display: flex;
    gap: 1.5rem;
}

.legal-links a:hover {
    color: #FFF;
}

/* Animations (Intersection Observer classes) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

.reveal-delay-1 {
    transition-delay: 0.2s;
}

.reveal-delay-2 {
    transition-delay: 0.4s;
}

/* Responsive adjustments */
@media (max-width: 992px) {

    .hero-content,
    .about-grid,
    .contact-card {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 3rem;
    }

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

    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info {
        border-right: none;
        border-bottom: var(--glass-border);
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-dark);
        border-left: var(--glass-border);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        transition: right var(--trans-normal);
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links ul {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .nav-links a {
        display: block;
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .mobile-menu-btn {
        display: block;
        z-index: 1001;
    }

    .hero-actions {
        flex-direction: column;
    }

    .trust-indicators {
        flex-direction: column;
        gap: 1rem;
    }

    .products-carousel {
        grid-template-columns: 1fr;
    }

    .contact-info,
    .contact-form,
    .glass-panel {
        padding: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}