/* Interactive primitives. Loaded after style.css. Four primitives only. */

/* 1. Primary button */
/* Carries the primitive instead of copying it. D-211. */
.btn-cv {
  text-decoration: none;
  border: none;
}

/* Below 640 the button is full width, so the label recentres. */
@media (max-width: 640px) {
  .btn-cv { justify-content: center; }
}

/* 2. Secondary button: no members left. */

/* 3. Contact control, defined once, used everywhere. */
.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--type-family-mono);
  font-size: var(--type-meta);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--meta-tracking);
  color: var(--text-meta);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--radius-os);
  transition:
    color var(--motion-state),
    border-color var(--motion-state),
    background-color var(--motion-state);
}

.btn-contact svg {
  width: var(--space-4);
  height: var(--space-4);
  flex-shrink: 0;
}

/* Steam glyph is a mask image: the icon sheet cannot draw it. */
.btn-steam-icon {
  width: var(--space-4);
  height: var(--space-4);
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: url("../images/steam_logo.png") center / contain no-repeat;
  mask: url("../images/steam_logo.png") center / contain no-repeat;
}

.btn-contact:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background-color: var(--action-ghost);
}

.btn-contact:active {
  background-color: var(--action-pressed);
  color: var(--text-on-action);
  transition-duration: var(--dur-press);
}

/* Inherits .hero-strip-value typography, else the text stays Switzer. */
.btn-contact .hero-strip-value {
  font: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
}

.btn-contact:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
}

.hero-strip-mail:active {
  box-shadow: inset 0 -1px 0 var(--action-pressed);
  transition-duration: var(--dur-press);
}

.hero-strip-mail:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
  box-shadow: none;
}

/* 4. System control */
/* .pp-external-link belongs to project-page.css alone. D-210. */
.exp-project-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--badge-border);
  border-radius: var(--radius-os);
  background: transparent;
  color: var(--badge-text);
  font-family: var(--type-family-mono);
  font-size: var(--type-meta);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--meta-tracking);
  transition:
    background-color var(--motion-state),
    border-color var(--motion-state),
    color var(--motion-state);
}

a.exp-project-chip:hover {
  background: var(--ctrl-bg-hv);
  border-color: var(--border-accent);
  color: var(--text-primary);
}

a.exp-project-chip:active {
  background: var(--action-pressed);
  color: var(--text-on-action);
  transition-duration: var(--dur-press);
}

a.exp-project-chip:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* Flagged: three cases outside the four primitives. No fifth variant added. */

/* Focus floor: :focus-visible on every interactive element. */
:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
}

/* Dotted, never solid. */
summary:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-os);
}

/* 24x24 minimum, WCAG 2.5.8. Projected hit area, drawn box unchanged. D-243. */
.footer-links a,
.page-back {
  position: relative;
}

.footer-links a::after,
.page-back::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  /* 32px tall, centred on the text box. */
  top: 50%;
  height: 32px;
  transform: translateY(-50%);
}

/* inline-block so the zone matches the text, not the column. */
.page-back { display: inline-block; }
