/* Meiyi theme: recreates the 2022 Wix layout. Palette and type sizes come from the Wix site
   (Work Sans ExtraLight headings, blue #2064E2 / #3C63F5, navy #05185E, grey panels #F7F7F7). */

@font-face {
    font-family: "Work Sans";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/worksans-latin.woff2") format("woff2");
}

:root {
    --navy: #05185E;
    --blue: #2064E2;
    --blue-2: #3C63F5;
    --blue-light: #7B94EC;
    --text: #1b2340;
    --muted: #4a5f8e;
    --grey: #F7F7F7;
    --container: 1100px;
    --font: "Work Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
    background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3, h4 { font-weight: 200; color: var(--blue); line-height: 1.35; margin: 0; }

/* ---------- header ---------- */
.site-header { text-align: center; padding: 56px 20px 26px; }
.site-title { margin: 0; font-weight: 200; font-size: 40px; line-height: 1.35; color: var(--navy); }
.site-title a { color: inherit; text-decoration: none; }
.site-rule { width: min(940px, 100%); height: 1px; background: var(--navy); margin: 30px auto 18px; }
.site-nav .nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; }
.site-nav .nav li { margin: 0; }
.site-nav .nav a { font-size: 15px; color: var(--navy); text-decoration: none; padding: 8px 0; display: inline-block; }
.site-nav .nav a:hover { color: var(--blue); }
.nav-toggle { display: none; }

/* Koenig editor card widths (required by Ghost) */
.content .kg-width-wide { width: 100%; max-width: 1140px; margin-left: auto; margin-right: auto; }
.content .kg-width-full { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); margin-right: 0; }
.content .kg-width-full img, .content .kg-width-wide img { width: 100%; }
.content .mi-grid { width: auto; max-width: 1020px; margin: 44px auto 0; }

