/* ==========================================================================
   COMPONENTS — buttons, cards, stats, tabs, 3D stage, forms, marquee
   ========================================================================== */

/* ---------------- buttons ---------------- */
.btn {
  --bg: var(--bone); --fg: var(--deep);
  position: relative; display: inline-flex; align-items: center; gap: 14px;
  height: 50px; padding: 0 22px; background: var(--bg); color: var(--fg); isolation: isolate; overflow: hidden;
  font-family: var(--f-mono); font-size: var(--t-mono); font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  transition: color var(--d-mid) var(--e-out);
}
.btn::before { content: ""; position: absolute; inset: 0; background: var(--ember); transform: translateY(101%); transition: transform var(--d-mid) var(--e-out); z-index: -1; }
.btn:hover::before { transform: none; }
.btn:hover { color: var(--accent-ink); }
.btn i { font-style: normal; transition: transform var(--d-mid) var(--e-out); }
.btn:hover i { transform: translateX(5px); }
.btn--ghost { --bg: transparent; --fg: var(--bone); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--ember); }
.btn--ember { --bg: var(--ember); --fg: var(--accent-ink); }
.btn--ember::before { background: var(--bone); }
.btn--ember:hover { color: var(--deep); }
.btn--sm { height: 42px; padding: 0 16px; }

.alink { display: inline-flex; align-items: center; gap: 11px; font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--bone); padding-bottom: 6px; border-bottom: 1px solid var(--line-2); transition: border-color var(--d-fast), color var(--d-fast); }
.alink i { font-style: normal; transition: transform var(--d-mid) var(--e-out); }
.alink:hover { color: var(--ember); border-color: var(--ember); }
.alink:hover i { transform: translate(4px, -4px); }

/* ---------------- eyebrow ---------------- */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; color: var(--bone-3); margin: 0 0 24px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--ember); flex: none; }

/* ---------------- card (sharp, hairline, corner ticks) ---------------- */
.card { position: relative; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: clamp(22px, 2.2vw, 34px); transition: background var(--d-mid), box-shadow var(--d-mid), transform var(--d-mid) var(--e-out); }
.card:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.card--tick::before, .card--tick::after { content: ""; position: absolute; width: 11px; height: 11px; border: 1px solid var(--line-2); transition: border-color var(--d-mid); }
.card--tick::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.card--tick::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.card--tick:hover::before, .card--tick:hover::after { border-color: var(--ember); }

