/* Joyce Jarvis: home + art pages
   Built on the existing 2023.css look: Didact Gothic body, Scope One headings,
   JJbck.jpg garden background, navy boxes, cream introduction, dark green footer. */

@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&family=Scope+One&display=swap');

:root {
  --navy: #293952;
  --navy-dark: #1d2a3e;
  --cream: #f2ebb7;
  --green: #23320c;
  --teal: #145f79;
  --text: #403b2e;
  --ink: #2b2b2b;
  --paper: #f5f4ef;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }

/* The existing BODY rule, kept as it was */
BODY {
  height: 100%;
  margin: 0;
  padding: 0;
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  text-align: center;
  font-family: "Didact Gothic", sans-serif;
  background: #23320c url(../gifs/JJbck.jpg) no-repeat;
  background-position: center top;
  background-position: center -200px;
  color: var(--text);
  line-height: 1.5;
}
BODY.gallery { background: #fff; }

img { max-width: 100%; display: block; }
h1, h2, h3, p, figure, dl, dd, ul { margin: 0; padding: 0; }

a { color: var(--navy); font-weight: 700; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 3px; }

.skip-link { position: absolute; left: 1rem; top: -3rem; background: #fff; padding: .4rem .8rem; z-index: 50; }
.skip-link:focus { top: .5rem; }

/* ---------- Nav bar (same navy band) ---------- */
.navbar {
  background: var(--navy);
  width: min(100% - 32px, 1100px);
  margin: 5px auto 0;
  padding: 7px 10px;
  font-size: 15px;
  letter-spacing: .02em;
  color: #fff;
}
.navbar a { color: #fff; padding: 2px 6px; }
.navbar .sep { opacity: .7; }
.navbar a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* ---------- Name box (navy) ---------- */
.homebox {
  background: var(--navy);
  color: #fff;
  width: min(100% - 32px, 330px);
  margin: 20px auto 0;
  padding: 14px 18px 18px;
  border-radius: 4px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
}
.homebox h1, .homebox .name {
  font-family: "Scope One", serif; font-weight: 700; font-size: 30px; line-height: 1.1;
  letter-spacing: -0.02em; color: #fff;
}
.homebox h2, .homebox .role {
  font-family: "Scope One", serif; font-weight: 400; font-size: 28px; line-height: 1.1;
  letter-spacing: -0.02em; color: #fff;
}
.homebox .enq { margin-top: 16px; font-size: 15px; color: #fff; opacity: .9; }

.contacts { list-style: none; display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin-top: 8px; }
.contacts a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  color: #fff; font-size: 15px; text-align: left;
}
.contacts a:hover { background: #fff; color: var(--navy); text-decoration: none; }
.contacts svg { width: 18px; height: 18px; flex: none; }
.contacts small { display: block; font-weight: 400; font-size: 12px; opacity: .85; line-height: 1.2; }
.contacts span { line-height: 1.25; overflow-wrap: anywhere; }

/* ---------- Introduction (cream box, text unchanged) ---------- */
.home main { padding: 0 16px; }
.bio {
  background: var(--cream);
  width: min(100%, 420px);
  margin: clamp(300px, 52vw, 560px) auto 0;   /* leaves the photo of Joyce in view, as now */
  padding: 18px 22px 20px;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.2);
}
.bio h3 { font-family: "Didact Gothic", sans-serif; font-weight: 400; font-size: 24px; color: var(--teal); letter-spacing: -0.02em; margin: 4px 0 14px; }
.bio p { font-size: 16px; line-height: 1.6; color: var(--text); }
.bio p + p { margin-top: 8px; }
.bio a { color: #003300; }

/* ---------- Footer (dark green band) ---------- */
.footer { background: var(--green); color: #fff; padding: 44px 24px 36px; margin-top: 60px; font-size: 15px; }
.footer p { line-height: 1.6; text-align: center; }
.footer a { color: #fff; }
.gallery .footer { margin-top: 60px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font: 700 15px/1 "Didact Gothic", sans-serif;
  padding: 13px 22px; border-radius: 999px;
  background: var(--navy); color: #fff; border: 1px solid var(--navy);
}
.btn:hover { background: var(--navy-dark); text-decoration: none; }
.btn-line { background: transparent; color: var(--navy); }
.btn-line:hover { background: var(--navy); color: #fff; }

/* ---------- Art page ---------- */
.gallery main { width: min(1100px, 100% - 32px); margin: 0 auto; }
.gallery .intro { max-width: 36em; margin: 18px auto 0; font-size: 16px; }

.grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 22px;
  margin: 28px 0 20px;
}
.card {
  background: #fff; border: 1px solid #e3e3e3; border-radius: 6px;
  box-shadow: rgba(0,0,0,.10) 0 8px 26px 0;
  height: 100%; display: flex; flex-direction: column; overflow: hidden;
}
.card > a { display: block; color: inherit; font-weight: 400; cursor: zoom-in; }
.card > a:hover { text-decoration: none; }
.card .pic { aspect-ratio: 4 / 5; background: var(--paper); display: grid; place-items: center; padding: 10px; overflow: hidden; }
.card .pic img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.card > a:hover .pic img { transform: scale(1.025); }
@media (prefers-reduced-motion: reduce) { .card .pic img { transition: none; } }
.card figcaption { padding: 10px 12px 14px; }
.card .title { font-family: "Scope One", serif; font-size: 18px; color: var(--ink); }
.card .title.untitled { color: #8a8478; font-family: "Didact Gothic", sans-serif; font-size: 15px; }
.card .meta { display: block; font-size: 14px; color: #6b665a; }

/* Pop-up */
.lightbox {
  border: 0; padding: 0; width: min(1000px, 100vw - 24px); max-height: calc(100dvh - 24px);
  background: #fff; color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: auto; border-radius: 6px;
}
.lightbox::backdrop { background: rgba(20,26,36,.85); }
.lb-inner { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(250px, 1fr); }
@media (max-width: 720px) { .lb-inner { grid-template-columns: 1fr; } }
.lb-pic { background: var(--paper); display: grid; place-items: center; padding: 20px; min-height: 320px; }
.lb-pic img { width: 100%; height: auto; max-height: 76dvh; object-fit: contain; }
.lb-info { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.lb-bar { display: flex; justify-content: space-between; gap: 8px; }
.lb-bar button {
  font: 400 15px/1 "Didact Gothic", sans-serif; color: var(--ink);
  background: #fff; border: 1px solid #cfcfcf; border-radius: 999px; padding: 8px 14px; cursor: pointer;
}
.lb-bar button:hover { border-color: var(--navy); color: var(--navy); }
.lb-info h2, .lb-info h1 { font-family: "Scope One", serif; font-weight: 400; font-size: 30px; color: var(--ink); text-align: left; letter-spacing: -0.02em; }
.lb-info dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 16px; }
.lb-info dt { color: #8a8478; }
.lb-info dl:empty { display: none; }
.lb-info .about { font-size: 16px; line-height: 1.6; }
.lb-info .ask { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.lb-info .ask p { font-size: 15px; }
.lb-info .ask .btn { text-align: center; }
.lb-count { font-size: 14px; color: #8a8478; }

/* Single painting page */
.single {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(250px, 1fr);
  margin: 24px 0 10px; background: #fff; border: 1px solid #e3e3e3; border-radius: 6px; overflow: hidden;
  box-shadow: rgba(0,0,0,.10) 0 8px 26px 0; text-align: left;
}
@media (max-width: 720px) { .single { grid-template-columns: 1fr; } }
.single-nav { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.back-home { margin-top: 16px; }

/* Back to top (same navy as the current button) */
#myBtn {
  position: fixed; bottom: 20px; right: 24px; z-index: 40;
  border: 0; background: var(--navy); color: #fff; cursor: pointer;
  padding: 13px 16px; border-radius: 10px; font: 400 15px/1 "Didact Gothic", sans-serif;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
#myBtn.show { opacity: 1; pointer-events: auto; }
#myBtn:hover { background: #555; }

.nw { white-space: nowrap; }

@media (max-width: 600px) {
  .navbar { width: 100%; margin-top: 0; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card .pic { padding: 6px; }
  .card .title { font-size: 16px; }
  .footer { margin-top: 70px; }
}
