/*
 * Home page (home.php): the hero, the coverage strip, how it works, the report-type tiles, the
 * previews of Our story, Insights and Pricing, and the enquiry form. Colours come from the
 * tokens in marketing.css, so everything here works in both appearances.
 */

/* ---- Hero: the words on the page's own surface, the photograph beside them ----
   The photograph keeps its natural colour; only its inner edge fades into the page so it sits
   in the layout without a hard line. --hero-focus keeps the surveyor and the house in view. */
.mk-hero {
    /* The words' column: aligned with the page's content edge; the photograph starts after it. */
    --hero-copy: clamp(440px, 40vw, 520px);
    --hero-left: max(var(--mk-gutter), calc((100% - var(--mk-shell)) / 2));
    position: relative; overflow: hidden; border-bottom: 1px solid var(--mk-line);
}
.mk-hero__media { position: absolute; top: 0; right: 0; bottom: 0; left: calc(var(--hero-left) + var(--hero-copy) + 32px); background: var(--mk-surface-tone); }
.mk-hero__photo { --hero-focus: 8% 50%; display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-focus); }
.mk-hero__media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, var(--mk-bg) 0, transparent 56px); }
.mk-hero__inner { position: relative; z-index: 1; display: flex; align-items: center; min-height: clamp(520px, 38vw, 660px); padding-block: 56px; }
.mk-hero__copy { max-width: var(--hero-copy); }
.mk-hero h1 { font-size: clamp(42px, 4.6vw, 70px); line-height: 1; letter-spacing: -.045em; font-weight: 800; margin-bottom: 18px; }
.mk-hero__line { display: inline-block; }
.mk-hero__tagline { font-size: clamp(20px, 1.9vw, 26px); line-height: 1.3; font-weight: 400; color: var(--mk-muted); margin-bottom: 18px; }
.mk-hero__intro { font-size: 17px; line-height: 1.6; color: var(--mk-text); text-wrap: pretty; }
.mk-hero .mk-actions { margin-top: 28px; }
.mk-enquiry-banner { padding-top: 20px; }

/* ---- Feature sections: the words beside a screenshot of the app (or a photograph), alternating
   sides down the page (--flip puts the picture first on wide screens). Until a screenshot has
   been added the section is words alone (--words). On phones the picture follows the words. */
.mk-feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.mk-feature--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.mk-feature--flip > .mk-feature__copy { order: 2; }
.mk-feature--words { grid-template-columns: minmax(0, 1fr); }
.mk-feature--words .mk-feature__copy { max-width: 760px; }
.mk-screen { margin: 0; justify-self: center; width: 100%; }
/* The screenshots sit in MacBook Pro and iPhone frames with transparent surrounds, so no border. */
.mk-screen--portrait { max-width: 360px; }
.mk-screen img { display: block; width: 100%; height: auto; }

/* ---- Acts: Time, Quality, Profit and Run your practice each share one background; a section
   that continues its act (--joined) closes up to the one before, with no line between them. ---- */
.mk-section--joined { padding-top: 0; }
.mk-section--alt.mk-section--joined { border-top: 0; }
.mk-section--alt:has(+ .mk-section--alt.mk-section--joined) { border-bottom: 0; }

/* ---- Photographs in the Time act: the surveyor on site (kept on him and his phone) and the
   camera close-up, upright and centred beside its words. ---- */
.mk-photo--onsite { --photo-focus: 32% 50%; }
.mk-voice .mk-photo--voice { aspect-ratio: 1227 / 812; max-width: 1080px; margin: 48px auto 0; }
.mk-photo--camera { aspect-ratio: 994 / 1215; width: 100%; max-width: 400px; justify-self: center; }
#how-it-works .mk-screen { max-width: 1080px; margin: 56px auto 0; }

/* ---- Showcase: the business case centred over the app on a MacBook Pro and an iPhone ---- */
.mk-showcase__copy { max-width: 820px; margin-inline: auto; text-align: center; }
.mk-showcase__copy h2, .mk-section .mk-showcase__copy p { margin-inline: auto; }
.mk-showcase .mk-screen { max-width: 1080px; margin: 48px auto 0; }
.mk-standard__copy { max-width: 880px; margin-inline: auto; text-align: center; }
.mk-standard__copy h2 { font-size: clamp(36px, 5vw, 60px); line-height: 1.05; margin-inline: auto; }
.mk-section .mk-standard__copy p { margin-inline: auto; }
.mk-standard__points { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; max-width: 1080px; margin: 56px auto 0; padding: 0; text-align: center; }
.mk-standard__points h3 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 8px; }

