/* Project covers: small coded scenes, one per project. Flat, token colours
   plus one project colour (--c). Sized in container units, so each scene
   scales with its card. The markup is the finished frame; covers.js plays
   the story that leads up to it, in a loop, while it is on screen. */

.cover {
  position: relative;
  container-type: inline-size;
  background: var(--chip);
  display: grid;
  place-items: center;
}
.cv {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 1.75cqw;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  /* Inside a cover, muted text is a touch darker so it clears AA on the grey ground. */
  --text-muted: color-mix(in srgb, var(--text) 68%, var(--surface));
}
/* Project-coloured text: deeper in light, lighter in dark, AA both ways.
   Declared on each coloured part so it uses that part's own --c. */
.cv-chip--c, .cv-ref, .cv-chip.is-repeat { --cv-fg: color-mix(in srgb, var(--c) 78%, var(--text)); }
:root[data-theme="dark"] :is(.cv-chip--c, .cv-ref, .cv-chip.is-repeat) { --cv-fg: color-mix(in srgb, var(--c) 45%, var(--text)); }
.cv b { font-weight: 600; }

/* Parts ------------------------------------------------------------------- */

.cv-win {
  position: relative;
  width: 52%;
  display: grid;
  gap: 0.75em;
  padding: 1.3em;
  border-radius: 0.7em;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.cv-win--wide { width: 74%; gap: 0.55em; }
.cv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  padding-bottom: 0.6em;
  border-bottom: 1px solid var(--border);
  font-size: 1.1em;
}
.cv-muted { color: var(--text-muted); font-size: 0.9em; }
.cv-label { color: var(--text-muted); font-size: 0.85em; }
.cv-field { display: flex; justify-content: space-between; gap: 1em; align-items: baseline; }
.cv-field--total { padding-top: 0.6em; border-top: 1px solid var(--border); font-size: 1.15em; }
.cv-val { display: inline-block; white-space: nowrap; }
.cv-btn {
  justify-self: end;
  padding: 0.45em 0.9em;
  border-radius: 0.4em;
  background: var(--c);
  color: #fff;
  font-weight: 600;
  font-size: 0.9em;
}
.cv-btn--ghost { background: none; color: var(--text); border: 1px solid var(--border); }
.cv-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.2em 0.55em;
  border-radius: 0.35em;
  background: var(--chip);
  color: var(--text-muted);
  font-size: 0.85em;
  font-weight: 600;
  white-space: nowrap;
}
.cv-chip--c {
  background: color-mix(in srgb, var(--c) 16%, var(--surface));
  color: var(--cv-fg);
}
.cv-ck { width: 1em; height: 1em; flex: none; }
.cv-wide { justify-content: center; width: 100%; padding-block: 0.5em; }

/* NGFT OPS: the offer-flow demo (home/covers/ngft-ops.html) plays in an iframe;
   this timer sits on top and drops from 2h 40m to 20m in step with it. */
.cv--overlay { position: absolute; inset: 0; pointer-events: none; }
.cv-timer {
  position: absolute;
  right: 6%;
  bottom: 9%;
  display: grid;
  gap: 0.2em;
  padding: 0.8em 1em;
  border-radius: 0.6em;
  background: var(--pill);
  color: var(--pill-text);
}
.cv-timer .cv-label { color: inherit; opacity: 0.7; }
.cv-timer b { font-size: 2em; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* NGFT AI Compliance: the live site's motion graphic (compliance-thumb.css/.js)
   on its light panel, with the NGFT chip. The SVG's viewBox is 16:9, so it fills. */
.mg-panel { position: relative; background: #E7E9E4; border-radius: 2px; }
.mg-panel .mg { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; }

/* NGFT Training: the live site's motion graphic (training-thumb.css/.js), same treatment */
.tr-panel { position: relative; background: #E7E9E4; border-radius: 2px; }
.tr-panel .tr { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; }

/* NGFT SMS: the live site's motion graphic (sms-thumb.css/.js), on its dark
   panel with the NGFT chip, as on talha.design. */
.sms-panel { position: relative; background: #14171A; border-radius: 2px; }
.sms-panel .sd { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; }
.sms-chip {
  position: absolute; left: 16px; top: 16px; z-index: 2;
  padding: 5px 9px; border-radius: 2px;
  background: #1D4ED8; color: #F2F3F0;
  font: 500 12px/16.8px "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.72px; text-transform: uppercase;
}

/* Rows with a code, text, verdict chip and page ref (NGFT Training uses them) */
.cv-row {
  display: grid;
  grid-template-columns: 5.5em 1fr auto 3em;
  gap: 0.8em;
  align-items: center;
  padding: 0.35em 0;
}
.cv-code { color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: 0.9em; }
.cv-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-ref { color: var(--cv-fg); font-weight: 600; font-size: 0.9em; text-align: right; }
.cv-chip[data-verdict] { justify-self: end; }

/* HX Insight: a product demo animation in an iframe (home/covers/hx-insight.html).
   The card link stays the click target. */
.cover--embed iframe { display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }

/* NGFT Training: outcomes fill in; sign-off only once there are no gaps */
.cv--tr .cv-row { grid-template-columns: 2em 1fr auto; }
.cv--tr .cv-chip[data-outcome] { min-width: 4.4em; justify-content: center; }
.cv-chip.is-repeat { --c: #df2026; background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--cv-fg); }

/* SnapGrid: job done, photos come in, one approved and rewarded, published */
.cv-phone {
  width: 32%;
  display: grid;
  gap: 0.7em;
  padding: 1.2em 1em;
  border-radius: 1.4em;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.cv-msg { color: var(--text-muted); font-size: 0.85em; }
.cv-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4em; }
.cv-photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: 0.4em;
  background: color-mix(in srgb, var(--c) 30%, var(--surface));
}
.cv-photo--b { background: color-mix(in srgb, var(--c) 55%, var(--surface)); }
.cv-photo--c { background: color-mix(in srgb, var(--c) 18%, var(--chip)); }
.cv-ok {
  position: absolute;
  right: -0.4em;
  top: -0.4em;
  display: grid;
  place-items: center;
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
}
.cv-ok .cv-ck { width: 0.9em; height: 0.9em; }
