/* Self-hosted so the CSP's font-src 'self' holds and no third-party CDN is
   involved. Both faces are OFL — licences sit beside the files in src/fonts/. */
@font-face {
  font-family: "Josefin Sans";
  src: url("/fonts/josefin-sans-var-latin.woff2") format("woff2-variations");
  font-weight: 100 700; /* variable axis — 400 for UI, 600 for headings */
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cardo";
  src: url("/fonts/cardo-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cardo";
  src: url("/fonts/cardo-400-italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Palette sampled from the hero painting (src/images/main.jpeg): the cream of
   the watercolour paper, the violet-indigo of the wet shadows, the foliage
   olive, the ochre of the sunlit bank and the terracotta of the hat/earth.
   Every pairing below clears WCAG AA against --paper. */
:root {
  --ink: #2a2736;         /* deep violet-black, from the darkest shadows */
  --ink-soft: #635d52;    /* warm grey for meta text */
  --paper: #f7f2e4;       /* watercolour paper */
  --paper-raised: #fdfbf4;/* cards, slightly lifted off the page */
  --accent: #a4472a;      /* terracotta */
  --olive: #4f5d33;       /* foliage */
  --line: #ded5bd;        /* sand */
  --font-ui: "Josefin Sans", "Century Gothic", "Futura", sans-serif;
  --font-prose: "Cardo", "Iowan Old Style", Georgia, serif;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Josefin Sans has a small x-height, so long-form copy runs in Cardo instead —
   the same split the reference site uses. */
.intro p, .about-text p, .work-desc, .contact-details, .lead {
  font-family: var(--font-prose);
  font-size: 1.08rem;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Header / nav */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-name {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.site-nav a {
  margin-left: 1.5rem;
  color: var(--ink);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-nav a[aria-current="page"] {
  border-bottom: 1px solid var(--accent);
}

/* Hero */
.hero {
  height: 60vh;
  min-height: 320px;
  background-size: cover;
  background-position: center;
  background-color: var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--paper);
  position: relative;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Sections */
main > section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem;
}

.intro {
  text-align: center;
}
.intro p { max-width: 640px; margin: 0 auto 1.5rem; font-size: 1.1rem; }
.intro-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  border: 1px solid var(--olive);
  color: var(--olive);
  padding: 0.6rem 1.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background-color 200ms ease, color 200ms ease;
}
.button:hover { background: var(--olive); color: var(--paper); text-decoration: none; }

.page-header { text-align: center; }
.page-header h1 { font-size: 2rem; letter-spacing: 0.12em; }

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  background: var(--paper-raised);
}

.gallery-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.gallery-caption {
  display: block;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.gallery-grid.full figure.gallery-item {
  margin: 0;
}

.gallery-grid.full figcaption {
  padding: 0.7rem 0.9rem 1rem;
}

.work-title { display: block; font-size: 1rem; }
.work-meta { display: block; font-size: 0.85rem; color: var(--ink-soft); }
.work-status {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--line);
}
.work-status--sold { color: var(--accent); border-color: var(--accent); }
.work-status--available { color: var(--olive); border-color: var(--olive); }
.work-desc { font-size: 0.9rem; margin-top: 0.5rem; }
.work-desc p { margin: 0; }

/* About */
.about-content {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.about-portrait {
  width: 280px;
  height: auto;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.about-text { flex: 1; min-width: 260px; }

/* Contact */
.contact-details ul { list-style: none; padding: 0; font-size: 1.05rem; }
.contact-details li { margin-bottom: 0.8rem; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 26, 38, 0.94);
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.lightbox:not([hidden]) { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; }
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--paper);
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}

@media (max-width: 600px) {
  .site-header { flex-direction: column; text-align: center; }
  .site-nav a { margin: 0 0.6rem; }
  /* A 280px column is most of a phone screen anyway — let the portrait fill the
     width instead of leaving a dead gutter beside it. */
  .about-content { gap: 1.75rem; }
  .about-portrait { width: 100%; max-width: 340px; margin-inline: auto; }
}
