/* =============================================================================
   My Epiphany — Home page stylesheet (main-new.css)

   - Used by index-new.php, loaded AFTER css-plugins.php (and the legacy main.css)
   - Every class starts with "me-" so nothing here collides with older pages
   - Mobile-first: base styles are for phones, min-width queries add layout
   - No fixed pixel offsets or per-device hacks; sizes scale with clamp()

   Contents
     1. Tokens            7. Threats to Science
     2. Base              8. Science Advocacy
     3. Layout + titles   9. Featured article
     4. Buttons + links  10. Contact
     5. Preloader        11. Lightbox
     6. Hero slider      12. Scroll reveal + keyframes
   ============================================================================= */


/* 1. Tokens ------------------------------------------------------------------ */

:root {
    --me-blue:        #009EE3;
    --me-blue-600:    #0A85BB;
    --me-blue-700:    #066C96;
    --me-blue-800:    #095B7D;
    --me-sky:         #19adfd;
    --me-title-blue:  #1394D8;
    --me-ink:         #252525;
    --me-gray:        #444444;
    --me-text:        #5a5959;
    --me-paper:       #E6F2F9;
    --me-danger:      #A91010;
    --me-ok:          #1d7a3a;

    --me-font: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --me-nav-h: 88px;                          /* height of the fixed top nav */
    --me-gutter: clamp(16px, 4vw, 32px);
    --me-radius: 4px;
    --me-ease: cubic-bezier(.22, .61, .36, 1);
}


/* 2. Base -------------------------------------------------------------------- */

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--me-nav-h);       /* #contact etc. land below the nav */
}

body.me-home {
    margin: 0;
    font-family: var(--me-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--me-text);
    background: url(/img/gray-background.png) repeat 0 0;
    overflow-y: scroll;
    -webkit-text-size-adjust: 100%;
}

.me-home *,
.me-home *::before,
.me-home *::after {
    box-sizing: border-box;
}

.me-home img {
    max-width: 100%;
    height: auto;
}

.me-main {
    display: block;
    overflow-x: hidden;   /* fallback */
    overflow-x: clip;     /* stops animations causing sideways scroll */
}

.me-main p {
    margin: 0 0 1em;
    padding: 0;
    line-height: 1.65;
}

/* Undo the legacy global "a { display:inline-block }" so text links wrap */
.me-main :where(a) {
    display: inline;
}

.me-main h2,
.me-main h3 {
    font-family: var(--me-font);
}

.me-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

:where(.me-home) :focus-visible {
    outline: 3px solid var(--me-sky);
    outline-offset: 2px;
}


/* 3. Layout + section titles ------------------------------------------------- */

.me-container {
    width: min(1170px, 100% - 2 * var(--me-gutter));
    margin-inline: auto;
}

.me-section {
    padding: clamp(52px, 8vw, 80px) 0;
}

.me-title {
    text-align: center;
    margin-bottom: clamp(28px, 5vw, 44px);
}

.me-title h2 {
    margin: 0 0 .7em;
    font-size: clamp(1.6rem, 2.4vw + 1rem, 2.25rem);
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--me-ink);
}

/* Underline beneath section titles */
.me-title h2::after {
    content: "";
    display: block;
    width: min(350px, 70%);
    margin: 12px auto 0;
    border-bottom: 2px solid var(--me-blue);
}

.me-title--light h2 {
    color: #fff;
}

.me-title--light h2::after {
    border-bottom-color: #fff;
}

.me-title__lead {
    font-size: clamp(1rem, .6vw + .9rem, 1.75rem);
}


/* 4. Buttons + links --------------------------------------------------------- */

/* "Sweep to right" button: a white panel slides in from the left on hover */
.me-main .me-btn,
.me-btn {
    position: relative;
    display: inline-block;
    isolation: isolate;
    overflow: hidden;
    padding: 15px 55px;
    border: 2px solid #fff;
    border-radius: var(--me-radius);
    background: transparent;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15);
    color: #fff;
    font: 600 .95rem/1.2 var(--me-font);
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: color .3s ease-out;
}

.me-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: #fff;
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform .3s ease-out;
}

.me-btn:hover,
.me-btn:focus-visible {
    color: var(--me-blue);
    text-decoration: none;
}

.me-btn:hover::before,
.me-btn:focus-visible::before,
.me-btn:active::before {
    transform: scaleX(1);
}

.me-btn--blue {
    background: var(--me-blue);
}

