/* ==========================================================================
   Welcome message  (views/index.hbs, section.welcome)

   Reads like a letter: a portrait photo with a solid navy block offset behind
   it and a round crest pinned to its top edge; beside it a serif title, the
   CMS message (its first "Welcome!" paragraph becomes the salutation, the
   next paragraph gets a drop cap) and a link to the About page.
   ========================================================================== */

.welcome {
    --navy: #111d42;
    --gold: #d1a24f;
    --gold-text: #8a6217;       /* gold dark enough to read as text on white */
    --ink-soft: #4b5472;

    position: relative;
    padding: 108px 0 112px;
    overflow: hidden;
    background: #fff;
    font-family: 'Raleway', 'PT Sans', Arial, sans-serif;
}

.welcome h2 {
    margin: 0;
    text-transform: none;
}

.welcome__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 96px;
    align-items: center;
}


/* --------------------------------------------------------------------------
   Photo + crest
   -------------------------------------------------------------------------- */

.welcome__visual {
    position: relative;
    margin: 0 28px 28px 0;      /* room for the navy block that sticks out right and below */
}

/* solid navy block, offset down-right, with the site's faint lattice on it */
.welcome__visual::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 28px;
    left: 28px;
    right: -28px;
    bottom: -28px;
    border-radius: 4px;
    background-color: var(--navy);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23d1a24f' stroke-opacity='.35'%3E%3Crect x='18' y='18' width='36' height='36'/%3E%3Crect x='18' y='18' width='36' height='36' transform='rotate(45 36 36)'/%3E%3Cpath d='M0 0l18 18M72 0L54 18M0 72l18-18M72 72L54 54'/%3E%3C/g%3E%3C/svg%3E");
}

.welcome__photo {
    position: relative;
    z-index: 1;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 4px;
    background: #e6dec9;
}

.welcome__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;   /* people stand in the middle of the frame */
}

/* round seal pinned to the photo's top edge */
.welcome__crest {
    position: absolute;
    top: -48px;
    left: 36px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 132px;
    height: 132px;
    border: 3px solid var(--gold);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 14px 34px rgba(17, 29, 66, .22);
}

.welcome__crest img {
    display: block;
    width: 72%;
    height: auto;
}


/* --------------------------------------------------------------------------
   Text
   -------------------------------------------------------------------------- */

.welcome__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--gold-text);
}

.welcome__eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    background: var(--gold);
    transform: rotate(45deg);
}

.welcome__eyebrow::after {
    content: "";
    width: 48px;
    height: 1px;
    background: var(--gold);
}

.welcome__title {
    margin: 16px 0 28px !important;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: clamp(30px, 3.4vw, 46px);
    font-weight: 700;
    line-height: 1.16;
    color: var(--navy);
}

/* The message is rich text from the CMS. Keep it in the site's type whatever inline
   styles the editor added (the !importants beat those). */
.welcome__text {
    font-size: 17px;
    line-height: 1.9;
    color: var(--ink-soft);
}

.welcome__text p {
    margin: 0 0 18px !important;
    font-size: 17px !important;
    line-height: 1.9 !important;
    color: var(--ink-soft) !important;
    text-align: left !important;
}

.welcome__text p:last-child {
    margin-bottom: 0 !important;
}

.welcome__text p * {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    text-align: left !important;
}

/* The CMS message opens with a short "Welcome!" paragraph: shown as the letter's salutation.
   (Only when more paragraphs follow, so a single-paragraph message is left alone.) */
.welcome__text > p:first-child:not(:last-child) {
    margin-bottom: 14px !important;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif !important;
    font-size: 26px !important;
    font-style: italic;
    font-weight: 700;
    line-height: 1.3 !important;
    color: var(--gold-text) !important;
}

/* drop cap on the first body paragraph */
.welcome__text > p:nth-child(2)::first-letter {
    float: left;
    padding: 8px 14px 0 0;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 4.2em;
    font-weight: 800;
    line-height: .8;
    color: var(--navy);
}

.welcome__more {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 34px;
    padding: 14px 28px;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

.welcome__more i {
    color: var(--gold);
    transition: transform .2s ease, color .2s ease;
}

.welcome__more:hover,
.welcome__more:focus {
    background: var(--gold);
    color: var(--navy);
    text-decoration: none;
}

.welcome__more:hover i,
.welcome__more:focus i {
    color: var(--navy);
    transform: translateX(4px);
}

.welcome__more:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}


/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1199px) {
    .welcome__grid {
        gap: 64px;
    }
}

/* Tablet and phone: photo on top (landscape), text below. */
@media (max-width: 991px) {
    .welcome {
        padding: 84px 0 80px;
    }

    .welcome__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 56px;
        max-width: 640px;
        margin: 0 auto;
    }

    .welcome__photo {
        aspect-ratio: 4 / 3;
    }

    .welcome__crest {
        top: -40px;
        left: 28px;
        width: 108px;
        height: 108px;
    }
}

@media (max-width: 575px) {
    .welcome {
        padding: 72px 0 60px;
    }

    .welcome__grid {
        gap: 44px;
    }

    .welcome__visual {
        margin: 0 18px 18px 0;
    }

    .welcome__visual::before {
        top: 18px;
        left: 18px;
        right: -18px;
        bottom: -18px;
    }

    .welcome__crest {
        top: -34px;
        left: 20px;
        width: 88px;
        height: 88px;
        border-width: 2px;
    }

    .welcome__title {
        margin-bottom: 22px !important;
        font-size: 28px;
    }

    .welcome__text,
    .welcome__text p {
        font-size: 16px !important;
    }

    .welcome__text > p:first-child:not(:last-child) {
        font-size: 22px !important;
    }

    .welcome__more {
        margin-top: 28px;
        padding: 13px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .welcome__more,
    .welcome__more i {
        transition: none;
    }
}