/* ---- Gallery: the paid extras side by side, words over each picture ---- */
.mk-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.mk-gallery__item { display: flex; flex-direction: column; gap: 28px; padding: 40px 32px 32px; border: 1px solid var(--mk-line); border-radius: 6px; background: var(--mk-surface); }
.mk-gallery__item h2 { font-size: clamp(24px, 2.4vw, 32px); }
.mk-gallery__item .mk-screen { margin-top: auto; }

/* Below 1100px the photograph moves above the words, full width, fading into the page below. */
@media (max-width: 1099px) {
    .mk-hero { display: flex; flex-direction: column; }
    .mk-hero__media { position: relative; left: auto; width: 100%; aspect-ratio: 5 / 2; min-height: 0; overflow: hidden; }
    /* The photo fills the frame rather than sizing it, so the frame keeps its ratio. */
    .mk-hero__photo { --hero-focus: 30% 50%; position: absolute; inset: 0; }
    .mk-hero__media::after { background: linear-gradient(0deg, var(--mk-bg) 0%, transparent 16%); }
    .mk-hero__inner { min-height: 0; padding-block: 8px 56px; }
    .mk-hero__copy { max-width: 640px; }
}
@media (max-width: 860px) {
    .mk-hero__media { aspect-ratio: 2 / 1; }
    .mk-feature { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .mk-feature--flip > .mk-feature__copy { order: 0; }
    .mk-feature--flip { grid-template-columns: minmax(0, 1fr); }
    .mk-screen--portrait { max-width: 300px; }
    .mk-gallery { grid-template-columns: minmax(0, 1fr); }
    .mk-standard__points { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 40px; }
    .mk-gallery__item { padding: 28px 20px 20px; }
    .mk-showcase .mk-screen { margin-top: 32px; }
}
@media (max-width: 700px) {
    .mk-hero__media { aspect-ratio: 16 / 10; }
    .mk-hero__photo { --hero-focus: 22% 50%; }
    .mk-hero__inner { padding-block: 4px 44px; }
}

/* ---- Coverage strip ---- */
.mk-strip { border-bottom: 1px solid var(--mk-line); }
.mk-strip__list { list-style: none; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px 0; padding-block: 18px; font-size: 15px; font-weight: 600; color: var(--mk-ink); }
.mk-strip__list li { display: inline-flex; align-items: center; }
.mk-strip__list li:not(:last-child)::after { content: ""; width: 4px; height: 4px; margin: 0 16px; border-radius: 50%; background: var(--mk-muted); }

/* ---- How it works: three numbered steps ---- */
.mk-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 44px; border-top: 1px solid var(--mk-line); }
.mk-step { padding: 28px 28px 8px 0; }
.mk-step + .mk-step { padding-left: 28px; border-left: 1px solid var(--mk-line); }
.mk-step__head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.mk-step__number { font-size: 14px; font-weight: 600; color: var(--mk-muted); font-variant-numeric: tabular-nums; }
.mk-step__icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border: 1.5px solid var(--mk-tile-line); border-radius: 2px; color: var(--mk-ink); }
.mk-step__icon .mk-icon { width: 24px; height: 24px; stroke-width: 1.7; }
.mk-step h3 { margin-bottom: 8px; }
.mk-step p { color: var(--mk-muted); font-size: 16px; }

/* ---- For your clients: four points, divided by lines rather than boxes ---- */
.mk-features { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 40px; border-top: 1px solid var(--mk-line); }
.mk-features li { padding: 24px 24px 4px 0; }
.mk-features li + li { padding-left: 24px; border-left: 1px solid var(--mk-line); }
.mk-features h3 { margin-bottom: 6px; }
.mk-features p { font-size: 15.5px; color: var(--mk-muted); }

