/* DW Clayfield - site styles */

:root {
    --graphite: #22272b;
    --graphite-2: #2e353a;
    --yellow: #f2b705;
    --yellow-deep: #d9a300;
    --concrete: #e7e9e6;
    --white: #ffffff;
    --flint: #56616b;
    --clay: #8c5b3e;
    --ink: #22272b;
    --muted: #56616b;
    --line: #cfd3cf;

    --wrap: 1180px;
    --gutter: clamp(16px, 4vw, 40px);
    --radius: 3px;

    --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--concrete);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a { color: var(--graphite); text-decoration-color: var(--yellow-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: #000; text-decoration-color: var(--graphite); }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

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

.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--yellow); color: var(--graphite); padding: 10px 16px; font-weight: 700; }
.skip:focus { left: 16px; }

/* ---------- Headings: condensed, heavy, signage-like ---------- */

h1, h2, h3, .display {
    font-family: var(--font);
    font-stretch: 72%;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.005em;
    color: var(--graphite);
    margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); margin-top: 1.4em; }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.1em; }

/* ---------- Header ---------- */

.site-header { background: var(--white); color: var(--ink); position: relative; z-index: 20; border-top: 6px solid var(--yellow); }

.header-bar {
    display: flex; align-items: center; gap: 24px;
    padding-top: 18px; padding-bottom: 18px;
}

.logo { display: block; flex: 0 1 300px; line-height: 0; }
.logo img { width: 100%; max-width: 300px; }

.header-contact { margin-left: auto; display: flex; align-items: center; gap: 22px; }

.call {
    display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.2;
    border-bottom: 3px solid var(--yellow); padding-bottom: 2px;
}
.call span { font-size: 0.85rem; color: var(--muted); }
.call strong { font-stretch: 80%; font-size: 1.55rem; font-weight: 800; color: var(--graphite); letter-spacing: 0.01em; }
.call:hover { border-bottom-color: var(--graphite); }

.call-mobile { display: none; }

.nhbc { line-height: 0; }
.nhbc img { width: 92px; }

.menu-toggle {
    display: none; margin-left: auto;
    background: none; border: 2px solid var(--graphite); color: var(--graphite);
    font: 700 1rem var(--font); padding: 8px 14px; border-radius: var(--radius); cursor: pointer;
}
.menu-toggle:hover { background: var(--yellow); }

.main-nav { background: var(--graphite); }
.main-nav ul { list-style: none; margin: 0 auto; padding-top: 0; padding-bottom: 0; display: flex; flex-wrap: wrap; }
.main-nav a {
    display: block; padding: 14px 16px 12px; color: #dfe4e7; text-decoration: none; font-weight: 600;
    border-bottom: 4px solid transparent;
}
.main-nav li:first-child a { padding-left: 0; }
.main-nav a:hover { color: var(--white); border-bottom-color: #59636a; }
.main-nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--yellow); }
.main-nav .nav-services { display: none; }

/* ---------- Strata band: the ground they work in ---------- */

.strata {
    height: 34px;
    background: url("images/strata.svg") center / 100% 100% no-repeat;
}
.strata-hero { height: 46px; margin-top: -1px; }

/* ---------- Home hero ---------- */

.hero { background: var(--graphite); color: #dfe4e7; }
.hero-grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
    gap: clamp(24px, 4vw, 56px); align-items: start;
    padding-top: clamp(28px, 5vw, 64px); padding-bottom: clamp(28px, 5vw, 64px);
}
.hero h1 { color: var(--white); font-size: clamp(2.3rem, 1.3rem + 3.4vw, 4.2rem); max-width: 17ch; }
.hero p { max-width: 54ch; font-size: 1.1rem; }
.hero-copy { padding-top: 6px; }
.hero-photo { margin: 0; line-height: 0; }
.hero-photo img { display: block; width: 100%; border-radius: var(--radius); }

.btn {
    display: inline-block; background: var(--yellow); color: var(--graphite);
    font-weight: 800; text-decoration: none; padding: 13px 22px; border-radius: var(--radius);
    border: 0; font-size: 1.05rem; cursor: pointer;
}
.btn:hover { background: var(--white); color: var(--graphite); }
.btn-quiet { background: transparent; color: var(--white); box-shadow: inset 0 0 0 2px #59636a; }
.btn-quiet:hover { background: transparent; color: var(--yellow); box-shadow: inset 0 0 0 2px var(--yellow); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Home: the two specialisms below the hero */
.specialisms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 32px); margin: clamp(28px, 4vw, 48px) auto 0; }
.specialism { background: var(--white); border-top: 6px solid var(--yellow); display: grid; grid-template-rows: auto 1fr; }
.specialism img { width: 100%; aspect-ratio: 649 / 300; object-fit: cover; display: block; }
.specialism div { padding: 22px 24px 8px; }
.specialism h2 { margin-top: 0; font-size: 1.8rem; }

