/*
Theme Name: Brooklands Garage Conversions
Author: AMB360
Description: Dedicated Google Ads landing page for Brooklands Construction.
Version: 1.4.1
Text Domain: brooklands
*/

/* =========================================
   FOUNDATIONS
   ========================================= */

:root {
    --colour-black: #000;
    --colour-ink: #171717;
    --colour-muted: #626262;
    --colour-white: #fff;
    --colour-paper: #f7f7f4;
    --colour-yellow: #ffd000;
    --colour-yellow-hover: #ffe052;
    --page-gutter: clamp(20px, 4vw, 64px);
    --header-height: 120px;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI",
        Arial, Helvetica, sans-serif;
}

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

html {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
    width: 100%;
    min-width: 0;
    margin: 0;
    background: var(--colour-paper);
    color: var(--colour-ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Clip sideways overflow without creating a scroll container. */

@supports (overflow: clip) {
    html,
    body {
        overflow-x: clip;
    }
}

main,
section,
article,
nav,
form,
fieldset {
    min-width: 0;
}

main {
    width: 100%;
    max-width: 100%;
}

fieldset {
    min-inline-size: 0;
    max-width: 100%;
}

legend {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

button,
input,
select,
textarea {
    font: inherit;
}

input,
select,
textarea {
    min-width: 0;
    max-width: 100%;
}

img,
video {
    display: block;
    max-width: 100%;
    height: auto;
}

iframe {
    max-width: 100%;
}

a {
    color: inherit;
}

a,
button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid #1267d5;
    outline-offset: 4px;
}

[hidden] {
    display: none !important;
}

/* Prevent form contents expanding their grid columns. */

#brooklands-quote-form,
#brooklands-quote-form fieldset,
#brooklands-quote-form [data-quote-step],
#brooklands-quote-form [data-question],
.quote__inner,
.quote__panel,
.quote__panel > *,
.quote-option,
.quote-option__body {
    min-width: 0;
    min-inline-size: 0;
}

#brooklands-quote-form {
    width: 100%;
    max-width: 100%;
}

.quote-option__body {
    overflow-wrap: anywhere;
}

/* =========================================
   SKIP LINK
   ========================================= */

.skip-link {
    position: fixed;
    z-index: 10000;
    top: 12px;
    left: 12px;
    max-width: calc(100% - 24px);
    padding: 12px 20px;
    transform: translateY(-200%);
    border-radius: 4px;
    background: var(--colour-yellow);
    color: #000;
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    transform: translateY(0);
}

/* =========================================
   BUTTONS
   ========================================= */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    max-width: 100%;
    padding: 14px 22px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease;
}

.button--yellow {
    background: var(--colour-yellow);
    color: #000;
}

.button--yellow:active {
    background: #edc100;
}

/* =========================================
   HEADER
   ========================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: #000;
    border-bottom: 1px solid #252525;
}

.site-header__inner {
    position: relative;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: var(--header-height);
    margin: 0;
    padding: 22px 28px;
}

.site-brand {
    position: relative;
    display: block;
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    width: 260px;
    max-width: 100%;
    min-width: 0;
    height: 76px;
    margin: 0;
    overflow: hidden;
}

.site-brand__image {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    transform: translateY(-50%);
}

.section-nav {
    position: static;
    display: block;
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: #000;
}

.section-nav__list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 22px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.section-nav__list li {
    min-width: 0;
    margin: 0;
    padding: 0;
}

.section-nav__list a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 0;
    color: #dedede;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    white-space: normal;
    text-decoration: none;
    transition: color 160ms ease;
}

.section-nav__list a:hover {
    color: var(--colour-yellow);
}

.header-quote {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    min-width: 0;
    min-height: 50px;
    margin: 0;
    padding: 14px 22px;
    white-space: nowrap;
}

.header-menu-toggle,
.header-quote__mobile {
    display: none;
}

.site-header :focus-visible {
    outline-color: var(--colour-yellow);
}

/* Large desktop */

@media (min-width: 1440px) {
    :root {
        --header-height: 128px;
    }

    .site-header__inner {
        grid-template-columns: 280px minmax(0, 1fr) auto;
        padding: 24px 36px;
    }

    .site-brand {
        width: 280px;
        height: 80px;
    }

    .section-nav__list {
        gap: 4px 28px;
    }

    .section-nav__list a {
        font-size: 14px;
    }
}

/* Tablet and mobile menu */

