/* ------------------- */
/* GLOBAL STYLES       */
/* ------------------- */
:root {
    --bg-color: #111318;
    --surface-color: #1A1D23;
    --primary-text-color: #EAEAEA;
    --secondary-text-color: #8A94A7;
    --accent-color: #00F5A0;
    --accent-hover-color: #00E090;

    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Space Grotesk', sans-serif;
}

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

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

body.no-scroll {
    overflow: hidden;
}

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

h1, h2, h3, h4 {
    font-family: var(--font-secondary);
    font-weight: 500;
    color: var(--primary-text-color);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* ------------------- */
/* HEADER              */
/* ------------------- */
.header {
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(17, 19, 24, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(138, 148, 167, 0.1);
}

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

.header__logo {
    font-family: var(--font-secondary);
    font-size: 22px;
    font-weight: 700;
}

.header__burger-btn {
    display: none;
    background: none;
    border: none;
    color: var(--primary-text-color);
    cursor: pointer;
    z-index: 1001;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .header__burger-btn {
        display: block;
    }

    .header__nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-color);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    }

    .header__nav--open {
        left: 0;
    }

    .header__nav-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .header__nav-link {
        font-family: var(--font-secondary);
        font-size: 28px;
        font-weight: 500;
    }
    
    .header__nav-close {
        position: absolute;
        top: 25px;
        right: 20px;
        background: none;
        border: none;
        color: var(--primary-text-color);
        cursor: pointer;
    }
}

/* Desktop Navigation */
@media (min-width: 769px) {
    .header__nav-list {
        display: flex;
        align-items: center;
        gap: 30px;
    }
    .header__nav-close {
        display: none;
    }
    .header__nav-link {
        position: relative;
        font-size: 16px;
        color: var(--secondary-text-color);
    }
    .header__nav-link:hover {
        color: var(--primary-text-color);
    }
    .header__nav-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: -4px;
        left: 50%;
        transform: translateX(-50%);
        background-color: var(--accent-color);
        transition: width 0.3s ease;
    }
    .header__nav-link:hover::after {
        width: 100%;
    }
}

/* ------------------- */
/* FOOTER              */
/* ------------------- */
.footer {
    padding: 60px 0 30px;
    background-color: var(--surface-color);
    border-top: 1px solid rgba(138, 148, 167, 0.1);
}

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

.footer__logo {
    font-family: var(--font-secondary);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    display: inline-block;
}

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

.footer__title {
    font-size: 18px;
    margin-bottom: 20px;
}

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

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

.footer__icon {
    flex-shrink: 0;
    margin-top: 3px;
    width: 16px;
    height: 16px;
    color: var(--secondary-text-color);
}

.footer__link {
    color: var(--secondary-text-color);
    font-size: 15px;
}
.footer__link:hover {
    color: var(--accent-color);
}

.footer__bottom {
    border-top: 1px solid rgba(138, 148, 167, 0.1);
    padding-top: 30px;
    text-align: center;
    color: var(--secondary-text-color);
    font-size: 14px;
}

/* Footer Responsive */
@media (max-width: 992px) {
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .footer__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ------------------- */
/* REUSABLE COMPONENTS */
/* ------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    font-family: var(--font-secondary);
    font-weight: 500;
    font-size: 16px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

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

.btn__text {
    transition: transform 0.3s ease;
}

.btn__icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn:hover .btn__text {
    transform: translateX(-5px);
}
.btn:hover .btn__icon {
    transform: translateX(5px);
}

/* ------------------- */
/* HERO SECTION        */
/* ------------------- */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding-top: 80px; /* Header height */
    overflow: hidden;
}

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

.hero__container {
    position: relative;
    z-index: 2;
    display: grid;
    align-items: center;
    gap: 40px;
}

.hero__title {
    font-size: clamp(2.5rem, 5vw, 4rem); /* Responsive font size */
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    min-height: 140px; /* Reserve space to prevent layout shift */
}

