/* Shared styles for every page on ludochris.uk */

:root {
  --canal-ink: #0D1B20;
  --deep-water: #081115;
  --slate: #1C2C32;
  --brick: #2A2321;
  --chalk: #E9E1CC;
  --brass: #B5915A;
  --spectral: #A8E6E1;
  --display: 'Alegreya SC', Georgia, 'Times New Roman', serif;
  --text: 'Alegreya', Georgia, 'Times New Roman', serif;
  --gutter: clamp(1.25rem, 6vw, 6rem);
}

* { box-sizing: border-box; }

html { background: var(--deep-water); }

body {
  margin: 0;
  color: var(--chalk);
  font-family: var(--text);
  font-size: 1.1875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--chalk);
  text-decoration-color: var(--brass);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--brass); }
a:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Site navigation: the same two links on every page */
.site-nav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  padding: 1.25rem var(--gutter) 0;
}
.site-nav ul {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--display);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}
.site-nav a {
  display: inline-block;
  padding: 0.25rem 0;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.site-nav a[aria-current="page"] { border-bottom-color: var(--brass); }

/* The scene: one shared drawing of the canal at night */
.scene {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}

/* List pages (Factions, NPCs): the scene fixed behind a column of entries */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, #0A1519 0%, #13232A 55%, #1B2D33 70%);
}
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    rgba(10, 21, 25, 0.94) 0,
    rgba(10, 21, 25, 0.86) 40rem,
    rgba(10, 21, 25, 0.2) 75%);
}

.ledger {
  padding: clamp(2rem, 8vh, 5rem) var(--gutter) 2.5rem;
}

.ledger h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.75rem, 1.4rem + 4.5vw, 5rem);
  line-height: 1;
  letter-spacing: 0.01em;
}

.ledger .intro {
  margin: 0.75rem 0 0;
  max-width: 34rem;
  font-style: italic;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.35rem);
  color: var(--brass);
}

.entries {
  max-width: 36rem;
  margin: clamp(2.5rem, 7vh, 4.5rem) 0 0;
  padding: 0;
  list-style: none;
}

.entry {
  padding: 1.6rem 0 1.7rem;
  border-top: 1px solid rgba(233, 225, 204, 0.18);
}
.entry:last-child { border-bottom: 1px solid rgba(233, 225, 204, 0.18); }

.entry h2 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.65rem, 1.3rem + 1.1vw, 2.2rem);
  line-height: 1.1;
}
/* The brass diamond from the Free Carriers badge */
.entry h2::before {
  content: "";
  flex: none;
  width: 0.42rem;
  height: 0.42rem;
  background: var(--brass);
  transform: rotate(45deg);
}

.entry p { margin: 0.55rem 0 0; }

/* The line under a name: a faction's tier, or a person's role */
.entry .subhead {
  margin: 0.2rem 0 0;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  color: var(--brass);
}
.entry .subhead + p { margin-top: 0.45rem; }

/* Word on the street: hearsay, set apart from what the crew knows */
.entry .rumour {
  margin-top: 1rem;
  padding-left: 0.9rem;
  border-left: 2px solid rgba(181, 145, 90, 0.55);
  font-style: italic;
  color: rgba(233, 225, 204, 0.88);
}
.entry .rumour .said {
  display: block;
  font-family: var(--display);
  font-style: normal;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--brass);
}

/* On wider screens the diamond hangs in the margin, so names line up with the text */
@media (min-width: 641px) {
  .entry h2 { margin-left: calc(-0.42rem - 0.7rem); }
}

footer {
  max-width: 72rem;
  margin-top: clamp(4rem, 9vw, 7rem);
  padding-top: 1.25rem;
  border-top: 1px solid rgba(233, 225, 204, 0.18);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(233, 225, 204, 0.72);
}
footer p { margin: 0; max-width: 46rem; }

@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .backdrop::after { background: rgba(10, 21, 25, 0.86); }
}