/* ---------------- capability / programme tiles ---------------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.tile { position: relative; background: var(--void); padding: clamp(26px, 3vw, 46px); min-height: 400px; display: flex; flex-direction: column; overflow: hidden; isolation: isolate; transition: background var(--d-slow) var(--e-out); }
.tile::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 100% at 0% 100%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%); opacity: 0; transition: opacity var(--d-slow); z-index: -1; }
.tile:hover { background: var(--surface); } .tile:hover::after { opacity: 1; }
.tile__top { display: flex; justify-content: space-between; gap: 16px; color: var(--bone-3); }
.tile__letter { font: var(--w-display) clamp(80px, 9vw, 150px)/.78 var(--f-display); color: transparent; -webkit-text-stroke: 1.5px var(--line-2); margin-top: auto; transition: -webkit-text-stroke-color var(--d-slow); }
.tile:hover .tile__letter { -webkit-text-stroke-color: var(--ember); }
.tile h3 { margin: 20px 0 12px; max-width: 18ch; }
.tile p { color: var(--bone-2); max-width: 44ch; }
.tile__go { position: absolute; right: clamp(26px, 3vw, 46px); bottom: clamp(26px, 3vw, 46px); width: 50px; height: 50px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 18px; transition: background var(--d-mid), box-shadow var(--d-mid), transform var(--d-mid) var(--e-out); }
.tile:hover .tile__go { background: var(--ember); box-shadow: none; color: var(--accent-ink); transform: rotate(-45deg); }
.tile__art { position: absolute; right: -2%; top: 14%; width: min(230px, 40%); aspect-ratio: 1; z-index: -1; color: var(--bone-4); transition: color var(--d-slow); }
.tile:hover .tile__art { color: var(--bone-3); }
@media (max-width: 900px) { .tiles { grid-template-columns: 1fr; } .tile { min-height: 340px; } }

/* line-art inside tiles */
.la { fill: none; stroke: currentColor; stroke-width: 1.2; }
.la-em { stroke: var(--ember); }
.la-dash { stroke-dasharray: 3 5; animation: dash 3.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -32; } }
.la-spin { transform-box: fill-box; transform-origin: center; animation: spin 7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.la-pulse { transform-box: fill-box; transform-origin: center; animation: lpulse 2.6s ease-out infinite; }
@keyframes lpulse { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }

/* ---------------- metrics ---------------- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--bone-4); }
.metric { padding: 30px 30px 0 0; border-right: 1px solid var(--line); }
.metric + .metric { padding-left: 30px; }
.metric:last-child { border-right: 0; }
.metric__k { color: var(--bone-3); }
.metric__v { font: var(--w-display) clamp(38px, 3.6vw, 60px)/.95 var(--f-display); letter-spacing: var(--track-display); margin: 34px 0 14px; white-space: nowrap; }
.metric__n { color: var(--bone-2); font-size: 14.5px; line-height: 1.45; margin-bottom: 22px; max-width: 28ch; }
.metric__bar { height: 2px; background: var(--line-2); position: relative; overflow: hidden; }
.metric__bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--bone); transition: width 1.5s var(--e-out) .15s; }
.metric__bar i::after { content: ""; position: absolute; right: 0; top: -2px; width: 2px; height: 6px; background: var(--ember); }
.is-in .metric__bar i { width: var(--w); }
@media (max-width: 1000px) { .metrics { grid-template-columns: 1fr 1fr; } .metric:nth-child(2) { border-right: 0; } .metric:nth-child(3) { padding-left: 0; } .metric:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 24px; } }
@media (max-width: 560px) { .metrics { grid-template-columns: 1fr; } .metric, .metric + .metric { padding-left: 0; border-right: 0; } .metric + .metric { border-top: 1px solid var(--line); margin-top: 24px; } }

/* ---------------- numbered list / steps ---------------- */
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--bone-4); }
.steps li { display: grid; grid-template-columns: 76px 1fr auto; gap: 24px; align-items: start; padding: 26px 0; border-bottom: 1px solid var(--line); transition: padding-left var(--d-mid) var(--e-out), background var(--d-mid); }
.steps li:hover { padding-left: 16px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 5%, transparent), transparent 40%); }
.steps .mono { color: var(--bone-3); padding-top: 5px; }
.steps h4 { margin-bottom: 8px; }
.steps p { color: var(--bone-2); max-width: 56ch; }
.steps li:hover .mono { color: var(--ember); }

/* ---------------- marquee ribbon ---------------- */
.ribbon { overflow: hidden; border-block: 1px solid var(--line); background: var(--deep); position: relative; }
.ribbon__track { display: flex; width: max-content; animation: mq var(--sp, 48s) linear infinite; }
.ribbon span { display: inline-flex; align-items: center; gap: 13px; padding: 15px 32px; white-space: nowrap; border-right: 1px solid var(--line); color: var(--bone-2); }
.ribbon span b { color: var(--ember); font-weight: 500; }
.ribbon--rev .ribbon__track { animation-direction: reverse; }
@keyframes mq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ribbon__track { animation: none; } }

/* ---------------- credentials (recognition) ----------------
   Every card has the same anatomy: index + status, a fixed-height logo bay,
   issuing body, title, one line of context. Logos are single-colour (bone)
   so seven different brand marks read as one considered set. */
