/* --- CSS Reset & Base Styles --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary: #00A99D;
    /* A vibrant teal for accents */
    --color-secondary: #FF6B6B;
    /* A contrasting color for special CTAs */
    --color-background: #12181F;
    /* Very dark blue/charcoal */
    --color-surface: #1A2129;
    /* Slightly lighter surface color for cards */
    --color-border: #2A3440;
    --color-text-primary: #E0E0E0;
    /* Light grey for body text */
    --color-text-headings: #FFFFFF;
    --color-text-muted: #8899A6;

    --font-family: 'Poppins', sans-serif;
    --header-height: 80px;

    --transition-fast: 0.2s ease-in-out;
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-family);
    background-color: var(--color-background);
    color: var(--color-text-primary);
    line-height: 1.7;
    font-weight: 300;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-text-headings);
}

h1,
h2,
h3,
h4 {
    color: var(--color-text-headings);
    line-height: 1.2;
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.2rem;
}

p {
    margin-bottom: 1.5rem;
}

ul,
ol {
    list-style-position: inside;
}

/* --- Utility Classes & Buttons --- */
.section-title {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-title p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.cta-button,
.secondary-button {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-smooth);
    border: 2px solid transparent;
    cursor: pointer;
}

.cta-button {
    background-color: var(--color-primary);
    color: var(--color-background);
}

.cta-button:hover {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 169, 157, 0.2);
}

.secondary-button {
    background-color: transparent;
    color: var(--color-text-headings);
    border-color: var(--color-border);
}

.secondary-button:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-background);
    transform: translateY(-3px);
}

/* --- Header Section --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    padding: 15px 0;
    align-items: center;
    background-color: rgba(18, 24, 31, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-fast);
    border-bottom: 1px solid transparent;
}

.site-header.scrolled {
    border-bottom-color: var(--color-border);
}

.main-nav {
    gap: 80px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 80px;
    filter: brightness(0) invert(1);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--color-text-primary);
    font-weight: 500;
    position: relative;
    padding: 8px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-smooth);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger-menu {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-text-headings);
    border-radius: 3px;
    transition: all var(--transition-smooth);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    padding: calc(var(--header-height) + 100px) 0 100px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 1.5rem auto 2.5rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-background-graphics {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.graphic-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(100px);
}

.shape-1 {
    width: 400px;
    height: 400px;
    background-color: var(--color-primary);
    top: -50px;
    left: -100px;
    animation: move-blob 15s infinite alternate;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background-color: var(--color-secondary);
    bottom: -50px;
    right: -100px;
    animation: move-blob 20s infinite alternate-reverse;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background-color: #4D77FF;
    bottom: 20%;
    left: 10%;
    animation: move-blob 18s infinite alternate;
}

@keyframes move-blob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, 50px) scale(1.2);
    }
}

/* --- Services Section --- */
.services-section {
    padding: 100px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: transparent;
    perspective: 1000px;
    height: 350px;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.service-card:hover .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front,
.service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    padding: 2.5rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: linear-gradient(145deg, var(--color-surface), #161d25);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.service-card-back {
    transform: rotateY(180deg);
    align-items: flex-start;
    text-align: left;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, var(--color-primary), #007a70);
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px rgba(0, 169, 157, 0.3);
}

.service-icon svg {
    width: 30px;
    height: 30px;
    color: var(--color-text-headings);
}

.service-card-front h3 {
    margin-bottom: 0.5rem;
}

.service-card-front p {
    color: var(--color-text-muted);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.service-card-back ul {
    list-style: none;
    margin: 1rem 0;
    width: 100%;
}

.service-card-back li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.service-card-back li:last-child {
    border-bottom: none;
}

.card-cta {
    margin-top: auto;
    font-weight: 600;
}

/* --- ROI Calculator Section --- */
.calculator-section {
    padding: 100px 0;
    background-color: var(--color-surface);
}

.calculator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.calculator-content .section-title {
    text-align: left;
    margin: 0;
}

.calculator-form-wrapper {
    background: var(--color-background);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.form-group input {
    width: 100%;
    padding: 12px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-primary);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.3);
}

.calculator-results {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.calculator-results h4 {
    margin-bottom: 1.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px dashed var(--color-border);
}

.result-item:last-of-type {
    border-bottom: none;
}

.result-item span {
    color: var(--color-text-muted);
}

.result-item strong {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-headings);
}

.result-item.final-roi strong {
    color: var(--color-primary);
    font-size: 1.5rem;
}

.disclaimer {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 0;
}

/* --- Industry Section --- */
.industry-section {
    padding: 100px 0;
}

.industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.industry-item {
    padding: 2rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: var(--color-text-headings);
    background-color: var(--color-surface);
    transition: all var(--transition-smooth);
    cursor: default;
}

.industry-item:hover {
    transform: translateY(-10px) scale(1.05);
    background-color: var(--color-primary);
    color: var(--color-background);
    border-color: var(--color-primary);
    box-shadow: 0 15px 30px rgba(0, 169, 157, 0.25);
}

/* --- Testimonials Section --- */
.testimonials-section {
    padding: 100px 0;
    background-color: var(--color-surface);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--color-background);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-smooth);
}

