/* ==================== GLOBAL STYLES ==================== */
/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Space+Mono:wght@700&display=swap');

/* CSS Variables */
:root {
    --header-height: 4.5rem;

    /* Colors */
    --bg-color: #0B192E;
    --text-color: #CCD6F6;
    --title-color: #E6F1FF;
    --accent-color: #64FFDA;
    --accent-color-hover: #50e9c8;
    --card-bg-color: #12213A;

    /* Fonts */
    --body-font: 'Inter', sans-serif;
    --title-font: 'Space Mono', monospace;

    --h1-font-size: 2.5rem;
    --h2-font-size: 1.5rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: var(--title-font);
    color: var(--title-color);
    font-weight: 700;
}

ul {
    list-style: none;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* Reusable CSS Classes */
.container {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

/* ==================== HEADER ==================== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: rgba(11, 25, 46, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-bg-color);
}

.header__container {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    font-family: var(--title-font);
    color: var(--title-color);
    font-size: 1.25rem;
    transition: color 0.3s;
}
.header__logo:hover {
    color: var(--accent-color);
}

.header__nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header__nav-link {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
}

.header__nav-link:hover {
    color: var(--accent-color);
}

.header__nav-link--cta {
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.header__nav-link--cta:hover {
    background-color: rgba(100, 255, 218, 0.1);
    color: var(--accent-color);
}

.header__burger {
    display: none; /* Hidden on desktop */
    cursor: pointer;
    background: none;
    border: none;
}

/* ==================== FOOTER ==================== */
.footer {
    padding: 4rem 0 2rem;
    background-color: var(--card-bg-color);
    margin-top: 5rem;
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.footer__logo {
    font-family: var(--title-font);
    font-size: 1.5rem;
    color: var(--title-color);
    display: inline-block;
    margin-bottom: 1rem;
}

.footer__copyright {
    font-size: var(--small-font-size);
}

.footer__title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__link {
    transition: color 0.3s;
}

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

.footer__list--contacts li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer__list--contacts i {
    color: var(--accent-color);
    width: 20px;
    height: 20px;
}

/* ==================== MEDIA QUERIES ==================== */
@media screen and (max-width: 768px) {
    .header__nav {
        /* Mobile menu styles will be added here later */
        display: none;
    }

    .header__burger {
        display: block; /* Shown on mobile */
    }
    .header__burger span {
        display: block;
        width: 25px;
        height: 2px;
        background-color: var(--title-color);
        margin: 5px 0;
    }
    
    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer__column--logo {
        grid-row: 4 / 5; /* Move logo to the end on mobile */
    }

    .footer__list--contacts li {
        justify-content: center;
    }
}

@media screen and (min-width: 1140px) {
    :root {
        --h1-font-size: 3.5rem;
        --h2-font-size: 1.75rem;
        --normal-font-size: 1.125rem;
    }
}

/* ==================== HERO ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height); /* Offset for the fixed header */
}

.hero__container {
    max-width: 800px;
    text-align: left;
}

.hero__title {
    font-size: var(--h1-font-size);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    min-height: calc(var(--h1-font-size) * 1.2 * 2); /* Reserve space for 2 lines */
}

.hero__cursor {
    display: inline-block;
    background-color: var(--accent-color);
    width: 0.8rem;
    height: var(--h1-font-size);
    margin-left: 0.5rem;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero__subtitle {
    font-size: var(--normal-font-size);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero__cta {
    font-family: var(--title-font);
    font-size: var(--normal-font-size);
    display: inline-block;
    background-color: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 1rem 2rem;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.hero__cta:hover {
    background-color: rgba(100, 255, 218, 0.1);
}


/* Adjustments for Hero section in Media Queries */
@media screen and (max-width: 768px) {
    .hero {
        text-align: center;
    }
    .hero__container {
        text-align: left;
    }
    
    .hero__title {
        min-height: calc(var(--h1-font-size) * 1.2 * 3); /* Reserve space for more lines on mobile */
    }
    
    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }
}

@media screen and (min-width: 1140px) {
    .hero__cursor {
        height: var(--h1-font-size);
    }
}

.section-title {
    text-align: center;
    font-size: var(--h2-font-size);
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

/* ==================== STAGES ==================== */
.stages {
    padding: 5rem 0;
}

.stages__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.stages__card {
    background-color: var(--card-bg-color);
    padding: 2rem;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: transform 0.3s, border-color 0.3s;
}

.stages__card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
}

.stages__card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.stages__card-header i {
    width: 40px;
    height: 40px;
    color: var(--text-color);
    transition: color 0.3s;
}

.stages__card:hover .stages__card-header i {
    color: var(--accent-color);
}

.stages__card-number {
    font-family: var(--title-font);
    font-size: 1.5rem;
    color: rgba(204, 214, 246, 0.2);
}

.stages__card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--title-color);
    transition: color 0.3s;
}

.stages__card:hover .stages__card-title {
    color: var(--accent-color);
}

.stages__card-description {
    font-size: var(--small-font-size);
    line-height: 1.7;
}

.section-title--left {
    text-align: left;
}

.section-title--left::after {
    left: 0;
    transform: translateX(0);
}

/* ==================== TECHNOLOGIES ==================== */
.tech {
    padding: 5rem 0;
}

.tech__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.tech__description {
    margin-top: 1.5rem;
    max-width: 500px;
}

.tech__list {
    column-count: 2;
    column-gap: 2rem;
}

.tech__list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-family: var(--title-font);
}

