/* Reset, atmosphere and typography. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--hx-sky-0);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--hx-font);
  font-size: var(--hx-fs-body);
  line-height: 1.45;
  color: var(--hx-text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

/* The midnight gradient lives on a fixed pseudo-element (iOS ignores background-attachment: fixed). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    var(--hx-sky-0) 0%,
    var(--hx-sky-25) 25%,
    var(--hx-sky-50) 50%,
    var(--hx-sky-70) 70%,
    var(--hx-sky-85) 85%,
    var(--hx-sky-100) 100%
  );
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: var(--hx-accent);
}

button {
  font: inherit;
}

/* `display` rules on components must not defeat the hidden attribute. */
[hidden] {
  display: none !important;
}

table {
  border-collapse: collapse;
}

/* Visible keyboard focus everywhere; never removed. */
:focus-visible {
  outline: 2px solid var(--hx-focus);
  outline-offset: 2px;
  border-radius: var(--hx-radius-sm);
}

.hx-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hx-skip {
  position: absolute;
  left: var(--hx-space-3);
  top: -100px;
  z-index: 1000;
  padding: var(--hx-space-2) var(--hx-space-4);
  background: var(--hx-sky-85);
  color: var(--hx-text);
  border: 1px solid var(--hx-line-strong);
  border-radius: var(--hx-radius-sm);
}

.hx-skip:focus {
  top: var(--hx-space-3);
}

/* Compact uppercase micro-heading. */
.hx-micro {
  font-size: var(--hx-fs-micro);
  font-weight: 600;
  letter-spacing: var(--hx-track-micro);
  text-transform: uppercase;
  color: var(--hx-text-muted);
}

.hx-noscript {
  margin: var(--hx-space-4);
  padding: var(--hx-space-4);
  border: 1px dashed var(--hx-line-strong);
  border-radius: var(--hx-radius);
  background: var(--hx-surface);
  color: var(--hx-text);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
