/* ==========================================================================
   Nova Link brand: logo lockup, mono mark, dialog mark, boot splash.
   --------------------------------------------------------------------------
   Assets (drawn by the logo agent, dark-background ready):
     /assets/brand/nova-mark.svg       flat two-tone 4-point star (two oranges)
     /assets/brand/nova-mark-mono.svg  single-colour star (used as a mask)
     /assets/brand/nova-lockup.svg     star + wordmark, light text (boot splash)

   Lockup markup (static in index.html and legal.html, no JS rewrites):
     <a class="brand" href="/" aria-label="Nova Link — главная">
       <img class="nova-logo" src="/assets/brand/nova-mark.svg" width="32" height="32" alt="">
       <span class="nova-brand-name">nova<span class="brand-dot" aria-hidden="true"></span><span class="brand-link">link</span></span>
     </a>
   Sizes: .brand.sm (24px mark) · default (28px) · .brand.lg (40px); surfaces may set
   --brand-mark / --brand-text. .brand.mark-only hides the wordmark (icon rail, tight headers).
   The wordmark is real text (Latin, i18n leaves it alone) set like the lockup file: "nova" 800,
   "link" 500 in the secondary colour; the dot between them is the star in solid accent, so it
   never reads as "nova.link".
   r181: the logo is flat. No glow under the mark, no spin on hover, no gradient on the dot,
   no tile behind the dialog mark.
   ========================================================================== */

@layer components {
  .brand {
    --brand-mark: 28px;
    --brand-text: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--nv-text);
    text-decoration: none;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
  }

  .brand:hover {
    color: var(--nv-text);
    text-decoration: none;
  }

  .brand.sm {
    --brand-mark: 24px;
    --brand-text: 16px;
  }

  .brand.lg {
    --brand-mark: 40px;
    --brand-text: 24px;
  }

  .brand:focus-visible {
    border-radius: var(--nv-r-sm);
  }

  /* The mark: the flat two-tone star, as drawn. */
  .nova-logo {
    flex: none;
    width: var(--brand-mark, 28px);
    height: var(--brand-mark, 28px);
  }

  /* The logotype keeps the lockup's own weights (a drawn logo, not interface type). */
  .nova-brand-name {
    display: inline-flex;
    align-items: center;
    color: var(--nv-text);
    font-family: var(--nv-font-display);
    font-size: var(--brand-text, 18px);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1;
    text-transform: lowercase;
    white-space: nowrap;
  }

  /* The star between "nova" and "link", in solid accent. */
  .brand-dot {
    display: inline-block;
    flex: none;
    width: .42em;
    height: .42em;
    margin: 0 .09em 0 .11em;
    background: var(--nv-accent);
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    transform: translateY(.04em);
  }

  .brand-link {
    color: var(--nv-text-2);
    font-weight: 500;
    letter-spacing: -.03em;
  }

  .brand.mark-only .nova-brand-name {
    display: none;
  }

  /* Mono mark in any colour: <span class="nova-mark-mono" aria-hidden="true"></span>
     (watermarks, empty states, footer). Colour = currentColor. */
  .nova-mark-mono {
    display: inline-block;
    flex: none;
    width: 1em;
    height: 1em;
    background: currentColor;
    -webkit-mask: url("/assets/brand/nova-mark-mono.svg") center / contain no-repeat;
    mask: url("/assets/brand/nova-mark-mono.svg") center / contain no-repeat;
  }

  /* Dialog / hero mark: <span class="mark big"><img src="/assets/brand/nova-mark.svg" alt=""></span>.
     r181: the star on its own, no tile, wash or glow behind it. */
  .mark.big {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
  }

  .mark.big > img {
    width: 40px;
    height: 40px;
  }

  /* "Nova Link" chip over an opened public profile: solid, so it reads on any page behind it. */
  .nova-public-brand {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    left: 16px;
    z-index: calc(var(--nv-z-overlay) + 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 4px 12px;
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: var(--nv-r-control);
    background: rgb(10 10 9 / 90%);
    color: #fff;
    font-size: var(--nv-fs-13);
    font-weight: var(--nv-fw-medium);
    text-decoration: none;
  }

  .nova-public-brand:hover {
    color: #fff;
    background: var(--nv-bg);
    text-decoration: none;
  }
}

/* ==========================================================================
   Boot splash (#novaBootSplash, removed by boot-loader.js after load).
   All stylesheets are render-blocking in <head>, so the splash is styled on
   first paint; the inline critical <style> in <head> only sets the canvas
   colour to avoid a white flash. It shows the lockup SVG (not live text) so
   there is no font swap while Onest loads, and no copy at all: profile
   visitors never see owner-specific "preparing your space" text.
   r181: the plain canvas, the flat lockup and one thin accent bar that moves
   while the page loads. No wash, no glow.
   ========================================================================== */
@layer components {
  .nova-boot-splash {
    position: fixed;
    inset: 0;
    z-index: var(--nv-z-boot);
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--nv-bg);
    color: var(--nv-text);
    transition: opacity var(--nv-dur-3) var(--nv-ease), visibility var(--nv-dur-3);
  }

  .nova-boot-splash.is-leaving {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .nova-boot-content {
    display: grid;
    justify-items: center;
    gap: 24px;
  }

  .nova-boot-lockup {
    width: auto;
    height: 48px;
    max-width: min(320px, 78vw);
    animation: nv-boot-in var(--nv-dur-4) var(--nv-ease) both;
  }

  .nova-boot-progress {
    width: 112px;
    height: 2px;
    overflow: hidden;
    border-radius: var(--nv-r-round);
    background: var(--nv-line-strong);
  }

  .nova-boot-progress i {
    display: block;
    width: 40%;
    height: 100%;
    border-radius: inherit;
    background: var(--nv-accent);
    animation: nv-boot-progress 1.2s var(--nv-ease) infinite;
  }

  @media (max-width: 560px) {
    .nova-boot-lockup {
      height: 40px;
    }
  }
}

@keyframes nv-boot-in {
  from { opacity: 0; transform: translateY(8px); }
}

@keyframes nv-boot-progress {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(260%); }
}
