/* 
   AssistNow Landing Page Styles 
   Style: Industrial Tech / Minimalist
*/

:root {
    /* Colors */
    --color-bg: #FFFFFF;
    --color-bg-alt: #F9FAFB; /* Cool Gray 50 */
    --color-text-main: #111827; /* Cool Gray 900 */
    --color-text-secondary: #4B5563; /* Cool Gray 600 */
    --color-primary: #2563EB; /* Royal Blue */
    --color-primary-hover: #1D4ED8;
    --color-border: #E5E7EB; /* Cool Gray 200 */
    
    /* Fonts */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --container-width: 1200px;
    --spacing-xs: 0.5rem;   /* 8px */
    --spacing-sm: 1rem;     /* 16px */
    --spacing-md: 2rem;     /* 32px */
    --spacing-lg: 4rem;     /* 64px */
    --spacing-xl: 6rem;     /* 96px */
    
    /* UI Elements */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition-fast: 0.3s ease;
    --header-height: 70px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: var(--header-height); /* Prevent content jump */
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--color-text-main);
    margin-bottom: var(--spacing-sm);
}

p {
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

img, svg {
    display: block;
    max-width: 100%;
}

/* --- Utilities --- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.code-font {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid--2-cols-auto {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

/* --- Components --- */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1rem;
    white-space: nowrap;
}

.btn--primary {
    background-color: var(--color-primary);
    color: white;
    border: 1px solid transparent;
}

.btn--primary:hover {
    background-color: var(--color-primary-hover);
}

.btn--outline {
    background-color: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
}

.btn--outline:hover {
    border-color: var(--color-text-secondary);
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn--lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn--full {
    width: 100%;
}

/* Cards */
.card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary);
}

