* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    color: #222;
}

main {
    flex: 1;
}

/* HEADER */

.site-header {
    position: relative;
    z-index: auto;
    border-bottom: 0;
    box-shadow: none;
    background:
      linear-gradient(
        to right,
        rgba(255,255,255,1) 0%,
        rgba(255,255,255,1) 26%,
        rgba(255,255,255,0.82) 48%,
        rgba(255,255,255,0.36) 74%,
        rgba(255,255,255,0) 100%
      );
}

.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -72px;
    height: 72px;
    pointer-events: none;

}



.site-header__inner {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 34px;
    min-height: 104px;
    padding: 0 40px;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
    padding: 10px 0 14px;
    color: inherit;
    text-decoration: none;
}

.site-header__shield {
    position: relative;
    z-index: 20;
    flex: 0 0 auto;
    margin-bottom: -42px;
    filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.16));
}

.site-header__shield img {
    display: block;
    width: 118px;
    max-width: 118px;
    height: auto;
    margin-bottom: -50px;
}

.site-header__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.site-header__order-name {
    margin-bottom: 6px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6a5d52;
}

.site-header__priory-name {
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1.08;
    font-weight: 700;
    color: #17120f;
}

/* NAV */

.site-nav {
    position: relative;
    z-index: 1000;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 0;
}

.site-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    padding: 0 18px;
    border: none;
    background: transparent;
    background-image:
        linear-gradient(
            to bottom,
            transparent 50%,
            rgba(155, 17, 30, 0.07) 50%
        );
    background-size: 100% 200%;
    background-position: 0 0%;
    overflow: hidden;
    cursor: pointer;
    white-space: nowrap;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    color: #17120f;
    text-decoration: none;
    transition:
        background-position 0.5s ease,
        color 220ms ease;
}

.site-nav__link span {
    position: relative;
    z-index: 3;
}

.site-nav__link::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -34px;
    width: 16px;
    height: 16px;
    opacity: 0;
    z-index: 1;
    background: url("/assets/images/nav-cross.png") center / contain no-repeat;
    transform: translateX(-50%) translateY(-2px);
    transition:
        top 220ms ease,
        opacity 180ms ease,
        transform 220ms ease;
}

.site-nav__link:hover,
.site-nav__link.is-active {
    color: #9b111e;
    background-position: 0 100%;
    text-shadow: 0 0 1px rgba(179, 18, 34, 0.18);
}

.site-nav__link:hover::before,
.site-nav__link.is-active::before {
    top: 14px;
    opacity: 0.22;
    transform: translateX(-50%) translateY(0);
}

/* MOBILE NAV */

.mobile-nav-toggle {
    display: none;
    padding: 9px 13px;
    border: 1px solid rgba(155, 17, 30, 0.35);
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    color: #2c2520;
}

/* FOOTER */

.inst-footer {
    position: relative;
    margin-top: 0;
    background: #f4efe6;
    color: #241d18;
    border-top: 1px solid rgba(111, 76, 42, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.inst-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 0.72), transparent 30%),
        radial-gradient(circle at 78% 22%, rgba(199, 154, 91, 0.12), transparent 34%),
        linear-gradient(90deg, rgba(120, 82, 42, 0.045), transparent 18%, transparent 78%, rgba(120, 82, 42, 0.04));
}

.inst-footer__virtues,
.inst-footer__body,
.inst-footer__motto {
    position: relative;
    z-index: 1;
}

/* FOOTER VALUE STRIP */

.inst-footer__virtues {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.18)),
        #f5f1e8;
    border-top: 1px solid rgba(126, 16, 24, 0.20);
    border-bottom: 1px solid rgba(178, 137, 72, 0.28);
}

.inst-footer__virtues-inner {
    width: min(100%, 1520px);
    margin: 0 auto;
    padding: 28px clamp(36px, 5vw, 76px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inst-footer__virtue {
    position: relative;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    min-height: 132px;
    padding: 28px 34px;
    border-right: 1px solid rgba(178, 137, 72, 0.28);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0));
    overflow: hidden;
}

.inst-footer__virtue:first-child {
    border-left: 1px solid rgba(178, 137, 72, 0.28);
}

.inst-footer__virtue::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(178, 137, 72, 0);
    background:
        radial-gradient(circle at 50% 50%, rgba(183, 138, 70, 0.08), transparent 62%);
    opacity: 0;
    transition:
        opacity 180ms ease,
        border-color 180ms ease;
}

.inst-footer__virtue::after {
    content: "";
    position: absolute;
    left: 34px;
    right: 34px;
    bottom: 20px;
    height: 2px;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(183, 138, 70, 0.62),
            transparent
        );
    opacity: 0;
    transform: scaleX(0.45);
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.inst-footer__virtue:hover::before {
    opacity: 1;
    border-color: rgba(178, 137, 72, 0.22);
}

