/* The Gables Care Home — main stylesheet */
:root {
	--ink: #263022;
	--green-900: #2b3728;
	--green-700: #3a4836;
	--green-600: #485940;
	--sage: #738266;
	--sage-100: #e6eadf;
	--gold: #b28c55;
	--gold-text: #85652f;
	--paper: #f5f6f0;
	--white: #ffffff;
	--line: #d5dbcb;
	--serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
	--sans: "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;
	--wrap: 1180px;
	--gap: clamp(1.5rem, 4vw, 3.5rem);
	--section: clamp(3.5rem, 8vw, 6.5rem);
	--radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
	margin: 0;
	font-family: var(--sans);
	font-size: 1.125rem;
	line-height: 1.65;
	color: var(--ink);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-600); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--green-900); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--green-700); line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.6rem, 5.6vw, 4.25rem); }
h2 { font-size: clamp(2.1rem, 3.8vw, 3rem); }
h3 { font-size: 1.6rem; line-height: 1.2; }
p { margin: 0 0 1em; }
.lead { font-size: 1.25rem; line-height: 1.55; color: var(--green-700); max-width: 38em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--green-700); color: var(--white); padding: 0.75rem 1rem; z-index: 100; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; color: var(--white); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.1rem; padding: 0.7rem 1.4rem; border-radius: 999px; font: 700 1rem/1.2 var(--sans); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn--primary { background: var(--green-600); color: var(--white); }
.btn--primary:hover { background: var(--green-900); color: var(--white); }
.btn--ghost { border-color: var(--green-600); color: var(--green-700); background: transparent; }
.btn--ghost:hover { background: var(--green-600); color: var(--white); }
.text-link { font-weight: 700; color: var(--green-700); text-decoration-color: var(--gold); text-decoration-thickness: 2px; }