.me-main .me-btn--outline,
.me-btn--outline {
    padding: 12px 35px;
    box-shadow: none;
}

/* Contact "Send": darker blue sweep, text stays white */
.me-btn--submit::before {
    background: var(--me-blue-600);
}

.me-btn--submit:hover,
.me-btn--submit:focus-visible {
    color: #fff;
}

.me-link {
    color: var(--me-blue);
    font-weight: 600;
}

.me-link:hover {
    color: var(--me-blue-800);
}

.me-link-light {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.me-link-light:hover,
.me-link-light:visited:hover {
    color: var(--me-blue-800);
}

.me-link-light:visited {
    color: #fff;
}

/* Inline definitions: hover, tap or tab to the word to see it */
.me-term {
    position: relative;
    display: inline;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px dotted currentColor;
    cursor: help;
}

.me-term:hover,
.me-term:focus {
    color: var(--me-blue-700);
    outline: none;
}

.me-term__def {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 30;
    width: max-content;
    max-width: min(300px, 80vw);
    padding: 6px 10px;
    border-radius: 6px;
    background: #fff;
    color: var(--me-blue);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    font-size: .9rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity .2s, transform .2s, visibility 0s linear .2s;
}

.me-term:hover .me-term__def,
.me-term:focus .me-term__def {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
}

/* Phones: show the definition as a bar at the bottom of the screen so it
   never runs off the edge */
@media (max-width: 600px) {
    .me-term__def {
        position: fixed;
        left: 16px;
        right: 16px;
        top: auto;
        bottom: 16px;
        width: auto;
        max-width: none;
        padding: 12px 14px;
        z-index: 1200;
    }
}

/* Tooltip from a data-tip attribute (used for the article copyright note) */
.me-tip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.me-tip::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    z-index: 30;
    width: min(500px, 86vw);
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--me-blue);
    color: #fff;
    font-size: .85rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 4px);
    transition: opacity .2s, transform .2s, visibility 0s linear .2s;
}

.me-tip:hover::after,
.me-tip:focus::after {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition-delay: 0s;
}


/* 5. Preloader (battery) ----------------------------------------------------- */

.me-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: #fff;
    transition: opacity .5s ease, visibility 0s linear .5s;
}

.me-preloader.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.me-battery {
    position: relative;
    width: 60px;
    height: 25px;
    border: 1px solid #2E2E2E;
    border-radius: 2px;
    animation: meCharge 5s linear infinite;
}

.me-battery::after {
    content: "";
    position: absolute;
    right: -5px;
    top: 7px;
    width: 3px;
    height: 10px;
    border-radius: 0 1px 1px 0;
    background: #2E2E2E;
}

@keyframes meCharge {
    from { box-shadow: inset 0 0 0 #2E2E2E; }
    to   { box-shadow: inset 60px 0 0 #2E2E2E; }
}


/* 6. Hero slider ------------------------------------------------------------- */

/* Slider height: change --me-hero-h to resize. It sets the holder, the stage
   and every slide together, so they can never get out of step. */
:root {
    --me-hero-h: 80vh;
    --me-hero-min: 340px;   /* floor for very short screens (phones sideways) */
}
@supports (height: 1svh) {
    :root { --me-hero-h: 80svh; }
}

/* The holder (#home-slider). !important stops older rules in main.css or
   main.js (e.g. a full-window height on #home-slider) from stretching it
   and leaving an empty dark band under the slides. */
#home-slider.me-hero {
    position: relative;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    isolation: isolate;
    background: transparent;
    color: #fff;
}

/* All slides share one grid cell; the stage is the one place the height is set.
   If a slide's text doesn't fit, the page script lowers its --fit value. */
.me-hero__stage {
    display: grid;
    grid-template-rows: 100%;
    height: var(--me-hero-h);
    min-height: var(--me-hero-min);
}

.me-hero .me-slide {
    height: 100%;
    min-height: 0;
}

/* Fallback on very short screens: text at its smallest still doesn't fit */
.me-hero--grow .me-hero__stage {
    height: auto;
    min-height: max(var(--me-hero-h), var(--me-hero-min));
    grid-template-rows: auto;
}

.me-slide {
    grid-area: 1 / 1;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--me-nav-h) + 12px) var(--me-gutter) 48px;
    overflow: hidden;
    text-align: center;
    --fit: 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity .7s ease, visibility 0s linear .7s;
}

.me-slide.is-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    transition: opacity .7s ease, visibility 0s;
}

