:root {
    color-scheme: light;
    --text-xs: 0.78rem;
    --text-sm: 0.92rem;
    --text-base: 1rem;
    --text-lg: 1.08rem;
    --text-xl: 1.26rem;
    --text-2xl: 1.8rem;
    --text-3xl: 2.85rem;
    --leading-tight: 1.18;
    --leading-snug: 1.35;
    --leading-normal: 1.65;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #f5f5f5;
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: #2d2d2d;
}

.site-topbar {
    background: #2f2f2f;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
}

.site-topbar-links {
    display: flex;
    align-items: center;
    gap: 1.15rem;
}

.site-topbar-links a:hover {
    color: #fff;
}

.site-header {
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.site-header-inner {
    flex-wrap: wrap;
}

.hero-section {
    background: linear-gradient(180deg, #ffffff, #f7f7f7);
}

.hero-meta-stack {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.7rem;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    padding: 0.72rem 1.05rem;
    color: #1d4ed8;
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.68rem;
    border-radius: 1rem;
    padding: 0.8rem 1rem;
    min-height: 3.45rem;
    font-size: var(--text-base);
    font-weight: 700;
    line-height: var(--leading-tight);
    white-space: nowrap;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary svg,
.btn-secondary svg {
    width: 1.15rem;
    height: 1.15rem;
    stroke-width: 2.2;
}

.btn-primary {
    background: #1d4ed8;
    color: #fff;
    box-shadow: none;
}

.btn-primary:hover {
    background: #1e40af;
}

.btn-secondary {
    border: 1px solid #d7d7d7;
    background: #fff;
    color: #252525;
    box-shadow: none;
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-1px);
}

.action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.tool-shell .action-grid .btn-primary,
.tool-shell .action-grid .btn-secondary {
    min-height: 3.2rem;
    padding: 0.72rem 0.95rem;
    border-radius: 0.95rem;
    font-size: 0.97rem;
}

.tool-shell {
    position: relative;
}

.camera-toolbar {
    position: absolute;
    right: 0.9rem;
    bottom: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    justify-content: flex-end;
    max-width: calc(100% - 1.8rem);
    z-index: 2;
}

.camera-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(17, 17, 17, 0.74);
    color: #fff;
    backdrop-filter: blur(10px);
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.camera-tool-btn:hover {
    transform: translateY(-1px);
    background: rgba(17, 17, 17, 0.88);
    border-color: rgba(255, 255, 255, 0.3);
}

.camera-tool-btn svg {
    width: 1.36rem;
    height: 1.36rem;
    stroke-width: 2.35;
}

.camera-tool-btn-primary {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.camera-tool-btn-primary:hover {
    background: #1e40af;
    border-color: #1e40af;
}

[data-overlay] .btn-primary {
    padding-inline: 1.2rem;
    min-height: 3.7rem;
}

[data-overlay].hidden {
    display: none;
}

.is-live {
    background: #1d4ed8;
    color: #fff;
    border-color: #1d4ed8;
    box-shadow: none;
}

.is-stop {
    background: #b91c1c;
    color: #fff;
    border-color: #b91c1c;
    box-shadow: none;
}

.status-pill {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.camera-status-corner {
    position: absolute;
    top: 0.9rem;
    left: 0.9rem;
    z-index: 2;
    min-width: 8.2rem;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(10px);
}

.camera-device-corner {
    position: absolute;
    bottom: 0.9rem;
    left: 0.9rem;
    z-index: 2;
    width: min(16rem, calc(100% - 12rem));
}

.camera-device-label {
    display: block;
    margin-bottom: 0.32rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.camera-device-select {
    width: 100%;
    min-height: 2.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.76);
    color: #fff;
    padding: 0.55rem 0.9rem;
    font-size: 0.88rem;
    line-height: 1.25;
    backdrop-filter: blur(10px);
}

.status-idle {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.status-live {
    border-color: rgba(248, 113, 113, 0.28);
    background: rgba(255, 82, 82, 0.16);
    color: #ffe4e6;
}

.status-stopped {
    border-color: rgba(248, 113, 113, 0.24);
    background: rgba(239, 68, 68, 0.16);
    color: #fee2e2;
}

.status-panel {
    transition: background-color 0.2s ease, color 0.2s ease;
}

.status-panel-idle {
    background: #f8fafc;
    color: #334155;
}

.status-panel-live {
    background: #eff6ff;
    color: #1d4ed8;
}

.status-panel-stopped {
    background: #fef2f2;
    color: #991b1b;
}

.section-kicker {
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #5f6b7a;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    color: #4c4c4c;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: var(--leading-snug);
}

.nav-link:hover,
.nav-link-active {
    color: #111;
}

.nav-language {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.nav-language-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    display: inline-flex;
    height: 1rem;
    width: 1rem;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

.nav-language-icon svg {
    height: 100%;
    width: 100%;
}

.nav-language-select {
    min-height: 2.4rem;
    border: 1px solid #e2e2e2;
    background: #fff;
    border-radius: 999px;
    padding: 0.45rem 2rem 0.45rem 2.55rem;
    color: #334155;
    font-size: var(--text-sm);
    font-weight: 700;
    appearance: none;
    -webkit-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #64748b 50%),
        linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position:
        calc(100% - 1rem) calc(50% - 0.1rem),
        calc(100% - 0.72rem) calc(50% - 0.1rem);
    background-size: 0.38rem 0.38rem, 0.38rem 0.38rem;
    background-repeat: no-repeat;
}

.dropdown-panel {
    border-radius: 1rem;
    border: 1px solid #e6e6e6;
    background: #fff;
    padding: 0.75rem;
    box-shadow: 0 20px 50px -32px rgba(15, 23, 42, 0.22);
}

.dropdown-panel a {
    display: block;
    border-radius: 0.85rem;
    padding: 0.75rem 0.9rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: #334155;
}

.dropdown-panel a:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.field-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #667085;
}

.field-select {
    width: 100%;
    border-radius: 0.85rem;
    border: 1px solid #3f3f3f;
    background: rgba(17, 17, 17, 0.72);
    color: #fff;
    padding: 0.95rem 1rem;
    font-size: var(--text-base);
}

.meter-shell {
    height: 1rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.meter-bar {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e, #2d8cff, #f59e0b);
    transition: width 120ms linear;
}

.footer-heading {
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.76);
}

.footer-list {
    margin-top: 1rem;
    display: grid;
    gap: 0.8rem;
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.82);
}

.footer-list a:hover {
    color: #fff;
}

.text-copy {
    font-size: var(--text-sm);
    line-height: 1.75;
}

.text-copy-lg {
    font-size: var(--text-base);
    line-height: 1.75;
}

.panel-title {
    font-size: var(--text-xl);
    line-height: var(--leading-tight);
}

.section-title {
    font-size: var(--text-2xl);
    line-height: var(--leading-tight);
}

.hero-mini-grid,
.compact-grid,
.faq-grid,
.tool-card-grid {
    display: grid;
    gap: 1.25rem;
}

.hero-mini-grid,
.compact-grid,
.faq-grid,
.tool-card-grid,
.footer-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-mini-card,
.panel-block,
.glass-card,
.tool-card,
.faq-card {
    border: 1px solid #e8e8e8;
    background: #fff;
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 10px 28px -24px rgba(15, 23, 42, 0.22);
}

.company-content {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 12px 32px -28px rgba(15, 23, 42, 0.22);
}

.company-section + .company-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.company-lead,
.company-paragraph,
.company-section p,
.company-list {
    font-size: 1rem;
    line-height: 1.85;
    color: #475569;
}

.company-lead {
    font-size: 1.08rem;
    color: #334155;
}

.company-paragraph + .company-paragraph {
    margin-top: 1rem;
}

.company-list {
    display: grid;
    gap: 0.9rem;
    padding-left: 1.1rem;
}

.company-list strong {
    color: #0f172a;
}

.company-contact-line {
    font-size: 1rem;
    line-height: 1.8;
    color: #334155;
}

.company-contact-line strong {
    color: #0f172a;
}

.company-contact-line a {
    color: #1d4ed8;
    font-weight: 700;
}

.panel-dark {
    background:
        linear-gradient(0deg, rgba(32, 32, 32, 0.92), rgba(32, 32, 32, 0.92)),
        linear-gradient(45deg, rgba(255,255,255,0.04) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.04) 50%, rgba(255,255,255,0.04) 75%, transparent 75%, transparent);
    background-size: cover, 18px 18px;
    border-radius: 1.5rem;
    padding: 1.75rem;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.tool-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px -28px rgba(15, 23, 42, 0.25);
}

.tool-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1d4ed8;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.84);
}

.footer-legal {
    color: rgba(255, 255, 255, 0.72);
}

.footer-meta {
    color: rgba(255, 255, 255, 0.74);
}

.footer-stats {
    display: grid;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 640px) {
    .section-title {
        font-size: var(--text-3xl);
    }
}

@media (max-width: 1024px) {
    .hero-mini-grid,
    .compact-grid,
    .faq-grid,
    .tool-card-grid,
    .footer-stats {
        grid-template-columns: 1fr;
    }

    .section-head {
        flex-direction: column;
        align-items: start;
    }

    .site-topbar-inner {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.45rem 1rem;
        text-align: center;
    }

    .site-topbar-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.55rem 0.9rem;
    }

    .site-header-inner {
        align-items: center;
        gap: 1rem;
    }

    .site-brand {
        min-width: 0;
        flex: 1 1 auto;
    }

    .site-brand > span:last-child {
        min-width: 0;
    }

    .site-brand > span:last-child > span:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-nav {
        order: 3;
        width: 100%;
    }

    .site-nav:not(.hidden) {
        display: flex;
    }

    .site-nav .nav-link,
    .nav-language {
        width: 100%;
    }

    .site-nav .nav-link {
        min-height: 2.9rem;
        justify-content: flex-start;
        border-radius: 0.9rem;
        padding: 0.75rem 0.95rem;
    }

    .nav-dropdown {
        width: 100%;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 0.5rem;
    }

    .nav-dropdown > .nav-link:first-child {
        flex: 1 1 auto;
    }

    .nav-dropdown > button.nav-link {
        flex: 0 0 auto;
        min-width: 2.9rem;
        justify-content: center;
        padding-inline: 0.8rem;
    }

    .dropdown-panel {
        width: 100%;
        margin-top: 0.15rem;
        padding: 0.45rem;
        box-shadow: none;
    }

    .dropdown-panel a {
        padding: 0.82rem 0.9rem;
    }

    .nav-language-select {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .site-topbar {
        display: none;
    }

    .site-header-inner {
        padding-top: 0.9rem;
        padding-bottom: 0.9rem;
    }

    .site-brand {
        gap: 0.75rem;
    }

    .site-brand img {
        width: 2.35rem;
        height: 2.35rem;
    }

    .site-brand > span:last-child > span:first-child {
        font-size: 0.95rem;
    }

    .site-brand > span:last-child > span:last-child {
        font-size: 0.69rem;
    }

    .company-content {
        padding: 1.3rem;
    }

    [data-camera-tool] [data-video] {
        aspect-ratio: 4 / 5;
        min-height: 25rem;
    }

    .camera-toolbar {
        right: 0.7rem;
        left: 0.7rem;
        bottom: 0.7rem;
        justify-content: center;
        max-width: none;
    }

    .camera-tool-btn {
        width: 2.65rem;
        height: 2.65rem;
    }

    .camera-status-corner {
        top: 0.7rem;
        left: 0.7rem;
        min-width: 7.5rem;
    }

    .camera-device-corner {
        right: 0.7rem;
        left: 0.7rem;
        bottom: 4.2rem;
        width: auto;
    }
}
