/* ==================== GLOBAL STYLES & VARIABLES ==================== */
:root {
    --color-background: #0D1B2A;
    --color-surface: #1B263B;
    --color-primary: #00F5D4;
    --color-primary-hover: #00DFC2;
    --color-text-main: #E0E1DD;
    --color-text-secondary: #A9B4C2;
    --font-family-headings: 'Inter', sans-serif;
    --font-family-body: 'Roboto Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

ul {
    list-style: none;
}

/* ==================== HEADER ==================== */
.header {
    padding: 20px 0;
    background-color: rgba(13, 27, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-surface);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

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

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

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

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

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

.header__nav-link {
    font-family: var(--font-family-headings);
    font-size: 16px;
    font-weight: 600;
}

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

.header__nav-link--cta:hover {
    background-color: var(--color-primary-hover);
    color: var(--color-background);
}

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

/* Desktop styles for header */
@media (min-width: 768px) {
    .header__nav {
        display: block;
    }
    .header__mobile-menu-button {
        display: none;
    }
}

/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--color-surface);
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 80px; /* To be adjusted based on content */
}

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

.footer__column--logo {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer__logo {
    font-family: var(--font-family-headings);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-main);
}

.footer__copyright {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.footer__title {
    font-family: var(--font-family-headings);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-text-main);
}

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

