/* MailPac site styles: shared by every public page (layout: app/Views/front_end/mailpac/layout.php).
   Brand: MailPac blue #0C3E9D and pink #F608AD, taken from the MAILPAC.COM wordmark. Font: Poppins.
   Page-specific rules live in their own file (landing.css, pages/<page>.css). */

:root {
    --mp-blue: #0C3E9D;
    --mp-blue-700: #0A3283;
    --mp-blue-900: #061F52;
    --mp-pink: #F608AD;
    --mp-pink-600: #D40795;
    --mp-pink-50: #FFF0FA;
    --mp-sky: #EEF3FF;
    --mp-sky-2: #F6F9FF;
    --mp-ink: #16213D;
    --mp-muted: #56607A;
    --mp-line: #DCE3F3;
    --mp-white: #FFFFFF;
    --mp-radius: 18px;
    --mp-radius-lg: 28px;
    --mp-shadow: 0 12px 32px rgba(12, 62, 157, 0.12);
    --mp-shadow-lg: 0 24px 60px rgba(6, 31, 82, 0.18);
    --mp-max: 1180px;
    --mp-gutter: 20px;
}

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

html { scroll-behavior: smooth; }

body.mp {
    margin: 0;
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--mp-ink);
    background: var(--mp-white);
    -webkit-font-smoothing: antialiased;
}

/* Resets carry zero specificity (:where) so component classes always win over them. */
:where(.mp) img { max-width: 100%; display: block; }
:where(.mp) a { color: inherit; }
:where(.mp) :is(h1, h2, h3, p) { margin: 0; }

.mp-wrap {
    width: 100%;
    max-width: var(--mp-max);
    margin: 0 auto;
    padding: 0 var(--mp-gutter);
}

.mp-skip {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--mp-pink);
    color: var(--mp-white);
    font-weight: 600;
    text-decoration: none;
}
.mp-skip:focus { left: 12px; }

.mp :focus-visible {
    outline: 3px solid var(--mp-pink);
    outline-offset: 3px;
    border-radius: 6px;
}
/* Pink is about 2.5:1 on MailPac blue and vanishes on the pink band: white there. The band
   covers the header and page head; cards pulled up over it are outside it and stay pink. */
.mp-band :focus-visible,
.mp-pinkband :focus-visible { outline-color: var(--mp-white); }

/* ---------------------------------------------------------------- buttons */
.mp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 24px;
    border-radius: 999px;
    border: 2px solid transparent;
    font: 600 15px/1.2 "Poppins", sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
    white-space: nowrap;
}
.mp-btn:hover { transform: translateY(-1px); }
.mp-btn--pink { background: var(--mp-pink); color: var(--mp-white); box-shadow: 0 8px 20px rgba(246, 8, 173, 0.32); }
.mp-btn--pink:hover { background: var(--mp-pink-600); }
.mp-btn--light { background: var(--mp-white); color: var(--mp-blue); }
.mp-btn--light:hover { background: var(--mp-sky); }
.mp-btn--ghost { border-color: rgba(255, 255, 255, 0.7); color: var(--mp-white); background: transparent; }
.mp-btn--ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--mp-white); }
.mp-btn--blue { background: var(--mp-blue); color: var(--mp-white); }
.mp-btn--blue:hover { background: var(--mp-blue-700); }
.mp-btn--lg { min-height: 52px; padding: 14px 32px; font-size: 16px; }

.mp-link {
    color: var(--mp-blue);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid rgba(246, 8, 173, 0.45);
    transition: border-color .18s ease;
}
.mp-link:hover { border-color: var(--mp-pink); }

