/* ==========================================================================
   Mark Winser – Mortgage & Protection Adviser
   Metcalf Media · Umbraco 8.18.5
   ========================================================================== */

:root {
    --navy: #0b1f32;
    --navy-2: #12304a;
    --blue: #43678b;
    --blue-dark: #355574;
    --blue-light: #9dbad6;
    --mist: #eef3f8;
    --paper: #f8fafc;
    --white: #ffffff;
    --ink: #1c2733;
    --muted: #5b6b7c;
    --line: #dbe4ee;

    --font-head: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --font-brand: "Cinzel", Georgia, serif;
    --font-body: "Jost", "Segoe UI", Arial, sans-serif;

    --radius: 4px;
    --shadow: 0 18px 40px -22px rgba(11, 31, 50, .35);
    --header-h: 78px;
    --container: 1180px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 10px); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.12; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.4rem, 4.4vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2.1rem, 3.6vw, 3rem); }
h3 { font-size: 1.55rem; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--navy); color: #fff; padding: 10px 16px; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 12px;
    font-family: var(--font-body); font-size: .78rem; font-weight: 500;
    letter-spacing: .22em; text-transform: uppercase; color: var(--blue);
    margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font-family: var(--font-body); font-size: .95rem; font-weight: 500; letter-spacing: .04em;
    padding: 14px 26px; border: 1px solid transparent; border-radius: var(--radius);
    text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--blue); color: #fff; transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--text { background: none; color: var(--ink); padding-inline: 12px; text-decoration: underline; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: wait; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid transparent;
    transition: box-shadow .25s, border-color .25s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(11, 31, 50, .45); }
.site-header__inner { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); }

.site-branding { display: flex; align-items: center; gap: 14px; text-decoration: none; margin-right: auto; }
.site-branding img { height: 36px; width: auto; }
.site-branding__text { display: flex; flex-direction: column; line-height: 1.15; }
.site-branding__name { font-family: var(--font-brand); font-size: 1.2rem; font-weight: 600; letter-spacing: .12em; color: var(--navy); text-transform: uppercase; }
.site-branding__name em { font-style: normal; color: var(--blue); }
.site-branding__role { font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

.nav-menu { display: flex; gap: 30px; }
.nav-menu a { font-size: .92rem; font-weight: 500; letter-spacing: .03em; color: var(--ink); text-decoration: none; position: relative; padding: 6px 0; }
.nav-menu a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--blue); transition: right .25s; }
.nav-menu a:hover::after, .nav-menu a.is-active::after { right: 0; }
.nav-menu a.is-active { color: var(--blue); }
.mobile-only { display: none; }

.header-cta { padding: 11px 20px; }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; position: relative; z-index: 120; }
.nav-toggle span:not(.visually-hidden) { display: block; height: 2px; background: var(--navy); margin: 5px 0; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-overlay { display: none; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background: linear-gradient(180deg, var(--paper) 0%, var(--white) 100%);
    padding: clamp(48px, 7vw, 96px) 0 0;
}
/* Roof-line motif taken from the MW logo */
.hero::before {
    content: ""; position: absolute; left: -6%; top: 46%; width: 60%; height: 340px;
    background:
        linear-gradient(to top right, transparent calc(50% - 1px), var(--line) 50%, transparent calc(50% + 1px)) left / 50% 100% no-repeat,
        linear-gradient(to top left, transparent calc(50% - 1px), var(--line) 50%, transparent calc(50% + 1px)) right / 50% 100% no-repeat;
    pointer-events: none; opacity: .9;
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__intro { font-size: 1.18rem; color: var(--muted); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 18px; }
.hero__note { font-size: .92rem; color: var(--muted); }

.hero__media { position: relative; }
.hero__photo {
    position: relative; aspect-ratio: 4 / 4.4; overflow: hidden;
    clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 100%);
    box-shadow: var(--shadow);
}
.hero__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(200deg, rgba(67, 103, 139, .12), transparent 45%); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 47% 30%; }
.hero__badge {
    position: absolute; left: -24px; bottom: 34px;
    display: flex; align-items: center; gap: 14px;
    background: var(--white); padding: 16px 22px; box-shadow: var(--shadow);
    border-left: 3px solid var(--blue); font-size: .85rem; line-height: 1.35; color: var(--muted);
}
.hero__badge img { height: 28px; width: auto; }
.hero__badge strong { color: var(--navy); font-weight: 600; letter-spacing: .04em; }

.hero__strip {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: var(--navy); color: #fff;
    width: calc(100% - 48px); max-width: calc(var(--container) - 48px);
    margin-top: clamp(40px, 6vw, 70px);
    padding: 0;
}
.hero__strip li {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 24px 14px; font-size: .82rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
}
.hero__strip li + li { border-left: 1px solid rgba(255, 255, 255, .12); }
.hero__strip .icon { width: 26px; height: 26px; color: var(--blue-light); }

