:root {
    --bg: #000;
    --text: #fff;
    --muted: #a3a3ac;
    --accent: #2a5525;
    --light: #e8e8e8;
    --border: #d4d4d8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 80px;
}

/* Header */
.site-header {
    height: 80px;
    background: rgba(0, 0, 0, 0.8);
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.main-nav {
    display: flex;
    gap: 90px;
    font-size: 20px;
    line-height: 24px;
}

.main-nav a.active {
    font-weight: 500;
}

.lang-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 132px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--text);
    background: none;
    font-family: inherit;
}

/* Hero */
.hero {
    padding: 120px 0 80px;
    text-align: center;
}

.hero h1,
.hero h2 {
    font-size: 55px;
    font-weight: 600;
    line-height: 60px;
    margin: 0;
}

.hero p {
    font-size: 20px;
    line-height: 25px;
    letter-spacing: 0.3px;
    max-width: 610px;
    margin: 15px auto 0;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    padding-bottom: 120px;
}

.product-card {
    border: 1px solid var(--text);
    display: block;
}

.product-card__image {
    display: block;
    width: 100%;
    height: 367px;
    object-fit: cover;
}

.product-card__info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 20px 30px;
}

.product-card__name {
    font-size: 25px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 20px;
    margin: 0;
}

.product-card__price {
    font-size: 25px;
    font-weight: 500;
    color: var(--accent);
    line-height: 20px;
}

/* Callback form section */
.callback {
    background: var(--light);
    color: #000;
    padding: 80px 100px;
}

.callback__inner {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    max-width: 1241px;
    margin: 0 auto;
}

.callback h2 {
    font-size: 60px;
    font-weight: 500;
    line-height: 70px;
    letter-spacing: -2px;
    margin: 0 0 64px;
}

.callback__text {
    font-size: 18px;
    line-height: 25px;
    max-width: 416px;
    margin: 0;
}

