/* Valour Performance: landing page + full-screen 3D project viewer.
   Built on valour-ui.css like the other Valour sites (same hero, sections, cards, buttons, footer).
   Unlike them it is ALWAYS dark (the tokens below override the light scheme), so the 3D scene reads like a studio. Class names are used by app.js: keep them.
   Note: grid tiles are positioned from getBoundingClientRect every frame by the 3D renderer,
   so tiles use colour / shadow changes on hover, never transforms. */
:root {
  --ground: #07090e; --panel: #141926; --panel-2: #1b2232; --line: rgba(255, 255, 255, .1);
  --text: #f5f5f7; --steel: #a1a6b3;
  --red: #d9253f; --red-hi: #ff5a70;
  --glass: rgba(22, 27, 40, .68);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: var(--font); --body: var(--font);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: linear(0, 0.0298, 0.1016, 0.1953, 0.2972, 0.3986, 0.4941, 0.5806, 0.6569, 0.7227, 0.7785, 0.8249, 0.8631, 0.8941, 0.919, 0.9388, 0.9543, 0.9664, 0.9756, 0.9827, 0.9879, 0.9918, 0.9947, 0.9967, 0.9982, 0.9992, 0.9998, 1.0002, 1.0005, 1.0006, 1.0006, 1.0006, 1.0006, 1.0005, 1);
  --gutter: clamp(16px, 4vw, 64px);
  --vb-accent: #ff5a70; --a-fill: #d9253f;
  color-scheme: dark;
  /* shared design-system tokens, pinned to dark (also in light mode) */
  --bg: #07090e; --bg-alt: #0d111a; --surface: var(--panel); --surface-2: var(--panel-2);
  --fill: rgba(255, 255, 255, .08); --fill-2: rgba(255, 255, 255, .13);
  --text-2: #a1a6b3; --text-3: #8e93a0;
  --a: #ff5a70; --a-ink: #fff;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 24px 60px -24px rgba(0, 0, 0, .8);
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { background: var(--ground); }
html[data-view=detail], html[data-view=detail] body { overflow: hidden; height: 100%; }
body { background: var(--ground); color: var(--text); font: 400 1.0625rem/1.5 var(--body); letter-spacing: -.011em; -webkit-font-smoothing: antialiased; font-optical-sizing: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; text-wrap: balance; }

/* glass: the shared look for floating chrome */
.glass-bg { background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); }

.top { position: fixed; inset: var(--vbar, 0px) 0 auto 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 14px var(--gutter); pointer-events: none; background: linear-gradient(180deg, rgba(7, 9, 14, .9), rgba(7, 9, 14, 0)); }
.top > * { pointer-events: auto; }
.brand { font: 700 1.25rem var(--display); letter-spacing: -.025em; text-decoration: none; }
.brand span { color: var(--red-hi); margin-left: .35em; font-weight: 500; }
.all { color: var(--text); text-decoration: none; font-size: .9375rem; font-weight: 500; background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: 0 0 0 1px var(--line) inset; padding: .5rem 1.1rem; border-radius: 999px; transition: background-color .2s, transform .4s var(--spring); }
.all:hover { background: rgba(60, 68, 92, .7); }
.all:active { transform: scale(.95); transition-duration: .07s; }
html[data-view=grid] .all, html[data-view=grid] .top { display: none; }

