/* Hempon Downloads 2.0 — shared foundation (M1) */
:root {
  color-scheme: dark;
  --hg-bg: #080d0c;
  --hg-surface: #101816;
  --hg-surface-raised: #141f1b;
  --hg-border: rgba(255, 255, 255, 0.10);
  --hg-border-strong: rgba(255, 255, 255, 0.17);
  --hg-text: #f2f7f4;
  --hg-muted: #9baaa3;
  --hg-mint: #75e4cc;
  --hg-teal: #11786d;
  --hg-radius-sm: 10px;
  --hg-radius-md: 16px;
  --hg-radius-lg: 24px;
  --hg-content-width: 1160px;
  --hg-page-gutter: clamp(18px, 4vw, 32px);
  --hg-motion-fast: 160ms;
  --hg-motion-standard: 220ms;
  --hg-ease: cubic-bezier(.2, .75, .25, 1);
}

html {
  scroll-padding-top: 100px;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  text-rendering: optimizeLegibility;
}

img, svg, video {
  max-width: 100%;
}

img {
  height: auto;
}

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--hg-mint, #75e4cc);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 11px 16px;
  border: 1px solid var(--hg-mint);
  border-radius: 999px;
  background: var(--hg-surface, #101816);
  color: var(--hg-text, #f2f7f4);
  font-size: 14px;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform var(--hg-motion-fast) var(--hg-ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Shared site navigation */
header {
  border-bottom: 1px solid var(--hg-border);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(var(--hg-content-width), calc(100% - (var(--hg-page-gutter) * 2)));
  min-height: 72px;
  gap: 22px;
}

.brand {
  min-width: 0;
  flex-shrink: 0;
}

.brand img {
  display: block;
  object-fit: contain;
}

.nav-links {
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
}

.nav-links a,
.footer-links a {
  transition: color var(--hg-motion-fast) var(--hg-ease),
    background-color var(--hg-motion-fast) var(--hg-ease),
    border-color var(--hg-motion-fast) var(--hg-ease);
}

.nav-links a:hover,
.footer-links a:hover,
.nav-links a.is-current,
.footer-links a.is-current {
  color: var(--hg-mint);
}

.nav-links a.is-current:not(.nav-cta) {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--hg-mint) 65%, transparent);
  text-underline-offset: 6px;
}

/* Shared interaction language */
.button,
button.button {
  min-height: 44px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  transition: transform var(--hg-motion-fast) var(--hg-ease),
    box-shadow var(--hg-motion-fast) var(--hg-ease),
    border-color var(--hg-motion-fast) var(--hg-ease),
    background-color var(--hg-motion-fast) var(--hg-ease);
}

.button:active,
button.button:active {
  transform: translateY(1px) scale(.99);
}

.button:focus-visible,
button.button:focus-visible {
  outline-offset: 3px;
}

/* Shared surface and card refinements; product-specific accents remain local. */
.panel,
.section-panel,
.app-card,
.service-card {
  border-color: var(--hg-border);
}

.panel,
.section-panel {
  border-radius: var(--hg-radius-lg);
}

.app-card,
.service-card {
  border-radius: var(--hg-radius-md);
}

/* Consistent footer rhythm across catalogue and product pages. */
.footer-inner {
  width: min(var(--hg-content-width), calc(100% - (var(--hg-page-gutter) * 2)));
  gap: 20px;
}

.footer-links {
  row-gap: 10px;
  column-gap: clamp(12px, 2vw, 22px);
}

/* Keep form controls within their responsive parent containers. */
:where(input, textarea, select, button) {
  max-width: 100%;
}

@media (max-width: 700px) {
  .nav {
    min-height: 66px;
    flex-wrap: wrap;
    row-gap: 8px;
    padding-block: 10px;
  }

  .nav-links {
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 14px;
  }

  .footer-inner {
    align-items: flex-start;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 420px) {
  .nav {
    align-items: flex-start;
  }

  .brand {
    max-width: 100%;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }
}

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