.inst-footer__virtue:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

.inst-footer__icon {
    position: relative;
    z-index: 1;
    width: 66px;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b78943;
    font-size: 2.55rem;
    line-height: 1;
    transition:
        color 180ms ease,
        transform 180ms ease,
        text-shadow 180ms ease;
}

.inst-footer__virtue:hover .inst-footer__icon {
    color: #8f111d;
    transform: scale(1.06);
    text-shadow: 0 0 18px rgba(143, 17, 29, 0.16);
}

.inst-footer__icon svg {
    width: 58px;
    height: 58px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.inst-footer__virtue > div:not(.inst-footer__icon) {
    position: relative;
    z-index: 1;
}

.inst-footer__virtue h2 {
    position: relative;
    margin: 0 0 12px;
    color: #17120e;
    font-size: 0.84rem;
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.inst-footer__virtue h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -7px;
    width: 34px;
    height: 1px;
    background: rgba(183, 138, 70, 0.48);
    transition:
        width 180ms ease,
        background 180ms ease;
}

.inst-footer__virtue:hover h2::after {
    width: 58px;
    background: rgba(143, 17, 29, 0.45);
}

.inst-footer__virtue p {
    margin: 0;
    color: rgba(35, 28, 22, 0.82);
    font-size: 1rem;
    line-height: 1.58;
    font-weight: 500;
}

/* FOOTER BODY */

.inst-footer__body {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0)),
        #fff;
    border-bottom: 2px solid rgba(126, 93, 54, 0.14);
}

.inst-footer__body-inner {
    width: min(100%, 1780px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(420px, 0.95fr) minmax(0, 1.65fr);
    gap: clamp(44px, 5vw, 90px);
    align-items: start;
    padding: 24px clamp(56px, 7vw, 116px) 22px;
}

.inst-footer__identity {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    min-width: 0;
    padding-right: 36px;
}

.inst-footer__crest {
    width: 150px;
    height: auto;
    flex-shrink: 0;
}

.inst-footer__name {
    margin: 0 0 10px;
    max-width: 14ch;
    color: #16120f;
    font-size: clamp(2.05rem, 2vw, 2.65rem);
    line-height: 0.94;
    font-weight: 800;
    letter-spacing: -0.055em;
}

.inst-footer__order {
    margin: 0 0 18px;
    color: #a07435;
    font-size: 0.82rem;
    line-height: 1.45;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.inst-footer__statement {
    margin: 0;
    max-width: 43ch;
    color: rgba(38, 30, 22, 0.82);
    font-size: 0.98rem;
    line-height: 1.82;
}

.inst-footer__nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-left: 1px solid rgba(177, 136, 83, 0.26);
}

.inst-footer__column {
    min-height: 104px;
    padding: 0 clamp(24px, 2.4vw, 44px);
    border-right: 1px solid rgba(177, 136, 83, 0.26);
}

.inst-footer__column h2 {
    margin: 0 0 8px;
    font-size: 0.68rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #a46f36;
}

.inst-footer__column a {
    position: relative;

    display: block;
    width: fit-content;

    margin: 10px 0;
    padding: 3px 0;

    color: rgba(38, 31, 24, 0.78);

    font-size: 0.96rem;
    line-height: 1.35;

    text-decoration: none;

    transition:
        color 180ms ease,
        letter-spacing 180ms ease;
}

.inst-footer__column a::before,
.inst-footer__column a::after {
    content: "";

    position: absolute;
    left: 50%;

    width: 0;
    height: 1px;

    background: rgba(126, 16, 24, 0.48);

    transition:
        width 220ms ease,
        left 220ms ease,
        background 220ms ease;
}

.inst-footer__column a::before {
    top: 0;
}

.inst-footer__column a::after {
    bottom: 0;
}

.inst-footer__column a:hover {
    color: #7d1118;
}

.inst-footer__column a:hover::before,
.inst-footer__column a:hover::after {
    left: 0;
    width: 100%;
    background: rgba(183, 138, 70, 0.72);
}

/* FOOTER MOTTO */

.inst-footer__motto {
    min-height: 57px;
    padding: 24px clamp(56px, 7vw, 116px) 22px;
    display: grid;
    grid-template-columns: 42px minmax(0, auto) 42px;
    align-items: center;
    justify-content: center;
    gap: clamp(72px, 13vw, 245px);
    background:
        linear-gradient(180deg, #8e0710 0%, #690307 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.20);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.24);
    text-align: center;
    color: #fff;
}

.inst-footer__motto span[lang="la"] {
    display: block;
    font-size: clamp(0.72rem, 1vw, 0.92rem);
    line-height: 1;
    font-weight: 500;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    white-space: nowrap;
}

.inst-footer__cross {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.32rem;
    line-height: 1;
    color: #c99a52;
    opacity: 0.96;
}

/* FOOTER RESPONSIVE */

@media (max-width: 1180px) {
    .inst-footer__virtues-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-inline: 42px;
    }

    .inst-footer__virtue:nth-child(2) {
        border-right: none;
    }

    .inst-footer__virtue:nth-child(-n + 2) {
        border-bottom: 1px solid rgba(178, 137, 72, 0.20);
    }

    .inst-footer__body-inner {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-inline: 42px;
    }

    .inst-footer__nav {
        border-left: none;
        border-top: 1px solid rgba(177, 136, 83, 0.24);
        padding-top: 18px;
    }

    .inst-footer__column:first-child {
        border-left: 1px solid rgba(177, 136, 83, 0.26);
    }
}

@media (max-width: 760px) {
    .inst-footer__virtues-inner {
        grid-template-columns: 1fr;
        padding: 24px 28px 18px;
    }

    .inst-footer__virtue,
    .inst-footer__virtue:first-child {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 16px;
        min-height: auto;
        padding: 20px 0;
        border-left: none;
        border-right: none;
        border-bottom: 1px solid rgba(178, 137, 72, 0.20);
    }

    .inst-footer__icon,
    .inst-footer__icon svg {
        width: 46px;
        height: 46px;
        font-size: 2rem;
    }

    .inst-footer__body-inner {
        padding: 22px 28px;
    }

    .inst-footer__identity {
        gap: 16px;
        padding-right: 0;
    }

    .inst-footer__crest {
        width: 68px;
    }

    .inst-footer__name {
        font-size: 1.7rem;
    }

    .inst-footer__nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 22px;
    }

    .inst-footer__column,
    .inst-footer__column:first-child {
        min-height: auto;
        padding: 0 18px;
        border-left: none;
        border-right: 1px solid rgba(177, 136, 83, 0.22);
    }

    .inst-footer__column:nth-child(even) {
        border-right: none;
    }

    .inst-footer__motto {
        min-height: 54px;
        grid-template-columns: 24px minmax(0, 1fr) 24px;
        gap: 14px;
        padding-inline: 18px;
    }

    .inst-footer__motto span[lang="la"] {
        white-space: normal;
        letter-spacing: 0.20em;
        line-height: 1.35;
    }
}