.btn { background: var(--red); color: #fff; border: 0; padding: 0 1.6rem; min-height: 3rem; border-radius: 999px; font-weight: 500; font-size: 1.0625rem; letter-spacing: -.011em; transition: filter .2s, transform .45s var(--spring); }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.955); transition-duration: .07s; }
.chip { flex: none; font-size: .8125rem; font-weight: 600; letter-spacing: 0; padding: .15rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .1); color: var(--steel); align-self: flex-start; white-space: nowrap; line-height: 1.6; }
.chip.fitted { background: rgba(48, 209, 88, .16); color: #5ee07f; }
.chip.wip { background: rgba(255, 90, 112, .16); color: #ff8b99; }

/* ---- landing page (hero, projects, what we do, footer come from valour-ui.css) ---- */
html[data-view=detail] #siteChrome { display: none; }
#siteChrome { position: relative; z-index: 1; }
.points { list-style: none; padding: 0; margin-top: clamp(2rem, 5vw, 3.5rem); display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); }
.points li { display: grid; gap: .35rem; padding-top: 1.1rem; border-top: 1px solid var(--line); align-content: start; }
.points b { font-size: 1.2rem; font-weight: 600; letter-spacing: -.017em; }
.points span { color: var(--text-2); }

/* ---- grid: project cards (same card look as the other sites; the 3D renderer draws each car into its .vp) ---- */
#gridView { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
html[data-view=detail] #gridView { display: none; }
.tile { display: block; text-decoration: none; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 0 0 1px var(--line) inset; transition: background-color .3s, box-shadow .3s; }
.tile:hover, .tile:focus-visible { background: var(--surface-2); box-shadow: 0 0 0 1px rgba(255, 255, 255, .22) inset, 0 24px 50px -24px rgba(217, 37, 63, .4); }
.tile:focus-visible { outline-offset: -3px; }
.vp { position: relative; aspect-ratio: 3 / 2; background: radial-gradient(ellipse at 50% 90%, #1d2a44 0, var(--panel) 72%); }
.vp.photo { background-size: cover; background-position: center; }
.ph { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; color: var(--steel); font-size: .95rem; padding: 0 1rem; }
.vp.empty { background: repeating-linear-gradient(135deg, #131a29 0 14px, var(--panel) 14px 28px); }
.pframe { position: absolute; right: var(--gutter); top: 96px; bottom: 112px; width: min(50vw, 900px); margin: 0; display: none; background: var(--panel); border-radius: 24px; box-shadow: 0 0 0 1px var(--line) inset; overflow: hidden; }
.pframe img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pframe figcaption { position: absolute; inset: 0; display: grid; place-items: center; color: var(--steel); text-align: center; padding: 1rem; background: repeating-linear-gradient(135deg, #131a29 0 14px, var(--panel) 14px 28px); }
.pframe figcaption:empty { display: none; }
.scene[data-has3d="0"] .pframe { display: block; }
.scene[data-has3d="0"][data-mode=inspect] .pframe { display: none; }
.meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.5rem 1.5rem; }
.meta h2 { font-weight: 700; font-size: clamp(1.4rem, 2.2vw, 1.65rem); letter-spacing: -.028em; line-height: 1.1; }
.meta p { color: var(--steel); margin-top: .2rem; font-size: .9375rem; }

/* ---- detail ---- */
#detailBg { position: fixed; inset: 0; z-index: 1; background: radial-gradient(ellipse at 50% 88%, #18233a 0, var(--ground) 66%); }
html[data-view=grid] #detailBg { display: none; }
#stage { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
#stage canvas { display: block; width: 100%; height: 100%; }
html[data-view=detail] #stage { pointer-events: auto; }
html[data-view=detail] #stage canvas { touch-action: none; cursor: grab; }
html[data-view=detail] #stage canvas:active { cursor: grabbing; }
.scene { position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
html[data-view=grid] .scene { display: none; }
.scene button, .scene .card, .pick { pointer-events: auto; }
#leaders, #callouts { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#leaders path { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 1; }
#leaders circle { fill: var(--ground); stroke: var(--red-hi); stroke-width: 2; }
#leaders .dim { opacity: .25; }
#leaders { opacity: 0; transition: opacity .5s var(--ease); }
.scene[data-mode=inspect] #leaders { opacity: 1; }

.intro { position: absolute; left: var(--gutter); top: clamp(88px, 14vh, 150px); max-width: min(560px, 90vw); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.intro h1 { font-weight: 700; font-size: clamp(3rem, 9vw, 7rem); letter-spacing: -.045em; line-height: .98; }
.intro p { margin: 1rem 0 0; color: #d4d7de; font-size: 1.125rem; line-height: 1.45; }
.intro .car { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; color: var(--steel); font-size: 1.125rem; }
.intro ul { list-style: none; padding: 0; margin: 1.1rem 0 0; color: #d4d7de; display: grid; gap: .4rem; }
.intro li { padding-left: 1.2rem; position: relative; }
.intro li::before { content: ""; position: absolute; left: 0; top: .6em; width: .45rem; height: .45rem; border-radius: 50%; background: var(--red-hi); }
.intro .btn { margin-top: 1.6rem; }
.scene[data-mode=inspect] .intro { opacity: 0; transform: translateY(-12px); pointer-events: none; }
.scene[data-mode=inspect] .intro .btn { pointer-events: none; }
.scene[data-build="0"] #open { display: none; }

.inspect-bar { position: absolute; left: var(--gutter); top: calc(var(--vbar, 52px) + 64px); display: flex; align-items: center; gap: 1rem; opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); }
.inspect-bar p { color: var(--steel); font-size: .9375rem; }
.back { background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border: 0; box-shadow: 0 0 0 1px var(--line) inset; padding: .5rem 1.1rem; border-radius: 999px; font-weight: 500; font-size: .9375rem; transition: background-color .2s, transform .4s var(--spring); }
.back:hover { background: rgba(60, 68, 92, .7); }
.back:active { transform: scale(.95); transition-duration: .07s; }
.scene[data-mode=inspect] .inspect-bar { opacity: 1; }
.scene:not([data-mode=inspect]) .back { pointer-events: none; }

.callout { position: absolute; width: 176px; text-align: left; background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); border: 0; box-shadow: 0 0 0 1px var(--line) inset; border-radius: 14px; padding: .5rem .8rem; font-weight: 500; font-size: .9375rem; line-height: 1.25; opacity: 0; pointer-events: none; transition: opacity .5s var(--ease), background-color .2s; }
.scene[data-mode=inspect] .callout { opacity: 1; pointer-events: auto; }
.callout:hover, .callout.on { background: var(--red); box-shadow: none; }

.tag { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); padding: .4rem .9rem; background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); box-shadow: 0 0 0 1px var(--line) inset; border-radius: 999px; color: var(--text); font-size: .9375rem; white-space: nowrap; pointer-events: none; transition: opacity .3s; }
.tag::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 16px; background: rgba(255, 255, 255, .45); }
.scene[data-mode=inspect] .tag { opacity: 0; }

.card { position: absolute; right: var(--gutter); bottom: clamp(20px, 5vh, 56px); width: min(380px, calc(100% - 2 * var(--gutter))); background: rgba(22, 27, 40, .82); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%); box-shadow: 0 0 0 1px var(--line) inset, 0 30px 70px -20px rgba(0, 0, 0, .7); border-radius: 24px; padding: 1.3rem 1.4rem 1.4rem; z-index: 6; }
.card:not([hidden]) { animation: card-in .55s var(--ease) backwards; }
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.card h2 { font-size: 1.75rem; letter-spacing: -.03em; margin-bottom: .9rem; font-weight: 700; padding-right: 3.5rem; }
.card ul { list-style: none; padding: 0; display: grid; gap: .1rem; }
.card li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.close { position: absolute; top: 1rem; right: 1.1rem; background: rgba(255, 255, 255, .1); border: 0; color: var(--text); font-size: .8125rem; font-weight: 500; padding: .3rem .8rem; border-radius: 999px; transition: background-color .2s, transform .4s var(--spring); }
.close:hover { background: rgba(255, 255, 255, .18); }
.close:active { transform: scale(.94); transition-duration: .07s; }

.picker { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; padding: 0 var(--gutter) 18px; overflow-x: auto; scrollbar-width: none; z-index: 4; pointer-events: none; }
.picker::-webkit-scrollbar { display: none; }
.pick { flex: 1 0 130px; max-width: 230px; text-align: left; background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border: 0; box-shadow: 0 0 0 1px var(--line) inset; border-radius: 18px; padding: .75rem 1rem .8rem; transition: background-color .2s, box-shadow .2s, transform .45s var(--spring); }
.pick:hover { background: rgba(48, 56, 80, .78); }
.pick:active { transform: scale(.965); transition-duration: .07s; }
.pick.on { background: rgba(255, 255, 255, .14); box-shadow: 0 0 0 1px rgba(255, 255, 255, .3) inset; }
.pick.on b::before { content: ""; display: inline-block; width: .45rem; height: .45rem; margin-right: .5rem; border-radius: 50%; background: var(--red-hi); vertical-align: .12em; }
.pick b { display: block; font: 650 1.2rem var(--display); letter-spacing: -.022em; line-height: 1.1; }
.pick span { color: var(--steel); font-size: .8125rem; }
.scene[data-mode=inspect] .picker { opacity: 0; }
.scene[data-mode=inspect] .pick { pointer-events: none; }
.nojs { position: fixed; top: 50%; left: var(--gutter); z-index: 20; }

@media (max-width: 1000px) { #gridView { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { #gridView { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .pframe { left: var(--gutter); width: auto; top: auto; height: 32vh; bottom: 84px; }
  .intro ul { display: none; }
  .callout { width: 112px; font-size: .78rem; padding: .35rem .55rem; border-radius: 10px; }
  .inspect-bar p { display: none; }
  .card { left: var(--gutter); right: var(--gutter); width: auto; max-height: 46vh; overflow: auto; }
  .pick { flex-basis: 100px; padding: .55rem .7rem; }
  .pick b { font-size: 1.05rem; }
  .pick span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .callout, .intro, #leaders { transition: opacity .2s; }
  .intro { transform: none !important; }
  .card:not([hidden]) { animation: none; }
  .btn:active, .pick:active, .back:active, .close:active, .all:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .all, .back, .callout, .tag, .card, .pick { background: var(--panel); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --line: rgba(255, 255, 255, .45); --steel: #d0d3da; }
}

.callout.part { cursor: default; font-size: .875rem; line-height: 1.25; box-shadow: 0 0 0 1px var(--line) inset, 3px 0 0 var(--steel) inset; border-radius: 12px; }
.callout.part:hover { background: var(--glass); box-shadow: 0 0 0 1px var(--line) inset, 3px 0 0 var(--steel) inset; }
.callout.part { cursor: pointer; pointer-events: auto; }
.callout.part.sel { background: rgba(10, 64, 100, .72); box-shadow: 0 0 0 1px rgba(56, 189, 248, .5) inset, 3px 0 0 #38bdf8 inset; }

.cat { grid-column: 1 / -1; margin: 1.25rem 0 .25rem; font: 650 1.35rem/1.1 var(--display); letter-spacing: -.025em; color: var(--text-2); }
.cat:first-child { margin-top: 0; }
.pframe img.art { object-fit: contain; background: var(--panel); }
.vp.art { background-size: cover; background-position: center; }

.scene[data-focus="1"] #back{display:inline-flex!important}
@media (min-width:761px){.scene.nb-tight .callout{width:150px}}