.creds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.cred { background: var(--void); padding: 22px 26px 30px; min-height: 340px; position: relative; display: flex; flex-direction: column; overflow: hidden; transition: background var(--d-mid); }
.cred:hover { background: var(--surface); }
.cred::before { content: ""; position: absolute; left: 0; top: 0; height: 1px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--e-out); }
.cred:hover::before { transform: scaleX(1); }
.cred__top { display: flex; justify-content: space-between; align-items: center; font-size: 10px; letter-spacing: .16em; color: var(--bone-4); text-transform: uppercase; }
.cred__st { display: inline-flex; align-items: center; gap: 7px; color: var(--bone-2); }
.cred__st::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
/* logo bay: same height in every card, logo optically centred-left */
.cred__logo { position: relative; height: 120px; margin: 22px 0 26px; display: flex; align-items: center; border-block: 1px solid var(--line); }
.cred__logo img { height: var(--h, 72px); width: auto; max-width: 88%; object-fit: contain; opacity: .78; transition: opacity var(--d-mid), transform .6s var(--e-out); }
.cred:hover .cred__logo img { opacity: 1; transform: scale(1.03); }
/* scan line that passes over the logo on hover */
.cred__logo::after { content: ""; position: absolute; top: 0; bottom: 0; width: 38%; left: -60%; opacity: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bone) 8%, transparent), transparent); pointer-events: none; }
.cred:hover .cred__logo::after { animation: credScan 1.1s var(--e-soft); }
@keyframes credScan { from { opacity: 1; left: -40%; } to { opacity: 1; left: 105%; } }
/* type plate — used when an organisation's logo file is not in the folder */
.cred__word { display: none; font: 300 34px/1 var(--f-display); letter-spacing: .16em; color: var(--bone-2); text-transform: uppercase; padding: 14px 18px; box-shadow: inset 0 0 0 1px var(--line-2); }
.cred__word small { display: block; margin-top: 8px; font: 400 9px/1 var(--f-mono); letter-spacing: .2em; color: var(--bone-3); }
.cred__logo.is-word img { display: none; }
.cred__logo.is-word .cred__word { display: inline-block; }
.cred__org { color: var(--bone-3); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; }
.cred h4 { margin-top: 10px; }
.cred__txt { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--bone-2); }
/* 8th tile: verification on request (fills the grid, links to contact) */
.cred--cta { color: inherit; }
.cred__seal { width: 76px; height: 76px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); position: relative; }
.cred__seal::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; border: 1px dashed var(--bone-4); animation: sealSpin 24s linear infinite; }
.cred__seal::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 11px; border: solid var(--accent); border-width: 0 0 1.5px 1.5px; transform: translate(-50%, -70%) rotate(-45deg); }
@keyframes sealSpin { to { transform: rotate(360deg); } }
@media (max-width: 1000px) { .creds { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .creds { grid-template-columns: 1fr; } .cred { min-height: 0; } .cred__logo { height: 104px; } }

/* ---------------- 3D stage + labels ---------------- */
.stage { position: relative; overflow: hidden;
  background:
    radial-gradient(75% 55% at 50% 60%, color-mix(in srgb, var(--data) 11%, transparent), transparent 62%),
    radial-gradient(55% 40% at 62% 30%, color-mix(in srgb, var(--accent) 5.5%, transparent), transparent 65%),
    linear-gradient(to bottom, var(--deep), var(--deep) 70%); }
.stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse 95% 80% at 50% 50%, transparent 52%, rgba(0,0,0,.55) 100%); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage__labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.gl-label { position: absolute; left: 0; top: 0; white-space: nowrap; font-family: var(--f-mono); font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--bone); transition: opacity var(--d-mid); }
.gl-label > span { display: inline-flex; align-items: center; gap: 7px; transform: translate(11px, -50%); padding: 5px 8px; background: color-mix(in srgb, var(--deep) 76%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--data) 40%, transparent); backdrop-filter: blur(4px); color: var(--bone); }
.gl-label::before { content: ""; position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border: 1px solid var(--steel); background: var(--deep); box-shadow: 0 0 7px color-mix(in srgb, var(--data) 80%, transparent); }
.gl-label.sig > span { background: var(--ember); color: var(--accent-ink); box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 55%, transparent); }
.gl-label.sig::before { border-color: var(--ember); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 90%, transparent); }
.gl-label.ink > span { background: var(--bone); color: var(--deep); box-shadow: none; }
.gl-label.ok > span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--nvg); box-shadow: 0 0 6px var(--nvg); }
.gl-label.left > span { transform: translate(calc(-100% - 11px), -50%); }
.stage__hud { position: absolute; z-index: 3; left: clamp(18px, 2vw, 34px); right: clamp(18px, 2vw, 34px); top: 18px; display: flex; justify-content: space-between; gap: 16px; color: var(--bone-3); pointer-events: none; }
.stage__live { display: inline-flex; align-items: center; gap: 8px; color: var(--bone-2); }
.stage__live i { width: 6px; height: 6px; border-radius: 50%; background: var(--ember); animation: blink 1.3s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.stage__ret { position: absolute; inset: 14px; pointer-events: none; z-index: 2; }
.stage__ret::before, .stage__ret::after { content: ""; position: absolute; width: 20px; height: 20px; border: 1px solid var(--line-2); }
.stage__ret::before { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.stage__ret::after { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.stage__fallback { display: none; position: absolute; inset: 0; place-items: center; color: var(--bone-3); text-align: center; padding: 24px; }
.no-gl .stage__fallback { display: grid; }

/* ---------------- chapter strip under a scene ---------------- */
.chapters { position: absolute; z-index: 4; left: clamp(18px, 2vw, 34px); right: clamp(18px, 2vw, 34px); bottom: 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; list-style: none; margin: 0; padding: 0; }
.chapter { position: relative; width: 100%; text-align: left; padding: 13px 15px 16px; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px var(--line); height: 100%; overflow: hidden; transition: background var(--d-mid), box-shadow var(--d-mid); }
.chapter .mono { color: var(--bone-3); font-size: 10px; }
.chapter b { display: block; margin: 7px 0 5px; font: var(--w-heading) 17px/1.1 var(--f-display); text-transform: uppercase; letter-spacing: var(--track-display); }
.chapter p { font-size: 12.5px; line-height: 1.42; color: var(--bone-2); }
.chapter__bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--ember); transform: scaleX(0); transform-origin: left; }
.chapter[aria-pressed="true"] { background: var(--bone); box-shadow: none; color: var(--deep); }
.chapter[aria-pressed="true"] .mono { color: var(--ember); }
.chapter[aria-pressed="true"] p { color: var(--bone-4); }
.chapter:hover:not([aria-pressed="true"]) { box-shadow: inset 0 0 0 1px var(--line-2); background: color-mix(in srgb, var(--surface-2) 92%, transparent); }

/* ---------------- tab bar ---------------- */
.ptabs-wrap { position: sticky; top: var(--nav-h); z-index: 50; background: color-mix(in srgb, var(--void) 86%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-block: 1px solid var(--line); transition: top var(--d-mid) var(--e-out); }
.site-nav.is-away ~ main .ptabs-wrap { top: 0; }
.ptabs { display: grid; grid-template-columns: repeat(4, 1fr); }
.ptab { position: relative; display: flex; align-items: center; gap: 14px; text-align: left; padding: 15px 18px; border-right: 1px solid var(--line); transition: background var(--d-mid), color var(--d-mid); }
.ptab:first-child { border-left: 1px solid var(--line); }
.ptab__l { font: var(--w-display) 36px/.8 var(--f-display); color: transparent; -webkit-text-stroke: 1.2px var(--bone-4); flex: none; transition: -webkit-text-stroke-color var(--d-mid); }
.ptab__t .mono { display: block; color: var(--bone-3); font-size: 9.5px; margin-bottom: 5px; }
.ptab__t b { font: var(--w-heading) 16px/1 var(--f-display); text-transform: uppercase; }
.ptab__bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ember); transform: scaleX(0); transform-origin: left; transition: transform var(--d-mid) var(--e-out); }
.ptab:hover { background: var(--surface); }
.ptab[aria-selected="true"] { background: var(--surface-2); }
.ptab[aria-selected="true"] .ptab__l { -webkit-text-stroke-color: var(--ember); }
.ptab[aria-selected="true"] .ptab__bar { transform: none; }
@media (max-width: 980px) {
  .ptabs { grid-template-columns: repeat(4, minmax(168px, 1fr)); overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gut)); }
  .ptabs::-webkit-scrollbar { display: none; }
  .ptab__t .mono { display: none; }
  .ptab__l { font-size: 28px; }
}

