/* GLOBAL STYLES */
:root {
    --bg-main: #11131A;
    --text-main: #E0E0E0;
    --text-secondary: #a0a0a0;
    --accent-primary: #9E46FF;
    --accent-hover: #8930e8;
    --border-color: #33353e;

    --font-headings: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;

    --container-width: 1200px;
    --container-padding: 16px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

ul {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    color: #ffffff;
    font-weight: 700;
}

/* HEADER STYLES */
.header {
    background-color: rgba(17, 19, 26, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.header__logo {
    font-family: var(--font-headings);
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.header__logo:hover {
    color: #ffffff;
}

.header__nav {
    display: none; /* Hidden on mobile */
}

.header__nav-list {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header__nav-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main);
    padding: 8px 0;
    position: relative;
}

.header__nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-primary);
    transition: width 0.3s ease;
}

.header__nav-link:hover::after {
    width: 100%;
}

.header__nav-link--cta {
    background-color: var(--accent-primary);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.header__nav-link--cta:hover {
    background-color: var(--accent-hover);
    color: #ffffff;
}

.header__nav-link--cta::after {
    display: none;
}

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

/* FOOTER STYLES */
.footer {
    background-color: #0c0e13;
    border-top: 1px solid var(--border-color);
    padding: 60px 0;
    font-size: 14px;
}

.footer__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
}

.footer__logo {
    font-family: var(--font-headings);
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    display: inline-block;
}

.footer__logo:hover {
    color: #ffffff;
}

.footer__copy {
    color: var(--text-secondary);
}

.footer__title {
    font-size: 18px;
    margin-bottom: 16px;
    color: #ffffff;
    font-weight: 500;
}

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

.footer__link {
    color: var(--text-secondary);
}

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

.footer__list--contacts {
    gap: 16px;
}

.footer__item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.footer__icon {
    width: 18px;
    height: 18px;
    color: var(--accent-primary);
}

.footer__address {
    font-style: normal;
    color: var(--text-secondary);
}

/* MEDIA QUERIES (Mobile-first) */
@media (min-width: 768px) {
    .header__burger-menu {
        display: none;
    }

    .header__nav {
        display: block;
    }
    
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }
    
    .footer__item {
        justify-content: flex-start;
    }
}

@media (min-width: 1024px) {
    .footer__container {
        grid-template-columns: 2fr 1fr 1fr 2fr;
    }
}