/* ---------- generic page ---------- */
.page-header { text-align: center; padding: 48px 20px 36px; }
.page-title { font-weight: 200; font-size: 50px; line-height: 1.34; color: var(--blue); }
.page-subtitle { margin: 14px 0 0; font-size: 18px; color: var(--navy); }
.content { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.content h2 { font-size: 40px; text-align: center; margin: 64px 0 10px; }
.content h2:first-child { margin-top: 0; }
.content h3 { font-size: 22px; }
.content p { text-align: center; max-width: 820px; margin: 0 auto 16px; }
.content figure { margin: 0; }
.content .kg-image { width: 100%; }
.content ul, .content ol { max-width: 820px; margin: 0 auto 16px; }
.mi-btn {
    display: inline-block;
    background: var(--blue-2);
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.6;
}
.mi-btn:hover { background: var(--blue); }

/* ---------- landing page ---------- */
.hero {
    position: relative;
    height: 480px;
    background-color: var(--navy);
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* light wash like the Wix hero, plus a soft navy band on the left so the white title stays readable */
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 24, 94, 0.38) 0%, rgba(5, 24, 94, 0.12) 45%, rgba(255, 255, 255, 0.16) 100%); }
.hero-inner { position: relative; width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px 0 max(20px, 8vw); }
.hero h1 { font-weight: 700; font-size: 72px; line-height: 1.25; color: #fff; max-width: 460px; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.18); }
.hero p { color: #fff; font-size: 18px; margin: 18px 0 0; font-weight: 300; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25); }

.home-content { padding-top: 40px; padding-bottom: 56px; }
.home-content > h2 { margin-top: 72px; }
.home-content > h2:first-child { margin-top: 24px; }

.mi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; max-width: 1020px; margin: 44px auto 0; }
.mi-tile { display: block; background: var(--blue-2); color: #fff; text-decoration: none; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); }
.mi-tile img { width: 100%; aspect-ratio: 1.18; object-fit: cover; }
.mi-tile h3 { margin: 0; padding: 28px 12px; text-align: center; font-size: 16px; font-weight: 400; color: #fff; }
.mi-tile:hover h3 { text-decoration: underline; }

.mi-features {
    position: relative;
    width: 100vw;
    margin: 72px 0 0 calc(50% - 50vw);
    padding: 90px max(20px, calc(50vw - 540px));
    background-size: cover;
    background-position: center;
    background-color: #dfe6f5;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    align-items: start;
}
.mi-features::before { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, 0.35); }
.mi-card { position: relative; background: #fff; padding: 40px 34px 36px; box-shadow: 0 3px 16px rgba(0, 0, 0, 0.08); text-align: left; }
.mi-card:nth-child(2) { text-align: center; }
.mi-card h3 { font-size: 20px; line-height: 1.4; color: var(--blue); margin: 0 0 22px; }
.mi-card:nth-child(3) h3 { color: var(--blue-light); }
.mi-card p { text-align: inherit; max-width: none; margin: 0 0 26px; font-size: 15px; line-height: 1.95; }

.home-content > .mi-map, .home-content > .mi-map-facade { margin-top: 28px; }
.mi-map { width: 100vw; margin-left: calc(50% - 50vw); height: 380px; border: 0; display: block; }
/* click-to-load map: a static picture of the map until the visitor asks for the live Google map */
.mi-map-facade { position: relative; width: 100vw; margin-left: calc(50% - 50vw); height: 380px; overflow: hidden; background: #e9edf5; }
.mi-map-facade img { width: 100%; height: 100%; object-fit: cover; }
.mi-map-facade .mi-map { margin: 0; width: 100%; height: 100%; }
.mi-map-actions { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; padding: 0 16px; }
.mi-map-actions .mi-btn { border: 0; cursor: pointer; font-family: inherit; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); }
.mi-map-open { background: rgba(255, 255, 255, 0.95); color: var(--navy); padding: 10px 18px; border-radius: 30px; text-decoration: none; font-size: 14px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; max-width: 1120px; margin: 0 auto; }
.about-photo { margin: 0; }
.about-photo img { width: 100%; height: 100%; min-height: 560px; object-fit: cover; }
.about-panel { background: var(--grey); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 64px 48px; text-align: center; }
.about-panel .page-title { font-size: 48px; text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px; margin-bottom: 30px; }
.about-panel .content { padding: 0; }
.about-panel .content p { font-size: 15px; line-height: 1.95; margin-bottom: 36px; }

/* ---------- products: three columns (image, heading, text) ---------- */
.page-products .content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto 1fr;
    grid-auto-flow: column;
    column-gap: 36px;
    row-gap: 0;
    max-width: 1140px;
}
.page-products .content figure img { width: 100%; aspect-ratio: 1.15; object-fit: cover; }
.page-products .content h2 { background: var(--grey); font-size: 24px; margin: 0; padding: 48px 24px 12px; text-align: center; }
.page-products .content p { background: var(--grey); margin: 0; padding: 12px 28px 52px; max-width: none; font-size: 15px; line-height: 1.9; }

/* ---------- production: alternating image / grey tiles ---------- */
.page-production .content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 310px;
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    padding: 0;
}
.page-production .content figure { height: 100%; }
.page-production .content figure img { width: 100%; height: 100%; object-fit: cover; }
.page-production .content h2 { background: var(--grey); display: flex; align-items: center; justify-content: center; margin: 0; padding: 40px; font-size: 28px; text-align: center; }

/* ---------- contact ---------- */
.page-contact .site-main { background: var(--grey); }
.page-contact .page-header { padding-bottom: 20px; }
.page-contact .content p { font-size: 16px; }
.page-contact .content a { color: var(--navy); text-decoration: none; }
.page-contact .content .mi-map { margin-top: 24px; }

/* ---------- blog ---------- */
.index-main, .post-main { max-width: 860px; margin: 0 auto; padding: 0 20px 40px; }
.post-list { display: grid; gap: 36px; }
.post-card { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.post-card-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.post-card-title { font-size: 28px; margin: 0 0 6px; }
.post-card-title a { color: var(--blue); text-decoration: none; }
.post-card-title a:hover { text-decoration: underline; }
.post-card-meta, .post-card-excerpt { text-align: left; margin: 0 0 8px; max-width: none; }
.post-card-meta { color: var(--muted); font-size: 13px; }
.post-list-empty { text-align: center; color: var(--muted); }
.pagination { display: flex; justify-content: space-between; margin-top: 40px; font-size: 14px; }
.post-feature img { width: 100%; }
.post-content { padding: 32px 0 0; }
.post-content p, .post-content ul, .post-content ol { text-align: left; max-width: none; }
.post-content h2 { text-align: left; font-size: 30px; margin: 40px 0 10px; }
.post-content h3 { font-size: 22px; margin: 28px 0 8px; }
.post-content blockquote { border-left: 2px solid var(--blue-2); margin: 0 0 16px; padding-left: 20px; color: var(--muted); }
.post-back { margin-top: 48px; text-align: center; }
.post-back a { color: var(--navy); text-decoration: none; }

/* ---------- footer ---------- */
.site-footer { text-align: center; padding: 64px 20px 44px; }
.footer-title { font-weight: 200; font-size: 28px; line-height: 1.4; color: var(--muted); margin: 0 0 26px; }
.footer-contact { font-size: 14px; line-height: 2.05; color: var(--navy); }
.footer-contact a { color: inherit; text-decoration: none; }
.footer-copy { font-size: 13px; color: var(--navy); margin: 44px 0 0; }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
    .site-header { padding-top: 36px; padding-bottom: 16px; }
    .site-title { font-size: 30px; }
    .site-rule { margin: 20px auto 10px; }
    .site-header { position: relative; padding-left: 56px; padding-right: 56px; }
    .nav-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        position: absolute; right: 12px; top: 34px; width: 44px; height: 44px;
        background: none; border: 0; padding: 0; color: var(--navy); cursor: pointer; border-radius: 6px;
    }
    .nav-toggle:active { background: rgba(5, 24, 94, 0.06); }
    .nav-icon-close { display: none; }
    .nav-toggle[aria-expanded="true"] .nav-icon-open { display: none; }
    .nav-toggle[aria-expanded="true"] .nav-icon-close { display: block; }
    .site-nav { display: none; margin: 4px -56px 0; }
    .site-nav.is-open { display: block; }
    .site-nav .nav { flex-direction: column; gap: 0; }
    .site-nav .nav a { display: block; padding: 14px 0; font-size: 17px; border-bottom: 1px solid rgba(5, 24, 94, 0.08); }
    .site-nav .nav li:last-child a { border-bottom: 0; }
    .page-title { font-size: 36px; }
    .content h2 { font-size: 30px; }
    .hero { height: 380px; }
    .hero h1 { font-size: 44px; max-width: 300px; }
    body { font-size: 16px; }
    .footer-contact { font-size: 15px; }
    .footer-copy { font-size: 14px; }
    .mi-btn { padding: 12px 26px; font-size: 15px; }
    .mi-tile h3 { padding: 22px 12px; font-size: 17px; }
    .mi-grid { grid-template-columns: 1fr; gap: 24px; }
    .mi-features { grid-template-columns: 1fr; padding: 40px 20px; gap: 24px; }
    .mi-card, .mi-card:nth-child(2) { text-align: center; }
    .about-grid { grid-template-columns: 1fr; }
    .about-photo img { min-height: 0; }
    .about-panel { padding: 40px 24px; }
    .page-products .content { display: block; }
    .page-products .content figure { margin-top: 36px; }
    .page-products .content h2 { padding-top: 32px; }
    .page-production .content { grid-template-columns: 1fr; grid-auto-rows: 260px; }
    .post-card { grid-template-columns: 1fr; }
    .mi-map { height: 300px; }
}

