/* =========================================================
   /documents
   ========================================================= */

.page-documents {
    background: var(--surface, #ffffff);
}

.page-documents .site-header {
    background: var(--brand-deep, #07145f);
}

.documents-page {
    overflow: clip;
}

/* HERO */

.documents-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e7ebf2;
    background:
        radial-gradient(circle at 78% 36%, rgba(0, 0, 128, .07), transparent 30%),
        linear-gradient(105deg, #f7f9fd 0%, #ffffff 54%, #f1f5fb 100%);
}

.documents-hero__grid {
    min-height: clamp(350px, 30vw, 500px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr);
    gap: clamp(44px, 7vw, 120px);
    align-items: center;
}

.documents-hero__copy {
    z-index: 2;
    padding-block: clamp(44px, 5vw, 78px);
}

.documents-breadcrumbs {
    display: flex;
    gap: 9px;
    align-items: center;
    margin-bottom: clamp(28px, 4vw, 48px);
    color: #7b8499;
    font-size: 12px;
}

.documents-breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.documents-breadcrumbs a:hover {
    color: var(--brand, #000080);
}

.documents-hero h1 {
    max-width: 760px;
    margin: 0 0 22px;
    color: var(--brand-dark, #07124f);
    font-size: clamp(2.6rem, 4.4vw, 5rem);
}

.documents-hero__lead {
    max-width: 650px;
    margin: 0 0 8px;
    color: var(--text, #10162f);
    font-size: clamp(1rem, 1.2vw, 1.22rem);
}

.documents-hero__note {
    margin: 0;
    font-size: .9rem;
}

.documents-hero__visual {
    position: relative;
    min-height: clamp(320px, 28vw, 450px);
    align-self: end;
}

.document-sheet {
    position: absolute;
    overflow: hidden;
    width: clamp(190px, 18vw, 305px);
    aspect-ratio: 1240 / 1754;
    margin: 0;
    border: 8px solid #fff;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(23, 31, 65, .16);
}

.document-sheet img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.document-sheet--front {
    left: 14%;
    bottom: -8%;
    z-index: 2;
    transform: rotate(-3deg);
}

.document-sheet--back {
    left: 47%;
    bottom: -4%;
    opacity: .92;
    transform: rotate(3deg) scale(.94);
}

/* FEATURED LICENSE */

.documents-featured {
    background: #fff;
}

.license-card {
    display: grid;
    grid-template-columns: minmax(300px, .78fr) minmax(0, 1.22fr);
    gap: clamp(32px, 5vw, 82px);
    padding: clamp(22px, 3vw, 48px);
    border: 1px solid #dfe5ef;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(13, 24, 65, .07);
}

.license-card + .license-card {
    margin-top: 32px;
}

.license-card__preview {
    display: grid;
    place-items: center;
    min-height: 540px;
    padding: clamp(16px, 2.4vw, 30px);
    border-radius: 15px;
    background: linear-gradient(150deg, #f5f7fb, #eef2f8);
}

.license-preview-button {
    position: relative;
    width: min(100%, 390px);
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(20, 29, 65, .15);
    cursor: zoom-in;
}

.license-preview-button img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: inherit;
}

.license-preview-button__hint {
    position: absolute;
    left: 50%;
    bottom: 18px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 999px;
    color: #fff;
    background: rgba(7, 20, 95, .88);
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
    transform: translate(-50%, 8px);
    transition: .18s ease;
}

.license-preview-button:hover .license-preview-button__hint,
.license-preview-button:focus-visible .license-preview-button__hint {
    opacity: 1;
    transform: translate(-50%, 0);
}

.license-card__content {
    align-self: center;
}

.license-card__eyebrow {
    margin-bottom: 12px;
}

.license-card h2 {
    max-width: 720px;
    margin: 0;
    color: var(--brand-dark, #07124f);
    font-size: clamp(2rem, 3.2vw, 3.7rem);
}

.license-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    margin-top: 22px;
    padding: 0 13px;
    border: 1px solid #dce8e1;
    border-radius: 999px;
    color: #236c4a;
    background: #f5faf7;
    font-size: 12px;
    font-weight: 700;
}

.license-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #24a56a;
}

.license-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 44px;
    margin: 34px 0 0;
}

.license-meta dt {
    margin-bottom: 6px;
    color: #7a8397;
    font-size: 12px;
    font-weight: 600;
}

.license-meta dd {
    margin: 0;
    color: var(--brand-dark, #07124f);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}

.license-meta__wide {
    grid-column: 1 / -1;
}

.license-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.documents-button {
    min-width: 190px;
    min-height: 52px;
    justify-content: center;
}

/* TRUST */

.documents-trust {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
    border: 1px solid #e1e6ef;
    border-radius: 15px;
    background: #f8faff;
}

.documents-trust__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 94px;
    padding: 20px 26px;
}

.documents-trust__item + .documents-trust__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 24%;
    bottom: 24%;
    width: 1px;
    background: #dce2ed;
}

.documents-trust__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--brand, #000080);
    background: #eef1ff;
    font-weight: 700;
}

.documents-trust strong,
.documents-trust span {
    display: block;
}

.documents-trust strong {
    margin-bottom: 3px;
    color: var(--brand-dark, #07124f);
    font-size: 13px;
}

.documents-trust__item div span {
    color: #7a8397;
    font-size: 11px;
    line-height: 1.45;
}

/* CTA */

.documents-cta {
    padding-top: 0;
    background: #fff;
}

.documents-cta__panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: clamp(28px, 3vw, 44px);
    border: 1px solid #dce4f0;
    border-radius: 18px;
    background: linear-gradient(110deg, #f6f9ff 0%, #fff 72%);
}

.documents-cta__icon {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    border-radius: 16px;
    color: var(--brand, #000080);
    background: #eaf0ff;
    font-size: 30px;
}

.documents-cta__copy h2 {
    margin: 0 0 8px;
    color: var(--brand-dark, #07124f);
    font-size: clamp(1.5rem, 2.2vw, 2.4rem);
}

.documents-cta__copy p {
    max-width: 720px;
    margin: 0;
}

.documents-cta__button {
    min-width: 220px;
    min-height: 54px;
    justify-content: center;
}

/* VIEWER */

.document-viewer {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    color: #fff;
    background: rgba(7, 13, 31, .97);
}

.document-viewer::backdrop {
    background: rgba(4, 9, 23, .72);
    backdrop-filter: blur(8px);
}

.document-viewer[open] {
    display: block;
}

.document-viewer__panel {
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.document-viewer__header {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(18px, 3vw, 44px);
    border-bottom: 1px solid rgba(255,255,255,.12);
    background: rgba(8, 17, 45, .86);
}

.document-viewer__header h2 {
    margin: 0 0 4px;
    color: #fff;
    font-size: clamp(1rem, 1.3vw, 1.25rem);
}

.document-viewer__header p {
    margin: 0;
    color: rgba(255,255,255,.62);
    font-size: 12px;
}

.document-viewer__header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.document-viewer__download {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 9px;
    color: #fff;
    background: rgba(255,255,255,.08);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.document-viewer__close {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: transparent;
    font-size: 30px;
    cursor: pointer;
}

.document-viewer__close:hover {
    background: rgba(255,255,255,.08);
}

.document-viewer__stage {
    position: relative;
    min-height: 0;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) 74px;
    gap: 18px;
    align-items: center;
    padding: clamp(18px, 2.3vw, 34px);
    overflow: hidden;
}

.document-viewer__page-wrap {
    position: relative;
    height: 100%;
    min-height: 0;
    display: grid;
    place-items: center;
}

.document-viewer__page {
    width: auto;
    max-width: min(100%, 900px);
    height: auto;
    max-height: calc(100dvh - 240px);
    object-fit: contain;
    border: 9px solid #fff;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0,0,0,.42);
}

.document-viewer__counter {
    position: absolute;
    left: 50%;
    bottom: 14px;
    min-width: 52px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(4, 10, 29, .78);
    text-align: center;
    font-size: 11px;
    transform: translateX(-50%);
}

.document-viewer__nav {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin: auto;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 50%;
    color: #fff;
    background: rgba(255,255,255,.09);
    font-size: 21px;
    cursor: pointer;
}

.document-viewer__nav:disabled {
    opacity: .28;
    cursor: default;
}

.document-viewer__footer {
    min-height: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(28px, 5vw, 80px);
    padding: 12px clamp(18px, 3vw, 44px);
    border-top: 1px solid rgba(255,255,255,.12);
    background: rgba(8, 17, 45, .86);
}

.document-viewer__thumbs {
    display: flex;
    gap: 12px;
}

.document-viewer__thumb {
    display: grid;
    grid-template-columns: 40px auto;
    align-items: center;
    gap: 8px;
    padding: 5px 9px 5px 5px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: rgba(255,255,255,.68);
    background: transparent;
    font: inherit;
    font-size: 10px;
    cursor: pointer;
}

.document-viewer__thumb img {
    width: 40px;
    height: 56px;
    object-fit: cover;
    border-radius: 3px;
}

.document-viewer__thumb.is-current {
    border-color: rgba(114, 148, 255, .72);
    color: #fff;
    background: rgba(75, 111, 225, .14);
}

.document-viewer__original {
    color: #9eb5ff;
    font-size: 11px;
    font-weight: 600;
}

/* RESPONSIVE */

@media (max-width: 1180px) {
    .documents-hero__grid {
        grid-template-columns: minmax(0, 1fr) 380px;
        gap: 30px;
    }

    .license-card {
        grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
        gap: 36px;
    }

    .documents-cta__panel {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .documents-cta__button {
        grid-column: 2;
        justify-self: start;
    }
}

@media (max-width: 860px) {
    .documents-hero__grid {
        grid-template-columns: 1fr;
    }

    .documents-hero__visual {
        min-height: 390px;
        width: min(100%, 620px);
        margin-inline: auto;
    }

    .document-sheet {
        width: clamp(190px, 42vw, 280px);
    }

    .document-sheet--front {
        left: 24%;
    }

    .document-sheet--back {
        left: 52%;
    }

    .license-card {
        grid-template-columns: 1fr;
    }

    .license-card__preview {
        min-height: auto;
    }

    .documents-trust {
        grid-template-columns: 1fr;
    }

    .documents-trust__item + .documents-trust__item::before {
        top: 0;
        bottom: auto;
        left: 26px;
        right: 26px;
        width: auto;
        height: 1px;
    }
}

@media (max-width: 640px) {
    .documents-hero__copy {
        padding-top: 28px;
        padding-bottom: 12px;
    }

    .documents-breadcrumbs {
        margin-bottom: 24px;
    }

    .documents-hero h1 {
        font-size: clamp(2.2rem, 11vw, 3.4rem);
    }

    .documents-hero__visual {
        min-height: 320px;
    }

    .document-sheet--front {
        left: 12%;
    }

    .document-sheet--back {
        left: 48%;
    }

    .license-card {
        padding: 14px;
        border-radius: 16px;
    }

    .license-card__content {
        padding: 8px 5px 6px;
    }

    .license-meta {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .license-meta__wide {
        grid-column: auto;
    }

    .license-card__actions {
        display: grid;
    }

    .documents-button {
        width: 100%;
    }

    .documents-cta__panel {
        grid-template-columns: 1fr;
        padding: 24px 20px;
    }

    .documents-cta__button {
        grid-column: auto;
        width: 100%;
    }

    .document-viewer__header {
        align-items: flex-start;
        padding: 12px 14px;
    }

    .document-viewer__header h2 {
        max-width: 220px;
        font-size: 13px;
        line-height: 1.35;
    }

    .document-viewer__download {
        padding-inline: 10px;
        font-size: 0;
    }

    .document-viewer__download::after {
        content: "PDF";
        font-size: 11px;
    }

    .document-viewer__stage {
        grid-template-columns: 1fr;
        padding: 10px 10px 4px;
    }

    .document-viewer__page {
        max-width: 100%;
        max-height: calc(100dvh - 250px);
        border-width: 5px;
    }

    .document-viewer__nav {
        position: absolute;
        top: 50%;
        z-index: 2;
        width: 40px;
        height: 40px;
        background: rgba(8, 17, 45, .8);
        transform: translateY(-50%);
    }

    .document-viewer__nav--prev {
        left: 12px;
    }

    .document-viewer__nav--next {
        right: 12px;
    }

    .document-viewer__footer {
        justify-content: space-between;
        gap: 14px;
        min-height: 90px;
        padding: 10px 12px;
        overflow-x: auto;
    }

    .document-viewer__original {
        white-space: nowrap;
    }
}
