/* Landing page — Remote Scanner. Адаптивный дизайн. */
:root {
    --primary: #EA580C;
    --primary-light: #FB923C;
    --primary-dark: #C2410C;
    --page-bg: #FAFAF9;
    --card-bg: #fff;
    --text: #1C1917;
    --text-muted: #57534E;
    --border: #E7E5E4;
    --link: #EA580C;
    --link-hover: #C2410C;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Open Sans', 'Segoe UI', system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--page-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Header */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.logo-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.15rem;
}

.logo-brand:hover {
    text-decoration: none;
    color: var(--primary);
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.logo-img-header {
    display: block;
    flex-shrink: 0;
}

.brand-name {
    white-space: nowrap;
}

/* CTA banners */
.banner-cta {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
    color: #fff !important;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    border: 1px solid var(--primary-dark);
}

.banner-cta:hover {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    text-decoration: none;
    color: #fff;
    transform: translateY(-1px);
}

.banner-cta-header {
    font-size: 0.9rem;
}

.banner-cta-hero {
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    margin-top: 0.5rem;
    justify-self: center;
    grid-column: 1;
}

.banner-cta-footer {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    margin-bottom: 1.5rem;
}

/* Main */
main {
    flex: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1rem 2rem;
    width: 100%;
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: center;
    padding: 2rem 0;
}

.hero-inner h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    color: var(--text);
}

.hero-tagline {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.hero-desc-wrap {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .hero-desc-wrap {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .hero-desc-wrap .hero-visual {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
}

.hero-desc-wrap .hero-desc {
    flex: 1;
    min-width: 0;
    margin: 0;
}

.hero-desc {
    color: var(--text-muted);
    max-width: 560px;
}

.hero-desc-wrap .hero-visual {
    flex-shrink: 0;
    margin-left: auto;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    color: inherit;
}

.hero-icon {
    max-width: 160px;
    height: auto;
}

/* Sections */
section {
    margin-bottom: 2.5rem;
}

section h2 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    color: var(--text);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.35rem;
    display: inline-block;
}

/* Benefits */
.benefits-list {
    margin: 0;
    padding-left: 1.25rem;
    list-style: disc;
}

.benefits-list li {
    margin-bottom: 0.6rem;
    color: var(--text);
}

/* Steps */
.steps-list {
    margin: 0;
    padding-left: 1.5rem;
    list-style: decimal;
}

.steps-list li {
    margin-bottom: 1rem;
    color: var(--text);
}

.steps-list li strong {
    color: var(--text);
}

/* Diagram */
.diagram-svg-wrap {
    overflow: auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
}

.diagram-svg {
    display: block;
    width: 100%;
    min-width: 320px;
    height: auto;
    max-height: 360px;
}

@media (min-width: 600px) {
    .diagram-svg {
        min-width: 600px;
    }
}

/* Downloads */
.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    align-items: flex-start;
}

.download-windows-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.download-windows-stack > a {
    width: 100%;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    background: var(--card-bg);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    min-width: 260px;
    min-height: 3rem;
    height: 3rem;
    box-sizing: border-box;
    white-space: nowrap;
}

.btn-download-googleplay img {
    display: block;
    max-height: 2.4rem;
    width: auto;
}

.google-play-banner {
    display: none;
}

.google-play-banner:hover {
    text-decoration: none;
}

.google-play-banner img {
    display: block;
    max-width: 260px;
    width: auto;
    height: 100%;
    object-fit: contain;
}

.btn-download:hover {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
}

.btn-download-android {
    border-color: #3DDC84;
    color: #2E7D32;
}

.btn-download-android:hover {
    background: #3DDC84;
    color: #fff;
}

.btn-download-browser {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-download-browser:hover {
    background: var(--primary);
    color: #fff;
}

.download-android-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 480px) {
    .download-android-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (min-width: 900px) {
    .download-buttons {
        flex-wrap: nowrap;
    }
}

.download-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* Footer */
.site-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 2rem 1rem 1.5rem;
    text-align: center;
}

.banner-cta-footer {
    display: inline-block;
}

.footer-linecode {
    margin-top: 1rem;
}

.linecode-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
}

.linecode-link:hover {
    color: var(--primary);
    text-decoration: none;
}

.linecode-link img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.footer-contact {
    margin: 0.75rem 0 0.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-contact a {
    font-weight: 600;
}

.footer-copy {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive: wider screens */
@media (min-width: 768px) {
    .hero {
        grid-template-columns: 1fr auto;
        padding: 2.5rem 0;
    }

    .hero-visual {
        justify-content: flex-end;
    }

    .site-header .header-inner {
        padding: 0 0.5rem;
    }

    main {
        padding: 2rem 1.5rem 3rem;
    }
}

@media (min-width: 900px) {
    .diagram-svg {
        min-width: 800px;
    }
}


.article-hero-image { width: 100%; max-width: 900px; margin: 0 auto 2rem; display: block; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

/* Screenshots Section */
.screenshots {
    text-align: center;
}

.screenshots h2 {
    display: block;
    text-align: center;
}

.screenshots-desc {
    color: var(--text-muted);
    margin: -0.5rem 0 1.5rem;
    font-size: 1rem;
}

.screenshots-gallery {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.screenshot-row {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.screenshot-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.75rem;
}

.screenshots-mobile-stack {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    justify-content: center;
}

.screenshot-img {
    width: 30%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.screenshot-desktop {
    width: 569px;
    height: 588px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: #f5f5f5;
    padding: 0.5rem;
    box-sizing: border-box;
    object-fit: contain;
}

.screenshot-desktop:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.screenshot-img:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.screenshot-img:active {
    transform: scale(0.98);
}

/* Адаптация под мобильные */
@media (max-width: 767px) {
    .screenshot-desktop {
        max-width: calc(100% - 2rem);
        height: auto;
    }
    
    .screenshots-mobile-stack {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }
    
    .screenshot-img {
        width: 60%;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 1001;
}

.modal-close:hover,
.modal-close:focus {
    background: rgba(255, 255, 255, 0.25);
    text-decoration: none;
}

.modal-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.modal-caption {
    color: #fff;
    margin-top: 1rem;
    font-size: 1rem;
    text-align: center;
    padding: 0 1rem;
}

@media (max-width: 640px) {
    .modal-content {
        max-width: 95%;
        max-height: 70vh;
    }
    
    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
}
