/* ==========================================================================
   Mission / Vision / Values  (views/index.hbs, section.pillars)

   Warm cream band with the same faint lattice as the hero. Three cards, each
   a landscape photo with a gold offset frame peeking out behind it and a
   white caption card overlapping its foot. The middle card steps down for
   rhythm on desktop; everything stacks on tablets and phones.
   ========================================================================== */

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

    position: relative;
    padding: 84px 0 96px;
    overflow: hidden;
    background: var(--cream);
    font-family: 'Raleway', 'PT Sans', Arial, sans-serif;
}

/* faint lattice, strongest at the edges */
.pillars::before {
    content: "";
    position: absolute;
    inset: 0;
    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='.3'%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");
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, transparent 35%, #000 100%);
    mask-image: radial-gradient(ellipse at 50% 50%, transparent 35%, #000 100%);
    opacity: .6;
    pointer-events: none;
}

.pillars > .auto-container {
    position: relative;
}

.pillars h2,
.pillars h3 {
    margin: 0;
    text-transform: none;
}


/* --------------------------------------------------------------------------
   Heading
   -------------------------------------------------------------------------- */

.pillars__head {
    margin-bottom: 64px;
    text-align: center;
}

.pillars__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);
}

/* diamonds either side, as on the ticker and hero */
.pillars__eyebrow::before,
.pillars__eyebrow::after {
    content: "";
    width: 7px;
    height: 7px;
    background: var(--gold);
    transform: rotate(45deg);
}

.pillars__title {
    margin-top: 14px;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: clamp(30px, 3.4vw, 44px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--navy);
}


/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.pillars__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    align-items: start;
    counter-reset: pillar;
}

.pillar {
    position: relative;
    counter-increment: pillar;
}

.pillar:nth-child(2) {
    margin-top: 52px;           /* the middle card steps down */
}

/* gold frame peeking out behind the photo, top-left */
.pillar::before {
    content: "";
    position: absolute;
    top: -12px;
    left: -12px;
    width: 100%;
    aspect-ratio: 3 / 2;
    border: 2px solid var(--gold);
    border-radius: 4px;
}

.pillar__media {
    position: relative;
    z-index: 1;
    margin: 0;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    border-radius: 4px;
    background: #e6dec9;
}

.pillar__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 55%;   /* the photos have faces in the middle band */
    transition: transform .8s ease;
}

.pillar__body {
    position: relative;
    z-index: 2;
    margin: -48px 22px 0;
    padding: 32px 28px 34px;
    background: #fff;
    border-top: 3px solid var(--gold);
    box-shadow: 0 22px 44px rgba(17, 29, 66, .12);
    transition: transform .35s ease, box-shadow .35s ease;
}

/* outlined slide-style number */
.pillar__body::before {
    content: counter(pillar, decimal-leading-zero);
    position: absolute;
    top: 14px;
    right: 22px;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 60px;
    font-weight: 800;
    line-height: 1;
    color: rgba(209, 162, 79, .16);
    -webkit-text-stroke: 1px rgba(209, 162, 79, .75);
}

.pillar__title {
    padding-right: 74px;        /* keep clear of the number */
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy);
}

.pillar__title::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    margin: 14px 0 16px;
    background: var(--gold);
}

/* The description is rich text from the CMS: keep it in the site's type no matter what
   inline styles the editor added. */
.pillar__text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--ink-soft);
}

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

.pillar__text p {
    margin: 0 0 10px;
}

.pillar__text p:last-child {
    margin-bottom: 0;
}

.pillar__text br {
    display: none;              /* the editor leaves a stray trailing <br> */
}

@media (hover: hover) {
    .pillar:hover .pillar__media img {
        transform: scale(1.06);
    }

    .pillar:hover .pillar__body {
        transform: translateY(-6px);
        box-shadow: 0 30px 56px rgba(17, 29, 66, .18);
    }
}


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

/* Tablet and phone: one column, centred, no stagger. */
@media (max-width: 991px) {
    .pillars {
        padding: 64px 0 72px;
    }

    .pillars__head {
        margin-bottom: 48px;
    }

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

    .pillar:nth-child(2) {
        margin-top: 0;
    }
}

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

    .pillars__head {
        margin-bottom: 40px;
    }

    .pillars__eyebrow {
        font-size: 11px;
        letter-spacing: .24em;
    }

    .pillar::before {
        top: -9px;
        left: -9px;
    }

    .pillar__body {
        margin: -36px 14px 0;
        padding: 26px 22px 28px;
    }

    .pillar__body::before {
        font-size: 48px;
    }

    .pillar__title {
        padding-right: 60px;
        font-size: 23px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pillar__media img,
    .pillar__body {
        transition: none;
    }
}
