/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --green: #58b765;
  --white: #ffffff;
  /* Adobe Fonts family names first, then local / fallback fonts */
  --font-block: "workbench", "Workbench", monospace;
  --font-jp: "hiragino-mincho-pron", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --font-en: "adobe-caslon-pro", "Adobe Caslon Pro", "hiragino-mincho-pron", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", Georgia, serif;
  --pad: 4vw;      /* side gutter (mobile) */
  /* text size: 23px on a 390px iPhone, then grows slowly with the viewport.
     Images are sized as a share of the sheet width, so they fill the page at any
     width; the text flows continuously around them (no forced line breaks). */
  --fs: clamp(21px, calc(23px + (100vw - 390px) * 0.028), 72px);
  --lh: 1.3;       /* line-height of the flyer text */
  --wb-scale: 1.36em; /* Workbench size relative to the Mincho text */
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--white);
  color: var(--green);
  font-family: var(--font-en);
  line-height: var(--lh);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ===== Header ===== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65em var(--pad) 0.55em;
  font-size: var(--fs); /* header scales with the text */
}

.site-url {
  font-size: 1.6em;
  line-height: 1;
  letter-spacing: 0.01em;
}

.menu {
  display: grid;
  font-size: inherit; /* buttons don't inherit font-size by default */
  gap: 0.5em;
  width: 1.95em;
  padding: 0.2em 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.menu span {
  display: block;
  height: 0.12em;
  min-height: 2px;
  background: var(--green);
}

/* ===== Sheet (the flyer) ===== */
.sheet-wrap {
  width: calc(100% - var(--pad) * 2);
  margin: 0 auto;
}

.hero,
.hero.duo {
  display: none;             /* hero switched off on every width (trial); remove this rule to bring it back */
}

.hero {
  position: relative;
  aspect-ratio: 16 / 9;      /* one frame for all slides */
  overflow: hidden;
  margin-bottom: 0.5em;
  font-size: var(--fs);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  visibility: hidden;
}

.hero img.is-active {
  visibility: visible;
}

.hero img.plain {
  filter: none;            /* already green halftone (SVG): no duotone treatment */
  mix-blend-mode: normal;
}

.sheet {
  font-size: var(--fs);
  line-height: calc(var(--lh) * 1em); /* absolute, so larger inline fonts keep the same line pitch */
}

.title {
  font-size: 1em;
  font-weight: 400;
}

/* typewriter: letters are laid out from the start, only their visibility changes */
.title .ch {
  visibility: hidden;
}

.title .ch.on {
  visibility: visible;
}

.title .type.off .ch {
  visibility: hidden;        /* flicker: hide everything for a beat */
}

/* times: only the digits blink (hard on/off); the box / outline stays */
@keyframes blink-text {
  50% { color: transparent; }
}

.time {
  animation: blink-text 1.8s step-end infinite;
}

@media (prefers-reduced-motion: reduce) {
  .time { animation: none; }
}

/* ----- type styles ----- */
.wb {
  font-family: var(--font-block);
  font-weight: 400;
  font-size: var(--wb-scale);
}

.flow .wb,
.flow .time {
  white-space: nowrap; /* keep "Film 1:" / "Night Kiosk" / times in one piece */
}

.jp {
  font-family: var(--font-jp);
  font-weight: 300; /* Hiragino Mincho ProN W3 */
}

.box {
  border: 1px solid currentColor;
  padding: 0 0.12em;
  white-space: nowrap;
}

.time {
  font-family: var(--font-block);
  font-size: var(--wb-scale);
  padding: 0 0.3em;
  margin-right: 0.05em;
}

.time.solid {
  background: var(--green);
  color: var(--white);
}

.time.outline {
  border: 1px solid var(--green); /* explicit, so the outline stays while the digits blink */
}

.film-title {
  text-decoration: underline;
  text-decoration-thickness: 0.11em;
  text-underline-offset: 0.14em;
  text-decoration-skip-ink: none;
}

.name {
  font-size: 1.06em;
}

.en-small {
  font-size: 0.7em;
}

.free {
  border: 1px solid currentColor;
  padding: 0 0.25em;
  font-size: 1.05em;
  white-space: nowrap; /* keep the boxed label in one piece */
}

.badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  vertical-align: -0.1em;
  border: 1px solid currentColor;
  padding: 0.15em 0.35em;
  font-size: 0.4em;
  line-height: 1.1;
}

/* ----- green duotone for the film stills -----
   The JPEGs are the original colour stills; the flyer look (black -> green,
   white -> white) is applied here, so colour can be revealed later (hover etc.). */
.duo {
  display: block;
  background: var(--green);
}

.duo img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.1);
  mix-blend-mode: screen;
}

.hero.duo img {
  height: 100%; /* slides fill the hero frame */
}

@media (hover: hover) and (min-width: 768px) {
  .duo:hover img {
    filter: none;              /* original colour on hover */
    mix-blend-mode: normal;
  }
}

/* ----- images in the flow ----- */
.fl-left  { float: left; }
.fl-right { float: right; }

.inline {
  display: inline-block;
  vertical-align: text-bottom;
}

.eyes {
  width: 24%;
  margin: 0.15em 0.3em 0 0;
}

.hills {
  height: 1.3em;
  margin-left: 0.05em;
}

.still1 {
  width: 38%;
  height: auto;
  margin: 0.15em 0 0.1em 0.3em;
}

.mouth {
  height: 1.1em;
  margin: 0 0.05em;
}

.talk-left {
  white-space: nowrap;
}

/* The flyer splits "女優ジョディ・フォスターを" around the knitting photo.
   That needs ~19em of width; below 600px use a plain flow instead. */
.talk-simple {
  display: none;
}

@media (max-width: 599px) {
  .talk-split  { display: none; }
  .talk-simple { display: inline; }
  .talk-simple .knitting { margin: 0.15em 0 0 0.35em; }
}

.knitting {
  width: 28%;
  height: auto;
  margin: 0.1em 0.35em 0;
}

.still2 {
  width: 45%;
  height: auto;
  margin: 0.15em 0.4em 0.4em 0;
}

.ticket {
  display: flex;
  align-items: center;
  justify-content: center;
  clear: left;              /* below the photo on narrow screens */
  width: 45%;
  height: calc(var(--lh) * 3.3em);
  margin: 0.2em 0.4em 0.3em 0;
  background: var(--green);
  color: var(--white);
  font-family: var(--font-block);
}

.ticket {
  container-type: inline-size; /* so the label can size itself to the button */
}

.ticket span {
  font-size: min(2em, 24cqw); /* never wider than the button */
  line-height: 1;
}

.cup {
  width: 22%;
  margin: 0.15em 0 0 0.3em;
}

/* ----- footer ----- */
.site-footer {
  clear: both;
  padding: 1.2em 0 2.4em;
  font-size: 0.74em;
  line-height: 1.4;
}

/* ===== Desktop ===== */
@media (min-width: 768px) {
  :root {
    --pad: 40px;
  }

  /* wide: the ticket sits beside the photo instead of below it,
     and the footer flows into the space next to the floats */
  .menu {
    width: 44px;
    gap: 10px;
    padding: 4px 0;
  }

  .menu span {
    height: 3px;
  }

  .ticket {
    clear: none;
    width: 24%;
    margin-top: 0.15em;
  }

  .site-footer {
    clear: none;
    padding-top: 0.6em;
  }

}