/* ---------- Sections ---------- */
.section { padding: clamp(70px, 9vw, 120px) 0; }
.section__head { max-width: 680px; margin: 0 auto clamp(40px, 5vw, 60px); text-align: center; }
.section__head .eyebrow { justify-content: center; }
.section__head .eyebrow::after { content: ""; width: 34px; height: 1px; background: currentColor; }
.section__head p:last-child { color: var(--muted); }

/* Services */
.services { background: var(--white); padding-top: clamp(90px, 10vw, 130px); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
    position: relative; background: var(--paper); padding: 36px 32px 30px;
    border: 1px solid var(--line); border-radius: var(--radius);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--blue); transition: width .35s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; background: var(--white); }
.card:hover::before { width: 100%; }
.card__icon {
    display: inline-grid; place-items: center; width: 58px; height: 58px; margin-bottom: 20px;
    color: var(--blue); background: var(--white); border: 1px solid var(--line);
    clip-path: polygon(50% 0, 100% 30%, 100% 100%, 0 100%, 0 30%); /* little house shape */
}
.card__icon .icon { width: 26px; height: 26px; margin-top: 6px; }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--muted); font-size: 1rem; margin: 0; }

.risk-warning {
    margin: 44px auto 0; max-width: 760px; text-align: center;
    padding: 18px 24px; border: 1px solid var(--navy); color: var(--navy); font-size: 1rem;
}
.risk-warning strong { font-weight: 600; }

/* About */
.about { background: var(--mist); position: relative; overflow: hidden; }
.about__inner { display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.about__aside { position: sticky; top: calc(var(--header-h) + 30px); }
.about__meet { margin-top: 34px; background: var(--white); padding: 30px; border-top: 3px solid var(--navy); box-shadow: var(--shadow); }
.about__meet h3 { font-size: 1.35rem; }
.about__meet li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .98rem; }
.about__meet li:last-child { border-bottom: 0; padding-bottom: 0; }
.about__meet .icon { width: 22px; height: 22px; color: var(--blue); }

