/* =========================================
   1. RESET & VARIABLES (PEARL PRISM THEME)
   ========================================= */
:root {
    /* Core Palette */
    --color-bg-main: #FFFFFF;
    --color-bg-soft: #F3F6FF;
    --color-text-primary: #111827;
    /* Charcoal */
    --color-text-secondary: #6B7280;
    /* Cool Grey */
    --color-border: #E5E7EB;

    /* Prism Gradients */
    --grad-prism-accent: linear-gradient(135deg, #A5B4FC 0%, #22D3EE 100%);
    --grad-prism-text: linear-gradient(90deg, #6366f1, #06b6d4);
    --grad-prism-bg: linear-gradient(135deg, #FFFFFF 0%, #F3F6FF 100%);
    --grad-warm-cta: linear-gradient(90deg, #FDE68A, #FDBA74);

    /* Shadows & Glass */
    --shadow-soft: 0 10px 40px -10px rgba(165, 180, 252, 0.15);
    --shadow-hover: 0 20px 50px -12px rgba(34, 211, 238, 0.25);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.6);
    --blur-strength: 12px;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Fonts */
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Roboto Mono', monospace;

    /* Animation Timing */
    --trans-fast: 0.2s ease;
    --trans-med: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --trans-slow: 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    background: var(--grad-prism-bg);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--trans-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* =========================================
   2. UTILITIES & ANIMATIONS
   ========================================= */
.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-padding {
    padding: var(--spacing-xl) 0;
}

.text-gradient {
    background: var(--grad-prism-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Scroll Reveal Classes */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal-text.active {
    opacity: 1;
    transform: translateY(0);
}

/* 3D Float Animation */
@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(2deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

@keyframes prism-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes sheen {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--trans-med);
    border: none;
    z-index: 1;
}

.btn-primary {
    background: var(--color-text-primary);
    color: #fff;
}

.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: var(--trans-med);
    z-index: -1;
}

.btn-primary:hover::before {
    animation: sheen 0.6s linear;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: #22D3EE;
    color: #22D3EE;
}

/* =========================================
   3. HEADER (STRICT CONSISTENCY)
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--trans-med);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-strength));
    border-bottom: 1px solid rgba(34, 211, 238, 0.2);
    box-shadow: var(--shadow-soft);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    transition: height 0.3s;
}

.header.scrolled .header-container {
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--color-text-primary);
}

.nav-logo img {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    position: relative;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--grad-prism-accent);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.bar {
    width: 25px;
    height: 2px;
    background: var(--color-text-primary);
    transition: var(--trans-med);
}

/* Mobile Menu */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 90px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 90px);
        background: #FFFFFF;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--trans-med);
        box-shadow: inset 0 10px 20px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .header-actions .btn {
        display: none;
        /* Hide quote button on mobile header, show in menu instead if needed */
    }
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    position: relative;
    padding-top: 180px;
    padding-bottom: 120px;
    overflow: hidden;
}

/* Prismatic Background Element */
.prism-bg {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--grad-prism-accent);
    filter: blur(100px);
    opacity: 0.15;
    border-radius: 50%;
    z-index: -1;
    animation: float 10s ease-in-out infinite;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
}

/* Hero 3D Visuals */
.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.cube-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    transform-style: preserve-3d;
    animation: float 6s ease-in-out infinite;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--trans-med);
}

.fc-1 {
    top: 0;
    left: 0;
    z-index: 2;
    width: 220px;
}

.fc-2 {
    bottom: 20px;
    right: -20px;
    z-index: 3;
    width: 180px;
    animation-delay: 1s;
}

.fc-3 {
    top: 40%;
    right: -50px;
    z-index: 1;
    opacity: 0.8;
    filter: blur(1px);
}

.card-icon {
    width: 50px;
    height: 50px;
    background: var(--grad-prism-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #6366f1;
}

@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }
}

/* =========================================
   5. SERVICES
   ========================================= */
