/* =====================================================================
   YouWebb typography v2 + motion layer (2026-11-03)
   Loaded after youwebb.css. Display face: Bricolage Grotesque (SIL OFL 1.1),
   self-hosted 27 KB subset: optical size pinned at 40, variable weight 600–760
   (built by wordpress/tools/subset-display-font.mjs). Body stays Inter.
   Motion rules: transform/opacity only, one-shot (no loops, no autoplay),
   never hides the LCP heading, and is skipped for prefers-reduced-motion.
   ===================================================================== */
@font-face {
	font-family: "Bricolage Grotesque";
	font-style: normal;
	font-weight: 600 760;
	font-display: swap;
	src: url("../fonts/bricolage-grotesque-subset.woff2") format("woff2-variations"), url("../fonts/bricolage-grotesque-subset.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--yw-font-head: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
	--yw-fs-display: clamp(2.5rem, 1.55rem + 2.9vw, 4.15rem);
	--yw-fs-h1: clamp(2.3rem, 1.5rem + 2.5vw, 3.7rem);
	--yw-fs-h2: clamp(2rem, 1.4rem + 2vw, 3.15rem);
	--yw-fs-h3: clamp(1.22rem, 1.08rem + .55vw, 1.55rem);
	--yw-fs-lead: clamp(1.1rem, 1.02rem + .35vw, 1.32rem);

	--yw-ease-out: cubic-bezier(.16, 1, .3, 1); /* arriving: quick start, soft landing */
	--yw-dur-fast: 160ms; /* press feedback */
	--yw-dur: 280ms;      /* hover and small state changes */
	--yw-dur-slow: 750ms; /* entrances */
	interpolate-size: allow-keywords; /* lets <details> animate to auto height where supported */
}

/* ---------- Type ---------- */
h1, h2, h3, h4, h5, h6, .yw-display { font-family: var(--yw-font-head); font-weight: 700; letter-spacing: -.028em; line-height: 1.04; }
.yw-hero h1 { font-size: var(--yw-fs-display); font-weight: 700; letter-spacing: -.034em; line-height: 1; }
.yw-hero--page h1 { font-size: var(--yw-fs-h1); letter-spacing: -.032em; line-height: 1.02; }
.yw-section h2 { letter-spacing: -.03em; line-height: 1.04; }
.yw-section h3, .yw-card h3 { font-weight: 650; letter-spacing: -.018em; line-height: 1.18; }
p, li, dd, figcaption { text-wrap: pretty; }
.yw-lead { letter-spacing: -.006em; line-height: 1.55; }
mark.yw-grad, .yw-grad { background-image: linear-gradient(100deg, #2563FF 0%, #0891B2 50%, #2563FF 100%); background-size: 200% 100%; background-position: 0 0; }
.yw-plan__amount, .yw-anchor strong, .yw-buyout td, .yw-addons td { font-variant-numeric: tabular-nums; }
.yw-plan__amount { font-weight: 750; letter-spacing: -.05em; }
.wp-block-details.yw-faq summary { font-weight: 650; letter-spacing: -.012em; }
.yw-promise p { font-weight: 600; letter-spacing: -.018em; }
.yw-card .yw-card__num, .yw-steps > li::before { font-weight: 700; }
.yw-eyebrow { letter-spacing: .16em; }
.yw-eyebrow::before { width: 30px; transform-origin: left center; }

/* ---------- Micro-interactions (short and functional) ---------- */
.wp-block-button .wp-block-button__link { touch-action: manipulation; }
.wp-block-button .wp-block-button__link:active { scale: .97; }
.wp-block-button.yw-btn-primary .wp-block-button__link { position: relative; overflow: hidden; isolation: isolate; }
.wp-block-button.yw-btn-primary .wp-block-button__link::after { content: "→" / ""; display: inline-block; transition: translate var(--yw-dur) var(--yw-ease-out); }
.wp-block-button.yw-btn-primary .wp-block-button__link:hover::after,
.wp-block-button.yw-btn-primary .wp-block-button__link:focus-visible::after { translate: 4px 0; }
.wp-block-button.yw-btn-primary .wp-block-button__link::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .26) 50%, transparent 70%); translate: -110% 0; transition: translate .8s var(--yw-ease-out); }
.wp-block-button.yw-btn-primary .wp-block-button__link:hover::before { translate: 110% 0; }

