/* Gothic AI. The palette comes from the frames of Xardas' tower: moss on stone, torchlight, the red
   carpet; the hero's lines are gold and the npc's white, as in the shorts' subtitles. */
:root {
  --stone: #24271f;
  --stone-up: #2e3228;
  --rule: #474c3e;
  --bone: #ece4d2;
  --ash: #aca594;
  --torch: #f2b54a;
  --ember: #b0402c;

  --serif: "Alegreya", Georgia, serif;
  --sans: "Alegreya Sans", "Trebuchet MS", sans-serif;

  /* a 1.25 scale on 18px */
  --s-1: 0.8rem;
  --s0: 1rem;
  --s1: 1.25rem;
  --s2: 1.5625rem;
  --s3: 1.953rem;
  --s4: 2.441rem;
  --s5: 3.052rem;

  --wide: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  font-size: 112.5%;
  background: var(--stone);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--stone);
  color: var(--bone);
  font-family: var(--sans);
  font-size: var(--s0);
  line-height: 1.5;
  overflow-x: hidden;
}

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

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: var(--gutter); top: 0.5rem; background: var(--torch); color: var(--stone); padding: 0.4rem 0.8rem; z-index: 2; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 0.6em; }
h2 { font-size: var(--s3); }
p { margin: 0 0 1em; }

/* --- the bar ---------------------------------------------------------------------------------- */
.bar {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; justify-content: space-between;
  max-width: var(--wide); margin: 0 auto; padding: 1.25rem var(--gutter);
}
.mark { display: block; line-height: 0; }
.mark img { display: block; height: 2.75rem; width: auto; }  /* the channel's seal and lettering */
.bar nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.bar nav a { text-decoration: none; color: var(--ash); }
.bar nav a:hover { color: var(--torch); }

main { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: 3rem 0; }

/* --- the hero: the conversation is the page's picture ---------------------------------------- */
.hero {
  display: grid; gap: 2.5rem 3.5rem; padding-top: 2rem;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "scene" "short" "pitch";
}
@media (min-width: 60rem) {
  .hero { grid-template-columns: minmax(0, 1fr) 19rem; grid-template-areas: "scene short" "pitch short"; align-items: start; }
}
.scene { grid-area: scene; }
.short { grid-area: short; }
.pitch { grid-area: pitch; max-width: 38rem; }

.dialogue { max-width: 40rem; }
.line { margin: 0 0 1.4rem; }
.line .who { display: block; font-family: var(--sans); font-weight: 500; font-size: var(--s-1); color: var(--ash); margin-bottom: 0.15rem; }
.line .said { font-family: var(--serif); font-size: clamp(1.35rem, 1rem + 1.4vw, var(--s3)); line-height: 1.3; }
.line.by-hero .who, .line.by-hero .said { color: var(--torch); }
.line.last .said { font-size: clamp(1.7rem, 1.1rem + 2.4vw, var(--s5)); font-weight: 500; line-height: 1.15; }
.note { color: var(--ash); max-width: 36rem; font-size: 0.95rem; margin-top: 1.75rem; }

.short { position: relative; width: 100%; max-width: 19rem; justify-self: center; }
.short video, .short img, .short iframe {
  display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover;
  border-radius: 6px; background: var(--stone-up); border: 0;
}
.short .yt { display: block; position: relative; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; }
.short .play {
  position: absolute; left: 50%; top: 50%; width: 4.5rem; height: 4.5rem; margin: -2.25rem 0 0 -2.25rem;
  border-radius: 50%; background: rgba(36, 39, 31, 0.78); border: 2px solid var(--torch);
}
.short .play::after {
  content: ""; position: absolute; left: 1.75rem; top: 1.35rem;
  border-style: solid; border-width: 0.9rem 0 0.9rem 1.45rem; border-color: transparent transparent transparent var(--torch);
}
.short .toggle {
  position: absolute; right: 0.6rem; bottom: 0.6rem; font: 500 var(--s-1) var(--sans);
  color: var(--bone); background: rgba(36, 39, 31, 0.8); border: 1px solid var(--rule); border-radius: 4px;
  padding: 0.25rem 0.6rem; cursor: pointer;
}

