/* ==========================================================================
   TAKANORI NISHIMURA | Bottega Ruan: WordPress theme additions
   Loaded after style.css (the HTML prototype's stylesheet, copied in by
   wordpress/build_theme.py). Only what the theme adds is here.
   ========================================================================== */


/* Artworks index: works after the first 16 wait for Load More (theme.js).
   Without JavaScript every work shows. */
.js .work-card[data-more] { display: none; }


/* Contact Form 7 takes its empty message box out of the layout until a
   message arrives, while the prototype's status line keeps its margin all
   along. Keeping the empty box in place (unseen) ends the form at the same
   height as the prototype, and the page does not jump when a message shows. */
.wpcf7 form.init .wpcf7-response-output,
.wpcf7 form.resetting .wpcf7-response-output,
.wpcf7 form.submitting .wpcf7-response-output {
  display: block;
  visibility: hidden;
}


/* Contact Form 7 removes a field's error tip as soon as the field is
   corrected, which happens when the visitor moves on to the next field.
   A tip in the flow would pull the fields below up at that very moment,
   under the pointer, and the click on the next choice would be lost. The
   tips sit in the gap below their field instead (60px at 1920px and 32px
   at the least, while a tip needs about 25px), so nothing moves. */
.wpcf7-form-control-wrap {
  position: relative;
  display: block;
}

.wpcf7-not-valid-tip {
  position: absolute;
  top: 100%;
  left: 0;
}


/* Home poster: the box takes the proportions of the posters actually shown
   (the inline --ar-landscape / --ar-portrait), so a poster chosen in the
   Customizer is never cropped. The portrait poster shows only on phones
   held upright, as the <source> in front-page.php says. */
.home-poster__media { --ar: var(--ar-landscape, 3372 / 1897); }

@media (max-width: 767px) and (orientation: portrait) {
  .home-poster__media { --ar: var(--ar-portrait, 1897 / 3372); }
}


/* Pages written in the editor (page.php, index.php)
   -------------------------------------------------------------------------- */

.page-head + .entry { margin-top: var(--s-120); }

.entry__body {
  grid-column: 1 / span 7;
  line-height: 1.75;
}

.entry__body > * + * { margin-top: 1.2em; }

.entry__body h2,
.entry__body h3,
.entry__body h4 {
  font-weight: 700;
  line-height: 1.3;
  margin-top: var(--s-60);
}

.entry__body h2 { font-size: var(--fs-heading); }
.entry__body h3,
.entry__body h4 { font-size: var(--fs-body); }

.entry__body ul,
.entry__body ol { padding-left: 1.4em; }
.entry__body ul { list-style: disc; }
.entry__body ol { list-style: decimal; }
.entry__body li + li { margin-top: .35em; }

.entry__body a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

.entry__body img { height: auto; }
.entry__body figure { margin-inline: 0; }

.entry__body figcaption {
  margin-top: .6em;
  color: var(--c-mute);
  font-size: var(--fs-small);
}

.entry__body blockquote {
  margin-inline: 0;
  padding-left: 1em;
  border-left: 1px solid currentColor;
}

.entry__body hr {
  border: 0;
  border-top: 1px solid var(--c-line);
}

.entry__meta {
  color: var(--c-mute);
  font-size: var(--fs-small);
}

.entry__item + .entry__item { margin-top: var(--s-60); }

@media (max-width: 1023px) {
  .entry__body { grid-column: 1 / span 10; }
}

@media (max-width: 767px) {
  .entry__body { grid-column: 1 / -1; }
}
