/* ==========================================================================
   WILDCARDLABS — PUBLIC ENTRY PAGE (LIGHT, v3)
   Path: public/wildcardlabs.app/frontend/home/subpages/public/public.css

   The light mode of everything inside the platform.
   Same vocabulary as Home / Details (dark):
   - Slim Sora display type over quiet system UI text.
   - The logo and app icons are the lights: glass plate + coloured halo.
   - Hairline section heads with a lit sky tick, ruled rows on a spine.
   - One soft light follows the pointer.
   ========================================================================== */

:root {
  --safe-top: env(safe-area-inset-top, 0px);

  --bg-base: #fbfcfe;
  --bg-surface: #ffffff;
  --bg-tint: #f3f7fc;

  --text-main: #0b1220;
  --text-muted: #475569;
  --text-dim: #64748b;

  --line: rgba(11, 18, 32, .08);
  --line-2: rgba(11, 18, 32, .16);

  --wl-sky: #0ea5e9;
  --wl-blue: #2563eb;
  --wl-indigo: #6366f1;

  --status-green: #059669;
  --status-yellow: #d97706;
  --status-red: #dc2626;

  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Sora", var(--font-ui);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --maxw: 1040px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; text-decoration: none; }
html, body { min-height: 100%; }

body {
  position: relative;
  background: var(--bg-base);
  color: var(--text-main);
  font-family: var(--wl-font-frontend, var(--font-ui));
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--wl-sky);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- Ambient light (light mode of the dark ambient) ---------- */
body::before {
  content: "";
  position: fixed; inset: -10%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 45% at 50% -8%, rgba(14, 165, 233, .20), transparent 70%),
    radial-gradient(40% 35% at 6% 96%, rgba(37, 99, 235, .09), transparent 70%),
    radial-gradient(35% 30% at 96% 68%, rgba(99, 102, 241, .09), transparent 70%);
  animation: ambientDrift 32s ease-in-out infinite alternate;
}
body::after {                                  /* engineering grid, faded away from the top */
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .5;
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000 10%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000 10%, transparent 75%);
}
@keyframes ambientDrift {
  from { transform: translate3d(-1.5%, 0, 0) scale(1); }
  to   { transform: translate3d(1.5%, 1%, 0) scale(1.04); }
}
.pointer-light {
  position: fixed; left: 0; top: 0; z-index: 1; pointer-events: none;
  width: 560px; height: 560px; margin: -280px 0 0 -280px;
  background: radial-gradient(closest-side, rgba(14, 165, 233, .11), transparent);
  opacity: 0; transition: opacity .6s; will-change: transform;
}
.pointer-light.on { opacity: 1; }
@media (hover: none) { .pointer-light { display: none; } }

/* ---------- Boot gate ---------- */
#app { position: relative; z-index: 2; width: 100%; flex: 1; display: flex; flex-direction: column; }
#app.boot-ready { transition: opacity 220ms var(--ease); }

.main-wrapper {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 0 20px 24px;
  display: flex; flex-direction: column;
  gap: clamp(56px, 9vw, 112px);
}

/* ---------- Shared bits ---------- */
.k {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted);
}
.dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--text-dim);
}
.dot-live  { background: var(--status-green);  box-shadow: 0 0 0 3px rgba(5, 150, 105, .14), 0 0 10px rgba(5, 150, 105, .55); }
.dot-build { background: var(--status-yellow); box-shadow: 0 0 0 3px rgba(217, 119, 6, .12), 0 0 10px rgba(217, 119, 6, .45); }
.dot-pending { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(100, 116, 139, .55); }

.section-head {
  position: relative;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-top: 24px; margin-bottom: 26px;
}
.section-head::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--line-2), var(--line) 55%, transparent);
}
.section-head::after {
  content: ""; position: absolute; top: -1px; left: 0; width: 30px; height: 2px;
  background: var(--wl-sky); box-shadow: 0 0 14px 2px rgba(14, 165, 233, .4);
}
.section-head h2 {
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-muted);
}
.section-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); text-align: right; }

.section-title {
  max-width: 20ch; text-wrap: balance;
  font-family: var(--font-display); font-weight: 200;
  font-size: clamp(1.7rem, 4.6vw, 2.6rem); letter-spacing: -.04em; line-height: 1.1;
  margin-bottom: 28px;
}
.section-title em { font-style: normal; font-weight: 300; color: var(--wl-sky); }

