/* ============================================================================
   QBIX LIMITED — EVOLUTION HOLDING PAGE · styles.css
   Styled to the QBIX Brand Style Guide: Open Sans, Orange / Deep Blue /
   Blue / Neutral / Grey, wireframe cubes, 3px-radius uppercase buttons.
   ========================================================================== */

/* ----------------------------------------------------------------------------
   1. DESIGN TOKENS  (edit me)
   The four venture palettes live in assets/js/config.js.
   The QBIX values below paint the page before JavaScript runs; config.js
   overrides them on load, so keep the two in sync.
   ------------------------------------------------------------------------- */
:root {
  /* QBIX Brand Style Guide palette */
  --qbix-orange:    #FF6600;   /* Orange  · C0 M74 Y100 K0 */
  --qbix-deep-blue: #06243C;   /* Deep Blue · C97 M80 Y48 K55 */
  --qbix-blue:      #33CCFF;   /* Blue    · C60 M0 Y0 K0 */
  --qbix-neutral:   #F2F2F2;   /* Neutral · C4 M2 Y2 K0 */
  --qbix-grey:      #808080;   /* Grey    · C0 M0 Y0 K60 */

  /* Roles */
  --qbix-bg:        var(--qbix-deep-blue);  /* page background */
  --qbix-bg-deep:   #0D3A5E;                /* background glow (lighter Deep Blue) */
  --qbix-primary:   var(--qbix-orange);
  --qbix-secondary: var(--qbix-blue);

  /* Live accents. app.js sets these to the active brand, and they morph smoothly */
  --accent:      var(--qbix-primary);
  --accent-2:    var(--qbix-secondary);
  --accent-text: var(--qbix-primary);   /* readable accent for text on dark */

  /* Text on dark */
  --text:       var(--qbix-neutral);
  --text-muted: rgba(242, 242, 242, .72);
  --text-faint: rgba(242, 242, 242, .48);

  /* Glass */
  --glass-bg:     rgba(255, 255, 255, .05);
  --glass-hi:     rgba(255, 255, 255, .085);
  --glass-tint:   rgba(6, 36, 60, .55);     /* Deep Blue tint */
  --glass-border: rgba(255, 255, 255, .11);
  --glass-blur:   22px;

  /* Typography: Open Sans per the style guide
     Main headers: ExtraBold, tracking -20 (-.02em), leading 1:1
     Body: Regular/SemiBold, tracking 0, leading 1:1.5
     Subtitles: SemiBold/ExtraBold ALL CAPS, tracking 100 (.1em) */
  --font: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --track-head: -.02em;
  --track-sub:  .1em;

  /* Shape & motion */
  --radius:     8px;     /* glass panels */
  --radius-btn: 3px;     /* buttons, matching qbix.digital */
  --gap:   clamp(12px, 1.6vw, 24px);
  --ease:  cubic-bezier(.16, 1, .3, 1);
  --morph: .9s;          /* brand colour cross-fade duration */
}

/* Registered so the brand colours can animate between values */
@property --accent   { syntax: '<color>'; inherits: true; initial-value: #FF6600; }
@property --accent-2 { syntax: '<color>'; inherits: true; initial-value: #33CCFF; }
@property --accent-text { syntax: '<color>'; inherits: true; initial-value: #FF6600; }
/* Where the four panels meet; moves so the hovered panel can grow */
@property --cx { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
@property --cy { syntax: '<percentage>'; inherits: true; initial-value: 50%; }

:root {
  transition:
    --accent var(--morph) var(--ease),
    --accent-2 var(--morph) var(--ease),
    --accent-text var(--morph) var(--ease);
}

/* ----------------------------------------------------------------------------
   2. BASE
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--qbix-bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-btn); }

/* Single-colour logos recoloured with a mask: colour = background */
.logo-mask {
  display: block;
  background: currentColor;
  -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain;
}
.logo-mask--hero { -webkit-mask-image: url(../img/qbix-logo.png); mask-image: url(../img/qbix-logo.png); aspect-ratio: 2001 / 1050; }
.logo-mask--mark { -webkit-mask-image: url(../img/qbix-mark.png); mask-image: url(../img/qbix-mark.png); aspect-ratio: 1001 / 991; }

/* ----------------------------------------------------------------------------
   3. AMBIENT BACKGROUND
   ------------------------------------------------------------------------- */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient__base {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 85% 65% at 50% 42%, var(--qbix-bg-deep), transparent 72%),
    radial-gradient(ellipse 140% 100% at 50% 50%, transparent 55%, rgba(1, 10, 18, .75)),
    var(--qbix-bg);
}
/* Glowing cube field (canvas, drawn by app.js) */
.ambient__field {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: .55;
  /* keep the field quiet behind the headline and the centre of the stage */
  -webkit-mask-image: radial-gradient(ellipse 62% 55% at 50% 38%, rgba(0,0,0,.18) 30%, #000 85%);
          mask-image: radial-gradient(ellipse 62% 55% at 50% 38%, rgba(0,0,0,.18) 30%, #000 85%);
}
.ambient__layer {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.1s var(--ease);
}
.ambient__layer.is-active { opacity: 1; }

.ambient__blob {
  position: absolute;
  width: 75vmax; height: 75vmax;
  border-radius: 50%;
  will-change: transform;
  animation: drift 28s ease-in-out infinite alternate;
}
.ambient__blob--a {
  top: -40vmax; left: -28vmax;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c1) 26%, transparent), transparent);
}
.ambient__blob--b {
  bottom: -44vmax; right: -32vmax;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c2) 20%, transparent), transparent);
  animation-duration: 34s; animation-delay: -9s;
}
.ambient__layer:not(.is-active) .ambient__blob { animation-play-state: paused; }