@media (max-width: 1100px) {
    :root {
        --header-height: 96px;
    }

    .site-header__inner {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 18px;
        padding: 12px 24px;
    }

    .site-brand {
        width: 220px;
        height: 70px;
    }

    .header-menu-toggle {
        grid-column: 2;
        grid-row: 1;
    }

    .site-header.has-menu-toggle .header-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        margin: 0;
        padding: 8px 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #fff;
        font-family: inherit;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.4;
        cursor: pointer;
    }

    .section-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        padding-block: 10px 14px;
        border-top: 1px solid #292929;
    }

    .site-header.has-menu-toggle .section-nav {
        display: none;
    }

    .site-header.has-menu-toggle.is-menu-open .section-nav {
        display: block;
        max-height: 65vh;
        max-height: 65dvh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .section-nav__list {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .section-nav__list li + li {
        border-top: 1px solid #222;
    }

    .section-nav__list a {
        display: flex;
        width: 100%;
        min-height: 50px;
        padding: 13px 0;
        font-size: 16px;
    }

    .header-quote {
        grid-column: 3;
        grid-row: 1;
    }
}

@media (max-width: 600px) {
    :root {
        --header-height: 82px;
    }

    .site-header__inner {
        gap: 12px;
        padding: 10px 20px;
    }

    .site-brand {
        width: 170px;
        height: 60px;
    }

    .header-quote {
        min-height: 44px;
        padding: 12px 14px;
        font-size: 12px;
    }

    .header-quote__desktop {
        display: none;
    }

    .header-quote__mobile {
        display: inline;
    }

    .site-header.has-menu-toggle .header-menu-toggle {
        font-size: 13px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }
}

@media (max-width: 380px) {
    .site-header__inner {
        gap: 8px;
        padding-inline: 14px;
    }

    .site-brand {
        width: 135px;
        height: 52px;
    }

    .header-quote {
        padding-inline: 10px;
    }
}

/* WordPress admin toolbar */

body.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

@media (max-width: 600px) {
    body.admin-bar .site-header {
        top: 0;
    }
}

/* =========================================
   SETUP PAGE
   ========================================= */

.brooklands-setup {
    display: grid;
    min-height: calc(100svh - var(--header-height));
    padding: clamp(56px, 9vw, 128px) var(--page-gutter);
    align-content: center;
}

.brooklands-setup__inner {
    width: 100%;
    max-width: 1320px;
    min-width: 0;
    margin-inline: auto;
}

.brooklands-setup__label {
    margin: 0 0 20px;
    color: var(--colour-muted);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brooklands-setup h1 {
    max-width: 950px;
    margin: 0 0 28px;
    font-size: clamp(44px, 7.5vw, 104px);
    font-weight: 800;
    line-height: 1.03;
    letter-spacing: -0.055em;
    overflow-wrap: break-word;
}

.brooklands-setup__description {
    max-width: 550px;
    margin: 0;
    color: var(--colour-muted);
    font-size: clamp(17px, 2vw, 20px);
    line-height: 1.7;
}

/* =========================================
   FOOTER
   ========================================= */

.brooklands-footer {
    --footer-yellow: var(--colour-yellow);
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    background: #000;
    color: #fff;
    font-family: inherit;
}

.brooklands-footer__inner {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding-inline: clamp(24px, 4vw, 72px);
}

.brooklands-footer__grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.35fr)
        minmax(0, 0.65fr)
        minmax(0, 1fr);
    align-items: start;
    gap: clamp(40px, 5vw, 80px);
    padding-block: 60px 48px;
}

.brooklands-footer__grid > * {
    min-width: 0;
}

.brooklands-footer__brand {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 26px;
    text-decoration: none;
}

.brooklands-footer__logo {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
}