.header-navigation .menu > li > a { background: linear-gradient(var(--yw-blue), var(--yw-blue)) no-repeat 50% calc(100% - .5em) / 0 2px; transition: background-size var(--yw-dur) var(--yw-ease-out), color var(--yw-dur); }
.header-navigation .menu > li > a:hover,
.header-navigation .menu > li.current-menu-item > a,
.header-navigation .menu > li.current-menu-ancestor > a { background-size: calc(100% - 1.4em) 2px; color: var(--yw-navy); }

.entry-content p a:not(.wp-block-button__link), .entry-content li a:not(.wp-block-button__link) { text-decoration-thickness: 1.5px; text-underline-offset: .18em; transition: text-underline-offset var(--yw-dur) var(--yw-ease-out); }
.entry-content p a:not(.wp-block-button__link):hover, .entry-content li a:not(.wp-block-button__link):hover { text-underline-offset: .3em; }

.yw-card:hover { box-shadow: var(--yw-shadow), 0 0 0 1px rgba(37, 99, 255, .08); }
.yw-plan.is-featured:hover { box-shadow: var(--yw-shadow-lg), 0 24px 60px -28px rgba(34, 211, 238, .55); }
.yw-related li a, .yw-plan-nav a { transition: border-color var(--yw-dur), color var(--yw-dur), translate var(--yw-dur) var(--yw-ease-out); }
.yw-related li a:hover, .yw-plan-nav a:hover { translate: 0 -2px; }
.yw-demo-card .yw-mock { transition: translate var(--yw-dur-slow) var(--yw-ease-out); }
.yw-demo-card:hover .yw-mock { translate: 0 -6px; }

/* Smooth FAQ open/close where the browser can animate <details>. */
@supports selector(::details-content) {
	.wp-block-details.yw-faq::details-content { block-size: 0; overflow: clip; transition: block-size var(--yw-dur) var(--yw-ease-out), content-visibility var(--yw-dur) allow-discrete; }
	.wp-block-details.yw-faq[open]::details-content { block-size: auto; }
}

