/* Els Crawfurd — public site styles */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #faf8f4;
  --text: #2b2b2b;
  --accent: #8a6d4b;
}

body {
  font-family: 'Jost', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, .brand, .title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
}

a { color: inherit; text-decoration: none; }

/* Header */
.site-header {
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.4rem 1.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.brand {
  font-size: 1.5rem;
  letter-spacing: 0.5px;
}
.site-nav {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.site-nav a { padding-bottom: 2px; border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-nav a:hover, .site-nav a.active { border-bottom-color: var(--accent); }
.lang-switch { display: inline-flex; gap: 4px; color: rgba(0,0,0,0.35); }
.lang-switch a.on { color: var(--accent); font-weight: 500; }

/* Main */
.site-main { flex: 1; max-width: 1100px; margin: 0 auto; padding: 3rem 1.5rem; width: 100%; }

.intro { text-align: center; margin-bottom: 3rem; }
.intro h1 { font-size: 2.6rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 400; }
.tagline { color: rgba(0,0,0,0.6); font-style: italic; margin-top: 0.6rem; max-width: 520px; margin-left: auto; margin-right: auto; }
.empty { text-align: center; color: rgba(0,0,0,0.5); }

/* Gallery — shared */
.gallery-item { display: block; }
.thumb {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,0.05);
  transition: transform .3s, box-shadow .3s;
}
.gallery-item:hover .thumb { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(0,0,0,0.1); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Layout: Uniform grid (square tiles) */
.gallery--grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 2.5rem 2rem;
}
.gallery--grid .thumb { aspect-ratio: 1 / 1; }

/* Layout: Masonry (natural image heights via CSS columns) */
.gallery--masonry {
  columns: var(--cols, 3);
  column-gap: 2rem;
}
.gallery--masonry .gallery-item {
  display: inline-block;
  width: 100%;
  margin-bottom: 2.5rem;
  break-inside: avoid;
}
.gallery--masonry .thumb { display: block; }
.gallery--masonry .thumb img { height: auto; }

/* Layout: Mosaic (varied / mixed sizes, captions overlaid) */
.gallery--mosaic {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  grid-auto-rows: 210px;
  grid-auto-flow: dense;
  gap: 1rem;
}
.gallery--mosaic .gallery-item { position: relative; overflow: hidden; }
.gallery--mosaic .thumb { height: 100%; border: none; }
.gallery--mosaic .gallery-item:hover .thumb { transform: none; }
.gallery--mosaic .gallery-item:hover img { transform: scale(1.04); }
.gallery--mosaic .thumb img { transition: transform .4s; }
.gallery--mosaic .caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  margin: 0; padding: 1.4rem 1rem 0.9rem; text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  opacity: 0; transition: opacity .3s;
}
.gallery--mosaic .gallery-item:hover .caption { opacity: 1; }
.gallery--mosaic .caption .title { color: #fff; font-size: 1.15rem; }
.gallery--mosaic .caption .meta { color: rgba(255,255,255,0.8); }
/* Varied spans for the mixed-size look */
.gallery--mosaic .gallery-item:nth-child(6n+1) { grid-row: span 2; }
.gallery--mosaic .gallery-item:nth-child(8n+5) { grid-row: span 2; grid-column: span 2; }
.gallery--mosaic .gallery-item:nth-child(10n+8) { grid-column: span 2; }
.thumb-placeholder {
  color: rgba(0,0,0,0.3);
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.thumb-placeholder.large { aspect-ratio: 4/3; width: 100%; display: flex; align-items: center; justify-content: center; background:#fff; }
.caption { margin-top: 0.9rem; text-align: center; }
.caption .title { display: block; font-size: 1.25rem; }
.caption .meta { display: block; font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; color: rgba(0,0,0,0.5); margin-top: 0.2rem; }

/* Artwork detail */
.artwork-detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: start; }
.artwork-image img { width: 100%; box-shadow: 0 10px 30px rgba(0,0,0,0.1); background:#fff; }
.artwork-info h1 { font-size: 2.4rem; }
.artwork-meta { font-size: 0.78rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin: 0.6rem 0 1.4rem; }
.artwork-desc { font-style: italic; color: rgba(0,0,0,0.7); font-size: 1.05rem; }
.enquire { display: inline-block; margin-top: 1.6rem; padding: 0.7rem 1.4rem; border: 1px solid var(--accent); color: var(--accent); font-size: 0.78rem; letter-spacing: 1.5px; text-transform: uppercase; transition: background .2s, color .2s; }
.enquire:hover { background: var(--accent); color: #fff; }
.back-link { display: block; margin-top: 2rem; font-size: 0.85rem; color: rgba(0,0,0,0.5); }

/* About */
.about-page h1 { font-size: 2.4rem; margin-bottom: 1.5rem; text-align: center; }
.about-body { display: grid; grid-template-columns: auto 1fr; gap: 2.5rem; max-width: 820px; margin: 0 auto; align-items: start; }
.about-body:not(:has(.about-image)) { grid-template-columns: 1fr; }
.about-image img { width: 260px; max-width: 100%; box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.about-text p { margin-bottom: 1rem; font-size: 1.08rem; }
.about-contact a { color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid rgba(0,0,0,0.08); margin-top: 2rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 1.5rem; display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; font-size: 0.8rem; color: rgba(0,0,0,0.5); }
.footer-inner .admin-link { margin-left: auto; }

/* Responsive */
@media (max-width: 760px) {
  .gallery--grid, .gallery--mosaic { grid-template-columns: repeat(2, 1fr); }
  .gallery--masonry { columns: 2; }
}
@media (max-width: 700px) {
  .artwork-detail { grid-template-columns: 1fr; }
  .about-body { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .intro h1 { font-size: 2rem; }
}
@media (max-width: 460px) {
  .gallery--grid { grid-template-columns: 1fr; }
  .gallery--masonry { columns: 1; }
  /* keep mosaic at 2 so it stays interesting on phones */
}

/* ---- Books ---- */
.book-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2.5rem 2rem; }
.book-card { display: block; text-align: center; }
.book-cover { background: #fff; border: 1px solid rgba(0,0,0,0.06); aspect-ratio: 3/4; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,0.08); transition: transform .3s, box-shadow .3s; }
.book-card:hover .book-cover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.12); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card-info { margin-top: 0.9rem; }
.book-card-info .title { display: block; font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; }
.book-card-info .author { display: block; font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; color: rgba(0,0,0,0.5); margin-top: 0.2rem; }

.book-detail { max-width: 880px; margin: 0 auto; }
.book-header { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; background: var(--accent); color: #fff; border-radius: 10px; padding: 2rem; }
.book-header-cover img, .book-header-cover .thumb-placeholder { width: 180px; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); display: block; }
.book-header-text .book-author { font-size: 0.82rem; letter-spacing: 1px; text-transform: uppercase; opacity: 0.85; margin-bottom: 0.4rem; }
.book-header-text h1 { font-size: 2.6rem; line-height: 1.1; color: #fff; }
.book-header-text .book-type { margin-top: 0.8rem; font-size: 0.85rem; opacity: 0.9; }
.book-body { padding: 2rem 0; }
.book-meta { border-collapse: collapse; margin-bottom: 1.5rem; }
.book-meta th { text-align: left; font-weight: 400; color: rgba(0,0,0,0.5); padding: 0.35rem 2rem 0.35rem 0; vertical-align: top; font-size: 0.95rem; }
.book-meta td { padding: 0.35rem 0; }
.book-desc p { margin-bottom: 1rem; font-size: 1.05rem; }
.book-pages-title { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; margin: 1rem 0 1.2rem; }
.book-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.book-page img { width: 100%; border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 4px 14px rgba(0,0,0,0.06); display: block; }
.price { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; color: var(--accent); margin: 1.4rem 0 0.6rem; }
@media (max-width: 700px) {
  .book-header { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .book-header-text h1 { font-size: 2rem; }
}

/* ---- Projects ---- */
.project-detail { max-width: 820px; margin: 0 auto; }
.project-detail h1 { font-size: 2.4rem; }
.project-client { color: rgba(0,0,0,0.6); margin: 0.5rem 0 1.5rem; }
.project-cover img { width: 100%; box-shadow: 0 10px 30px rgba(0,0,0,0.1); margin-bottom: 1.5rem; background: #fff; }
.project-desc p { margin-bottom: 1rem; font-size: 1.05rem; }

/* ---- Book / item detail (refined) ---- */
.book-detail { max-width: 980px; margin: 0 auto; }
.book-layout { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 3.5rem; align-items: start; }
.book-cover-col .book-cover-img { width: 100%; border-radius: 4px; box-shadow: 0 20px 55px rgba(0,0,0,0.20); display: block; }
.book-info-col .eyebrow { font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 0.6rem; }
.book-info-col h1 { font-size: 3rem; line-height: 1.05; }
.item-type { margin-top: 0.6rem; font-size: 0.78rem; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(0,0,0,0.45); }

.meta-list { margin: 1.8rem 0; border-top: 1px solid rgba(0,0,0,0.1); }
.meta-row { display: grid; grid-template-columns: 150px 1fr; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid rgba(0,0,0,0.07); }
.meta-row dt { font-size: 0.7rem; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(0,0,0,0.45); padding-top: 0.2rem; }
.meta-row dd { font-size: 1.02rem; }

.item-desc { margin-top: 1.4rem; }
.item-desc p { margin-bottom: 1rem; font-size: 1.06rem; }

.buy-block { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid rgba(0,0,0,0.1); }
.buy-block .price { display: block; margin: 0 0 0.2rem; }
.price { font-family: 'Cormorant Garamond', serif; font-size: 2rem; color: var(--accent); margin: 1.2rem 0 0.5rem; }

.section-heading { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; margin: 2.5rem 0 1.2rem; text-align: center; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.2rem; }
.grid-img img { width: 100%; border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 6px 18px rgba(0,0,0,0.07); display: block; transition: transform .3s, box-shadow .3s; }
.grid-img:hover img { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0,0,0,0.12); }

@media (max-width: 760px) {
  .book-layout { grid-template-columns: 1fr; gap: 2rem; }
  .book-cover-col { max-width: 300px; margin: 0 auto; }
  .book-info-col h1 { font-size: 2.2rem; }
  .meta-row { grid-template-columns: 120px 1fr; }
}

/* Smaller, uniform-height thumbnails for book pages & project examples */
.image-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.7rem; }
.grid-img { display: block; }
.grid-img img { width: 100%; height: 130px; object-fit: cover; border-radius: 3px; }
@media (max-width: 460px) {
  .image-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
  .grid-img img { height: 110px; }
}

/* ---- Mobile hamburger menu ---- */
.nav-burger { display: none; }  /* hidden on desktop */
@media (max-width: 700px) {
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 7px;
    cursor: pointer;
    border-radius: 6px;
  }
  .nav-burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
  }
  /* Collapsed nav */
  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1rem 0 0.4rem;
    font-size: 0.85rem;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  /* Burger morphs into an X when open */
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .lang-switch { margin-top: 0.3rem; }
}
