:root {
    --primary-red: #C1432E;
    --secondary-red: #9F3728;
    --dark-slate: #2C2C2C;
    --light-gray: #F5F5F5;
    --white: #FFFFFF;
    --muted-on-dark: #C9C9C9;
    --font-heading: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
    --container-width: 1200px;
    --header-height-expanded: 94px;
    --focus-ring: #F06A55;
    --z-header: 100;
    --z-menu: 110;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-kerning: normal;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    color: var(--dark-slate);
    background-color: var(--white);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

main {
    padding-top: var(--header-height-expanded);
}

.page-home main {
    padding-top: 0;
}

a,
button,
input,
textarea {
    font: inherit;
}

:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: calc(var(--z-menu) + 1);
    padding: 10px 14px;
    color: var(--white);
    background: var(--dark-slate);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.section {
    padding: clamp(72px, 9vw, 120px) 0;
}

.section--compact {
    padding: 30px 0;
}

section[id] {
    scroll-margin-top: calc(var(--header-height-expanded) + 10px);
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1rem;
    text-wrap: balance;
    letter-spacing: -0.03em;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1;
    margin: 0;
    text-align: left;
}

.section-heading {
    max-width: 920px;
    margin-bottom: clamp(36px, 5vw, 64px);
}

.section-heading--split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
    gap: clamp(32px, 8vw, 110px);
    align-items: end;
    max-width: none;
}

.section-lead {
    max-width: 62ch;
    margin: 20px 0 0;
    color: #555;
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    line-height: 1.55;
    text-wrap: pretty;
}

.section-heading--split .section-lead {
    margin: 0;
}

.animate-on-scroll {
    opacity: 1;
    transform: none;
}

.animate-on-scroll.is-visible {
    animation: reveal 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-block {
    max-width: 720px;
    font-size: clamp(1rem, 1.5vw, 1.16rem);
    color: #3F3F3F;
}

.text-block p {
    margin-bottom: 15px;
}

.text-block .legal-heading {
    margin-top: 2rem;
    font-size: 1.25rem;
    text-transform: none;
}

.header {
    background-color: rgba(255, 255, 255, 0.98);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: var(--z-header);
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    padding: 10px 0 24px;
    transition: padding 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.header__container {
    display: flex;
    align-items: center;
    position: relative;
}

.header__mobile-left,
.header__mobile-email {
    display: none;
}

.header__logo-center {
    flex: 0 0 auto;
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
    transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 769px) {
    .header.header--compact {
        padding: 5px 0 12px;
    }

    .header.header--compact .logo img {
        height: 30px;
    }
}

.header__controls {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.nav {
    margin: 0;
}

.lang-switch {
    display: flex;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-left: 40px;
}


.nav__list {
    display: flex;
    list-style: none;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.nav__link {
    text-decoration: none;
    color: var(--dark-slate);
    font-weight: 500;
    font-size: 15px;
    text-transform: none;
    transition: color 0.2s ease;
    letter-spacing: -0.01em;
}

.nav__link:hover {
    color: var(--primary-red);
}


.lang-btn {
    border: none;
    background: none;
    cursor: pointer;
    min-width: 40px;
    min-height: 40px;
    padding: 8px;
    color: #666;
}

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

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-slate);
}

.header__mobile-contact {
    display: none;
}

.hero {
    min-height: 620px;
    height: min(82vh, 820px);
    background: url("../images/hero-bg.jpg") no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
    margin-top: 80px;
    isolation: isolate;
    overflow: hidden;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(20,20,20,0.95) 0%, rgba(20,20,20,0.76) 48%, rgba(20,20,20,0.18) 100%),
        linear-gradient(0deg, rgba(20,20,20,0.44) 0%, transparent 45%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    background: rgba(255,255,255,0.28);
}

.hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 60px;
}

.hero__copy {
    max-width: 780px;
}

.hero__label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    font-size: 0.9rem;
    font-weight: 700;
}

.hero__label::before {
    content: "";
    width: 34px;
    height: 2px;
    background: var(--primary-red);
}

.hero__title {
    font-size: clamp(2.4rem, 5.5vw, 5rem);
    line-height: 0.98;
    margin: 0 0 1.5rem;
    word-wrap: normal;
    overflow-wrap: normal;
    hyphens: manual;
    letter-spacing: -0.035em;
    font-weight: 700;
}

.hero__subtitle {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    margin: 0 0 2rem;
    color: #E2E2E2;
    max-width: 65ch;
    text-wrap: pretty;
}

.hero__scope {
    width: min(290px, 28vw);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-self: flex-end;
    margin-bottom: 2px;
    border-top: 1px solid rgba(255,255,255,0.4);
}

.hero__scope span {
    min-height: 54px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.4);
    color: #F0F0F0;
    font-size: 0.84rem;
}

.hero__scope span:nth-child(odd) {
    border-right: 1px solid rgba(255,255,255,0.4);
    padding-right: 14px;
}

