:root {
    --bg-dark: #070914;
    --bg-card: rgba(20, 25, 45, 0.4);
    --border-glass: rgba(255, 255, 255, 0.08);
    --color-primary: #f8f9fa;
    --color-secondary: #a0a8ba;
    --color-accent: #f7a04a;
    /* Golden/Orange accent */
    --color-accent-hover: #ffb770;
    --color-blue: #4a6cf7;
    --color-blue-dark: #1f3bb3;
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s ease;
    --glow-shadow: 0 0 20px rgba(74, 108, 247, 0.4);
    --glow-accent: 0 0 20px rgba(247, 160, 74, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

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

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

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

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

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 32px;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(74, 108, 247, 0.05);
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -1px;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.5px;
}

h3 {
    font-size: 1.5rem;
}

p {
    color: var(--color-secondary);
    margin-bottom: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--color-blue);
    color: #fff;
    box-shadow: var(--glow-shadow);
}

.btn-primary:hover {
    background: var(--color-blue-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-primary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-outline {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}

.btn-outline:hover {
    background: rgba(247, 160, 74, 0.1);
    box-shadow: var(--glow-accent);
}

.glow-on-hover:hover {
    box-shadow: 0 0 25px var(--color-blue);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 20px 0;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(7, 9, 20, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 12px 0;
}

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

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition);
}

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

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

.header-contacts {
    display: flex;
    align-items: center;
    gap: 24px;
}

.phone {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/weavers.png');
    /* Textile factory image */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    opacity: 0.8;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--bg-dark) 0%, rgba(7, 9, 20, 0.4) 60%, transparent 100%);
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 64px;
    align-items: center;
    width: 100%;
}

.hero-text {
    max-width: 700px;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(74, 108, 247, 0.1);
    color: var(--color-blue);
    border: 1px solid rgba(74, 108, 247, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero .subtitle {
    font-size: 1.1rem;
    margin-top: 24px;
    margin-bottom: 40px;
    max-width: 600px;
}

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

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 60px;
}

.stat-card {
    padding: 24px;
    text-align: center;
    border-top: 2px solid var(--color-blue);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 8px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sections General */
.section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 64px;
    max-width: 600px;
}

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

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

.feature-list {
    list-style: none;
    margin-top: 32px;
}

.feature-list li {
    margin-bottom: 20px;
    color: var(--color-secondary);
    position: relative;
    padding-left: 28px;
}

.feature-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-accent);
    font-weight: bold;
}

.feature-list strong {
    color: var(--color-primary);
}

/* Charts */
.chart-panel {
    padding: 40px;
    background: linear-gradient(to bottom right, rgba(20, 25, 45, 0.6), rgba(10, 15, 30, 0.8));
}

.chart-panel h4 {
    margin-bottom: 32px;
    text-align: center;
}

.bar-row {
    margin-bottom: 24px;
}

.bar-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.bar-track {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: width 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bar-fill.blue {
    background: #2a3a5a;
}

.bar-fill.blue-light {
    background: var(--color-blue);
    box-shadow: 0 0 10px var(--color-blue);
}

.bar-fill.accent-color {
    background: var(--color-accent);
    box-shadow: 0 0 10px var(--color-accent);
}

/* Image Break */
.image-break {
    position: relative;
    padding: 120px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-break-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/manufacturing.png');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    z-index: -1;
    opacity: 0.3;
}

.quote-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px;
    text-align: center;
}

blockquote {
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 300;
    color: var(--color-primary);
}

/* Benefits Section */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(74, 108, 247, 0.1);
    color: var(--color-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    border: 1px solid rgba(74, 108, 247, 0.2);
}

/* Process Timeline (Responsive Version) */
.timeline {
    position: relative;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    top: 0;
    bottom: 0;
    left: 24px;
}

.timeline-item {
    position: relative;
    width: 100%;
    padding-left: 64px;
    padding-right: 24px;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-accent);
    left: 17px;
    /* 24 - 8 (radius) + 1 (border line offset center) */
    top: 32px;
    z-index: 1;
    box-shadow: 0 0 10px var(--color-accent);
}

.timeline-content {
    padding: 32px;
}

.step-num {
    display: inline-block;
    color: var(--color-blue);
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

/* Contact form */
.contact-section {
    position: relative;
}

.contact-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    padding: 64px;
    background: linear-gradient(180deg, rgba(20, 25, 45, 0.6) 0%, rgba(10, 15, 30, 0.8) 100%);
}