.testimonial-card:hover {
    transform: translateY(-10px);
}

.testimonial-quote {
    font-style: italic;
    margin-bottom: 2rem;
    position: relative;
    padding-left: 2rem;
}

.testimonial-quote::before {
    content: '“';
    position: absolute;
    left: -10px;
    top: -10px;
    font-size: 4rem;
    color: var(--color-primary);
    opacity: 0.3;
    line-height: 1;
}

.testimonial-author {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-info h4 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.author-info span {
    color: var(--color-text-muted);
}

/* --- Data Section --- */
.data-section {
    padding: 100px 0;
}

.data-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.data-content .section-title {
    text-align: left;
    margin: 0;
}

.data-features {
    list-style: none;
    margin: 2rem 0;
}

.data-features li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 1rem;
}

.data-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 700;
}

.dashboard-mockup {
    background: var(--color-surface);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    padding: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: perspective(1500px) rotateY(-15deg) rotateX(5deg);
    transition: transform var(--transition-smooth);
}

.dashboard-mockup:hover {
    transform: perspective(1500px) rotateY(0) rotateX(0);
}

.dash-header {
    display: flex;
    gap: 8px;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.dash-header span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dash-header span:nth-child(1) {
    background: #FF5F56;
}

.dash-header span:nth-child(2) {
    background: #FFBD2E;
}

.dash-header span:nth-child(3) {
    background: #27C93F;
}

.dash-body {
    padding: 1.5rem;
}

.stat-row {
    display: flex;
    gap: 2rem;
    margin: 1rem 0 2rem;
}

.stat-item .stat-label {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.stat-item .stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text-headings);
}

.chart-mockup {
    margin-top: 1rem;
}

.chart-title {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: block;
}

.bar-group {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    height: 120px;
    border-left: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0 0 1rem;
}