.footer__list--contacts li {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.footer__address {
    color: var(--color-text-secondary);
    align-items: flex-start; /* For multiline text alignment */
}


/* Desktop styles for footer */
@media (min-width: 768px) {
    .footer__container {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

/* ==================== HERO ==================== */
.hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding-top: 120px; /* Header height + extra space */
    padding-bottom: 60px;
}

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

.hero__title {
    font-family: var(--font-family-headings);
    font-size: clamp(2.5rem, 6vw, 4rem); /* Responsive font size */
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-text-main);
}

.hero__description {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 550px;
    margin-bottom: 40px;
}

.hero__cta-button {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-background);
    padding: 14px 28px;
    border-radius: 8px;
    font-family: var(--font-family-headings);
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.hero__cta-button:hover {
    background-color: var(--color-primary-hover);
    color: var(--color-background);
    transform: translateY(-3px);
}

.hero__animation-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__animation-window {
    width: 100%;
    max-width: 480px;
    background-color: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero__animation-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero__animation-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #4A5568;
}

.hero__animation-dot:nth-child(2) { background-color: #A0AEC0; }
.hero__animation-dot:nth-child(3) { background-color: #718096; }

.hero__animation-body {
    padding: 20px;
    font-family: var(--font-family-body);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.hero__animation-prompt {
    color: var(--color-primary);
    margin-right: 10px;
}

.hero__animation-cursor {
    display: inline-block;
    width: 10px;
    height: 1.2rem;
    background-color: var(--color-primary);
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Desktop layout for hero */
@media (min-width: 992px) {
    .hero__container {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==================== PROCESS ==================== */
.process {
    padding: 80px 0;
    background-color: var(--color-background); /* Or a slightly different shade if needed */
}

.process__title {
    font-family: var(--font-family-headings);
    font-size: clamp(2rem, 5vw, 2.5rem);
    text-align: center;
    margin-bottom: 15px;
}

.process__subtitle {
    text-align: center;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto 60px;
}

.process__timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

/* The vertical line in the middle */
.process__timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--color-surface);
    top: 0;
    bottom: 0;
    left: 25px; /* On mobile, line is on the left */
}

.process__item {
    padding: 10px 0 30px 60px; /* Space for the line and icon */
    position: relative;
}

.process__item:last-child {
    padding-bottom: 0;
}

.process__item-icon-wrapper {
    position: absolute;
    left: 0;
    top: 10px;
    width: 53px; /* Aligns with the line's center */
    height: 53px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-primary);
    border-radius: 50%;
    z-index: 1;
    border: 4px solid var(--color-surface);
}

.process__item-icon {
    width: 24px;
    height: 24px;
    color: var(--color-background);
}

.process__item-content {
    background-color: var(--color-surface);
    padding: 20px 25px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.process__item-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.process__item-step {
    font-family: var(--font-family-body);
    font-size: 0.9rem;
    color: var(--color-primary);
    margin-bottom: 5px;
    display: block;
}

.process__item-title {
    font-family: var(--font-family-headings);
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--color-text-main);
}

.process__item-description {
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* Desktop styles for process timeline */
@media (min-width: 768px) {
    .process__timeline::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .process__item {
        width: 50%;
        padding-left: 0;
        padding-right: 45px;
        left: 0;
    }

    /* Even items on the right */
    .process__item:nth-child(even) {
        left: 50%;
        padding-left: 45px;
        padding-right: 0;
    }
    
    .process__item-icon-wrapper {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ==================== BOTS TYPES ==================== */
.bots {
    padding: 80px 0;
}

.bots__header {
    text-align: center;
    margin-bottom: 60px;
}

.bots__title {
    font-family: var(--font-family-headings);
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 15px;
}

.bots__subtitle {
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.bots__tabs-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.bots__tabs-nav {
    display: flex;
    flex-direction: row; /* Horizontal on mobile */
    gap: 10px;
    overflow-x: auto; /* For small screens */
    padding-bottom: 10px; /* Space for scrollbar */
}

.bots__tab-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    font-family: var(--font-family-headings);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    background-color: transparent;
    border: 2px solid var(--color-surface);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0; /* Prevent buttons from shrinking */
    text-align: left;
}

.bots__tab-button:hover {
    background-color: var(--color-surface);
    color: var(--color-text-main);
}

.bots__tab-button--active {
    background-color: var(--color-surface);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.bots__tab-icon {
    width: 20px;
    height: 20px;
}

.bots__tabs-content {
    background-color: var(--color-surface);
    border-radius: 8px;
    padding: 30px;
    min-height: 350px;
}

.bots__tab-panel {
    display: none; /* Hidden by default */
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.bots__tab-panel--active {
    display: block; /* Shown when active */
    opacity: 1;
}

.bots__tab-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 20px;
}

.bots__tab-title {
    font-family: var(--font-family-headings);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.bots__tab-description {
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.bots__tab-features {
    list-style: none;
    padding-left: 0;
}

.bots__tab-features li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
    color: var(--color-text-main);
}

.bots__tab-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}


/* Desktop layout for tabs */
@media (min-width: 992px) {
    .bots__tabs-layout {
        flex-direction: row;
        gap: 40px;
    }
    
    .bots__tabs-nav {
        flex-direction: column;
        flex-shrink: 0;
        width: 280px;
        overflow-x: visible;
        padding-bottom: 0;
    }
    
    .bots__tabs-content {
        width: 100%;
        padding: 40px;
    }
    
    .bots__tab-panel {
        display: none; /* Overriding for JS control */
        flex-direction: row;
        gap: 30px;
        align-items: flex-start;
    }

    .bots__tab-panel--active {
        display: flex;
    }
    
    .bots__tab-image {
        width: 250px;
        height: auto;
        flex-shrink: 0;
        margin-bottom: 0;
    }
}

/* ==================== STACK ==================== */
.stack {
    padding: 80px 0;
    background-color: var(--color-surface); /* A slightly different background */
}

.stack__header {
    text-align: center;
    margin-bottom: 60px;
}

.stack__title {
    font-family: var(--font-family-headings);
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 15px;
}

.stack__subtitle {
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.stack__grid {
    display: grid;
    /* This creates a responsive grid that fits as many items as possible */
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.stack__item {
    background-color: var(--color-background);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.stack__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--color-primary);
}

.stack__icon {
    width: 48px;
    height: 48px;
    color: var(--color-primary);
}

.stack__name {
    font-family: var(--font-family-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-main);
}

@media (min-width: 768px) {
    .stack__grid {
        gap: 25px;
    }
}

/* ==================== CASES ==================== */
.cases {
    padding: 80px 0;
}

.cases__header {
    text-align: center;
    margin-bottom: 60px;
}

.cases__title {
    font-family: var(--font-family-headings);
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 15px;
}

.cases__subtitle {
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

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

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

.cases__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    border-color: var(--color-primary);
}

.cases__item-image-wrapper {
    overflow: hidden;
    height: 220px;
}

.cases__item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-out;
}

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

.cases__item-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Makes content fill the space */
}

.cases__item-title {
    font-family: var(--font-family-headings);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.cases__item-description {
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.cases__item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto; /* Pushes tags to the bottom */
}

.cases__item-tag {
    background-color: var(--color-background);
    color: var(--color-primary);
    padding: 5px 12px;
    border-radius: 15px;
    font-family: var(--font-family-body);
    font-size: 0.8rem;
    font-weight: 500;
}


/* Desktop layout for cases */
@media (min-width: 768px) {
    .cases__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ==================== CONTACT ==================== */
.contact {
    padding: 80px 0;
    background-color: var(--color-surface);
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.contact__title {
    font-family: var(--font-family-headings);
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 20px;
}

.contact__description {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 500px;
}

.contact__form-group {
    margin-bottom: 20px;
}

.contact__label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

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

.contact__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.2);
}

.contact__captcha {
    margin-top: 30px;
}

.contact__checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact__checkbox {
    margin-top: 5px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.contact__checkbox-label {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

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

.contact__submit-button {
    width: 100%;
    padding: 14px 28px;
    background-color: var(--color-primary);
    color: var(--color-background);
    border: none;
    border-radius: 8px;
    font-family: var(--font-family-headings);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.contact__submit-button:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-3px);
}

.contact__submit-button:disabled {
    background-color: #A0AEC0;
    cursor: not-allowed;
}

.contact__success-message {
    display: none; /* Hidden by default */
    padding: 20px;
    background-color: var(--color-background);
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.contact__success-message.show {
    display: block;
    opacity: 1;
}

.contact__success-icon {
    color: var(--color-primary);
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
}

/* Desktop layout */
@media (min-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        align-items: center;
    }
}

/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-surface);
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2000;
    transform: translateY(100%); /* Initially hidden */
    transition: transform 0.5s ease-in-out;
}

.cookie-popup.show {
    transform: translateY(0); /* Becomes visible */
}

.cookie-popup__container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

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

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

.cookie-popup__button {
    background-color: var(--color-primary);
    color: var(--color-background);
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-family-headings);
    font-weight: 600;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

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

@media (min-width: 768px) {
    .cookie-popup__container {
        flex-direction: row;
    }
    .cookie-popup__text {
        text-align: left;
    }
}

/* ==================== POLICY PAGES ==================== */
.pages {
    padding: 140px 0 80px; /* Extra top padding for fixed header */
}

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

.pages h1,
.pages h2 {
    font-family: var(--font-family-headings);
    color: var(--color-text-main);
    margin-bottom: 20px;
}

.pages h1 {
    font-size: clamp(2.2rem, 5vw, 3rem);
    border-bottom: 2px solid var(--color-surface);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.pages h2 {
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    margin-top: 40px;
}

.pages p {
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.pages ul,
.pages ol {
    color: var(--color-text-secondary);
    padding-left: 25px;
    margin-bottom: 20px;
}

.pages li {
    margin-bottom: 10px;
    line-height: 1.8;
}

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

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

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