/* ---------- Buttons ---------- */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 24px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  transition: background .2s, box-shadow .2s, transform .2s, color .2s;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--wl-sky), var(--wl-blue));
  box-shadow: 0 10px 28px -8px rgba(14, 165, 233, .65), inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.btn-primary:hover { box-shadow: 0 14px 36px -8px rgba(14, 165, 233, .85), inset 0 0 0 1px rgba(255, 255, 255, .35); transform: translateY(-1px); }
.btn-ghost { color: var(--text-main); box-shadow: inset 0 0 0 1px var(--line-2); background: rgba(255, 255, 255, .6); }
.btn-ghost:hover { color: var(--wl-sky); background: rgba(14, 165, 233, .05); box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .55), 0 0 22px rgba(14, 165, 233, .14); }
.btn-primary:active, .btn-ghost:active { transform: scale(.98); }
.btn-arrow { transition: transform .3s var(--ease); }
.btn-primary:hover .btn-arrow, .btn-ghost:hover .btn-arrow, .pub-enter:hover .btn-arrow { transform: translateX(3px); }

/* ---------- Top bar ---------- */
.pub-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 0 -20px; padding: calc(12px + var(--safe-top)) 20px 12px;
  background: linear-gradient(180deg, rgba(251, 252, 254, .94), rgba(251, 252, 254, .72));
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.pub-bar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, .5) 30%, rgba(14, 165, 233, .5) 70%, transparent);
  opacity: .5;
}
.pub-brand { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.brand-mark {
  width: 12px; height: 12px; border-radius: 50%; background: var(--wl-sky);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, .14), 0 0 16px 2px rgba(14, 165, 233, .6);
  animation: markBreath 4.5s ease-in-out infinite;
}
@keyframes markBreath { 50% { box-shadow: 0 0 0 6px rgba(14, 165, 233, .09), 0 0 24px 4px rgba(14, 165, 233, .75); } }
.brand-name { font-family: var(--font-display); font-size: 1.08rem; font-weight: 300; letter-spacing: -.02em; line-height: 1; }
.brand-name span { font-weight: 600; color: var(--wl-sky); }

.pub-links { display: flex; gap: 4px; }
.pub-links button {
  padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--text-dim);
  transition: color .2s, background .2s;
}
.pub-links button:hover { color: var(--text-main); background: rgba(11, 18, 32, .05); }

.pub-enter {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--wl-sky);
  background: rgba(14, 165, 233, .06);
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .55);
  transition: background .2s, box-shadow .2s, color .2s;
}
.pub-enter:hover { color: #fff; background: var(--wl-sky); box-shadow: inset 0 0 0 1px var(--wl-sky), 0 0 22px rgba(14, 165, 233, .35); }
@media (max-width: 640px) { .pub-links { display: none; } }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center; gap: clamp(28px, 6vw, 72px);
  padding-top: clamp(40px, 8vw, 88px);
}
.hero-title {
  margin-top: 20px; max-width: 14ch; text-wrap: balance;
  font-family: var(--font-display); font-weight: 200;
  font-size: clamp(2.4rem, 7.2vw, 4.4rem); line-height: 1.04; letter-spacing: -.05em;
  color: var(--text-main);
}
.hero-title em {
  font-style: normal; font-weight: 300;
  background: linear-gradient(120deg, var(--wl-sky), var(--wl-blue) 60%, var(--wl-indigo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(14, 165, 233, .3));
}
.value-prop {
  margin-top: clamp(16px, 2.6vw, 24px); max-width: 52ch;
  font-size: clamp(14px, 1.7vw, 16px); line-height: 1.7; color: var(--text-muted);
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(22px, 4vw, 34px); }

.hero-stats {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px clamp(18px, 4vw, 34px);
  margin-top: clamp(26px, 4.4vw, 42px); padding-top: 22px; border-top: 1px solid var(--line);
}
.hero-stats li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-dim); }
.hero-stats b {
  font-family: var(--font-display); font-weight: 300; font-size: 1.3rem; letter-spacing: -.02em;
  color: var(--text-main); font-variant-numeric: tabular-nums;
}