.hero__scope span:nth-child(even) {
    padding-left: 14px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    text-transform: none;
}

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

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

.btn--primary:active {
    transform: translateY(1px);
}

.btn:disabled {
    cursor: wait;
    opacity: 0.7;
}

.full-width { width: 100%; }

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.52fr);
    gap: clamp(48px, 10vw, 140px);
    align-items: start;
}

.about-focus {
    padding-top: 4px;
    border-top: 2px solid var(--primary-red);
}

.about-focus > p {
    margin: 14px 0 20px;
    font-weight: 700;
}

.about-focus ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.about-focus li {
    padding: 13px 0;
    border-bottom: 1px solid #D8D8D8;
}

.services-section {
    background: #ECECEC;
}

.services-section--page {
    min-height: calc(100vh - 122px);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: minmax(260px, auto) minmax(220px, auto);
    gap: 12px;
}

.service-item {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: clamp(24px, 3.4vw, 42px);
    background: var(--white);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease;
}

.service-item:hover {
    transform: translateY(-4px);
}

.service-item--infrastructure {
    grid-column: span 7;
    background: var(--dark-slate);
    color: var(--white);
}

.service-item--security {
    grid-column: span 5;
    background: var(--primary-red);
    color: var(--white);
}

.service-item--software {
    grid-column: span 4;
}

.service-item--multimedia {
    grid-column: span 8;
}

.service-item__index {
    position: absolute;
    top: 24px;
    right: 28px;
    color: #777;
    font-size: 0.78rem;
    font-weight: 700;
}

.service-item--infrastructure .service-item__index,
.service-item--security .service-item__index {
    color: rgba(255,255,255,0.64);
}

.service-item h3 {
    max-width: 18ch;
    font-size: clamp(1.25rem, 2vw, 1.85rem);
    line-height: 1.08;
    margin: auto 0 14px;
}

.service-item p {
    max-width: 54ch;
    margin: 0;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    text-wrap: pretty;
}

.service-item--infrastructure p,
.service-item--security p {
    color: #F2F2F2;
}

.bento-icon {
    width: 42px;
    height: 42px;
    color: var(--primary-red);
}

.service-item--infrastructure .bento-icon,
.service-item--security .bento-icon {
    color: var(--white);
}

.delivery {
    background: var(--dark-slate);
    color: var(--white);
}

.delivery__layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(520px, 1.2fr);
    gap: clamp(50px, 9vw, 130px);
    align-items: start;
}

.delivery__intro h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1;
    margin: 0 0 24px;
}

.delivery__intro p {
    max-width: 52ch;
    color: var(--muted-on-dark);
    margin-bottom: 28px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    color: var(--white);
    font-weight: 700;
    text-underline-offset: 5px;
}

.text-link::after {
    content: "→";
    color: var(--primary-red);
    font-size: 1.35rem;
}

.delivery__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #5A5A5A;
}

.delivery__steps li {
    display: grid;
    grid-template-columns: 48px minmax(130px, 0.7fr) 1.3fr;
    gap: 22px;
    align-items: baseline;
    padding: 22px 0;
    border-bottom: 1px solid #5A5A5A;
}

.delivery__steps span {
    color: var(--primary-red);
    font-size: 0.8rem;
    font-weight: 700;
}

.delivery__steps strong {
    font-size: 1.08rem;
}

.delivery__steps p {
    margin: 0;
    color: var(--muted-on-dark);
    font-size: 0.95rem;
}

.contacts {
    background-color: var(--dark-slate);
    color: var(--white);
    padding: 24px 0 28px;
}

.contacts__container {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(520px, 1.1fr);
    gap: clamp(40px, 6vw, 72px);
    align-items: start;
}

.contacts__info {
    padding-right: 20px;
    min-width: 0;
}

.contacts__action {
    width: 100%;
    max-width: 620px;
    justify-self: end;
    padding: 28px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
}

.contacts__action-title {
    margin-bottom: 10px;
    color: var(--white);
    font-size: 1.25rem;
    line-height: 1.3;
}

.contacts__action-text {
    margin-bottom: 20px;
    color: var(--muted-on-dark);
    line-height: 1.5;
}

.contacts__info h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--white);
    line-height: 1.3;
}