/* ------------------------------------------------- blue band + dot "map" */
.mp-band {
    position: relative;
    overflow: hidden;
    background: radial-gradient(120% 140% at 50% 0%, #1550C2 0%, var(--mp-blue) 45%, var(--mp-blue-900) 100%);
    color: var(--mp-white);
    isolation: isolate;
}
.mp-band::before {
    /* dotted world-map texture: a dot grid faded towards the edges */
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1.4px, transparent 1.6px);
    background-size: 14px 14px;
    -webkit-mask-image: radial-gradient(70% 80% at 50% 40%, #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 80%);
            mask-image: radial-gradient(70% 80% at 50% 40%, #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 80%);
}
.mp-band::after {
    /* orbit rings */
    content: "";
    position: absolute;
    z-index: -1;
    width: 760px;
    height: 760px;
    left: -260px;
    top: -220px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 0 0 90px rgba(255, 255, 255, 0.025), 0 0 0 91px rgba(255, 255, 255, 0.08);
}

/* ---------------------------------------------------------------- header */
.mp-top {
    position: relative;
    z-index: 5;
    padding: 18px 0;
}
.mp-top__row {
    display: flex;
    align-items: center;
    gap: 28px;
}
.mp-logo { flex: none; line-height: 0; }
.mp-logo img { height: 30px; width: auto; }
.mp-nav { flex: 1; }
.mp-nav ul {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mp-nav a {
    display: block;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.92);
    transition: background-color .18s ease, color .18s ease;
}
.mp-nav a:hover { background: rgba(255, 255, 255, 0.12); color: var(--mp-white); }
.mp-top__actions { display: flex; gap: 10px; flex: none; }
.mp-top__actions .mp-btn { min-height: 40px; padding: 8px 20px; font-size: 14px; }

.mp-menu-btn {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--mp-white);
    cursor: pointer;
}
.mp-menu-btn svg { width: 22px; height: 22px; }
/* -------------------------------------------------------------- sections */
.mp-section { padding: 96px 0; }
.mp-section--sky { background: var(--mp-sky-2); }
.mp-heading {
    max-width: 720px;
    margin: 0 auto 48px;
    text-align: center;
}
.mp-heading h2 {
    font-size: clamp(28px, 3.6vw, 40px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--mp-blue);
}
.mp-heading h2 em { font-style: normal; color: var(--mp-pink); }
.mp-heading p { margin-top: 14px; font-size: 17px; color: var(--mp-muted); }
/* ------------------------------------------------------------- pink band */
.mp-pinkband {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--mp-pink) 0%, #E6069F 60%, #C2058A 100%);
    color: var(--mp-white);
}
.mp-pinkband::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -160px;
    top: -200px;
    border-radius: 50%;
    border: 70px solid rgba(255, 255, 255, 0.08);
}
.mp-pinkband__row {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding-block: 64px;   /* block only: the row is also .mp-wrap, which owns the side gutters */
}
.mp-pinkband h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 600; line-height: 1.2; }
.mp-pinkband p { margin-top: 10px; font-size: 17px; color: rgba(255, 255, 255, 0.92); max-width: 560px; }
.mp-pinkband__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.mp-pinkband .mp-btn--light { color: var(--mp-pink-600); }

/* ------------------------------------------------------------- closing CTA */
.mp-closing { padding: 88px 0; text-align: center; }
.mp-closing h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 500; line-height: 1.15; letter-spacing: -0.015em; }
.mp-closing p { margin: 14px auto 0; max-width: 560px; font-size: 18px; font-weight: 300; color: rgba(255, 255, 255, 0.88); }
.mp-closing .mp-btn { margin-top: 30px; }

/* ------------------------------------------------------------- footer */
.mp-footer { background: var(--mp-sky-2); border-top: 1px solid var(--mp-line); }
.mp-footer__top {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr) 1.2fr;
    gap: 36px;
    padding: 64px 0 44px;
}
.mp-footer__brand img { height: 28px; width: auto; }
.mp-footer__brand p { margin-top: 16px; font-size: 14px; color: var(--mp-muted); max-width: 260px; }
.mp-footer h3 {
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mp-blue);
}
.mp-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.mp-footer ul a { font-size: 15px; color: var(--mp-ink); text-decoration: none; }
.mp-footer ul a:hover { color: var(--mp-pink-600); }
.mp-social { display: flex; gap: 10px; margin-bottom: 18px; }
.mp-social a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--mp-blue);
    color: var(--mp-white);
    transition: background-color .18s ease;
}
.mp-social a:hover { background: var(--mp-pink); }
.mp-social svg { width: 18px; height: 18px; }
.mp-apps { display: flex; flex-wrap: wrap; gap: 10px; }
.mp-apps img { height: 40px; width: auto; }
.mp-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 0 28px;
    border-top: 1px solid var(--mp-line);
    font-size: 14px;
    color: var(--mp-muted);
}
.mp-footer__bottom a { color: var(--mp-muted); text-decoration: none; }
.mp-footer__bottom a:hover { color: var(--mp-blue); }
.mp-footer__legal { display: flex; gap: 20px; }

