/* Homepage hero v4 ("calm hero", design system index4). See includes/hero4.php. */
@keyframes h4-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes h4-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.h4-hero { background: #F4F8FE; border-bottom: 1px solid var(--border-subtle, #E2E8F0); padding: clamp(28px, 4vw, 56px) 24px; }
.h4-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (max-width: 720px) { .h4-grid { grid-template-columns: minmax(0, 1fr); } }

.h4-caption { color: var(--clevr-blue-600); }
.h4-title { font-size: clamp(32px, 4.2vw, 54px); font-weight: 700; line-height: 1.08; margin: 12px 0 16px; text-wrap: balance; }
.h4-hl { color: var(--clevr-blue-500); }
.h4-lead { max-width: 480px; margin: 0 0 24px; text-wrap: pretty; }
.h4-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.h4-cta { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 10px; background: var(--clevr-blue-500); color: #fff; font: 600 15px var(--font-body); text-decoration: none; transition: background 150ms; }
.h4-cta:hover { background: var(--clevr-blue-600); color: #fff; }
.h4-cta i, .h4-cta svg { width: 16px; height: 16px; }
.h4-sec { color: var(--clevr-blue-600); font: 600 15px var(--font-body); text-decoration: none; transition: color 150ms; }
.h4-sec:hover { color: var(--clevr-blue-700); }

.h4-card { background: #fff; border-radius: 20px; border: 1px solid #E3ECF8; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 24px 48px -24px rgba(19, 69, 140, .18); overflow: hidden; min-width: 0; }
/* 16:9, the shape of the product-page pictures used by the AirGuardian and irrigation slides. */
.h4-media { position: relative; aspect-ratio: 16 / 9; background: #fff; }
.h4-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 500ms ease, visibility 0s linear 500ms; }
.h4-slide.is-on { opacity: 1; visibility: visible; transition: opacity 500ms ease; }
.h4-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; display: block; }
.h4-kind { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; margin-bottom: 8px; border-radius: 999px; background: #fff; border: 1px solid #E3ECF8; font: 600 11px var(--font-mono); letter-spacing: .04em; color: var(--fg-2); }
.h4-kind i, .h4-kind svg { width: 12px; height: 12px; color: var(--clevr-blue-600); }

/* All slides' text share one grid cell so the card keeps the height of the tallest. */
.h4-metas { display: grid; align-items: start; } /* shorter slides keep their text at the top; spare height goes above the tabs */
.h4-meta { grid-area: 1 / 1; padding: 20px 24px 4px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; opacity: 0; visibility: hidden; }
.h4-meta.is-on { opacity: 1; visibility: visible; animation: h4-in 500ms ease both; }
.h4-meta-text { min-width: 0; flex: 1 1 240px; }
.h4-name { font: 600 18px var(--font-body); color: var(--fg-1); }
.h4-blurb { margin: 4px 0 12px; text-wrap: pretty; }
.h4-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.h4-chips span { padding: 3px 9px; border-radius: 6px; background: var(--clevr-blue-50); color: var(--clevr-blue-800); font: 500 12px var(--font-mono); }
.h4-link { font-size: 14px; white-space: nowrap; }

.h4-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 14px 12px; padding: 16px 24px 22px; }
.h4-tab { appearance: none; background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; gap: 8px; min-width: 0; text-align: left; }
.h4-bar-track { height: 2px; border-radius: 2px; background: #E3ECF8; overflow: hidden; display: block; }
.h4-bar { display: block; height: 100%; background: var(--clevr-blue-500); transform-origin: left; transform: scaleX(0); }
.h4-tab.is-on .h4-bar { animation: h4-bar var(--h4-ms, 6000ms) linear both; }
.h4-card.is-paused .h4-tab.is-on .h4-bar { animation-play-state: paused; }
.h4-tab-name { font: 500 12px var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--fg-3); transition: color 150ms; }
.h4-tab.is-on .h4-tab-name, .h4-tab:hover .h4-tab-name { color: var(--fg-1); }
.h4-tab:focus-visible { outline: 2px solid var(--clevr-blue-500); outline-offset: 4px; border-radius: 4px; }

.h4-principles { max-width: 480px; margin-top: 32px; padding-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; border-top: 1px solid #DCE6F3; }
.h4-principles > div { display: flex; flex-direction: column; gap: 2px; }
.h4-p-title { font: 600 14px var(--font-body); color: var(--fg-1); }
.h4-p-sub { font: 400 13px var(--font-body); color: var(--fg-3); }

/* A slide that plays on the EchoEar's own screen (VoCat): the device photo with a black round
   display, and screens that cross-fade inside it (assets/js/hero4.js). The screen sits in the
   device picture's round display; --dev-ar and --scr-* are set per picture in includes/hero4.php. */
.h4-slide .h4-device { position: absolute; left: 50%; top: 50%; height: 92%; aspect-ratio: var(--dev-ar, 285 / 275); transform: translate(-50%, -50%); }
.h4-device-body { position: absolute; inset: 0; width: 100%; height: 100%; display: block; mix-blend-mode: normal; object-fit: contain; }
.h4-device-screen { position: absolute; left: var(--scr-l, 8.07%); top: var(--scr-t, 6.18%); width: var(--scr-w, 81.75%); height: var(--scr-h, 84.73%); border-radius: 50%; overflow: hidden; background: #000; }
.h4-device-screen img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; mix-blend-mode: normal; opacity: 0; transition: opacity 400ms ease; }
.h4-device-screen img.is-on { opacity: 1; }
.h4-device-cap { position: absolute; left: 16px; bottom: 16px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .92); border: 1px solid #E3ECF8; font: 600 12px var(--font-body); color: var(--clevr-blue-800); transition: opacity 200ms ease; }

@media (prefers-reduced-motion: reduce) {
    .h4-device-screen img { transition: none; }
    .h4-slide, .h4-slide.is-on { transition: none; }
    .h4-meta.is-on { animation: none; }
    .h4-tab.is-on .h4-bar { animation: none; transform: scaleX(1); }
}