/* Top bar */
.topbar { background: var(--green-700); color: #eef1e8; font-size: 0.95rem; }
.topbar__inner { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; flex-wrap: wrap; }
.topbar a { color: var(--white); font-weight: 700; text-decoration: none; margin-left: 1.25rem; }
.topbar a:hover { text-decoration: underline; color: var(--white); }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 0.6rem 0; }
.site-logo img, .custom-logo { width: auto; height: 84px; }
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav .menu { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-nav .menu a { color: var(--ink); font-weight: 700; text-decoration: none; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.site-nav .menu a:hover, .site-nav .current-menu-item > a { border-bottom-color: var(--gold); color: var(--green-700); }
.nav-toggle { display: none; }

@media (max-width: 1020px) {
	.site-logo img, .custom-logo { height: 64px; }
	.nav-toggle { display: inline-flex; align-items: center; gap: 0.6rem; background: none; border: 2px solid var(--line); border-radius: 999px; padding: 0.55rem 1rem; font: 700 1rem var(--sans); color: var(--green-700); cursor: pointer; }
	.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
	.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
	.nav-toggle__bars::before { top: -6px; } .nav-toggle__bars::after { top: 6px; }
	.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 1rem 1.25rem 1.5rem; gap: 1rem; box-shadow: 0 12px 24px -16px rgba(43,55,40,.35); }
	.site-nav.is-open { display: flex; }
	.site-nav .menu { flex-direction: column; gap: 0; }
	.site-nav .menu a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
}

/* Gable frame — the signature shape, taken from the logo's rooflines */
.gable-frame { position: relative; margin: 0; isolation: isolate; }
.gable-frame::before {
	content: ""; position: absolute; inset: 0; transform: translate(14px, 14px);
	background: var(--gold); z-index: -1;
	clip-path: polygon(50% 0, 100% 24%, 100% 100%, 0 100%, 0 24%);
}
.gable-frame > img, .gable-placeholder {
	width: 100%; aspect-ratio: 6 / 7; object-fit: cover;
	clip-path: polygon(50% 0, 100% 24%, 100% 100%, 0 100%, 0 24%);
}
.gable-placeholder { display: grid; place-items: center; align-content: center; gap: 1rem; background: linear-gradient(160deg, var(--sage) 0%, var(--green-700) 100%); padding: 18% 2rem 2rem; text-align: center; }
.gable-placeholder img { width: 38%; max-width: 160px; border-radius: 22%; opacity: 0.95; }
.gable-placeholder__note { color: var(--white); font-size: 0.9rem; max-width: 18em; }

.roofline { width: 120px; height: 20px; color: var(--gold); display: block; margin-bottom: 1rem; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--white) 0%, var(--paper) 100%); padding: clamp(2.5rem, 6vw, 5rem) 0 var(--section); }
.hero__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--gap); align-items: center; }
.hero__place { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--gold-text); margin-bottom: 0.75rem; }
.hero h1 { max-width: 13em; }
.hero__lead { font-size: 1.25rem; max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 2.5rem; }
.hero .gable-frame { max-width: 460px; justify-self: end; width: 100%; margin-right: 14px; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.facts li { border-top: 2px solid var(--gold); padding-top: 0.75rem; font-size: 0.98rem; line-height: 1.45; }
.facts strong { display: block; font-family: var(--serif); font-size: 1.55rem; color: var(--green-700); line-height: 1.15; }

/* Sections */
.section { padding: var(--section) 0; }
.section--tint { background: var(--paper); }
.section--green { background: var(--green-700); color: #eef1e8; }
.section--green h2 { color: var(--white); }
.section--green .lead { color: #eef1e8; }
.section__head { max-width: 46rem; margin-bottom: 2.5rem; }

/* CQC */
.section--cqc { background: var(--white); border-bottom: 1px solid var(--line); padding: clamp(3rem, 6vw, 4.5rem) 0; }
.cqc-grid { display: grid; grid-template-columns: 1.2fr auto 1fr; gap: var(--gap); align-items: start; }
.cqc-grid h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.cqc-widget { min-width: 200px; }
.tell-cqc { background: var(--paper); border-left: 4px solid var(--gold); padding: 1.5rem 1.6rem; border-radius: 0 var(--radius) var(--radius) 0; font-size: 1rem; }
.tell-cqc h3 { font-size: 1.45rem; }

/* Split: heading left, list right */
.split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: var(--gap); align-items: start; }
.split__head { position: sticky; top: 8rem; }
.support-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 2.5rem; }
.support-list li { border-top: 1px solid var(--line); padding-top: 1.25rem; }
.support-list h3 { font-size: 1.45rem; margin-bottom: 0.35rem; }
.support-list p { margin: 0; font-size: 1.02rem; }

/* Feature: image beside text */
.feature { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--gap); align-items: center; }
.feature .gable-frame { max-width: 440px; width: 100%; margin-right: 14px; }
.feature--reverse { grid-template-columns: 1.15fr 0.85fr; }
.feature--reverse .gable-frame { justify-self: end; }
.section--green .gable-frame::before { background: var(--gold); }

/* Steps — a real sequence */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 4.5rem; }
.steps li::before {
	content: counter(step); position: absolute; top: 0; left: 0; width: 3.4rem; height: 3.4rem;
	display: grid; place-items: center; padding-top: 0.6rem;
	font: 600 1.6rem/1 var(--serif); color: var(--white); background: var(--green-600);
	clip-path: polygon(50% 0, 100% 34%, 100% 100%, 0 100%, 0 34%);
}
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 2.2rem; left: 4.2rem; right: -1.2rem; border-top: 2px dotted var(--gold); }
.steps h3 { font-size: 1.45rem; margin-bottom: 0.35rem; }
.steps p { font-size: 1.02rem; margin: 0; }

