:root {
    --modal-desktop-l: 1440px;
}

/* =========================================================
   PAGE BACKGROUND
   ========================================================= */

.concepts-page {
    min-height: 100vh;

    /* Static exhibition wall */
    background-color: #f2f2f2;
    background-image: url("../assets/img/permanent/concepts/background/gulliver.png");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;

    font-family: "Montserrat", system-ui, sans-serif;
    color: #1a1a1a;

    position: relative;
    overflow-x: hidden;
}

/* =========================================================
   FIXED BACK LINK
   ========================================================= */

.back-to-permanent {
    position: fixed;
    top: 22px;
    left: 22px;
    z-index: 100;

    padding: 10px 14px;
    border-radius: 6px;

    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);

    color: #1f5cff;
    font-weight: 600;
    text-decoration: none;

    transition: background 160ms ease;
}

.back-to-permanent:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* =========================================================
   HEADER (vanishes on scroll)
   ========================================================= */

.concepts-header {
    max-width: 1100px;
    margin: 120px auto 80px;
    padding: 0 24px;
    text-align: center;

    transition: opacity 300ms ease, transform 300ms ease;
}

.concepts-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 900;
    color: #1f5cff;
    margin-bottom: 18px;
}

.concepts-description {
    font-size: 18px;
    line-height: 1.5;
    color: #5b5b5b;
}

/* hidden state (JS toggles this) */
.concepts-header.is-hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

/* =========================================================
   GRID
   ========================================================= */

.concepts-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 120px;

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 64px 48px;
}

/* =========================================================
   THUMBNAIL CARD (REUSABLE)
   ========================================================= */

.concept-card {
    cursor: url("../assets/cursor/magnifier.svg") 16 16, zoom-in;
}

.concept-thumb {
    position: relative;
    overflow: hidden;

    border: 2px solid #1f5cff;
}

.concept-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.concept-title {
    margin-top: 10px;

    display: inline-block;
    padding: 6px 10px;

    border: 2px solid #1f5cff;
    color: #1f5cff;

    font-size: 14px;
    font-weight: 600;
}

/* =========================
   CONCEPT MODAL (overlay)
   ========================= */
.concept-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    background: rgba(0, 0, 0, 0.55);
}

.concept-modal-backdrop[aria-hidden="false"] {
    display: block;
}

.concept-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    pointer-events: none;
}

.concept-modal-description {
    max-width: 100%;
    padding-left: 2.5vw;
    padding-right: 2.5vw;
}

.concept-modal-close {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 3;

    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;

    cursor: pointer;
    pointer-events: auto;

    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 34px;
    line-height: 44px;
    text-align: center;

    transition: transform 120ms ease, opacity 120ms ease;
}

.concept-modal-close:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.concept-modal-scroll {
    pointer-events: auto;
    width: 100%;
    height: 100%;

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    /* Shared modal background */
    background-color: #f2f2f2;
    background-image: url("/assets/img/permanent/concepts/background/concept_bg.png");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;

    padding: 80px 0 60px;
}

.concept-modal-inner {
    width: min(var(--modal-desktop-l), 100vw);
    margin: 0 auto;
}

/* Fallback image (when modal html is missing) */
.concept-modal-fallback {
    display: block;
    width: 100%;
    height: auto;

    border: 3px solid rgba(1, 40, 156, 0.6);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.20);
    background: rgba(255, 255, 255, 0.55);
}


.concept-modal-content {
    padding: 22px 0 10px;
}

.concept-modal-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    color: #ffffff;
    padding: 14px 18px;

    background: rgba(1, 40, 156, 0.78);
    backdrop-filter: blur(8px);

    border-radius: 10px;
    margin-bottom: 18px;
}

.concept-modal-brand {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.95;
}

.concept-modal-name {
    margin: 6px 0 4px;
    font-size: clamp(28px, 3.8vw, 44px);
    font-weight: 900;
    letter-spacing: -0.02em;
}

.concept-modal-contrib {
    font-size: 13px;
    opacity: 0.95;
}

.concept-modal-block {
    margin: 18px 0;
}

.concept-modal-caseboard img,
.concept-modal-asset {
    width: 100%;
    height: auto;
    display: block;

    border-radius: 10px;
    border: 3px solid rgba(1, 40, 156, 0.55);
    box-shadow: 0 18px 55px rgba(0,0,0,0.18);
}

.concept-modal-video-frame {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid rgba(1, 40, 156, 0.55);
    box-shadow: 0 18px 55px rgba(0,0,0,0.18);
    background: #000;
}

.concept-modal-video-frame iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    display: block;
}

.concept-modal-assets {
    display: grid;
    gap: 16px;
}

.concept-modal-awards {
    padding: 16px 18px;
    border-radius: 10px;
    background: rgba(1, 40, 156, 0.85);
    color: #ffffff;
}

.concept-modal-awards-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 900;
}

.concept-modal-awards-list {
    margin: 0;
    padding-left: 18px;
    line-height: 1.45;
    font-size: 13px;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {
    .concepts-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .concepts-header {
        margin-top: 100px;
    }

    .concept-modal-scroll {
        padding-top: 68px;

        /* iOS Safari often ignores fixed backgrounds */
        background-attachment: scroll;
    }

    .concept-modal-description {
        padding-left: 1vw;
        padding-right: 1vw;
    }
}
