/* Raven Supernatural
   Palette taken from the hero woodcut: ink, moon paper, church-window crimson. */

@font-face {
  font-family: "IM Fell English";
  src: url("/assets/fonts/IMFellEnglish-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IM Fell English";
  src: url("/assets/fonts/IMFellEnglish-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #0a0805;
  --ink-soft: #2a2119;
  --paper: #f2d6b3;
  --paper-dim: #c7ad8c;
  --ash: #8f7a62;
  --crimson: #b3151b;
  --crimson-deep: #8c0f14;

  --serif: "IM Fell English", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--crimson); }
:focus-visible { outline: 2px solid var(--crimson); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--paper); color: var(--ink); padding: 0.5rem 1rem;
}
.skip:focus { top: 1rem; }

/* Masthead */

.masthead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding: 1rem var(--gutter);
}
.brand {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; font-size: 1.35rem; line-height: 1;
}
.brand img { width: 2.75rem; height: 2.75rem; }
.nav { display: flex; gap: 1.5rem; font-size: 1.1rem; }
.nav a { text-decoration: none; }
.nav a[aria-current="page"] { text-decoration: underline; }

/* Home hero: the woodcut is the page */

.hero { position: relative; margin: 0; }
.hero video, .hero .hero-still { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--ink); }
.hero-text { padding: 1.75rem var(--gutter) 0; }
.hero h1 {
  margin: 0; font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 5.5rem); line-height: 0.95; letter-spacing: -0.01em;
}
.hero p { margin: 0.9rem 0 0; max-width: 26rem; color: var(--paper-dim); font-style: italic; font-size: 1.35rem; line-height: 1.4; }

.home .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (min-width: 56rem) {
  .home .masthead {
    position: absolute; inset: 0 0 auto 0; z-index: 2;
    padding-bottom: 3rem;
    background: linear-gradient(to bottom, rgba(10, 8, 5, 0.6), rgba(10, 8, 5, 0));
  }
  .hero video, .hero .hero-still { max-height: 100svh; object-position: 50% 35%; }
  .hero::before {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(to right, rgba(10, 8, 5, 0.75) 0%, rgba(10, 8, 5, 0.35) 30%, rgba(10, 8, 5, 0) 50%);
  }
  .hero-text {
    position: absolute; z-index: 2;
    left: var(--gutter); top: 22%;
    padding: 0; max-width: 40%;
  }
  .hero h1 { font-size: clamp(3.5rem, 7vw, 6.5rem); }
}

/* About, on the landing page */

.about {
  max-width: var(--measure); margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) var(--gutter) clamp(2rem, 5vw, 3rem);
  font-size: 1.3rem; line-height: 1.6;
}
.about p { margin: 0 0 1.1em; }
.about .epigraph { font-style: italic; font-size: 1.7rem; line-height: 1.2; color: var(--paper-dim); margin-bottom: 1.4rem; }

/* Broadside: event notice, set centred like a handbill */

.broadside {
  text-align: center;
  padding: clamp(3.5rem, 9vw, 6.5rem) var(--gutter);
  max-width: 44rem; margin: 0 auto;
}
.broadside .when { font-size: 1.25rem; margin: 0; color: var(--paper-dim); }
.broadside h2 {
  font-weight: 400; margin: 0.4rem 0 0.2rem;
  font-size: clamp(2.4rem, 7vw, 4.25rem); line-height: 1;
}
.broadside .where { font-style: italic; font-size: 1.35rem; margin: 0; }
.broadside .lede { margin: 1.75rem auto 0; max-width: 30rem; }
.broadside .facts { margin: 1.25rem 0 0; color: var(--paper-dim); }
.actions { display: flex; gap: 1.5rem; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 2rem; }

.actions.actions--left { justify-content: flex-start; margin: 1.75rem 0 0.5rem; }

.button {
  display: inline-block;
  background: var(--crimson); color: var(--paper);
  padding: 0.7rem 1.6rem 0.6rem;
  font-size: 1.2rem; text-decoration: none;
  border: 1px solid var(--crimson);
}
.button:hover { background: var(--crimson-deep); color: var(--paper); }

.ornament {
  font-family: "Zapf Dingbats", "Segoe UI Symbol", "Apple Symbols", "DejaVu Sans", serif;
  display: block; text-align: center; color: var(--crimson);
  font-size: 1.6rem; line-height: 1; margin: 0 auto; user-select: none;
}

/* Contents list of tales */