/* The two halves used for the slit transition */
.me-slide.me-slide--slice {
    z-index: 5;
    opacity: 1;
    visibility: visible;
    transition: none;
    pointer-events: none;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.me-hero .me-slide__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-color: #0b1620;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.me-slide__overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, .6) 100%);
}

.me-slide__content {
    width: 100%;
    max-width: 1120px;
}

.me-main .me-slide__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .15em .35em;
    margin: 0 0 .15em;
    color: var(--me-title-blue);
    font-size: calc(clamp(2.5rem, 5.5vw + .75rem, 4.75rem) * var(--fit));
    font-weight: 600;
    line-height: 1.15;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}

.me-slide__title img {
    width: auto;
    height: 1.05em;
}

.me-main .me-slide__kicker {
    margin: 0 0 calc(1rem * var(--fit));
    color: #fff;
    font-size: calc(clamp(.95rem, .4vw + .85rem, 1.15rem) * var(--fit));
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.me-main .me-slide__text {
    max-width: 56ch;
    margin: 0 auto calc(1rem * var(--fit));
    color: #fff;
    font-size: calc(clamp(1.2rem, 1.5vw + .85rem, 2.1rem) * var(--fit));
    line-height: 1.4;
}

.me-quote {
    max-width: 820px;
    margin: 0 auto .75rem;
    padding: 0;
    border: 0;
    color: #fff;
    font-size: calc(clamp(1.05rem, .7vw + .9rem, 1.45rem) * var(--fit));
    font-style: italic;
    line-height: 1.45;
}

.me-main .me-quote p {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
}

/* Hidden by the page script when the slide is too short to show it comfortably */
.me-slide--no-quote .me-quote {
    display: none;
}

.me-quote p::before { content: "\201C"; padding-right: .15em; font-weight: 700; }
.me-quote p::after  { content: "\201D"; padding-left: .1em;  font-weight: 700; }

.me-quote cite {
    display: block;
    margin-top: .25em;
    color: var(--me-sky);
    font-style: normal;
    font-weight: 700;
}

.me-slide .me-btn {
    margin: 4px 0 0;
    padding: calc(15px * var(--fit)) 55px;
}

/* Photo credit sits in the bottom-right corner so it adds no height */
.me-main .me-slide__credit {
    position: absolute;
    right: var(--me-gutter);
    bottom: 14px;
    max-width: 40%;
    margin: 0;
    color: #fff;
    font-size: 12px;
    line-height: 1.35;
    text-align: right;
    opacity: .85;
}

/* Phones: credit centred just above the dots; description hidden to save room */
@media (max-width: 700px) {
    .me-slide { padding-bottom: 66px; }

    .me-main .me-slide__credit {
        left: var(--me-gutter);
        right: var(--me-gutter);
        bottom: 46px;
        max-width: none;
        text-align: center;
    }

    .me-main .me-slide__credit strong { display: none; }
}

.me-slide__credit strong { display: block; }
.me-slide__credit span   { font-size: 10px; opacity: .9; }

/* Caption entrance animation for the active slide */
.me-js .me-hero:not(.is-ready) .me-slide__content {
    opacity: 0;
}

.me-hero.is-ready .me-slide.is-active:not(.me-slide--slice) .me-slide__title  { animation: meFadeInDown .8s var(--me-ease) .15s both; }
.me-hero.is-ready .me-slide.is-active:not(.me-slide--slice) .me-slide__kicker { animation: meFadeIn     .8s var(--me-ease) .3s  both; }
.me-hero.is-ready .me-slide.is-active:not(.me-slide--slice) .me-slide__text   { animation: meFadeInUp   .8s var(--me-ease) .45s both; }
.me-hero.is-ready .me-slide.is-active:not(.me-slide--slice) .me-quote         { animation: meFadeInUp   .8s var(--me-ease) .6s  both; }
.me-hero.is-ready .me-slide.is-active:not(.me-slide--slice) .me-btn           { animation: meFadeInUp   .8s var(--me-ease) .75s both; }
.me-hero.is-ready .me-slide.is-active:not(.me-slide--slice) .me-slide__credit { animation: meFadeIn     .8s var(--me-ease) .9s  both; }

/* Previous / next arrows (desktop) */
.me-hero__arrow {
    position: absolute;
    top: 50%;
    z-index: 10;
    display: none;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .25);
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .3s, transform .3s;
}

.me-hero__arrow:hover,
.me-hero__arrow:focus-visible {
    background: var(--me-blue);
}