.ambient__motif {
  position: absolute; inset: 0;
  opacity: .1;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 0%, transparent 75%);
}
.ambient__layer[data-brand="qbix"] .ambient__motif { opacity: .05; }
.motif { width: 100%; height: 100%; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(8vmax, 6vmax, 0) scale(1.12); }
}

.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .05; 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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------------------------------
   4. LAYOUT SHELL (single viewport)
   ------------------------------------------------------------------------- */
.app {
  position: relative; z-index: 1;
  height: 100vh; height: 100dvh;
  max-width: 1600px; margin: 0 auto;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: clamp(10px, 2vh, 24px);
  padding:
    max(clamp(14px, 2.6vh, 28px), env(safe-area-inset-top))
    max(clamp(16px, 3.5vw, 48px), env(safe-area-inset-right))
    max(clamp(12px, 2.2vh, 24px), env(safe-area-inset-bottom))
    max(clamp(16px, 3.5vw, 48px), env(safe-area-inset-left));
}

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brandmark { display: inline-flex; align-items: center; color: #fff; }
.brandmark .logo-mask--hero { height: clamp(34px, 5vh, 50px); }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 10px;
  border-radius: var(--radius-btn);
  font-size: .7rem; font-weight: 700; letter-spacing: var(--track-sub); text-transform: uppercase;
  color: var(--text-muted);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.pill__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; } }

/* Hero copy */
.hero { text-align: center; max-width: 58rem; margin: 0 auto; }
.eyebrow {
  margin: 0 0 .55em;
  font-size: clamp(.8rem, .74rem + .25vw, .95rem); font-weight: 700;
  color: var(--accent-text);
}
.headline {
  margin: 0;
  font-weight: 800;
  font-size: clamp(1.5rem, .9rem + 2.2vw, 3rem);
  line-height: 1.05; letter-spacing: var(--track-head);
  color: #fff;
  text-wrap: balance;
}
.headline em { font-style: normal; color: var(--accent-text); }
/* Once unfolded, the headline steps back to give the cards more room */
@media (min-width: 641px) and (min-height: 541px) {
  .headline { transition: font-size .7s var(--ease); }
  body.is-open .headline { font-size: clamp(1.3rem, .8rem + 1.5vw, 2.3rem); }
}
.subline { margin: .7em 0 0; color: var(--text-muted); font-size: clamp(.9rem, .85rem + .2vw, 1.02rem); }
.subline__open { display: none; }
body.is-open .subline__intro { display: none; }
body.is-open .subline__open  { display: inline; animation: fadeUp .6s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }

