/* ============================================================
   Alpha skin for the self-hosted Velxio front end.
   Injected by nginx (sub_filter) at the proxy, so the container image stays
   untouched and the skin survives every `alpha-velxio update`.

   ⚠️ CSS only, on purpose. The app is React and re-renders its header; a JS
   pruner would need a MutationObserver and could fight the app. Every rule
   here keys off the app's OWN semantic classes and hrefs, so nothing depends
   on DOM order or generated hashes.

   ⚠️ Scoped by `.landing-*`, which only exists on the home page — the editor
   and simulator UI are deliberately left alone. Restyling the canvas would be
   a good way to break a tool that works.
   ============================================================ */

@font-face {
  font-family: 'Alpha Grotesk';
  src: url('/_alpha/SpaceGrotesk.ttf') format('truetype');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --a-violet: #8B5CF6;
  --a-indigo: #6366F1;
  --a-ink:    #0B0E1A;
  --a-surf:   #11141b;
  --a-surf2:  #161a24;
  --a-line:   #232734;
  --a-text:   #E7E9F0;
  --a-muted:  #A7ADBE;
  --a-faint:  #6B7280;
  --a-display: 'Alpha Grotesk', 'Space Grotesk', system-ui, sans-serif;
}

/* ---------------------------------------------------------- top bar */

/* Leave Examples and Editor. Everything else goes — matched on href, which
   survives re-renders and translation (the labels change with ?lang=). */
.header-nav-link[href="/"],
.header-nav-link[href="/docs"],
.header-nav-link[href="/about"],
.header-nav-link[href="/pricing"],
.header-nav-link[href="/classroom"],
.header-nav-link[href="/blog/"],
.header-nav-link[href^="/account"],
.header-nav-link[href^="https://github.com"],
.header-nav-link[href^="https://discord"],
.header-nav-discord {
  display: none !important;
}

.app-header {
  background: rgba(11, 14, 26, .72) !important;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--a-line) !important;
}

.header-nav-links { gap: 4px !important; }

.header-nav-link {
  font-family: var(--a-display);
  font-weight: 600 !important;
  font-size: 13px !important;
  letter-spacing: .1px;
  color: var(--a-muted) !important;
  border-radius: 9px !important;
  padding: 7px 14px !important;
  transition: background .16s, color .16s;
}
.header-nav-link:hover {
  color: #fff !important;
  background: rgba(139, 92, 246, .16) !important;
}
.header-nav-link-active {
  color: #fff !important;
  background: rgba(139, 92, 246, .22) !important;
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .38);
}

/* The wordmark says the app's own name — replace it with ours. font-size:0
   swallows the text node and the ::before/::after bring back our mark + name,
   so React can re-render the anchor all it likes; the CSS never fights it. */
.app-header a[href="/"]:not(.header-nav-link) {
  font-family: var(--a-display);
  font-weight: 700;
  letter-spacing: -.2px;
  font-size: 0 !important;
  gap: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
}
.app-header a[href="/"]:not(.header-nav-link) svg,
.app-header a[href="/"]:not(.header-nav-link) img {
  display: none !important;
}
.app-header a[href="/"]:not(.header-nav-link)::before {
  content: '';
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: url('/_alpha/logo.png') center/cover no-repeat;
  display: inline-block;
  flex-shrink: 0;
}
.app-header a[href="/"]:not(.header-nav-link)::after {
  content: 'Alpha Sim';
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.2px;
  color: var(--a-text);
  margin-left: 9px;
  display: inline-block;
}
/* The EDITOR header nests differently: <div.header-brand><svg/><a href="/">
   <span.header-title>name</span></a></div> — the icon is a SIBLING of the
   anchor and the name span carries its own font-size, so the rules above
   don't reach either. */
.header-brand > svg { display: none !important; }
.header-brand .header-title { font-size: 0 !important; }

/* The app's own FOOTER (e.g. on /examples) still links the upstream
   project's sites and marketing pages. The internal ones already 301 home;
   the external ones would leak the upstream identity — drop them all. */
a[href^="https://github.com"],
a[href^="https://discord"],
a[href="/about"],
a[href="/pricing"],
a[href="/classroom"],
a[href^="/blog"],
a[href="/docs"],
a[href="/account/desktop-install"] {
  display: none !important;
}

.velxio-language-btn {
  border-radius: 9px !important;
  border: 1px solid var(--a-line) !important;
  color: var(--a-muted) !important;
}

/* ---------------------------------------------------------- landing */

body:has(.landing-hero) {
  background: var(--a-ink) !important;
  color: var(--a-text);
}

/* Hero: the panel's own gradient field + dot grid, so the simulator reads as
   part of the product rather than a third-party page behind a login. */
