/*
 * College logo mark. One stylesheet for the one renderer in
 * includes/college-logo.php, loaded on every page from header.php the same way
 * the navbar and footer stylesheets are.
 *
 * The box is always drawn: the monogram is the floor, and a real logo is an
 * image laid on top of it. That ordering is deliberate. A logo that 404s or is
 * blocked removes itself and uncovers the monogram, so no surface can ever end
 * up showing a broken-image glyph next to a college name.
 *
 * The mark is a logo, not running text, so it opts out of the site's Lora
 * reading stack the way the job boards do.
 */

.mn-clogo {
  --mn-clogo-tint: #1d50ca;
  --mn-clogo-size: 40px;
  --mn-clogo-radius: 10px;
  --mn-clogo-font: 0.95rem;

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--mn-clogo-size);
  height: var(--mn-clogo-size);
  flex: 0 0 auto;
  border-radius: var(--mn-clogo-radius);
  overflow: hidden;
  vertical-align: middle;
  /* Keeps a white logo from dissolving into a white card. */
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.mn-clogo-mono {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--mn-clogo-tint);
  color: #fff;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--mn-clogo-font);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  user-select: none;
}

.mn-clogo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* contain, not cover: a college crest must not be cropped. The white plate
     behind it is what stops a transparent PNG reading as tinted. */
  object-fit: contain;
  background: #fff;
  padding: 2px;
}

/* Longer monograms need to give back some size or they touch the edges. */
.mn-clogo-len2 .mn-clogo-mono { font-size: calc(var(--mn-clogo-font) * 0.82); letter-spacing: 0; }
.mn-clogo-len3 .mn-clogo-mono { font-size: calc(var(--mn-clogo-font) * 0.62); letter-spacing: -0.02em; }

.mn-clogo-xs { --mn-clogo-size: 24px; --mn-clogo-radius: 6px;  --mn-clogo-font: 0.62rem; }
.mn-clogo-sm { --mn-clogo-size: 32px; --mn-clogo-radius: 8px;  --mn-clogo-font: 0.8rem; }
.mn-clogo-md { --mn-clogo-size: 40px; --mn-clogo-radius: 10px; --mn-clogo-font: 0.95rem; }
.mn-clogo-lg { --mn-clogo-size: 56px; --mn-clogo-radius: 12px; --mn-clogo-font: 1.3rem; }
.mn-clogo-xl { --mn-clogo-size: 88px; --mn-clogo-radius: 16px; --mn-clogo-font: 2rem; }

@media (max-width: 640px) {
  .mn-clogo-lg { --mn-clogo-size: 48px; --mn-clogo-radius: 11px; --mn-clogo-font: 1.1rem; }
  .mn-clogo-xl { --mn-clogo-size: 64px; --mn-clogo-radius: 14px; --mn-clogo-font: 1.5rem; }
}

/* 280-320px phones are a real slice of this site's traffic. */
@media (max-width: 360px) {
  .mn-clogo-md { --mn-clogo-size: 36px; --mn-clogo-font: 0.86rem; }
  .mn-clogo-lg { --mn-clogo-size: 44px; --mn-clogo-font: 1rem; }
  .mn-clogo-xl { --mn-clogo-size: 56px; --mn-clogo-font: 1.3rem; }
}

@media print {
  .mn-clogo { box-shadow: none; border: 1px solid #ccc; }
}
