@charset "utf-8";

/* ============================================================
   ASA Gallery — main stylesheet
   Palette & typography preserved from the original asaCSS.css
   ============================================================ */

:root {
  --bg-peach:   #f2c48d;
  --bg-wheat:   #f5deb7;
  --teal:       #5ea4a9;
  --teal-soft:  #aed1d4;
  --orange:     #ef4320;
  --blue:       #025090;
  --text:       #333;
  --font-stack: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", Arial, Helvetica, sans-serif;

  /* Layout widths */
  --container-max:     760px;
  --inner-content-max: 700px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-stack);
  background: var(--bg-peach);
  color: var(--text);
  min-height: 100vh;
  padding: 20px 12px;
  text-align: center;
  line-height: 1.4;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  background: var(--bg-wheat);
  padding: 24px 16px;
}
.container--inner { padding: 0 0 24px; }

/* ============================================================
   Home-page chrome
   ============================================================ */
.logo {
  display: block;
  margin: 0 auto 18px;
  max-width: 226px;
  height: auto;
}

.family {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 8px 0;
}
.family img { width: 20px; height: auto; flex-shrink: 0; }
.family-name {
  font-size: 1.15rem;
  color: var(--teal);
  margin: 0;
  font-weight: normal;
}

.gallery-banner {
  overflow: hidden;
  margin: 14px auto 4px;
  max-width: 223px;
}
.gallery-banner span {
  display: inline-block;
  white-space: nowrap;
  font-size: clamp(28pt, 6vw, 40pt);
  font-weight: bold;
  color: var(--orange);
  padding-left: 100%;
  animation: marquee 9s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-banner span { animation: none; padding-left: 0; }
}

.tagline {
  font-size: 1.05rem;
  font-style: italic;
  font-weight: bold;
  color: var(--teal);
  margin: 16px auto 24px;
  max-width: 50ch;
}

/* ============================================================
   Inner-page chrome
   ============================================================ */
.page-header img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.orange-bar {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.inner-content {
  max-width: var(--inner-content-max);
  margin: 0 auto;
  padding: 24px 16px 8px;
}

.page-title {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--teal);
  margin: 0 0 0.3rem;
}
.page-caption {
  font-size: 1.3rem;
  font-style: italic;
  font-weight: bold;
  color: var(--blue);
  margin: 0 0 1.4rem;
}
.back-link {
  display: inline-block;
  margin: 0 0 1.2rem;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--blue);
  text-decoration: none;
}
.back-link:hover { color: var(--orange); }

/* ============================================================
   Disciplines / submenu — vertical button column
   ============================================================ */
.disciplines {
  list-style: none;
  padding: 0;
  margin: 0 auto 28px;
  max-width: 240px;
  background: var(--teal-soft);
  border: 2px solid var(--teal);
}
.disciplines li + li { border-top: 1px solid var(--teal); }
.disciplines a {
  display: block;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--blue);
  text-decoration: none;
  transition: color .15s ease, background .15s ease;
}
.disciplines a:hover,
.disciplines a:focus-visible {
  color: var(--orange);
  background: rgba(255,255,255,.35);
}

/* ============================================================
   Main horizontal nav
   ============================================================ */
.mainnav {
  max-width: 650px;
  margin: 16px auto 12px;
  background: var(--teal);
}
.mainnav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; justify-content: center;
}
.mainnav a {
  display: block;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
}
.mainnav a:hover,
.mainnav a:focus-visible { color: var(--orange); }
.mainnav a:visited { color: #333; }
.mainnav a.active { color: var(--orange); }

/* ============================================================
   Mosaic gallery — masonry-style, tiles size to image
   Tiles flow into CSS columns; `height: auto` on the image
   preserves each painting's true aspect ratio (no cropping).
   ============================================================ */
.mosaic {
  column-count: 4;
  column-gap: 14px;
  margin: 0;
  padding: 0;
}

.tile {
  display: block;
  break-inside: avoid;
  margin: 0 0 14px;
  transition: transform .25s ease;
}

/* Size variants — assigned by build.py based on full-image dimensions */
.tile.size-s,
.tile.size-m,
.tile.size-l { width: 100%; }
.tile.size-featured {
  column-span: all;
  width: 100%;
  margin: 0 0 14px;
}

.tile-link {
  display: block;
  width: 100%;
  overflow: hidden;
  background: #ddd;
  /* Shadow lives on the link so it tracks the image's real edges,
     not on the outer .tile (which can have extra vertical space). */
  box-shadow: 0 3px 6px rgba(0,0,0,.18);
  transition: box-shadow .25s ease;
}
.tile-link img {
  width: 100%;
  height: auto;        /* preserves aspect — NO cropping */
  display: block;
}

.tile-caption { display: none; }   /* lightbox still reads from <figcaption> */

.tile:hover .tile-link,
.tile:focus-within .tile-link {
  box-shadow: 0 8px 14px rgba(0,0,0,.28);
}
.tile:hover,
.tile:focus-within {
  transform: translateY(-3px) scale(1.02);
}
.tile-link:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}