/* Logo stage: plate + halo + slow orbits */
.hero-stage {
  --size: min(100%, 380px);
  position: relative; justify-self: center; width: var(--size); aspect-ratio: 1;
  display: grid; place-items: center;
}
.orbit {
  position: absolute; border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line);
  animation: spin 40s linear infinite;
}
.orbit::after {
  content: ""; position: absolute; top: -3.5px; left: 50%; margin-left: -3.5px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--wl-sky);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .15), 0 0 14px 2px rgba(14, 165, 233, .7);
}
.orbit--1 { inset: 0; }
.orbit--2 { inset: 13%; animation-duration: 28s; animation-direction: reverse; }
.orbit--2::after { background: var(--wl-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14), 0 0 14px 2px rgba(37, 99, 235, .6); }
.orbit--3 { inset: 26%; animation-duration: 20s; }
.orbit--3::after { background: var(--wl-indigo); box-shadow: 0 0 0 3px rgba(99, 102, 241, .14), 0 0 14px 2px rgba(99, 102, 241, .6); }
@keyframes spin { to { transform: rotate(360deg); } }

.logo-container {
  position: relative; z-index: 1;
  width: 38%; aspect-ratio: 1;
  display: block; cursor: pointer;
  transition: transform .45s var(--ease);
}
.logo-container::before {                      /* halo */
  content: ""; position: absolute; inset: -42%; z-index: 0; border-radius: 40%;
  background: radial-gradient(closest-side, rgba(14, 165, 233, .5), rgba(37, 99, 235, .16) 62%, transparent);
  filter: blur(26px);
  animation: halo 5s ease-in-out infinite;
}
@keyframes halo { 50% { opacity: .7; transform: scale(1.1); } }
.logo-glass {
  position: relative; z-index: 1; width: 100%; height: 100%;
  border-radius: 26%; overflow: hidden;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #ffffff, #eef4fb);
  box-shadow: inset 0 0 0 1px rgba(11, 18, 32, .1), 0 26px 50px -18px rgba(14, 165, 233, .55), 0 6px 14px -6px rgba(11, 18, 32, .18);
  transition: box-shadow .45s var(--ease);
}
.logo-glass::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 255, 255, .9), transparent 45%);
}
.logo-icon-wrapper { position: relative; z-index: 1; width: 62%; height: 62%; display: grid; place-items: center; }
.logo-icon-wrapper svg, .logo-icon-wrapper img { display: block; width: 100%; height: 100%; object-fit: contain; overflow: visible; }
@media (hover: hover) {
  .logo-container:hover { transform: scale(1.05); }
  .logo-container:hover .logo-glass { box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .45), 0 32px 56px -18px rgba(14, 165, 233, .75), 0 6px 14px -6px rgba(11, 18, 32, .18); }
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-stage { --size: min(78%, 280px); order: -1; justify-self: start; }
  .hero-title { max-width: 16ch; }
}
@media (max-width: 480px) { .hero-actions .btn-primary, .hero-actions .btn-ghost { width: 100%; } }

/* ---------- Glance: live apps from the hub ---------- */
.cat-row { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 26px; }
.cat-row:empty { display: none; }
.cat-chip {
  padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--text-muted);
  background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: color .2s, box-shadow .2s, background .2s;
}
.cat-chip:hover { color: var(--wl-sky); background: rgba(14, 165, 233, .05); box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .5); }

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 164px), 1fr));
  gap: 4px; min-height: 120px;
}
.app-tile {
  --icon: 88px;
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 22px 16px 16px; border-radius: 22px;
  transition: transform .4s var(--ease);
}
.app-tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: radial-gradient(240px circle at var(--mx, 30%) var(--my, 20%), rgba(14, 165, 233, .12), transparent 70%), rgba(255, 255, 255, .75);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 18px 34px -22px rgba(14, 165, 233, .5);
  opacity: 0; transition: opacity .35s;
}
.app-tile:focus-visible::before { opacity: 1; }
.app-tile:active { transform: scale(.975); }

.app-plate { position: relative; flex: none; width: var(--icon); height: var(--icon); margin-bottom: 18px; }
.app-halo {
  position: absolute; inset: -16%; z-index: 0; border-radius: 32%;
  filter: blur(20px) saturate(1.6); opacity: .5; transform: scale(.94);
  transition: opacity .45s var(--ease), transform .45s var(--ease); pointer-events: none;
}
.app-halo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.app-halo.is-glow { background: radial-gradient(closest-side, rgba(14, 165, 233, .65), transparent); }
.app-halo.is-mono { background: radial-gradient(closest-side, hsl(var(--h) 85% 55% / .6), transparent); }

