/* ==========================================================================
   marketing.css — shared design layer for the standalone marketing pages
   (/free-rsvp-website, /rsvp-form, /rsvp-google-form,
    /tools/rsvp-qr-code-generator, /wedding-rsvp-qr-code)

   Everything is scoped under .mk-page so it can never leak into the app,
   the guest RSVP pages, or the CMS-driven templates.

   Design intent: keep the site's existing language (white ground, #0066FF,
   Avenir, 12–16px radii, soft shadows) but restore the vertical rhythm the
   designed pages use (~72–80px sections) and replace stock Bootstrap
   chrome — tables, accordions, cards, buttons — with quieter custom forms.
   ========================================================================== */

.mk-page {
    --mk-ink: #1a1f2b;
    --mk-body: #4a5260;
    --mk-muted: #737c8c;
    --mk-hairline: #e7ebf2;
    --mk-tint: #f7f9fc;
    --mk-brand: #0066FF;
    --mk-brand-dark: #0052cc;
    --mk-brand-wash: #eef4ff;
    --mk-radius: 16px;
    --mk-shadow: 0 4px 20px rgba(23, 31, 43, .07);
    /* Shared reading column. Font-size independent on purpose — see .mk-prose. */
    --mk-measure: 46rem;

    color: var(--mk-body);
    font-size: 1.0625rem;
    line-height: 1.75;
}

/* ---------- Vertical rhythm -------------------------------------------- */

.mk-hero {
    padding: 72px 0 44px;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.mk-section {
    padding: 72px 0;
    border-top: 1px solid var(--mk-hairline);
}

/* First section after the hero shouldn't double up on space */
.mk-hero + .mk-section {
    border-top: 1px solid var(--mk-hairline);
}

/* A section that carries no divider (e.g. directly after a panel) */
.mk-section--flush {
    border-top: 0;
}

/* Tinted rounded panel — the signature block. Used for tools, comparison
   blocks and closing CTAs instead of full-bleed bands, which can't work
   cleanly inside the site's .container wrapper. */
.mk-panel {
    background: var(--mk-tint);
    border: 1px solid var(--mk-hairline);
    border-radius: 24px;
    padding: 48px 40px;
    margin: 72px 0;
}

.mk-panel--tool {
    background: linear-gradient(180deg, #fbfcfe 0%, var(--mk-tint) 100%);
    padding: 40px;
}

/* A panel straight after the hero shouldn't stack the hero's bottom padding
   on top of the panel's own margin — that reads as a hole in the page.
   The descendant form catches panels wrapped in a Bootstrap row/col. */
.mk-hero + .mk-panel,
.mk-hero + * .mk-panel {
    margin-top: 8px;
}

/* Likewise a section straight after a panel already has the panel's margin */
.mk-panel + .mk-section {
    border-top: 0;
    padding-top: 0;
}

/* Soft brand wash behind the hero — subtle, one per page */
.mk-hero-wash {
    background:
        radial-gradient(60% 120% at 50% -20%, rgba(0, 102, 255, .07) 0%, rgba(0, 102, 255, 0) 70%);
    margin: 0 -1.5rem;
    padding: 0 1.5rem;
}

@media (max-width: 767.98px) {
    .mk-hero { padding: 44px 0 32px; }
    .mk-section { padding: 48px 0; }
    .mk-panel { padding: 32px 22px; margin: 48px 0; border-radius: 18px; }
    .mk-panel--tool { padding: 24px 18px; }
}

/* ---------- Typography -------------------------------------------------- */

.mk-page h1 {
    color: var(--mk-ink);
    font-size: clamp(2.15rem, 1.5rem + 2.6vw, 3.05rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
    font-weight: 500;
    margin-bottom: 1.25rem;
    text-wrap: balance;
}

.mk-page h2 {
    color: var(--mk-ink);
    font-size: clamp(1.55rem, 1.2rem + 1.15vw, 2.05rem);
    line-height: 1.22;
    letter-spacing: -0.02em;
    font-weight: 500;
    margin-bottom: 1.1rem;
    text-wrap: balance;
}

.mk-page h3 {
    color: var(--mk-ink);
    font-size: 1.125rem;
    line-height: 1.35;
    letter-spacing: -0.005em;
    font-weight: 600;
    margin-bottom: .6rem;
}

.mk-page p { margin-bottom: 1.15rem; }
.mk-page p:last-child { margin-bottom: 0; }

/* Comfortable measure for running prose (not applied to grids/tables) */
/* Readable measure. Centring is handled at section level (below) so that a
   heading and the copy under it always share one column — centring an
   individual <p> here would orphan the <h2> that introduces it.

   NOTE: this is deliberately a rem, not `ch`. `ch` is font-size relative, so
   the same `68ch` resolves to ~1400px on a 2rem heading and ~730px on body
   copy — headings would escape the column entirely and hang to the left. */
.mk-prose { max-width: var(--mk-measure); }
.mk-prose--center { max-width: var(--mk-measure); margin-left: auto; margin-right: auto; }

/* Everything placed directly in a section shares one centred column, so the
   heading, body copy, steps and FAQ all line up on the same left edge.
   The text itself stays left-aligned — centred body copy is harder to read. */
.mk-section > * {
    max-width: var(--mk-measure);
    margin-left: auto;
    margin-right: auto;
}

/* Blocks that manage their own width: Bootstrap grids, tables, panels and
   the closing CTA are meant to run wider than the reading measure. */
.mk-section > .row,
.mk-section > .mk-tablewrap,
.mk-section > .table-responsive,
.mk-section > .mk-panel,
.mk-section > .mk-cta,
.mk-section > .mk-themegrid {
    max-width: none;
}


.mk-lead {
    font-size: 1.2rem;
    line-height: 1.62;
    color: var(--mk-muted);
}

.mk-eyebrow {
    display: inline-block;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--mk-brand);
    margin-bottom: .85rem;
}

/* Text links only — must not repaint anchors that are styled as buttons,
   or a .btn-primary <a> loses its white label. */
.mk-page a:not(.btn) { color: var(--mk-brand); }
.mk-page a:not(.btn):hover { color: var(--mk-brand-dark); }

.mk-page a.btn-primary,
.mk-page a.btn-primary:hover,
.mk-page a.btn-primary:focus { color: #fff; }

/* ---------- Pills / badges ---------------------------------------------- */

.mk-badge-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.mk-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 1px solid var(--mk-hairline);
    border-radius: 999px;
    padding: 7px 15px;
    font-size: .9rem;
    color: #495057;
    background: #fff;
    box-shadow: 0 1px 2px rgba(23, 31, 43, .04);
}

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

.mk-card {
    background: #fff;
    border: 1px solid var(--mk-hairline);
    border-radius: var(--mk-radius);
    padding: 28px;
    height: 100%;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.mk-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--mk-shadow);
    border-color: #d9e2f0;
}

/* Non-interactive cards shouldn't animate */
.mk-card--static:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--mk-hairline);
}

