@import url("reset.css");
@import url("font.css");

:root {
    --paper: #f7f4f0;
    --mist: #e5eaf4;
    --ink: #050505;
    --line: rgb(5 5 5 / 82%);
    --pad: clamp(18px, 4.2vw, 64px);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--paper);
}

body {
    min-width: 320px;
    margin: 0;
    color: var(--ink);
    font-family: Inter, Arial, sans-serif;
    background: var(--paper);
}

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

img {
    display: block;
    max-width: 100%;
}

.history-page {
    overflow-x: hidden;
    background: radial-gradient(circle at 8% 15%, rgb(198 222 246 / 70%) 0 6%, transparent 19%),
    radial-gradient(circle at 94% 48%, rgb(204 226 246 / 70%) 0 5%, transparent 17%),
    linear-gradient(115deg, transparent 0 24%, rgb(61 93 96 / 20%) 24.1% 24.25%, transparent 24.35% 46%, rgb(61 93 96 / 17%) 46.1% 46.25%, transparent 46.35%),
    var(--paper);
}

.history-header {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding: 24px var(--pad);
}

.history-header__logo img {
    width: 54px;
    height: 54px;
}

.history-nav {
    display: flex;
    gap: clamp(18px, 3vw, 46px);
    align-items: center;
    justify-content: center;
    padding: 13px 30px;
    border-radius: 999px;
    background: rgb(188 188 188 / 86%);
    font-size: clamp(13px, 1.25vw, 19px);
    white-space: nowrap;
}

.history-nav a:hover, .history-nav a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.history-menu {
    display: flex;
    grid-column: 3;
    justify-self: end;
    flex-direction: column;
    gap: 6px;
    width: 54px;
    padding: 11px 0 11px 18px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.history-menu span {
    height: 2px;
    width: 36px;
    background: var(--ink);
}

.history-hero {
    border-bottom: 1px solid var(--line);
}

.history-hero__stage {
    position: relative;
    min-height: clamp(450px, 52vw, 760px);
    overflow: hidden;
}

.history-hero__stage::before {
    content: "";
    position: absolute;
    inset: 6% 17% -15% 5%;
    background: url("../assets/img/pic1.png") center / cover no-repeat;
    filter: grayscale(1) contrast(1.22);
    opacity: .72;
    clip-path: polygon(7% 3%, 89% 0, 100% 84%, 0 100%);
}

.history-hero__note {
    position: absolute;
    z-index: 1;
    top: 34%;
    right: clamp(18px, 9vw, 160px);
    padding: clamp(22px, 3vw, 46px);
    border: 1.5px solid var(--ink);
    border-radius: 32px;
    background: var(--mist);
    font-size: clamp(24px, 3.1vw, 48px);
    font-weight: 500;
    line-height: 1.12;
}

.history-gallery {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin-top: -56px;
    padding: 0 var(--pad) 28px;
    overflow: hidden;
}

.history-gallery img {
    width: clamp(140px, 17vw, 270px);
    aspect-ratio: 1.28;
    border-radius: 28px;
    object-fit: cover;
    filter: grayscale(1) contrast(1.12);
}

.history-gallery img:nth-child(1) {
    object-position: center;
}

.history-gallery img:nth-child(2) {
    object-position: center;
}

.history-gallery img:nth-child(3) {
    object-position: center;
}

.history-story {
    display: grid;
    place-items: center;
    min-height: clamp(250px, 30vw, 460px);
    padding: 50px var(--pad);
    border-block: 1px solid var(--line);
    background: rgb(222 228 239 / 82%);
}

.history-story p {
    max-width: 820px;
    margin: 0;
    font-size: clamp(18px, 2vw, 31px);
    font-weight: 500;
    line-height: 1.22;
}

.history-actions, .history-interactive {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding: clamp(48px, 7vw, 100px) var(--pad);
}

.history-actions {
    background: linear-gradient(130deg, transparent, rgb(218 226 242 / 75%), transparent);
}

.history-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 47px;
    padding: 8px clamp(28px, 4vw, 62px);
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    background: rgb(247 244 240 / 66%);
    font-size: clamp(18px, 2.2vw, 30px);
    text-align: center;
    transition: background .2s ease, color .2s ease;
}

.history-button:hover {
    background: var(--ink);
    color: var(--paper);
}

.history-interactive {
    padding-top: 30px;
    text-align: center;
}

.history-interactive h1 {
    margin: 0;
    padding: 6px clamp(22px, 4vw, 56px);
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    font-size: clamp(32px, 5vw, 68px);
    font-weight: 500;
}

.history-interactive > p {
    max-width: 700px;
    margin: 0;
    font-size: clamp(18px, 2vw, 30px);
    line-height: 1.25;
}

.history-interactive__screen {
    position: relative;
    width: min(100%, 820px);
    overflow: hidden;
    border: 1.5px solid var(--ink);
    border-radius: 34px;
    background: var(--mist);
}

.history-interactive__screen img {
    width: 100%;
    height: clamp(240px, 34vw, 480px);
    object-fit: cover;
    object-position: center 30%;
    filter: grayscale(1) blur(2px) contrast(1.15);
}

.history-interactive__screen .history-button {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    background: var(--paper);
}

.history-footer {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 32px;
    padding: clamp(34px, 5vw, 74px) var(--pad);
    background: #bcbcbc;
}

.history-footer > img {
    width: min(45vw, 390px);
}

.history-footer address {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: clamp(14px, 1.6vw, 24px);
    font-style: normal;
    text-align: right;
}

@media (max-width: 850px) {
    .history-nav {
        position: absolute;
        top: 92px;
        left: var(--pad);
        right: var(--pad);
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 15px;
        text-align: center;
        box-shadow: 0 12px 24px rgb(0 0 0 / 12%);
    }

    .history-nav.is-open {
        display: flex;
    }

    .history-nav a {
        padding: 12px;
    }

    .history-hero__note {
        right: 20px;
        top: auto;
        bottom: 50px;
    }

    .history-gallery {
        justify-content: flex-start;
    }

    .history-gallery img {
        width: 43vw;
    }

    .history-gallery img:nth-child(3) {
        display: none;
    }
}

@media (max-width: 520px) {
    .history-header {
        padding-block: 16px;
    }

    .history-header__logo img {
        width: 42px;
        height: 42px;
    }

    .history-menu {
        width: 42px;
    }

    .history-menu span {
        width: 30px;
    }

    .history-hero__stage {
        min-height: 490px;
    }

    .history-hero__stage::before {
        inset: 0;
        opacity: .48;
    }

    .history-hero__note {
        bottom: 26px;
        font-size: 24px;
    }

    .history-gallery {
        margin-top: -26px;
        padding-bottom: 18px;
    }

    .history-gallery img {
        border-radius: 20px;
    }

    .history-story p {
        font-size: 18px;
    }

    .history-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-footer > img {
        width: 250px;
    }

    .history-footer address {
        text-align: left;
    }
}
