/*
Theme Name: You Betcha Repairs
Description: Lightweight block theme for You Betcha Repairs. Fonts: Bricolage Grotesque and Source Sans 3 (SIL Open Font License, see assets/fonts).
Version: 1.0.0
Requires at least: 6.6
Text Domain: youbetcha
*/

:root {
	--yb-blue: #16324f;
	--yb-green: #225c4a;
	--yb-yellow: #f2c14e;
	--yb-yellow-hover: #e7b43f;
	--yb-mist: #eff4f2;
	--yb-slate: #455668;
	--yb-line: #d7e1dd;
	--yb-radius: 16px;
}

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { -webkit-font-smoothing: antialiased; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--yb-blue); outline-offset: 3px; border-radius: 4px; }
.yb-dark :where(a, button, summary):focus-visible { outline-color: var(--yb-yellow); }
.screen-reader-text:focus { clip: auto; clip-path: none; height: auto; width: auto; background: #fff; color: var(--yb-blue); padding: 12px 16px; z-index: 100000; left: 8px; top: 8px; }

/* Header */
.yb-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--yb-line); }
.yb-header__inner { padding-block: 12px; gap: 24px; }
.yb-header .wp-block-site-logo img { width: 230px; height: auto; }
.yb-nav { font-weight: 600; font-size: 17px; }
.yb-nav .wp-block-navigation-item__content { color: var(--yb-blue); text-decoration: none; }
.yb-nav .wp-block-navigation-item__content:hover { text-decoration: underline; text-underline-offset: 4px; }
.yb-nav .yb-nav-cta .wp-block-navigation-item__content { background: var(--yb-yellow); padding: 10px 18px; border-radius: 8px; font-weight: 700; }
.yb-nav .yb-nav-cta .wp-block-navigation-item__content:hover { background: var(--yb-yellow-hover); text-decoration: none; }
.yb-nav .wp-block-navigation__responsive-container-open, .yb-nav .wp-block-navigation__responsive-container-close { color: var(--yb-blue); }
.yb-nav .wp-block-navigation__responsive-container-open svg { width: 32px; height: 32px; }
.yb-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 24px; }
.yb-nav .is-menu-open .wp-block-navigation__container { gap: 20px; font-size: 22px; }
@media (max-width: 599px) { .yb-header .wp-block-site-logo img { width: 190px; } }

