/* COMPONENTS: nav, footer, buttons, cards, media blocks, fallbacks, preferences panel, cursor. */

/* ---------- Nav ---------- */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem var(--gutter);
  font-family: var(--font-ui);
  font-weight: 500;
}
.site-logo { text-decoration: none; font-size: 0.9375rem; }
.site-menu { display: flex; gap: 1.25rem; margin-left: auto; }
.site-menu a {
  text-decoration: none;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.site-menu a:hover, .site-menu a[aria-current="page"] { color: var(--red-deep); }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: var(--space) var(--gutter) 1.5rem;
  font-size: 0.75rem;
  color: var(--red-deep);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-credit { display: flex; align-items: center; gap: 0.25rem; }
.prefs-open {
  appearance: none;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  background: var(--red-deep);
  color: var(--paper);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.8125rem;
  padding: 0.6rem 1rem;
  border-radius: 2px;
  text-decoration: none;
  transition: opacity 0.3s ease;
}
.button:hover { opacity: 0.85; }

/* ---------- Media blocks ----------
   Every video and photo sits in a .media block with a reserved aspect ratio,
   so the layout never jumps. The block starts as a plain palette colour and
   the picture fades in over it. */
.media {
  position: relative;
  overflow: hidden;
  background: var(--block);
  width: 100%;
}
.media-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.media.is-loaded .media-item { opacity: 1; }

.media-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.55;
}

/* ---------- Unavailable state (media fallback) ---------- */
.unavailable {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  text-align: center;
  background: var(--block);
  color: var(--ink);
}
.unavailable-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.2;
}
.unavailable-actions { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; justify-content: center; font-size: 0.8125rem; }
.unavailable-actions a, .unavailable-actions button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--red-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.media.is-unavailable .media-item,
.media.is-unavailable .media-label { display: none; }
/* Small cards: keep the message short. */
.card .unavailable-title { font-size: 0.9375rem; }

/* ---------- Cards ---------- */
.card {
  display: block;
  text-decoration: none;
  color: inherit;
  break-inside: avoid;
  margin-bottom: 1.25rem;
}
.card .media { transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.card:hover .media { transform: scale(1.015); }
.card-caption { display: flex; flex-direction: column; margin-top: 0.4rem; }
.card-brand { font-family: var(--font-ui); font-weight: 500; font-size: 0.9375rem; }
.card-role { font-size: 0.75rem; }

/* ---------- Preferences panel (opened from the quiet dot in the footer) ---------- */
.prefs {
  position: fixed;
  right: var(--gutter);
  bottom: 3.5rem;
  z-index: 50;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 0.875rem;
  min-width: 13rem;
  font-size: 0.8125rem;
}
.prefs[hidden] { display: none; }
.prefs-title {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.prefs-options { display: flex; gap: 0.375rem; margin-bottom: 0.75rem; }
.prefs-options button, .prefs-close {
  appearance: none;
  background: none;
  border: 1px solid var(--ink);
  color: inherit;
  font: inherit;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}
.prefs-options button[aria-checked="true"] { background: var(--ink); color: var(--paper); }
.prefs-close { border-color: transparent; padding-left: 0; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Custom cursor (desktop only; added by custom-cursor.js) ---------- */
.cursor-dot {
  position: fixed;
  left: 0; top: 0;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--red);
  pointer-events: none;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s ease, width 0.25s ease, height 0.25s ease, margin 0.25s ease;
}
.cursor-dot.is-visible { opacity: 1; }
.cursor-dot.is-big { width: 36px; height: 36px; margin: -18px 0 0 -18px; opacity: 0.55; }
html.has-custom-cursor, html.has-custom-cursor a, html.has-custom-cursor button { cursor: none; }
