body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wrap { max-width: 1240px; margin: 0 auto; width: 100%; }

header.page-head { margin-bottom: 36px; }

@media (min-width: 860px) {
  .wrap {
    display: grid;
    grid-template-columns: 17.5% 30% 35% 17.5%;
    gap: 48px;
    align-items: center;
    max-width: none;
  }
  header.page-head { grid-column: 2; margin-bottom: 0; }
  .ticket { grid-column: 3; }
  .auth-gate { grid-column: 3; }

  /* Quan .auth-gate es l'unic bloc visible (sense sessio i sense permis
     per veure el tiquet), es passa d'una graella de 2 columnes a un layout
     centrat de veritat, en lloc de deixar la caixa penjada a la columna 3.
     Cal mirar .auth-gate concretament (no #pageHead): hi ha estats sense
     sessio en que el .ticket es mostra igualment i l'#pageHead es l'unic
     amagat, i llavors la graella normal de 3 columnes s'ha de mantenir. */
  .wrap:has(#authGate:not([hidden])) {
    display: flex;
    justify-content: center;
  }
}

.admin-link[hidden] { display: none; }
.admin-link {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink-soft);
  opacity: 0.35;
  text-decoration: none;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}
.admin-link:hover, .admin-link:focus-visible {
  opacity: 1;
  background: rgba(22,35,63,0.06);
  outline: none;
}
.admin-link svg { width: 16px; height: 16px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow-brand {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--brand);
  padding: 3px 7px;
  border-radius: 5px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  margin-left: auto;
}
.lang-switch button {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft, #58698c);
  background: none;
  border: none;
  border-radius: 999px;
  padding: 3px 9px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.lang-switch button:hover { background: rgba(22,35,63,0.08); color: var(--ink); }
.lang-switch button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.lang-switch button.active { background: var(--brand); color: #fff; }
.lang-switch-authgate { margin: 0 0 14px; }

h1 {
  font-size: 32px;
  margin: 10px 0 8px;
  letter-spacing: -0.01em;
}

.subtitle { color: var(--ink-soft); font-size: 15px; max-width: 52ch; line-height: 1.5; }

.project-description {
  display: none;
  box-sizing: border-box;
  width: 100%;
  margin: 14px 0 0;
  padding: 12px 14px;
  max-width: 52ch;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: rgba(22,35,63,0.05);
  border-radius: 8px;
}
.project-description.visible { display: block; }

.header-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  /* La unitat ch es calcula amb la mida de font de l'element mateix: cal
     que coincideixi amb la de .project-description (14px) perque els
     52ch donin exactament la mateixa amplada en pixels als dos. */
  font-size: 14px;
  max-width: 52ch;
  margin-top: 72px;
}

.tickets-link {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: #fff;
  text-decoration: none;
  background: var(--brand-panel);
  border-radius: 8px;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.tickets-link:hover { color: #fff; background: var(--brand); transform: scale(1.05); text-decoration: none; }
@media (prefers-reduced-motion: reduce) {
  .tickets-link:hover { transform: none; }
}

.tickets-link-session:hover {
  background: var(--danger);
}
