/* Interaction polish: press feedback, stronger easing, touch-safe hovers. Additive; loads after the main stylesheet. */
:root{--ease-out:cubic-bezier(.23,1,.32,1)}
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
h1,h2,h3{text-wrap:balance}
p,li{text-wrap:pretty}
a,button,summary,input,select,textarea,.btn{touch-action:manipulation}
/* Snappier curve on the existing hover/press transitions (durations unchanged) */
.btn,.card,.product-card,.cat-tile,.partner-tile,.sf-grade-tile,.whatsapp-float{transition-timing-function:var(--ease-out)}
.btn{transition-property:transform,box-shadow,background-color,color,border-color;transition-duration:.16s}
/* Press feedback */
.btn:active{transform:scale(.97)}
.card:active,.product-card:active,.cat-tile:active,.partner-tile:active,.sf-grade-tile:active{transform:scale(.985);transition-duration:.12s}
.whatsapp-float:active{transform:scale(.94)}
summary{transition:color .15s ease}
summary:active{opacity:.8}
/* Touch devices: no sticky hover lift after a tap */
@media (hover:none){
  .btn:hover,.card:hover,.product-card:hover,.cat-tile:hover,.partner-tile:hover,.sf-grade-tile:hover,.whatsapp-float:hover{transform:none}
}
@media (prefers-reduced-motion:reduce){
  .btn:active,.card:active,.product-card:active,.cat-tile:active,.partner-tile:active,.sf-grade-tile:active,.whatsapp-float:active{transform:none}
}
/* Mobile platform fixes (Emil Kowalski, mobile-native) */
html{-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%}
/* iOS zooms into any input under 16px and never zooms back out */
@media (pointer:coarse){input:not([type="checkbox"]):not([type="radio"]),select,textarea{font-size:16px!important}}
/* Long-press on a control should not select its label */
.btn,button,[role="button"],.chip,.calc-subnav a{-webkit-user-select:none;user-select:none}

/* Footer "Find us on": one row when it fits, wrap instead of spilling into the next column */
@media (min-width:1024px){.site-footer .social-links{flex-wrap:wrap;gap:.2rem}.site-footer .social-links a{padding:.15rem}}
@media (min-width:1141px){.site-footer .social-links{gap:.15rem}.site-footer .social-links a{padding:.1rem}.site-footer .social-links .social-icon{width:24px;height:24px}}

/* "Link to this page" box (backlink helper) */
.cite-box{border:1px solid var(--color-line,#e3e8d6);border-left:3px solid var(--color-primary,#84AC28);border-radius:8px;padding:18px 20px;background:#fff;display:grid;gap:10px;max-width:760px;margin:2rem 0}
.cite-box h2{font-size:1.15rem;margin:0}
.cite-box p{margin:0}
.cite-box pre{margin:0;overflow-x:auto;background:#f7f9f2;border:1px solid var(--color-line,#e3e8d6);border-radius:6px;padding:10px 12px;font-size:.85rem}
.cite-box code{white-space:pre;font-family:ui-monospace,Menlo,Consolas,monospace}
.cite-box .btn{justify-self:start}

/* wide tables scroll inside their box instead of being cut off on phones */
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
.table-wrap table{min-width:100%}

/* Stats strip: green band, each fact in its own box */
.stats-bar{background:var(--color-primary-dark);color:#fff;padding:.75rem 0 .35rem}
.stats-bar .stats-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:.6rem;padding:0 var(--space-3,1rem)}
.stats-bar .stat{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:.1rem;padding:.55rem .6rem;border-radius:12px;background:rgba(0,0,0,.2);border:1px solid rgba(255,255,255,.3)}
.stats-bar .stat strong{display:block;font-size:1.3rem;line-height:1.15;color:#fff}
.stats-bar .stat span{font-size:.8rem;line-height:1.25;color:#F0F4E8}
.stats-bar .container>p{margin:.4rem 0 0!important;font-size:.72rem!important;color:#fff;opacity:1!important}
@media(max-width:700px){.stats-bar .stats-grid{grid-template-columns:repeat(2,1fr)}.stats-bar .stat:last-child{grid-column:1/-1}}

/* "Sun Brand" menu link: the real Sun Brand logo instead of the sun glyph */
.nav-sunfloc::before{content:""!important;display:inline-block;width:24px;height:24px;background:url(../images/sun-brand-logo.webp) center/contain no-repeat;vertical-align:-7px;margin-right:.4rem}

/* Video embed (click to load; YouTube no-cookie player) */
.yt-embed{margin:1.75rem 0 1.5rem;max-width:760px}
.yt-embed h2{font-size:1.2rem;margin:0 0 .6rem}
.yt-lite{position:relative;aspect-ratio:16/9;background:#10222f;border-radius:14px;overflow:hidden;box-shadow:0 8px 24px -14px rgba(16,34,47,.5)}
.yt-lite .yt-play{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;background:none;cursor:pointer;display:block}
.yt-lite img{width:100%;height:100%;object-fit:cover;display:block}
.yt-lite .yt-btn{position:absolute;left:50%;top:50%;width:68px;height:68px;margin:-34px 0 0 -34px;border-radius:50%;background:rgba(229,132,31,.95);box-shadow:0 6px 18px rgba(0,0,0,.3);transition:transform .18s cubic-bezier(.16,1,.3,1)}
.yt-lite .yt-btn::after{content:"";position:absolute;left:27px;top:20px;border-style:solid;border-width:14px 0 14px 22px;border-color:transparent transparent transparent #fff}
.yt-lite .yt-play:hover .yt-btn{transform:scale(1.08)}
.yt-lite .yt-play:focus-visible{outline:3px solid #1f86b5;outline-offset:-3px}
.yt-lite iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.yt-cap{margin:.5rem 0 0;font-size:.88rem;color:var(--color-muted,#566b78)}
@media(prefers-reduced-motion:reduce){.yt-lite .yt-btn{transition:none}}

/* Video grid on the homepage and the water-treatment page */
.yt-section h2{margin:0 0 .35rem}
.yt-intro{margin:0 0 1.2rem;color:var(--color-muted,#566b78);max-width:70ch}
.yt-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:1.25rem}
.yt-item{margin:0}
.yt-item .yt-cap{margin:.55rem 0 0;font-size:.9rem;line-height:1.45}
.yt-item .yt-cap strong{color:var(--color-text,#10222f)}