/* ------------------------------------------------------------- inner page header (inside .mp-band) */
.mp-pagehead { padding: 48px 0 72px; }
.mp-pagehead__crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.78);
}
.mp-pagehead__crumbs li + li::before { content: "/"; margin-right: 8px; color: rgba(255, 255, 255, 0.45); }
.mp-pagehead__crumbs a { color: rgba(255, 255, 255, 0.9); text-decoration: none; }
.mp-pagehead__crumbs a:hover { color: var(--mp-white); text-decoration: underline; }
.mp-pagehead h1 {
    font-size: clamp(30px, 4.2vw, 46px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.mp-pagehead h1 span {
    text-decoration: underline;
    text-decoration-color: var(--mp-pink);
    text-decoration-thickness: 5px;
    text-underline-offset: 10px;
    text-decoration-skip-ink: none;
}
.mp-pagehead__lead {
    max-width: 680px;
    margin-top: 16px;
    font-size: clamp(16px, 1.8vw, 19px);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
}

/* ------------------------------------------------------------- layout helpers */
.mp-grid { display: grid; gap: 24px; }
.mp-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mp-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mp-stack > * + * { margin-top: 16px; }

/* ------------------------------------------------------------- cards */
.mp-card {
    padding: 28px 28px;
    border-radius: var(--mp-radius);
    background: var(--mp-white);
    border: 1px solid var(--mp-line);
    box-shadow: 0 6px 18px rgba(12, 62, 157, 0.06);
}
.mp-card--raised { box-shadow: var(--mp-shadow); border-color: transparent; }
.mp-card h2,
.mp-card h3 { color: var(--mp-blue); font-weight: 600; line-height: 1.25; }
.mp-card h2 { font-size: 22px; }
.mp-card h3 { font-size: 18px; }
.mp-card p { color: var(--mp-muted); }
.mp-card > * + * { margin-top: 12px; }

/* ------------------------------------------------------------- long text (terms, privacy, news) */
.mp-prose { max-width: 780px; color: var(--mp-ink); font-size: 16px; line-height: 1.75; }
.mp-prose > * + * { margin-top: 1em; }
.mp-prose h2 { margin-top: 1.8em; font-size: 24px; font-weight: 600; color: var(--mp-blue); line-height: 1.3; }
.mp-prose h3 { margin-top: 1.5em; font-size: 19px; font-weight: 600; color: var(--mp-blue); }
.mp-prose ul,
.mp-prose ol { padding-left: 1.4em; }
.mp-prose li + li { margin-top: 0.4em; }
.mp-prose a { color: var(--mp-blue); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(246, 8, 173, 0.55); text-underline-offset: 3px; }
.mp-prose a:hover { text-decoration-color: var(--mp-pink); }
.mp-prose table { width: 100%; border-collapse: collapse; }
.mp-prose th,
.mp-prose td { padding: 8px 10px; border-bottom: 1px solid var(--mp-line); text-align: left; }

/* ------------------------------------------------------------- forms */
.mp-form { display: grid; gap: 18px; }
.mp-field { display: grid; gap: 6px; }
.mp-label { font-size: 14px; font-weight: 600; color: var(--mp-ink); }
.mp-input,
.mp-select,
.mp-textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #C9D3EA;
    border-radius: 12px;
    background: var(--mp-white);
    font: 400 15px/1.4 "Poppins", sans-serif;
    color: var(--mp-ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.mp-textarea { min-height: 120px; resize: vertical; }
.mp-input:focus,
.mp-select:focus,
.mp-textarea:focus { outline: none; border-color: var(--mp-blue); box-shadow: 0 0 0 4px rgba(12, 62, 157, 0.12); }
.mp-input[aria-invalid="true"],
.mp-select[aria-invalid="true"],
.mp-textarea[aria-invalid="true"] { border-color: #C62828; }
.mp-help { font-size: 13px; color: var(--mp-muted); }
.mp-error { font-size: 13px; font-weight: 500; color: #C62828; }
.mp-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--mp-ink); }
.mp-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--mp-pink); }

/* ------------------------------------------------------------- tables (rates, schedules) */
.mp-table-wrap { overflow-x: auto; border-radius: var(--mp-radius); border: 1px solid var(--mp-line); background: var(--mp-white); }
.mp-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.mp-table th {
    padding: 14px 18px;
    background: var(--mp-sky);
    color: var(--mp-blue);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
}
.mp-table td { padding: 13px 18px; border-top: 1px solid var(--mp-line); }
.mp-table tbody tr:hover td { background: var(--mp-sky-2); }
.mp-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------------------- alerts and badges */
.mp-alert {
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid var(--mp-line);
    background: var(--mp-sky-2);
    font-size: 15px;
}
.mp-alert--info { border-color: #C9D6F5; background: var(--mp-sky); color: var(--mp-blue-900); }
.mp-alert--success { border-color: #BFE3CC; background: #EFFAF3; color: #1D6B3A; }
.mp-alert--error { border-color: #F2C4C4; background: #FDF1F1; color: #9B1C1C; }
.mp-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--mp-pink-50);
    color: var(--mp-pink-600);
    font-size: 12px;
    font-weight: 600;
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
    .mp-nav a { padding: 8px 9px; font-size: 14px; }
    .mp-footer__top { grid-template-columns: repeat(3, 1fr); }
    .mp-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 880px) {
    .mp-menu-btn { display: grid; place-items: center; }
    .mp-top__row { flex-wrap: wrap; gap: 14px; }
    .mp-nav,
    .mp-top__actions { display: none; flex-basis: 100%; }
    .mp-top.is-open .mp-nav,
    .mp-top.is-open .mp-top__actions { display: flex; }
    .mp-top.is-open .mp-nav ul { flex-direction: column; width: 100%; }
    .mp-top.is-open .mp-nav a { padding: 12px 14px; font-size: 16px; }
    .mp-top.is-open .mp-top__actions .mp-btn { flex: 1; }
    .mp-top.is-open { padding-bottom: 22px; }
    .mp-section { padding: 72px 0; }
    .mp-pagehead { padding: 36px 0 56px; }
    .mp-grid--2,
    .mp-grid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    :root { --mp-gutter: 16px; }
    .mp-logo img { height: 24px; }
    .mp-footer__top { grid-template-columns: repeat(2, 1fr); }
    .mp-pinkband__row { padding-block: 52px; }
    .mp-card { padding: 22px 18px; }
    .mp-table th,
    .mp-table td { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .mp *,
    .mp *::before,
    .mp *::after { transition: none !important; }
}