.landing-hero {
  position: relative;
  background:
    radial-gradient(1100px 620px at 12% -10%, rgba(139, 92, 246, .30), transparent 62%),
    radial-gradient(900px 560px at 88% 8%, rgba(99, 102, 241, .20), transparent 60%),
    linear-gradient(180deg, #121024 0%, var(--a-ink) 78%) !important;
  border-bottom: 1px solid var(--a-line);
  overflow: hidden;
}
.landing-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.landing-hero > * { position: relative; z-index: 1; }

.hero-title {
  font-family: var(--a-display) !important;
  font-weight: 700 !important;
  letter-spacing: -1.4px !important;
  line-height: 1.04 !important;
  color: #fff !important;
  text-wrap: balance;
}
/* the app colours its second line with a span — make it our gradient */
.hero-title span,
.hero-title em,
.hero-title b {
  background: linear-gradient(100deg, #A78BFA 0%, #8B5CF6 42%, #6366F1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
  font-style: normal;
}

.hero-subtitle {
  font-size: 16.5px !important;
  line-height: 1.75 !important;
  color: var(--a-muted) !important;
  max-width: 33em;
}

/* calls to action */
.cta-primary {
  font-family: var(--a-display);
  font-weight: 700 !important;
  background: linear-gradient(135deg, var(--a-violet), var(--a-indigo)) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 10px 30px rgba(139, 92, 246, .42);
  transition: transform .16s, box-shadow .16s;
}
.cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(139, 92, 246, .55);
}
.cta-secondary {
  font-family: var(--a-display);
  font-weight: 600 !important;
  background: rgba(255, 255, 255, .05) !important;
  border: 1px solid rgba(255, 255, 255, .16) !important;
  color: var(--a-text) !important;
  transition: background .16s, border-color .16s;
}
.cta-secondary:hover {
  background: rgba(255, 255, 255, .09) !important;
  border-color: rgba(139, 92, 246, .55) !important;
}

/* ------------------------------------------------------- sections */

.landing-section,
.landing-support,
.landing-licensing {
  background: var(--a-ink) !important;
  border-top: 1px solid var(--a-line);
}
.landing-section-alt {
  background:
    radial-gradient(900px 460px at 80% 0%, rgba(99, 102, 241, .10), transparent 60%),
    var(--a-surf) !important;
}
.landing-ai {
  background:
    radial-gradient(800px 420px at 18% 0%, rgba(139, 92, 246, .14), transparent 60%),
    var(--a-ink) !important;
}

.landing-section h2,
.landing-support h2,
.landing-licensing h2,
.landing-section h3 {
  font-family: var(--a-display) !important;
  font-weight: 700 !important;
  letter-spacing: -.6px !important;
  color: #fff !important;
}
.landing-section p,
.landing-support p,
.landing-licensing p { color: var(--a-muted) !important; }

/* Anything card-shaped: one consistent surface, border and lift. Matching on
   a class SUBSTRING keeps this working when the app adds new card variants. */
[class*="-card"] {
  background: var(--a-surf2) !important;
  border: 1px solid var(--a-line) !important;
  border-radius: 16px !important;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
[class*="-card"]:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, .45) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
}

.pricing-card-cta-primary {
  background: linear-gradient(135deg, var(--a-violet), var(--a-indigo)) !important;
  border: 0 !important;
  color: #fff !important;
  font-weight: 700 !important;
}
.pricing-card-cta-secondary {
  background: rgba(255, 255, 255, .05) !important;
  border: 1px solid var(--a-line) !important;
  color: var(--a-text) !important;
}

/* Badge pills carry "-card" in their class (licensing-card-badge …) so the
   card-surface rule above repaints them — and the commercial badge's own dark
   text vanishes on it. Give badges their own violet pill instead. */
[class*="-card-badge"] {
  background: rgba(139, 92, 246, .16) !important;
  border: 1px solid rgba(139, 92, 246, .38) !important;
  border-radius: 999px !important;
  color: #C4B5FD !important;
  font-weight: 600;
}
[class*="-card-badge"]:hover { transform: none !important; box-shadow: none !important; }

/* the small blue eyebrow above every section heading */
.section-label { color: #A78BFA !important; border-color: rgba(139, 92, 246, .5) !important; }

/* the footer strip under the CTAs */
.landing-hero small,
.landing-hero .hero-footnote { color: var(--a-faint) !important; }

/* --------------------------------------------------------- mobile */
/* ⚠️ max-width only, so the desktop rendering above is untouched — same rule
   the panel's own responsive layer follows. */
@media (max-width: 760px) {
  .hero-title { letter-spacing: -.8px !important; }
  .header-nav-link { padding: 6px 10px !important; font-size: 12.5px !important; }
}