.tech__list-item i {
    color: var(--accent-color);
    width: 20px;
    height: 20px;
}

/* Media Query for larger screens */
@media screen and (min-width: 768px) {
    .tech__container {
        grid-template-columns: repeat(2, 1fr);
        align-items: flex-start;
    }
}

@media screen and (max-width: 480px) {
    .tech__list {
        column-count: 1; /* Single column on very small screens */
    }
}

/* ==================== CASES ==================== */
.cases {
    padding: 5rem 0;
    background-color: var(--card-bg-color); /* A slightly different bg to stand out */
}

.cases__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.cases__card {
    background-color: var(--bg-color);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cases__card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.cases__card-image {
    overflow: hidden;
}

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

.cases__card:hover .cases__card-image img {
    transform: scale(1.05);
}

.cases__card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cases__card-title {
    font-size: 1.3rem;
    color: var(--title-color);
    margin-bottom: 0.75rem;
}

.cases__card-description {
    font-size: var(--small-font-size);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.cases__card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0;
}

.cases__card-tags li {
    font-family: var(--title-font);
    font-size: 0.75rem;
    background-color: var(--card-bg-color);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.cases__card-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--card-bg-color);
    padding-top: 1rem;
    margin-top: auto;
}

.cases__card-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.cases__card-link:hover {
    color: var(--accent-color);
}

.cases__card-link i {
    width: 18px;
    height: 18px;
}

/* ==================== BLOG ==================== */
.blog {
    padding: 5rem 0;
}

.blog__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.blog__card {
    background-color: var(--card-bg-color);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog__card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(100, 255, 218, 0.1);
}

.blog__card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

.blog__card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.blog__card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog__card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.blog__card-category {
    background-color: var(--accent-color);
    color: var(--bg-color);
    font-family: var(--title-font);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.blog__card-date {
    font-size: var(--small-font-size);
    color: var(--text-color);
}

.blog__card-title {
    font-size: 1.3rem;
    color: var(--title-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.3s;
}

.blog__card:hover .blog__card-title {
    color: var(--accent-color);
}

.blog__card-excerpt {
    font-size: var(--small-font-size);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog__card-readmore {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-top: auto;
}

.blog__card-readmore i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s;
}

.blog__card:hover .blog__card-readmore i {
    transform: translateX(5px);
}

/* ==================== CONTACT ==================== */
.contact {
    padding: 5rem 0;
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.contact__description {
    margin-top: 1.5rem;
    max-width: 500px;
}

.contact__form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.contact__form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact__form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--card-bg-color);
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--text-color);
    font-size: var(--normal-font-size);
    transition: border-color 0.3s;
}

.contact__form-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.contact__form-group--checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact__form-checkbox {
    width: 1.25em;
    height: 1.25em;
    accent-color: var(--accent-color);
}

.contact__form-checkbox-label {
    font-size: var(--small-font-size);
}
.contact__form-checkbox-label a {
    color: var(--accent-color);
    text-decoration: underline;
}

.contact__form-button {
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-color);
    border: none;
    border-radius: 4px;
    color: var(--bg-color);
    font-family: var(--title-font);
    font-size: var(--normal-font-size);
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact__form-button:hover {
    background-color: var(--accent-color-hover);
}

.contact__form-message {
    display: none; /* Hidden by default */
    padding: 1.5rem;
    border-radius: 6px;
    text-align: center;
}

.contact__form-message--visible {
    display: block;
}

.contact__form-message--success {
    background-color: rgba(100, 255, 218, 0.1);
    border: 1px solid var(--accent-color);
}
.contact__form-message--success .contact__form-message-title {
    color: var(--accent-color);
}

.contact__form-message--error {
    background-color: rgba(255, 100, 100, 0.1);
    border: 1px solid #ff6464;
    color: #ffcccc;
}

@media screen and (min-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr 1.2fr;
        align-items: center;
    }
}

/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--card-bg-color);
    border-top: 1px solid var(--accent-color);
    padding: 1rem;
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
}

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

.cookie-popup__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1120px;
    margin: 0 auto;
    gap: 1rem;
}

.cookie-popup__text {
    font-size: var(--small-font-size);
}

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

.cookie-popup__button {
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap; /* Prevent button text from wrapping */
    transition: background-color 0.3s;
}

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

@media screen and (max-width: 768px) {
    .cookie-popup__content {
        flex-direction: column;
        text-align: center;
    }
}

/* ==================== POLICY PAGES STYLES ==================== */
.pages {
    padding: calc(var(--header-height) + 3rem) 0 5rem;
}

.pages .container {
    max-width: 800px;
}

.pages h1 {
    font-size: var(--h1-font-size);
    margin-bottom: 2rem;
}

.pages h2 {
    font-size: var(--h2-font-size);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.pages p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.pages ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.pages li {
    margin-bottom: 0.5rem;
}

.pages a {
    color: var(--accent-color);
    text-decoration: underline;
    transition: color 0.3s;
}

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

.pages strong {
    color: var(--title-color);
    font-weight: 700;
}