.bar {
    width: 100%;
    background: linear-gradient(to top, var(--color-primary), #00c4b7);
    border-radius: 4px 4px 0 0;
    position: relative;
    animation: grow-bar 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.bar span {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
}

@keyframes grow-bar {
    from {
        transform: scaleY(0);
        transform-origin: bottom;
    }

    to {
        transform: scaleY(1);
        transform-origin: bottom;
    }
}

/* --- Footer Section --- */
.site-footer {
    padding: 80px 0 30px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-about .logo {
    margin-bottom: 1.5rem;
}

.footer-about p {
    color: var(--color-text-muted);
}

.footer-grid h4 {
    margin-bottom: 1.5rem;
    color: var(--color-text-headings);
    font-weight: 600;
}

.footer-links ul,
.footer-legal ul {
    list-style: none;
}

.footer-links li,
.footer-legal li,
.footer-contact p {
    margin-bottom: 1rem;
}

.footer-links a,
.footer-legal a,
.footer-contact a {
    color: var(--color-text-muted);
}

.footer-links a:hover,
.footer-legal a:hover,
.footer-contact a:hover {
    color: var(--color-primary);
}

.footer-contact p {
    color: var(--color-text-muted);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* --- Contact Page Specific --- */
.contact-page-section {
    padding: calc(var(--header-height) + 100px) 0 100px;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    margin-top: 4rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group select {
    width: 100%;
    padding: 12px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-primary);
    font-size: 1rem;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238899A6' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-primary);
    font-size: 1rem;
    resize: vertical;
}

.form-group.form-feedback p {
    margin: 0;
    font-weight: 500;
}

#form-message.success {
    color: var(--color-primary);
}

#form-message.error {
    color: var(--color-secondary);
}

.contact-info-wrapper h3 {
    margin-bottom: 1.5rem;
}

.contact-details {
    list-style: none;
    margin: 2rem 0;
}

.contact-details li {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.contact-details li strong {
    color: var(--color-text-headings);
    margin-bottom: 0.25rem;
}

.contact-details li span,
.contact-details li a {
    color: var(--color-text-muted);
}

.map-placeholder {
    width: 100%;
    height: 200px;
    background-color: var(--color-surface);
    border: 1px dashed var(--color-border);
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: var(--color-text-muted);
    margin-top: 2rem;
}


/* --- Legal Pages Specific --- */
.legal-page-section {
    padding: calc(var(--header-height) + 100px) 0 100px;
}

.legal-page-section .container {
    max-width: 800px;
}

.legal-content {
    margin-top: 3rem;
}

.legal-content h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.legal-content p,
.legal-content li {
    color: var(--color-text-muted);
}

.legal-content ul {
    margin-top: 1.5rem;
    margin-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 1rem;
}

/* --- Animations --- */
.animate-on-load {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: var(--load-delay, 0s);
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    transition-delay: var(--scroll-delay, 0s);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Live Chat Widget --- */
.live-chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
}

.chat-icon {
    width: 60px;
    height: 60px;
    background-color: var(--color-primary);
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 169, 157, 0.4);
    transition: transform var(--transition-fast);
}

.chat-icon:hover {
    transform: scale(1.1);
}

.chat-icon svg {
    width: 30px;
    height: 30px;
    color: var(--color-background);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background: var(--color-surface);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all var(--transition-smooth);
    pointer-events: none;
}

.live-chat-widget.open .chat-window {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.chat-header {
    padding: 1rem;
    background-color: var(--color-background);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-chat {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-body {
    padding: 1rem;
    flex-grow: 1;
    height: 300px;
    overflow-y: auto;
}

.message {
    margin-bottom: 1rem;
}

.message p {
    display: inline-block;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    max-width: 80%;
    margin: 0;
}

.message.received p {
    background: var(--color-background);
    border-bottom-left-radius: 4px;
}

.chat-footer {
    padding: 1rem;
    display: flex;
    border-top: 1px solid var(--color-border);
}

.chat-footer input {
    flex-grow: 1;
    border: none;
    background: var(--color-background);
    padding: 0.75rem;
    border-radius: 20px;
    color: var(--color-text-primary);
    margin-right: 0.5rem;
}

.chat-footer input:focus {
    outline: none;
}

.chat-footer button {
    background: var(--color-primary);
    border: none;
    color: var(--color-background);
    padding: 0 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {

    .calculator-layout,
    .data-layout {
        grid-template-columns: 1fr;
    }

    .data-content .section-title,
    .calculator-content .section-title {
        text-align: center;
        margin: 0 auto 3rem;
    }

    .dashboard-mockup {
        transform: perspective(1500px) rotateY(0) rotateX(5deg);
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--header-height);
        right: 0;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - var(--header-height));
        background-color: var(--color-surface);
        flex-direction: column;
        align-items: center;
        padding-top: 3rem;
        gap: 1.5rem;
        transform: translateX(100%);
        transition: transform var(--transition-smooth);
        border-left: 1px solid var(--color-border);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .header-cta {
        display: none;
    }

    .hamburger-menu {
        display: flex;
        z-index: 1001;
    }

    .hamburger-menu.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-section {
        min-height: 60vh;
        padding-top: calc(var(--header-height) + 60px);
        padding-bottom: 60px;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .chat-window {
        width: calc(100vw - 2rem);
        right: -1rem;
    }
}