.prose p { color: #34414f; }
.prose .lead, .prose p:first-child {
    font-family: var(--font-head); font-size: clamp(1.45rem, 2.3vw, 1.8rem); line-height: 1.35;
    color: var(--navy); font-weight: 500;
}
.signature { font-family: var(--font-head); font-style: italic; font-size: 1.7rem !important; color: var(--blue) !important; margin-top: 1.4em; }

/* Process */
.process { background: var(--navy); color: #d5e0eb; position: relative; overflow: hidden; }
.process::after {
    content: ""; position: absolute; right: -120px; top: -40px; width: 520px; height: 520px;
    border: 1px solid rgba(157, 186, 214, .14); transform: rotate(45deg); pointer-events: none;
}
.section__head--light h2 { color: #fff; }
.section__head--light .eyebrow { color: var(--blue-light); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; position: relative; z-index: 1; }
.steps li { padding: 8px 30px 8px 0; position: relative; }
.steps li + li { padding-left: 30px; border-left: 1px solid rgba(255, 255, 255, .12); }
.steps__num { display: block; font-family: var(--font-head); font-size: 3rem; line-height: 1; color: var(--blue-light); margin-bottom: 16px; }
.steps h3 { color: #fff; font-size: 1.45rem; }
.steps p { font-size: .98rem; margin: 0; }

/* Contact */
.contact { background: var(--white); }
.contact__inner { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.contact__info > p { color: var(--muted); }
.contact__list { margin-top: 32px; display: grid; gap: 22px; }
.contact__list li { display: flex; gap: 18px; align-items: flex-start; }
.contact__icon { display: grid; place-items: center; width: 48px; height: 48px; background: var(--mist); color: var(--blue); flex: none; border-radius: 50%; }
.contact__icon .icon { width: 22px; height: 22px; }
.contact__list small { display: block; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.contact__list a { color: var(--navy); text-decoration: none; font-weight: 500; font-size: 1.08rem; word-break: break-word; }
.contact__list a:hover { color: var(--blue); }

.contact__form-wrap { background: var(--paper); border: 1px solid var(--line); padding: clamp(26px, 4vw, 44px); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-row { margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.contact-form label { display: block; font-size: .85rem; font-weight: 500; letter-spacing: .03em; margin-bottom: 6px; color: var(--navy); }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
    width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
    background: var(--white); border: 1px solid #c9d5e2; border-radius: var(--radius);
    padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.contact-form select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2343678b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(67, 103, 139, .18); }
.contact-form .is-invalid { border-color: #b3261e !important; }
.form-row--check { display: flex; gap: 12px; align-items: flex-start; }
.form-row--check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--navy); flex: none; }
.form-row--check label { font-weight: 400; color: var(--ink); font-size: .92rem; margin: 0; }
.form-hint { font-size: .85rem; color: var(--muted); }
.recaptcha-note { font-size: .74rem; color: var(--muted); margin: 14px 0 0; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.grecaptcha-badge { visibility: hidden; }

.form-message { padding: 16px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: .98rem; }
.form-message--error { background: #fdecea; color: #8a1c14; border-left: 3px solid #b3261e; }
.form-message--success { background: var(--white); border-left: 3px solid var(--blue); padding: 28px; margin: 0; }
.form-message--success h3 { margin-bottom: .3em; }
.form-message--success p { margin: 0; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #b9c8d8; font-size: .95rem; }
.footer__grid { display: grid; grid-template-columns: 1.2fr 1.3fr 1fr; gap: 40px; padding-top: 70px; padding-bottom: 50px; }
.footer__logo img { width: 220px; }
.site-footer h4 { font-family: var(--font-body); font-size: .78rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--blue-light); margin-bottom: 18px; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--blue-light); }
.footer__contact span { display: inline-block; min-width: 58px; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-light); }

.footer__compliance { border-top: 1px solid rgba(255, 255, 255, .1); padding: 34px 0 20px; font-size: .82rem; line-height: 1.65; color: #9fb1c4; }
.footer__compliance p { margin-bottom: .9em; max-width: 980px; }
.footer__compliance .footer__warning { color: #fff; font-weight: 500; font-size: .92rem; }
.footer__compliance a { text-decoration: underline; color: #d5e0eb; }

.footer__bar { background: #081726; font-size: .8rem; }
.footer__bar-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.footer__bar p { margin: 0; }

/* ---------- Cookie notice ---------- */
.cookie-notice {
    position: fixed; left: 20px; bottom: 20px; z-index: 200; max-width: 420px;
    background: var(--white); color: var(--ink); padding: 22px 24px;
    box-shadow: 0 20px 50px -20px rgba(11, 31, 50, .5); border-top: 3px solid var(--blue); font-size: .92rem;
}
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin-bottom: 14px; }
.cookie-notice__actions { display: flex; gap: 8px; align-items: center; }
.cookie-notice .btn { padding: 10px 18px; }

/* ---------- Reveal animation ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js [data-reveal] { opacity: 1; transform: none; transition: none; }
    * { transition-duration: 0s !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .nav-menu { gap: 22px; }
    .header-cta { display: none; }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
    .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
}

@media (max-width: 900px) {
    :root { --header-h: 68px; }
    .nav-toggle { display: block; }
    .nav-menu {
        position: fixed; top: 0; right: 0; height: 100vh; height: 100dvh; width: min(320px, 84vw);
        flex-direction: column; gap: 0; padding: calc(var(--header-h) + 20px) 32px 32px;
        background: var(--white); box-shadow: -20px 0 50px -30px rgba(11, 31, 50, .6);
        clip-path: inset(0 0 0 100%); transition: clip-path .35s ease, visibility 0s .35s; z-index: 110; visibility: hidden; /* clip rather than translate so it never causes sideways scroll */
    }
    .nav-menu a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
    .nav-menu a::after { display: none; }
    .mobile-only { display: block; }
    .mobile-only a { color: var(--blue); font-weight: 600; }
    .nav-open .nav-menu { clip-path: inset(0 0 0 -60px); visibility: visible; transition: clip-path .35s ease, visibility 0s; }
    .nav-overlay { display: block; position: fixed; inset: 0; background: rgba(11, 31, 50, .45); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 105; }
    .nav-open .nav-overlay { opacity: 1; pointer-events: auto; }
    .nav-open { overflow: hidden; }

    .hero__inner, .about__inner, .contact__inner { grid-template-columns: 1fr; }
    .hero__media { max-width: 560px; }
    .hero__photo { aspect-ratio: 4 / 3.6; }
    .hero__badge { left: 16px; bottom: 16px; }
    .hero__strip { grid-template-columns: repeat(2, 1fr); }
    .hero__strip li:nth-child(3) { border-left: 0; }
    .hero__strip li:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .12); }
    .about__aside { position: static; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .footer__col--brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .container { padding: 0 20px; }
    .site-branding img { height: 30px; }
    .site-branding__name { font-size: 1rem; }
    .site-branding__role { font-size: .55rem; letter-spacing: .1em; white-space: nowrap; }
    .hero__actions .btn { flex: 1 1 100%; }
    .hero__strip { width: calc(100% - 40px); }
    .hero__strip li { font-size: .7rem; letter-spacing: .1em; padding: 18px 8px; flex-direction: column; text-align: center; gap: 8px; }
    .cards, .steps { grid-template-columns: 1fr; }
    .steps li, .steps li + li { padding: 0 0 0 0; border-left: 0; }
    .card { padding: 30px 24px 26px; }
    .form-grid { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; padding-top: 50px; }
    .footer__bar-inner { flex-direction: column; gap: 6px; }
    .cookie-notice { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}