/* M&M Environmental Consulting - homepage v2 (16 Nov 2026, PROVISIONAL until owner approval).
   Cinematic hero (crossfading licensed stock + waving flag canvas + red/blue light), nine service lines, brand band,
   interactive service-area map. Loads after mm.css, pages.css, honeycomb.css. Reduced motion: all static. */

/* ---------- HERO ---------- */
.cine { --foot: 66px; position: relative; isolation: isolate; overflow: hidden; background: var(--navy-950);
  height: clamp(640px, calc(100svh - var(--header-h)), 1000px); display: flex; flex-direction: column; }
.cine-slides, .cine-slide { position: absolute; inset: 0; margin: 0; }
.cine-slide { opacity: 0; transition: opacity 1.8s ease; z-index: -5; }
.cine-slide.is-on { opacity: 1; }
.cine-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); will-change: transform; }
.cine-slide.is-on img { animation: cineKB 11s linear forwards; }
.cine-slide:nth-child(1) img { object-position: 50% 45%; transform-origin: 70% 55%; }
.cine-slide:nth-child(2) img { object-position: 50% 60%; transform-origin: 30% 60%; }
.cine-slide:nth-child(3) img { object-position: 40% 40%; transform-origin: 40% 40%; scale: -1 1; }   /* mirrored so the crew sits clear of the headline (no lettering in this photo) */
.cine-slide:nth-child(4) img { object-position: 50% 55%; transform-origin: 40% 50%; }
@keyframes cineKB { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.14) translate3d(-1.2%, -.8%, 0); } }

/* waving flag: drawn by home.js, faded into the sky on the right */
.cine-flag { position: absolute; z-index: -4; top: 0; right: 0; width: 58%; height: 78%; pointer-events: none; opacity: .5; mix-blend-mode: soft-light;
  -webkit-mask-image: radial-gradient(120% 95% at 100% 0%, #000 30%, transparent 72%); mask-image: radial-gradient(120% 95% at 100% 0%, #000 30%, transparent 72%); }

/* colour grade: deep navy on the text side, cinematic floor fade, vignette */
.cine-grade { position: absolute; inset: 0; z-index: -3; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5,11,24,.94) 0%, rgba(5,11,24,.78) 30%, rgba(5,11,24,.32) 62%, rgba(5,11,24,.18) 100%),
    linear-gradient(0deg, rgba(5,11,24,.98) 0%, rgba(5,11,24,.55) 16%, transparent 42%),
    linear-gradient(180deg, rgba(5,11,24,.55) 0%, transparent 18%),
    radial-gradient(140% 120% at 60% 40%, transparent 55%, rgba(0,0,0,.55) 100%); }
.cine-light { position: absolute; inset: 0; z-index: -2; pointer-events: none; mix-blend-mode: screen; }
.cine-light i { position: absolute; border-radius: 50%; filter: blur(60px); }
.cine-light .r { width: 46vw; height: 46vw; left: -18vw; bottom: -26vw; background: radial-gradient(circle, rgba(210,33,58,.55), transparent 65%); animation: cineGlow 7s ease-in-out infinite; }
.cine-light .b { width: 40vw; height: 40vw; right: -12vw; top: -22vw; background: radial-gradient(circle, rgba(46,98,220,.55), transparent 65%); animation: cineGlow 7s ease-in-out -3.5s infinite; }
@keyframes cineGlow { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
/* anamorphic light streak crossing the frame now and then */
.cine-scan { position: absolute; left: -40%; right: -40%; top: 38%; height: 2px; z-index: -2; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(120,170,255,.0) 30%, rgba(170,205,255,.7) 50%, rgba(120,170,255,0) 70%, transparent);
  box-shadow: 0 0 18px 2px rgba(90,140,255,.35); animation: cineScan 11s ease-in-out 2s infinite; }
@keyframes cineScan { 0%, 70% { opacity: 0; transform: translateX(-30%); } 78% { opacity: .65; } 92%, 100% { opacity: 0; transform: translateX(30%); } }

