/* Polish pass — loaded last. Reversible overrides on top of the existing cascade. */

/* ---------- Scene cleanup ---------- */

/* Tree canopy fades out softly on its open side: no hard image edge, logo stays clear. */
@media(max-width:1100px) and (max-aspect-ratio:4/5){
 .layer[data-layer=tree] img{mask-image:linear-gradient(to left,transparent 0,#0000 8%,#00000080 28%,#000 50%);-webkit-mask-image:linear-gradient(to left,transparent 0,#0000 8%,#00000080 28%,#000 50%)}
}
@media(max-width:767px) and (max-aspect-ratio:4/5){
 .brand small{font-size:calc(var(--u) * 18);font-weight:700;color:#4a3d27}
 /* Lawn reaches under the soil ridge: no pale strip between them. */
 .layer[data-layer=garden]{height:calc(var(--u) * 720)}
 /* The garden photo already carries the pergola; keep it crisp, it is the backdrop. */
 .layer[data-layer=garden] img{filter:none}
}

/* Earth runs on below the hero without a hard seam. */
.layer[data-layer=soil]{background:none}
.layer[data-layer=soil]:after{content:'';position:absolute;z-index:2;left:0;right:0;bottom:0;height:22%;background:linear-gradient(to bottom,#2b1a0d00,#2b1a0d 92%);pointer-events:none}

/* Desktop: lawn fades in lower so the copy sits on cream. */
@media(min-aspect-ratio:4/5){
 .layer[data-layer=garden] img{mask-image:linear-gradient(transparent 0,transparent 12%,#000 44%);-webkit-mask-image:linear-gradient(transparent 0,transparent 12%,#000 44%)}
 .hero-lettering{max-width:500px}
 .hero-copy p{margin:8px auto 18px}
}

/* ---------- Cream brush wash behind the copy (under the tree, over the garden) ---------- */
.copy-wash{position:absolute;z-index:2;pointer-events:none;right:-3%;top:3%;width:60%;height:64%;background:url('assets/wash.svg') center/100% 100% no-repeat}
@media(max-width:1100px) and (max-aspect-ratio:4/5){.copy-wash{right:-6%;top:11%;width:84%;height:44%}}
@media(max-width:767px) and (max-aspect-ratio:4/5){.copy-wash{right:calc(var(--u) * -30);top:calc(var(--u) * 150);width:calc(var(--u) * 590);height:calc(var(--u) * 560)}}
.motion-enabled body:not(.scene-ready) .copy-wash{opacity:0}
.scene-ready .copy-wash{animation:wash-in 1.2s .2s cubic-bezier(.22,1,.36,1) both}
@keyframes wash-in{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:none}}

/* ---------- Calmer entrance: fade and short rise, back to front ---------- */
@keyframes tree-arrive{from{opacity:0;transform:scale(1.03)}to{opacity:1;transform:none}}
@keyframes layer-rise{from{opacity:0;transform:translateY(28px)}to{opacity:1;transform:none}}
@keyframes garden-arrive{from{opacity:0;transform:scale(1.04)}to{opacity:1;transform:none}}
@keyframes wheel-arrive{from{opacity:0;transform:translateY(30px)}to{opacity:1;transform:none}}
@keyframes rake-arrive{from{opacity:0;transform:translateY(26px) rotate(-4deg)}to{opacity:1;transform:none}}
@keyframes sign-arrive{0%{opacity:0;transform:translateY(-40px) rotate(-6deg)}40%{opacity:1}65%{transform:translateY(3px) rotate(2.5deg)}85%{transform:rotate(-1deg)}100%{opacity:1;transform:none}}

/* ---------- Services: filled icons on soil plates, sprouting on scroll ---------- */
.service{animation:none!important}
.service svg{width:60px;height:60px;padding:6px;border-radius:50%;stroke-width:1.6;background:radial-gradient(circle at 50% 42%,#4b321a 0,#36230f 58%,#2a1a0c00 74%);box-shadow:inset 0 2px 4px #00000070,0 1px 0 #ffffff12;filter:drop-shadow(0 2px 2px #120a04aa)}
@media(max-width:1400px) and (max-aspect-ratio:8/5){.service svg{width:56px;height:56px}}
@media(max-width:1100px) and (max-aspect-ratio:4/5){.service svg{width:clamp(44px,8.6vw,84px);height:clamp(44px,8.6vw,84px);padding:clamp(5px,.9vw,9px)}}
@media(max-width:767px) and (max-aspect-ratio:4/5){
 .services{top:calc(var(--u) * 1080)}
 .service svg{width:calc(var(--u) * 70);height:calc(var(--u) * 70);padding:calc(var(--u) * 8)}
}
.service span{text-shadow:0 2px 4px #160d05}

.motion-enabled .services:not(.revealed) .service{opacity:0;transform:translateY(26px)}
.motion-enabled .services:not(.revealed) .service svg{clip-path:inset(100% -20% -20% -20%);transform:scale(.7)}
.motion-enabled .services:not(.revealed) .service:after{transform:scaleY(0)}
.services .service{transition:opacity .6s cubic-bezier(.22,1,.36,1),transform .9s cubic-bezier(.34,1.45,.5,1),translate .2s cubic-bezier(.22,1,.36,1),scale .1s,color .2s;transition-delay:calc(var(--i,0) * 120ms),calc(var(--i,0) * 120ms),0s,0s,0s}
.services .service svg{transition:clip-path .8s cubic-bezier(.22,1,.36,1),transform .9s cubic-bezier(.34,1.5,.5,1);transition-delay:calc(var(--i,0) * 120ms + 120ms)}
.services .service:after{transition:transform .7s cubic-bezier(.22,1,.36,1);transition-delay:calc(var(--i,0) * 120ms + 300ms)}
.services.revealed .service svg{clip-path:inset(-20% -20% -20% -20%)}
.service:hover svg{transform:translateY(-3px) rotate(-4deg)}

/* ---------- Interaction states ---------- */
.primary,.quick-quote{transition:translate .2s cubic-bezier(.22,1,.36,1),scale .1s,box-shadow .2s}
.quick-quote:hover{translate:0 -2px;box-shadow:0 6px 16px #23320b40}
.primary:active,.quick-quote:active,.service:active{scale:.97}
.primary svg{transition:translate .2s cubic-bezier(.22,1,.36,1)}
.primary:hover svg{translate:-4px 0}
.service:focus-visible{outline:3px solid #e2b04a;outline-offset:2px;border-radius:8px}

/* Layers that move with scroll get their own compositor layer. */
.parallax-on .tree-depth,.parallax-on .foreground-depth,.parallax-on .layer[data-layer=garden],.parallax-on .copy-wash,.parallax-on .hero-copy,.parallax-on .layer[data-layer=foliage]{will-change:transform}

@media(prefers-reduced-motion:reduce){
 .motion-enabled .services .service,.motion-enabled .services .service svg,.motion-enabled .grow>*{opacity:1!important;transform:none!important;clip-path:none!important;transition:none!important}
 .services .service:after{transform:none!important}
 .copy-wash{animation:none!important;opacity:1!important}
}
body.paused .copy-wash{animation:none!important;opacity:1!important}

/* Services sit above the corner leaves; leaves never cover a label while scrolling. */
.services{z-index:17}
/* Soil darkens gradually into the closing strip instead of ending on a line. */
.layer[data-layer=soil]:after{height:38%;background:linear-gradient(to bottom,#2b1a0d00,#2b1a0dcc 60%,#2b1a0d 96%)}
@media(max-width:767px) and (max-aspect-ratio:4/5){
 .hero:before,.hero:after{mask-image:linear-gradient(#000 30%,transparent 62%);-webkit-mask-image:linear-gradient(#000 30%,transparent 62%)}
}
