/* Ecopoise home page (English and Afrikaans): the sections only the home page has. The shared look is site.css.
   Dex, 12 Nov 2026: mock F, "dark and moving". Footage behind the headline, moving bands of outlined type,
   numbers that count up, pests as a swipe rail, the guarantee in giant type over a photo that stays still,
   steps that stack as you scroll. CSS only. Built from src/home.css.njk so the count-up targets follow site.json. */

/* Opening: Ecopoise's own job footage edge to edge, the headline over it */
.hero--film { background: #000; min-height: 88vh; min-height: 88svh; display: grid; align-items: end; }
.hero--film .wrap { width: 100%; }
.hero--film .hero__grid { display: block; padding-block: 6rem 6.5rem; }
.hero--film .hero__grid > div:first-child { position: relative; z-index: 2; max-width: 60rem; }
.hero--film .photo-panel { position: absolute; inset: 0; aspect-ratio: auto; margin: 0; z-index: 0; }
.hero--film .photo-panel::before { display: none; }
.hero--film .photo-panel picture, .hero--film .photo-panel img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero--film .photo-panel img { object-fit: cover; border-radius: 0; }
/* The loop plays over the still frame once it has arrived (the still is its first frame, so nothing jumps) */
/* It is asked for a moment after the page opens (a zero-length animation that switches the picture on), so the
   words, the fonts and the still frame get the connection first. */
@media (prefers-reduced-motion: no-preference) {
  .hero--film .photo-panel::after { content: ""; display: block; position: absolute; inset: 0; background: center / cover no-repeat; animation: loop-tall 1ms 1.5s forwards; }
  @keyframes loop-tall { to { background-image: url(/media/hero-loop-tall.avif?v=40b2c759); } }
  @keyframes loop-wide { to { background-image: url(/media/hero-loop-wide.avif?v=657bc89e); } }
  /* by the shape of the screen, like the still frame under it: only a phone held upright gets the upright loop */
  @media (min-aspect-ratio: 2/3) { .hero--film .photo-panel::after { animation-name: loop-wide; } }
}
.hero--film::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(4, 21, 10, .55) 0%, rgba(4, 21, 10, .25) 35%, rgba(4, 21, 10, .93) 100%), linear-gradient(90deg, rgba(4, 21, 10, .7) 0%, rgba(4, 21, 10, 0) 70%); }
/* On a phone the words cover the whole width, so the footage is darker behind them (measured: checks/contrast.mjs) */
@media (max-width: 899px) { .hero--film::after { background: linear-gradient(180deg, rgba(4, 21, 10, .48) 0%, rgba(4, 21, 10, .64) 12%, rgba(4, 21, 10, .64) 55%, rgba(4, 21, 10, .95) 88%); } }
.hero--film h1 { font-size: clamp(3.05rem, 9.4vw, 8.15rem); line-height: .98; }
.hero--film h1 .accent { display: block; }
.hero--film .lead { font-size: clamp(1.1rem, 1.6vw, 1.4rem); color: #E7EEE8; max-width: 40rem; }
.hero--film .trust { color: #C5D2C8; }
.hero--film .btn { min-height: 56px; padding-inline: 1.7rem; font-size: 1.08rem; }
@media (min-width: 900px) { .hero--film .hero__grid { padding-block: 7rem 3.5rem; } }
@keyframes up { from { opacity: 0; transform: translateY(1.1em); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero--film h1 { animation: up .9s cubic-bezier(.2, .7, .1, 1) both; }
  .hero--film h1 .accent { animation: up .9s .18s cubic-bezier(.2, .7, .1, 1) both, sweep 6s linear 1.2s infinite; }
  .hero--film .lead, .hero--film .actions, .hero--film .trust { animation: up .8s .45s both; }
}

/* Moving bands of outlined type. The stroke is drawn first and the fill (the page colour) on top of it, so only
   the outer half of the stroke shows and no stray lines appear inside a letter. */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--page); padding-block: 1.1rem; }
.marquee__track { display: flex; width: max-content; gap: 2.5rem; animation: slide 38s linear infinite; }
.marquee--rev .marquee__track { animation-direction: reverse; animation-duration: 46s; }
.marquee span { font-family: var(--display); font-size: clamp(2.65rem, 6.6vw, 5.6rem); letter-spacing: -.02em; line-height: 1; white-space: nowrap; color: var(--page); -webkit-text-stroke: 3px rgba(255, 255, 255, .55); paint-order: stroke fill; display: inline-flex; align-items: center; gap: 2.5rem; }
.marquee span:nth-child(3n + 1) { color: var(--accent); -webkit-text-stroke: 0; }
.marquee span::after { content: ""; width: .32em; height: .32em; border-radius: 50%; background: var(--accent); flex: none; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Numbers that count up as they scroll in */
.proof { padding-block: 3rem 2rem; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); }
.stat { display: flex; flex-direction: column; gap: .35rem; border-top: 2px solid var(--accent); padding: 1.25rem 0 1.25rem; margin-right: 1.25rem; }
.stat b { font-family: var(--display); font-weight: 400; color: #fff; font-size: clamp(3rem, 7vw, 6rem); letter-spacing: -.02em; line-height: 1; display: flex; align-items: baseline; gap: .35rem; white-space: nowrap; }
.stat b small { font-family: var(--font); font-size: .3em; font-weight: 700; letter-spacing: 0; color: var(--accent); }
.stat > span { color: var(--muted); font-size: .95rem; line-height: 1.35; }
.proof .notice { margin-top: 1.25rem; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } .stat { margin-right: 1.75rem; } }
@property --n { syntax: "<integer>"; initial-value: 0; inherits: false; }
.count { --n: var(--to); counter-reset: n var(--n); }
.count::before { content: counter(n); }
.to-22 { --to: 22; }
.to-5 { --to: 5; }
@keyframes count { from { --n: 0; } }

/* Who we work for: tall photos, the words over the picture */
.serve { display: grid; gap: 1.25rem; }
.serve__card { position: relative; border-radius: 26px; overflow: hidden; color: #fff; display: block; text-decoration: none; background: #000; transition: transform .22s, box-shadow .22s; }
.serve__card picture, .serve__card img { display: block; width: 100%; }
.serve__card img { aspect-ratio: 4 / 5; height: auto; object-fit: cover; opacity: .82; transition: transform .5s; }
/* Each card carries two cuts of its photo: an upright one for phones and a wide one for wide screens. The one
   not shown is never downloaded (both are lazy). */
.serve__card .serve__wide { display: none; }
.serve__text { position: absolute; inset: auto 0 0 0; padding: 4rem 1.6rem 1.6rem; background: linear-gradient(180deg, rgba(4, 21, 10, 0), rgba(4, 21, 10, .94) 55%); }
.serve__text h3 { font-family: var(--display); font-weight: 400; color: #fff; font-size: clamp(2rem, 3.6vw, 3rem); letter-spacing: -.02em; line-height: 1; margin-bottom: .4rem; }
.serve__text p { color: #DDE5DB; margin: 0 0 .75rem; font-size: .98rem; }
.serve__more { color: var(--pale); font-weight: 700; display: inline-flex; align-items: center; gap: .4rem; }
@media (hover: hover) { .serve__card:hover { transform: translateY(-6px); box-shadow: 0 26px 50px rgba(0, 0, 0, .5); } .serve__card:hover img { transform: scale(1.04); } .serve__card:hover .serve__more { text-decoration: underline; } }
@media (min-width: 900px) { .serve { grid-template-columns: 1fr 1fr; } .serve__card img { aspect-ratio: 5 / 4; } .serve__card .serve__tall { display: none; } .serve__card .serve__wide { display: block; } }

/* Pests: a rail of tall photo cards you swipe sideways */
.pest-rail { list-style: none; margin: 0 -1.25rem 1.25rem; padding: .25rem 1.25rem 1.25rem; display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 1.25rem; scrollbar-width: thin; scrollbar-color: var(--accent) transparent; counter-reset: pest; }
.pest-rail li { flex: 0 0 66vw; max-width: 300px; scroll-snap-align: start; counter-increment: pest; }
.pest-rail a { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; background: #000; text-decoration: none; }
.pest-rail picture, .pest-rail img { position: absolute; inset: 0; width: 100%; height: 100%; }
.pest-rail img { object-fit: cover; transition: transform .5s; }
.pest-rail a::before { content: counter(pest, decimal-leading-zero); position: absolute; left: 1.1rem; top: 1rem; z-index: 2; font-weight: 800; font-size: .95rem; color: var(--accent); letter-spacing: .08em; }
.pest-rail a::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(4, 21, 10, .45) 0%, rgba(4, 21, 10, 0) 30%, rgba(4, 21, 10, .92) 100%); }
.pest-rail span { position: absolute; left: 1.1rem; right: 1.1rem; bottom: 1rem; z-index: 2; font-family: var(--display); color: #fff; font-size: 1.75rem; letter-spacing: -.02em; line-height: 1; }
@media (hover: hover) { .pest-rail a:hover img { transform: scale(1.07); } }
.pest-rail__more a { background: var(--accent); display: flex; flex-direction: column; justify-content: flex-end; padding: 1.1rem; }
.pest-rail__more a::after { display: none; }
.pest-rail__more a::before, .pest-rail__more span, .pest-rail__more small { color: var(--accent-ink); }
.pest-rail__more span { position: static; }
.pest-rail__more small { font-weight: 700; font-size: 1rem; margin-top: .5rem; }
@media (min-width: 900px) { .pest-rail { margin-right: calc((100vw - min(100vw, var(--wrap))) / -2 - 1.25rem); padding-right: 3rem; } .pest-rail li { flex-basis: 290px; } }

/* The guarantee in giant type over a photo; on a wide screen the photo stays still while the page moves */
.promise { position: relative; overflow: hidden; min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 5rem 1.25rem; background: #06170C; }
.promise picture, .promise img { position: absolute; inset: 0; width: 100%; height: 100%; }
.promise img { object-fit: cover; object-position: 50% 30%; }
/* The wide frame is used on every shape but an upright phone; it is held on the technician (he stands 58 % across,
   in the upper part), so a squarish window cuts away ground and sky, never him. */
@media (min-aspect-ratio: 2/3) { .promise img { object-position: 58% 38%; } }
/* No veil is laid over the photo here: the dark green veil (62 % at the top to 78 % at the bottom) is built into the
   picture files, which makes them a fraction of the size for the same sharpness. */
.promise > div { position: relative; z-index: 2; }
.promise p { margin: 0 auto; font-family: var(--display); font-size: clamp(2.7rem, 8.7vw, 7.65rem); letter-spacing: -.02em; line-height: .98; color: #fff; max-width: 13ch; text-wrap: balance; }
.promise em { font-style: normal; animation-delay: 0s; }
.promise small { display: block; margin-top: 1.75rem; font-size: 1.05rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--pale); }
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) { .promise { clip-path: inset(0); } .promise picture { position: fixed; } }

/* How it works: three slabs that stack up as you scroll */
.steps--stack { display: block; }
.steps--stack li { position: sticky; top: 7.5rem; min-height: 17rem; border: 0; border-radius: 28px; padding: 2rem 1.75rem 2.25rem; margin-bottom: 1.5rem; font-size: 1.1rem; box-shadow: 0 -18px 50px rgba(0, 0, 0, .35); background: #12361E; color: #DDE5DB; }
.steps--stack li:nth-child(2) { background: #F6F7F4; color: #273366; top: 9rem; }
.steps--stack li:nth-child(3) { background: var(--accent); color: var(--accent-ink); top: 10.5rem; }
.steps--stack .step-num { background: none; width: auto; height: auto; display: block; font-family: var(--display); font-weight: 400; font-size: clamp(5rem, 11vw, 9rem); line-height: .8; margin-bottom: 1.25rem; color: var(--accent); }
.steps--stack li:nth-child(2) .step-num { color: var(--green-2); }
.steps--stack li:nth-child(3) .step-num { color: var(--deep); }
.steps--stack strong { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -.02em; line-height: 1.05; margin-bottom: .6rem; color: #fff; }
.steps--stack li:nth-child(2) strong { color: #1C2A6B; }
.steps--stack li:nth-child(3) strong { color: var(--deep); }
.steps--stack li:nth-child(n + 2) mark.todo { color: var(--todo-ink); }
@media (min-width: 900px) { .steps--stack li { display: grid; grid-template-columns: 14rem 1fr; column-gap: 2rem; align-content: center; padding: 3rem; min-height: 19rem; max-width: 62rem; } .steps--stack .step-num { grid-row: 1 / span 2; margin: 0; align-self: center; } }

/* Reviews: the score in lime, the quotes on dark cards */
.score-card { display: inline-flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.score-card .score { font-family: var(--display); font-size: clamp(4rem, 9vw, 7rem); color: var(--accent); line-height: 1; }
.score-card p { margin: 0; color: var(--muted); }
.stars { color: #E0A800; display: flex; }
.stars .icon { width: 1.1em; height: 1.1em; }
.reviews > div:last-child { display: flex; flex-wrap: wrap; gap: 1rem; }
.reviews > div:last-child > p { flex-basis: 100%; margin: .5rem 0 0; }
.review { flex: 1 1 20rem; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 2rem; }
.review::before { content: "\201C"; display: block; font-family: var(--display); font-size: 4.5rem; line-height: .7; height: 2rem; color: var(--accent); }
.review p { font-size: 1.12rem; color: #E7EEE8; }
.review footer { color: var(--pale); font-weight: 700; font-size: .95rem; }

/* Where we work: one huge outlined line */
.giant { font-size: clamp(3.25rem, 13.2vw, 11.2rem); line-height: .95; margin-bottom: .3em; color: var(--page); -webkit-text-stroke: 2.5px var(--accent); paint-order: stroke fill; }
@media (min-width: 700px) { .giant { -webkit-text-stroke-width: 4px; } }

/* Movement tied to scrolling, only where the browser supports it */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .serve__card, .steps--stack li, .review, .stat { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
    .count { animation: count linear both; animation-timeline: view(); animation-range: entry 10% cover 40%; }
    @keyframes zoom { from { transform: scale(.72); opacity: .2; } to { transform: none; opacity: 1; } }
    .promise p { animation: zoom linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
  }
}