/* ---------------- forms ---------------- */
.form { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: clamp(24px, 3vw, 42px); display: grid; gap: 2px; }
.form__head { display: flex; justify-content: space-between; color: var(--bone-3); padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.form__head span:last-child { color: var(--nvg); }
.form label { display: block; padding-top: 16px; }
.form label > span { display: block; color: var(--bone-3); margin-bottom: 7px; }
.form input, .form select, .form textarea {
  width: 100%; font: 400 16px/1.4 var(--f-body); color: var(--bone); background: transparent;
  border: 0; border-bottom: 1px solid var(--line-2); padding: 10px 0 12px; border-radius: 0; appearance: none; -webkit-appearance: none;
  transition: border-color var(--d-fast);
}
.form select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a4a69f' stroke-width='1.5'/%3E%3C/svg%3E") right 2px center no-repeat; }
.form select option { background: var(--surface-2); color: var(--bone); }
.form textarea { resize: vertical; min-height: 112px; }
.form :is(input, select, textarea):focus { outline: none; border-color: var(--ember); }
.form .is-bad { border-color: var(--ember); }
.form .btn { margin-top: 28px; justify-self: start; }
.form__status { min-height: 20px; margin-top: 14px; color: var(--nvg); }
.form__status.err { color: var(--ember); }

/* ---------------- contact list ---------------- */
.clist { list-style: none; margin: 36px 0 0; padding: 0; border-top: 1px solid var(--bone-4); }
.clist li { display: grid; grid-template-columns: 112px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.clist .mono { color: var(--bone-3); }
.clist a { font-size: clamp(17px, 1.5vw, 22px); font-weight: 500; transition: color var(--d-fast); word-break: break-word; }
.clist a:hover { color: var(--ember); }

/* ---------------- ghost section index (big outline numeral) ------------- */
.ghost-idx { position: absolute; right: var(--gut); top: clamp(30px, 4vw, 70px); z-index: 0; pointer-events: none;
  font: var(--w-display) clamp(140px, 20vw, 340px)/.76 var(--f-display); color: transparent; -webkit-text-stroke: 1px var(--line-3); user-select: none; }
.sec > .wrap { position: relative; z-index: 1; }

/* ---------------- signal diagram (inline SVG, animated) ---------------- */
.diagram { width: 100%; height: auto; overflow: visible; }
.diagram .dg-line { fill: none; stroke: var(--line-2); stroke-width: 1.4; }
.diagram .dg-dash { fill: none; stroke: var(--bone-4); stroke-width: 1.4; stroke-dasharray: 5 7; }
.diagram .dg-live { fill: none; stroke: var(--ember); stroke-width: 2; filter: drop-shadow(0 0 7px color-mix(in srgb, var(--accent) 85%, transparent)); stroke-dasharray: var(--len, 1200); stroke-dashoffset: var(--len, 1200); }
.is-in .diagram .dg-live { animation: dgDraw 2.6s var(--e-out) .35s forwards; }
@keyframes dgDraw { to { stroke-dashoffset: 0; } }
.diagram .dg-node { fill: var(--void); stroke: var(--line-2); stroke-width: 1.4; }
.diagram .dg-node-on { fill: var(--void); stroke: var(--ember); stroke-width: 1.6; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 80%, transparent)); opacity: 0; }
.is-in .diagram .dg-node-on { animation: dgPop .5s var(--e-out) forwards; animation-delay: calc(.6s + var(--n) * .42s); }
@keyframes dgPop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
.diagram .dg-node-on { transform-box: fill-box; transform-origin: center; }
.diagram .dg-x { fill: var(--ember); font: 500 13px var(--f-mono); }
.is-in .diagram .dg-x { animation: blink 1.5s steps(2) infinite; }
.diagram .dg-t { fill: var(--bone-3); font: 500 10px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
.diagram .dg-t-on { fill: var(--bone); }
.diagram .dg-pulse { fill: var(--ember); opacity: 0; }
.is-in .diagram .dg-pulse { animation: dgRun 3.4s linear 1.2s infinite; }
@keyframes dgRun { 0% { opacity: 0; } 6% { opacity: 1; } 94% { opacity: 1; } 100% { opacity: 0; } }

/* ---------------- sparkline bars under a metric ---------------- */
.spark { display: flex; align-items: flex-end; gap: 4px; height: 46px; margin: 0 0 18px; }
.spark i { flex: 1; background: var(--line-2); height: 0; transition: height .9s var(--e-out); transition-delay: calc(var(--n) * .07s); }
.spark i:last-child { background: var(--ember); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 55%, transparent); }
.is-in .spark i { height: var(--h); }