.services-section {
    background: #FFFFFF;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: #fff;
    padding: 3rem 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    transition: var(--trans-med);
    position: relative;
    overflow: hidden;
    border-top: 4px solid transparent;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--grad-prism-accent);
    z-index: 2;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: var(--grad-prism-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card ul {
    margin-top: 1.5rem;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.service-card ul li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-card ul li i {
    color: #22D3EE;
    font-size: 0.8rem;
}

/* =========================================
   6. CALCULATOR SECTION (Interactive)
   ========================================= */
.calculator-section {
    background: var(--color-bg-soft);
    position: relative;
    overflow: hidden;
}

.calc-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: #fff;
    padding: 4rem;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    align-items: center;
}

.calc-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-text-primary);
}

.range-wrap {
    margin-bottom: 2rem;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #6366f1;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.calc-result {
    text-align: center;
    padding: 2rem;
    background: var(--grad-prism-bg);
    border-radius: 16px;
    border: 1px solid rgba(165, 180, 252, 0.3);
}

.result-value {
    font-size: 3.5rem;
    font-weight: 900;
    color: #6366f1;
    display: block;
    margin: 1rem 0;
    font-family: var(--font-heading);
}

/* =========================================
   7. SAMPLE REPORT (Visual CSS)
   ========================================= */
.report-section {
    background: #FFFFFF;
}

.report-visual {
    background: #111827;
    /* Dark mode specifically for the report to pop */
    padding: 3rem;
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    max-width: 1000px;
    margin: 0 auto;
}

.chart-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 300px;
    padding-bottom: 20px;
    border-bottom: 1px solid #374151;
    gap: 10px;
}

.chart-bar {
    width: 100%;
    background: linear-gradient(to top, #6366f1, #22D3EE);
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: height 1s ease;
    opacity: 0.8;
}

.chart-bar:hover {
    opacity: 1;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.4);
}

.chart-bar span {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    font-weight: bold;
}

/* =========================================
   8. TESTIMONIALS
   ========================================= */
.testimonials {
    background: var(--color-bg-soft);
    text-align: center;
}

.testimonial-track {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 2rem 1rem;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.testimonial-track::-webkit-scrollbar {
    display: none;
}

.testi-card {
    min-width: 350px;
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    scroll-snap-align: center;
    border-left: 4px solid #A5B4FC;
}

.testi-text {
    font-style: italic;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.testi-author h4 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.testi-author span {
    font-size: 0.85rem;
    color: #9CA3AF;
}

/* =========================================
   9. CONTACT PAGE STYLES
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info {
    background: #fff;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.info-item {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: var(--color-bg-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
}

.contact-form-wrapper {
    background: #fff;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-family: var(--font-body);
    transition: var(--trans-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* =========================================
   10. LEGAL PAGES
   ========================================= */
.legal-content {
    background: #fff;
    padding: 4rem;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #111827;
}

.legal-content p {
    margin-bottom: 1rem;
    color: #4B5563;
}

/* =========================================
   11. FOOTER (STRICT CONSISTENCY)
   ========================================= */
.footer {
    background: #F8FAFC;
    border-top: 1px solid #E5E7EB;
    padding-top: 5rem;
    padding-bottom: 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--grad-prism-accent);
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

.footer-logo {
    margin-bottom: 1.5rem;
    display: block;
}

.footer-logo img {
    height: 50px;
    width: auto;
    /* opacity: 0.7; */
    transition: 0.3s;
}

.footer-logo:hover img {
    filter: none;
    opacity: 1;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #6366f1;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid #E5E7EB;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.legal-links a {
    margin-left: 1.5rem;
}

/* =========================================
   12. WIDGETS (Chat)
   ========================================= */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    background: var(--grad-prism-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    transition: var(--trans-med);
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    height: 450px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: var(--trans-med);
    border: 1px solid #E5E7EB;
}

.chat-window.active {
    transform: scale(1);
}

.chat-header {
    background: var(--grad-prism-bg);
    padding: 15px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #F9FAFB;
}

.chat-msg {
    background: #E5E7EB;
    padding: 8px 12px;
    border-radius: 10px 10px 10px 0;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: inline-block;
    max-width: 80%;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid #E5E7EB;
    display: flex;
}

.chat-input input {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--font-body);
}

/* Responsiveness adjustments for Footer */
@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }

    .legal-links a {
        margin: 0 10px;
    }

    .calc-container {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}