.mk-card h3 { margin-bottom: .5rem; }
.mk-card p:last-child { margin-bottom: 0; }

.mk-callout {
    border: 1px solid var(--mk-hairline);
    border-left: 3px solid var(--mk-brand);
    border-radius: 0 var(--mk-radius) var(--mk-radius) 0;
    background: var(--mk-brand-wash);
    padding: 26px 30px;
}

/* ---------- Tables ------------------------------------------------------- */

.mk-tablewrap {
    border: 1px solid var(--mk-hairline);
    border-radius: var(--mk-radius);
    overflow-x: auto;
    background: #fff;
}

.mk-page .mk-tablewrap table,
.mk-page table.mk-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .96rem;
}

.mk-page .mk-tablewrap thead th,
.mk-page table.mk-table thead th {
    background: var(--mk-tint);
    color: var(--mk-muted);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 14px 18px;
    border: 0;
    border-bottom: 1px solid var(--mk-hairline);
    white-space: nowrap;
    vertical-align: middle;
}

.mk-page .mk-tablewrap tbody td,
.mk-page .mk-tablewrap tbody th,
.mk-page table.mk-table tbody td,
.mk-page table.mk-table tbody th {
    padding: 16px 18px;
    border: 0;
    border-top: 1px solid var(--mk-hairline);
    vertical-align: top;
    background: transparent;
    font-weight: 400;
    color: var(--mk-body);
}

.mk-page .mk-tablewrap tbody tr:first-child td,
.mk-page .mk-tablewrap tbody tr:first-child th,
.mk-page table.mk-table tbody tr:first-child td,
.mk-page table.mk-table tbody tr:first-child th {
    border-top: 0;
}

/* First cell in each row reads as the row label */
.mk-page .mk-tablewrap tbody tr > *:first-child,
.mk-page table.mk-table tbody tr > *:first-child {
    color: var(--mk-ink);
    font-weight: 600;
}

.mk-page .mk-tablewrap tbody tr:hover,
.mk-page table.mk-table tbody tr:hover {
    background: #fbfcfe;
}

/* Highlight our own row without shouting. Selector must out-specify the
   `tbody td { background: transparent }` reset above, hence the full path. */
.mk-page .mk-tablewrap tbody tr.mk-row-own > *,
.mk-page table.mk-table tbody tr.mk-row-own > * {
    background: var(--mk-brand-wash);
}
.mk-page .mk-tablewrap tbody tr.mk-row-own:hover > *,
.mk-page table.mk-table tbody tr.mk-row-own:hover > * {
    background: #e6efff;
}

