/*
 * Fallback Engineering brand overrides.
 * Uses the locally installed WordPress Font Library family: Roboto Mono.
 */

:root {
  --fe-font: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

html,
body,
button,
input,
select,
textarea,
.site-header,
.site-footer,
.site-title,
.primary-nav,
.menu-toggle,
.entry-content,
.post-content,
.wp-block-button__link,
.wp-block-table,
table,
th,
td,
blockquote,
code,
pre,
kbd,
samp,
h1,
h2,
h3,
h4,
h5,
h6,
p,
li,
a,
label,
figcaption,
.editor-styles-wrapper,
.editor-styles-wrapper * {
  font-family: var(--fe-font) !important;
}

body,
.editor-styles-wrapper {
  font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6,
.site-title,
.primary-nav a,
.wp-block-button__link,
th,
strong,
b {
  font-weight: 700;
}

em,
i {
  font-style: italic;
}

/* Replace the old generated FE square with the actual Grey Operator mark. */
.site-title::before {
  content: none !important;
  display: none !important;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.site-brandmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  line-height: 0;
  text-decoration: none;
  border-radius: 50%;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.34));
  transition: transform 160ms ease, filter 160ms ease;
}

.site-brandmark:hover,
.site-brandmark:focus-visible {
  transform: translateY(-1px);
  filter: drop-shadow(0 7px 16px rgba(0, 0, 0, 0.45)) brightness(1.06);
}

.site-brandmark img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.site-title {
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Roboto Mono benefits from slightly less aggressive display tracking. */
h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: -0.035em;
}

.entry-kicker,
.project-label,
.front-page-content > .wp-block-group:first-child p:first-child,
.primary-nav a,
th {
  letter-spacing: 0.08em !important;
}

.wp-block-button__link,
button,
input[type="submit"] {
  letter-spacing: 0.015em;
}

@media (max-width: 640px) {
  .site-branding {
    gap: 0.65rem;
  }

  .site-brandmark,
  .site-brandmark img {
    width: 40px;
    height: 40px;
  }

  .site-title {
    font-size: 0.82rem;
    letter-spacing: 0.045em;
  }
}
