/*
  templates.css
  ------------
  Small extra stylesheet for the myFINBEC HTML templates.
  Upload it to /assets/css/templates.css (next to common.css).
  Do not edit common.css — these rules only cover what the templates
  need and common.css does not already provide (hero backgrounds that
  are not tied to a hard-coded ID, a simple enquiry button, and the
  tighter artist-page layout used by the VHILS mockup).

  Artist-page layout rules are scoped to body.template-artist so they
  cannot change other pages. Add class="template-artist" on <body>
  and keep this file linked after common.css.
*/

.template-hero,
.template-index-card {
  background-color: #111;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.template-enquiry {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.65rem 1.25rem;
  border: 1px solid #222;
  color: #222;
  text-decoration: none;
  letter-spacing: 0.04em;
}
.template-enquiry:hover,
.template-enquiry:focus {
  background: #222;
  color: #fff;
}

h1.heading-gray {
  margin: 0 0 0.4rem 0;
  font-weight: normal;
}

.template-credits a {
  text-decoration: underline;
}

/* Nested rows inside a .c-layout must span the full width. Without this,
   short blocks (artist credits, links, catalogue) shrink and sit side by side,
   because .c-layout is a flex wrap in common.css. */
.c-layout > .c-layout {
  width: 100%;
  flex: 0 0 100%;
}

/* =============================================================================
   Artist page layout (.template-artist)
   A tighter gallery-style page: shorter hero, intro + video, artwork grid.
   Spacing scale (html font-size is 62.5%, so 1rem = 10px):
     1.2rem / 2.4rem / 4rem / 5.6rem / 8rem
   ============================================================================= */

/* Shorter hero. id="#vhils" (and other artist IDs) still supplies the
   background-image from common.css. This drops the 100vh padding-top
   from .p-panel--l by not using that class, and sets a capped height. */
.template-artist .template-hero-artist {
  position: relative;
  width: 100%;
  height: 52vh;
  min-height: 300px;
  max-height: 480px;
  padding-top: 0;
  background-color: #111;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
@media (min-width: 769px) {
  .template-artist .template-hero-artist {
    height: 64vh;
    min-height: 420px;
    max-height: 680px;
  }
}

/* Sit the existing scroll arrow closer to the bottom of the shorter hero.
   common.css puts it 80px up on small screens, which leaves a hole. */
.template-artist #btn-scrolldown {
  bottom: 16px;
}

/* Content measure: slightly tighter than the 1367px .maxmd cap, with a
   consistent inset instead of 110px .subtext2 padding and 9rem .u-mb-xl. */
.template-artist .template-artist-body {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2.4rem 6rem;
}
@media (min-width: 769px) {
  .template-artist .template-artist-body {
    padding: 5.6rem 4rem 8rem;
  }
}

/* Intro: name, location and biography on the left; 16:9 video on the right.
   Stacks in that same order on small screens (bio is not trapped under the video). */
.template-artist .template-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.2rem;
  margin-bottom: 5.6rem;
}
@media (min-width: 769px) {
  .template-artist .template-intro {
    grid-template-columns: 1fr 1fr;
    gap: 5.6rem 4.8rem;
    align-items: start;
    margin-bottom: 8rem;
  }
}

.template-artist .template-intro__text h1 {
  margin: 0 0 0.4rem 0;
}

.template-artist .template-intro__text .u-c-gray {
  margin: 0 0 2.4rem 0;
}

.template-artist .template-intro__text p + p {
  margin-top: 1.2rem;
}

/* Responsive 16:9 video. The iframe fills the box; no fixed pixel height. */
.template-artist .template-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #111;
  overflow: hidden;
}
.template-artist .template-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Artwork grid: two columns on desktop, one on mobile. Portrait stills
   keep their natural ratio. */
.template-artist .template-works {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}
@media (min-width: 769px) {
  .template-artist .template-works {
    grid-template-columns: 1fr 1fr;
    gap: 5.6rem 3.2rem;
  }
}

.template-artist .template-work {
  margin: 0;
}

.template-artist .template-work img {
  display: block;
  width: 100%;
  height: auto;
}

.template-artist .template-work figcaption {
  margin-top: 1.6rem;
}

.template-artist .template-work figcaption .heading-gray {
  margin: 0 0 0.6rem 0;
}

.template-artist .template-work figcaption .u-c-gray {
  margin: 0;
}


/* A second (or later) 16:9 video stacked under the first, used on
   artist pages that have more than one embed. Has no effect when there
   is only one .template-video (Vhils, Choe, Bezt, Sainer). */
.template-artist .template-intro__media .template-video + .template-video {
  margin-top: 2.4rem;
}

/* Portrait (9:16) Vimeo embeds. Used on the 1UP Crew page; 16:9
   .template-video blocks on other artist pages are unchanged. */
.template-artist .template-video--portrait {
  aspect-ratio: 9 / 16;
  max-width: 36rem;
  width: 100%;
  margin-inline: auto;
}

/* Lithograph / featured-work block: the print beside its details and
   description, then the process photos use the existing .template-works grid. */
.template-artist .template-lithograph {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.2rem;
  margin-bottom: 5.6rem;
}
@media (min-width: 769px) {
  .template-artist .template-lithograph {
    grid-template-columns: 1fr 1fr;
    gap: 5.6rem 3.2rem;
    align-items: start;
    margin-bottom: 8rem;
  }
}

.template-artist .template-lithograph__text p + p {
  margin-top: 1.2rem;
}

.template-artist .template-lithograph__text .heading-gray {
  margin: 0 0 0.6rem 0;
}

.template-artist .template-lithograph__text .u-c-gray {
  margin: 0 0 2.4rem 0;
}