/* Sections */
.wp-block-post-content > .alignfull, .wp-block-post-content + * , main + .yb-footer, .wp-site-blocks > footer, .wp-site-blocks > div:has(> .yb-footer) { margin-block-start: 0 !important; }
.wp-block-post-content > .alignfull { margin-block-end: 0 !important; }
.yb-cards, .yb-steps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)) !important; }
.yb-faq h2 { margin-bottom: 12px; }
.yb-section { padding-block: clamp(56px, 8vw, 104px); }
.yb-section > * + * { margin-block-start: 20px; }
.yb-mist { background: var(--yb-mist); }
.yb-dark { background: var(--yb-blue); color: #fff; }
.yb-green { background: var(--yb-green); color: #fff; }
.yb-dark :where(h1,h2,h3), .yb-green :where(h1,h2,h3) { color: #fff; }
.yb-dark a:not(.wp-element-button), .yb-green a:not(.wp-element-button) { color: #fff; }
.yb-lede { font-size: clamp(19px, 1.6vw, 21px); }
.yb-eyebrow { font-weight: 700; color: var(--yb-green); font-size: 17px; letter-spacing: .01em; display: flex; align-items: center; gap: 10px; }
.yb-eyebrow::before { content: ""; width: 28px; height: 4px; background: var(--yb-yellow); border-radius: 2px; flex: none; }
.yb-small { font-size: 16px; }
.yb-center { text-align: center; }
.yb-center .wp-block-buttons { justify-content: center; }

/* Hero */
.yb-hero { padding-block: clamp(36px, 6vw, 88px) clamp(56px, 7vw, 96px); background: #fff; }
.yb-hero .wp-block-columns { gap: clamp(28px, 5vw, 72px); align-items: center !important; }
.yb-hero h1 { margin-block: 14px 18px; }
.yb-hero__photo { margin: 0; position: relative; }
.yb-hero__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 18%; border-radius: 20px; display: block; box-shadow: 0 24px 48px -28px rgba(22,50,79,.55); }
.yb-hero__photo::after { content: "Your list. Handled."; position: absolute; left: -14px; bottom: 28px; background: var(--yb-yellow); color: var(--yb-blue); font: 700 18px/1 var(--wp--preset--font-family--heading); padding: 12px 16px; border-radius: 8px; }
.yb-reassure { font-size: 16px; display: flex; gap: 8px; align-items: flex-start; }
.yb-reassure::before { content: "✓"; color: var(--yb-green); font-weight: 800; }
@media (max-width: 781px) {
	.yb-hero__photo img { aspect-ratio: 4 / 3.4; object-position: 50% 20%; }
	.yb-hero__photo::after { left: 12px; bottom: 12px; }
}

/* Cards / services */
.yb-cards { gap: 20px; }
.yb-card { background: #fff; border: 1px solid var(--yb-line); border-top: 5px solid var(--yb-green); border-radius: var(--yb-radius); padding: 28px; }
.yb-card h3 { margin: 0 0 10px; }
.yb-card p { margin: 0; }
.yb-card p + p { margin-top: 12px; }
.yb-card ul { margin: 12px 0 0; padding-left: 20px; }

/* Steps */
.yb-steps { gap: 20px; counter-reset: step; }
.yb-step { border-top: 2px solid rgba(255,255,255,.25); padding-top: 20px; counter-increment: step; }
.yb-step::before { content: counter(step); display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--yb-yellow); color: var(--yb-blue); font: 800 20px/1 var(--wp--preset--font-family--heading); margin-bottom: 14px; }
.yb-step h3 { margin: 0 0 8px; }
.yb-step p { margin: 0; color: #e4ecf3; }

/* Meet Rafael */
.yb-meet .wp-block-columns { gap: clamp(28px, 5vw, 64px); align-items: center !important; }
.yb-headshot { margin: 0; }
.yb-headshot img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; width: 100%; max-width: 360px; display: block; margin-inline: auto; border: 8px solid #fff; box-shadow: 0 0 0 4px var(--yb-yellow); }

/* Area chips */
.yb-chips { gap: 10px; }
.yb-chips p { margin: 0; background: #fff; border: 1px solid var(--yb-line); border-radius: 999px; padding: 8px 18px; color: var(--yb-blue); font-weight: 600; }

/* FAQ */
.yb-faq .wp-block-details { border-bottom: 1px solid var(--yb-line); padding-block: 18px; margin: 0; }
.yb-faq .wp-block-details summary { font: 650 21px/1.3 var(--wp--preset--font-family--heading); color: var(--yb-blue); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.yb-faq .wp-block-details summary::-webkit-details-marker { display: none; }
.yb-faq .wp-block-details summary::after { content: "+"; font-size: 28px; line-height: .8; color: var(--yb-green); }
.yb-faq .wp-block-details[open] summary::after { content: "–"; }
.yb-faq .wp-block-details p { margin: 12px 0 0; max-width: 64ch; }

/* Buttons */
.wp-element-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.is-style-outline .wp-element-button { background: transparent; border: 2px solid currentColor; color: var(--yb-blue); }

/* Footer */
.yb-footer { background: #123352; color: #dbe5ee; padding-block: 56px 32px; font-size: 16px; }
.yb-footer a:not(.wp-element-button) { color: #fff; }
.yb-footer .yb-footer__logo img { width: 220px; height: auto; }
.yb-footer__links { gap: 8px 24px; }
.yb-footer__links p { margin: 0; }
.yb-footer__fine { border-top: 1px solid rgba(255,255,255,.18); padding-top: 20px; margin-top: 32px; color: #b9c8d6; font-size: 15px; }

/* Sticky mobile CTA */
.yb-sticky { display: none; }
@media (max-width: 781px) {
	.yb-sticky { display: block; transition: transform .2s ease; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--yb-line); }
	.yb-sticky a { display: flex; justify-content: center; align-items: center; min-height: 50px; background: var(--yb-yellow); color: var(--yb-blue); font-weight: 700; font-size: 18px; border-radius: 8px; text-decoration: none; }
	.yb-sticky.is-hidden { transform: translateY(110%); }
	body.yb-has-sticky { padding-bottom: 76px; }
}

/* Project request form */
.yb-form { background: #fff; border: 1px solid var(--yb-line); border-radius: var(--yb-radius); padding: clamp(20px, 4vw, 40px); }
.yb-field { margin: 0 0 22px; }
.yb-field > label, .yb-field legend { display: block; font-weight: 700; color: var(--yb-blue); font-size: 17px; margin-bottom: 6px; padding: 0; }
.yb-field fieldset { border: 0; margin: 0; padding: 0; }
.yb-req { font-weight: 400; color: var(--yb-slate); font-size: 15px; }
.yb-hint { display: block; font-size: 16px; color: var(--yb-slate); margin: 0 0 8px; }
.yb-form input[type=text], .yb-form input[type=email], .yb-form input[type=tel], .yb-form select, .yb-form textarea { width: 100%; box-sizing: border-box; font: 400 18px/1.4 var(--wp--preset--font-family--body); color: var(--yb-blue); padding: 12px 14px; border: 2px solid #9fb0ab; border-radius: 8px; background: #fff; min-height: 50px; }
.yb-form textarea { min-height: 160px; resize: vertical; }
.yb-form input:focus, .yb-form select:focus, .yb-form textarea:focus { border-color: var(--yb-blue); outline: 3px solid rgba(242,193,78,.7); outline-offset: 1px; }
.yb-form [aria-invalid=true] { border-color: #b3261e; }
.yb-choice { display: flex; gap: 12px; flex-wrap: wrap; }
.yb-choice label { display: flex; align-items: center; gap: 10px; border: 2px solid #9fb0ab; border-radius: 8px; padding: 10px 16px; min-height: 48px; box-sizing: border-box; cursor: pointer; font-weight: 600; color: var(--yb-blue); }
.yb-choice input { width: 20px; height: 20px; accent-color: var(--yb-green); margin: 0; }
.yb-choice label:has(input:checked) { border-color: var(--yb-green); background: #e7f1ed; }
.yb-two { display: grid; gap: 0 20px; grid-template-columns: 1fr 1fr; }
@media (max-width: 599px) { .yb-two { grid-template-columns: 1fr; } }
.yb-form input[type=file] { font-size: 17px; padding: 10px 0; max-width: 100%; }
.yb-err { color: #b3261e; font-weight: 600; font-size: 16px; margin: 6px 0 0; }
.yb-alert { border: 2px solid #b3261e; background: #fdf1f0; border-radius: 12px; padding: 18px 20px; margin-bottom: 24px; color: #5c1612; }
.yb-alert h2 { font-size: 22px; color: #5c1612; margin: 0 0 6px; }
.yb-alert ul { margin: 8px 0 0; padding-left: 20px; }
.yb-alert a { color: #5c1612; }
.yb-form .wp-element-button { border: 0; cursor: pointer; width: 100%; font-size: 19px; min-height: 54px; }
.yb-form .wp-element-button[disabled] { opacity: .7; cursor: progress; }
.yb-privacy-note { font-size: 15px; margin: 14px 0 0; }
.yb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ===== v2: home-services layout ===== */
.yb-topbar { background: var(--yb-blue); color: #fff; font-size: 15px; font-weight: 600; }
.yb-topbar__inner { padding-block: 8px; gap: 4px 24px; }
.yb-topbar p { margin: 0; }
.yb-topbar__right::before { content: "✓ "; color: var(--yb-yellow); }
@media (max-width: 599px) { .yb-topbar__right { display: none; } .yb-topbar { font-size: 14px; } }
.yb-header { box-shadow: 0 2px 10px rgba(22,50,79,.08); border-bottom: 0; }
.yb-header__inner { padding-block: 14px; }
.yb-header .wp-block-site-logo img { width: 250px; }
.yb-nav { font-size: 18px; }
.yb-nav .wp-block-navigation__container { gap: 28px; }
.yb-nav .yb-nav-cta .wp-block-navigation-item__content { padding: 13px 22px; font-size: 18px; }

/* Hero: full-bleed photo with a card */
.yb-hero2 { position: relative; overflow: hidden; min-height: clamp(560px, 46vw, 680px); display: flex; flex-direction: column; justify-content: center; padding-block: 48px; background: var(--yb-blue); }
.yb-hero2 > .yb-hero2__bg { position: absolute; inset: 0; margin: 0 !important; max-width: none !important; z-index: 0; }
.yb-hero2__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; display: block; }
.yb-hero2::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(22,50,79,.55) 0%, rgba(22,50,79,.15) 45%, rgba(22,50,79,0) 70%); pointer-events: none; }
.yb-hero2 > .yb-hero2__card { position: relative; z-index: 2; background: #fff; border-radius: 16px; padding: clamp(24px, 3vw, 40px); max-width: 540px !important; margin: 0 auto 0 max(0px, calc((100% - 1200px) / 2)) !important; box-shadow: 0 30px 60px -30px rgba(10,25,40,.6); border-top: 6px solid var(--yb-yellow); }
.yb-hero2__card h1 { font-size: clamp(36px, 4vw, 54px); margin: 10px 0 14px; }
.yb-hero2__card p { margin: 0 0 18px; }
.yb-hero2__card .wp-block-buttons { margin-bottom: 14px; }
.yb-hero2__card .wp-element-button { font-size: 19px; padding: 15px 28px; }
@media (min-width: 1100px) { .yb-hero2__bg img { object-position: 50% 22%; } }
@media (max-width: 781px) {
	.yb-hero2 { min-height: 0; padding-block: 0 32px; background: var(--yb-mist); }
	.yb-hero2::after { display: none; }
	.yb-hero2 > .yb-hero2__bg { position: relative; inset: auto; margin-inline: calc(var(--wp--style--root--padding-left) * -1) !important; height: 300px; }
	.yb-hero2__bg img { object-position: 50% 18%; }
	.yb-hero2 > .yb-hero2__card { margin: -56px 0 0 !important; max-width: none !important; }
}

/* Trust strip */
.yb-trust { background: #fff; border-bottom: 1px solid var(--yb-line); padding-block: 28px; }
.yb-trust__list { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 20px 28px; }
.yb-trust__list li { display: flex; gap: 14px; align-items: flex-start; font-size: 16px; line-height: 1.4; }
.yb-trust__list strong { color: var(--yb-blue); font-size: 17px; }
.yb-trust__icon { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--yb-mist); color: var(--yb-green); display: grid; place-items: center; }

/* How can we help tiles */
.yb-help h2 { margin-bottom: 8px; }
.yb-help .yb-lede { color: #dbe5ee; max-width: 640px; margin-inline: auto; }
.yb-tiles { list-style: none; padding: 0; margin: 36px auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 16px; }
.yb-tiles a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 170px; padding: 24px 16px; background: #fff; border-radius: 12px; color: var(--yb-blue) !important; text-decoration: none; font-weight: 700; font-size: 18px; text-align: center; border-bottom: 5px solid transparent; transition: transform .15s ease, border-color .15s ease; }
.yb-tiles a svg { color: var(--yb-green); }
.yb-tiles a:hover { transform: translateY(-3px); border-bottom-color: var(--yb-yellow); }
.yb-tiles li:last-child a { background: var(--yb-yellow); }
.yb-tiles li:last-child a svg { color: var(--yb-blue); }
@media (max-width: 599px) { .yb-tiles { grid-template-columns: 1fr 1fr; } .yb-tiles a { min-height: 140px; font-size: 16px; } .yb-tiles li:last-child { grid-column: 1 / -1; } .yb-tiles li:last-child a { min-height: 90px; flex-direction: row; } }

/* Promise + steps */
.yb-promise .wp-block-columns { gap: clamp(32px, 6vw, 80px); align-items: center !important; }
.yb-badge { aspect-ratio: 1; max-width: 340px; margin-inline: auto; border-radius: 50%; background: var(--yb-green); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; font: 700 clamp(26px, 2.6vw, 34px)/1.1 var(--wp--preset--font-family--heading); box-shadow: 0 0 0 10px #fff, 0 0 0 14px var(--yb-yellow); }
.yb-badge svg { color: var(--yb-yellow); }
.yb-steps2 { counter-reset: s2; display: grid; gap: 18px; margin-block: 24px !important; }
.yb-step2 { counter-increment: s2; position: relative; padding-left: 64px; }
.yb-step2::before { content: counter(s2); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--yb-yellow); color: var(--yb-blue); display: grid; place-items: center; font: 800 20px/1 var(--wp--preset--font-family--heading); }
.yb-step2 h3 { margin: 0 0 4px; font-size: 22px; }
.yb-step2 p { margin: 0; }
@media (max-width: 781px) { .yb-badge { max-width: 220px; } }

/* Checklist card */
.yb-checkcard { background: #fff; border-radius: 20px; padding: clamp(28px, 5vw, 56px); border-left: 8px solid var(--yb-green); box-shadow: 0 20px 40px -32px rgba(22,50,79,.5); }
.yb-checkcard h2 { margin-top: 0; }
.yb-checks { list-style: none; padding: 0; margin: 24px 0 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px 32px; }
.yb-checks li { position: relative; padding-left: 36px; color: var(--yb-blue); font-weight: 600; }
.yb-checks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--yb-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 16px no-repeat; }

/* Service area + ZIP box */
.yb-area .wp-block-columns { gap: clamp(28px, 5vw, 64px); align-items: center !important; }
.yb-chips2 { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.yb-chips2 li { display: inline-flex; align-items: center; gap: 6px; background: var(--yb-mist); border-radius: 999px; padding: 8px 16px; color: var(--yb-blue); font-weight: 600; }
.yb-chips2 svg { color: var(--yb-green); }
.yb-zipbox { background: var(--yb-blue); color: #fff; border-radius: 20px; padding: clamp(24px, 4vw, 40px); }
.yb-zipbox__title { font: 700 clamp(24px, 2.4vw, 30px)/1.15 var(--wp--preset--font-family--heading); margin: 0 0 16px; color: #fff; }
.yb-zipbox label { display: block; font-weight: 600; margin-bottom: 6px; }
.yb-zipbox__row { display: flex; gap: 10px; flex-wrap: wrap; }
.yb-zipbox input { flex: 1 1 140px; min-height: 54px; border-radius: 8px; border: 0; padding: 0 16px; font: 600 20px var(--wp--preset--font-family--body); color: var(--yb-blue); }
.yb-zipbox input:focus { outline: 3px solid var(--yb-yellow); outline-offset: 2px; }
.yb-zipbox button { border: 0; cursor: pointer; min-height: 54px; flex: 1 1 180px; }
.yb-zipbox button:focus-visible { outline-color: var(--yb-yellow); }
.yb-zipbox__note { margin: 12px 0 0; font-size: 15px; color: #c9d6e2; }

/* Meet */
.yb-meet { background: #fff; }
.wp-site-blocks > * + * { margin-block-start: 0 !important; }
@media (min-width: 782px) {
	.yb-hero2 { background: linear-gradient(135deg, #16324f 0%, #1d4060 100%); }
	.yb-hero2 > .yb-hero2__bg { left: 40%; }
	.yb-hero2__bg img { object-position: 50% 12% !important; }
	.yb-hero2::after { left: 40%; background: linear-gradient(90deg, rgba(22,50,79,1) 0%, rgba(22,50,79,0) 22%); }
}
/* Hero photo: show Rafael waist-up, not a face crop */
@media (min-width: 782px) {
	.yb-hero2 { min-height: 680px; }
	.yb-hero2 > .yb-hero2__bg { left: auto; right: 0; width: min(50%, 640px); }
	.yb-hero2__bg img { object-position: 50% 0 !important; }
	.yb-hero2::after { left: auto; right: 0; width: min(50%, 640px); background: linear-gradient(90deg, rgba(22,50,79,1) 0%, rgba(22,50,79,0) 18%); }
}
@media (min-width: 782px) and (max-width: 1099px) { .yb-hero2 > .yb-hero2__card { max-width: 46% !important; } }
@media (max-width: 781px) {
	.yb-hero2 > .yb-hero2__bg { height: 440px; }
	.yb-hero2__bg img { object-position: 50% 0 !important; }
}
/* Hero v3: landscape van photo — Rafael on the left of the frame, van logo on the right */
@media (min-width: 782px) {
	.yb-hero2 > .yb-hero2__bg { width: 62%; }
	.yb-hero2__bg img { object-position: 22% 50% !important; }
	.yb-hero2::after { width: 62%; background: linear-gradient(90deg, rgba(22,50,79,1) 0%, rgba(22,50,79,0) 14%); }
	.yb-hero2 > .yb-hero2__card { max-width: 500px !important; }
}
@media (max-width: 781px) {
	.yb-hero2 > .yb-hero2__bg { height: auto; aspect-ratio: 3 / 2; }
	.yb-hero2__bg img { object-position: 50% 50% !important; }
	.yb-hero2 > .yb-hero2__card { margin-top: -24px !important; }
}
@media (min-width: 1100px) {
	.yb-hero2 { min-height: 640px; }
	.yb-hero2 > .yb-hero2__bg { width: min(62%, 960px); }
	.yb-hero2__bg img { object-position: 75% 50% !important; }
	.yb-hero2::after { width: min(62%, 960px); background: linear-gradient(90deg, rgba(22,50,79,1) 0%, rgba(22,50,79,0) 8%); }
}
/* Tablet: stack like mobile so the whole photo fits */
@media (min-width: 782px) and (max-width: 1099px) {
	.yb-hero2 { min-height: 0; padding-block: 0 40px; background: var(--yb-mist); }
	.yb-hero2::after { display: none; }
	.yb-hero2 > .yb-hero2__bg { position: relative; inset: auto; width: auto; margin-inline: calc(var(--wp--style--root--padding-left) * -1) !important; aspect-ratio: 3 / 2; height: auto; }
	.yb-hero2__bg img { object-position: 50% 50% !important; }
	.yb-hero2 > .yb-hero2__card { margin: -40px auto 0 !important; max-width: 640px !important; }
}