/* Blinking cursor effect for typewriter */
.hero__title::after {
    content: '_';
    font-weight: 700;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { color: transparent }
    50% { color: var(--accent-color); }
}

.hero__subtitle {
    font-size: 1.1rem;
    color: var(--secondary-text-color);
    max-width: 550px;
    line-height: 1.7;
    margin-bottom: 40px;
    min-height: 80px; /* Reserve space */
}

.hero__cta-wrapper {
    opacity: 0;
    transform: translateY(20px);
    animation-fill-mode: forwards;
}

.hero__cta-wrapper.visible {
    animation: fadeIn 0.5s 0.2s forwards;
}

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

.hero__image-wrapper {
    border: 1px solid rgba(138, 148, 167, 0.2);
    padding: 15px;
    border-radius: 8px;
    background-color: rgba(26, 29, 35, 0.5);
    transform: translateY(20px);
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero__image-wrapper.visible {
     animation: fadeIn 0.8s 0.5s forwards;
}

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

.hero__img {
    width: 100%;
    max-width: 450px;
    height: auto;
    display: block;
    border-radius: 4px;
}


/* Hero Responsive */
@media (min-width: 992px) {
    .hero__container {
        grid-template-columns: 1fr 1fr;
    }
     .hero__title {
        min-height: 190px;
    }
}

@media (max-width: 991px) {
    .hero {
        text-align: center;
    }
    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .hero__visual {
        margin-top: 40px;
    }
}

/* ------------------- */
/* POSTS SECTION       */
/* ------------------- */
.posts {
    padding: 100px 0;
}

.posts__header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.posts__title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 15px;
}

.posts__subtitle {
    font-size: 1.1rem;
    color: var(--secondary-text-color);
    line-height: 1.7;
}

.posts__grid {
    display: grid;
    gap: 30px;
}

/* Post Card */
.post-card {
    background-color: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(138, 148, 167, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.post-card__link-wrapper {
    display: block;
    color: inherit;
    text-decoration: none;
}

.post-card__image-wrapper {
    overflow: hidden;
    height: 220px;
}

.post-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.post-card__content {
    padding: 25px;
}

.post-card__category {
    display: inline-block;
    padding: 4px 10px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    margin-bottom: 15px;
    font-family: var(--font-secondary);
}

.post-card__title {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 20px;
    color: var(--primary-text-color);
    transition: color 0.3s ease;
}

.post-card:hover .post-card__title {
    color: var(--accent-color);
}

.post-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--secondary-text-color);
}

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

.post-card__author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(138, 148, 167, 0.2);
}