/* ---------- Entrances and scroll reveals ---------- */
@media (prefers-reduced-motion: no-preference) {
	@keyframes yw-rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
	@keyframes yw-rise-solid { from { translate: 0 22px; } to { translate: 0 0; } }
	@keyframes yw-sheen { from { background-position: 100% 0; } to { background-position: 0 0; } }
	@keyframes yw-phone { from { opacity: 0; translate: 28px 36px; rotate: 4deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
	@keyframes yw-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }

	/* Hero. The H1 is the LCP element: it moves but is never hidden, so LCP is not delayed. */
	.yw-hero .yw-eyebrow { animation: yw-rise var(--yw-dur-slow) var(--yw-ease-out) both; }
	.yw-hero .yw-eyebrow::before { animation: yw-line .9s var(--yw-ease-out) both .15s; }
	.yw-hero h1 { animation: yw-rise-solid .9s var(--yw-ease-out) both; }
	.yw-hero h1 mark.yw-grad { animation: yw-sheen 1.6s var(--yw-ease-out) both .35s; }
	.yw-hero .yw-lead { animation: yw-rise var(--yw-dur-slow) var(--yw-ease-out) both .12s; }
	.yw-hero .wp-block-buttons { animation: yw-rise var(--yw-dur-slow) var(--yw-ease-out) both .2s; }
	.yw-hero .yw-anchor { animation: yw-rise var(--yw-dur-slow) var(--yw-ease-out) both .28s; }
	.yw-hero .yw-mock { animation: yw-rise 1s var(--yw-ease-out) both .18s; }
	.yw-hero .yw-mock__phone { animation: yw-phone 1.1s var(--yw-ease-out) both .5s; }

	/* Scroll reveals. youwebb.js adds .yw-rv only to elements that start BELOW the fold
	   (never above-the-fold content, never without JS, never for reduced motion), then
	   .is-in when they enter the viewport. The reveal is time-based and always completes,
	   so nothing can stay half-faded. Both classes are removed afterwards so the element's
	   own hover transitions return. --yw-d staggers siblings that enter together. */
	.yw-rv { opacity: 0; translate: 0 28px; scale: .985; transition: opacity .7s var(--yw-ease-out) var(--yw-d, 0ms), translate .9s var(--yw-ease-out) var(--yw-d, 0ms), scale .9s var(--yw-ease-out) var(--yw-d, 0ms); }
	.yw-rv.is-in, .yw-rv:focus-within { opacity: 1; translate: 0 0; scale: 1; } /* keyboard focus never lands on hidden content */
	.yw-rv .yw-eyebrow::before { transform: scaleX(0); transition: transform .9s var(--yw-ease-out) calc(var(--yw-d, 0ms) + 150ms); }
	.yw-rv.is-in .yw-eyebrow::before { transform: scaleX(1); }
}
@media print { .yw-rv { opacity: 1 !important; translate: none !important; scale: none !important; } }

/* ---------- Home hero scene motion (D30) ----------
   Plumber: starts fully off-screen right (translate 135% of its width; the hero clips overflow),
   walks left for 2.3 s (eased per keyframe) and settles with a small overshoot. No opacity fade: it can be the desktop
   LCP image. Badges: each has its own entrance, float speed/path and parallax depth, so they never
   move in sync. Parallax comes from youwebb.js setting --yw-py on .yw-scene. On phones the scene
   starts below the fold, so youwebb.js holds the animations (.js-scene) until it scrolls into view
   (.is-live). Transform and opacity only; nothing here runs under prefers-reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
	@keyframes yw-person-in { 0% { translate: 135% 0; animation-timing-function: cubic-bezier(.3, .5, .35, 1); } 74% { translate: -3% 0; animation-timing-function: ease-in-out; } 100% { translate: 0 0; } }
	@keyframes yw-badge-in { from { opacity: 0; scale: .8; } to { opacity: 1; scale: 1; } }
	@keyframes yw-float-a { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
	@keyframes yw-float-b { 0%, 100% { translate: 0 0; } 33% { translate: 7px -8px; } 66% { translate: -4px -13px; } }
	@keyframes yw-float-c { 0%, 100% { translate: 0 0; } 50% { translate: -8px -7px; } }
	.yw-scene__person { animation: yw-person-in 2.3s linear both .15s; }
	.yw-badge-search { animation: yw-badge-in .6s var(--yw-ease-out) both 1.5s, yw-float-a 4.2s ease-in-out 2.1s infinite; }
	.yw-badge-leads { animation: yw-badge-in .9s var(--yw-ease-out) both 1.8s, yw-float-b 6.8s ease-in-out 2.7s infinite; }
	.yw-badge-launch { animation: yw-badge-in 1.2s var(--yw-ease-out) both 2.1s, yw-float-c 9.5s ease-in-out 3.3s infinite; }
	.yw-scene.js-scene:not(.is-live) .yw-scene__person, .yw-scene.js-scene:not(.is-live) [class*="yw-badge-"] { animation-play-state: paused; }
	.yw-scene .yw-hero__media, .yw-scene__person, .yw-scene__stage [class*="yw-badge-"] { transform: translate3d(0, calc(var(--yw-py, 0) * var(--depth, 0) * 1px), 0); }
	.yw-scene .yw-hero__media { --depth: .1; }
	.yw-scene__person { --depth: .04; }
	.yw-badge-search { --depth: -.08; }
	.yw-badge-leads { --depth: -.2; }
	.yw-badge-launch { --depth: -.13; }
}