/* ---- The elements of your practice: report types as tiles in an orderly grid ---- */
.mk-elements-group { margin-top: 36px; }
.mk-elements-group__title { margin-bottom: 12px; font-size: 13px !important; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mk-muted) !important; }
.mk-elements { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mk-element { position: relative; display: flex; align-items: flex-end; min-height: 128px; padding: 16px 18px; border: 1.5px solid var(--mk-tile-line); border-radius: 2px; color: var(--mk-ink); font-size: clamp(18px, 1.7vw, 22px); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.mk-element__s { position: absolute; top: 12px; left: 16px; font-size: 17px; font-weight: 800; line-height: 1; }
.mk-elements--core .mk-element { background: var(--mk-ink); color: var(--mk-bg); }
.mk-section p.mk-elements-note { margin-top: 28px; color: var(--mk-muted); }

/* ---- Our story preview ---- */
.mk-story-preview { max-width: 820px; }

/* ---- Insights preview: an introduction beside the two latest articles ---- */
.mk-insights-preview { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; align-items: start; }
.mk-insights-preview__intro { padding-right: 32px; border-right: 1px solid var(--mk-line); }
.mk-insights-preview__intro h2 { margin-bottom: 14px; }
.mk-insights-preview__intro p { color: var(--mk-muted); }
.mk-insights-preview .mk-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---- Pricing preview: one line per package, each with its plan tile ---- */
.mk-plan-preview { list-style: none; display: grid; border-top: 1px solid var(--mk-line); }
.mk-plan-preview__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--mk-line); }
.mk-plan-preview__name { display: flex; flex-direction: column; color: var(--mk-muted); font-size: 15px; }
.mk-plan-preview__name strong { font-size: 19px; }
.mk-plan-preview__price { font-weight: 700; color: var(--mk-ink); white-space: nowrap; }
.mk-trust { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 56px; border-block: 1px solid var(--mk-line); color: var(--mk-muted); font-size: 14px; }
.mk-trust li { padding: 18px 20px 18px 0; }
.mk-trust li + li { padding-left: 20px; border-left: 1px solid var(--mk-line); }

/* ---- Enquiry form ---- */
.mk-form-card { padding: 28px; border: 1px solid var(--mk-line); border-radius: 6px; background: var(--mk-surface); }
.mk-form { display: grid; gap: 16px; }
.mk-field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--mk-ink); }
.mk-field input, .mk-field select, .mk-field textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--mk-control-line); border-radius: var(--mk-radius); background: var(--mk-bg); color: var(--mk-ink); font: 16px/1.4 var(--mk-font); }
.mk-field textarea { min-height: 96px; resize: vertical; }
.mk-field input:focus-visible, .mk-field select:focus-visible, .mk-field textarea:focus-visible { outline: 3px solid var(--mk-focus); outline-offset: 1px; }
.mk-form .mk-button { justify-self: start; margin-top: 4px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

@media (max-width: 1023px) {
    .mk-steps, .mk-features { grid-template-columns: minmax(0, 1fr); }
    .mk-step, .mk-step + .mk-step, .mk-features li, .mk-features li + li { padding: 22px 0; border-left: 0; border-bottom: 1px solid var(--mk-line); }
    .mk-features { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
    .mk-elements { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mk-insights-preview { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .mk-insights-preview__intro { padding-right: 0; border-right: 0; }
    .mk-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mk-trust li, .mk-trust li + li { padding: 14px 16px 14px 0; border-left: 0; }
}
@media (max-width: 640px) {
    .mk-features, .mk-insights-preview .mk-cards, .mk-trust { grid-template-columns: minmax(0, 1fr); }
    .mk-element { min-height: 96px; padding: 12px 14px; font-size: 17px; }
    .mk-strip__list { flex-direction: column; align-items: flex-start; gap: 6px; }
    .mk-strip__list li { align-items: flex-start; }
    .mk-strip__list li:not(:last-child)::after { display: none; }
    .mk-strip__list li::before { content: ""; flex: none; width: 4px; height: 4px; margin: calc(0.8em - 2px) 12px 0 0; border-radius: 50%; background: var(--mk-muted); }
    .mk-plan-preview__item { grid-template-columns: auto minmax(0, 1fr); }
    .mk-plan-preview__price { grid-column: 2; }
    .mk-form-card { padding: 20px 16px; }
    .mk-form .mk-button { justify-self: stretch; }
}
@media (max-width: 360px) {
    .mk-elements { grid-template-columns: minmax(0, 1fr); }
}
