/* Gridley.art — Light theme, 2026-11-28 (was Cathedral Light dark)
   White #FFFFFF · Dark purple #3B2A4D · Dark bronze-gold #8A6D2F
   Cormorant Garamond for titles, Inter for body.
   No framework, no JavaScript required for the core pages.
   The gallery grid on index.html is rendered from artworks.json;
   every artwork also has a static page, so search engines see it. */

:root {
  --ink: #ffffff;
  --ink-soft: #f6f3f8;
  --bone: #3b2a4d;
  --bone-dim: #6a5a7d;
  --gold: #8a6d2f;
  --gold-deep: #7a5f2e;
  --line: rgba(59, 42, 77, 0.18);
  --max: 1120px;
  /* Side gutters: the clamp sets the base padding; Joshua asked 2026-11-28
     to bring the margins in 5 px more on each side, so 5 px is added here. */
  --pad: calc(clamp(1.25rem, 4vw, 2.5rem) + 5px);
  --radius: 2px;
  /* Hover easing (Joshua, 2026-11-28): quick and professional — 200 ms,
     standard ease-out curve. Nothing here should feel slow. */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* No widows / no orphaned words in headings: balanced wrapping. */
h1, h2, h3, .art-title, .wall-label {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 0.6em;
}
p, li { text-wrap: pretty; }

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: 0.01em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.5rem; }

a { color: var(--gold); text-underline-offset: 3px; transition: color 200ms var(--ease); }
a:hover, a:focus-visible { color: var(--bone); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.narrow { max-width: 720px; }
/* NOTE: .section and .hero sit on the same elements as .wrap, so their
   padding must repeat the side padding — a bare "0" here would wipe out
   the .wrap gutters and let text touch the viewport edges below ~1210 px
   (found by the margin audit, 2026-11-28). */
.section { padding: clamp(3rem, 8vw, 5.5rem) var(--pad); }
.eyebrow {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.lede { font-size: 1.2rem; color: var(--bone-dim); max-width: 60ch; }
.small { font-size: 0.9rem; color: var(--bone-dim); }
.gold { color: var(--gold); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* Header / navigation — present on every page, so there is always a next step. */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.wordmark {
  text-decoration: none;
  white-space: nowrap;
  line-height: 0;
}
.wordmark img {
  height: 64px;
  width: auto;
  display: block;
}
@media (max-width: 760px) {
  .wordmark img { height: 48px; }
}
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; }
.nav a {
  color: var(--bone-dim);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  display: inline-block;
  padding-block: 2px;
}
.nav a[aria-current="page"] { color: var(--gold); }
.nav a:hover { color: var(--bone); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--bone);
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--bone);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease);
}
.btn:hover, .btn:focus-visible { background: #2e213d; border-color: #2e213d; color: #ffffff; }
.btn-ghost {
  background: transparent;
  color: var(--bone);
  border-color: rgba(59, 42, 77, 0.45);
}
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--gold); color: var(--gold); background: transparent; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* Hero — side padding repeats var(--pad) for the same reason as .section. */
.hero { padding: clamp(4rem, 10vw, 7rem) var(--pad) clamp(1.25rem, 3vw, 2rem); text-align: center; }
.hero .lede { margin: 0 auto; }

/* Galleries section on Home: sit closer under the hero (Joshua, 2026-11-28). */
#gallery { padding-top: clamp(1.25rem, 3vw, 2rem); }
.hero .actions { justify-content: center; }
.hero-rule { width: 64px; height: 1px; background: var(--gold); border: 0; margin: 2rem auto; }


/* Gallery tiles — the four medium galleries on Home and Galleries. */
.gallery-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
}
.gallery-tile a {
  display: block;
  border: 1px solid var(--line);
  background: var(--ink-soft);
  padding: 2rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 200ms var(--ease), transform 250ms var(--ease), box-shadow 250ms var(--ease);
}
.gallery-tile a:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(59, 42, 77, 0.12); }
.gallery-tile a:hover h2, .gallery-tile a:hover h3 { color: var(--gold); }
.gallery-tile h2, .gallery-tile h3 { font-size: 1.8rem; margin: 0 0 0.5rem; transition: color 200ms var(--ease); }
.gallery-tile p { margin: 0.15rem 0; color: var(--bone-dim); font-size: 0.95rem; }
.gallery-tile .count { color: var(--gold-deep); font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; }

/* Tile slideshow — a small rotating image on the Oil and Acrylics tiles.
   Two stacked images crossfade; site.js swaps them every 4 seconds.
   Without JavaScript the first image stays put. */
.tile-slideshow { position: relative; aspect-ratio: 4 / 3; overflow: hidden; margin: -2rem -1.5rem 1.25rem; background: var(--ink-soft); }
.tile-slideshow img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.tile-slideshow img.is-current { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .tile-slideshow img { transition: none; }
}

/* Gallery grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2.5rem 2rem;
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
}
.card a { text-decoration: none; color: inherit; display: block; }
.card a:hover .art-title { color: var(--gold); }
.card .art-title { font-size: 1.6rem; margin: 1rem 0 0.25rem; transition: color 200ms var(--ease); }
.card p { margin: 0.15rem 0; color: var(--bone-dim); font-size: 0.95rem; }

/* Real artwork photo (shown when the file exists in /images). */
.art-photo { width: 100%; height: auto; border: 1px solid var(--line); }