.card__icon {
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.card__visual-small {
    margin-bottom: var(--spacing-md);
    height: 180px; /* Increased height significantly */
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.card__visual-small picture {
    display: flex;
    width: 100%;
    height: 100%;
}

.card__visual-small picture > img {
    width: 100%;
    height: 100%;
}

.feature-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Show the full illustration */
    transition: transform 0.5s ease;
    padding: var(--spacing-sm);
}

.card:hover .feature-image {
    transform: scale(1.05);
}

.card__title {
    margin-bottom: var(--spacing-xs);
    font-size: 1.25rem;
}

.card__text {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Browser Mockup */
.browser-mockup {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.browser-mockup__header {
    background: var(--color-bg-alt);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #D1D5DB;
}

.dot.red { background-color: #EF4444; }
.dot.yellow { background-color: #F59E0B; }
.dot.green { background-color: #10B981; }

.browser-mockup__content {
    background: #F3F4F6;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.browser-mockup__content.no-padding {
    padding: 0;
    background: white;
}

.browser-mockup__content:has(img) {
    padding: 0;
    background: white;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: auto;
}

.browser-mockup__image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: top left;
}

.mockup-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.placeholder-image {
    background-image: radial-gradient(#E5E7EB 1px, transparent 1px);
    background-size: 20px 20px;
}
.placeholder-icon {
    margin-top: 1rem;
    color: #9CA3AF;
}

/* --- Header & Nav --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
}

.header__container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-text-main);
    z-index: 1001; /* Above mobile menu */
}

/* Desktop Nav */
.desktop-nav {
    display: flex;
}

.nav__list {
    display: flex;
    gap: var(--spacing-md);
}

.nav__link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.nav__link:hover {
    color: var(--color-primary);
}

.header__actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Mobile Nav Elements */
.burger-btn {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1002; /* Topmost */
    padding: 0;
}

.burger-line {
    width: 100%;
    height: 2px;
    background-color: var(--color-text-main);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Burger Animation State */
body.menu-open .burger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
body.menu-open .burger-line:nth-child(2) {
    opacity: 0;
}
body.menu-open .burger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-bg);
    z-index: 999;
    padding-top: var(--header-height);
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu__container {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.mobile-menu__list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.mobile-menu__link {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-main);
}

/* --- Sections --- */

.section {
    padding: var(--spacing-xl) 0;
}

.section__header {
    max-width: 800px;
    margin-bottom: var(--spacing-lg);
}

.section__title {
    font-size: 2rem;
}

.section__title--center {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section__description {
    font-size: 1.125rem;
    max-width: 700px;
}

.bg-light {
    background-color: var(--color-bg-alt);
}

/* Hero */
.hero {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-xl);
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Give more space to visual */
    gap: var(--spacing-lg);
    align-items: center;
}

.hero__title {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
}

.hero__subtitle {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
    max-width: 500px;
}

.hero__visual {
    position: relative;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
}

/* Custom Dev */
.custom-dev-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

/* Products */
.product-blocks {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.product-block__title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--spacing-xs);
    display: inline-block;
}

.product-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.product-card__content {
    padding: 2.5rem;
    flex: 1;
}

.product-card__visual {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    padding: 1.5rem 2.5rem 2.5rem;
    display: flex;
    align-items: flex-start;
}

.product-card .browser-mockup {
    border: 1px solid var(--color-border);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    height: auto;
    width: 100%;
    box-shadow: var(--shadow-sm);
}

.product-card--wide {
    flex-direction: row;
}

.product-card--wide .product-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-card--wide .product-card__visual {
    flex: 1;
    border-top: none;
    border-left: 1px solid var(--color-border);
    height: auto;
    min-height: 350px;
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card--wide .browser-mockup {
    border-radius: var(--radius-md);
    width: 100%;
    box-shadow: var(--shadow-sm);
}

/* Product visuals: plain image (no browser chrome) */
.product-card__visual .product-card__image {
    width: 100%;
    height: auto;
    /* по ширине помещается полностью; кропа нет */
    display: block;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    color: var(--color-primary);
    font-weight: 500;
    margin-top: var(--spacing-sm);
}

.link-arrow:hover .arrow {
    transform: translateX(4px);
}

.arrow {
    transition: transform var(--transition-fast);
    margin-left: 4px;
}

/* Custom Dev */
.feature-list {
    margin-top: var(--spacing-md);
}

.feature-list__item {
    margin-bottom: var(--spacing-sm);
    padding-left: 1.5rem;
    position: relative;
}

.feature-list__item::before {
    content: "•";
    color: var(--color-primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Labs Section Styles */
.labs-badge {
    display: inline-block;
    background: #f0f9ff;
    color: var(--color-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.link-underline {
    text-decoration: underline;
}

/* Tech Stack */
.tech-stack {
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--color-border);
}

.tech-stack__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
    color: var(--color-text-secondary);
}

.tech-stack__separator {
    color: var(--color-border);
}

/* Footer */
.footer {
    padding: var(--spacing-xl) 0 var(--spacing-md);
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.footer__cta {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.footer__title {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.footer__text {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
}

.footer__bottom {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.footer__links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer__links a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    /* Nav Changes */
    .desktop-nav {
        display: none;
    }

    .burger-btn {
        display: flex;
    }

    .desktop-only {
        display: none;
    }

    /* Hero */
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__visual {
        margin-top: var(--spacing-md);
    }
    
    .grid--2, .grid--3, .grid--2-cols-auto {
        grid-template-columns: 1fr;
    }
    
    .product-card--wide {
        flex-direction: column;
    }
    
    .product-card--wide .product-card__visual {
        border-left: none;
        border-top: 1px solid var(--color-border);
        height: 250px;
        padding: 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .product-card__content,
    .product-card--wide .product-card__content {
        padding: 1.5rem;
    }

    .product-card--wide .browser-mockup {
        border-radius: var(--radius-md);
    }
    
    .custom-dev__visual {
        order: -1; /* Image on top on mobile */
    }
}

@media (max-width: 600px) {
    .section__title {
        font-size: 1.75rem;
    }
    
    .hero__title {
        font-size: 2rem;
    }
}

/* --- Animation Classes (for JS) --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Lightbox --- */
.gallery-trigger {
    cursor: zoom-in;
    transition: opacity var(--transition-fast);
}

.gallery-trigger:hover {
    opacity: 0.9;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 24, 39, 0.95); /* Deep dark gray from --color-text-main */
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
    position: fixed;
    background: transparent;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: var(--spacing-sm);
    transition: transform var(--transition-fast), color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
    pointer-events: auto;
}

.lightbox__close {
    top: 20px;
    right: 20px;
    font-size: 3rem;
    line-height: 1;
}

.lightbox__prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
    color: var(--color-primary);
    transform: scale(1.1);
}

.lightbox__prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox__next:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox__content {
    position: relative;
    width: 100%;
    max-width: 95vw;
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.lightbox__mockup {
    width: auto;
    height: auto;
    max-width: 100%;
    flex: 0 1 auto;
    background: white;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.4));
    border: none;
}

.lightbox__mockup .browser-mockup__header {
    background: #F3F4F6;
    display: flex;
    gap: 6px;
    padding: 0.75rem 1rem;
    flex-shrink: 0;
}

.lightbox__mockup .browser-mockup__content {
    overflow: hidden;
    background: white;
    display: block;
    padding: 0;
    min-height: 0;
}

.lightbox__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    /* Ограничиваем высоту, чтобы влезало в экран вместе с шапкой (90vh - хедер ~50px) */
    max-height: calc(85vh - 60px);
    object-fit: contain;
}

.lightbox__pagination {
    pointer-events: auto;
    margin-top: var(--spacing-md);
    flex-shrink: 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.lightbox__dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: white;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.lightbox__dot:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
}

.lightbox__dot.active {
    background: white;
    color: var(--color-text-main);
    border-color: white;
    font-weight: 600;
}

/* Lightbox Responsive */
@media (max-width: 1100px) {
    /* Стили для кнопок теперь заданы через fixed выше, корректировки не требуются или минимальны */
}

@media (max-width: 600px) {
    .lightbox__prev, .lightbox__next {
        font-size: 2rem;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        /* Немного смещаем, чтобы не наезжали на контент слишком сильно */
        left: 10px; 
    }
    
    .lightbox__next {
        left: auto;
        right: 10px;
    }

    .lightbox__close {
        top: 10px;
        right: 10px;
    }
}

/* --- Cookie consent --- */
.cookie-consent {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    max-width: min(560px, calc(100vw - 32px));
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    padding: 14px 16px;
}

.cookie-consent__content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cookie-consent__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--color-text-secondary);
}

.cookie-consent__link {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-consent__button {
    flex-shrink: 0;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-primary);
    background: var(--color-primary);
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.cookie-consent__button:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

@media (max-width: 640px) {
    .cookie-consent__content {
        flex-direction: column;
        align-items: stretch;
    }
    .cookie-consent__button {
        width: 100%;
    }
}
