/*=============== JOHN JUG – THEME ON TOP OF THE ETHERLOCKED STYLE ===============
  Loaded only by john-jug.html, after styles.css and etherlocked-cartoon.css.
  The page uses <body class="ether-page jug-page">, so it gets every
  component of the EtherLocked page (hero, cards, TOC, narrative rows,
  buttons, menu, footer). This file only:
    1. swaps the colour tokens for the game's palette (the office's deep
       teal, the water blue of the jug and the gold of the Messiah's halo),
    2. puts the blurred office behind the hero,
    3. styles the story strip, the run cards and the cutscene faces.
===================================================================== */

/* ───────────── 1. TOKENS ───────────── */
.jug-page {
  /* ground: the office after hours, a deep blue-green */
  --paper: rgb(22, 36, 42); /* page background */
  --paper-2: rgb(31, 49, 57); /* cards */
  --paper-3: rgb(43, 65, 75); /* chips and small buttons */
  --night: rgb(14, 25, 30); /* footer, menu, frames */
  --text: #e9f2f4;
  --ink: #12222a;
  --pencil: #8aa5ae;

  /* accents: the water in the jug, and the Messiah's gold halo */
  --orange: #5cc6e8;
  --orange-hi: #84d8f2;
  --orange-dk: #9fe1f6;
  --mustard: #f3d27a;
  --brick: #9fe1f6; /* outline of the Play on itch.io button */
  --itch: #2a86b0; /* water blue, for the Play on itch.io button */
  --itch-hi: #3398c6;
  --mark: rgba(92, 198, 232, 0.16);

  background-color: var(--paper);
}

/* ───────────── 2. HERO: the office behind the title ───────────── */
.jug-page .work-details {
  overflow: hidden;
  background: var(--night) url("../img/JohnJug/jj-hero-bg.webp") 50% 40% / cover no-repeat;
}

.jug-page .jug-hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(14, 25, 30, 0.4) 0%, rgba(14, 25, 30, 0.8) 100%),
    linear-gradient(to bottom, rgba(14, 25, 30, 0.25) 0%, rgba(14, 25, 30, 0.75) 100%);
}

.jug-page .work-details .intro {
  position: relative;
  z-index: 1;
}

.jug-page .work-title {
  text-shadow: 0 4px 0 rgba(14, 25, 30, 0.6), 0 10px 40px rgba(0, 0, 0, 0.7);
}

/* ───────────── 3. CONTENT ───────────── */
/* a wide picture straight under a section title */
.jug-page .project-section > .section-title + .loop-diagram {
  margin-top: 0;
}

.jug-page .project-section > .loop-diagram + .about-description1,
.jug-page .project-section > .loop-diagram + .mech-cards {
  margin-top: var(--flow-gap);
}

/* gameplay loop with two steps instead of three: one arrow between the
   boxes, and the return line runs from the second box back to the first */
.jug-page .loop-flow--two {
  grid-template-columns: auto minmax(0.8rem, 1fr) auto;
}

.jug-page .loop-flow--two .loop-flow__return-mid {
  grid-column: 2 / 3;
}

.jug-page .loop-flow--two .loop-flow__return-end {
  grid-column: 3;
}

/* the story in three pictures: empty jug, the prayer, the full jug */
.jug-page .jug-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-s);
  max-width: var(--content-width);
  margin-block: var(--flow-gap);
}

.jug-page .jug-strip img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

/* the run: two cards side by side, the progress bar across the full width
   underneath them */
.jug-page .mech-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-m);
  max-width: var(--content-width);
}

.jug-page .mech-card {
  display: flex;
  flex-direction: column;
}

.jug-page .mech-card:last-child {
  grid-column: 1 / -1;
}

.jug-page .mech-card .contribution-card {
  flex: 1;
}

/* the full-width progress bar card: the redrawn bar beside the text */
.jug-page .mech-card--bar .contribution-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: var(--space-l);
  align-items: start;
}

.jug-page .mech-card--bar .jug-progress {
  grid-row: 1 / span 2;
  align-self: center;
  margin-bottom: 0;
}

/* card text: the same size as the My contribution cards, key words with
   the same highlighter mark as the paragraphs on the page */
.jug-page .mech-text {
  font-size: var(--fs-body-s);
  line-height: var(--lh-body);
  color: var(--text);
}

.jug-page .mech-text strong {
  padding: 0.02em 0.18em;
  margin-inline: -0.05em;
  font-weight: 400;
  color: var(--orange-dk);
  background: var(--mark);
  border-radius: 0.4em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* the progress bar from the game, redrawn: a thin bar filling with water
   and the jug icon beside it */
.jug-page .jug-progress {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--space-xs);
  height: 5rem;
  margin-bottom: var(--space-s);
}

.jug-page .jug-progress__bar {
  position: relative;
  width: 0.45rem;
  height: 100%;
  overflow: hidden;
  background: var(--night);
  border-radius: 1rem;
}

.jug-page .jug-progress__fill {
  position: absolute;
  inset: 40% 0 0;
  background: var(--orange);
  border-radius: inherit;
}

.jug-page .jug-progress img {
  width: auto;
  height: 3.2rem;
}

/* cutscenes: Stacy and Bob in despair, side by side */
.jug-page .jug-faces {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: var(--space-xs);
  width: min(22rem, 100%);
  padding: var(--space-s) var(--space-s) 0;
  overflow: hidden;
  background: var(--paper-2);
  border-radius: var(--radius);
}

.jug-page .jug-faces img {
  display: block;
  width: 50%;
  height: auto;
}

@media (max-width: 768px) {
  .jug-page .loop-flow--two {
    grid-template-columns: minmax(0, auto) minmax(0.9rem, 1fr) minmax(0, auto);
  }

  .jug-page .mech-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .jug-page .jug-strip {
    gap: var(--space-2xs);
  }

  .jug-page .jug-faces {
    align-self: center;
  }
}