.pitch h1 { font-family: var(--sans); font-weight: 700; font-size: clamp(1.6rem, 1.2rem + 1.6vw, var(--s4)); line-height: 1.12; }
.lede { font-family: var(--serif); font-size: var(--s1); line-height: 1.5; color: var(--bone); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.button {
  display: inline-block; padding: 0.6rem 1.1rem; border-radius: 4px; font-weight: 700; text-decoration: none;
  background: var(--torch); color: var(--stone); border: 1px solid var(--torch);
}
.button:hover { color: var(--stone); background: #f7c76d; }
.button.quiet { background: transparent; color: var(--bone); border-color: var(--rule); }
.button.quiet:hover { color: var(--torch); border-color: var(--torch); }

/* --- what works ------------------------------------------------------------------------------- */
.features { display: grid; gap: 1.75rem 3rem; margin: 0; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 48rem) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.features dt { font-weight: 700; font-size: var(--s1); margin-bottom: 0.25rem; }
.features dd { margin: 0; font-family: var(--serif); color: var(--ash); font-size: 1.05rem; line-height: 1.55; max-width: 32rem; }

/* --- how: a real sequence, so it is numbered ------------------------------------------------- */
.how > p { max-width: 38rem; font-family: var(--serif); font-size: 1.1rem; color: var(--ash); }
.flow { list-style: none; counter-reset: step; margin: 1.5rem 0 0; padding: 0; max-width: 40rem; }
.flow li {
  counter-increment: step; position: relative; padding: 0 0 1.1rem 3rem; font-size: 1.05rem;
}
.flow li::before {
  content: counter(step); position: absolute; left: 0; top: -0.2rem; width: 2rem; text-align: center;
  font: 700 var(--s2) var(--serif); color: var(--torch);
}
.flow li:not(:last-child)::after {
  content: ""; position: absolute; left: 1rem; top: 1.75rem; bottom: 0.25rem; border-left: 1px solid var(--rule);
}

/* --- the devlog: dates in order ----------------------------------------------------------------- */
.posts { list-style: none; margin: 0 0 1.5rem; padding: 0; border-left: 1px solid var(--rule); max-width: 44rem; }
.posts li { position: relative; padding: 0 0 2rem 1.75rem; }
.posts li::before {
  content: ""; position: absolute; left: -5px; top: 0.45rem; width: 9px; height: 9px; border-radius: 50%; background: var(--ember);
}
.posts time { display: block; color: var(--ash); font-size: var(--s-1); }
.posts a { font-family: var(--serif); font-weight: 700; font-size: var(--s2); text-decoration: none; line-height: 1.25; }
.posts a:hover { text-decoration: underline; text-decoration-color: var(--torch); }
.posts p { margin: 0.35rem 0 0; color: var(--ash); max-width: 38rem; }
.page { padding-top: 2rem; }
.page h1 { font-size: var(--s4); }

/* --- a post ------------------------------------------------------------------------------------- */
.post { max-width: 40rem; margin: 0 auto; padding: 2rem 0 3rem; }
.post header time { color: var(--ash); font-size: var(--s-1); }
.post h1 { font-size: clamp(2rem, 1.4rem + 2vw, var(--s5)); margin-top: 0.3rem; }
.post .short { margin: 0 auto 2.5rem; }
.text { font-family: var(--serif); font-size: 1.15rem; line-height: 1.65; }
.text h2 { font-size: var(--s2); margin-top: 2.2rem; }
.text h3 { font-size: var(--s1); margin-top: 1.8rem; }
.text img, .text video { display: block; max-width: 100%; height: auto; border-radius: 6px; margin: 1.5rem auto; }
.text blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 2px solid var(--torch); color: var(--bone); }
.text code { font-size: 0.85em; background: var(--stone-up); padding: 0.1em 0.35em; border-radius: 3px; }
.text pre { background: var(--stone-up); padding: 1rem; border-radius: 6px; overflow-x: auto; font-size: 0.85rem; line-height: 1.5; }
.text pre code { background: none; padding: 0; }
.text table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 0.95rem; }
.text th, .text td { border-bottom: 1px solid var(--rule); padding: 0.45rem 0.5rem; text-align: left; vertical-align: top; }
.back { margin-top: 3rem; font-family: var(--sans); }

/* --- footer ------------------------------------------------------------------------------------- */
.foot {
  max-width: var(--wide); margin: 2rem auto 0; padding: 2rem var(--gutter) 3rem; color: var(--ash);
  border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between;
}
.foot p { margin: 0; max-width: 40rem; }
.foot a { color: var(--ash); margin-right: 1rem; }
