/* Concept HUD — shared glass navigation bar for every concept route. */

:root {
  --concept-accent: #38bdf8;
}

html[data-concept="aurel-house"] { --concept-accent: #c1ab7a; }
html[data-concept="opera-sol"] { --concept-accent: #e7d2a1; }
html[data-concept="northline"] { --concept-accent: #38bdf8; }
html[data-concept="aeris"] { --concept-accent: #b6b4d4; }
html[data-concept="buddy-pantry"] { --concept-accent: #ff7542; }
html[data-concept="quest-mart"] { --concept-accent: #e7a556; }
html[data-concept="maison-vela"] { --concept-accent: #d2d1cd; }
html[data-concept="stillform"] { --concept-accent: #b89469; }
html[data-concept="cherry-byte"] { --concept-accent: #f3469f; }
html[data-concept="raw-index"] { --concept-accent: #ff3c22; }
html[data-concept="cipher-grid"] { --concept-accent: #38bdf8; }
html[data-concept="afterhours"] { --concept-accent: #ff68bc; }

/* Suppress legacy redundant banners that collided with hero and HUD */
.concept-note,
.concept-bar,
.concept-strip {
  display: none !important;
}

html[data-concept-hud="on"] body {
  padding-top: 42px;
}

.concept-hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2147483000;
  height: 42px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 clamp(12px, 2.5vw, 24px);
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 11px;
  line-height: 1.4;
  color: #e2e8f0;
  background: rgba(8, 10, 15, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.concept-hud a,
.concept-hud button {
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
}

.concept-hud a:focus-visible,
.concept-hud button:focus-visible {
  outline: 2px solid var(--concept-accent, #38bdf8);
  outline-offset: 2px;
}

.concept-hud-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.concept-hud-back:hover {
  color: #ffffff;
}

.concept-hud-back-glyph {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
  line-height: 1;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.concept-hud-back:hover .concept-hud-back-glyph {
  border-color: var(--concept-accent, #38bdf8);
  transform: translateX(-2px);
}

.concept-hud-center {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 14px;
}

.concept-hud-coordinate {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.6);
  white-space: nowrap;
}

.concept-hud-coordinate b {
  color: var(--concept-accent, #38bdf8);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.concept-hud-motion {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.concept-hud-motion:hover {
  border-color: var(--concept-accent, #38bdf8);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.concept-hud-motion-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--concept-accent, #38bdf8);
  box-shadow: 0 0 8px var(--concept-accent, #38bdf8);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.concept-hud-motion[aria-pressed="true"] .concept-hud-motion-dot {
  background: #64748b;
  box-shadow: none;
}

.concept-hud-step {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.concept-hud-current {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 22vw;
}

.concept-hud-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 14px;
  line-height: 1;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.concept-hud-arrow:hover {
  border-color: var(--concept-accent, #38bdf8);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Compact on narrow screens */
@media (max-width: 768px) {
  .concept-hud {
    grid-template-columns: auto 1fr auto;
    height: 38px;
    font-size: 10px;
    padding: 0 10px;
    gap: 8px;
  }
  html[data-concept-hud="on"] body { padding-top: 38px; }
  .concept-hud-coordinate { display: none; }
  .concept-hud-back-text { display: none; }
  .concept-hud-current { max-width: 28vw; font-size: 10px; }
  .concept-hud-motion { height: 22px; padding: 0 7px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .concept-hud a,
  .concept-hud-arrow,
  .concept-hud-back-glyph,
  .concept-hud-motion {
    transition: none;
  }
  .concept-hud-back:hover .concept-hud-back-glyph { transform: none; }
}

/* Keep the dense editorial wall readable at the narrowest supported width. */
@media (max-width: 360px) {
  html[data-concept="raw-index"] .running-line {
    white-space: normal;
    font-size: 18px;
    line-height: 1.2;
    text-align: center;
  }
  html[data-concept="raw-index"] .running-line span {
    width: auto;
    padding-inline: 12px;
    animation: none;
  }
  html[data-concept="raw-index"] .story-wall {
    grid-template-columns: minmax(0, 1fr);
  }
  html[data-concept="raw-index"] .story-large,
  html[data-concept="raw-index"] .story-wide {
    grid-column: span 1;
  }
  html[data-concept="raw-index"] .story-large h3,
  html[data-concept="raw-index"] .story-wide h3 {
    font-size: clamp(34px, 10vw, 38px);
  }
}

@media (max-width: 400px) {
  html[data-concept="maison-vela"] .collection-stage > svg {
    transform: rotate(var(--preview-rotate, -9deg)) scale(0.985);
  }
}
