/* The artists directory (/artists) and an artist's profile (/artist/{slug}). Portraits hang like the
   work: in a mat with a wall shadow. Names in the display serif, facts as quiet labels. */

@layer pages {
  /* Directory */
  .artist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-10) var(--space-5);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  @media (min-width: 820px) {
    .artist-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-16) var(--space-10); }
  }

  .artist-card__link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    color: var(--bp-ink);
    text-decoration: none;
  }

  .artist-card__photo,
  .artist-hero__photo,
  .artist-panel__photo {
    display: grid;
    place-items: center;
    flex: none;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: var(--mat) solid var(--bp-mat);
    background: var(--bp-mat);
    box-shadow: var(--shadow-hang);
    color: var(--bp-brand-600);
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
  }

  .artist-card__photo img,
  .artist-hero__photo img,
  .artist-panel__photo img { width: 100%; height: 100%; object-fit: cover; }

  .artist-card__photo {
    width: 100%;
    margin-bottom: var(--space-4);
    font-size: 64px;
    transition: box-shadow var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  }

  .artist-card__link:hover .artist-card__photo { box-shadow: var(--shadow-lift); transform: translateY(-4px); }

  .artist-card__name { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.15; color: var(--bp-heading); }
  .artist-card__link:hover .artist-card__name { color: var(--bp-brand-600); }
  .artist-card__headline { font-family: var(--font-display); font-size: 15px; font-style: italic; font-weight: 300; line-height: 1.35; color: var(--bp-ink-2); }

  .artist-card__fact {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--bp-ink-3);
  }

  .artist-card__fact .icon { font-size: 15px; }

  .artist-card__counts {
    display: flex;
    gap: var(--space-4);
    margin-top: auto;
    padding-top: var(--space-3);
    border-top: 1px solid var(--bp-line);
    font-size: 13px;
    font-weight: 600;
  }

  .artist-card__counts > :first-child { margin-top: 0; }
  .artist-card__sold { display: inline-flex; align-items: center; gap: 6px; color: var(--bp-ink-2); }
  .artist-card__sold::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--bp-brand-600); }

  /* Profile */
  .artist-hero {
    display: grid;
    gap: var(--space-10);
    align-items: center;
    margin-bottom: var(--space-16);
    padding-block: var(--space-6) var(--space-12);
    border-bottom: 1px solid var(--bp-line);
  }

  @media (min-width: 820px) {
    .artist-hero { grid-template-columns: minmax(240px, 360px) minmax(0, 1fr); gap: var(--space-16); }
  }

  .artist-hero__photo { width: 100%; max-width: 360px; font-size: 120px; border-width: var(--mat-lg); }
  .artist-hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
  .artist-hero__eyebrow { font-size: var(--fs-xs); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--bp-brand-600); }
  .artist-hero__name { font-size: var(--fs-display); line-height: 1; }
  .artist-hero__headline { max-width: 36ch; font-family: var(--font-display); font-size: clamp(20px, 16px + 1vw, 26px); font-style: italic; font-weight: 300; line-height: 1.3; color: var(--bp-ink-2); }

  .artist-facts { display: flex; flex-direction: column; gap: 8px; margin: var(--space-2) 0 0; padding: 0; list-style: none; color: var(--bp-ink-2); }
  .artist-facts li { display: flex; gap: var(--space-3); align-items: flex-start; }
  .artist-facts .icon { font-size: 20px; color: var(--bp-brand-600); }

  .artist-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-10);
    margin-block: var(--space-2);
    padding-block: var(--space-4);
    border-block: 1px solid var(--bp-line);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--bp-ink-2);
  }

  .artist-hero__stats span { display: flex; flex-direction: column; gap: 2px; }
  .artist-hero__stats strong { font-family: var(--font-display); font-size: 40px; font-weight: 300; letter-spacing: 0; line-height: 1; color: var(--bp-heading); }

  .artist-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

  .artist-about { display: grid; gap: var(--space-12); }

  @media (min-width: 900px) {
    .artist-about { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); column-gap: var(--space-16); }
    .artist-about__section:first-child { grid-row: span 2; }
  }

  .artist-about__section { display: flex; flex-direction: column; gap: var(--space-4); }
  .artist-about__title { font-size: var(--fs-2xl); }

  /* The statement, set large with a painted opening quote. */
  .artist-quote {
    position: relative;
    margin: 0;
    padding: var(--space-6) 0 0 var(--space-2);
    font-family: var(--font-display);
    font-size: clamp(22px, 18px + 1vw, 28px);
    font-style: italic;
    font-weight: 300;
    line-height: 1.35;
    color: var(--bp-heading);
  }

  .artist-quote::before {
    content: "“";
    position: absolute;
    top: -.35em;
    inset-inline-start: -.08em;
    font-size: 4.4em;
    font-style: normal;
    line-height: 1;
    color: var(--bp-brand-600);
    opacity: .3;
  }

  .artist-exhibitions { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; color: var(--bp-ink-2); }
  .artist-exhibitions li { padding-block: var(--space-3); border-bottom: 1px solid var(--bp-line); }
  .artist-exhibitions li:first-child { border-top: 1px solid var(--bp-line); }

  .artist-sold-total { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--bp-ink-2); }
  .artist-sold-total::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--bp-brand-600); }
}

@layer components {
  /* "About the artist" on the product page. Here because it shares the portrait styles above;
     product.css positions it. */
  .artist-panel {
    display: flex;
    gap: var(--space-5);
    align-items: flex-start;
    padding-block: var(--space-6);
    border-block: 1px solid var(--bp-line);
  }

  .artist-panel__photo { width: 96px; font-size: 36px; border-width: 6px; }
  .artist-panel__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .artist-panel__eyebrow { font-size: var(--fs-xs); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--bp-brand-600); }
  .artist-panel__name { font-size: var(--fs-xl); }
  .artist-panel__headline { font-family: var(--font-display); font-style: italic; font-weight: 300; color: var(--bp-ink-2); }

  .artist-panel__fact {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--bp-ink-3);
  }

  .artist-panel__fact .icon { font-size: 15px; }
  .artist-panel__link { display: inline-flex; align-items: center; gap: 4px; margin-top: var(--space-2); font-weight: 600; }
  .artist-panel__link .icon { font-size: 18px; }
}