/* ---------------- glow helpers ---------------- */
.glow-em { text-shadow: 0 0 28px color-mix(in srgb, var(--accent) 35%, transparent); }
.hair { height: 1px; background: linear-gradient(90deg, transparent, var(--line-2) 18%, var(--line-2) 82%, transparent); }

/* ---------------- index list (names only — used on the landing page) ---- */
.index-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--bone-4); }
.index-list a { position: relative; display: grid; grid-template-columns: 110px 1fr auto; gap: 28px; align-items: center;
  padding: clamp(22px, 2.4vw, 36px) 0; border-bottom: 1px solid var(--line); overflow: hidden; isolation: isolate;
  transition: padding-left var(--d-mid) var(--e-out); }
.index-list a::before { content: ""; position: absolute; inset: 0 calc(-1 * var(--gut)); z-index: -1;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 42%); opacity: 0; transition: opacity var(--d-mid); }
.index-list a:hover { padding-left: 18px; }
.index-list a:hover::before { opacity: 1; }
.index-list__l { font: var(--w-display) clamp(44px, 4.6vw, 76px)/.8 var(--f-display); color: transparent; -webkit-text-stroke: 1.3px var(--bone-4); transition: -webkit-text-stroke-color var(--d-mid); }
.index-list a:hover .index-list__l { -webkit-text-stroke-color: var(--ember); }
.index-list__t b { display: block; font: var(--w-heading) clamp(24px, 2.6vw, 40px)/1 var(--f-display); text-transform: uppercase; letter-spacing: var(--track-display); }
.index-list__t em { display: block; margin-top: 10px; font-style: normal; color: var(--bone-3); }
.index-list__go { font-size: 20px; color: var(--bone-4); transition: color var(--d-fast), transform var(--d-mid) var(--e-out); }
.index-list a:hover .index-list__go { color: var(--ember); transform: translateX(6px); }
@media (max-width: 680px) { .index-list a { grid-template-columns: 64px 1fr auto; gap: 18px; } }

