:root {
    --bg: #112444;
    --bg-elevated: #1a3157;
    --text: #ffffff;
    --text-muted: #8da4c4;
    --border: #293853;
    --nav-bg: rgba(17, 36, 68, 0.96);
    --primary: #406fe5;
    --primary-hover: #335fd1;
    --secondary: #293853;
    --shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
    --shadow-hover: 0 18px 36px rgba(0, 0, 0, 0.34);
    --nav-height: 68px;
    --radius: 16px;
}

body.light-mode {
    --bg: #f4f7fc;
    --bg-elevated: #ffffff;
    --text: #112444;
    --text-muted: #5a718f;
    --border: #dce4ef;
    --nav-bg: rgba(255, 255, 255, 0.96);
    --primary: #406fe5;
    --primary-hover: #335fd1;
    --secondary: #1e3254;
    --shadow: 0 10px 28px rgba(17, 36, 68, 0.08);
    --shadow-hover: 0 18px 36px rgba(17, 36, 68, 0.14);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.35s ease, color 0.35s ease;
}

h1,
h2,
h3,
p,
ul {
    margin: 0;
}

h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.03em;
}

a,
button,
label,
.lang-btn {
    cursor: pointer;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: background-color 0.35s ease, border-color 0.35s ease;
}

.logo {
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.nav-links > a,
.dropdown-toggle {
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    background: none;
    border: none;
    padding: 0.4rem 0;
    transition: color 0.25s ease;
}

.nav-links > a:hover,
.dropdown-toggle:hover {
    color: var(--text);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
}

.dropdown-menu.open {
    display: flex;
    flex-direction: column;
}

@media (min-width: 901px) {
    .dropdown-menu.open {
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0;
        min-width: 185px;
        padding: 0.45rem;
        background-color: var(--bg-elevated);
        border: 1px solid var(--border);
        border-radius: 12px;
        box-shadow: var(--shadow);
        z-index: 1100;
    }

    .dropdown-menu.open a {
        padding: 0.65rem 0.9rem;
        border-radius: 8px;
        font-size: 0.9rem;
        font-weight: 500;
        color: var(--text-muted);
        text-decoration: none;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    .dropdown-menu.open a:hover {
        background-color: rgba(64, 111, 229, 0.14);
        color: var(--text);
    }
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.lang-btn {
    color: var(--text-muted);
    padding: 0.25rem 0.45rem;
    border-radius: 6px;
    transition: color 0.25s ease, background-color 0.25s ease;
}

.lang-btn.active {
    color: var(--text);
    background-color: rgba(64, 111, 229, 0.18);
}

.lang-sep {
    color: var(--text-muted);
    opacity: 0.4;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
    flex-shrink: 0;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    background-color: var(--border);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    transition: background-color 0.35s ease;
}

.slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 4px;
    bottom: 4px;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    transition: transform 0.35s ease, background-color 0.35s ease;
    z-index: 2;
}

body.light-mode .slider::before {
    background-color: #112444;
}

input:checked + .slider::before {
    transform: translateX(28px);
}

.icon {
    font-size: 11px;
    line-height: 1;
    user-select: none;
    z-index: 1;
}

.hamburger {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    flex-shrink: 0;
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

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

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.25s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.hero,
.page-header,
.products-section,
.work-section,
.workflow-section,
.about-section,
.terms-section,
.contact-section {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 5%;
    padding-right: 5%;
}

.hero {
    min-height: 76vh;
    padding-top: calc(var(--nav-height) + 48px);
    padding-bottom: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-header {
    padding-top: calc(var(--nav-height) + 64px);
    padding-bottom: 2rem;
}

.discount-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 16px;
    margin-bottom: 1.8rem;
    border-radius: 999px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    color: #ffd700;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.hero-title {
    font-size: clamp(2.3rem, 6vw, 4.4rem);
    line-height: 1.08;
    margin-bottom: 1.4rem;
}

.page-title {
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.12;
    margin-bottom: 1rem;
}

.hero-subtitle,
.page-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 300;
    color: var(--text-muted);
    max-width: 640px;
    line-height: 1.7;
}

.products-section,
.work-section,
.workflow-section {
    padding-top: 4.5rem;
    padding-bottom: 2.5rem;
}

.section-title {
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.product-symbol {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--primary);
    margin-bottom: 1.2rem;
}

.product-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.product-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.product-cta {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
    transition: transform 0.25s ease;
}

.product-card:hover .product-cta {
    transform: translateX(4px);
}

.project-card {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.project-image {
    width: 100%;
    height: 195px;
    overflow: hidden;
    background-color: #0b172c;
    border-bottom: 1px solid var(--border);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.35s ease, opacity 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.04);
    opacity: 0.92;
}

.project-content {
    padding: 1.9rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.project-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.85rem;
}

.project-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    flex-grow: 1;
}

.project-link {
    display: inline-block;
    margin-top: 1.2rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--primary);
    transition: transform 0.25s ease;
}