/* Standards list */
.standards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; margin: 2rem 0 0; }
.standards div { border-top: 1px solid rgba(255,255,255,.22); padding-top: 1rem; }
.standards dt { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: #e3cc9f; line-height: 1.2; margin-bottom: 0.3rem; }
.standards dd { margin: 0; font-size: 1rem; }

/* Referrals */
.referrals { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: var(--gap); align-items: center; }
.referrals__contact { border: 1px solid var(--line); border-top: 4px solid var(--green-600); padding: 1.75rem; border-radius: 0 0 var(--radius) var(--radius); }
.referrals__phone { font-family: var(--serif); font-size: 2.3rem; font-weight: 600; line-height: 1; margin-bottom: 0.6rem; }
.referrals__phone a { color: var(--green-700); text-decoration: none; }
.referrals__contact p:last-child { margin: 0; }

/* Enquiry */
.enquiry { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: var(--gap); align-items: start; }
.enquiry address { font-style: normal; margin-top: 1.5rem; padding-left: 1rem; border-left: 3px solid var(--gold); }
.enquiry__form { background: var(--white); padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: var(--radius); border: 1px solid var(--line); }

/* Forms */
.gables-form__intro { font-size: 0.98rem; color: #4a5446; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.field { margin: 0 0 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.35rem; font-size: 1rem; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea {
	width: 100%; font: 1.05rem/1.4 var(--sans); color: var(--ink); background: var(--white);
	border: 2px solid #b9c2ad; border-radius: var(--radius); padding: 0.7rem 0.8rem; min-height: 3rem;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green-600); outline: 3px solid rgba(178,140,85,.45); outline-offset: 0; }
.field__hint { display: block; font-size: 0.92rem; color: #4a5446; margin-top: 0.35rem; }
.field--check { display: flex; gap: 0.7rem; align-items: flex-start; }
.field--check input { width: 1.3rem; height: 1.3rem; margin-top: 0.2rem; accent-color: var(--green-600); flex: none; }
.field--check label { font-weight: 400; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-notice { padding: 1rem 1.2rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-weight: 700; }
.form-notice--ok { background: var(--sage-100); border-left: 4px solid var(--green-600); }
.form-notice--error { background: #fbeeea; border-left: 4px solid #a3402b; color: #6e2617; }

/* Inner pages */
.page-hero { background: var(--paper); padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: 0.3em; }
.page-content { padding: clamp(2.5rem, 5vw, 4rem) 0 var(--section); }
.entry { max-width: 46rem; }
.entry > * + h2 { margin-top: 2.2em; }
.entry h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); }
.entry ul { padding-left: 1.2rem; }
.entry li { margin-bottom: 0.4rem; }
.entry li::marker { color: var(--gold); }
.entry .gables-form { margin-top: 1.5rem; background: var(--paper); padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--radius); }
.post-summary { border-bottom: 1px solid var(--line); padding-bottom: 1.5rem; margin-bottom: 1.5rem; }
.post-date { color: #5b6457; font-size: 0.95rem; }

/* Footer */
.site-footer { background: var(--green-900); color: #dfe4d7; padding: 4rem 0 0; font-size: 1rem; }
.site-footer a { color: var(--white); }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--gap); padding-bottom: 3rem; }
.site-footer__brand img { border-radius: 16px; margin-bottom: 1rem; }
.site-footer__name { font-family: var(--serif); font-size: 1.8rem; font-weight: 600; color: var(--white); margin-bottom: 0.4rem; line-height: 1.1; }
.site-footer__heading { font-family: var(--sans); font-size: 1rem; font-weight: 700; color: #e3cc9f; margin-bottom: 0.75rem; }
.site-footer address { font-style: normal; }
.site-footer__legal { border-top: 1px solid rgba(255,255,255,.15); padding: 1.5rem 0 2rem; font-size: 0.9rem; color: #c3cbb9; }
.legal-menu { list-style: none; margin: 0 0 0.75rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

.mobile-bar { display: none; }

/* Responsive */
@media (max-width: 1020px) {
	.cqc-grid { grid-template-columns: 1fr 1fr; }
	.tell-cqc { grid-column: 1 / -1; }
	.steps { grid-template-columns: 1fr 1fr; }
	.steps li:nth-child(2)::after { display: none; }
}
@media (max-width: 860px) {
	.hero__grid, .split, .feature, .feature--reverse, .referrals, .enquiry, .site-footer__grid { grid-template-columns: 1fr; }
	.hero .gable-frame { justify-self: start; max-width: 300px; }
	.feature .gable-frame, .feature--reverse .gable-frame { justify-self: start; max-width: 360px; }
		.split__head { position: static; }
	.facts { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 760px) {
	.topbar { display: none; }
	.admin-bar .site-header { top: 0; }
	.support-list, .standards, .field-row, .cqc-grid, .steps { grid-template-columns: 1fr; }
	.steps li::after { display: none; }
	body { padding-bottom: 4.25rem; }
	.mobile-bar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: var(--green-700); box-shadow: 0 -6px 18px rgba(0,0,0,.18); }
	.mobile-bar a { color: var(--white); text-align: center; font-weight: 700; padding: 1.05rem 0.5rem; text-decoration: none; }
	.mobile-bar a + a { background: var(--gold-text); }
}
@media print { .topbar, .site-header, .mobile-bar, .gables-form { display: none; } }
