/* Project Frontier compact brand lockup.
 *
 * The Home hero owns the large, cinematic wordmark. This is its navigation
 * counterpart: the same instrument glyph and Cinzel letterforms, reduced to
 * a quiet two-line signature that can sit in every menu bar without changing
 * the surrounding layout.
 */

@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../../assets/fonts/cinzel-variable.woff2") format("woff2");
}

:root {
  --pf-brand-ink: #e8f4fb;
  --pf-brand-muted: #9cb6c5;
  --pf-brand-cyan: #63d6ff;
  --pf-brand-cyan-soft: rgba(99, 214, 255, .58);
  --pf-brand-line: rgba(110, 210, 248, .42);
}

.frontier-brand {
  --frontier-brand-size: 138px;
  position: relative;
  display: inline-block;
  width: 178px;
  min-width: 178px;
  height: 52px;
  padding: 2px 8px 10px;
  box-sizing: border-box;
  color: var(--pf-brand-ink);
  text-decoration: none;
}

.frontier-brand:focus-visible {
  outline: 2px solid var(--pf-brand-cyan);
  outline-offset: 3px;
}

.frontier-brand-glyph {
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  width: var(--frontier-brand-size);
  height: 32px;
  overflow: visible;
  pointer-events: none;
  transform: translateX(-50%);
}

.frontier-brand-ring {
  position: absolute;
  content: "";
}

.frontier-brand-ring-outer {
  inset: 0;
  border: 1px solid rgba(74, 192, 255, .38);
  border-bottom-color: transparent;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, rgba(7, 35, 50, .7), transparent 82%);
  box-shadow: 0 0 13px rgba(63, 196, 255, .16), inset 0 5px 10px rgba(63, 196, 255, .12);
}

.frontier-brand-ring-outer::after {
  position: absolute;
  inset: -1px;
  background: repeating-conic-gradient(
    from 180deg,
    rgba(120, 225, 255, .48) 0deg 1.2deg,
    transparent 1.2deg 16deg
  );
  content: "";
  -webkit-mask: linear-gradient(#000 0 52%, transparent 53%);
  mask: linear-gradient(#000 0 52%, transparent 53%);
}

.frontier-brand-ring-inner {
  inset: 6px 7px 0;
  border: 1px solid rgba(74, 192, 255, .27);
  border-bottom-color: transparent;
  border-radius: 50% 50% 0 0;
}

.frontier-brand-glyph::after {
  position: absolute;
  top: -2px;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #f2fbff;
  box-shadow: 0 0 4px #fff, 0 0 10px var(--pf-brand-cyan);
  content: "";
  transform: translateX(-50%);
}

.frontier-brand-node {
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 4px;
  height: 4px;
  border: 1px solid var(--pf-brand-cyan);
  background: #092534;
  box-shadow: 0 0 7px var(--pf-brand-cyan);
  transform: translateX(-50%) rotate(45deg);
}

.frontier-brand-title {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 1px;
  align-items: center;
  color: var(--pf-brand-ink);
  font: 600 11.5px/.9 "Cinzel", Georgia, serif;
  letter-spacing: .12em;
  line-height: .9;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 2px 3px rgba(0, 0, 0, .8), 0 0 9px rgba(99, 214, 255, .2);
  white-space: nowrap;
}

.frontier-brand-project {
  letter-spacing: .24em;
  padding-left: .24em;
}

.frontier-brand-frontier {
  color: var(--pf-brand-muted);
  font-size: 1.05em;
  letter-spacing: .18em;
  padding-left: .18em;
}

.frontier-brand-j {
  position: relative;
  color: var(--pf-brand-cyan);
  text-shadow: 0 0 4px #fff, 0 0 10px rgba(49, 199, 255, .85);
}

.frontier-brand-j::before {
  position: absolute;
  top: -.72em;
  left: 50%;
  width: 1px;
  height: .92em;
  background: linear-gradient(180deg, transparent, rgba(126, 231, 255, .95) 58%, transparent);
  box-shadow: 0 0 6px var(--pf-brand-cyan), 0 0 13px rgba(0, 145, 255, .55);
  content: "";
  transform: translateX(-50%);
}

.frontier-brand-rule {
  position: absolute;
  right: 5px;
  bottom: 1px;
  left: 5px;
  display: flex;
  gap: 4px;
  align-items: center;
}

.frontier-brand-rule-line {
  display: block;
  height: 1px;
  flex: 1 1 auto;
  background: linear-gradient(90deg, transparent, var(--pf-brand-line));
}

.frontier-brand-rule-line:last-child {
  background: linear-gradient(90deg, var(--pf-brand-line), transparent);
}

.frontier-brand-rule-tick,
.frontier-brand-rule-diamond {
  display: block;
  flex: 0 0 auto;
  width: 4px;
  height: 4px;
  border: 1px solid var(--pf-brand-cyan-soft);
  transform: rotate(45deg);
}

.frontier-brand-rule-diamond {
  width: 6px;
  height: 6px;
  border-color: var(--pf-brand-cyan);
  background: rgba(99, 214, 255, .2);
  box-shadow: 0 0 7px rgba(99, 214, 255, .5);
}

/* Shared site-header pages. The header owns a single-line reduction of the
 * Home hero wordmark -- same Cinzel letterforms and lit-J glow, set small and
 * inline so it reads at the same height as the nav words beside it instead
 * of as a separate two-line badge. It keeps the compact lockup's solid ink
 * (never clipped gradient text -- see tests/shared-brand.test.mjs) because,
 * unlike the Home hero, this mark sits over whatever art or UI a given page
 * happens to have behind it. The ring glyph and divider rule are hero-scene
 * dressing and do not appear at this size. */
.site-header .frontier-brand.site-brand {
  position: static;
  display: flex;
  width: auto;
  min-width: 0;
  height: 100%;
  padding: 0 22px 0 0;
  align-items: center;
}

.site-header .frontier-brand-glyph,
.site-header .frontier-brand-rule {
  display: none;
}

.site-header .frontier-brand-title {
  display: flex;
  flex-direction: row;
  width: auto;
  gap: 0;
  font: 600 15px/1 "Cinzel", Georgia, serif;
  letter-spacing: .06em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .85), 0 0 10px rgba(99, 214, 255, .25);
}

.site-header .frontier-brand-project {
  letter-spacing: .1em;
  padding-left: 0;
}

.site-header .frontier-brand-frontier {
  padding-left: .3em;
}

.site-header .frontier-brand-j::before {
  display: none;
}

/* Console headers are not fixed site headers, but use the same signature. */
.console-branding .frontier-brand {
  --frontier-brand-size: 138px;
}

/* The board command bars have a taller, denser brand column. */
.brand-block .frontier-brand {
  --frontier-brand-size: 138px;
}

@media (max-width: 980px) {
  .site-header .frontier-brand-title {
    font-size: 13px;
  }
}

@media (max-width: 760px) {
  .site-header .frontier-brand.site-brand {
    padding-right: 14px;
  }

  .site-header .frontier-brand-title {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .frontier-brand-glyph,
  .frontier-brand-title,
  .frontier-brand-j {
    transition: none !important;
  }
}