.contact-row {
    margin-bottom: 10px;
    color: var(--muted-on-dark);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.contact-row i,
.contact-row .icon {
    margin-top: 5px;
    font-size: 16px;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.contact-row a {
    color: var(--white);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contact-address {
    display: inline-block;
    min-width: 0;
    white-space: normal;
}

.case-study {
    display: grid;
    grid-template-columns: minmax(210px, 0.65fr) minmax(320px, 1.1fr) minmax(220px, 0.55fr);
    gap: clamp(32px, 6vw, 80px);
    align-items: start;
    background: var(--light-gray);
    padding: clamp(30px, 5vw, 60px);
    margin-top: 20px;
}

.case-study__heading > p {
    color: var(--primary-red);
    font-size: 0.82rem;
    font-weight: 700;
    margin: 0 0 14px;
}

.case-study h3 {
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    line-height: 1.1;
    margin: 0;
}

.case-study p {
    margin: 0 0 16px;
    color: #4B4B4B;
    line-height: 1.6;
}

.case-study__result {
    padding-top: 4px;
}

.case-study__result strong {
    display: block;
    color: var(--primary-red);
    font-size: clamp(3.2rem, 6vw, 5.5rem);
    line-height: 0.86;
    letter-spacing: -0.04em;
    margin-bottom: 18px;
}

.case-study__result p {
    font-size: 0.92rem;
    line-height: 1.45;
}

.footer {
    background: #222;
    color: #B8B8B8;
    padding: 10px 0;
    text-align: center;
    font-size: 11px;
}

.footer p {
    margin: 0;
}

.footer a {
    color: var(--primary-red);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.section--compact .contacts__container {
    gap: clamp(40px, 6vw, 72px);
}

.section--compact .contact-row {
    margin-bottom: 8px;
}


@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
    }

    .service-item--infrastructure,
    .service-item--security,
    .service-item--software,
    .service-item--multimedia {
        grid-column: auto;
        min-height: 280px;
    }

    .delivery__layout {
        grid-template-columns: 1fr;
    }

    .case-study {
        grid-template-columns: 0.7fr 1.3fr;
    }

    .case-study__result {
        grid-column: 2;
    }

    .contacts__container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .contacts__action {
        max-width: none;
        justify-self: stretch;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height-expanded: 64px;
    }

    .section {
        padding: 64px 0;
    }

    .section-heading--split,
    .about-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .section-heading--split .section-lead {
        margin: 0;
    }

    .header {
        padding: 10px 0;
    }

    .header.header--compact {
        padding: 0;
    }
    
    .header__container { 
        padding: 0 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .header__mobile-left {
        display: block;
    }
    
    .hamburger { 
        display: block !important;
        width: 44px;
        height: 44px;
        position: relative;
        z-index: var(--z-menu);
        cursor: pointer;
        padding: 0;
        background: none !important;
        border: none !important;
        -webkit-tap-highlight-color: transparent;
    }
    
    .hamburger:active {
        opacity: 0.7;
    }
    
    .hamburger span {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--dark-slate);
        margin: 5px 7px;
        width: 30px;
        border-radius: 2px;
        transition: 0.3s;
    }
    
    .nav {
        width: 100%;
    }
    
    .header__logo-center {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .header__logo-center .logo img {
        height: 40px;
    }

    .header.header--compact .header__logo-center .logo img {
        height: 28px;
    }
    
    .header__mobile-email {
        display: block;
        font-size: 13px;
        font-weight: 600;
    }
    
    .header__mobile-email a {
        color: var(--primary-red);
        text-decoration: none;
    }
    
    .header__controls {
        display: none;
        position: absolute;
        top: 54px;
        left: 0;
        width: 100%;
        padding: 20px;
        background: var(--white);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: var(--z-menu);
    }

    .header.header--compact .header__controls {
        top: 44px;
    }

    .header__controls.is-active {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    .nav__list { 
        flex-direction: column; 
        text-align: center;
        gap: 20px;
    }

    .nav__link {
        display: block;
        padding: 10px;
    }

    .lang-switch {
        justify-content: center;
        margin: 16px 0 0;
        padding-top: 12px;
        border-top: 1px solid #DDD;
    }

    .lang-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    .hero { 
        min-height: 620px;
        height: auto; 
        padding: 88px 0 54px;
        margin-top: var(--header-height-expanded);
        background-position: 62% center;
    }
    
    .hero__title {
        font-size: clamp(2rem, 8.5vw, 3.4rem);
    }

    .hero__content {
        display: block;
    }

    .hero__scope {
        width: 100%;
        max-width: 420px;
        margin-top: 48px;
    }
    
    .services-grid { grid-template-columns: 1fr; }

    .service-item--infrastructure,
    .service-item--security,
    .service-item--software,
    .service-item--multimedia {
        min-height: 250px;
    }

    .delivery__layout {
        gap: 44px;
    }

    .delivery__steps li {
        grid-template-columns: 36px 1fr;
        gap: 8px 16px;
    }

    .delivery__steps p {
        grid-column: 2;
    }

    .case-study {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .case-study__result {
        grid-column: auto;
    }

    .contacts__container { grid-template-columns: 1fr; gap: 30px; }
    
    .section--compact {
        padding: 40px 0;
    }
    
    .contact-address {
        white-space: normal;
    }
}

@media (max-width: 420px) {
    .header__mobile-email {
        font-size: 11px;
    }

    .header__mobile-email a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .hero__scope {
        grid-template-columns: 1fr;
    }

    .hero__scope span:nth-child(odd),
    .hero__scope span:nth-child(even) {
        min-height: 46px;
        padding: 0;
        border-right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
