/* --- Variables --- */
:root {
    --color-bg: #0F172A;       /* Dark Slate */
    --color-surface: #1E293B;  /* Lighter Slate */
    --color-text: #F8FAFC;     /* White-ish */
    --color-text-muted: #94A3B8;
    
    --color-primary: #06B6D4;  /* Cyan */
    --color-secondary: #8B5CF6; /* Violet */
    --color-accent: #F43F5E;    /* Rose (for CTA hovers) */
    
    --font-main: 'Inter', sans-serif;
    --font-headers: 'Outfit', sans-serif;
    
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
    --container-width: 1200px;
    
    --transition: all 0.3s ease;
}

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

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headers);
    font-weight: 700;
    line-height: 1.2;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn--primary {
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn--primary:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px 0;
}

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

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

.logo__text {
    font-family: var(--font-headers);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.nav__list {
    display: flex;
    gap: 32px;
}

.nav__link {
    color: var(--color-text-muted);
    font-weight: 500;
    position: relative;
}

.nav__link:hover {
    color: var(--color-primary);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition);
}

.nav__link:hover::after {
    width: 100%;
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header__burger {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
}

/* --- Mobile Menu --- */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--color-bg);
    z-index: 1001;
    padding: 24px;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
}

.mobile-menu.is-active {
    right: 0;
}

.mobile-menu__header {
    display: flex;
    justify-content: end;
    align-items: center;
    margin-bottom: 48px;
}

.mobile-menu__close {
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
}

.mobile-menu__list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: center;
}

.mobile-menu__link {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
}

.mobile-menu__link--highlight {
    color: var(--color-primary);
}

/* --- Footer --- */
.footer {
    background-color: var(--color-surface);
    padding: 64px 0 24px;
    margin-top: auto; /* Ensures footer is at bottom if content is short */
}

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

.footer__desc {
    margin-top: 16px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.footer__title {
    font-size: 1.1rem;
    margin-bottom: 24px;
    color: var(--color-text);
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.footer__link:hover {
    color: var(--color-secondary);
    padding-left: 4px;
}

.footer__contacts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.footer__icon {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
}

.footer__copyright {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* --- Media Queries --- */
@media (max-width: 992px) {
    .header__nav {
        display: none;
    }
    
    .header__burger {
        display: block;
    }
    
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .footer__grid {
        grid-template-columns: 1fr;
    }
    
    .header__actions .btn {
        display: none; /* Hide CTA in header on very small screens, preserve burger */
    }
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh; /* Full viewport height */
    display: flex;
    align-items: center;
    padding-block: 100px; /* Offset for fixed header */
    overflow: hidden;
}

.hero__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 1) 100%);
    z-index: 2;
}

.hero__container {
    position: relative;
    z-index: 3;
}

.hero__content {
    max-width: 1200px;
}

.hero__badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 100px;
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero__title {
    font-size: 3.5rem;
    margin-bottom: 24px;
    line-height: 1.1;
}

.text-gradient {
    background: linear-gradient(135deg, #F8FAFC 0%, var(--color-primary) 50%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__desc {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
    max-width: 1000px;
    line-height: 1.6;
}

.hero__actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

/* Secondary Outline Button */
.btn--outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--color-text);
}

.btn--outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.hero__features {
    display: flex;
    gap: 32px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero__feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.hero__feature-icon {
    width: 20px;
    height: 20px;
    color: var(--color-secondary);
}

/* --- Responsive Hero --- */
@media (max-width: 768px) {
    .hero__title {
        font-size: 2.5rem;
    }
    
    .hero__features {
        flex-direction: column;
        gap: 16px;
    }
    
    .hero__actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
}

/* --- General Section Styles --- */
.section {
    padding: 100px 0;
    position: relative;
}

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

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--color-text);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

.text-highlight {
    color: var(--color-primary);
    font-weight: 600;
}

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

/* --- Service Card (Glassmorphism & Glow) --- */
.service-card {
    background: rgba(30, 41, 59, 0.5); /* Semi-transparent */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 40px 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Hover Effect: Glow Border & Lift */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    padding: 2px; /* Border width */
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent); 
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: var(--transition);
    opacity: 0.5;
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.service-card:hover::before {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    opacity: 1;
}

.service-card__icon-box {
    width: 60px;
    height: 60px;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--color-primary);
    transition: var(--transition);
}

.service-card__icon-box svg {
    width: 32px;
    height: 32px;
}

.service-card:hover .service-card__icon-box {
    background: var(--color-primary);
    color: #fff;
    transform: rotate(10deg);
}

.service-card__title {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--color-text);
}

.service-card__desc {
    color: var(--color-text-muted);
    margin-bottom: 32px;
    flex-grow: 1; /* Push link to bottom */
    font-size: 0.95rem;
}

.service-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.service-card__link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.service-card__link:hover svg {
    transform: translateX(5px);
}

