/* =========================================================
   THE ELECTRIC ARCHIVE — shared styles for all text pages
   (index, directory, and each volume's intro page)
   Mobile styles are the default; the desktop block at the
   bottom only overrides sizes and widths.
   ========================================================= */

:root {
  --yellow: #ffc400;
  --pink: #f54897;
  --white: #fafafa;
  --black: #000000;
  --blue: #1107ac;
  --light: #dbdafd;            /* translucent black behind text */
  --gradientsoft: linear-gradient(135deg, #f5489657 0%, #1207ac77 100%);
  --display-font: 'Jersey 20', 'Helvetica', 'Arial Narrow', Arial, sans-serif;
  --body-font: system-ui, sans-serif;
}

/* ---------- Page background ---------- */
body {
  background-color: var(--gradientsoft);
  background-repeat: no-repeat;
  background-position: top left;
  background-attachment: fixed;
  background-size: cover;
  text-align: center;
  vertical-align: auto;
  display: grid;
  place-items: center;
  min-height: 50vh;
  margin: 200px;
}
/* One line per page: just the background image */
.page-index     { background-image: url(bg/indexbg.jpg); }
.page-directory { background-image: url(bg/directorybg.jpg); }
.page-2023      { background-image: url(bg/23bg.jpg); }
.page-2024      { background-image: url(bg/24bg.jpg); }
.page-2025      { background-image: url(bg/25bg.jpg); }

/* content boxes */
.box {
  background-color: var(--light);
  padding:1vw;
  border-radius: 1rem;
  width: 80vw;
}

/* Directory: spread the volume links down the screen */
.page-directory {
  display: grid;
  align-items: center;
  height: 64vh;
}

/* ---------- Text boxes (shared) ---------- */
h1, h2, h3, p, p2 {
  display: block;
  margin: auto;
  padding: 0.6vw;
}

h1, h2, h3 {
  font-family: var(--display-font);
  text-align: center;
}

h1 { font-size: 4rem; color: var(--pink); }
h2 { font-size: 3rem; color: var(--blue); font-weight: bold; }
h3 { font-size: 2rem; color: var(--blue); }

p, p2 {
  font-family: var(--body-font);
  font-weight: 400;
  color: var(--black);
  max-width: 80vw;
  width: auto;
  line-height: 2.5rem;
}

p  { font-size: 1.2rem;   font-style: normal; text-align: justify; font-weight:400;}
p2 { font-size: 1rem; font-style: italic; text-align: center; }

/* Short centred lines inside a normal paragraph style */
p.centred { text-align: center; }

a:link,
a:visited { color: var(--pink); }

/* ---------- Desktop ---------- */
@media (min-width: 1082px) {
  h1, h2, h3 { max-width: 60vw; }
  h1 { font-size: 3rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 2rem; }

  p, p2 { max-width: 50vw; line-height: 2.5rem ; }
  p  { font-size: 1rem; }
  p2 { font-size: 1rem; }
}
.box {
  max-width: 50vw;
  width: auto;
  min-width: 40vw;
}

/* ---------- Mobile & tablet fixes ----------
   Only applies below the desktop breakpoint, so the desktop
   view above is untouched. */
@media (max-width: 1081px) {
  body {
    margin: 0;
    padding: 2rem 16px;           /* 16px gutter instead of 200px margin */
    min-height: 100dvh;
    box-sizing: border-box;
    background-attachment: scroll;
  }

  /* iPhones ignore background-attachment: fixed and blow the image up
     to the full page height. This fixed layer keeps it screen-sized. */
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: inherit;
    background-size: cover;
    background-position: top left;
    background-repeat: no-repeat;
  }

  .page-directory { height: auto; }

  .box {
    max-width: 90vw;
    width: 100%;
    box-sizing: border-box;
    padding: 1.25rem 1rem;
  }

  h1, h2, h3 { overflow-wrap: break-word; }
  h1 { font-size: clamp(2rem, 11vw, 3rem); }
  h2 { font-size: clamp(1.6rem, 8vw, 2.5rem); }
  h3 { font-size: clamp(1.4rem, 6.5vw, 2rem); }

  p, p2 {
    max-width: none;
    line-height: 2rem;
    font-size: 1rem;             /* 2vw is only ~8px on a phone */
  }

  /* Justified text leaves big word gaps in a narrow column */
  p { text-align: left; }
  p.centred { text-align: center; }
}
