/* ==========================================================================
   Kody Homes theme styles
   Colors come from theme.json presets, so changing the palette in
   Appearance › Editor › Styles updates the whole site.
   ========================================================================== */

:root {
	--kh-ink: var(--wp--preset--color--ink, #0D1F2A);
	--kh-brand: var(--wp--preset--color--brand, #03536F);
	--kh-steel: var(--wp--preset--color--steel, #6890A6);
	--kh-accent: var(--wp--preset--color--accent, #F4B740);
	--kh-paper: var(--wp--preset--color--paper, #FBFAF7);
	--kh-mist: var(--wp--preset--color--mist, #EEF4F7);
	--kh-line: var(--wp--preset--color--line, #E2E8EC);
	--kh-muted: var(--wp--preset--color--muted, #4A5A64);
	--kh-on-brand: #D3E3EC;
	--kh-on-dark: #C2D0D9;
	--kh-display: var(--wp--preset--font-family--display, 'Bricolage Grotesque', sans-serif);
	--kh-body: var(--wp--preset--font-family--body, 'Figtree', sans-serif);
}

body { -webkit-font-smoothing: antialiased; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.kh-wrap { box-sizing: border-box; max-width: 1200px; margin-inline: auto !important; padding-inline: 24px; }
.kh-wrap--narrow { max-width: 1000px; }
.kh-wrap--faq { max-width: 860px; }
:where(.kh-section, .kh-hero, .kh-footer, .kh-header) p { margin: 0; }
:focus-visible { outline: 3px solid var(--kh-accent); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.wp-block-button.is-style-dark .wp-block-button__link { background: var(--kh-ink); color: #fff; }
.wp-block-button.is-style-dark .wp-block-button__link:hover { background: var(--kh-brand); color: #fff; }
.wp-block-button.is-style-outline-dark .wp-block-button__link { background: transparent; color: var(--kh-ink); border: 2px solid var(--kh-ink); }
.wp-block-button.is-style-outline-dark .wp-block-button__link:hover { background: var(--kh-ink); color: #fff; }

/* ---------- Header ---------- */
.kh-header { background: #fff; border-bottom: 1px solid var(--kh-line); }
.kh-header__inner { box-sizing: border-box; max-width: 1200px; margin-inline: auto; padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.kh-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.kh-brand img { width: 40px; height: auto; display: block; }
.kh-brand__text { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.kh-brand__name { font-family: var(--kh-display); font-weight: 800; font-size: 21px; letter-spacing: 0.02em; text-transform: uppercase; color: var(--kh-brand); }
.kh-brand__tag { font-size: 10.5px; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase; color: #4F7A92; }
.kh-nav { font-weight: 600; font-size: 15px; }
.kh-nav .wp-block-navigation__container { gap: 4px 24px; }
.kh-nav .wp-block-navigation-item__content { color: #34454F; padding-block: 10px; text-decoration: none; }
.kh-nav .wp-block-navigation-item__content:hover { color: var(--kh-brand); }
.kh-header .wp-block-button__link { border-radius: 999px; font-size: 15px; font-weight: 700; padding: 10px 18px; min-height: 44px; }

/* ---------- Shared section bits ---------- */
.kh-section { padding-block: 96px; }
.kh-section--white { background: #fff; border-block: 1px solid var(--kh-line); }
.kh-section--tint { background: #EDF2F5; }
.kh-section--dark { background: var(--kh-ink); color: #fff; }
.kh-stack { display: flex; flex-direction: column; gap: 40px; }
.kh-head { display: flex; flex-direction: column; gap: 12px; max-width: 700px; }
.kh-head--split { max-width: none; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.kh-head--split > .wp-block-group { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.kh-head--center { align-items: center; text-align: center; margin-inline: auto; }
.kh-eyebrow { font-weight: 700; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--kh-brand); }
.kh-section--dark .kh-eyebrow { color: var(--kh-accent); }
.kh-h2 { margin: 0; font-size: clamp(32px, 4vw, 46px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; }
.kh-lead { color: var(--kh-muted); font-size: 17px; line-height: 1.6; max-width: 600px; }
.kh-section--dark .kh-lead { color: var(--kh-on-dark); font-size: 18px; }
.kh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kh-grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.kh-split { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.kh-split > :first-child { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.kh-split > :last-child { flex: 1.4 1 520px; min-width: 0; }

/* Cards */
.kh-card { background: #fff; border: 1px solid var(--kh-line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.kh-card h3 { margin: 0; font-size: 19px; letter-spacing: -0.01em; }
.kh-card p { color: var(--kh-muted); font-size: 15px; line-height: 1.55; }
.kh-card--brand { background: var(--kh-brand); border-color: var(--kh-brand); color: #fff; }
.kh-card--brand p { color: var(--kh-on-brand); }
.kh-card--brand a { color: #fff; }
.kh-num { width: 40px; height: 40px; border-radius: 10px; background: #E3EDF2; color: var(--kh-brand); display: flex; align-items: center; justify-content: center; font-family: var(--kh-display); font-weight: 800; }
.kh-card--brand .kh-num { background: var(--kh-accent); color: var(--kh-ink); }
.kh-card .kh-more { margin-top: auto; padding-top: 8px; font-weight: 700; }
.kh-card .kh-more a { text-decoration: none; }
.kh-card h3 a { color: inherit; text-decoration: none; }

/* ---------- Hero ---------- */
.kh-hero { position: relative; overflow: hidden; background: var(--kh-brand); color: #fff; }
.kh-hero::after { content: ""; position: absolute; right: -60px; bottom: -40px; width: 560px; height: 420px; background: url(../images/hero-roofs.svg) no-repeat center / contain; opacity: 0.09; pointer-events: none; }
.kh-hero__grid { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-block: 72px 88px; }
.kh-hero__copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.kh-hero__form { flex: 1 1 380px; max-width: 460px; min-width: 0; }
.kh-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,0.12); font-size: 14px; font-weight: 600; }
.kh-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--kh-accent); flex: none; }
.kh-h1 { margin: 0; color: inherit; font-size: clamp(40px, 5.6vw, 66px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; }
.kh-hero .kh-lead { color: var(--kh-on-brand); font-size: 20px; line-height: 1.55; max-width: 580px; }
.kh-hero a { color: #fff; font-weight: 700; }
.kh-hero .kh-note { color: var(--kh-on-brand); font-size: 16px; }
.kh-breadcrumb { padding-top: 28px; font-size: 14px; color: var(--kh-on-brand); position: relative; z-index: 1; }
.kh-hero .kh-breadcrumb a { color: var(--kh-on-brand); font-weight: 400; }
.kh-breadcrumb + .kh-hero__grid { padding-top: 40px; }

.kh-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; font-weight: 600; font-size: 16px; }
.kh-checks li { display: flex; align-items: center; gap: 8px; }
.kh-checks li::before {
	content: ""; width: 20px; height: 20px; flex: none; background: var(--kh-accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Offer form ---------- */
.kh-offer { box-sizing: border-box; background: #fff; color: var(--kh-ink); border-radius: 20px; padding: 30px; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.35); display: flex; flex-direction: column; gap: 16px; font-family: var(--kh-body); }
.kh-offer p { margin: 0; }
.kh-offer a { color: var(--kh-brand); font-weight: 600; }
.kh-offer__head { display: flex; flex-direction: column; gap: 6px; }
.kh-offer__step { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--kh-brand); }
.kh-offer__title { margin: 0; font-size: 26px; letter-spacing: -0.02em; font-weight: 700; color: var(--kh-ink); }
.kh-offer__sub { color: var(--kh-muted); font-size: 15px; }
.kh-field { display: flex; flex-direction: column; gap: 6px; }
.kh-field label { font-weight: 600; font-size: 14px; }
.kh-field input { box-sizing: border-box; width: 100%; height: 52px; padding: 0 14px; border: 1.5px solid #C9D3DA; border-radius: 10px; background: var(--kh-paper); color: var(--kh-ink); font: inherit; font-size: 17px; }
.kh-field input:focus { outline: 3px solid rgba(3,83,111,0.3); outline-offset: 0; border-color: var(--kh-brand); }
.kh-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kh-consent { display: flex; gap: 10px; align-items: flex-start; }
.kh-consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--kh-brand); }
.kh-consent label { font-size: 12.5px; line-height: 1.45; color: var(--kh-muted); }
.kh-submit { width: 100%; height: 54px; border: 0; border-radius: 12px; background: var(--kh-accent); color: var(--kh-ink); font: inherit; font-weight: 800; font-size: 17px; cursor: pointer; }
.kh-submit:hover { background: #E9A82B; }
.kh-back { align-self: center; min-height: 44px; border: 0; background: none; color: var(--kh-brand); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.kh-step2 { display: flex; flex-direction: column; gap: 16px; }
.kh-next, .kh-back { display: none; }
.kh-offer.is-js .kh-next { display: block; }
.kh-offer.is-js .kh-back { display: block; }
.kh-offer.is-js .kh-step2 { display: none; }
.kh-offer.is-js.on-step-2 .kh-step2 { display: flex; }
.kh-offer.is-js.on-step-2 .kh-next { display: none; }
.kh-privacy { text-align: center; font-size: 13px; color: var(--kh-muted); }
.kh-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.kh-success { padding: 20px; border-radius: 12px; background: #E3EDF2; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.5; }
.kh-success strong { font-size: 18px; color: var(--kh-brand); }
.kh-error { padding: 12px 14px; border-radius: 10px; background: #FDECEA; color: #8A1C12; font-size: 14px; font-weight: 600; }

/* ---------- Fact strip ---------- */
.kh-facts { background: #fff; border-bottom: 1px solid var(--kh-line); }
.kh-facts__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding-block: 32px; }
.kh-fact { color: var(--kh-muted); font-size: 15px; }
.kh-fact strong { display: block; font-family: var(--kh-display); font-weight: 800; font-size: 30px; letter-spacing: -0.02em; color: var(--kh-ink); }

/* ---------- Comparison table ---------- */
.kh-compare { margin: 0; overflow-x: auto; border: 1px solid var(--kh-line); border-radius: 16px; background: #fff; }
.kh-compare table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 16px; }
.kh-compare thead { border-bottom: 0; }
.kh-compare th, .kh-compare td { padding: 16px 24px; border: 0; border-top: 1px solid var(--kh-line); text-align: left; }
.kh-compare thead th { border-top: 0; background: #F2F5F7; font-family: var(--kh-display); font-size: 18px; }
.kh-compare thead th:nth-child(2) { background: var(--kh-brand); color: #fff; }
.kh-compare td:first-child { font-weight: 600; }
.kh-compare td:nth-child(2) { background: var(--kh-mist); font-weight: 600; }
.kh-compare td:nth-child(3) { color: var(--kh-muted); }

/* ---------- Reviews ---------- */
.kh-quote { margin: 0; background: #fff; border: 0; border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.kh-quote::before { content: "\201C"; font-family: var(--kh-display); font-size: 56px; line-height: 0.6; color: var(--kh-accent); }
.kh-quote p { font-size: 18px; line-height: 1.5; }
.kh-quote cite { font-style: normal; color: var(--kh-muted); font-size: 14px; font-weight: 600; }

/* ---------- Partner tiles ---------- */
.kh-tiles { display: flex; flex-direction: column; gap: 12px; }
.kh-tile { padding: 22px 24px; border-radius: 14px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14); display: flex; flex-direction: column; gap: 4px; }
.kh-tile h3 { margin: 0; font-family: var(--kh-body); font-size: 18px; font-weight: 700; letter-spacing: 0; }
.kh-tile h3 a { color: #fff; text-decoration: none; }
.kh-tile h3 a::after { content: " \2192"; }
.kh-tile p { color: var(--kh-on-dark); font-size: 15px; }

/* ---------- FAQ (core Details block) ---------- */
.kh-faq-list { border-top: 1px solid #D9E1E6; }
.kh-faq-list .wp-block-details { border-bottom: 1px solid #D9E1E6; padding: 0; margin: 0; }
.kh-faq-list summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; font-weight: 700; font-size: 19px; cursor: pointer; list-style: none; }
.kh-faq-list summary::-webkit-details-marker { display: none; }
.kh-faq-list summary::after { content: "+"; font-size: 28px; font-weight: 400; line-height: 1; transition: transform 0.2s; }
.kh-faq-list details[open] summary::after { transform: rotate(45deg); }
.kh-faq-list details p { margin: 0 0 22px; color: var(--kh-muted); font-size: 17px; line-height: 1.6; }

/* ---------- Final CTA ---------- */
.kh-cta { padding: 0 24px 96px; }
.kh-cta__box { box-sizing: border-box; max-width: 1200px; margin-inline: auto; border-radius: 24px; background: var(--kh-accent); color: var(--kh-ink); padding: 52px 44px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 28px; }
.kh-cta__copy { display: flex; flex-direction: column; gap: 10px; max-width: 620px; }
.kh-cta__copy .kh-h2 { color: var(--kh-ink); font-size: clamp(30px, 3.6vw, 42px); }
.kh-cta__copy p { color: #22333D; font-size: 18px; }
.kh-prefill { display: flex; flex-wrap: wrap; gap: 12px; flex: 1 1 420px; max-width: 560px; }
.kh-prefill input { box-sizing: border-box; flex: 1 1 240px; min-width: 0; height: 54px; padding: 0 16px; border: 2px solid var(--kh-ink); border-radius: 12px; background: #fff; font: inherit; font-size: 17px; color: var(--kh-ink); }
.kh-prefill button { height: 54px; padding: 0 26px; border: 0; border-radius: 12px; background: var(--kh-ink); color: #fff; font: inherit; font-weight: 800; font-size: 17px; cursor: pointer; }
.kh-prefill .kh-prefill__call { flex-basis: 100%; font-weight: 600; color: var(--kh-ink); }
.kh-prefill .kh-prefill__call a { color: var(--kh-ink); font-weight: 800; }
.kh-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- City page bits ---------- */
.kh-chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.kh-chips li { padding: 16px 18px; border-radius: 12px; background: var(--kh-mist); font-weight: 600; }
.kh-office { display: flex; flex-wrap: wrap; gap: 32px; align-items: stretch; }
.kh-office > :first-child { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.kh-office > :last-child { flex: 1.4 1 420px; min-width: 0; }
.kh-address { font-size: 18px; line-height: 1.7; }
.kh-map iframe { display: block; width: 100%; height: 100%; min-height: 340px; border: 0; border-radius: 20px; }
.kh-quote--big { max-width: 860px; margin-inline: auto; text-align: center; align-items: center; background: transparent; }
.kh-quote--big p { font-family: var(--kh-display); font-weight: 500; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.4; }

/* ---------- Footer ---------- */
.kh-footer { background: #fff; border-top: 1px solid var(--kh-line); font-size: 15px; }
.kh-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; padding-block: 56px 40px; }
.kh-footer__col { display: flex; flex-direction: column; gap: 8px; }
.kh-foot-h { margin: 0 0 4px; font-family: var(--kh-body); font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--kh-muted); }
.kh-footer a { text-decoration: none; }
.kh-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 24px 32px; border-top: 1px solid var(--kh-line); color: var(--kh-muted); font-size: 14px; }
.kh-footer__bottom a { color: var(--kh-muted); }
.kh-areas-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* ---------- Mobile action bar ---------- */
.kh-mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 99; display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--kh-line); box-shadow: 0 -8px 24px -12px rgba(13,31,42,0.25); }
.kh-mbar a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 12px; font-weight: 800; text-decoration: none; }
.kh-mbar__call { border: 2px solid var(--kh-brand); color: var(--kh-brand); }
.kh-mbar__offer { flex: 1.4 !important; background: var(--kh-accent); color: var(--kh-ink); }
@media (max-width: 899px) { body { padding-bottom: 76px; } }
@media (min-width: 900px) { .kh-mbar { display: none; } }

/* ---------- Generic pages & posts ---------- */
.kh-page { padding-block: 64px 96px; }
.kh-page > * { max-width: 760px; margin-inline: auto; padding-inline: 24px; box-sizing: border-box; }
.kh-page > .alignwide { max-width: 1200px; }
.kh-page > .alignfull { max-width: none; padding-inline: 0; }
.kh-page > * + * { margin-block-start: 1.25em; }
.kh-page h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.03em; }

@media (max-width: 600px) {
	.kh-section { padding-block: 72px; }
	.kh-offer { padding: 22px; }
	.kh-cta__box { padding: 40px 24px; }
}