/* Footer */
.footbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  font-size: .78rem; color: var(--text-faint);
}
.footbar p { margin: 0; }
.status {
  font-size: .7rem; font-weight: 700; letter-spacing: var(--track-sub); text-transform: uppercase;
  color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status b { color: var(--accent-text); font-weight: 800; }
.legal { text-align: center; }
.legal a { color: var(--text-muted); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent-text) 50%, transparent); transition: color .3s, border-color .3s; }
.legal a:hover { color: #fff; border-color: var(--accent-text); }
.replay {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: var(--radius-btn);
  font-size: .7rem; font-weight: 700; letter-spacing: var(--track-sub); text-transform: uppercase;
  color: var(--text-muted); background: transparent;
  border: 1px solid var(--glass-border);
  cursor: pointer; opacity: 0; visibility: hidden;
  transition: opacity .4s, visibility .4s, color .3s, border-color .3s;
}
.replay:hover { color: #fff; border-color: var(--accent); }
body.is-open .replay { opacity: 1; visibility: visible; }

/* ----------------------------------------------------------------------------
   5. STAGE · INTRO CUBE (wireframe, as in the QBIX logo)
   ------------------------------------------------------------------------- */
.stage {
  position: relative; min-height: 0;
  --cube: clamp(92px, 18vmin, 196px);
}

.cube-btn {
  position: absolute; inset: 0; margin: auto; z-index: 3;
  width: calc(var(--cube) * 2.1); height: calc(var(--cube) * 2.3);
  display: grid; place-items: center; grid-template-rows: 1fr auto auto;
  padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .45s var(--ease), visibility .45s;
}
.cube-btn:focus-visible { outline-offset: -4px; border-radius: 12px; }
.stage.is-open .cube-btn { opacity: 0; visibility: hidden; pointer-events: none; }

.cube-scene { perspective: 1100px; display: grid; place-items: center; width: 100%; height: 100%; }

.cube {
  --half: calc(var(--cube) / 2);
  --edge: max(3px, calc(var(--cube) * .034));   /* line weight, matched to the logo */
  --explode: 0;
  position: relative;
  width: var(--cube); height: var(--cube);
  transform-style: preserve-3d;
  will-change: transform;
}
.cube__face {
  position: absolute; inset: 0;
  border-radius: 2px;
  transform: var(--rot) translateZ(calc(var(--half) * (1 + var(--explode) * 1.8)));
  opacity: calc(1 - var(--explode) * .95);
  background: linear-gradient(150deg, rgba(255, 102, 0, .10), rgba(6, 36, 60, .25) 65%);
  border: var(--edge) solid var(--qbix-orange);
  box-shadow:
    0 0 calc(var(--cube) * .12) rgba(255, 102, 0, .35),
    inset 0 0 calc(var(--cube) * .12) rgba(255, 102, 0, .25);
  backface-visibility: visible;
}

/* Image intro mode (config: qbix.introMode = 'image') */
.cube--image { transform-style: flat; width: calc(var(--cube) * 2); height: calc(var(--cube) * 1.05); color: var(--qbix-orange); }
.cube--image .logo-mask {
  width: 100%; height: 100%;
  transform: scale(calc(1 + var(--explode) * .7));
  opacity: calc(1 - var(--explode));
  filter: drop-shadow(0 0 24px rgba(255, 102, 0, .45));
}

.cube-floor {
  width: calc(var(--cube) * 1.3); height: calc(var(--cube) * .16);
  margin-top: calc(var(--cube) * -.05);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 102, 0, .45), transparent);
  animation: floor 4s ease-in-out infinite;
}
@keyframes floor { 50% { transform: scaleX(.8); opacity: .6; } }

/* Auto-unfold countdown bar */
.cube-timer {
  width: 72px; height: 2px; margin-top: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
  opacity: 0; transition: opacity .3s;
}
.cube-timer::after {
  content: ''; display: block; height: 100%;
  background: var(--qbix-orange);
  transform-origin: left; transform: scaleX(0);
}
body.is-counting .cube-timer { opacity: 1; }
body.is-counting .cube-timer::after { animation: timer var(--auto-delay, 2800ms) linear forwards; }
@keyframes timer { to { transform: scaleX(1); } }

/* ----------------------------------------------------------------------------
   6. VENTURE PANELS (glass)
   ------------------------------------------------------------------------- */
/* The hovered panel grows (to --grow-x × --grow-y of the stage) so it has
   room for its summary and highlights; the hub follows the intersection. */
.stage {
  --cx: 50%; --cy: 50%;
  --grow-x: 60%; --grow-y: 67%;
  transition: --cx .6s var(--ease), --cy .6s var(--ease);
}
/* Shorter screens: the hovered card takes more height so its preview fits */
@media (max-height: 980px) { .stage { --grow-y: 73%; } }
.stage[data-active="tl"] { --cx: var(--grow-x);              --cy: var(--grow-y); }
.stage[data-active="tr"] { --cx: calc(100% - var(--grow-x)); --cy: var(--grow-y); }
.stage[data-active="bl"] { --cx: var(--grow-x);              --cy: calc(100% - var(--grow-y)); }
.stage[data-active="br"] { --cx: calc(100% - var(--grow-x)); --cy: calc(100% - var(--grow-y)); }