/* --- Scroll Animation States --- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

/* --- Mobile Fix --- */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
}

/* --- Technology Section (Steps) --- */
.technology {
    background-color: #0b1120; /* Slightly darker bg for contrast */
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    position: relative;
}

/* Connecting Line */
.steps::before {
    content: '';
    position: absolute;
    top: 40px; /* Align with circle center */
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(6, 182, 212, 0.1) 0%, 
        rgba(6, 182, 212, 1) 50%, 
        rgba(139, 92, 246, 0.1) 100%
    );
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    background: var(--color-bg);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    transition: var(--transition);
}

.step:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
}

.step__number {
    width: 80px;
    height: 80px;
    background: var(--color-surface);
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-headers);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 auto 24px;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
    position: relative;
}

.step__title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--color-text);
}

.step__desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.text-white {
    color: #fff;
    font-weight: 500;
}

.link-inline {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: var(--transition);
}

.link-inline:hover {
    color: var(--color-secondary);
}

/* --- Blog Section --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.blog-card {
    background: var(--color-surface);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(139, 92, 246, 0.3);
}

.blog-card__image-wrapper {
    height: 200px;
    position: relative;
    overflow: hidden;
    background-color: #0f172a; /* Placeholder bg */
}

.blog-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    opacity: 0.8;
}

.blog-card:hover .blog-card__img {
    transform: scale(1.05);
    opacity: 1;
}

.blog-card__tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.blog-card__content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card__date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.blog-card__title {
    font-size: 1.15rem;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--color-text);
}

.blog-card__excerpt {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
    flex-grow: 1;
}

.blog-card__link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-card__link:hover {
    color: var(--color-primary);
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .steps {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .steps::before {
        width: 2px;
        height: 100%;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        background: linear-gradient(180deg, 
            rgba(6, 182, 212, 0.1) 0%, 
            rgba(6, 182, 212, 1) 50%, 
            rgba(139, 92, 246, 0.1) 100%
        );
    }
    
    .step__number {
        background: var(--color-bg); /* Cover the line */
    }
}

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

.contact__list {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact__list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text-muted);
    font-size: 1.05rem;
}

.contact__list li i {
    color: var(--color-primary);
    width: 20px;
    height: 20px;
}

/* --- Form Styles --- */
.contact__form-wrapper {
    background: var(--color-surface);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden; /* Contains success overlay */
}

.form__group {
    margin-bottom: 20px;
}

.form__label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.form__input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--color-text);
    font-size: 1rem;
    font-family: var(--font-main);
    transition: var(--transition);
}

.form__input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

.form__checkbox-group {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 32px;
}

.form__checkbox {
    margin-top: 4px;
    accent-color: var(--color-primary);
    width: 16px;
    height: 16px;
}

.form__checkbox-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    cursor: pointer;
}

.form__submit {
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Form Success State --- */
.form-success {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-surface);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
}

.form-success.is-active {
    opacity: 1;
    visibility: visible;
}

.form-success__icon {
    width: 64px;
    height: 64px;
    background: rgba(16, 185, 129, 0.1); /* Green tint */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981; /* Green */
    margin-bottom: 24px;
}

.form-success__icon svg {
    width: 32px;
    height: 32px;
}

/* --- Loading Spinner --- */
.btn__loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    display: none;
    margin-left: 8px;
}

.form.is-sending .btn__text {
    display: none;
}

.form.is-sending .btn__loader {
    display: block;
}

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

/* --- Cookie Popup --- */
.cookie-popup {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 24px;
    border-radius: 50px;
    z-index: 2000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 600px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.cookie-popup.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.cookie-popup__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cookie-popup__text {
    font-size: 0.9rem;
    color: var(--color-text);
    margin: 0;
}

.cookie-popup__text a {
    color: var(--color-primary);
    text-decoration: underline;
}

.btn--sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* --- Policy Pages (pages section) --- */
.pages {
    padding: 120px 0 80px; /* More top padding for header */
    min-height: 80vh;
}

.pages .container {
    max-width: 800px;
    background: var(--color-surface);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pages h1 {
    font-size: 2.5rem;
    margin-bottom: 24px;
    color: var(--color-text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 16px;
}

.pages h2 {
    font-size: 1.5rem;
    margin: 32px 0 16px;
    color: var(--color-text);
}

.pages p {
    margin-bottom: 16px;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.pages ul {
    margin-bottom: 24px;
    padding-left: 24px;
    list-style: disc;
    color: var(--color-text-muted);
}

.pages li {
    margin-bottom: 8px;
}

.pages strong {
    color: var(--color-text);
}

.pages a {
    color: var(--color-primary);
    text-decoration: underline;
}

/* --- Responsive Contact --- */
@media (max-width: 768px) {
    .contact__container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .cookie-popup__content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-popup {
        border-radius: 24px;
    }
}