.me-hero__arrow--prev { left: clamp(8px, 2vw, 32px); }
.me-hero__arrow--next { right: clamp(8px, 2vw, 32px); }

.me-hero__arrow--prev:hover { transform: translateY(-50%) translateX(-3px); }
.me-hero__arrow--next:hover { transform: translateY(-50%) translateX(3px); }

@media (min-width: 992px) {
    .me-hero__arrow { display: grid; }
}

/* Dots */
.me-hero__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: 4px;
}

.me-hero__dot {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.me-hero__dot::before {
    content: "";
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    transition: background .3s, transform .3s;
}

.me-hero__dot:hover::before,
.me-hero__dot[aria-current="true"]::before {
    background: #fff;
    transform: scale(1.15);
}


/* 6b. About ------------------------------------------------------------------ */

.me-about {
    background: var(--me-blue);
    color: #fff;
}

.me-about__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 900px) {
    .me-about__grid {
        grid-template-columns: 4fr 7fr;
        gap: clamp(40px, 6vw, 90px);
    }
}

.me-main .me-about h3 {
    margin: 0 0 1.25rem;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    text-transform: uppercase;
}

.me-about__logo {
    width: auto;
    height: 1.4em;
    margin-inline: .1em;
    vertical-align: -.3em;
}

.me-about__avatar {
    float: left;
    width: 100px;
    height: 100px;
    margin: 4px 24px 12px 0;
    border: 3px solid #fff;
    border-radius: 50%;
    object-fit: cover;
    shape-outside: circle();
}

.me-about__actions {
    clear: both;
    padding-top: 8px;
    text-align: right;
}


/* 7. Threats to Science ------------------------------------------------------ */

.me-threats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: clamp(12px, 1.5vw, 20px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.me-threat {
    position: relative;
    overflow: hidden;
    background: var(--me-blue);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

.me-main .me-threat__label {
    margin: 0;
    padding: 10px 14px;
    color: #fff;
    font-size: 1.75rem;
    text-align:center;
    font-weight: 600;
    line-height: 1.3;
}

.me-main .me-threat__media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.me-threat__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--me-ease);
}

.me-threat:hover .me-threat__media img {
    transform: scale(1.06);
}

/* Caption panel: always visible on touch screens, slides up on hover elsewhere */
.me-threat__mask {
    padding: 16px 20px 18px;
    background: var(--me-blue);
    color: #fff;
    text-align: left;
}

.me-main .me-threat__mask h3 {
    margin: 0 0 .35em;
    color: #fff;
    font-size: 1.2rem;
    line-height: 1.3;
}

.me-main .me-threat__mask p {
    margin: 0 0 .8em;
}

.me-threat__actions {
    display: flex;
    gap: 8px;
}

.me-main .me-icon-btn,
.me-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, .85);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background .3s, color .3s;
}

.me-icon-btn:hover,
.me-icon-btn:focus-visible {
    background: #fff;
    color: var(--me-blue);
}

@media (hover: hover) and (pointer: fine) {
    .me-threat__mask {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        transform: translateY(100%);
        transition: transform .4s ease;
    }

    .me-threat:hover .me-threat__mask,
    .me-threat:focus-within .me-threat__mask {
        transform: none;
    }
}


/* 8. Science Advocacy -------------------------------------------------------- */

.me-adv {
    background: var(--me-blue);
    color: #fff;
}

.me-adv h2 img {
    width: auto;
    height: 1.35em;
    margin-right: .3em;
    vertical-align: -.3em;
}

.me-main .me-adv__sub {
    margin-bottom: .6em;
    color: #000;
    font-size: clamp(1.1rem, 1.2vw + .8rem, 1.6rem);
    line-height: 1.35;
}

.me-adv__why a {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.me-adv__why a:hover {
    color: var(--me-gray);
}

.me-adv__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: clamp(20px, 3vw, 32px);
}

.me-main .me-adv__card {
    display: block;
    padding: 16px 10px;
    border-radius: 8px;
    color: #fff;
    text-align: center;
    text-decoration: none;
    transition: color .3s, background .3s;
}

.me-adv__card:hover,
.me-adv__card:focus-visible {
    color: var(--me-gray);
    background: rgba(255, 255, 255, .08);
}

/* Rotated-square icon frame that appears on hover.
   Icon size: change --me-adv-icon (the frame scales with it). */
.me-adv__card {
    --me-adv-icon: 3.75rem;
}

