@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/assets/fonts/hanken-grotesk-latin-var.woff2') format('woff2');
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/assets/fonts/source-serif-4-latin-400-opsz.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1c1c1e;
  --text: #3a3836;
  --muted: #6b655e;
  --grey: #77716a;
  --line: #e3dfd8;
  --cognac: #9c6b3f;
  --cognac-dark: #7a5230;
  --walnut: #5a3b26;
  --walnut-dark: #241a13;
  --chalk: #f4f1ec;
  --stone: #eceae6;
  --danger: #8f2d1f;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --gutter: clamp(20px, 3vw, 40px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --morph: cubic-bezier(0.65, 0, 0.35, 1);
}

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

:focus,
:focus-visible {
  outline: none;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
}

p,
ul {
  margin: 0;
}

h1,
h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
}

h1 {
  font-size: clamp(34px, 3.8vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.012em;
}

h2 {
  font-size: 22px;
  line-height: 1.25;
}

a {
  color: var(--cognac-dark);
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition:
    color 0.3s,
    text-decoration-color 0.3s;
}

a:hover {
  color: var(--cognac);
  text-decoration-color: var(--cognac);
}

code {
  font-size: 14px;
}

.wrap {
  display: block;
  overflow-wrap: anywhere;
}

/* Buttons */

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 26px;
  border: 0;
  border-radius: 0;
  background: none;
  white-space: nowrap;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.45s var(--ease);
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--cognac);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}

.btn:hover {
  color: #ffffff;
}

.btn:hover::before {
  transform: scaleX(1);
}

.btn--solid {
  min-height: 52px;
  padding: 0 28px;
  background: var(--walnut);
  color: #ffffff;
  font-size: 12px;
}

.btn--outline {
  border: 1px solid var(--cognac);
  color: var(--cognac-dark);
}

.btn--danger {
  min-height: 52px;
  padding: 0 28px;
  background: var(--danger);
  color: #ffffff;
  font-size: 12px;
}

.btn--danger::before {
  background: var(--walnut-dark);
}

.text-btn {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  color: var(--cognac-dark);
  font: inherit;
  cursor: pointer;
  transition: color 0.3s;
}

.text-btn:hover {
  color: var(--cognac);
}

/* Formulare */

label {
  display: block;
  margin-bottom: 20px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

input[type='text'],
input[type='email'],
input[type='password'] {
  display: block;
  width: 100%;
  min-height: 50px;
  margin-top: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
  color: var(--ink);
  font: 400 16px/1.4 var(--sans);
  transition: border-color 0.3s;
}

input[type='text']:hover,
input[type='email']:hover,
input[type='password']:hover {
  border-color: var(--cognac);
}

.message {
  margin: 0 0 24px;
  padding: 14px 16px;
  background: var(--chalk);
  color: var(--ink);
  font-size: 15px;
}

.message p {
  margin-bottom: 8px;
}

.message-error {
  background: #f6ebe7;
  color: var(--danger);
}

.hint,
.aside {
  color: var(--muted);
  font-size: 15px;
}

.aside {
  margin-top: 20px;
}

/* Logo */

.logo-morph {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: auto;
  overflow: visible;
  transform: translateY(-50%) scale(1);
  transform-origin: 0 50%;
  transition: transform 0.9s var(--morph);
}

.is-compact .logo-morph {
  transform: translateY(-50%) scale(1.6);
}

.lm {
  transform-box: view-box;
  transition:
    transform 0.9s var(--morph),
    opacity 0.45s ease 0.45s;
}

.is-compact .lm {
  transition:
    transform 0.9s var(--morph),
    opacity 0.45s ease 0s;
}

.is-compact .lm-fade {
  opacity: 0;
}

.is-compact .lm-b {
  transform: translateX(-521.5px);
}

.lm.lm-cs,
.lm.lm-cser,
.is-compact .lm.lm-cs,
.is-compact .lm.lm-cser {
  transition:
    transform 0.9s var(--morph),
    opacity 0.5s ease 0.2s;
}

.lm-cs {
  transform-origin: 1024.76px 58.89px;
  transform: translate(0, 0) scale(1);
  opacity: 1;
}

.is-compact .lm-cs {
  transform: translate(-923.86px, -58.89px) scale(2.383);
  opacity: 0;
}

.lm-cser {
  transform-origin: 761.1px 0;
  transform: translate(263.66px, 58.89px) scale(0.4196);
  opacity: 0;
}

.is-compact .lm-cser {
  transform: translate(-660.2px, 0) scale(1);
  opacity: 1;
}

@media (hover: hover) {
  .site-header.is-compact .site-header__brand:hover .logo-morph {
    transform: translateY(-50%) scale(1);
  }

  .site-header.is-compact .site-header__brand:hover .lm {
    transition:
      transform 0.9s var(--morph),
      opacity 0.45s ease 0.45s;
  }

  .site-header.is-compact .site-header__brand:hover .lm.lm-cs,
  .site-header.is-compact .site-header__brand:hover .lm.lm-cser {
    transition:
      transform 0.9s var(--morph),
      opacity 0.5s ease 0.2s;
  }

  .site-header.is-compact .site-header__brand:hover .lm-fade {
    opacity: 1;
  }

  .site-header.is-compact .site-header__brand:hover .lm-b {
    transform: none;
  }

  .site-header.is-compact .site-header__brand:hover .lm-cs {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }

  .site-header.is-compact .site-header__brand:hover .lm-cser {
    transform: translate(263.66px, 58.89px) scale(0.4196);
    opacity: 0;
  }
}

/* Seitenwechsel */

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #ffffff;
  animation: page-transition-failsafe 0.4s ease 2.8s forwards;
  transition: opacity 0.4s ease;
}

