/*
 * Herbadrug UI — shared low-level foundation
 * FTP: /user/documents/herbadrug-ui/css/core.css
 * Keep brand-specific colors and compositions out of this file.
 */

:root {
  --hd-container: 76rem;
  --hd-reading-width: 42rem;
  --hd-page-gutter: clamp(1rem, 3vw, 2rem);
  --hd-space-2xs: 0.375rem;
  --hd-space-xs: 0.625rem;
  --hd-space-sm: 1rem;
  --hd-space-md: clamp(1.5rem, 3vw, 2.25rem);
  --hd-space-lg: clamp(2.5rem, 5vw, 4.5rem);
  --hd-space-xl: clamp(4rem, 8vw, 7.5rem);
  --hd-radius-sm: 0.375rem;
  --hd-radius-md: 0.75rem;
  --hd-focus: #1677ff;
  --hd-motion-fast: 180ms;
  --hd-motion-base: 260ms;
  --hd-ease: cubic-bezier(0.2, 0.75, 0.25, 1);
  --hd-z-content: 1;
  --hd-z-overlay: 2;
}

.hd-brand,
.hd-brand *,
.hd-brand *::before,
.hd-brand *::after,
.hd-brand-top,
.hd-brand-top *,
.hd-brand-top *::before,
.hd-brand-top *::after,
.hd-brand-bottom,
.hd-brand-bottom *,
.hd-brand-bottom *::before,
.hd-brand-bottom *::after {
  box-sizing: border-box;
}

.hd-container {
  width: min(100%, var(--hd-container));
  margin-inline: auto;
  padding-inline: var(--hd-page-gutter);
}

.hd-reading-width {
  max-width: var(--hd-reading-width);
}

.hd-flow > * {
  margin-block: 0;
}

.hd-flow > * + * {
  margin-block-start: var(--hd-flow-space, var(--hd-space-sm));
}

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

.hd-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hd-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.75rem 1.125rem;
  border: 1px solid currentColor;
  border-radius: var(--hd-radius-sm);
  color: inherit;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    color var(--hd-motion-fast) ease,
    background-color var(--hd-motion-fast) ease,
    border-color var(--hd-motion-fast) ease,
    transform var(--hd-motion-fast) ease;
}

.hd-button:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.hd-button:active {
  transform: translateY(1px);
}

.hd-brand a:focus-visible,
.hd-brand-top a:focus-visible,
.hd-brand-bottom a:focus-visible,
.hd-brand button:focus-visible,
.hd-brand-top button:focus-visible,
.hd-brand-bottom button:focus-visible {
  outline: 3px solid var(--hd-focus);
  outline-offset: 3px;
}

.hd-brand img,
.hd-brand-top img,
.hd-brand-bottom img {
  display: block;
  max-width: 100%;
  height: auto;
}

@media (prefers-reduced-motion: reduce) {
  .hd-brand *,
  .hd-brand *::before,
  .hd-brand *::after,
  .hd-brand-top *,
  .hd-brand-top *::before,
  .hd-brand-top *::after,
  .hd-brand-bottom *,
  .hd-brand-bottom *::before,
  .hd-brand-bottom *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