.brooklands-footer__about h2 {
    margin: 0 0 20px;
    color: #fff;
    font-size: clamp(27px, 2.5vw, 36px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.brooklands-footer__about p,
.brooklands-footer__quote p {
    margin: 0 0 16px;
    color: #bdbdbd;
    font-size: 15px;
    line-height: 1.8;
}

.brooklands-footer__about p {
    max-width: 480px;
}

.brooklands-footer__about p:last-child {
    margin-bottom: 0;
}

.brooklands-footer__nav h3,
.brooklands-footer__quote h3 {
    margin: 0 0 22px;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.025em;
}

.brooklands-footer__nav ul {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.brooklands-footer__nav li {
    min-width: 0;
    margin: 0;
    padding: 0;
}

.brooklands-footer__nav a {
    display: inline-block;
    padding-block: 9px;
    color: #bdbdbd;
    font-size: 15px;
    line-height: 1.5;
    text-decoration: none;
    transition: color 180ms ease;
}

.brooklands-footer__nav a:hover {
    color: var(--footer-yellow);
}

.brooklands-footer__quote p {
    max-width: 360px;
    margin-bottom: 26px;
}

.brooklands-footer a.brooklands-footer__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    max-width: 100%;
    padding: 16px 26px;
    border: 0;
    border-radius: 0;
    background: var(--footer-yellow);
    color: #111;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    transition: background-color 180ms ease;
}

.brooklands-footer a.brooklands-footer__button:hover {
    background: #fff;
}

.brooklands-footer a.brooklands-footer__email {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin-top: 22px;
    padding-block: 8px;
    color: #bdbdbd;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    text-decoration: none;
    transition: color 180ms ease;
}

.brooklands-footer a.brooklands-footer__email:hover {
    color: var(--footer-yellow);
}

.brooklands-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding-block: 22px;
    border-top: 1px solid #333;
}

.brooklands-footer__bottom p {
    margin: 0;
    color: #aaa;
    font-size: 13px;
    line-height: 1.6;
}

.brooklands-footer__bottom a {
    display: inline-block;
    padding-block: 8px;
    color: #aaa;
    font-size: 13px;
    line-height: 1.6;
    text-decoration: none;
}

.brooklands-footer__bottom a:hover {
    color: #fff;
}

.brooklands-footer a:focus-visible {
    outline: 2px solid var(--footer-yellow);
    outline-offset: 5px;
}

/* Footer tablet */

@media (max-width: 1000px) {
    .brooklands-footer__grid {
        grid-template-columns:
            minmax(0, 1.2fr)
            minmax(0, 0.7fr)
            minmax(0, 1fr);
        gap: 30px;
        padding-block: 48px 40px;
    }

    .brooklands-footer__logo {
        width: 185px;
    }

    .brooklands-footer__about h2 {
        font-size: 28px;
    }

    .brooklands-footer a.brooklands-footer__button {
        padding-inline: 18px;
    }
}

/* Footer mobile */

@media (max-width: 760px) {
    .brooklands-footer__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        padding-block: 40px 32px;
    }

    .brooklands-footer__brand {
        margin-bottom: 22px;
    }

    .brooklands-footer__logo {
        width: 210px;
    }

    .brooklands-footer__about h2 {
        font-size: 30px;
    }

    .brooklands-footer__about p,
    .brooklands-footer__quote p {
        max-width: none;
    }

    .brooklands-footer__nav,
    .brooklands-footer__quote {
        padding-top: 28px;
        border-top: 1px solid #333;
    }

    .brooklands-footer__nav h3,
    .brooklands-footer__quote h3 {
        margin-bottom: 16px;
    }

    .brooklands-footer__nav ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 20px;
    }

    .brooklands-footer__nav a {
        display: flex;
        align-items: center;
        min-height: 44px;
    }

    .brooklands-footer a.brooklands-footer__button {
        width: 100%;
        min-height: 56px;
    }

    .brooklands-footer__bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

/* =========================================
   INTERACTION PREFERENCES
   ========================================= */

@media (hover: hover) and (pointer: fine) {
    .button--yellow:hover {
        background: var(--colour-yellow-hover);
    }
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* =========================================
   CONSISTENT SECTION HEIGHTS AND SPACING
   ========================================= */

:root {
    --admin-bar-height: 0px;
    --section-spacing: clamp(32px, 4svh, 64px);
}

body.admin-bar {
    --admin-bar-height: 32px;
}

/* Match anchor positions to the sticky header. */

html {
    scroll-padding-top: var(--header-height);
}

html:has(body.admin-bar) {
    scroll-padding-top:
        calc(var(--header-height) + 32px);
}

/* Consistent spacing across the landing page sections. */

main #why-convert,
main #conversion-ideas,
main #how-it-works,
main #our-work,
main #reviews,
main #faqs,
main #quote {
    display: flex;
    flex-direction: column;
    justify-content: center;

    width: 100%;
    min-width: 0;

    min-height: calc(
        100svh - var(--header-height) - var(--admin-bar-height)
    );

    margin-block: 0;
    padding-block: var(--section-spacing);

    scroll-margin-top: 0;
}

/* Keep each section's existing inner layout and width. */

main #why-convert > *,
main #conversion-ideas > *,
main #how-it-works > *,
main #our-work > *,
main #reviews > *,
main #faqs > *,
main #quote > * {
    flex-shrink: 0;
    min-width: 0;
}

/* Tablet WordPress toolbar. */

@media (min-width: 601px) and (max-width: 782px) {
    body.admin-bar {
        --admin-bar-height: 46px;
    }

    html:has(body.admin-bar) {
        scroll-padding-top:
            calc(var(--header-height) + 46px);
    }
}

