/* SiteMetrics hero: the copy, the isometric scene and its HTML layer (cards, pins, leaders, feed, toasts, Sites panel).
   Wide (>= 1180 px): one first screen, copy top left over the scene, cards in two columns, live feed bottom right.
   Narrower: copy, then the scene with a status pin on each site, then the Sites panel. Breakpoints match scene.js. */
.hero { position: relative; padding: 108px 0 32px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .9;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48.5' height='28'><path d='M0 14 24.25 0 48.5 14 24.25 28Z' fill='none' stroke='%23e7dfd3' stroke-width='1'/></svg>") center top / 48.5px 28px;
  -webkit-mask-image: radial-gradient(80% 55% at 50% 72%, #000 30%, transparent 78%); mask-image: radial-gradient(80% 55% at 50% 72%, #000 30%, transparent 78%); }
.hero > * { position: relative; }
.hero-copy { z-index: 2; max-width: 760px; margin: 0 auto; padding: 0 20px; text-align: center; }
.hero-copy .eyebrow { margin-bottom: 16px; }
.hero h1 { font-size: clamp(44px, 9vw, 80px); font-weight: 800; letter-spacing: -0.05em; line-height: .92; }
.hero h1 .serif { font-size: 1.16em; letter-spacing: -0.02em; }
.hero h1 .stop { margin-left: -0.09em; } /* Plus Jakarta sets the full stop loose at display sizes */
.hero-sub { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.5; max-width: 520px; margin: 22px auto 0; }
.scene { position: relative; margin-top: 28px; }

@media (min-width: 1180px) {
  .hero { height: 100vh; height: 100svh; min-height: 700px; max-height: 1120px; padding: 0; }
  .hero::before { -webkit-mask-image: radial-gradient(55% 75% at 66% 60%, #000 35%, transparent 80%); mask-image: radial-gradient(55% 75% at 66% 60%, #000 35%, transparent 80%); }
  .hero-copy { position: absolute; top: clamp(112px, 16vh, 168px); left: max(40px, calc(50% - 680px)); width: max-content; max-width: 780px; margin: 0; padding: 0; text-align: left; }
  .hero h1 { font-size: clamp(64px, min(6.4vw, 10.6vh), 108px); }
  .hero-sub { margin: 26px 0 0; max-width: 440px; }
  .scene { position: absolute; inset: 0; margin: 0; }
}
@media (min-width: 1180px) and (max-height: 820px) {
  .hero-copy { top: 104px; }
  .hero-copy .eyebrow { display: none; }
  .hero-sub { margin-top: 20px; }
  .s-card { padding: 10px 13px 9px; }
  .s-line { margin-bottom: 8px; }
}

/* Night (scene/night.js decides; the switch is data-night on #scene): the scene is drawn in night colours on plain night
   (no sky, no moon, as fsiMetrics), and the hero's foot dissolves into the page so scrolling on is one surface */
.hero.is-night { background: #0b1020; }
.hero.is-night::before { opacity: .8; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48.5' height='28'><path d='M0 14 24.25 0 48.5 14 24.25 28Z' fill='none' stroke='%231a2236' stroke-width='1'/></svg>"); }
.hero.is-night::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 260px; z-index: 2; pointer-events: none;
  background: linear-gradient(to bottom, rgba(251,248,244,0) 0%, rgba(251,248,244,.04) 20%, rgba(251,248,244,.16) 40%, rgba(251,248,244,.4) 60%, rgba(251,248,244,.72) 80%, var(--paper) 100%); }
.hero.is-night .scene-lights { z-index: 1; pointer-events: none; }
.hero.is-night .scene-ui, .hero.is-night .hero-copy, .hero.is-night .sites { z-index: 3; }
.hero.is-night h1 { color: #fff; }
.hero.is-night h1 .serif, .hero.is-night .eyebrow { color: #fb9a62; }
.hero.is-night .hero-sub { color: #aeb6c6; }
body:has(.hero.is-night) .nav { background: rgba(255,255,255,.94); }
.hero.is-night + .trust { border-top-color: transparent; }
@media (min-width: 700px) and (max-width: 1179px) { .hero.is-night { padding-bottom: 170px; } }

/* The drawing (scene.js sets the viewBox and, below 1180 px, the box's height) */
.scene > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.scene-ui { position: absolute; inset: 0; pointer-events: none; }
.scene-ui > * { pointer-events: auto; }
.scene .blink { animation: blink 1.6s steps(1) infinite; }
.scene .blink.slow { animation-duration: 2.6s; }
@keyframes blink { 50% { opacity: .12; } }
.scene .fence .pulse { transform-box: fill-box; transform-origin: center; opacity: 0; animation: fpulse 4.2s ease-out infinite; }
.scene .fence[data-site="orchid"] .pulse { animation-delay: 1.1s; }
.scene .fence[data-site="lakeview"] .pulse { animation-delay: 2.2s; }
.scene .fence[data-site="hq"] .pulse { animation-delay: 3.1s; }
@keyframes fpulse { 0% { opacity: .55; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.16); } }
.scene .fence .ring { transition: fill .4s; }
.scene .fence.hot .ring { fill: rgba(194,65,12,.12); stroke-dasharray: none; }
.scene .arc { fill: none; stroke: #c2410c; stroke-width: 1.3; stroke-dasharray: 2 7; stroke-linecap: round; opacity: .28; animation: flow 1.4s linear infinite; transition: opacity .3s; }
.scene .arc.live { opacity: .85; stroke-width: 1.8; }
@keyframes flow { to { stroke-dashoffset: -18; } }
.scene .arm { transform-box: view-box; animation: dig 3.4s ease-in-out infinite; }
@keyframes dig { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-10deg); } }
.scene .person .phone { transition: fill .3s; }
.scene .person.hot .phone { fill: #fb9a62; filter: drop-shadow(0 0 4px #fb9a62); }
.scene .logo-pin { cursor: pointer; outline: none; }
.scene .lp-float { animation: bob 3.2s ease-in-out infinite; filter: drop-shadow(0 4px 6px rgba(29,37,49,.25)); transition: filter .25s; }
.scene .logo-pin:hover .lp-float, .scene .logo-pin:focus-visible .lp-float { filter: drop-shadow(0 8px 12px rgba(194,65,12,.45)); }
@keyframes bob { 50% { transform: translateY(-3px); } }
.scene .ripple { transform-box: fill-box; transform-origin: center; animation: ripple 3.2s ease-out infinite; }
@keyframes ripple { 0% { opacity: .9; transform: scale(.5); } 100% { opacity: 0; transform: scale(1.7); } }
.scene .billboard { cursor: pointer; transition: transform .25s, filter .25s; }
.scene .billboard:hover, .scene .billboard:focus-visible { transform: translateY(-4px); filter: drop-shadow(0 10px 12px rgba(194,65,12,.3)); outline: none; }

/* Cards (wide only): white callouts in two columns; a dashed leader to the site's pin shows on hover and on news */
.s-card { position: absolute; display: none; width: 240px; padding: 12px 14px 11px; background: rgba(255,255,255,.95);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 34px -20px rgba(29,37,49,.45), 0 1px 2px rgba(29,37,49,.05); font-size: 12px; line-height: 1.4; color: var(--body);
  opacity: 0; transform: translateY(8px); transition: opacity .7s ease, transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s; }
.scene.is-wide .s-card { display: block; }
.scene.is-on .s-card { opacity: 1; transform: none; }
.scene-ui > .s-card:nth-child(2) { transition-delay: .12s; } .scene-ui > .s-card:nth-child(3) { transition-delay: .24s; }
.scene-ui > .s-card:nth-child(4) { transition-delay: .36s; } .scene-ui > .s-card:nth-child(5) { transition-delay: .48s; }
.scene.is-on .s-card.lit { transform: translateY(-2px); transition-delay: 0s; }
.s-card.lit, .s-card.hot { border-color: rgba(194,65,12,.4); box-shadow: 0 0 0 3px rgba(194,65,12,.08), 0 20px 36px -20px rgba(29,37,49,.5); }
.s-eye { display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brick); margin-bottom: 4px; white-space: nowrap; }
.s-line { display: block; color: var(--ink); font-size: 14px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 10px; }
.s-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; }
.s-dot.amber { background: #d97706; } .s-dot.green { background: #15803d; } .s-dot.blue { background: #2563eb; } .s-dot.red { background: var(--bad); }
.s-bar { position: relative; display: block; height: 5px; border-radius: 5px; background: #efe7dc; }
.s-bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 5px; background: #c2410c; transition: width 1.6s cubic-bezier(.2,.8,.2,1) .5s; }
.scene.is-on .s-bar i, .sites.is-on .s-bar i { width: var(--v); }
.s-bar s { position: absolute; left: var(--p); top: -3px; width: 2px; height: 11px; border-radius: 2px; background: var(--ink); }
.s-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.s-pill { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.s-pill.amber { background: #fdf0dc; color: #b45309; } .s-pill.green { background: #e7f6ec; color: #15803d; } .s-pill.blue { background: #e8effd; color: #1d4ed8; }
.s-card.alert .s-eye { color: var(--bad); }
.s-card.alert .s-bar i { background: var(--bad); }
.s-logo { width: 15px; height: 15px; border-radius: 4px; background: url(../favicon.svg) center/cover; flex: none; }
.s-live { margin-left: auto; font-size: 9px; font-weight: 800; letter-spacing: .12em; color: #fff; background: #c2410c; border-radius: 5px; padding: 2px 6px; }
.s-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.s-stats div { background: var(--paper); border-radius: 9px; padding: 7px 8px; }
.s-stats b { display: block; font-size: 18px; color: var(--ink); letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.s-stats span { font-size: 10.5px; color: var(--muted); line-height: 1.25; display: block; }
.s-card.ping { animation: ping .9s ease-out; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(194,65,12,.4), 0 16px 34px -20px rgba(29,37,49,.45); } 100% { box-shadow: 0 0 0 12px rgba(194,65,12,0), 0 16px 34px -20px rgba(29,37,49,.45); } }

/* Pins: a status dot on each site (and, wide, on the head office and the sand pile) */
.s-pin { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--c); border: 2px solid #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent), 0 2px 6px rgba(29,37,49,.3); pointer-events: none; opacity: 0; transition: opacity .6s .8s, transform .3s; }
.s-pin.amber { --c: #d97706; } .s-pin.green { --c: #15803d; } .s-pin.blue { --c: #2563eb; } .s-pin.brick { --c: #c2410c; } .s-pin.red { --c: #b91c1c; }
.scene.is-on .s-pin { opacity: 1; }
.s-pin.lit, .s-pin.hot { transform: scale(1.45); transition-delay: 0s; }
.scene:not(.is-wide) .s-pin[data-anchor="hq"], .scene:not(.is-wide) .s-pin[data-anchor="sand"] { display: none; }
.s-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; display: none; }
.scene.is-wide .s-lines { display: block; }
.s-lines line { stroke: #c2410c; stroke-width: 1.2; stroke-dasharray: 3 4; opacity: 0; transition: opacity .3s; }
.s-lines line.lit, .s-lines line.hot { opacity: .75; }

/* Live feed (wide only), bottom right */
.s-feed { position: absolute; bottom: 20px; display: none; width: 290px; padding: 12px 14px 4px; border-radius: 16px; background: rgba(27,34,45,.92);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #c6cdd8; box-shadow: 0 24px 50px -26px rgba(10,14,20,.7); border: 1px solid rgba(255,255,255,.06);
  opacity: 0; transform: translateY(10px); transition: opacity .8s .6s, transform .8s .6s; }
.scene.is-wide .s-feed { display: block; }
.scene.is-on .s-feed { opacity: 1; transform: none; }
.s-feed-h { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 6px; }
.s-feed-h time { margin-left: auto; font-weight: 600; letter-spacing: 0; text-transform: none; color: #97a1b2; font-variant-numeric: tabular-nums; }
.s-live-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: live 1.8s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.s-feed ol { list-style: none; margin: 0; padding: 0; }
.s-feed li:nth-child(n+3) { display: none; }
.s-feed li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.07); animation: feedIn .55s cubic-bezier(.2,.8,.2,1); }
.s-feed li b { display: block; color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.s-feed li em { font-style: normal; font-size: 11px; color: #8e98a8; }
.s-ic { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(251,154,98,.14); color: #fb9a62; }
.s-ic svg { width: 15px; height: 15px; }
.k-in .s-ic { background: rgba(52,211,153,.14); color: #34d399; }
.k-alert .s-ic { background: rgba(251,191,36,.14); color: #fbbf24; }
.k-pr .s-ic, .k-report .s-ic { background: rgba(147,197,253,.14); color: #93c5fd; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.s-toast { position: absolute; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 7px; white-space: nowrap; padding: 5px 10px 5px 5px; border-radius: 999px;
  background: #fff; color: var(--ink); font-size: 11.5px; font-weight: 700; box-shadow: 0 12px 28px -12px rgba(29,37,49,.45); border: 1px solid var(--line); animation: toastIn .45s cubic-bezier(.2,1.4,.4,1); transition: opacity .5s, transform .5s; }
.s-toast.out { opacity: 0; transform: translate(-50%, calc(-100% - 12px)); }
.s-check { width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-size: 10px; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -60%) scale(.8); } to { opacity: 1; transform: translate(-50%, -100%) scale(1); } }
.scene.is-phone .s-toast { font-size: 11px; padding: 4px 9px 4px 4px; gap: 5px; }
.scene.is-phone .s-more { display: none; }
.scene.is-phone .s-check { width: 15px; height: 15px; font-size: 9px; }

/* Sites strip (below 1180 px): one small header line and a light card per site, planned against done; swipe on phones,
   three across on tablets. Tapping a card lights the site in the scene; news scrolls its card into view (ui.js) */
.sites { z-index: 2; width: min(900px, 100%); margin: 6px auto 0; color: var(--muted); }
.sites-h { display: flex; align-items: center; gap: 8px; padding: 0 20px 8px; font-size: 11.5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sites-h > b { color: var(--ink); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sites-h > span:not(.s-live-dot) { margin-left: auto; overflow: hidden; text-overflow: ellipsis; }
.sites-h b.s-grn { color: var(--ink); }
.sites ul { list-style: none; margin: 0; padding: 2px 20px 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sites button { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; grid-template-areas: "dot name name" "bar bar bar" "num num pill";
  column-gap: 8px; row-gap: 8px; align-items: center; padding: 11px 12px 10px; border-radius: 14px; cursor: pointer; background: rgba(255,255,255,.95);
  border: 1px solid var(--line); box-shadow: 0 10px 24px -18px rgba(29,37,49,.45); transition: border-color .3s, box-shadow .3s; }
.sites button:focus-visible { outline: 2px solid var(--brick-300); outline-offset: 2px; }
.sites button.hot { border-color: rgba(194,65,12,.4); box-shadow: 0 0 0 3px rgba(194,65,12,.08), 0 10px 24px -18px rgba(29,37,49,.5); }
.sites .s-dot { grid-area: dot; }
.sites button b { grid-area: name; color: var(--ink); font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sites .s-pill { grid-area: pill; }
.sites .s-bar { grid-area: bar; }
.sites em { grid-area: num; font-style: normal; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero.is-night .sites-h > b, .hero.is-night .sites-h b.s-grn { color: #fff; }
@media (min-width: 1180px) { .sites { display: none; } }

@media (max-width: 699px) {
  /* one screen: the scene is the hero's whole background, the headline on top, the Sites strip floating at the foot */
  .hero { height: 100vh; height: 100svh; min-height: 600px; max-height: 960px; padding: 92px 0 0; }
  .hero .scene { position: absolute; inset: 0; margin: 0; }
  .hero .sites { position: absolute; left: 0; right: 0; bottom: 0; width: auto; margin: 0; padding-top: 36px; background: linear-gradient(to bottom, rgba(251,248,244,0), var(--paper) 44px); }
  .hero-copy .eyebrow { display: none; }
  .hero h1 { font-size: clamp(40px, 12.2vw, 54px); }
  .hero-sub { display: none; }
  .sites ul { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 20px;
    scrollbar-width: none; overscroll-behavior-x: contain; }
  .sites ul::-webkit-scrollbar { display: none; }
  .sites li { scroll-snap-align: start; }
}
