/* ==========================================================================
   Komponenter — buttons, links, cards, foto, filter-tabs, logo-grid
   ========================================================================== */

/* --- Buttons ------------------------------------------------------------ */

/*
 * MagneButton-spec (Magne Skrift.pdf 2026-05-18):
 * Asymmetrisk hjørne — TL + BR rundet, TR + BL skarpe.
 * Barlow Condensed Medium, 11px, uppercase, tracking 0.08em.
 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.6875rem;   /* 11px */
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  padding: 10px 24px;     /* default size */
  border-radius: 12px 0 12px 0;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 200ms ease, border-color 200ms ease;
}
.btn:active {
  transform: scale(0.97);
}

/* Størrelser */
.btn-sm {
  padding: 6px 12px;
  border-radius: 8px 0 8px 0;
}
.btn-lg {
  padding: 12px 28px;
  border-radius: 16px 0 16px 0;
  font-size: 0.75rem;
}

/* Blå (navy/blaa) */
.btn-primary,
.btn-blue {
  background: hsl(var(--blaa));
  border-color: hsl(var(--blaa));
  color: hsl(var(--white));
}
.btn-primary:hover,
.btn-blue:hover {
  background: hsl(219 41% 44%);
  border-color: hsl(219 41% 44%);
  color: hsl(var(--white));
}

/* Lilla */
.btn-purple {
  background: hsl(var(--lilla));
  border-color: hsl(var(--lilla));
  color: hsl(var(--white));
}
.btn-purple:hover {
  background: hsl(var(--navy-deep));
  border-color: hsl(var(--navy-deep));
  color: hsl(var(--white));
}

/* Orange */
.btn-orange {
  background: hsl(var(--orange));
  border-color: hsl(var(--orange));
  color: hsl(var(--white));
}
.btn-orange:hover {
  background: hsl(25 86% 50%);
  border-color: hsl(25 86% 50%);
  color: hsl(var(--white));
}

/* Outline */
.btn-outline {
  background: transparent;
  border-color: hsl(var(--foreground));
  color: hsl(var(--foreground));
}
.btn-outline:hover {
  background: hsl(var(--foreground));
  color: hsl(var(--off-white));
}

/* Outline på lys baggrund */
.btn-outline-light {
  background: transparent;
  border-color: hsl(var(--white));
  color: hsl(var(--white));
}
.btn-outline-light:hover {
  background: hsl(var(--white));
  color: hsl(var(--navy));
}

/* Ghost — kun tekst + pil */
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: hsl(var(--navy));
  padding: 8px 0;
  border-radius: 0;
}
.btn-ghost::after {
  content: '→';
  transition: transform 200ms ease;
}
.btn-ghost:hover::after {
  transform: translateX(4px);
}

/* På mørk baggrund */
.btn-on-dark {
  background: hsl(var(--white));
  border-color: hsl(var(--white));
  color: hsl(var(--navy));
}
.btn-on-dark:hover {
  background: hsl(var(--white) / 0.9);
  color: hsl(var(--navy-deep));
}

/* --- Links -------------------------------------------------------------- */

/* Understreg glider ind fra venstre ved hover.
   Ekskluderer knapper, nav-links og card-links. */
a:not(.btn):not(.btn-primary):not(.btn-outline):not(.btn-ghost):not(.btn-on-dark):not(.nav-link):not(.no-underline):not(.card-link) {
  color: hsl(var(--navy));
  text-decoration: none;
  background-image: linear-gradient(hsl(var(--navy)), hsl(var(--navy)));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 300ms ease-out;
}
a:not(.btn):not(.btn-primary):not(.btn-outline):not(.btn-ghost):not(.btn-on-dark):not(.nav-link):not(.no-underline):not(.card-link):hover {
  background-size: 100% 1px;
}

/* --- Cards -------------------------------------------------------------- */

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid hsl(var(--border-light));
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px hsl(var(--navy) / 0.05);
}

/* --- Foto --------------------------------------------------------------- */

.photo {
  border-radius: var(--radius);
  overflow: hidden;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Filter-tabs -------------------------------------------------------- */

.filter-tab {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  padding: 8px 20px;
  border: 1px solid hsl(var(--border-light));
  border-radius: 100px;
  background: transparent;
  color: hsl(var(--warm-gray));
  cursor: pointer;
  transition: all 200ms ease;
}
.filter-tab:hover {
  border-color: hsl(var(--navy) / 0.3);
  color: hsl(var(--navy-text));
}
.filter-tab.active {
  background: hsl(var(--navy));
  color: hsl(var(--white));
  border-color: hsl(var(--navy));
}

/* --- Logo-grid ---------------------------------------------------------- */

.logo-cell img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.55;
  transition: filter 300ms ease, opacity 300ms ease;
}
.logo-cell:hover img {
  filter: grayscale(0%);
  opacity: 0.8;
}