.contents { padding: clamp(3rem, 8vw, 5.5rem) var(--gutter); max-width: 72rem; margin: 0 auto; }
.contents > h1, .contents > h2 {
  font-weight: 400; font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.25rem; line-height: 1.05;
}
.contents > .intro { margin: 0 0 2.5rem; color: var(--paper-dim); max-width: var(--measure); }
.tale-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.25rem 3.5rem; }
@media (min-width: 48rem) { .tale-list { grid-template-columns: 1fr 1fr; } }
.tale-list a { text-decoration: none; display: block; }
.tale-list .t { display: block; font-size: 1.6rem; line-height: 1.15; }
.tale-list a:hover .t { color: var(--crimson); }
.tale-list .p { display: block; font-style: italic; color: var(--paper-dim); margin-top: 0.2rem; }
.tale-list .s { display: block; margin-top: 0.5rem; max-width: 30rem; }

/* Generic prose pages (about, privacy, events) */

.page { padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) clamp(3rem, 8vw, 6rem); }
.page .col { max-width: var(--measure); margin: 0 auto; }
.page h1 {
  font-weight: 400; font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1.02; margin: 0 0 0.5rem;
}
.page h2 { font-weight: 400; font-size: 1.65rem; line-height: 1.15; margin: 2.75rem 0 0.5rem; }
.page p, .page ul, .page dl { margin: 0 0 1.1rem; }
.page ul { padding-left: 1.2rem; }
.page .standfirst { font-style: italic; font-size: 1.3rem; color: var(--paper-dim); }

.programme { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.5rem; }
.programme dt { color: var(--paper-dim); }
.programme dd { margin: 0; }

/* Tale pages are printed on paper */

.paper { background: var(--paper); color: var(--ink); }
.paper a:hover { color: var(--crimson); }
.paper .masthead { border-bottom: 1px solid rgba(10, 8, 5, 0.2); }

.tale { padding: clamp(2.5rem, 8vw, 5.5rem) var(--gutter) 2rem; }
.tale header { text-align: center; max-width: 40rem; margin: 0 auto 2.75rem; }
.tale h1 {
  font-weight: 400; margin: 0;
  font-size: clamp(2.4rem, 8vw, 4.5rem); line-height: 1;
}
.tale .place { font-style: italic; font-size: 1.25rem; margin: 0.9rem 0 1.4rem; color: var(--ink-soft); }
.tale figure { margin: 0 auto 2.75rem; max-width: 56rem; }
.tale .body { max-width: var(--measure); margin: 0 auto; font-size: 1.35rem; line-height: 1.65; }
.tale .body p { margin: 0 0 1.05em; hyphens: manual; }
.tale .body > p:first-child::first-letter {
  float: left; color: var(--crimson);
  font-size: 4.4em; line-height: 0.78; padding: 0.06em 0.08em 0 0;
}
.tale blockquote { margin: 1.5em 0 1.5em 1.25em; font-style: italic; }
.tale blockquote p { margin: 0; }
.tale .finis { margin: 2.5rem auto 2rem; }
.tale .source {
  max-width: var(--measure); margin: 0 auto; font-size: 1rem; line-height: 1.5; color: var(--ink-soft);
}
.tale .source strong { font-weight: 400; font-style: italic; }

.tale-nav {
  max-width: var(--measure); margin: 3rem auto 0; padding-top: 1.5rem;
  border-top: 1px solid rgba(10, 8, 5, 0.2);
  display: flex; justify-content: space-between; gap: 1.5rem; font-size: 1.05rem;
}
.tale-nav a { text-decoration: none; }
.tale-nav span { display: block; font-style: italic; color: var(--ink-soft); font-size: 0.95rem; }
.tale-nav .next { text-align: right; margin-left: auto; }

.notice {
  background: var(--ink); color: var(--paper);
  text-align: center; padding: clamp(2.5rem, 7vw, 4rem) var(--gutter);
}
.notice p { margin: 0 auto; max-width: 32rem; }
.notice .actions { margin-top: 1.4rem; }

/* Footer */

.colophon {
  padding: 2.5rem var(--gutter) 3rem; font-size: 0.95rem; line-height: 1.5;
  color: var(--paper-dim); background: var(--ink);
  border-top: 1px solid rgba(242, 214, 179, 0.15);
}
.colophon .inner { max-width: 72rem; margin: 0 auto; display: grid; gap: 1.25rem; }
@media (min-width: 48rem) { .colophon .inner { grid-template-columns: auto 1fr auto; align-items: start; } }
.colophon img { width: 3rem; height: 3rem; }
.colophon p { margin: 0 0 0.4rem; }
.colophon nav { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-left: 2rem; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

@media print {
  .masthead nav, .colophon nav, .notice, .tale-nav, .skip { display: none; }
  body, .paper { background: #fff; color: #000; }
}