/* ---------- Page layout ---------- */


.layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(24px, 4vw, 48px);
    padding-top: clamp(28px, 4vw, 48px); padding-bottom: clamp(40px, 6vw, 80px);
    align-items: start;
}

.content {
    background: var(--white);
    padding: clamp(22px, 4vw, 48px);
    min-width: 0;
}
.content > :first-child { margin-top: 0; }
.content p, .content li { max-width: 72ch; }
.content img { border-radius: var(--radius); }
.content iframe { max-width: 100%; }

.crumb { font-size: 0.95rem; color: var(--muted); margin: 0 0 10px; }
.crumb a { color: var(--muted); }

.notification {
    border-left: 6px solid var(--yellow); background: #f6f7f5;
    padding: 12px 16px; margin: 0 0 1.2em; font-size: 0.95rem; color: var(--muted);
}

.img-float-right, .img-float-left { margin: 4px 0 18px; max-width: 45%; }
.img-float-right { float: right; margin-left: 26px; }
.img-float-left { float: left; margin-right: 26px; }
.img-float-right img, .img-float-left img { display: block; }
.img-float-right span, .img-float-left span { display: block; font-size: 0.9rem; color: var(--muted); padding-top: 6px; }
.content::after { content: ""; display: table; clear: both; }

/* Image sliders inside page content (markup comes from the CMS) */
.flexslider { position: relative; clear: both; margin: 0 0 1.6em; background: var(--graphite); border-radius: var(--radius); overflow: hidden; }
.flexslider .slides {
    list-style: none; margin: 0; padding: 0;
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    scrollbar-width: none;
}
.flexslider .slides::-webkit-scrollbar { display: none; }
.flexslider .slides li { flex: 0 0 100%; scroll-snap-align: start; position: relative; max-width: none; }
.flexslider .slides img { display: block; width: 100%; aspect-ratio: 649 / 352; object-fit: cover; border-radius: 0; }
.flex-caption {
    margin: 0; padding: 10px 16px; background: var(--graphite); color: #dfe4e7; font-size: 0.95rem;
}
.slider-btn {
    position: absolute; top: calc(50% - 40px); width: 44px; height: 44px; border-radius: 50%;
    border: 0; background: rgba(34, 39, 43, 0.78); color: var(--white); font-size: 1.4rem; line-height: 1;
    cursor: pointer; display: grid; place-items: center;
}
.slider-btn:hover { background: var(--yellow); color: var(--graphite); }
.slider-prev { left: 10px; }
.slider-next { right: 10px; }
.slider-count { position: absolute; right: 12px; bottom: 9px; font-size: 0.85rem; color: #b8c0c6; }

/* ---------- Services sidebar ---------- */

.services { background: var(--graphite); color: #dfe4e7; border-radius: var(--radius); }
.services summary {
    list-style: none; cursor: default; padding: 18px 20px 12px;
    font-stretch: 72%; font-weight: 800; font-size: 1.5rem; color: var(--white);
}
.services summary::-webkit-details-marker { display: none; }
.services ul { list-style: none; margin: 0; padding: 0 0 12px; }
.services a {
    display: block; padding: 7px 20px; color: #dfe4e7; text-decoration: none; font-size: 0.98rem; line-height: 1.35;
    border-left: 4px solid transparent;
}
.services a:hover { color: var(--white); background: var(--graphite-2); }
.services a[aria-current="page"] { border-left-color: var(--yellow); color: var(--white); background: var(--graphite-2); }
.services .group > span { display: block; padding: 10px 20px 4px; font-weight: 700; color: var(--yellow); font-size: 0.98rem; }
.services .group ul { padding: 0 0 6px; }
.services .group a { padding-left: 34px; }
.nhbc-badge {
    margin-top: 16px; background: var(--white); border-top: 6px solid var(--yellow); border-radius: var(--radius);
    padding: 16px 18px; display: flex; gap: 14px; align-items: center; color: var(--ink); font-size: 0.92rem; line-height: 1.4;
}
.nhbc-badge img { width: 90px; flex: none; }

/* ---------- Items for sale ---------- */

.sale-list { display: grid; gap: 18px; }
.sale-item { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.sale-item img { display: block; }
.sale-item h2 { margin: 0 0 6px; font-size: 1.6rem; }
.sale-item h2 a { text-decoration: none; }
.price { font-weight: 800; font-stretch: 80%; font-size: 1.3rem; }
.pagenav { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pagenav a { display: block; min-width: 38px; text-align: center; padding: 6px 10px; border: 2px solid var(--line); text-decoration: none; border-radius: var(--radius); }
.pagenav a.on { background: var(--graphite); border-color: var(--graphite); color: var(--white); }
.go-back { display: inline-block; margin-bottom: 14px; }
.sale-price { background: #f6f7f5; border-left: 6px solid var(--yellow); padding: 14px 18px; margin: 0 0 20px; }
.thumbs { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.thumbs img { display: block; width: 100%; }

.lightbox-dialog { border: 0; padding: 0; background: transparent; max-width: min(92vw, 900px); }
.lightbox-dialog::backdrop { background: rgba(20, 23, 26, 0.85); }
.lightbox-dialog img { display: block; max-height: 85vh; width: auto; margin: 0 auto; }
.lightbox-dialog button { position: absolute; top: 8px; right: 8px; }

.sitemap { columns: 2 220px; padding-left: 1.2em; }
.sitemap li { break-inside: avoid; padding: 2px 0; }

/* ---------- Footer ---------- */

/* Original ground-section artwork: centred scene over a repeating soil strip, black below */
.site-footer {
    position: relative; isolation: isolate;
    background:
        url("images/footer-ground.png") center top no-repeat,
        linear-gradient(to bottom, transparent 150px, #000 150px);
    color: #b8c0c6; font-size: 0.95rem;
    padding-top: 280px;
}
/* Soil strip repeats only beside the 960px scene, never behind it */
.site-footer::before, .site-footer::after {
    content: ""; position: absolute; top: 0; z-index: -1;
    width: max(0px, calc(50% - 479px)); height: 325px;
    background: url("images/footer-ground-repeat.png") repeat-x;
}
.site-footer::before { left: 0; background-position: right top; }
.site-footer::after { right: 0; background-position: left top; }
.site-footer .wrap { max-width: calc(960px + 2 * var(--gutter)); }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr 1.4fr; gap: 32px; padding-bottom: 32px; }
.site-footer a { color: #dfe4e7; text-decoration-color: #59636a; }
.site-footer a:hover { color: var(--yellow); }
.site-footer .footer-name { font-stretch: 72%; font-weight: 800; font-size: 1.6rem; color: var(--white); line-height: 1.1; margin-bottom: 8px; }
.site-footer .footer-tel { font-stretch: 80%; font-weight: 800; color: var(--yellow); font-size: 1.4rem; text-decoration: none; }
.areas strong { color: #b8c0c6; }
.areas a { color: #8e979d; }
.areas { color: #8e979d; font-size: 0.88rem; line-height: 1.7; }
.footer-legal { border-top: 1px solid #2a2f33; padding-top: 16px; padding-bottom: 24px; font-size: 0.88rem; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
    .layout { grid-template-columns: minmax(0, 1fr); }
    .hero-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-photo { max-width: 640px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid .areas { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    body { font-size: 1rem; }
    .header-bar { gap: 14px; padding-top: 12px; padding-bottom: 12px; }
    .logo { flex-basis: 220px; }
    .header-contact { display: none; }
    .menu-toggle { display: block; }
    .call-mobile {
        display: block; background: var(--yellow); color: var(--graphite); text-align: center;
        font-weight: 800; text-decoration: none; padding: 10px 16px;
    }
    .main-nav { display: none; }
    .main-nav.open { display: block; }
    .main-nav .nav-services { display: block; }
    .main-nav .nav-services a { color: var(--yellow); }
    .main-nav ul { flex-direction: column; padding-bottom: 8px; }
    .main-nav li:first-child a, .main-nav a { padding: 12px 0; border-bottom: 1px solid #394147; border-left: 0; }
    .main-nav a[aria-current="page"] { color: var(--yellow); border-bottom-color: #394147; }

    .hero .actions .btn:first-child { display: none; }
    .specialisms { grid-template-columns: minmax(0, 1fr); }
    .content { padding: 22px 18px; margin: 0 calc(var(--gutter) * -1); border-radius: 0; }
    .layout { padding-top: 0; }

    .img-float-right, .img-float-left { float: none; max-width: 100%; margin: 0 0 18px; }

    .services summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
    .services summary::after { content: "+"; font-size: 1.6rem; color: var(--yellow); }
    .services[open] summary::after { content: "\2013"; }

    .sale-item { grid-template-columns: minmax(0, 1fr); }
    .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .strata { height: 22px; }
    .strata-hero { height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    html, .flexslider .slides { scroll-behavior: auto; }
}

@media print {
    .site-header nav, .services, .strata, .menu-toggle { display: none; }
    body { background: #fff; }
}