/* Placeholder artwork block — replaced by the real photo from Google Drive.
   Aspect ratio follows the work: 24x18 = 4/3, 18x24 = 3/4.
   The [hidden] rule is needed: .art-frame sets display:flex, which
   otherwise overrides the browser's built-in display:none for hidden,
   so the placeholder would show under every real photo. */
[hidden] { display: none !important; }
.art-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(155deg, #f6f1f8 0%, #ede6f2 52%, #f7f3ee 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.art-frame.landscape { aspect-ratio: 4 / 3; }
.art-frame.portrait { aspect-ratio: 3 / 4; }
.art-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(59, 42, 77, 0.35);
  pointer-events: none;
}
.art-frame-inner { padding: 1.5rem; position: relative; z-index: 1; }
.art-frame .art-frame-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  line-height: 1.2;
  text-wrap: balance;
  margin: 0 0 0.4rem;
}
.art-frame .art-frame-note { margin: 0; font-size: 0.85rem; color: var(--bone-dim); letter-spacing: 0.08em; }

/* Status badges — sold works are unmistakable, and show only a Sold badge — never a sold price. */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.badge-sold { background: var(--bone); color: #ffffff; }
.status-line { margin: 0.6rem 0 0; font-size: 0.95rem; }
.status-line strong { font-weight: 600; }

/* Wall label — the museum label beside each work. */
.wall-label { font-size: 1.1rem; color: var(--bone-dim); }
.wall-label dt { color: var(--gold); font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; font-family: "Inter", sans-serif; }
.wall-label dd { margin: 0 0 1rem; font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.35rem; color: var(--bone); }

/* Single artwork layout */
.artwork-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; }
.pager .pager-label { display: block; font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }

/* Trust strip + about teaser */
.trust-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.4rem 0;
}
.trust-strip ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
  justify-content: center;
  color: var(--bone-dim);
  font-size: 0.95rem;
  text-align: center;
}
.about-teaser { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
/* Artist portrait on Home — the file is 300 px wide, so cap it at native
   size instead of stretching it across the column. */
.about-teaser .art-photo { max-width: 300px; margin-inline: auto; display: block; }

/* Artist portrait on the About page — 300 px wide, centred above the bio. */
.portrait-figure { max-width: 300px; margin: 0 auto 2rem; }
.portrait-figure img { width: 100%; height: auto; display: block; border: 1px solid var(--line); }

/* Forms */
form { display: grid; gap: 1.1rem; max-width: 620px; }
label { display: block; font-size: 0.9rem; letter-spacing: 0.05em; margin-bottom: 0.35rem; }
input, select, textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--ink-soft);
  border: 1px solid rgba(59, 42, 77, 0.3);
  border-radius: var(--radius);
  color: var(--bone);
  font: inherit;
  font-size: 1rem;
}
textarea { min-height: 140px; resize: vertical; }
.notice {
  border: 1px solid var(--gold);
  background: rgba(138, 109, 47, 0.08);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
}
.notice p { margin: 0; }

/* Footer — every page ends with a next step, never a dead end. */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 2.5rem; margin-top: 2rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h2, .site-footer h3 { font-size: 1.25rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.site-footer a { color: var(--bone-dim); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
/* Tap targets — WCAG 2.2 wants 24px minimum. Inline links are only as
   tall as their line box (19–22px), so give them a little padding. */
.site-footer a:not(.btn) { display: inline-block; padding-block: 3px; }
.link-list a { display: inline-block; padding-block: 2px; }
/* Footer buttons keep white text: the .site-footer a colour above would
   otherwise beat .btn and leave dark text on the dark button (audit, 2026-11-28). */
.site-footer a.btn { color: #ffffff; }
.footer-note { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 1.5rem; }

/* Small screens */
@media (max-width: 760px) {
  body { font-size: 1rem; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .artwork-layout, .about-teaser, .site-footer .wrap { grid-template-columns: 1fr; }
  .gallery { gap: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Extra media on an artwork page: framed photo and progress video (2026-11-29).
   The video is a click-to-play facade: a thumbnail that loads the YouTube
   player only when tapped, so the page stays fast. */
.artwork-media { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.artwork-media h2 { margin-bottom: 1rem; }
.framed-photo { margin: 0 0 2rem; max-width: 720px; }
.framed-photo img { border: 1px solid var(--line); }
.framed-photo figcaption { margin-top: 0.5rem; color: var(--bone-dim); font-size: 0.95rem; }
.video-facade { position: relative; display: block; width: 100%; margin: 0 auto; padding: 0; border: 1px solid var(--line); background: #000; cursor: pointer; text-decoration: none; overflow: hidden; }
.video-facade.vertical { max-width: 400px; aspect-ratio: 9 / 16; }
.video-facade:not(.vertical) { max-width: 720px; aspect-ratio: 16 / 9; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; }
.video-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(59, 42, 77, 0.25); transition: background 200ms var(--ease); }
.video-facade:hover .video-play, .video-facade:focus-visible .video-play { background: rgba(59, 42, 77, 0.45); }
.video-player { display: block; width: 100%; margin: 0 auto; border: 1px solid var(--line); }
.video-player.vertical { max-width: 400px; aspect-ratio: 9 / 16; }
.video-player:not(.vertical) { max-width: 720px; aspect-ratio: 16 / 9; }
.video-note { text-align: center; color: var(--bone-dim); font-size: 0.95rem; margin-top: 0.75rem; }
