@import url('../css/colors.css');
@import url('https://fonts.googleapis.com/css2?family=Afacad+Flux:wght@400..700&family=Fugaz+One&display=swap');

* {
    box-sizing: border-box;
}

html {
    background: var(--color_main);
}

body {
    margin: 0;
    color: var(--color_blck);
    font-family: "Afacad Flux", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

.site-header {
    min-height: 104px;
    padding: 10px max(5vw, 24px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color_orange_1);
    color: #fff;
}

.brand,
.brand img {
    display: block;
}

.back-link {
    min-height: 44px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .1);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s ease-out;
}

.back-link:hover {
    background: rgba(255, 255, 255, .18);
}

main {
    width: min(1040px, 90%);
    margin: 0 auto;
    padding: 68px 0 96px;
}

.intro {
    max-width: 720px;
}

.year {
    margin: 0 0 8px;
    color: var(--color_orange_1);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .08em;
}

h1,
h2 {
    font-family: "Fugaz One", sans-serif;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 64px);
    line-height: 1.08;
}

.intro > p:not(.year) {
    max-width: 62ch;
    margin: 20px 0 0;
    color: #333;
    font-size: 18px;
    line-height: 1.55;
}

.download {
    width: fit-content;
    min-height: 48px;
    margin-top: 24px;
    padding: 11px 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    background: var(--color_orange_1);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.download:hover {
    background: var(--color_orange_2);
}

.download:focus-visible,
.back-link:focus-visible {
    outline: 3px solid var(--color_orange_2);
    outline-offset: 4px;
}

.price-table,
.legal-note {
    margin-top: 64px;
}

h2 {
    margin: 0 0 18px;
    font-size: clamp(27px, 4vw, 34px);
    line-height: 1.2;
}

.table-scroll {
    overflow-x: auto;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 38px -30px rgba(4, 25, 56, .55);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

th,
td {
    padding: 19px 20px;
    border-bottom: 1px solid var(--color_border);
    text-align: left;
    white-space: nowrap;
}

thead th {
    background: var(--color_orange_1);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .01em;
}

thead small {
    font-weight: 400;
    opacity: .78;
}

tbody tr:last-child th,
tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:nth-child(even) {
    background: #fafaf7;
}

tbody th {
    font-size: 17px;
    font-weight: 650;
}

.amount,
.base-amount {
    font-size: 17px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.amount {
    color: var(--color_orange_2);
}

.base-amount {
    color: #4d4d4d;
}

.legal-note dl {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
    gap: 1px;
    overflow: hidden;
    border-radius: 16px;
    background: #d7d7d2;
}

.legal-note dt,
.legal-note dd {
    padding: 20px;
    background: var(--color_alt);
}

dt {
    color: var(--color_text_2);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

dd {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

@media (max-width: 680px) {
    .site-header {
        min-height: 88px;
    }

    .brand img {
        width: 68px;
        height: 68px;
    }

    main {
        width: min(100% - 40px, 1120px);
        padding: 44px 0 72px;
    }

    h1 {
        font-size: clamp(40px, 12vw, 52px);
    }

    .intro > p:not(.year) {
        font-size: 17px;
    }

    .download {
        width: 100%;
        justify-content: center;
    }

    .price-table,
    .legal-note {
        margin-top: 52px;
    }

    .table-scroll {
        overflow: visible;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    table,
    tbody,
    tr,
    th,
    td {
        display: block;
        width: 100%;
    }

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

    tbody {
        display: grid;
        gap: 12px;
    }

    tbody tr,
    tbody tr:nth-child(even) {
        padding: 18px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 16px;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 12px 30px -26px rgba(4, 25, 56, .65);
    }

    tbody th,
    tbody td {
        padding: 0;
        border: 0;
        white-space: normal;
    }

    tbody th {
        font-size: 18px;
        line-height: 1.25;
    }

    .duration {
        color: var(--color_text_2);
        font-size: 15px;
        font-weight: 600;
        text-align: right;
    }

    .duration::before {
        content: none;
    }

    .amount,
    .base-amount {
        padding-top: 14px;
        border-top: 1px solid var(--color_border);
        font-size: 18px;
        line-height: 1.25;
    }

    .amount::before,
    .base-amount::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--color_text_2);
        font-size: 13px;
        font-weight: 600;
        line-height: 1.35;
    }

    .legal-note dl {
        grid-template-columns: minmax(118px, 38%) minmax(0, 1fr);
    }

    .legal-note dt,
    .legal-note dd {
        padding: 16px;
    }
}