/* feature-card section background as a lazy-loaded image (was a CSS background) */
.mi-features { background-color: #dfe6f5; }
.mi-features-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.mi-features::before { z-index: 1; }
.mi-card { z-index: 2; }

/* ---------- Ghost editor cards we do not load Ghost's card bundle for (card_assets: false) ---------- */
.kg-gallery-card, .kg-gallery-container { display: flex; flex-direction: column; width: 100%; max-width: 1100px; margin: 0 auto 1.5em; }
.kg-gallery-row { display: flex; flex-direction: row; justify-content: center; }
.kg-gallery-row:not(:first-of-type) { margin-top: 0.75em; }
.kg-gallery-image { flex: 1 1 0; }
.kg-gallery-image:not(:first-of-type) { margin-left: 0.75em; }
.kg-gallery-image img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }
.kg-bookmark-card { width: 100%; margin: 0 auto 1.5em; }
.kg-bookmark-container { display: flex; min-height: 148px; color: var(--text); text-decoration: none; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 7px -1px rgba(0, 0, 0, 0.1), 0 1.5px 4px -1px rgba(0, 0, 0, 0.08); }
.kg-bookmark-content { flex-grow: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 20px; }
.kg-bookmark-title { font-size: 1rem; line-height: 1.4; font-weight: 600; color: var(--navy); }
.kg-bookmark-description { display: -webkit-box; overflow: hidden; margin-top: 8px; max-height: 48px; font-size: 0.9rem; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: left; }
.kg-bookmark-metadata { display: flex; flex-wrap: wrap; align-items: center; margin-top: 14px; font-size: 0.85rem; color: var(--muted); }
.kg-bookmark-icon { width: 20px; height: 20px; margin-right: 6px; }
.kg-bookmark-author, .kg-bookmark-publisher { display: inline; }
.kg-bookmark-publisher::before { content: "\2022"; margin: 0 6px; }
.kg-bookmark-thumbnail { position: relative; flex-grow: 1; min-width: 33%; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.kg-callout-card { display: flex; gap: 12px; padding: 20px 24px; border-radius: 6px; background: var(--grey); margin: 0 auto 1.5em; max-width: 820px; }
.kg-callout-card .kg-callout-text { text-align: left; margin: 0; }
.kg-button-card { display: flex; justify-content: center; margin: 0 0 1.5em; }
.kg-button-card .kg-btn { display: inline-block; background: var(--blue-2); color: #fff; padding: 10px 24px; border-radius: 30px; text-decoration: none; font-size: 14px; }
.kg-embed-card, .kg-video-card, .kg-audio-card, .kg-file-card { margin: 0 auto 1.5em; max-width: 1100px; }
.kg-embed-card iframe { max-width: 100%; }