/* ---------------- plain logo row ---------------- */
.logo-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.logo-cell { background: var(--deep); aspect-ratio: 1.55; display: grid; place-items: center; padding: 18px; transition: background var(--d-mid); }
.logo-cell:hover { background: var(--surface); }
.logo-cell img { max-height: 46px; max-width: 86%; width: auto; object-fit: contain; filter: grayscale(1) brightness(2.2) contrast(.8); opacity: .62; transition: filter var(--d-mid), opacity var(--d-mid); }
.logo-cell:hover img { filter: grayscale(0) brightness(1.05); opacity: 1; }
.logo-cell b { font: var(--w-heading) 14px/1.2 var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--bone-3); text-align: center; }
.logo-cell img + b { display: none; }
@media (max-width: 900px) { .logo-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .logo-row { grid-template-columns: repeat(2, 1fr); } }

/* ---------------- sparse hero variant ---------------- */
.hero--clean .hero__copy { top: auto; bottom: clamp(160px, 21vh, 250px); }
.hero--clean .display { font-size: clamp(56px, 8vw, 150px); }
.hero--clean .lede { font-size: clamp(17px, 1.45vw, 23px); max-width: 24ch; }
.hero--clean .stage__hud { top: calc(var(--nav-h) + 18px); }
.hero--clean .deck__t b { font-size: 16px; }
.hero--clean .hero__scroll { top: auto; bottom: clamp(136px, 18vh, 230px); }
@media (max-width: 1100px) {
  .hero--clean .hero__copy { bottom: auto; }
  .hero--clean .display { font-size: clamp(46px, 13vw, 76px); }
}
/* the landing page keeps the environment cinematic — no sensor callouts on the hero */
.hero--clean .stage__labels { display: none; }

/* ==========================================================================
   HERO HEADLINE — per-line weight and colour
   The headline is split on <br /> by assets/js/motion.js, so wrap each line's
   text in one of these classes to control that line on its own.
   Weight can be 200, 300, 400 or 500 — the Barlow Semi Condensed weights
   loaded in the <head>. To use another, add it to the Google Fonts URL.
   ========================================================================== */
.hl-1 { font-weight: 300; color: var(--bone); }    /* line 1 — brightest */
.hl-2 { font-weight: 200; color: var(--bone-2); }  /* line 2 */
.hl-3 { font-weight: 200; color: var(--bone-2); }  /* line 3 */
.hl-4 { font-weight: 300; color: var(--ember); }   /* line 4 — the accent */

/* ==========================================================================
   v6 ADDITIONS — design cues carried over from the v4 site
   ========================================================================== */

/* ---------------- glass panel (frosted, hairline) ---------------- */
.glass {
  position: relative; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line), 0 30px 80px -40px rgba(0,0,0,.8);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.1); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.1);
  border-radius: var(--radius);
}

/* ---------------- "why now" statement ---------------- */
.whynow { margin: clamp(36px, 4vw, 60px) 0 0; padding: clamp(24px, 3vw, 44px); display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: start; }
.whynow .mono { color: var(--accent); padding-top: 6px; }
.whynow p { font: 500 clamp(19px, 1.6vw, 26px)/1.4 var(--f-body); color: var(--bone-2); max-width: 64ch; }
.whynow em { font-style: normal; color: var(--bone-3); }
.whynow strong { color: var(--bone); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
@media (max-width: 700px) { .whynow { grid-template-columns: 1fr; } }

/* ---------------- verification console ---------------- */
.console { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 16px 18px 12px; }
.console__head { display: flex; justify-content: space-between; color: var(--accent); padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px dashed color-mix(in srgb, var(--accent) 30%, transparent); }
.console__head span:first-child::after { content: "_"; animation: blink 1s steps(2) infinite; }
.console ol { list-style: none; margin: 0; padding: 0; }
.console li { display: flex; align-items: baseline; gap: 10px; padding: 6px 8px; margin: 0 -8px; color: var(--bone-3); border-radius: 2px; transition: background var(--d-mid), color var(--d-mid); }
.console li::before { content: ">"; color: var(--bone-4); }
.console li i { flex: 1; border-bottom: 1px dotted var(--line-2); transform: translateY(-3px); min-width: 14px; }
.console li b { font-weight: 500; color: var(--ok); opacity: 0; transition: opacity var(--d-mid); }
.console li.is-on { background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--bone); }
.console li.is-done { color: var(--bone-2); }
.console li.is-done b { opacity: 1; }
.console__foot { display: flex; justify-content: space-between; color: var(--bone-3); padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--line); }