.me-adv__icon {
    display: inline-grid;
    place-items: center;
    width: calc(var(--me-adv-icon) * 1.9);
    height: calc(var(--me-adv-icon) * 1.9);
    margin: calc(var(--me-adv-icon) * .55) 0 calc(var(--me-adv-icon) * .75);
    border: 3px solid transparent;
    transform: rotate(45deg);
    transition: border-color .3s ease, transform .3s ease;
}

.me-adv__icon i {
    color: #fff;
    font-size: var(--me-adv-icon);
    transform: rotate(-45deg);
}

.me-adv__card:hover .me-adv__icon,
.me-adv__card:focus-visible .me-adv__icon {
    border-color: #fff;
    transform: rotate(45deg) scale(1.06);
}

.me-main .me-adv__card h3 {
    margin: 0 0 .5em;
    color: inherit;
    font-size: 1.75rem;
    text-transform: uppercase;
}

.me-main .me-adv__card p {
    margin: 0;
}


/* 9. Featured article -------------------------------------------------------- */

.me-featured {
    background: url(/img/gray-background.png) repeat 0 0;
    color: var(--me-gray);
}

/* Fixed (parallax) background only where it works smoothly */
@media (hover: hover) and (min-width: 1024px) {
    .me-featured { background-attachment: fixed; }
}

.me-featured h2 {
    color: var(--me-gray);
}

.me-featured h2 i {
    color: var(--me-blue);
    font-size: .7em;
    vertical-align: .1em;
}

.me-main .me-featured__label {
    margin-top: -10px;
    font-weight: 700;
}

.me-main .me-featured__article {
    color: var(--me-gray);
    font-size: clamp(1rem, .8vw + .85rem, 1.3rem);
    font-weight: 700;
    text-transform: uppercase;
}

.me-featured__article:hover {
    color: var(--me-blue);
}

.me-featured__authors {
    color: var(--me-blue);
    font-size: 1.5rem;
    border-bottom: 1px dotted currentColor;
}

.me-featured__quote {
    max-width: 820px;
    margin: 20px auto;
    padding: 0;
    border: 0;
    font-size: clamp(1rem, .5vw + .9rem, 1.75rem);
    font-style: italic;
}

.me-featured__quote p::before { content: "\201C"; padding-right: .15em; font-weight: 700; font-size: 1.25em; }
.me-featured__quote p::after  { content: "\201D"; padding-left: .1em;  font-weight: 700; font-size: 1.25em; }

.me-featured__pdf a {
    color: var(--me-blue);
    font-size: 1.5rem;
    font-weight: 700;
}

.me-featured__pdf a:hover {
    color: var(--me-blue-800);
}


/* 10. Contact ---------------------------------------------------------------- */

.me-contact {
    background: var(--me-blue);
    color: #fff;
}

.me-contact h2 img {
    width: auto;
    height: 1.1em;
    vertical-align: -.2em;
}

.me-contact__form {
    display: grid;
    gap: 10px;
    max-width: 640px;
    margin: 0 auto;
}

.me-input {
    display: block;
    width: 100%;
    height: 50px;
    padding: 10px 14px;
    border: 1px solid #ececec;
    border-radius: var(--me-radius);
    background: #fff;
    color: #666;
    font: 16px/1.4 var(--me-font);  /* 16px stops iOS zooming on focus */
    box-shadow: none;
}

textarea.me-input {
    height: 165px;
    resize: vertical;
}

.me-input::placeholder {
    color: var(--me-blue);
    font-style: italic;
    opacity: 1;
}

.me-input:focus {
    outline: 3px solid rgba(255, 255, 255, .6);
    outline-offset: 1px;
}

.me-contact__actions {
    text-align: center;
}

.me-contact__actions .me-btn {
    margin: 14px 0 0;
}

.me-contact__details {
    margin-top: 32px;
    font-style: normal;
    text-align: center;
}

.me-main .me-contact__details p {
    margin: 0 0 .6em;
    line-height: 1.6;
}

.me-contact__details img {
    vertical-align: middle;
    margin-right: 4px;
}

.me-contact__details a {
    color: #fff;
}

.me-contact__details a:hover {
    color: var(--me-blue-800);
}


/* 11. Lightbox ---------------------------------------------------------------- */

/* Lightbox for the Threats images */
.me-lightbox {
    width: min(1000px, calc(100vw - 24px));
    max-width: none;
    max-height: calc(100vh - 24px);
    max-height: calc(100svh - 24px);
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: #fff;
    color: var(--me-gray);
    overflow: auto;
}

.me-lightbox[open] {
    animation: mePopIn .25s ease both;
}