.app-icon {
  position: relative; z-index: 1; width: 100%; height: 100%;
  border-radius: 24%; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(160deg, #ffffff, #eef4fb);
  box-shadow: inset 0 0 0 1px rgba(11, 18, 32, .09), 0 16px 28px -14px rgba(11, 18, 32, .35);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.app-icon::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(140deg, rgba(255, 255, 255, .55), transparent 42%); }
.app-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-icon svg { width: 56%; height: 56%; }
.app-icon.is-mono { background: linear-gradient(150deg, hsl(var(--h) 80% 55%), hsl(calc(var(--h) + 38) 75% 36%)); }
.app-icon.is-mono span {
  font-family: var(--font-display); font-weight: 200; font-size: calc(var(--icon) * .4);
  letter-spacing: -.04em; color: rgba(255, 255, 255, .97); text-shadow: 0 0 18px rgba(255, 255, 255, .5);
}
.app-name { font-size: 15px; font-weight: 500; line-height: 1.3; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.app-sub {
  margin-top: 4px; font-size: 12.5px; line-height: 1.45; color: var(--text-dim);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; transition: color .25s;
}
.app-foot { width: 100%; margin-top: auto; padding-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--text-dim); }
.app-stage { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.app-stage em { font-style: normal; }
.app-go { flex: none; opacity: .5; transform: translateX(-3px); transition: opacity .3s, transform .35s var(--ease), color .3s; }
@media (hover: hover) {
  .app-tile:hover { transform: translateY(-3px); }
  .app-tile:hover::before { opacity: 1; }
  .app-tile:hover .app-halo { opacity: .8; transform: scale(1.04); }
  .app-tile:hover .app-icon { transform: scale(1.045); }
  .app-tile:hover .app-sub { color: var(--text-muted); }
  .app-tile:hover .app-go { opacity: 1; transform: none; color: var(--wl-sky); }
}

.app-tile.is-skeleton { pointer-events: none; }
.is-skeleton .app-icon { background: rgba(11, 18, 32, .05); box-shadow: inset 0 0 0 1px var(--line); animation: skPulse 1.6s ease-in-out infinite; }
.is-skeleton .app-icon::after { display: none; }
.sk { display: block; height: 10px; border-radius: 5px; background: rgba(11, 18, 32, .06); animation: skPulse 1.6s ease-in-out infinite; }
.sk-a { width: 62%; margin-bottom: 8px; } .sk-b { width: 84%; height: 8px; }
@keyframes skPulse { 50% { opacity: .45; } }

.glance-more { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.glance-note { font-size: 13px; color: var(--text-dim); max-width: 46ch; }

/* ---------- Map: system pages (ruled rows on a spine) ---------- */
.system-nav { position: relative; display: grid; padding-left: 22px; }
.system-nav::before {
  content: ""; position: absolute; left: 3px; top: 8px; bottom: 8px; width: 1px; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--line-2) 12%, var(--line) 88%, transparent);
}
.nav-row {
  position: relative;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 20px 4px; border-top: 1px solid var(--line);
  transition: background .25s, padding .3s var(--ease);
}
.nav-row:first-child { border-top: 0; padding-top: 6px; }
.nav-row:hover { background: linear-gradient(90deg, rgba(14, 165, 233, .06), transparent 80%); padding-left: 12px; }
.nav-row-node {
  position: absolute; left: -22px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
  background: var(--bg-base); box-shadow: inset 0 0 0 1.5px var(--line-2); transition: background .2s, box-shadow .2s;
}
.nav-row:hover .nav-row-node { background: var(--wl-sky); box-shadow: 0 0 0 3px rgba(14, 165, 233, .14), 0 0 12px rgba(14, 165, 233, .6); }
.nav-row-icon {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: var(--text-muted);
  background: linear-gradient(160deg, #ffffff, #eef4fb); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: color .3s, box-shadow .3s;
}
.nav-row:hover .nav-row-icon { color: var(--wl-sky); box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .45), 0 10px 24px -10px rgba(14, 165, 233, .55); }
.nav-row-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nav-row-title { font-size: 16px; font-weight: 500; line-height: 1.3; }
.nav-row-sub { font-size: 13px; color: var(--text-dim); line-height: 1.5; transition: color .25s; }
.nav-row:hover .nav-row-sub { color: var(--text-muted); }
.nav-row-tag {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--wl-sky); padding: 3px 8px; border-radius: 4px; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .35); background: rgba(14, 165, 233, .05);
}

