/* Fontemaggi Member: header control, access modal, member area, home band. */

/* Header ------------------------------------------------------------------ */
.fm-member-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 4px 14px 4px 10px;
    border: 1px solid rgba(255, 255, 255, .7);
    background: rgba(255, 255, 255, .06);
    color: inherit;
    font-family: var(--fm-head);
    letter-spacing: .14em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background-color .25s var(--fm-ease), color .25s var(--fm-ease), border-color .25s var(--fm-ease);
}
.fm-member-button::after {
    content: '';
    position: absolute;
    inset: -1px;
    pointer-events: none;
    border: 1px solid transparent;
    background: linear-gradient(120deg, rgba(137, 181, 190, 0), rgba(137, 181, 190, .9), rgba(137, 181, 190, 0)) border-box;
    -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity .3s;
}
.fm-member-button:hover { background: #fff; border-color: #fff; color: var(--fm-dark); }
.fm-member-button:hover::after { opacity: 1; }
.fm-member-button__icon { flex-shrink: 0; }
.fm-member-button__label { display: flex; flex-direction: column; align-items: flex-start; font-size: 12.5px; line-height: 1.05; }
.fm-member-button__label small { margin-bottom: 2px; font-size: 8.5px; letter-spacing: .24em; opacity: .75; }
.fm-header.is-scrolled .fm-member-button { border-color: var(--fm-dark); background: transparent; }
.fm-header.is-scrolled .fm-member-button:hover { background: var(--fm-dark); color: #fff; }
.fm-member-button.is-member { padding-left: 5px; }
.fm-member-avatar {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fm-primary), var(--fm-secondary));
    color: #fff;
    font-family: var(--fm-head);
    font-size: 12px;
    letter-spacing: .06em;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
}
.fm-member-avatar--large { width: 54px; height: 54px; font-size: 19px; }
.fm-member-menu__list {
    --bs-dropdown-min-width: 250px;
    --bs-dropdown-border-radius: 0;
    --bs-dropdown-border-width: 0;
    --bs-dropdown-padding-y: 8px;
    --bs-dropdown-link-active-bg: var(--fm-dark);
    box-shadow: 0 18px 40px rgba(7, 55, 83, .18);
}
.fm-member-menu__head { display: flex; flex-direction: column; gap: 2px; padding: 10px 20px 12px; border-bottom: 1px solid #e6ebec; margin-bottom: 6px; color: #1e3a48; font-size: 14px; }
.fm-member-menu__head span { color: #6b7c80; font-size: 12px; overflow-wrap: anywhere; }
.fm-member-menu__list .dropdown-item { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 8px 20px; color: #1e3a48; font-size: 14px; }
.fm-member-menu__list .dropdown-item:hover,
.fm-member-menu__list .dropdown-item:focus { background: #eef3f4; color: var(--fm-dark); }
.fm-member-menu__count { min-width: 24px; padding: 2px 7px; background: var(--fm-primary); color: #fff; font-size: 11px; text-align: center; }

/* Access modal ------------------------------------------------------------- */
.fm-member-modal .modal-dialog { max-width: 470px; }
.fm-member-modal .modal-content { position: relative; overflow: hidden; border: 0; border-radius: 0; box-shadow: 0 30px 80px rgba(7, 37, 55, .35); }
.fm-member-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
    color: #1e3a48;
    transition: transform .3s var(--fm-ease);
}
.fm-member-modal__close:hover { transform: rotate(90deg); }
.fm-member-modal__benefits { padding: 30px 26px 28px; background: #e9edee; text-align: center; }
.fm-member-modal__badge {
    display: inline-flex;
    gap: 6px;
    margin: 0 0 10px;
    padding: 4px 10px;
    border: 1px solid rgba(8, 110, 138, .35);
    color: var(--fm-primary);
    font-family: var(--fm-head);
    font-size: 11px;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.fm-member-modal__badge span { font-weight: 300; }
.fm-member-modal__benefits-title { margin: 0 0 22px; color: #1e3a48; font-family: var(--fm-head); font-size: 30px; font-weight: 300; letter-spacing: .01em; }
.fm-member-modal__benefits ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.fm-member-modal__benefits li { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #4b5d63; font-size: 13px; line-height: 1.45; }
.fm-member-modal__benefits svg { color: var(--fm-primary); }
.fm-member-modal__body { padding: 28px 30px 30px; text-align: center; }
body.reference-home4 .fm-member-modal__title { margin: 0 0 4px; color: #1e3a48; font-family: var(--fm-head); font-size: 30px; font-weight: 300; letter-spacing: .01em; line-height: 1.2; }
.fm-member-modal__context { margin: 0 0 20px; color: #4b5d63; font-size: 14.5px; }
.fm-member-modal__context a { color: var(--fm-primary); text-decoration: underline; }
.fm-member-modal__email { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 10px; margin: 0 0 18px; color: #4b5d63; font-size: 14px; overflow-wrap: anywhere; }
.fm-member-modal__body form { text-align: left; }
.fm-member-label { display: block; margin: 0 0 6px; color: #4b5d63; font-size: 12px; font-weight: 500; }
.fm-member-label span { font-weight: 400; color: #8b9c98; }
.fm-member-input {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 0;
    background: #e9edee;
    color: #1e3a48;
    font-size: 16px;
    transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.fm-member-input::placeholder { color: #8a979b; }
.fm-member-input:focus { outline: 0; border-color: var(--fm-primary); background: #fff; box-shadow: 0 0 0 3px rgba(8, 110, 138, .15); }
.fm-member-input[aria-invalid="true"] { border-color: #b3261e; background: #fff; }
.fm-member-password { position: relative; }
.fm-member-password .fm-member-input { padding-right: 84px; }
.fm-member-password button { position: absolute; top: 3px; right: 3px; bottom: 3px; min-width: 72px; border: 0; background: none; color: var(--fm-primary); font-size: 12px; font-weight: 600; }
.fm-member-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fm-member-hint { margin: 6px 0 0; color: #8b9c98; font-size: 12px; }
.fm-member-error { min-height: 0; margin: 6px 0 0; color: #b3261e; font-size: 12.5px; }
.fm-member-error:empty { margin: 0; }
.fm-member-consent { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 0; color: #4b5d63; font-size: 12.5px; line-height: 1.5; }
.fm-member-consent input { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--fm-primary); }
.fm-member-consent a { color: var(--fm-primary); text-decoration: underline; }
.fm-member-submit { width: 100%; margin-top: 16px; font-family: var(--fm-head); font-size: 14px; letter-spacing: .16em; min-height: 52px; }
.fm-member-submit.is-busy { opacity: .7; cursor: progress; }
.fm-member-or { display: flex; align-items: center; gap: 14px; margin: 18px 0 14px; color: #8b9c98; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; }
.fm-member-or::before,
.fm-member-or::after { content: ''; flex: 1; height: 1px; background: #dde3e4; }
.fm-member-google { display: flex; justify-content: center; min-height: 44px; }
.fm-member-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; padding: 0; border: 0; background: none; color: #1e3a48; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
.fm-member-modal__email .fm-member-link { min-height: 0; margin: 0; color: var(--fm-primary); font-size: 13px; }
.fm-member-message { margin: 16px 0 0; padding: 12px 14px; background: #eef3f4; color: #1e3a48; font-size: 13.5px; text-align: left; }
.fm-member-done { padding: 22px 0 10px; color: var(--fm-primary); }
.fm-member-done svg { margin-bottom: 14px; }
.fm-member-modal :is(a, button, input):focus-visible { outline: 2px solid var(--fm-primary); outline-offset: 2px; }

/* Member area (offcanvas) ---------------------------------------------------- */
.fm-area.offcanvas { --bs-offcanvas-width: min(480px, 100vw); border: 0; background: #f4f1eb; }
.fm-area__head { position: relative; display: flex; align-items: center; gap: 16px; padding: 26px 28px 22px; background: var(--fm-dark); color: #fff; }
.fm-area__who { min-width: 0; }
.fm-area__badge { display: block; color: var(--fm-secondary); font-family: var(--fm-head); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; }
body.reference-home4 .fm-area__head h2 { margin: 2px 0 0; color: #fff; font-family: var(--fm-head); font-size: 24px; font-weight: 400; letter-spacing: .04em; line-height: 1.2; }
.fm-area__email { display: block; color: rgba(255, 255, 255, .7); font-size: 13px; overflow-wrap: anywhere; }
.fm-area__close { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: none; color: #fff; }
.fm-area__body { padding: 8px 28px 24px; }
.fm-area__loading { margin: 24px 0; color: var(--muted); font-size: 14px; }
.fm-area__section { padding: 22px 0 26px; border-bottom: 1px solid var(--line); }
.fm-area__heading { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.fm-area__heading h3 { margin: 0; color: var(--ink); font-family: var(--fm-display); font-size: 30px; font-weight: 400; letter-spacing: .02em; text-transform: uppercase; }
.fm-area__count { min-width: 24px; padding: 2px 7px; background: var(--fm-primary); color: #fff; font-size: 11px; text-align: center; }
.fm-area__empty,
.fm-area__hint { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.fm-area__favorites { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.fm-saved { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 12px; background: #fff; }
.fm-saved__media img { width: 96px; height: 72px; object-fit: cover; }
.fm-saved__body { min-width: 0; }
.fm-saved__meta { display: block; color: var(--fm-primary); font-family: var(--fm-head); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; }
.fm-saved__title { display: block; margin: 2px 0; color: var(--ink); font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.fm-saved__title:hover { color: var(--fm-primary); }
.fm-saved__info { display: block; color: var(--muted); font-size: 12.5px; }
.fm-saved__note { display: block; width: 100%; margin-top: 10px; padding: 8px 10px; border: 1px solid var(--line); background: #faf9f5; color: var(--ink); font-size: 14px; line-height: 1.5; resize: vertical; }
.fm-saved__note:focus { outline: 0; border-color: var(--fm-primary); background: #fff; }
.fm-saved__actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.fm-saved__status { margin-right: auto; color: #2e7d4f; font-size: 12px; }
.fm-saved__action { min-height: 36px; padding: 0; border: 0; background: none; color: var(--fm-primary); font-size: 12.5px; font-weight: 600; }
.fm-saved__action:hover { color: var(--ink); text-decoration: underline; }
.fm-area__alerts { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.fm-area__alerts li { display: flex; align-items: center; gap: 10px; padding: 10px 6px 10px 12px; background: #fff; color: var(--ink); font-size: 13.5px; }
.fm-area__alerts li svg { flex-shrink: 0; color: var(--fm-primary); }
.fm-area__alerts li span { flex: 1; min-width: 0; }
.fm-area__alerts li button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; background: none; color: var(--muted); }
.fm-area__alerts li button:hover { color: #b3261e; }
.fm-area__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-bottom: 14px; }
.fm-area__fields label span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11.5px; }
.fm-area__fields select,
.fm-area__fields input { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--ink); font-size: 15px; }
.fm-area__alert-form .fm-btn { width: 100%; min-height: 48px; font-family: var(--fm-head); font-size: 13px; letter-spacing: .16em; }
.fm-area__error { margin: 10px 0 0; color: #b3261e; font-size: 13px; }
.fm-area__foot { padding: 12px 28px 20px; border-top: 1px solid var(--line); }
.fm-area :is(a, button, textarea, select, input):focus-visible { outline: 2px solid var(--fm-primary); outline-offset: 2px; }

/* Home band ------------------------------------------------------------------ */
.fm-member-band { position: relative; overflow: hidden; padding: 112px 0; background: radial-gradient(70% 90% at 85% 40%, #0b5170 0%, var(--fm-dark) 60%, #052a40 100%); color: #fff; }
.fm-member-band::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 22px);
}
.fm-member-band__inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 64px; }
.fm-member-band__eyebrow { display: inline-block; margin-bottom: 20px; padding: 5px 12px; border: 1px solid rgba(137, 181, 190, .55); color: var(--fm-secondary); font-family: var(--fm-head); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; }
body.reference-home4 .fm-member-band h2 { margin: 0 0 22px; color: #fff; font-family: var(--fm-display); font-size: clamp(56px, 6.4vw, 96px); font-weight: 400; letter-spacing: .01em; line-height: .96; text-transform: uppercase; }
.fm-member-band h2 span { display: block; }
.fm-member-band h2 span + span { color: var(--fm-secondary); }
.fm-member-band__lead { max-width: 520px; margin: 0 0 28px; color: rgba(255, 255, 255, .86); font-size: 16.5px; line-height: 1.75; }
.fm-member-band__benefits { display: grid; gap: 14px; margin: 0 0 36px; padding: 0; list-style: none; }
.fm-member-band__benefits li { display: flex; align-items: center; gap: 14px; color: rgba(255, 255, 255, .86); font-size: 15px; }
.fm-member-band__benefits svg { flex-shrink: 0; padding: 9px; width: 40px; height: 40px; border: 1px solid rgba(137, 181, 190, .45); border-radius: 50%; color: var(--fm-secondary); }
.fm-member-band__benefits strong { color: #fff; font-weight: 600; }
.fm-member-band__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.fm-member-band__signin { min-height: 44px; padding: 0; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .5); background: none; color: #fff; font-size: 14px; }
.fm-member-band__signin:hover { border-color: #fff; }
.fm-member-band :is(a, button):focus-visible { outline: 2px solid var(--fm-secondary); outline-offset: 3px; }

.fm-member-band__visual { display: flex; justify-content: center; perspective: 1200px; padding: 30px 0; }
.fm-member-card {
    --tilt-x: -6deg;
    --tilt-y: 12deg;
    --shine-x: 30%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: min(100%, 440px);
    aspect-ratio: 1.586;
    padding: 28px 30px;
    overflow: hidden;
    border-radius: 20px;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(137, 181, 190, .55) 0%, transparent 45%),
        linear-gradient(135deg, #0c6f8b 0%, #0a4b6a 45%, #062f47 100%);
    box-shadow: 0 40px 70px rgba(0, 12, 22, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
    color: #fff;
    transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
    transform-style: preserve-3d;
    transition: transform .6s var(--fm-ease);
    animation: fm-card-float 7s ease-in-out infinite;
}
.fm-member-band__visual:hover .fm-member-card { animation-play-state: paused; transition-duration: .15s; }
@keyframes fm-card-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -10px; }
}
.fm-member-card__shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(105deg, transparent calc(var(--shine-x) - 25%), rgba(255, 255, 255, .22) var(--shine-x), transparent calc(var(--shine-x) + 25%));
    mix-blend-mode: soft-light;
}
.fm-member-card__top { display: flex; align-items: flex-start; justify-content: space-between; }
.fm-member-card__top img { width: 128px; height: auto; filter: brightness(0) invert(1); }
.fm-member-card__tier { padding: 5px 11px; border: 1px solid rgba(255, 255, 255, .55); font-family: var(--fm-head); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; }
.fm-member-card__roofs { position: absolute; right: -10px; bottom: 54px; width: 260px; height: auto; color: rgba(255, 255, 255, .12); }
.fm-member-card__bottom { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.fm-member-card__caption { display: block; margin-bottom: 3px; color: rgba(255, 255, 255, .6); font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; }
.fm-member-card__name { display: block; font-family: var(--fm-head); font-size: 22px; letter-spacing: .12em; text-transform: uppercase; overflow-wrap: anywhere; }
.fm-member-card__since { text-align: right; font-family: var(--fm-head); font-size: 18px; letter-spacing: .1em; }

/* Cards: share ------------------------------------------------------------- */
body.reference-home4 .card-share { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 48px; margin-left: auto; padding: 0; border: 0; background: none; color: var(--ink); opacity: .7; transition: opacity .2s, color .2s; }
body.reference-home4 .card-share:hover { opacity: 1; color: var(--fm-primary); }

/* Reset password page ------------------------------------------------------- */
.fm-account { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 140px 16px 80px; background: radial-gradient(70% 90% at 80% 30%, #0b5170 0%, var(--fm-dark) 60%, #052a40 100%); }
.fm-account__panel { width: min(100%, 440px); padding: 34px 30px; background: #fff; text-align: center; box-shadow: 0 30px 80px rgba(0, 12, 22, .35); }
body.reference-home4 .fm-account__title { margin: 0 0 22px; color: #1e3a48; font-family: var(--fm-head); font-size: 30px; font-weight: 300; letter-spacing: .01em; line-height: 1.2; text-transform: none; }
.fm-account__form { text-align: left; }
.fm-account__done p { color: #4b5d63; }

/* Responsive ------------------------------------------------------------------ */
@media (max-width: 1439.98px) {
    .fm-header__phone span { display: none; }
}
@media (max-width: 991.98px) {
    .fm-member-button { min-width: 44px; min-height: 44px; justify-content: center; padding: 0; border-color: transparent; background: none; }
    .fm-member-button.is-member { padding: 0; }
    .fm-member-button__label { display: none; }
    .fm-header.is-scrolled .fm-member-button { border-color: transparent; }
    .fm-member-band__inner { grid-template-columns: 1fr; gap: 24px; }
    .fm-member-band__visual { order: -1; padding: 0 0 10px; }
    .fm-member-card { width: min(100%, 380px); }
}
@media (max-width: 767.98px) {
    .fm-member-band { padding: 76px 0 84px; }
    .fm-member-card { padding: 20px 22px; border-radius: 16px; }
    .fm-member-card__top img { width: 104px; }
    .fm-member-card__name { font-size: 18px; }
    .fm-member-modal .modal-dialog { margin: 12px; }
    .fm-member-modal__benefits { padding: 26px 16px 22px; }
    .fm-member-modal__benefits-title,
    body.reference-home4 .fm-member-modal__title { font-size: 26px; }
    .fm-member-modal__benefits li { font-size: 12px; }
    .fm-member-modal__benefits svg { width: 28px; height: 28px; }
    .fm-member-modal__body { padding: 24px 20px 24px; }
    .fm-member-row { grid-template-columns: 1fr; }
    .fm-area__head { padding: 22px 20px 18px; }
    .fm-area__body { padding: 6px 20px 20px; }
    .fm-area__fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .fm-member-card { animation: none; transition: none; }
}