/* Mobile: retain readable spacing as content stacks. */

@media (max-width: 600px) {
    :root {
        --section-spacing: 40px;
    }

    body.admin-bar {
        --admin-bar-height: 0px;
    }

    html:has(body.admin-bar) {
        scroll-padding-top: var(--header-height);
    }
}

/* =========================================
   PAGE WIDTH CORRECTION
   ========================================= */

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
}

body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
}

@supports (overflow: clip) {
    body {
        overflow-x: clip !important;
    }
}

main,
main > section,
.site-header,
.brooklands-footer {
    min-width: 0;
    max-width: 100%;
}

main > section > div {
    min-width: 0;
}

/* =========================================
   QUOTE SECTION CORRECTION
   ========================================= */

main section#quote.quote {
    width: 100%;
    margin: 0;
    padding: 32px clamp(24px, 4vw, 72px);
    background: #fff;
}

main #quote .quote__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
    width: 100%;
    max-width: 1600px;
    min-width: 0;
    margin-inline: auto;
}

main #quote .quote__intro {
    min-width: 0;
    margin: 0;
    text-align: left;
}

main #quote .quote__panel {
    width: 100%;
    min-width: 0;
    margin: 0;
}

/* Desktop: one viewport beneath the header. */

@media (min-width: 1100px) {
    main section#quote.quote {
        display: flex;
        flex-direction: column;
        justify-content: center;

        height: calc(
            100svh -
            var(--header-height, 120px) -
            var(--admin-bar-height, 0px)
        );

        min-height: 0;
    }

    main #quote .quote__inner {
        height: 100%;
        min-height: 0;
    }

    main #quote .quote__intro,
    main #quote .quote__panel {
        max-height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
    }
}

/* Tablet and mobile: remove fixed heights and internal scrolling. */

@media (max-width: 1099px) {
    main section#quote.quote {
        display: block;
        height: auto;
        min-height: 0;
        padding: 40px 24px;
    }

    main #quote .quote__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        height: auto;
        max-width: 760px;
        gap: 24px;
    }

    main #quote .quote__intro,
    main #quote .quote__panel {
        height: auto;
        max-height: none;
        overflow: visible;
    }
}

/* Phone layout */

@media (max-width: 767px) {
    main section#quote.quote {
        padding: 36px 20px;
    }

    main #quote h2 {
        margin: 0 0 18px;
        font-size: clamp(30px, 8vw, 38px);
        line-height: 1.18;
        letter-spacing: -0.04em;
        overflow-wrap: break-word;
    }

    main #quote .quote__intro > p {
        max-width: none;
        margin: 0 0 14px;
        font-size: 15px;
        line-height: 1.65;
    }

    main #quote .quote__intro > .quote__note {
        margin: 16px 0 0;
        padding-top: 14px;
        font-size: 12px;
        line-height: 1.65;
    }

    main #quote .quote__panel {
        padding: 22px 16px;
        border-radius: 3px;
    }

    main #quote .quote__progress {
        margin-bottom: 18px;
    }

    main #quote .quote__progress-heading {
        gap: 10px;
        font-size: 12px;
    }

    main #quote .quote-form__step-title {
        margin-bottom: 18px;
        font-size: 23px;
        line-height: 1.3;
    }

    main #quote .quote-question {
        min-inline-size: 0;
        margin-bottom: 22px;
    }

    main #quote .quote-question legend {
        min-height: 0;
        margin-bottom: 10px;
        font-size: 15px;
        line-height: 1.5;
    }

    main #quote .quote-form.is-enhanced [data-quote-step] {
        display: block;
    }

    main #quote .quote-options,
    main #quote [data-step-name] .quote-options {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    main #quote .quote-option__body {
        min-height: 48px;
        padding: 12px;
    }

    main #quote .quote-option__title {
        font-size: 14px;
        line-height: 1.45;
    }

    main #quote .quote-form__fields {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    main #quote .quote-field input,
    main #quote .quote-field textarea {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        font-size: 16px;
    }

    main #quote .booking-times .quote-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    main #quote .quote-form__actions {
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 20px;
    }

    main #quote .quote-form__actions .button {
        min-width: 0;
        min-height: 48px;
        white-space: normal;
    }
}

/* Keep the logged-in WordPress toolbar within the screen. */

#wpadminbar {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    left: 0 !important;
    right: 0 !important;
    overflow-x: clip;
}

#wpadminbar #wp-toolbar {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

#wpadminbar .quicklinks > ul {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

/* Contain off-screen review slides within their section. */

main #reviews {
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
}

main #reviews .reviews__inner,
main #reviews .reviews__inner > * {
    min-width: 0;
}