.contact-item {
    margin-bottom: 16px;
}

.contact-label {
    display: block;
    color: var(--color-secondary);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.contact-item a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--color-accent);
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: var(--color-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-blue);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.2);
}

.btn-block {
    width: 100%;
}

/* Footer */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-glass);
    background: #04060b;
}

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

.copyright {
    margin: 0;
    font-size: 0.9rem;
}

/* Animations */
.animate-fade-up {
    animation: fadeUp 1s ease forwards;
}

.animate-fade-in-delayed {
    opacity: 0;
    animation: fadeIn 1s ease forwards 0.5s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Scroll Animations Classes (added via JS) */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-right {
    transform: translateX(-30px);
}

.fade-right.is-visible {
    transform: translateX(0);
}

.fade-left {
    transform: translateX(30px);
}

.fade-left.is-visible {
    transform: translateX(0);
}


/* Calculator Section */
.calculator-section {
    position: relative;
}

.calculator-container {
    padding: 48px;
    background: linear-gradient(135deg, rgba(20, 25, 45, 0.7) 0%, rgba(10, 15, 30, 0.9) 100%);
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

.calc-group.full-width {
    grid-column: 1 / -1;
}

.calc-group label {
    display: block;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--color-secondary);
    font-weight: 500;
}

.calc-input {
    width: 100%;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: var(--color-primary);
    font-family: inherit;
    font-size: 1.1rem;
    transition: var(--transition);
}

.calc-input:focus {
    outline: none;
    border-color: var(--color-blue);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.2);
}

/* Custom Radio Cards */
.radio-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.radio-card {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
    user-select: none;
    flex: 1 1 auto;
    text-align: center;
}

.radio-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.radio-card.active {
    background: rgba(74, 108, 247, 0.15);
    border-color: var(--color-blue);
    color: #fff;
    box-shadow: 0 4px 15px rgba(74, 108, 247, 0.3);
    transform: scale(1.02);
}

/* Calc Footer & Visual Showcase */
.calc-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--border-glass);
    align-items: center;
}

.calc-summary {
    text-align: left;
}

.calc-visual-showcase {
    position: relative;
    height: 250px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(74, 108, 247, 0.05) 0%, transparent 70%);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.calc-visual-showcase::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0px 4px 20px rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    pointer-events: none;
}

.visual-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: var(--transition);
}

.visual-placeholder .emoji-icon {
    animation: floatIcon 4s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.visual-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8) translateY(20px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.visual-layer.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    z-index: 10;
}

/* Float Animation for the active icon */
.visual-layer.active .emoji-icon {
    animation: floatIcon 3s ease-in-out infinite;
}

.emoji-icon {
    font-size: 5rem;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 20px rgba(74, 108, 247, 0.6));
    display: inline-block;
}

.visual-label {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 1.1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes floatIcon {
    0% {
        transform: translateY(0px) rotate(0deg);
        filter: drop-shadow(0 0 20px rgba(74, 108, 247, 0.6));
    }

    50% {
        transform: translateY(-10px) rotate(2deg);
        filter: drop-shadow(0 0 30px rgba(74, 108, 247, 0.8));
    }

    100% {
        transform: translateY(0px) rotate(0deg);
        filter: drop-shadow(0 0 20px rgba(74, 108, 247, 0.6));
    }
}

/* Number Animation Class */
.number-animate {
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.number-animate.pop {
    transform: scale(1.15);
    color: #fff;
}


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

    .about-grid,
    .contact-card,
    .calc-grid,
    .calc-footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .calc-visual-showcase {
        order: -1;
        /* Put visuals above the final text on mobile */
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .calculator-container {
        padding: 32px 24px;
    }

    .radio-card {
        flex: 1 1 100%;
    }

    .result-value #calc-total {
        font-size: 2.5rem;
    }

    .result-value.error-state #calc-total {
        font-size: 1.5rem;
    }

    .calc-visual-showcase {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        /* simple mobile version for now */
    }

    .header-contacts .btn {
        display: none;
    }

    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 25vh;
        background: linear-gradient(to bottom, var(--bg-dark) 40%, transparent 100%);
        z-index: -1;
    }

    .hero::after {
        background: linear-gradient(180deg, transparent 0%, rgba(7, 9, 20, 0.8) 50%, var(--bg-dark) 100%);
    }

    .hero-bg {
        mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
        background-position: center bottom;
        background-size: auto 150%;
    }

    .contact-card {
        padding: 32px;
    }

    .footer-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}