/* equipment plate: unbranded line drawings (vacuum truck / hydro excavation) */
.cine-rigs { position: absolute; z-index: 1; right: max(20px, calc((100vw - var(--wrap)) / 2)); bottom: calc(var(--foot) + 34px); width: 330px; aspect-ratio: 640 / 300;
  padding: 0; border-radius: 10px; color: #c9d6ee; pointer-events: none;
  background: linear-gradient(160deg, rgba(20,34,70,.55), rgba(5,11,24,.35)); border: 1px solid rgba(160,190,240,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 20px 50px rgba(0,0,0,.45); backdrop-filter: blur(3px); }
.cine-rigs::before { content: "Equipment illustration"; position: absolute; top: -24px; left: 2px; font: 600 11px/1 var(--display); letter-spacing: .24em; text-transform: uppercase; color: var(--steel-400); }
.rig { position: absolute; inset: 10px 14px 6px; margin: 0; opacity: 0; transition: opacity 1s ease; }
.rig.on { opacity: 1; }
.rig svg.bp { filter: drop-shadow(0 0 6px rgba(120,170,255,.35)); }

/* copy */
.cine-in { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 40px 0 calc(var(--foot) + 40px); }
.cine-kicker { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; font: 600 15px/1 var(--display); font-stretch: 85%; letter-spacing: .3em; text-transform: uppercase; color: var(--steel-300); }
.cine-kicker b { color: var(--red-400); font-weight: 700; }
.k-flag { width: 34px; height: 20px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.25);
  background: linear-gradient(var(--navy-500), var(--navy-500)) 0 0 / 42% 54% no-repeat, repeating-linear-gradient(180deg, var(--red-500) 0 2.85px, #fff 2.85px 5.7px); }
.cine-h1 { margin: 0; font-family: var(--display); font-stretch: 75%; font-weight: 700; text-transform: uppercase; line-height: .92; letter-spacing: .005em;
  font-size: clamp(44px, 5.5vw, 92px); max-width: 15.5em; }
.cine-h1 span { display: block; }
.cine-h1 .l1 { background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 rgba(0,0,0,.6)) drop-shadow(0 12px 28px rgba(0,0,0,.6)); }
.cine-h1 .l2 { color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.45), 0 14px 34px rgba(0,0,0,.65); position: relative; padding-bottom: 18px; }
.cine-h1 .l2::after { content: ""; position: absolute; left: 0; bottom: 0; width: min(420px, 60%); height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, var(--red-500) 0 40%, #fff 40% 52%, var(--navy-500) 52% 100%); box-shadow: 0 0 20px rgba(210,33,58,.45); }
.cine-lede { margin: 24px 0 34px; max-width: 46ch; font-size: clamp(18px, 1.45vw, 22px); line-height: 1.5; color: #d6deea; text-shadow: 0 2px 12px rgba(0,0,0,.7); }
.cine-cta { display: flex; flex-wrap: wrap; gap: 12px; max-width: 1060px; }
.cine-cta .btn.big { min-width: 0; min-height: 66px; padding: 0 24px; font-size: 21px; gap: 12px; }
.btn.steel { --b: linear-gradient(180deg, #f6f8fb 0%, #d9dfe7 45%, #aeb8c4 55%, #e3e8ee 100%); color: var(--navy-900); text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.btn.steel svg { color: var(--navy-700); }
.home .btn.steel { background-blend-mode: multiply, normal; }
.cine-cta .em span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.cine-cta .em small { font-size: 15px; letter-spacing: .12em; color: #ff8a98; margin-top: 4px; font-style: normal; }

/* entrance */
.js .cine-kicker, .js .cine-h1 span, .js .cine-lede, .js .cine-cta > * { opacity: 0; transform: translateY(22px); animation: cineIn .9s cubic-bezier(.2,.7,.2,1) forwards; }
.js .cine-h1 .l1 { animation-delay: .12s; } .js .cine-h1 .l2 { animation-delay: .26s; } .js .cine-lede { animation-delay: .42s; }
.js .cine-cta > :nth-child(1) { animation-delay: .56s; } .js .cine-cta > :nth-child(2) { animation-delay: .64s; } .js .cine-cta > :nth-child(3) { animation-delay: .72s; }
@keyframes cineIn { to { opacity: 1; transform: none; } }

/* slide controls */
.cine-foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: var(--foot); border-top: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(5,11,24,.2), rgba(5,11,24,.75)); backdrop-filter: blur(4px); }
.cine-foot-in { height: 100%; display: flex; align-items: center; gap: 28px; }
.cine-dots { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.cine-dots button { display: flex; flex-direction: column; gap: 8px; width: 96px; padding: 8px 0; background: none; border: 0; cursor: pointer; text-align: left; color: var(--steel-400);
  font: 600 12px/1 var(--display); letter-spacing: .2em; text-transform: uppercase; }
.cine-dots i { position: relative; display: block; height: 3px; border-radius: 2px; background: rgba(255,255,255,.18); overflow: hidden; }
.cine-dots i::after { content: ""; position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--red-500), #fff 60%, var(--navy-500)); }
.cine-dots [aria-current="true"] { color: #fff; }
.cine-dots [aria-current="true"] i::after { animation: cineBar var(--dur, 7s) linear forwards; }
.cine.paused .cine-dots [aria-current="true"] i::after { animation-play-state: paused; }
@keyframes cineBar { to { transform: scaleX(1); } }
.cine-cap { margin: 0 0 0 auto; text-align: right; font: 600 14px/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.cine-cap small { display: block; margin-top: 4px; font: 400 11.5px/1.2 var(--body); letter-spacing: .02em; text-transform: none; color: var(--steel-400); }
.cine-pause { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(5,11,24,.5); cursor: pointer; display: grid; place-items: center; }
.cine-pause span { width: 10px; height: 12px; border-inline: 3px solid #fff; }
.cine-pause[aria-pressed="true"] span { width: 0; height: 0; border: 0; border-left: 11px solid #fff; border-block: 7px solid transparent; margin-left: 3px; }
.cine-pause:focus-visible, .cine-dots button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- NINE SERVICES ---------- */
.svc9 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s9; }
.s9 { position: relative; display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto 1fr auto; column-gap: 18px; height: 100%; padding: 26px 24px 22px; overflow: hidden;
  text-decoration: none; color: #fff; border-radius: 10px; border: 1px solid rgba(255,255,255,.09);
  background: linear-gradient(160deg, rgba(34,40,50,.95), rgba(14,17,22,.98)); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 14px 34px rgba(0,0,0,.35);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.s9::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--red-500), #fff 50%, var(--navy-500)); opacity: .55; transition: opacity .25s; }
.s9::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px circle at var(--hx, 80%) var(--hy, 0%), rgba(46,98,220,.22), transparent 60%); opacity: 0; transition: opacity .3s; }
.s9:hover, .s9:focus-visible, .s9[aria-expanded="true"] { transform: translateY(-4px); border-color: rgba(160,190,240,.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 22px 46px rgba(0,0,0,.5); }
.s9:hover::before, .s9:focus-visible::before, .s9[aria-expanded="true"]::before { opacity: 1; }
.s9:hover::after, .s9[aria-expanded="true"]::after { opacity: 1; }
.s9:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.s9-n { position: absolute; right: 18px; top: 12px; font: 700 54px/1 var(--display); font-stretch: 75%; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.16); }
.s9 svg { grid-row: 1 / 3; width: 58px; height: 46px; color: #dfe6f1; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); align-self: start; margin-top: 2px; }
.s9 b { font: 700 25px/1 var(--display); font-stretch: 80%; text-transform: uppercase; padding-right: 54px; position: relative; z-index: 1; }
.s9 small { grid-column: 2; margin-top: 8px; font-size: 15px; line-height: 1.45; color: var(--steel-300); position: relative; z-index: 1; }
.s9 em { grid-column: 2; margin-top: 14px; font: 700 13px/1 var(--display); font-style: normal; letter-spacing: .16em; text-transform: uppercase; color: #ff8a98; position: relative; z-index: 1; }
.s9 .tbc { grid-column: 2; justify-self: start; margin-top: 12px; padding: 4px 9px; border-radius: 4px; font: 600 11px/1 var(--display); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: #ffd98a; background: rgba(255,190,60,.12); border: 1px solid rgba(255,190,60,.35); position: relative; z-index: 1; }
.svc9 + .svc-detail { margin-top: 22px; }

/* ---------- BRAND BAND (owner-approved image) ---------- */
.brand-band { position: relative; overflow: hidden; background: var(--navy-950); line-height: 0; }
.brand-band img { width: 100%; height: clamp(300px, 46vw, 760px); object-fit: cover; object-position: 50% 38%; }
.bb-shine { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay; background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.22) 45%, transparent 60%); transform: translateX(-70%); animation: bbShine 10s ease-in-out infinite; }
@keyframes bbShine { 0%, 55% { transform: translateX(-70%); } 85%, 100% { transform: translateX(70%); } }
.bb-edge { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, var(--char-800) 0%, transparent 12%, transparent 85%, var(--navy-950) 100%); }

/* ---------- SERVICE AREA ---------- */
.area-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.area-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 18px; }
.area-chips button { padding: 9px 14px; border-radius: 999px; cursor: pointer; color: var(--steel-100); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14);
  font: 600 14px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; transition: background .2s, border-color .2s; }
.area-chips button:hover { border-color: rgba(160,190,240,.5); }
.area-chips button[aria-pressed="true"] { background: var(--navy-metal); border-color: rgba(160,190,240,.6); color: #fff; }
.area-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.area-privacy { font-size: 13px; color: var(--steel-400); }
.area-out { margin-top: 20px; padding: 18px 20px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: linear-gradient(160deg, rgba(19,41,92,.45), rgba(8,20,48,.6)); min-height: 92px; }
.area-out b { display: block; font: 700 24px/1.1 var(--display); font-stretch: 80%; text-transform: uppercase; }
.area-out span { display: block; margin-top: 6px; color: var(--steel-300); }
.area-out .mi { color: #ff8a98; }
.area-map { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid rgba(160,190,240,.16);
  background: radial-gradient(circle at 50% 50%, #0f2250 0%, #081430 55%, #050b18 100%); box-shadow: inset 0 0 80px rgba(0,0,0,.6), 0 24px 60px rgba(0,0,0,.45); }
.area-map svg { display: block; width: 100%; height: auto; }
.area-map .ring { fill: none; stroke: rgba(160,190,240,.22); stroke-dasharray: 3 6; }
.area-map .ring-l { fill: rgba(160,190,240,.55); font: 600 11px var(--display); letter-spacing: .2em; }
.area-map .axis { stroke: rgba(160,190,240,.1); }
.area-map .coast { fill: none; stroke: rgba(120,170,255,.45); stroke-width: 1.6; }
.area-map .sea { fill: rgba(46,98,220,.08); }
.area-map .sea-l { fill: rgba(120,170,255,.45); font: 600 12px var(--display); letter-spacing: .4em; }
.area-map .city { cursor: pointer; }
.area-map .city circle { fill: #dfe6f1; transition: r .2s; }
.area-map .city text { fill: var(--steel-300); font: 600 12px var(--display); letter-spacing: .08em; text-transform: uppercase; paint-order: stroke; stroke: #06102a; stroke-width: 3px; }
.area-map .city:hover circle, .area-map .city.on circle { fill: #ff5a6e; r: 6; }
.area-map .city.on text, .area-map .city:hover text { fill: #fff; }
.area-map .city:focus { outline: none; } .area-map .city:focus-visible circle { stroke: #fff; stroke-width: 2; }
.area-map .hq-pulse { fill: none; stroke: #ff5a6e; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: hqPulse 2.4s ease-out infinite; }
@keyframes hqPulse { from { transform: scale(.4); opacity: 1; } to { transform: scale(3.2); opacity: 0; } }
.area-map .hq-l { fill: #fff; font: 700 13px var(--display); letter-spacing: .14em; paint-order: stroke; stroke: #06102a; stroke-width: 3px; }
.area-map .sweep { transform-box: view-box; transform-origin: var(--cx) var(--cy); animation: sweep 9s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.area-map .route { fill: none; stroke: #ff5a6e; stroke-width: 2.4; stroke-dasharray: 6 5; filter: drop-shadow(0 0 4px rgba(255,90,110,.7)); }
.area-map .me circle { fill: #4f8bff; stroke: #fff; stroke-width: 2; }
.area-map .note { fill: rgba(160,190,240,.45); font: 500 10.5px var(--body); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1180px) { .cine-rigs { display: none; } .svc9 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 980px) { .area-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .cine { --foot: 54px; height: auto; min-height: calc(100svh - var(--header-h)); }
  .cine-in { justify-content: flex-end; padding: 120px 0 calc(var(--foot) + 26px); }
  .cine-grade { background: linear-gradient(0deg, rgba(5,11,24,.98) 0%, rgba(5,11,24,.82) 45%, rgba(5,11,24,.35) 75%, rgba(5,11,24,.5) 100%); }
  .cine-flag { width: 100%; height: 50%; opacity: .45; }
  .cine-kicker { font-size: 12px; letter-spacing: .2em; gap: 10px; margin-bottom: 16px; }
  .cine-h1 { font-size: clamp(36px, 11vw, 50px); }
  .cine-h1 .l2 { padding-bottom: 14px; }
  .cine-lede { font-size: 17px; margin: 18px 0 24px; }
  .cine-cta { flex-direction: column; gap: 10px; }
  .cine-cta .btn.big { width: 100%; min-height: 58px; font-size: 20px; padding: 0 18px; }
  .cine-dots button { width: 58px; font-size: 0; gap: 0; }
  .cine-cap { display: none; }
  .cine-cap small { display: none; }
  .cine-foot-in { gap: 14px; justify-content: space-between; }
  .svc9 { grid-template-columns: 1fr; gap: 12px; }
  .s9 { grid-template-columns: 48px 1fr; padding: 20px 18px; }
  .s9 svg { width: 44px; height: 36px; }
  .s9 b { font-size: 22px; }
  .area-chips button { font-size: 13px; padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .cine-slide, .rig { transition: none; }
  .cine-slide.is-on img, .cine-light i, .cine-scan, .bb-shine, .area-map .sweep, .area-map .hq-pulse { animation: none; }
  .cine-scan, .bb-shine { display: none; }
  .js .cine-kicker, .js .cine-h1 span, .js .cine-lede, .js .cine-cta > * { animation: none; opacity: 1; transform: none; }
  .cine-dots [aria-current="true"] i::after { animation: none; transform: scaleX(1); }
}
.s9 svg { position: relative; z-index: 1; }
.area-map .city.minor text { opacity: 0; transition: opacity .2s; }
.area-map .city.minor:hover text, .area-map .city.minor.on text, .area-map .city.minor:focus-visible text { opacity: 1; }
.area-map .city.minor circle { r: 3; opacity: .7; }