.grid {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: calc(var(--cx) - var(--gap) / 2) minmax(0, 1fr);
  grid-template-rows: calc(var(--cy) - var(--gap) / 2) minmax(0, 1fr);
  gap: var(--gap);
}
.stage:not(.is-open) .panel { opacity: 0; visibility: hidden; pointer-events: none; }

.panel {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 0;
  padding: clamp(18px, 2.2vw, 30px);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
  background: linear-gradient(155deg, var(--glass-hi), var(--glass-tint) 70%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(130%);
          backdrop-filter: blur(var(--glass-blur)) saturate(130%);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 24px 60px -28px rgba(0, 0, 0, .7),
    inset 0 1px 0 rgba(255, 255, 255, .08);
  transition:
    transform .6s var(--ease), opacity .5s var(--ease),
    border-color .5s var(--ease), box-shadow .6s var(--ease);
}
/* Gradient edge in the venture's colours */
.panel::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--p) 85%, transparent), transparent 40%, transparent 60%, color-mix(in srgb, var(--s) 70%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .3; transition: opacity .5s var(--ease);
}
/* Cursor-follow light */
.panel__light {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(480px circle at var(--mx, 70%) var(--my, 20%), color-mix(in srgb, var(--p) 22%, transparent), transparent 60%);
  opacity: 0; transition: opacity .5s var(--ease);
}
/* Venture motif watermark */
.panel__motif {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0; transition: opacity .7s var(--ease);
  -webkit-mask-image: radial-gradient(circle at 100% 0%, #000, transparent 65%);
          mask-image: radial-gradient(circle at 100% 0%, #000, transparent 65%);
}

/* Inactive panels: dim the content, keep the frosted glass */
.panel__top, .panel__body { transition: opacity .5s var(--ease); }
.stage.has-active .panel:not(.is-active) { transform: scale(.985); }
.stage.has-active .panel:not(.is-active) :is(.panel__top, .panel__body) { opacity: .4; }
.panel.is-active {
  transform: translateY(-2px) scale(1.012);
  border-color: transparent;
  box-shadow:
    0 30px 90px -30px color-mix(in srgb, var(--p) 60%, transparent),
    0 0 0 1px color-mix(in srgb, var(--p) 35%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .12);
}
.panel.is-active::before { opacity: 1; }
.panel.is-active .panel__light { opacity: 1; }
.panel.is-active .panel__motif { opacity: .2; }

/* Panel: top row, an icon + caps subtitle over a thin rule, as on qbix.digital */
.panel__top {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--pt) 50%, transparent);
}
.panel__badge {
  flex: none;
  display: grid; place-items: center;
  min-width: 52px; height: 52px;
  color: var(--pt);
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--p) 45%, transparent));
}
.panel__badge svg { width: 52px; height: 100%; }
.panel__badge img { height: 52px; width: auto; max-width: 84px; object-fit: contain; }
.panel__meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.panel__index { font-size: .7rem; font-weight: 600; color: var(--text-faint); letter-spacing: .06em; }
.panel__cat {
  font-size: clamp(.78rem, .72rem + .25vw, .95rem); font-weight: 700;
  letter-spacing: var(--track-sub); text-transform: uppercase;
  color: var(--pt);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.panel__arrow {
  margin-left: auto; flex: none;
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: var(--radius-btn);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  transition: transform .5s var(--ease), background .4s, color .4s, border-color .4s;
}
.panel.is-active .panel__arrow { transform: rotate(45deg); background: var(--p); border-color: var(--p); color: var(--on-p, #fff); }

/* Panel: homepage preview, a small browser window that fills spare space.
   Hidden on smaller cards (see the container queries below). */
.panel__preview {
  position: relative;
  display: none; flex-direction: column;
  flex: 1 1 0; min-height: 0;          /* takes only the space left over */
  margin: 0 0 16px;
  border-radius: 8px; overflow: hidden;
  background: rgba(3, 14, 26, .6);
  border: 1px solid color-mix(in srgb, var(--pt) 22%, rgba(255, 255, 255, .08));
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .85);
  transition: border-color .5s var(--ease), box-shadow .6s var(--ease);
}
.panel__preview-bar {
  flex: none; display: flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 10px;
  background: rgba(255, 255, 255, .06);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.panel__preview-bar span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.panel__preview-bar em {
  margin-left: 8px; font-style: normal; font-size: .62rem; font-weight: 600; letter-spacing: .02em;
  color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.panel__preview img {
  display: block; flex: 1 1 auto; min-height: 0; width: 100%;
  object-fit: cover; object-position: top center;
  transition: transform 1.2s var(--ease);
}
.panel.is-active .panel__preview {
  border-color: color-mix(in srgb, var(--pt) 45%, transparent);
  box-shadow: 0 22px 50px -24px color-mix(in srgb, var(--p) 55%, transparent);
}
.panel.is-active .panel__preview img { transform: scale(1.03); }
/* While a card is hovered, only that card shows its preview */
@media (min-width: 641px) and (min-height: 541px) {
  .stage.has-active .panel:not(.is-active) .panel__preview { display: none; }
}

/* Panel: body */
.panel__body { margin-top: auto; display: flex; flex-direction: column; min-height: 0; flex-shrink: 0; }
.panel__top { flex-shrink: 0; }
/* Venture name in the venture's own heading font (config: brands[].font) */
.panel__name {
  margin: 0;
  font-family: var(--pf, var(--font)), var(--font);
  font-weight: var(--pw, 800);
  font-size: clamp(1.3rem, .85rem + 1.35vw, 2.15rem);
  line-height: 1.05; letter-spacing: var(--track-head);
  color: #fff;
}
.panel__domain { margin: .35em 0 0; font-size: .8rem; font-weight: 600; color: var(--text-faint); overflow-wrap: anywhere; }

.collapse {
  display: grid; grid-template-rows: 1fr;
  transition: grid-template-rows .55s var(--ease), opacity .4s var(--ease);
}
.collapse > div { min-height: 0; overflow: hidden; }
.panel__tagline { margin: .7em 0 0; color: var(--text-muted); font-size: .95rem; }
.panel__details { grid-template-rows: 0fr; opacity: 0; }
.panel.is-active .panel__details { grid-template-rows: 1fr; opacity: 1; }
.panel.is-active .panel__tagline-wrap { grid-template-rows: 0fr; opacity: 0; }

.panel__summary {
  margin: .8em 0 0;
  font-size: .93rem; color: var(--text-muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
/* Highlights: short service lines with a small cube bullet */
.panel__highlights {
  list-style: none; margin: .8em 0 0; padding: 0;
  display: grid; gap: 5px 22px;
  font-size: .86rem; font-weight: 600; line-height: 1.35;
  color: color-mix(in srgb, var(--pt) 30%, white);
}
.panel__highlights li { position: relative; padding-left: 18px; }
.panel__highlights li::before {
  content: ''; position: absolute; left: 2px; top: .42em;
  width: 7px; height: 7px;
  background: var(--pt);
  transform: rotate(45deg);
  box-shadow: 0 0 8px color-mix(in srgb, var(--pt) 60%, transparent);
}
.panel.is-active .panel__domain { display: none; }  /* the button carries the domain */
/* CTA: the qbix.digital button: solid, 3px radius, uppercase */
.panel__cta {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  margin: 1em 0 2px 2px;
  padding: 11px 20px; border-radius: var(--radius-btn);
  font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  color: var(--on-p, #fff);
  background: var(--p);
  box-shadow: 0 10px 28px -12px var(--p);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), filter .3s;
}
.panel__cta:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 14px 32px -12px var(--p); }
.panel__cta:focus-visible { outline-color: #fff; }
.panel__cta svg { transition: transform .3s var(--ease); }
.panel__cta:hover svg { transform: translate(2px, -2px); }

/* Short panels: trim progressively so nothing ever overflows */
@media (min-width: 641px) and (min-height: 541px) {
  .panel { container: panel / size; }
}
/* (container heights are the panel's content box, i.e. minus padding) */
/* Show the homepage preview only when there's room for it to be useful;
   the expanded card needs more room because it also shows its details. */
@container panel (min-height: 330px) {
  .panel__preview { display: flex; }
}
/* The hovered card's preview takes priority: show it whenever there's a
   reasonable amount of room, trimming the summary/highlights to make space */
@container panel (min-height: 255px) {
  .panel.is-active .panel__preview { display: flex; }
}
@container panel (max-height: 519px) {
  .panel.is-active .panel__highlights { display: none; }
  .panel.is-active .panel__summary { -webkit-line-clamp: 2; }
}
@container panel (max-height: 299px) {
  .panel.is-active .panel__summary { display: none; }
}
@container panel (min-width: 620px) {
  .panel__highlights { grid-template-columns: 1fr 1fr; }
}
@container panel (max-height: 330px) {
  .panel__summary { -webkit-line-clamp: 2; }
}
@container panel (max-height: 290px) {
  .panel__highlights li:nth-child(n+3) { display: none; }
}
@container panel (max-height: 250px) {
  .panel__highlights { display: none; }
  .panel__summary { -webkit-line-clamp: 3; }
}
@container panel (max-height: 230px) {
  .panel__summary { -webkit-line-clamp: 2; }
}
@container panel (max-height: 175px) {
  .panel__summary { display: none; }
}
@container panel (max-height: 160px) {
  .panel__top { padding-bottom: 8px; margin-bottom: 6px; }
  .panel__badge { min-width: 40px; height: 40px; }
  .panel__badge svg { width: 40px; }
  .panel__badge img { height: 40px; }
  .panel__tagline { display: none; }
}
/* Squeezed cards (while another card is expanded on short screens):
   show just the header row rather than a half-clipped name */
@container panel (max-height: 120px) {
  .panel__body { display: none; }
  .panel__top { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
}
@container panel (max-width: 360px) {
  .panel__cat { font-size: .72rem; }
  .panel__summary, .panel__tagline { font-size: .86rem; }
}

/* ----------------------------------------------------------------------------
   7. CORE HUB (shorthand logo, recoloured to the live accent)
   ------------------------------------------------------------------------- */
.core {
  --size: clamp(64px, 9vmin, 98px);
  position: absolute; left: var(--cx); top: var(--cy); z-index: 4;
  translate: -50% -50%;
  width: var(--size); height: var(--size);
  display: grid; place-items: center;
  padding: 0; border-radius: 50%;
  cursor: pointer;
  color: var(--accent-text);
  background: color-mix(in srgb, var(--qbix-bg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow:
    0 0 0 calc(var(--gap) * .5) color-mix(in srgb, var(--qbix-bg) 55%, transparent),
    0 0 40px color-mix(in srgb, var(--accent) 40%, transparent);
  opacity: 0; visibility: hidden;
  transition: border-color var(--morph), box-shadow var(--morph);
}
.stage.is-open .core { opacity: 1; visibility: visible; }
.core .logo-mask { width: 56%; transition: transform .6s var(--ease); }
.core:hover .logo-mask { transform: scale(1.08); }
.core__ring {
  position: absolute; inset: -5px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, var(--accent), transparent 35%, var(--accent-2), transparent 70%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  animation: spin 8s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }

/* ----------------------------------------------------------------------------
   8. SMALL SCREENS: stack and allow scrolling
   ------------------------------------------------------------------------- */
@media (max-width: 640px), (max-height: 540px) {
  body { overflow-y: auto; }
  .app { height: auto; min-height: 100vh; min-height: 100dvh; grid-template-rows: auto auto auto auto; }
  .stage { min-height: 56vh; }
  .stage.is-open { min-height: 0; }
  .grid { position: relative; inset: auto; grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: auto; }
  .stage:not(.is-open) .grid { position: absolute; inset: 0; }
  .panel { min-height: 0; }
  .panel__details { grid-template-rows: 1fr; opacity: 1; }
  .panel__tagline-wrap { display: none; }
  .panel__summary { -webkit-line-clamp: unset; }
  .panel__preview { display: flex; flex: none; aspect-ratio: 16 / 10; }
  .core { display: none; }
  .footbar { grid-template-columns: 1fr auto; }
  .status { display: none; }
  .legal { text-align: left; }
  .ambient__field { opacity: .6; }
}
@media (max-height: 540px) and (min-width: 641px) {
  .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .panel__highlights { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------------------------
   9. ACCESSIBILITY · REDUCED MOTION · NO-JS
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ambient__blob, .core__ring, .cube-floor, .pill__dot { animation: none; }
  .panel, .collapse { transition-duration: .01s; }
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Without JavaScript the pre-rendered panels show straight away, fully open */
.no-js .cube-btn, .no-js .core { display: none; }
.no-js body { overflow-y: auto; }
.no-js .app { height: auto; min-height: 100vh; grid-template-rows: auto auto auto auto; }
.no-js .stage .panel { opacity: 1; visibility: visible; pointer-events: auto; container-type: normal; }
.no-js .grid { position: relative; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); grid-template-rows: none; }
.no-js .panel__details { grid-template-rows: 1fr; opacity: 1; }
.no-js .panel__tagline-wrap { display: none; }
.no-js .panel__summary { -webkit-line-clamp: unset; }
.no-js .panel__preview { display: flex; flex: none; aspect-ratio: 16 / 10; }