.callback__form {
    width: 601px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.callback__field {
    position: relative;
    border-bottom: 2px solid #000;
}

.callback__field input {
    width: 100%;
    height: 44px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 18px;
    color: #000;
    outline: none;
}

.callback__field input::placeholder {
    color: rgba(163, 163, 172, 0.5);
}

.callback__submit {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 56px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
}

/* Offices */
.offices {
    background: var(--bg);
    border: 1px solid var(--text);
    border-left: none;
    border-right: none;
    display: grid;
    grid-template-columns: 640px 1fr;
}

.offices__image {
    width: 100%;
    height: 447px;
    object-fit: cover;
    display: block;
}

.offices__content {
    padding: 84px 0 148px 123px;
}

.offices__content h2 {
    font-size: 30px;
    font-weight: 600;
    line-height: 30px;
    margin: 0 0 34px;
}

.offices__list {
    display: flex;
    gap: 85px;
}

.office__country {
    font-size: 12px;
    color: #8f8f8f;
    line-height: 20px;
    margin: 0 0 8px;
}

.office__address {
    font-size: 18px;
    line-height: 21px;
    margin: 0;
}

/* Footer */
.site-footer {
    padding: 30px 80px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.site-footer__copy {
    font-size: 15px;
    line-height: 22.5px;
    color: var(--muted);
    margin: 0;
}

.site-footer .main-nav {
    gap: 93px;
}

/* Product page */
.product {
    border: 1px solid var(--text);
    display: grid;
    grid-template-columns: 639px 1fr;
    margin-top: 40px;
}

.product__image {
    width: 100%;
    height: 100%;
    min-height: 480px;
    object-fit: cover;
    display: block;
}

.product__details {
    padding: 49px 51px;
}

.product__title {
    font-size: 25px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 30px;
    margin: 0 0 15px;
}

.product__version-label {
    font-size: 13.5px;
    line-height: 19.58px;
    margin: 0 0 8px;
}

.product__chips {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.chip {
    border: 1px solid var(--text);
    padding: 5px 10px;
    font-size: 16px;
    line-height: 22px;
}

.chip--active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(42, 85, 37, 0.12);
}

.product__qty {
    margin-top: 30px;
    width: 84px;
}

.product__qty input {
    width: 100%;
    height: 24px;
    background: none;
    border: 1px solid var(--text);
    color: var(--text);
    text-align: center;
    font-family: inherit;
    font-size: 15px;
}

.product__buy {
    display: inline-block;
    margin-top: 20px;
    background: var(--accent);
    color: var(--text);
    padding: 9px 50px;
    font-size: 14px;
    line-height: 22px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.product__desc {
    margin-top: 50px;
    font-size: 16px;
    line-height: 18px;
    max-width: 540px;
}

/* Project information */
.project-info {
    padding: 120px 0;
}

.project-info h2 {
    font-size: 55px;
    font-weight: 600;
    line-height: 60px;
    margin: 0 0 60px;
}

.project-info p {
    font-size: 20px;
    line-height: 25px;
    max-width: 587px;
    margin: 0 0 60px;
}

.btn-catalog {
    display: inline-block;
    background: var(--accent);
    color: var(--text);
    padding: 10px 15px;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    width: 130px;
}

@media (max-width: 1000px) {
    .container {
        padding: 0 24px;
    }

    .product-grid,
    .product,
    .offices {
        grid-template-columns: 1fr;
    }

    .product__image,
    .offices__image {
        min-width: 0; /* grid item with a replaced child would blow the 1fr track past the viewport */
    }

    .callback {
        padding: 60px 24px;
    }

    .callback__inner {
        flex-direction: column;
        gap: 40px;
    }

    .callback__form {
        width: 100%;
    }

    .offices__content {
        padding: 40px 24px;
    }

    .offices__list {
        flex-wrap: wrap;
        gap: 24px;
    }

    .main-nav {
        gap: 14px;
        font-size: 14px;
        flex-wrap: wrap;
    }

    .site-header,
    .site-header .container {
        height: auto;
    }

    .site-header .container {
        flex-wrap: wrap;
        padding-top: 12px;
        padding-bottom: 12px;
        gap: 12px;
    }

    .lang-select {
        width: auto;
        padding: 6px 10px;
    }

    .cart-link {
        margin-left: 0;
    }

    .site-footer {
        flex-direction: column;
        gap: 24px;
        padding: 30px 24px;
    }

    .site-footer .main-nav {
        gap: 14px 24px;
    }
}

/* Home page */
.home-hero-photo {
    max-width: 1440px;
    margin: -80px auto 0;
    padding: 0 80px;
}

.home-hero-photo img {
    display: block;
    width: 100%;
    height: auto;
}

.home-hero {
    border: 1px solid var(--text);
    display: grid;
    grid-template-columns: 1fr 478px;
    margin-top: 100px; /* shortcut: figma has 720px empty gap under header, reduced on purpose */
}

.home-hero__text {
    padding: 136px 79px;
    font-size: 22px;
}

.home-hero__text p {
    margin: 0;
}

.home-hero__text p + p {
    margin-top: 20px;
    color: var(--muted);
    font-size: 20px;
}

.home-hero__image {
    width: 100%;
    height: 100%;
    min-height: 478px;
    object-fit: cover;
    display: block;
}

.section-tag {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 100px 0 40px;
}

.section-tag__num {
    background: var(--accent);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 500;
    flex-shrink: 0;
}

.section-tag__title {
    font-size: 25px;
    letter-spacing: 0.3px;
}

.home-more {
    text-align: center;
    margin: 60px 0 0;
    padding-bottom: 100px;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 60px;
    padding-bottom: 100px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 1fr == 400px at the 1440 container, but won't overflow narrower windows */
    gap: 20px 40px;
}

.cell {
    border: 1px solid var(--text);
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 29px;
    font-size: 25px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 20px;
    white-space: nowrap;
}

.learn-card {
    border: 1px solid var(--text);
    display: grid;
    grid-template-columns: 561px 1fr;
    margin-top: 100px;
}

.learn-card__body {
    padding: 50px;
}

.learn-card__body h3 {
    font-size: 30px;
    font-weight: 600;
    line-height: 30px;
    margin: 0 0 15px;
}

.learn-card__body p {
    font-size: 20px;
    line-height: 25px;
    max-width: 434px;
    margin: 0;
}

.learn-card__actions {
    display: flex;
    gap: 10px;
    margin-top: 90px;
}

.learn-card__image {
    width: 100%;
    height: 100%;
    min-height: 319px;
    object-fit: cover;
    display: block;
}

.howto {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 1fr == 610px at the 1440 container */
    gap: 60px;
    padding-bottom: 100px;
}

.howto__list {
    list-style: none;
    margin: 40px 0 0;
    padding: 0 31px;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.howto__list li {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 18px;
    line-height: 28px;
}

.howto__list li::before {
    content: '';
    width: 24px;
    height: 24px;
    border: 1px solid var(--text);
    flex-shrink: 0;
}

@media (max-width: 1000px) {
    .home-hero-photo {
        padding: 0 24px;
    }

    .home-hero,
    .learn-card,
    .howto {
        grid-template-columns: 1fr;
    }

    .home-hero__text {
        padding: 40px 24px;
    }

    .learn-card__body {
        padding: 24px;
    }

    .product__details {
        padding: 24px;
    }

    .feature-grid,
    .option-grid {
        grid-template-columns: 1fr;
    }
}

/* Cart */
.cart-link {
    font-size: 16px;
    margin-left: 24px;
}

.cart {
    padding: 60px 0 120px;
}

.cart h1 {
    font-size: 55px;
    font-weight: 600;
    line-height: 60px;
    margin: 0 0 60px;
}

.cart__empty {
    font-size: 20px;
    color: var(--muted);
    margin: 0 0 40px;
}

.cart__items {
    list-style: none;
    margin: 0 0 40px;
    padding: 0;
}

.cart__item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
}

.cart__item-image {
    width: 100px;
    height: auto;
}

.cart__item-name {
    flex: 1;
}

.cart__item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart__item-qty input {
    width: 64px;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    padding: 6px 8px;
}

.cart__item-qty button,
.cart__item-remove button {
    background: none;
    border: 1px solid var(--text);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    padding: 6px 14px;
    cursor: pointer;
}

.cart__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart__total {
    font-size: 24px;
    font-weight: 600;
}

.flash {
    padding: 16px 0;
}

.flash p {
    margin: 0;
    padding: 12px 16px;
    border-radius: 4px;
}

.flash--success p {
    background: var(--accent);
    color: #fff;
}

.flash--error p {
    background: #7f1d1d;
    color: #fff;
}

.main-nav a.active {
    text-decoration: underline;
    text-underline-offset: 6px;
}
