/* ============================================================================
   BASE
   Reset, the webfont, and the handful of classes both pages share.
   Page-specific rules live in showcase.css / luts.css.
   ========================================================================== */

@font-face {
  font-family: Linebeam;
  src: url("../resources/fonts/Linebeam.ttf");
  font-display: swap;
}

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

html,
body {
  background: var(--bg);
}

body {
  color: var(--text);
  font-family: var(--font-body);
}

/* The ✖ wallpaper is opt-in per page, not global.
   Add this class to a page wrapper to switch it on; the showcase runs
   without it so nothing competes with the photographs. */
.has-pattern {
  background-image: var(--pattern-tile);
  background-size: var(--pattern-size);
}

::selection {
  background: transparent;
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

/* Keyboard users still need to see where they are. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --- Layout ------------------------------------------------------------- */

/* Centres content and applies the page gutter. Used by every top-level row. */
.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- Shared type -------------------------------------------------------- */

/* Small uppercase monospace text: eyebrows, counters, hints, image labels. */
.label {
  font-family: var(--font-mono);
  font-size: var(--label-size);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--text-faint);
}

/* The big Linebeam wordmark: "bilder." / "luts." */
.title {
  font-family: var(--font-display);
  line-height: 0.85;
  letter-spacing: -2px;
  margin: 0;
}

/* --- Page header -------------------------------------------------------- */

.top-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4vmin;
}

.top-bar__back {
  color: var(--text);
  font-size: 1.6rem;
  font-weight: 400;
  margin: 0;
}

.top-bar__back:hover {
  color: var(--accent);
}

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

/* Outlined control that fills with the accent on hover.
   Shared by the carousel arrows and the .cube download links. */
.btn-ghost {
  display: inline-block;
  font-family: var(--font-mono);
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition:
    background var(--transition-ui),
    color var(--transition-ui),
    border-color var(--transition-ui),
    opacity var(--transition-ui);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn-ghost:disabled {
  opacity: 0.25;
  cursor: default;
}

/* --- Missing-image placeholder ------------------------------------------
   Sits behind every image. If a file is missing you see the striped panel
   and the filename it was looking for, instead of a blank box.            */

.placeholder {
  position: absolute;
  inset: 0;
  background-image: var(--stripes);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
}

.placeholder--raised {
  background-color: var(--surface-raised);
  background-image: var(--stripes-strong);
}

.placeholder__text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--text-ghost);
}

/* --- Motion preferences -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