.project-card:hover .project-link {
    transform: translateX(4px);
}

.workflow-card {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: var(--shadow);
}

.workflow-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.workflow-badge {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
}

.workflow-card h3 {
    font-size: 1.25rem;
}

.workflow-steps {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.workflow-steps li {
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.workflow-steps li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 800;
}

.workflow-steps strong {
    color: var(--text);
}

.about-section {
    padding-top: 5.5rem;
    padding-bottom: 4.5rem;
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}

.about-content {
    max-width: 880px;
}

.about-content p {
    font-size: clamp(1.12rem, 2.4vw, 1.55rem);
    font-weight: 300;
    line-height: 1.65;
}

.terms-section {
    padding-bottom: 5.5rem;
}

.terms-box {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.3rem;
    box-shadow: var(--shadow);
}

.terms-box h3 {
    font-size: 1.2rem;
    margin-bottom: 1.3rem;
}

.terms-box ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.terms-box li {
    position: relative;
    padding-left: 1.35rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.terms-box li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 800;
}

.terms-box strong {
    color: var(--text);
}

.contact-section {
    padding-top: 6rem;
    padding-bottom: 6rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

.contact-section h2 {
    font-size: clamp(1.8rem, 4vw, 2.9rem);
    margin-bottom: 0.9rem;
}

.contact-sub {
    font-size: 1.08rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.2rem;
    border-radius: 10px;
    font-size: 0.98rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    transition: transform 0.25s ease, background-color 0.25s ease, opacity 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(64, 111, 229, 0.35);
}

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

.btn-secondary {
    background-color: var(--secondary);
    color: #ffffff;
}

.email-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.email-text a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--primary);
    padding-bottom: 2px;
    word-break: break-word;
    transition: color 0.25s ease;
}

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

footer {
    padding: 2.2rem 5%;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .hamburger {
        display: flex;
    }

    .nav-controls {
        gap: 0.75rem;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        max-height: calc(100dvh - var(--nav-height));
        overflow-y: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.6rem 5% 1.6rem 5%;
        background-color: var(--nav-bg);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
        z-index: 999;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links > a,
    .nav-links .dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 50px;
        padding: 0.85rem 0;
        font-size: 1.05rem;
        font-weight: 500;
        color: var(--text);
        border-bottom: 1px solid var(--border);
    }

    .dropdown-menu.open {
        margin: 0.5rem 0 0.75rem 0;
        padding: 0.25rem 1rem;
        border-radius: 12px;
        background-color: rgba(64, 111, 229, 0.1);
        border: 1px solid var(--border);
    }

    .dropdown-menu.open a {
        display: flex;
        align-items: center;
        min-height: 46px;
        padding: 0.65rem 0;
        font-size: 0.98rem;
        font-weight: 500;
        color: var(--text);
        text-decoration: none;
        border-bottom: 1px solid var(--border);
    }

    .dropdown-menu.open a:last-child {
        border-bottom: none;
    }

    .nav-links .lang-switch {
        padding-top: 1.1rem;
        gap: 0.6rem;
    }

    .lang-btn {
        padding: 0.4rem 0.75rem;
        border: 1px solid var(--border);
    }

    .lang-btn.active {
        border-color: var(--primary);
    }

    .hero {
        min-height: auto;
        padding-top: calc(var(--nav-height) + 48px);
        padding-bottom: 2.5rem;
    }

    .page-header {
        padding-top: calc(var(--nav-height) + 44px);
    }

    .products-section,
    .work-section,
    .workflow-section {
        padding-top: 3rem;
    }

    .section-title {
        margin-bottom: 1.8rem;
    }

    .product-card,
    .project-content,
    .workflow-card,
    .terms-box {
        padding: 1.5rem;
    }

    .about-section {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    .terms-section {
        padding-bottom: 3.5rem;
    }

    .contact-section {
        padding-top: 4.5rem;
        padding-bottom: 4.5rem;
    }

    .contact-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .logo {
        font-size: 0.96rem;
    }

    .theme-switch {
        width: 48px;
        height: 24px;
    }

    .slider::before {
        width: 16px;
        height: 16px;
    }

    input:checked + .slider::before {
        transform: translateX(24px);
    }

    .icon {
        font-size: 10px;
    }

    .hamburger {
        width: 36px;
        height: 36px;
    }
}