/* ---------------- 3D callouts restyled as HUD tags (v4 "ZULU-01 · LOCKED") ---------------- */
.gl-label > span { border-left: 2px solid var(--data); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--data) 35%, transparent); background: color-mix(in srgb, var(--deep) 72%, transparent); color: var(--bone); }
.gl-label.sig > span { border-left-color: var(--accent-ink); }
.gl-label.ink > span { border-left-color: var(--accent); }

/* ---------------- boot mark ---------------- */
.boot__mark { width: 34px; height: 46px; margin-bottom: 26px; position: relative; overflow: hidden; }
.boot__mark svg { width: 100%; height: 100%; display: block; }
.boot__mark svg path { fill: var(--bone); }
.boot__mark::after { content: ""; position: absolute; left: -10%; right: -10%; height: 30%; top: -30%; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 80%, transparent), transparent); mix-blend-mode: screen; animation: bootScan 1.4s linear infinite; }
@keyframes bootScan { to { top: 110%; } }

/* ---------------- scheme preview dock (only with ?scheme= in the URL) ---------------- */
.scheme-dock { position: fixed; z-index: 95; left: 50%; bottom: 18px; translate: -50% 0; display: flex; gap: 6px; padding: 8px; }
.scheme-dock button { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--bone) 20%, transparent); }
.scheme-dock button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bone); }
.scheme-dock span { align-self: center; padding: 0 8px; color: var(--bone-3); }

/* ==========================================================================
   v7 · DEFENCE-GRADE REFINEMENT
   Quieter, thinner, more instrument-like. Removes the "gaming" cues:
   neon glows, CRT scanlines, giant outline numerals, chunky outline letters.
   Delete a rule here to bring the old effect back.
   ========================================================================== */

/* no glows anywhere — signal colour is flat, like a printed chart */
.rail i, .divider__rule::after, .spark i:last-child,
.gl-label.sig > span, .gl-label.sig::before, .gl-label::before, .gl-label.ok > span::before { box-shadow: none !important; }
.glow-em { text-shadow: none; }
.diagram .dg-live, .diagram .dg-node-on { filter: none; }

/* no scanlines; the background grid becomes a faint survey graticule */
.field__scan { display: none; }

/* big outline numerals off — section numbers stay in the divider */
.ghost-idx { display: none; }

/* index letters (A–D) as small mono designators instead of chunky outlines */
.deck__l, .ptab__l, .index-list__l {
  font: 400 12px/1 var(--f-mono) !important; letter-spacing: .1em; color: var(--bone-3) !important;
  -webkit-text-stroke: 0 !important; width: auto !important; padding: 5px 7px; box-shadow: inset 0 0 0 1px var(--line-2);
}
.index-list__l { justify-self: start; }
.deck__btn[aria-pressed="true"] .deck__l, .ptab[aria-selected="true"] .ptab__l, .index-list a:hover .index-list__l { color: var(--accent) !important; box-shadow: inset 0 0 0 1px var(--accent); }
.tile__letter, .chapter-mark b { -webkit-text-stroke-width: .8px; font-weight: 200; }
.foot-word { font-weight: 200; -webkit-text-stroke-width: .6px; }

/* type: thin and tracked */
.deck__t b { font-weight: 400; letter-spacing: .04em; line-height: 1.15; }
.index-list__t b, .stackx__list b, .chain__n b, .trio b, .stages b, .chapter b, .ptab__t b { font-weight: 400; letter-spacing: .02em; }
.statement { font-weight: 300; }
.metric__v { font-weight: 300; }
.brand__name { font-weight: 500; letter-spacing: .22em; }
.lede { font-weight: 300; }
.lede b, .lede strong { font-weight: 500; color: var(--bone); }
.eyebrow::before { width: 14px; height: 1px; }

/* buttons: hairline, rectangular, restrained */
.btn { height: 46px; padding: 0 20px; font-weight: 400; letter-spacing: .16em; }
.btn--ghost { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bone) 22%, transparent); }

/* 3D callouts: thin, square, instrument-panel */
.gl-label { font-weight: 400; letter-spacing: .12em; }
.gl-label > span { padding: 4px 8px; }