.mk-table-note {
    font-size: .85rem;
    color: var(--mk-muted);
    margin-top: .85rem;
}

/* ---------- FAQ / accordion (de-Bootstrapped) ---------------------------- */

.mk-page .accordion,
.mk-page .accordion-item {
    background: transparent;
    border: 0;
    border-radius: 0;
}

.mk-page .accordion-item {
    border-top: 1px solid var(--mk-hairline);
}
.mk-page .accordion-item:last-child {
    border-bottom: 1px solid var(--mk-hairline);
}

.mk-page .accordion-button {
    background: transparent !important;
    box-shadow: none !important;
    border: 0;
    padding: 22px 36px 22px 0;
    font-size: 1.06rem;
    font-weight: 600;
    color: var(--mk-ink) !important;
    line-height: 1.4;
}

.mk-page .accordion-button:hover { color: var(--mk-brand) !important; }
.mk-page .accordion-button:focus-visible {
    outline: 2px solid var(--mk-brand);
    outline-offset: 2px;
}

/* Replace the default chevron image with a lighter one */
.mk-page .accordion-button::after {
    background-image: none;
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--mk-muted);
    border-bottom: 2px solid var(--mk-muted);
    transform: rotate(45deg);
    margin-top: -4px;
    transition: transform .18s ease;
    flex-shrink: 0;
}
.mk-page .accordion-button:not(.collapsed)::after {
    transform: rotate(-135deg);
    margin-top: 2px;
}

.mk-page .accordion-body {
    padding: 0 0 24px;
    color: var(--mk-body);
}

/* ---------- Steps -------------------------------------------------------- */

.mk-steps {
    list-style: none;
    counter-reset: mk-step;
    padding: 0;
    margin: 0;
}

.mk-steps > li {
    counter-increment: mk-step;
    position: relative;
    padding-left: 52px;
    margin-bottom: 26px;
}

.mk-steps > li:last-child { margin-bottom: 0; }

.mk-steps > li::before {
    content: counter(mk-step);
    position: absolute;
    left: 0;
    top: -1px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--mk-brand-wash);
    color: var(--mk-brand);
    font-weight: 700;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mk-steps h3 { margin-bottom: .35rem; }

/* ---------- Checklists --------------------------------------------------- */

.mk-check {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mk-check > li {
    position: relative;
    padding-left: 30px;
    margin-bottom: .7rem;
}

.mk-check > li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: .55em;
    width: 11px;
    height: 6px;
    border-left: 2px solid var(--mk-brand);
    border-bottom: 2px solid var(--mk-brand);
    transform: rotate(-45deg);
}

/* ---------- Buttons ------------------------------------------------------ */

.mk-page .btn {
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: -0.005em;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}

.mk-page .btn-lg {
    padding: .85rem 1.9rem;
    font-size: 1.02rem;
}

.mk-page .btn-primary {
    background: var(--mk-brand);
    border-color: var(--mk-brand);
}

.mk-page .btn-primary:hover,
.mk-page .btn-primary:focus {
    background: var(--mk-brand-dark);
    border-color: var(--mk-brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 102, 255, .22);
}

.mk-page .btn-outline-secondary {
    border-color: #d9e2f0;
    color: var(--mk-ink);
    background: #fff;
}

.mk-page .btn-outline-secondary:hover {
    border-color: var(--mk-brand);
    color: var(--mk-brand);
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(23, 31, 43, .08);
}

/* ---------- Form controls inside tool panels ----------------------------- */

.mk-page .form-control,
.mk-page .form-select {
    border-radius: 12px;
    border-color: #dfe5ef;
    padding: .7rem .9rem;
    font-size: 1rem;
}

.mk-page .form-control:focus,
.mk-page .form-select:focus {
    border-color: var(--mk-brand);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, .13);
}

.mk-page .form-label {
    font-weight: 600;
    color: var(--mk-ink);
    margin-bottom: .4rem;
}

/* ---------- Closing CTA -------------------------------------------------- */

.mk-cta {
    text-align: center;
    background: var(--mk-tint);
    border: 1px solid var(--mk-hairline);
    border-radius: 24px;
    padding: 56px 40px;
    margin: 72px 0 8px;
}

.mk-cta h2 { margin-bottom: .85rem; }
.mk-cta p { color: var(--mk-muted); }

@media (max-width: 767.98px) {
    .mk-cta { padding: 36px 22px; margin: 48px 0 8px; border-radius: 18px; }
}

/* ---------- Motion preference ------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .mk-page .btn,
    .mk-card,
    .mk-page .accordion-button::after {
        transition: none;
    }
    .mk-card:hover,
    .mk-page .btn-primary:hover,
    .mk-page .btn-outline-secondary:hover {
        transform: none;
    }
}
