* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #fff;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    overflow-x: hidden;
}

.blue {
    color: blue;
}

.gill {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

#Button {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: clamp(10px, 1.5vw, 24px) 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(8px, 10vw, 200px);
    z-index: 100;
    animation: slideDown 0.8s ease both;
}

.mainButton {
    transition: transform 0.4s ease, background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
    border: solid 1px black;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: black;
    width: clamp(88px, 15vw, 280px);
    height: clamp(34px, 3vw, 56px);
    font-size: clamp(12px, 1vw, 18px);
    border-radius: 999px;
}

.mainButton:hover {
    transform: scale(0.92);
    cursor: pointer;
    background-color: black;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.mainButton:active {
    transform: scale(0.85);
}

.mainButton.active {
    background-color: black;
    color: #fff;
}

.layout {
    display: grid;
    grid-template-columns: 50vw 50vw;
    min-height: 100vh;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 5vw;
    padding: 8vw 5vw 5vw;
}

.column-left {
    background-color: #f5f5f7;
}

.column-right {
    background-color: #fff;
}

.card {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    width: 100%;
    aspect-ratio: 40 / 25;
    container-type: inline-size;
    border-radius: 5cqw;
    box-shadow: 0.3vw 0.3vw 2vw 1px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card-white { background-color: #fff; }
.card-gray  { background-color: #f5f5f7; }

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(0, 0, 80, 0.2);
}

.card-title,
.card-price,
.card-note {
    position: absolute;
    white-space: nowrap;
}

.card-title {
    left: 7.5cqw;
    top: 5cqw;
    font-size: 5cqw;
}

.card-price {
    left: 7.5cqw;
    top: 52.5cqw;
    font-size: 5cqw;
}

.card-note {
    left: 37.5cqw;
    top: 47.5cqw;
    font-size: 3.5cqw;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}

.card-img {
    position: absolute;
    z-index: 10;
    mix-blend-mode: multiply;
    animation: float 4s ease-in-out infinite;
    transition: transform 0.5s ease;
}

.img-left {
    width: 40cqw;
    left: 17.5cqw;
    top: 10cqw;
}

#CardImg {
    top: 5cqw;
}

.img-right {
    width: 30cqw;
    left: 35cqw;
    top: 20cqw;
}

.card:hover .card-img {
    transform: scale(1.06) rotate(-2deg);
}

.card .blue {
    background-image: linear-gradient(blue, blue);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 2px;
    transition: background-size 0.5s ease;
}

.card:hover .blue {
    background-size: 100% 2px;
}

.page-section {
    min-height: 70vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3vw;
    background: #fff;
}

#portfolio {
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 3vw;
    padding: 6vw 5vw 6vw;
}

#portfolio h2 {
    text-align: center;
}

.works {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2vw;
}

.work {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 40 / 25;
    container-type: inline-size;
    border-radius: 5cqw;
    overflow: hidden;
    background-color: #f5f5f7;
    box-shadow: 0.3vw 0.3vw 2vw 1px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.work img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.work:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(0, 0, 80, 0.2);
}

.work:hover img {
    transform: scale(1.08);
}

.footer {
    background: #f5f5f7;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5vw;
    padding: 4vw 5vw 2.5vw;
}

.footer-button {
    display: inline-flex;
    align-items: center;
    gap: 0.8vw;
    padding: 1vw 2.5vw;
    border-radius: 999px;
    background: black;
    color: #fff;
    text-decoration: none;
    font-size: clamp(14px, 1.3vw, 22px);
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
}

.footer-button svg {
    width: clamp(18px, 1.6vw, 28px);
    height: clamp(18px, 1.6vw, 28px);
    fill: #fff;
    transition: transform 0.4s ease;
}

.footer-button:hover {
    background-color: #1a1aff;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 80, 0.3);
}

.footer-button:hover svg {
    transform: translateX(4px) rotate(-10deg);
}

.footer-button:active {
    transform: scale(0.95);
}

.footer-link {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: clamp(12px, 1vw, 16px);
    color: #555;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: blue;
}

.footer-copy {
    font-size: clamp(11px, 0.9vw, 14px);
    color: #999;
}

.privacy {
    margin: auto;
    border: none;
    border-radius: 2vw;
    width: min(90vw, 700px);
    max-height: 85vh;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.privacy::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.privacy[open] {
    animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.privacy-box {
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px 32px 32px;
    font-size: 15px;
    line-height: 1.6;
    color: #222;
}

.privacy-box h3 {
    font-size: 24px;
    margin-bottom: 4px;
}

.privacy-box h4 {
    font-size: 16px;
    margin: 18px 0 4px;
}

.privacy-date {
    color: #999;
    font-size: 13px;
}

.privacy-box a {
    color: blue;
}

.privacy-close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #f5f5f7;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.privacy-close:hover {
    background: black;
    color: #fff;
    transform: rotate(90deg);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-40px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -10px; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(50px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.js .reveal {
    opacity: 0;
}

.js .reveal.visible {
    opacity: 1;
    animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@media (max-width: 800px) {
    .layout {
        grid-template-columns: 100vw;
        min-height: 0;
    }

    .column {
        gap: 7vw;
        padding: 20vw 5vw 7vw;
    }

    .column-right {
        padding-top: 7vw;
    }

    .card {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }

    .card-title,
    .card-price {
        font-size: 5.5cqw;
    }

    .card-note {
        font-size: 4cqw;
    }

    .card:hover {
        transform: none;
    }

    .page-section {
        font-size: 8vw;
    }

    #portfolio {
        gap: 6vw;
        padding: 18vw 4vw 10vw;
    }

    .works {
        gap: 3vw;
    }

    .work {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    }

    .work:hover {
        transform: none;
    }

    .footer {
        gap: 4vw;
        padding: 10vw 5vw 6vw;
    }

    .footer-button {
        gap: 2vw;
        padding: 3vw 7vw;
    }

    .footer-button:hover {
        transform: none;
    }

    .privacy {
        border-radius: 5vw;
    }

    .privacy-box {
        padding: 24px 20px 26px;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }

    .js .reveal {
        opacity: 1;
    }
}