/* ---------- Flow: how it works ---------- */
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 44px); }
.flow-step { position: relative; padding-top: 22px; }
.flow-step::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line-2); }
.flow-step::after {
  content: ""; position: absolute; top: -1px; left: 0; width: 100%; height: 1px;
  background: var(--wl-sky); box-shadow: 0 0 12px rgba(14, 165, 233, .6);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.flow-step:hover::after { transform: scaleX(1); }
.flow-num { font-family: var(--font-display); font-weight: 200; font-size: 2.6rem; letter-spacing: -.05em; line-height: 1; color: rgba(14, 165, 233, .55); }
.flow-step h3 { margin-top: 14px; font-size: 16px; font-weight: 500; }
.flow-step p { margin-top: 6px; font-size: 13px; line-height: 1.65; color: var(--text-dim); }
@media (max-width: 720px) { .flow { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Client portal CTA ---------- */
.portal {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(28px, 5vw, 56px); border-radius: 28px;
  background:
    radial-gradient(70% 140% at 12% 0%, rgba(14, 165, 233, .16), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(243, 247, 252, .9));
  box-shadow: inset 0 0 0 1px var(--line-2), 0 30px 60px -36px rgba(14, 165, 233, .55);
}
.portal::before {
  content: ""; position: absolute; top: -1px; left: 36px; width: 34px; height: 2px;
  background: var(--wl-sky); box-shadow: 0 0 14px 2px rgba(14, 165, 233, .45);
}
.portal h2 {
  max-width: 20ch; text-wrap: balance;
  font-family: var(--font-display); font-weight: 200;
  font-size: clamp(1.8rem, 5vw, 3rem); letter-spacing: -.045em; line-height: 1.08;
}
.portal p { margin-top: 16px; max-width: 52ch; font-size: 14px; line-height: 1.7; color: var(--text-muted); }
.portal .hero-actions { margin-top: 28px; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative; z-index: 2; flex-shrink: 0;
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim);
  border-top: 1px solid var(--line);
}
.site-footer::before {
  content: ""; position: absolute; top: -1px; left: 50%; transform: translateX(-50%); width: 120px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, .6), transparent);
  box-shadow: 0 0 24px 3px rgba(14, 165, 233, .18);
}

/* ---------- Motion ---------- */
[data-motion] { animation: pubFade .8s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes pubFade { from { opacity: 0; transform: translateY(10px); } }

/* scroll reveal: only armed once JS has mounted (never hides the static fallback) */
.js-reveal .reveal { transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js-reveal .reveal:not(.is-in) { opacity: 0; transform: translateY(16px); }

.app-tile.is-new .app-halo { animation: ignite 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.app-tile.is-new .app-icon { animation: iconIn .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.app-tile.is-new .app-name, .app-tile.is-new .app-sub, .app-tile.is-new .app-foot { animation: textIn .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms + 160ms); }
@keyframes ignite { from { opacity: 0; transform: scale(.55); } 55% { opacity: 1; } }
@keyframes iconIn { from { opacity: 0; transform: translateY(8px) scale(.9); } }
@keyframes textIn { from { opacity: 0; } }

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
  .main-wrapper { padding: 0 16px 16px; }
  .pub-bar { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .app-tile { --icon: 76px; padding: 18px 12px 14px; }
  .nav-row { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; }
  .nav-row-icon { width: 40px; height: 40px; border-radius: 12px; }
  .nav-row-tag { display: none; }
  .brand-name { font-size: 1rem; }
}

/* ---------- SPA subpage overrides (unchanged behaviour) ---------- */
body.is-spa-subpage .site-footer { display: none !important; }
body.is-spa-subpage::before, body.is-spa-subpage::after { display: none; }
body.is-spa-subpage #app { height: 100vh; height: 100dvh; overflow: hidden; }
body.is-spa-subpage #app > .main-wrapper { padding: 0; margin: 0; max-width: 100%; height: 100%; gap: 0; }
@media (max-width: 900px) {
  body.is-spa-subpage { display: block; }
  body.is-spa-subpage #app { height: auto; min-height: 100dvh; overflow: visible; display: block; }
  body.is-spa-subpage #app > .main-wrapper { height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js-reveal .reveal:not(.is-in) { opacity: 1; transform: none; }
}
/* ==========================================================================
   HEADER ACTIONS FIX — Keep buttons on one row, shrink playground btn
   ========================================================================== */

/* Force the action group to stay on a single horizontal line */
.pub-bar-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

/* The ghost playground button should be smaller than the primary Enter Hub btn */
.pub-enter--ghost {
  padding: 6px 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* On tablets and phones, drop the text entirely and show just the key icon */
@media (max-width: 640px) {
  .pub-enter--ghost span {
    display: none;
  }
  .pub-enter--ghost {
    padding: 8px;
    border-radius: 50%;
  }
}

/* Ensure the header row itself keeps them aligned right */
.pub-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}