/* RESPONSIVE */

@media (max-width: 1200px) {
    .site-header__inner {
        gap: 22px;
    }

    .site-header__shield {
        margin-bottom: -34px;
    }

    .site-header__shield img {
        width: 104px;
        max-width: 104px;
    }

    .site-nav__link {
        min-width: 96px;
        padding: 0 12px;
        font-size: 0.82rem;
    }

    .site-header__order-name {
        font-size: 0.64rem;
        letter-spacing: 0.08em;
    }

    .site-header__priory-name {
        font-size: 1.45rem;
    }
}

@media (max-width: 980px) {
    .site-header__inner {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 16px;
        min-height: auto;
        padding: 16px 24px;
    }

    .site-header__brand {
        min-width: 0;
        padding: 0;
    }

    .site-header__shield {
        margin-bottom: 0;
    }

    .site-header__shield img {
        width: 82px;
        max-width: 82px;
    }

    .site-header__order-name {
        display: none;
    }

    .site-header__priory-name {
        font-size: 1.25rem;
    }

    .mobile-nav-toggle {
        display: block;
        grid-column: 2;
        grid-row: 1;
    }

    .site-nav {
        display: none;
        flex-direction: column;
        grid-column: 1 / -1;
        width: 100%;
        padding-top: 8px;
    }

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

    .site-nav__link {
        justify-content: flex-start;
        width: 100%;
        min-width: 0;
        min-height: 46px;
        padding: 0 14px 0 90px;
        background-image: none;
        overflow: visible;
    }

    .site-nav__link::before {
        left: 16px;
        top: 50%;
        width: 15px;
        height: 15px;
        transform: translateY(-50%);
    }

    .site-nav__link:hover::before,
    .site-nav__link.is-active::before {
        top: 50%;
        opacity: 0.32;
        transform: translateY(-50%);
    }

    .site-nav__link:hover,
    .site-nav__link.is-active {
        background: rgba(155, 17, 30, 0.055);
        text-shadow: none;
    }

}

@media (max-width: 620px) {
    .site-header__inner {
        padding: 14px 18px;
    }

    .site-header__brand {
        gap: 12px;
    }

    .site-header__shield img {
        width: 68px;
        max-width: 68px;
    }

    .site-header__priory-name {
        font-size: 1.04rem;
        line-height: 1.12;
    }
}