/* Palette matches the GNSS HAT Hugo docs (static/custom.css) */
@font-face {
  font-family: "Metropolis";
  src: url("fonts/Metropolis.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Liberation Sans";
  src: url("fonts/LiberationSans.woff2") format("woff2");
  font-weight: normal;
  font-display: swap;
}
@font-face {
  font-family: "Liberation Sans";
  src: url("fonts/LiberationSans-Bold.woff2") format("woff2");
  font-weight: bold;
  font-display: swap;
}

:root {
  --header-background: #242833;
  --header-font-color: #fff;
  --footer-background: #121212;
  --footer-font-color: #ccc;
  --body-background: #fff;
  --body-font-color: #121212;
  --muted-font-color: #5c5f66;
  --link-color: #334fb4;
  --accent-color: #e0e0e0;
  --accent-color-lite: #f3f3f3;
  --card-background: #fff;
  --media-background: #f3f3f3;
  --button-background: #121212;
  --button-font-color: #fff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --header-background: #1a1d24;
    --footer-background: #0e0e0e;
    --body-background: #1e2028;
    --body-font-color: #d4d4d4;
    --muted-font-color: #9a9ca3;
    --link-color: #6b8fd4;
    --accent-color: #2a2d35;
    --accent-color-lite: #23262e;
    --card-background: #23262e;
    --media-background: #2a2d35;
    --button-background: #334fb4;
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: "Liberation Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--body-font-color);
  background: var(--body-background);
}

a { color: var(--link-color); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
  flex-shrink: 0;
}
.icon--sm { width: 1.1rem; height: 1.1rem; }

/* --- Header --- */
.header {
  background: var(--header-background);
  color: var(--header-font-color);
  border-bottom: 3px solid #121212;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .75rem;
  padding-bottom: .75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: inherit;
}
.brand:hover { text-decoration: none; }

.brand__img {
  height: 3rem;
  width: auto;
  filter: invert(1) brightness(2);
}

.brand__title {
  font-family: "Metropolis", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.header__links { display: flex; gap: 1rem; }

.header__link {
  display: inline-flex;
  color: var(--header-font-color);
  opacity: .85;
  transition: opacity .15s;
}
.header__link:hover { opacity: 1; }

/* --- Main --- */
main { flex: 1 0 auto; padding-bottom: 3rem; }

.hero { padding: 3rem 0 2rem; }

.hero h1 {
  font-family: "Metropolis", sans-serif;
  font-size: 2.25rem;
  font-weight: 600;
  margin: 0 0 .5rem;
}

.hero p {
  margin: 0;
  font-size: 1.125rem;
  color: var(--muted-font-color);
}

.section-title {
  font-size: .8125rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted-font-color);
  margin: 0 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--accent-color);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 1.5rem;
}

/* --- Product card --- */
.product {
  display: flex;
  flex-direction: column;
  background: var(--card-background);
  border: 1px solid var(--accent-color);
  border-radius: .5rem;
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.product:not(.product--placeholder):hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
  transform: translateY(-2px);
}

.product__media {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--media-background);
  padding: 1.5rem;
  aspect-ratio: 16 / 11;
}
.product__media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.product__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem;
}

.product__title {
  font-family: "Metropolis", sans-serif;
  font-size: 1.375rem;
  font-weight: 600;
  margin: 0;
}
.product__title a { color: inherit; }

.product__variants {
  margin: .25rem 0 .75rem;
  font-size: .875rem;
  color: var(--muted-font-color);
}

.product__desc { margin: 0 0 1rem; font-size: .9375rem; }

.product__tags,
.product__links {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.product__tags li {
  font-size: .75rem;
  padding: .15rem .5rem;
  border-radius: 1rem;
  background: var(--accent-color-lite);
  border: 1px solid var(--accent-color);
}

.product__links { gap: .25rem 1rem; font-size: .875rem; }

.product__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: .3rem;
  border: 1px solid var(--button-background);
  background: var(--button-background);
  color: var(--button-font-color);
  font-size: .875rem;
  font-weight: bold;
}
.button:hover { text-decoration: none; opacity: .9; }

.button--ghost {
  background: transparent;
  color: var(--body-font-color);
  border-color: var(--accent-color);
}

.product--placeholder {
  border-style: dashed;
  background: transparent;
  justify-content: center;
  text-align: center;
  color: var(--muted-font-color);
  min-height: 12rem;
}
.product--placeholder .product__body { justify-content: center; flex: 0; }
.product--placeholder .product__desc { margin: .5rem 0 0; }

/* --- Footer (matches Hugo site footer) --- */
.footer {
  background: var(--footer-background);
  color: var(--footer-font-color);
  font-size: .78rem;
  padding: .6rem 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .15rem;
}

.footer__sep { opacity: .4; padding: 0 .2rem; }

.footer__link { color: #fff; }

.footer__icon-link {
  display: inline-flex;
  padding: 0 .3rem;
  opacity: .75;
  transition: opacity .15s;
}
.footer__icon-link:hover { opacity: 1; text-decoration: none; }
.footer__icon-link .icon { width: 1.1rem; height: 1.1rem; }

@media (max-width: 41rem) {
  .hero { padding: 2rem 0 1.5rem; }
  .hero h1 { font-size: 1.75rem; }
  .brand__img { height: 2.5rem; }
  .product-grid { grid-template-columns: 1fr; }
}