/* SHARED COMPONENTS */
.button {
    display: inline-block;
    background-color: var(--accent-primary);
    color: #ffffff;
    padding: 14px 32px;
    border-radius: 8px;
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.button:hover {
    background-color: transparent;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* HERO SECTION STYLES */
.hero {
    padding: 80px 0;
    overflow: hidden;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    text-align: center;
}

.hero__title {
    font-size: 2.5rem; /* 40px */
    line-height: 1.2;
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.hero__description {
    font-size: 1.125rem; /* 18px */
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero__animation-wrapper {
    width: 100%;
    max-width: 500px;
    height: 300px;
    margin: 0 auto;
    position: relative;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* MEDIA QUERIES for Hero section */
@media (min-width: 768px) {
    .hero {
        padding: 100px 0;
    }

    .hero__animation-wrapper {
        height: 400px;
    }

    .hero__title {
        font-size: 3rem; /* 48px */
    }
}

@media (min-width: 1024px) {
    .hero {
        padding: 120px 0;
    }

    .hero__container {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        text-align: left;
    }

    .hero__content {
        order: 1;
    }

    .hero__animation-wrapper {
        order: 2;
        max-width: 100%;
        height: 500px;
    }

    .hero__description {
        margin: 0 0 32px;
    }
}

/* SHARED SECTION HEADER */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header__title {
    font-size: 2.25rem; /* 36px */
    margin-bottom: 16px;
}

.section-header__subtitle {
    font-size: 1.125rem; /* 18px */
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* PROCESS SECTION STYLES */
.process {
    padding: 80px 0;
    background-color: #0c0e13; /* Slightly different background to separate sections */
}

.process__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.process-card {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.process-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(158, 70, 255, 0.1);
}

.process-card__icon-wrapper {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background-color: rgba(158, 70, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.process-card__icon {
    width: 32px;
    height: 32px;
    color: var(--accent-primary);
}

.process-card__title {
    font-size: 1.5rem; /* 24px */
    margin-bottom: 12px;
}

.process-card__description {
    color: var(--text-secondary);
    font-size: 1rem; /* 16px */
}

/* MEDIA QUERIES for Process section */
@media (min-width: 768px) {
    .process {
        padding: 100px 0;
    }
    
    .process__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .process__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .section-header__title {
        font-size: 2.5rem; /* 40px */
    }
}

/* STACK SECTION STYLES */
.stack {
    padding: 80px 0;
}

.stack__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stack-card {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.stack-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    background-color: #1a1c23;
}

.stack-card__icon {
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.stack-card__name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.stack-card:hover .stack-card__icon,
.stack-card:hover .stack-card__name {
    color: var(--accent-primary);
}

/* MEDIA QUERIES for Stack section */
@media (min-width: 576px) {
    .stack__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .stack {
        padding: 100px 0;
    }

    .stack__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }

    .stack-card__icon {
        width: 48px;
        height: 48px;
    }
}

@media (min-width: 1024px) {
    .stack__grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* CASES SECTION STYLES */
.cases {
    padding: 80px 0;
    background-color: #0c0e13;
}

.cases__tabs-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.cases__tabs-nav {
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px; /* For scrollbar space */
}

.cases__tabs-btn {
    flex-shrink: 0;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--font-body);
    color: var(--text-secondary);
    background-color: transparent;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.cases__tabs-btn:hover {
    background-color: var(--bg-main);
    color: var(--text-main);
}

.cases__tabs-btn--active {
    color: #ffffff;
    border-color: var(--accent-primary);
    background-color: var(--bg-main);
}

.cases__tab-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.cases__tab-panel--active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cases__tab-panel-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: center;
}

.cases__tab-image-wrapper {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.cases__tab-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cases__tab-title {
    font-size: 1.75rem; /* 28px */
    margin-bottom: 24px;
}

.cases__tab-block {
    margin-bottom: 20px;
}
.cases__tab-block:last-child {
    margin-bottom: 0;
}

.cases__tab-block h4 {
    color: var(--accent-primary);
    font-size: 1rem;
    margin-bottom: 8px;
}

.cases__tab-block p {
    color: var(--text-secondary);
}

/* MEDIA QUERIES for Cases section */
@media (min-width: 768px) {
    .cases {
        padding: 100px 0;
    }

    .cases__tab-panel-grid {
        grid-template-columns: 1fr; /* Stays 1 column, image above text */
    }
}

@media (min-width: 1024px) {
    .cases__tabs-wrapper {
        flex-direction: row;
        gap: 60px;
    }

    .cases__tabs-nav {
        flex-direction: column;
        flex-basis: 300px; /* Fixed width for nav */
        flex-shrink: 0;
    }

    .cases__tabs-content {
        flex-grow: 1;
    }

    .cases__tab-panel-grid {
        grid-template-columns: 300px 1fr;
        gap: 40px;
    }
}

/* BLOG SECTION STYLES */
.blog {
    padding: 80px 0;
}

.blog__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.blog-card {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(158, 70, 255, 0.1);
}

.blog-card__image-link {
    display: block;
}

.blog-card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card__image {
    transform: scale(1.05);
}

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

.blog-card__meta {
    display: flex;
    gap: 16px;
    font-size: 0.875rem; /* 14px */
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.blog-card__category {
    color: var(--accent-primary);
    font-weight: 600;
}

.blog-card__title {
    font-size: 1.375rem; /* 22px */
    margin-bottom: 12px;
    line-height: 1.3;
}

.blog-card__title a {
    color: #ffffff;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card__title a {
    color: var(--accent-primary);
}

.blog-card__excerpt {
    color: var(--text-secondary);
    margin-bottom: 24px;
    flex-grow: 1;
}

.blog-card__read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-weight: 600;
    align-self: flex-start;
}

.blog-card__read-more .blog-card__arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.blog-card__read-more:hover {
    color: var(--accent-primary);
}

.blog-card__read-more:hover .blog-card__arrow {
    transform: translateX(4px);
}


/* MEDIA QUERIES for Blog section */
@media (min-width: 768px) {
    .blog {
        padding: 100px 0;
    }

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

@media (min-width: 1024px) {
    .blog__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* CONTACT SECTION STYLES */
.contact {
    padding: 80px 0;
    background-color: #0c0e13;
}

.contact__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 60px;
}

.contact__info-title {
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.contact__info-text {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

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

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

.contact__info-item a {
    color: var(--text-main);
    font-weight: 500;
}

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

.contact__info-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

/* Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group__label {
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-group__input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group__input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(158, 70, 255, 0.2);
}

.form-group__input.invalid {
    border-color: #ff5555;
}


.form-group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-group--checkbox input[type="checkbox"] {
    width: 1.2em;
    height: 1.2em;
    flex-shrink: 0;
}

.form-group--checkbox a {
    text-decoration: underline;
}

.contact-form__submit {
    width: 100%;
    margin-top: 10px;
}

.form-success-message {
    border: 1px solid #3c763d;
    background-color: rgba(60, 118, 61, 0.1);
    color: #a3d9a5;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.form-success-message i {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: #3c763d;
}

/* MEDIA QUERIES for Contact Section */
@media (min-width: 1024px) {
    .contact {
        padding: 100px 0;
    }

    .contact__grid {
        grid-template-columns: 1fr 1.2fr;
        gap: 80px;
    }
}

/* COOKIE POPUP STYLES */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: #1a1c23;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 200;
    transform: translateY(200%);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.cookie-popup--visible {
    transform: translateY(0);
    opacity: 1;
}

.cookie-popup__text {
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.875rem;
}

.cookie-popup__text a {
    text-decoration: underline;
}

.cookie-popup__btn {
    background-color: var(--accent-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.cookie-popup__btn:hover {
    background-color: var(--accent-hover);
}

@media (min-width: 768px) {
    .cookie-popup {
        flex-direction: row;
        justify-content: space-between;
    }
    .cookie-popup__text {
        text-align: left;
    }
}

/* GENERIC PAGES STYLES (privacy.html, terms.html, etc.) */
.pages {
    padding: 60px 0;
}

.pages .container {
    max-width: 800px; /* Narrower container for better readability */
}

.pages h1,
.pages h2 {
    margin-bottom: 24px;
    line-height: 1.3;
}

.pages h1 {
    font-size: 2.5rem;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.pages h2 {
    font-size: 1.75rem;
    margin-top: 40px;
}

.pages p,
.pages ul,
.pages li {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.pages p {
    margin-bottom: 20px;
}

.pages a {
    text-decoration: underline;
}

.pages a:hover {
    text-decoration: none;
}

.pages ul {
    list-style: disc;
    padding-left: 25px;
    margin-bottom: 20px;
}

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

.pages strong {
    color: var(--text-main);
    font-weight: 600;
}