.me-lightbox::backdrop {
    background: rgba(0, 0, 0, .8);
}

.me-lightbox figure {
    margin: 0;
}

.me-lightbox__stage {
    position: relative;
    background: #111;
}

.me-lightbox__stage img {
    display: block;
    width: 100%;
    max-height: 70vh;
    max-height: 70svh;
    object-fit: contain;
}

.me-lightbox figcaption {
    padding: 15px 18px 18px;
}

.me-lightbox h3 {
    margin: 0 0 .5em;
    color: var(--me-ink);
    font: 600 1.25rem/1.3 var(--me-font);
}

.me-lightbox p {
    margin: 0 0 .6em;
    color: #818181;
    font-size: 1rem;
    line-height: 1.45;
}

.me-lightbox__credit {
    color: var(--me-blue);
    font-size: .8rem;
}

.me-lightbox__close,
.me-lightbox__nav {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    background: var(--me-blue);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    transition: background .2s;
}

.me-lightbox__close:hover,
.me-lightbox__nav:hover {
    background: var(--me-blue-800);
}

.me-lightbox__close {
    top: 0;
    right: 0;
    border-bottom-left-radius: 6px;
}

.me-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
}

.me-lightbox__nav--prev { left: 0; }
.me-lightbox__nav--next { right: 0; }


/* 12. Scroll reveal + keyframes ---------------------------------------------- */

/* Hidden until scrolled into view (only when JS is running) */
.me-js [data-reveal] {
    opacity: 0;
}

.me-js [data-reveal].is-visible {
    opacity: 1;
    animation-duration: .9s;
    animation-fill-mode: both;
    animation-timing-function: var(--me-ease);
    animation-delay: var(--me-delay, 0s);
}

[data-reveal="fade-left"].is-visible   { animation-name: meFadeInLeft; }
[data-reveal="fade-right"].is-visible  { animation-name: meFadeInRight; }
[data-reveal="fade-up"].is-visible     { animation-name: meFadeInUp; }
[data-reveal="fade-down"].is-visible   { animation-name: meFadeInDown; }
[data-reveal="zoom"].is-visible        { animation-name: meZoomIn; }
[data-reveal="bounce-left"].is-visible,
[data-reveal="bounce-right"].is-visible {
    animation-duration: 1s;
    animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
[data-reveal="bounce-left"].is-visible  { animation-name: meBounceInLeft; }
[data-reveal="bounce-right"].is-visible { animation-name: meBounceInRight; }

@keyframes meFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes meFadeInLeft {
    from { opacity: 0; transform: translate3d(-40px, 0, 0); }
    to   { opacity: 1; transform: none; }
}

@keyframes meFadeInRight {
    from { opacity: 0; transform: translate3d(40px, 0, 0); }
    to   { opacity: 1; transform: none; }
}

@keyframes meFadeInUp {
    from { opacity: 0; transform: translate3d(0, 30px, 0); }
    to   { opacity: 1; transform: none; }
}

@keyframes meFadeInDown {
    from { opacity: 0; transform: translate3d(0, -30px, 0); }
    to   { opacity: 1; transform: none; }
}

@keyframes meZoomIn {
    from { opacity: 0; transform: scale3d(.4, .4, .4); }
    50%  { opacity: 1; }
    to   { opacity: 1; transform: none; }
}

@keyframes meBounceInLeft {
    0%   { opacity: 0; transform: translate3d(-600px, 0, 0); }
    60%  { opacity: 1; transform: translate3d(25px, 0, 0); }
    75%  { transform: translate3d(-10px, 0, 0); }
    90%  { transform: translate3d(5px, 0, 0); }
    to   { opacity: 1; transform: none; }
}

@keyframes meBounceInRight {
    0%   { opacity: 0; transform: translate3d(600px, 0, 0); }
    60%  { opacity: 1; transform: translate3d(-25px, 0, 0); }
    75%  { transform: translate3d(10px, 0, 0); }
    90%  { transform: translate3d(-5px, 0, 0); }
    to   { opacity: 1; transform: none; }
}

@keyframes mePopIn {
    from { opacity: 0; scale: .96; }
    to   { opacity: 1; scale: 1; }
}

/* Respect "reduce motion" settings: no movement, content just appears */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .me-home *,
    .me-home *::before,
    .me-home *::after {
        animation-duration: .01ms !important;
        animation-delay: 0s !important;
        transition-duration: .01ms !important;
    }

    .me-js [data-reveal] { opacity: 1; }
}