/* Posts Responsive */
@media (min-width: 576px) {
    .posts__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

@media (max-width: 575px) {
    .posts__grid {
        grid-template-columns: 1fr;
    }
}

/* ------------------- */
/* CAREER SECTION      */
/* ------------------- */
.career-section {
    padding: 100px 0;
    background-color: var(--surface-color);
}

.career-section__layout {
    display: grid;
    gap: 60px;
    align-items: center;
}

.career-section__title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.career-section__description {
    font-size: 1.1rem;
    color: var(--secondary-text-color);
    line-height: 1.7;
    margin-bottom: 40px;
}

.career-section__features {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    /* For animation */
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.feature-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.feature-item__icon-wrapper {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: rgba(0, 245, 160, 0.1);
}

.feature-item__icon {
    width: 24px;
    height: 24px;
    color: var(--accent-color);
}

.feature-item__title {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.feature-item__description {
    color: var(--secondary-text-color);
    line-height: 1.6;
}

/* Career Section Responsive */
@media (min-width: 992px) {
    .career-section__layout {
        grid-template-columns: 1fr 1fr;
    }
}

/* ------------------- */
/* TOOLS SECTION       */
/* ------------------- */
.tools-section {
    padding: 100px 0;
    background-color: var(--bg-color); /* Back to main bg */
}

.tools-section__header {
    text-align: center;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.tools-section__title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 15px;
}

.tools-section__subtitle {
    font-size: 1.1rem;
    color: var(--secondary-text-color);
    line-height: 1.7;
}

.tools-section__switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
}

.tools-section__switcher-btn {
    padding: 8px 20px;
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 16px;
    background-color: var(--surface-color);
    color: var(--secondary-text-color);
    border: 1px solid rgba(138, 148, 167, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tools-section__switcher-btn:hover {
    color: var(--primary-text-color);
    border-color: var(--accent-color);
}

.tools-section__switcher-btn.active {
    background-color: var(--accent-color);
    color: var(--bg-color);
    border-color: var(--accent-color);
}

.tools-section__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.tool-card {
    background-color: var(--surface-color);
    border: 1px solid rgba(138, 148, 167, 0.1);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.tool-card.hidden {
    opacity: 0;
    transform: scale(0.9);
    /* To remove it from layout after transition */
    transition-duration: 0.3s;
    pointer-events: none;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    border: none;
}

.tool-card__logo-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background-color: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.tool-card__logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tool-card__name {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    color: var(--primary-text-color);
    margin-bottom: 5px;
}

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

/* ------------------- */
/* CONTACT SECTION     */
/* ------------------- */
.contact-section {
    padding: 100px 0;
    background-color: var(--surface-color);
}

.contact-section__layout {
    display: grid;
    gap: 60px;
    align-items: flex-start;
}

.contact-section__title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.contact-section__description {
    font-size: 1.1rem;
    color: var(--secondary-text-color);
    line-height: 1.7;
    margin-bottom: 40px;
}

.contact-section__details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-section__detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    color: var(--primary-text-color);
}

.contact-section__detail-item a:hover {
    color: var(--accent-color);
}

.contact-section__icon {
    width: 22px;
    height: 22px;
    color: var(--accent-color);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--secondary-text-color);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--bg-color);
    border: 1px solid rgba(138, 148, 167, 0.2);
    border-radius: 6px;
    color: var(--primary-text-color);
    font-size: 16px;
    font-family: var(--font-primary);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 245, 160, 0.2);
}

.form-textarea {
    resize: vertical;
}

.form-captcha-question {
    font-weight: 500;
    color: var(--primary-text-color);
}

.contact-form__submit {
    width: 100%;
}
.contact-form__submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-status {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    display: none; /* Hidden by default */
}
.form-status--success {
    display: block;
    background-color: rgba(0, 245, 160, 0.1);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}
.form-status--error {
    display: block;
    background-color: rgba(255, 82, 82, 0.1);
    border: 1px solid #FF5252;
    color: #FF5252;
}


/* Contact Section Responsive */
@media (min-width: 992px) {
    .contact-section__layout {
        grid-template-columns: 1fr 1fr;
    }
}

/* ------------------- */
/* COOKIE POPUP        */
/* ------------------- */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 450px;
    background-color: var(--surface-color);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(138, 148, 167, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 2000;
    transform: translateY(200%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.5s ease;
}

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

.cookie-popup__text {
    font-size: 14px;
    color: var(--secondary-text-color);
    line-height: 1.5;
}

.cookie-popup__link {
    color: var(--primary-text-color);
    text-decoration: underline;
}
.cookie-popup__link:hover {
    color: var(--accent-color);
}

.cookie-popup__btn {
    flex-shrink: 0;
    padding: 8px 16px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}
.cookie-popup__btn:hover {
    background-color: var(--accent-hover-color);
}

@media (max-width: 500px) {
    .cookie-popup {
        flex-direction: column;
        text-align: center;
    }
}


/* ------------------- */
/* GENERIC PAGES (privacy, terms, etc.) */
/* ------------------- */
.pages {
    padding: 140px 0 80px; /* Top padding to clear fixed header */
}

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

.pages h1 {
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 30px;
}

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

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

.pages a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

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

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

.pages li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--secondary-text-color);
    margin-bottom: 10px;
}

.pages strong {
    color: var(--primary-text-color);
    font-weight: 500;
}