/* ============================================================
   Prose — readable body text on plain content pages
   ============================================================ */
.prose {
  max-width: 62ch;
  margin: 0 auto;
  text-align: left;
  line-height: 1.6;
  color: var(--text);
}
.prose p {
  font-size: 0.95rem;
  margin: 0 0 1.1rem;
}
.prose p:last-child { margin-bottom: 0; }
.prose a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.prose a:hover,
.prose a:focus-visible { color: var(--orange); }

/* ============================================================
   Feature image — single image on a content page
   ============================================================ */
.feature-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto 0;
  border: 2px solid #fffaf0;
  box-shadow: 0 3px 8px rgba(0,0,0,.18);
}

/* ============================================================
   Bio pages — text column + portrait/links column
   ============================================================ */
.bio {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  text-align: left;
  align-items: flex-start;
}
.bio-text {
  flex: 1 1 280px;
  line-height: 1.6;
  font-size: 0.95rem;
  color: var(--text);
}
.bio-text p { margin: 0 0 1rem; }
.bio-aside {
  flex: 0 0 221px;
  max-width: 100%;
  text-align: center;
}
.bio-portrait {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 0.8rem;
  border: 2px solid #fffaf0;
  box-shadow: 0 3px 8px rgba(0,0,0,.18);
}
.bio-links { list-style: none; margin: 0; padding: 0; }
.bio-links li { margin: 0.3rem 0; }
.bio-links a {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--blue);
  text-decoration: none;
}
.bio-links a:hover { color: var(--orange); }

/* ============================================================
   Events / data table (news & events page)
   ============================================================ */
.table-scroll { overflow-x: auto; margin: 0 auto 1.2rem; }

.events {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}
.events th {
  background: var(--orange);
  color: var(--bg-wheat);
  padding: 8px 12px;
  white-space: nowrap;
}
.events td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--teal-soft);
  color: var(--text);
  vertical-align: top;
}
.events tbody tr:last-child td { border-bottom: 0; }

.events-note {
  max-width: 62ch;
  margin: 0 auto;
  text-align: center;
  font-size: 0.8rem;
  color: var(--teal);
}

/* ============================================================
   Contact roster
   ============================================================ */
.form-intro {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--teal);
  max-width: 52ch;
  margin: 0 auto 1.8rem;
  line-height: 1.5;
}

.artist-contacts {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 440px;
  text-align: left;
}

.artist {
  padding: 14px 0;
  border-bottom: 1px solid var(--teal-soft);
}
.artist:last-child { border-bottom: 0; }

.artist-name {
  display: block;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--teal);
}
.artist-medium {
  display: block;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text);
  margin: 2px 0 4px;
}
.artist-email,
.artist-site {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--blue);
  text-decoration: none;
}
.artist-email:hover,
.artist-site:hover { color: var(--orange); }
.artist-site {
  margin-left: 14px;
  font-weight: normal;
  font-style: italic;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  margin-top: 20px;
  padding: 16px;
  font-size: 0.7rem;
  font-style: italic;
  color: var(--blue);
}

/* ============================================================
   Mobile breakpoints
   ============================================================ */
@media (max-width: 900px) {
  .mosaic { column-count: 3; }
}

@media (max-width: 600px) {
  .inner-content { padding: 18px 12px 8px; }
  .mosaic { column-count: 2; column-gap: 10px; }
  .tile { margin-bottom: 10px; }
  .tile .tile-link { box-shadow: 0 2px 4px rgba(0,0,0,.18); }
  .bio { flex-direction: column-reverse; align-items: center; }
  .bio-aside { flex-basis: auto; }
}

@media (max-width: 480px) {
  .container { padding-left: 10px; padding-right: 10px; }
  .mainnav ul { flex-direction: column; }
  .mainnav a {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,.25);
  }
  .mainnav li:last-child a { border-bottom: 0; }
}

@media (max-width: 380px) {
  .mosaic { column-count: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .tile, .tile-link { transition: none !important; }
  .tile:hover { transform: none; }
  .tile:hover .tile-link { box-shadow: 0 4px 8px rgba(0,0,0,.28); }
}