/* ---------------- HOME: Leh–Ladakh satellite underlay ----------------
   A fixed satellite image of the Leh–Ladakh sector sits behind every section
   below the hero. Section backgrounds are made translucent so it reads
   through. Image: assets/img/photos/leh-ladakh-satellite.jpg (replace with a
   higher-resolution file of the same name at any time).
   Strength: --sat-opacity · Section tint: --sat-veil                          */
:root { --sat-opacity: .75; --sat-veil: 62%; }
.sat-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.sat-bg__img { position: absolute; inset: -4%; background: url("../img/photos/leh-ladakh-satellite.jpg") center / cover no-repeat;
  opacity: var(--sat-opacity); filter: grayscale(.25) contrast(1.08) brightness(.9); will-change: transform; }
.sat-bg__grid { position: absolute; inset: 0;
  background-image: linear-gradient(to right, color-mix(in srgb, var(--bone) 6%, transparent) 1px, transparent 1px),
                    linear-gradient(to bottom, color-mix(in srgb, var(--bone) 6%, transparent) 1px, transparent 1px);
  background-size: 160px 160px; }
.sat-bg__vig { position: absolute; inset: 0; background: radial-gradient(ellipse 120% 90% at 50% 50%, transparent 40%, color-mix(in srgb, var(--deep) 85%, transparent) 100%); }
.sat-bg__tag { position: absolute; right: var(--gut); bottom: 22px; font: 400 20px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--bone-3); }
body[data-page="home"] .field { display: none; }
body[data-page="home"] main > .sec,
body[data-page="home"] main > section.sec { background: color-mix(in srgb, var(--void) var(--sat-veil), transparent) !important; }
body[data-page="home"] main > .sec.cta { background: color-mix(in srgb, var(--deep) 82%, transparent) !important; }
body[data-page="home"] .ribbon { background: color-mix(in srgb, var(--deep) 80%, transparent); }
body[data-page="home"] .cred, body[data-page="home"] .logo-cell { background: color-mix(in srgb, var(--void) 70%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
body[data-page="home"] .cred:hover { background: color-mix(in srgb, var(--surface) 86%, transparent); }
body[data-page="home"] .site-footer { background: color-mix(in srgb, var(--deep) 92%, transparent); }
body[data-page="home"] .hero { z-index: 1; }

/* ---------------- 3D canvas grade: a touch of film, not a game ---------------- */
.stage canvas { filter: contrast(1.04) saturate(.92); }
.stage::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------------- real footage in a stage + live HUD (data-video) ---------------- */
.stage__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; filter: contrast(1.04) saturate(.94); }
.stage.is-video canvas, .stage.is-video .stage__labels { display: none; }
.vhud { position: absolute; inset: clamp(14px, 2vw, 28px); z-index: 2; pointer-events: none; color: color-mix(in srgb, var(--bone) 82%, transparent); font-size: 10.5px; letter-spacing: .14em; }
.vhud__c { position: absolute; width: 22px; height: 22px; border: 1px solid color-mix(in srgb, var(--bone) 55%, transparent); }
.vhud__c--tl { left: 0; top: 0; border-right: 0; border-bottom: 0; } .vhud__c--tr { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.vhud__c--bl { left: 0; bottom: 0; border-right: 0; border-top: 0; } .vhud__c--br { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.vhud__ret { position: absolute; left: 62%; top: 46%; width: 64px; height: 64px; translate: -50% -50%; border: 1px solid color-mix(in srgb, var(--bone) 40%, transparent); }
.vhud__ret i { position: absolute; background: color-mix(in srgb, var(--bone) 55%, transparent); }
.vhud__ret i:first-child { left: 50%; top: -14px; bottom: -14px; width: 1px; } .vhud__ret i:last-child { top: 50%; left: -14px; right: -14px; height: 1px; }
.vhud__scan { position: absolute; left: 0; right: 0; height: 1px; top: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--data) 60%, transparent), transparent); animation: vscan 7s linear infinite; }
@keyframes vscan { to { top: 100%; } }
.vhud__tl, .vhud__tr, .vhud__br { position: absolute; display: grid; gap: 4px; }
/* readouts sit in the right-hand column, clear of the headline and the A–D bar */
.vhud__tl { right: 34px; top: calc(var(--nav-h) + 8px); text-align: right; } .vhud__tl b { font-weight: 500; color: var(--bone); }
.vhud__tr { right: 34px; top: calc(var(--nav-h) + 52px); text-align: right; }
.vhud__br { right: 34px; top: calc(var(--nav-h) + 118px); text-align: right; }
.hero .stage.is-video .stage__hud { display: none; }
@media (prefers-reduced-motion: reduce) { .vhud__scan { animation: none; display: none; } }