.page-transition__logo {
  position: relative;
  width: min(560px, 76vw);
  height: 48px;
}

.page-transition.is-compact .logo-morph {
  transform: translate(40.19%, -50%) scale(1.6);
}

.page-transition.is-instant .logo-morph,
.page-transition.is-instant .lm {
  transition: none;
}

.page-transition.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none;
  transition:
    opacity 0.4s ease,
    visibility 0s linear 0.4s;
}

.page-transition.is-leaving {
  opacity: 1;
  visibility: visible;
  animation: none;
  transition: opacity 0.25s ease;
}

@keyframes page-transition-failsafe {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.97);
  color: var(--ink);
  transition: box-shadow 0.5s;
}

.site-header.is-shadow {
  box-shadow:
    0 1px 0 var(--line),
    0 10px 30px rgba(0, 0, 0, 0.04);
}

.site-header__bar {
  max-width: 1360px;
  height: 76px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 22px;
  transition: height 0.6s var(--morph);
}

.site-header.is-compact .site-header__bar {
  height: 64px;
}

.site-header__brand {
  position: relative;
  display: block;
  width: 290px;
  max-width: 58vw;
  height: 48px;
  flex: none;
  margin-right: auto;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11.5px;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 1px;
  background: var(--cognac);
  transform: scaleX(0);
  transition: transform 0.45s var(--ease);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition:
    color 0.3s,
    border-color 0.3s;
}

.icon-btn:hover {
  border-color: var(--cognac);
  color: var(--cognac-dark);
}

/* Anmeldeseiten */

.gate {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) 3fr;
  min-height: 100vh;
}

.gate-brand {
  display: grid;
  place-items: center;
  background: var(--walnut);
}

.gate-main {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 64px 24px;
  align-self: center;
}

.gate-logo {
  position: relative;
  width: 290px;
  max-width: 100%;
  height: 48px;
  margin-bottom: 56px;
}

.gate-main h1 {
  margin-bottom: 28px;
}

.gate-main p {
  margin-bottom: 20px;
}

.gate-main form .btn {
  width: 100%;
  margin-top: 8px;
}

.gate-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin-top: 48px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11.5px;
  font-weight: 500;
}

.footer-link:hover {
  color: var(--cognac-dark);
}

.qr svg {
  width: 200px;
  height: 200px;
  margin-bottom: 20px;
}

.codes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

/* Inhalt */

.content {
  max-width: 1180px;
  min-height: calc(100vh - 76px - 110px);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) 96px;
}

.head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

section {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

section h2 {
  margin-bottom: 18px;
}

section p {
  margin-bottom: 8px;
}

.status {
  padding: 4px 10px;
  background: var(--stone);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-released {
  background: var(--walnut);
  color: #ffffff;
}

.status-locked {
  background: var(--ink);
  color: #ffffff;
}

.actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.actions {
  margin-top: 24px;
}

.row-actions {
  gap: 14px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th {
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 13px 14px 13px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.list {
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.narrow {
  max-width: 480px;
}

.inline {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-top: 28px;
}

.inline label {
  margin: 0;
}

/* Footer */

.site-footer {
  padding: 28px 0;
  background: var(--stone);
}

.site-footer__nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
}

@media (max-width: 760px) {
  .site-header__bar {
    gap: 12px;
  }

  .site-header__brand {
    flex: 0 1 auto;
    width: 46vw;
    min-width: 0;
  }

  .site-header__nav {
    gap: 12px;
  }

  .gate {
    grid-template-columns: 1fr;
    grid-template-rows: 120px 1fr;
  }

  .gate-brand img {
    width: 64px;
    height: 64px;
  }

  .gate-main {
    padding: 40px 20px;
  }

  .inline {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-transition {
    display: none;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
