/* ===== Base ===== */

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #777777;
  --accent: #b08a65; /* subtle clay tone, used very sparingly */
  --border: #e5e5e5;
  --max-width: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: "Adobe Garamond Pro", "Garamond Premier Pro", Garamond, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 400;
}

strong, b {
  font-weight: 600;
}

em, i {
  font-style: italic;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

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

/* ===== Layout ===== */

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

/* top horizontal line that appears under nav */
.divider {
  border-top: 1px solid var(--border);
  margin: 0 -1.5rem 2rem;
}

/* ===== Header / Nav ===== */

.site-header {
  width: 100%;
  border-bottom: 1px solid transparent; /* keeps things aligned */
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0.75rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-title {
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-title a {
  text-decoration: none;
  color: inherit;
}

.nav {
  display: flex;
  gap: 1.75rem;
  font-size: 14.4px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

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

.nav a.active {
  text-decoration: underline;
}

/* ===== Footer ===== */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.footer-left a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-left a:hover {
  color: var(--text);
}

.footer-nav {
  display: flex;
  gap: 2rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--text);
}

/* Footer symbol */
.footer-pot {
  width: 36px;
  height: 36px;
  justify-self: end;
}

.footer-pot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-pot img:hover {
  opacity: 1;
}

/* ===== Typography ===== */

.page-title {
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.section-heading {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

p {
  line-height: 1.6;
  max-width: 60ch;
}

/* ===== Home (two-panel layout) ===== */

.home-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 0;
}

.home-panel {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.home-panel-label {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-panel-title {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.home-panel-image {
  border: 1px solid var(--border);
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.home-panel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== About ===== */

.about-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.about-content {
  max-width: 100%;
}

.about-title {
  font-size: 1rem;
  font-weight: 400;
  text-decoration: underline;
  margin: 0 0 1.5rem;
}

.about-text-with-image {
  overflow: hidden;
}

.about-sampler {
  float: right;
  width: 280px;
  margin: 0 0 1rem 1.5rem;
  cursor: pointer;
}

.about-content p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 1.5rem;
  max-width: none;
}

.about-quote {
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 2rem 0;
  padding: 0;
  border: none;
}

.about-hero-bottom {
  margin-top: 2rem;
}

.about-hero-bottom img {
  width: 100%;
  display: block;
}

@media (max-width: 768px) {
  .about-sampler {
    float: none;
    width: 100%;
    max-width: 280px;
    margin: 0 auto 1.5rem;
    display: block;
  }

  .about-content p {
    font-size: 0.85rem;
  }

  .about-quote {
    font-size: 0.85rem;
    margin: 1.5rem 0;
  }

  .about-hero-bottom {
    margin-top: 1.5rem;
  }
}

/* ===== Grids (pottery & built work) ===== */

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.grid-item-image {
  border: 1px solid var(--border);
  overflow: hidden;
}

.grid-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grid-item-caption {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Make pottery thumbnails square */
.grid-square .grid-item-image {
  aspect-ratio: 1 / 1;
}

/* ===== Detail pages (single pot / single project) ===== */

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2.5rem;
  align-items: start;
}

.detail-image {
  border: 1px solid var(--border);
}

.detail-meta h1 {
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.detail-meta dl {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
}

.detail-meta dt {
  font-weight: 600;
}

.detail-meta dd {
  margin: 0 0 0.75rem;
}

/* ===== Contact ===== */

.contact-info {
  font-size: 0.95rem;
}

.contact-info p {
  margin: 0.35rem 0;
}

/* ===== Responsive ===== */

/* Hamburger menu button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-right: -0.5rem;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: #111;
  margin: 4px 0;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

@media (max-width: 768px) {
  .site-header {
    position: relative;
  }

  .site-header-inner {
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 0.75rem;
  }

  .menu-toggle {
    display: block !important;
    order: 2;
  }

  .site-title {
    order: 1;
  }

  .nav,
  .site-header-inner .nav {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg);
    flex-direction: column;
    padding: 1rem 1.25rem 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    z-index: 100;
    order: 3;
  }

  .nav.active,
  .site-header-inner .nav.active {
    display: flex !important;
  }

  .home-panels,
  .about-layout,
  .grid--2,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .divider {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    margin-bottom: 1.5rem;
  }
}

/* ===== Built Work tiles ===== */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.work-tile {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.work-tile-image {
  border: 1px solid var(--border);
  overflow: hidden;
  aspect-ratio: 3 / 4; /* matches your Exterior.jpg (1536×2048) */
}

.work-tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 200ms ease;
}

.work-tile:hover .work-tile-image img {
  transform: scale(1.02);
}

.work-tile-caption {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ===== Project header band (hero + gray band) ===== */

.project-hero {
  border: 1px solid var(--border);
}

.project-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.project-band {
  background: #e6e3de;
  border: 1px solid var(--border);
  border-top: none;
  padding: 1.25rem 1.25rem;
}

.project-band-inner {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 2rem;
  align-items: start;
}

.project-title {
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: none;
  margin: 0;
}

.project-subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.project-description {
  margin: 0;
  max-width: none;
}

/* ===== Carousel ===== */

/* ===== Carousel (variable width like BCJ) ===== */

.carousel {
  margin-top: 1.5rem;
  position: relative;
}

.carousel-track {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1rem;
  padding: 0.25rem 0;
  scroll-behavior: smooth;
}

.carousel-track::-webkit-scrollbar {
  height: 10px;
}

/* Each slide's width is determined by the image ratio */
.carousel-slide {
  flex: 0 0 auto;
  scroll-snap-align: center;
  border: 1px solid var(--border);
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}

/* Image keeps its aspect ratio; height constrained */
.carousel-slide img {
  display: block;
  max-height: min(72vh, 650px);
  max-width: 92vw;
  width: auto;
  height: auto;
}

/* Controls unchanged */
.carousel-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.carousel-button {
  pointer-events: auto;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.7);
  background: rgba(17,17,17,0.45);
  color: #fff;
  font-size: 1.5rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
}

.carousel-button:hover {
  background: rgba(17,17,17,0.55);
}

.carousel-button.prev { left: 12px; }
.carousel-button.next { right: 12px; }

@media (max-width: 768px) {
  .carousel-slide img {
    max-height: min(62vh, 520px);
    max-width: 96vw;
  }
}

/* ===== Pottery Gallery ===== */

.gallery-header {
  font-size: 1rem;
  font-weight: normal;
  margin: 0 0 2rem;
}

.gallery-header em {
  font-style: italic;
}

.gallery-subtitle {
  font-style: italic;
  color: var(--muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

/* Vertical divider - only on right-column items, spanning image height only */
.gallery-item:nth-child(even) .gallery-image-wrapper::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.gallery-image-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.gallery-nav {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s;
}

.gallery-nav:hover {
  color: var(--text);
}

.gallery-image {
  flex: 1;
  display: block;
}

.gallery-image img {
  width: 100%;
  height: auto;
}

.gallery-info {
  padding-left: 2rem;
}

.gallery-title {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.gallery-status {
  font-style: italic;
  color: #c44;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.gallery-status--enquire {
  color: #c44;
}

.gallery-dimensions {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.gallery-price {
  font-size: 0.9rem;
  color: var(--text);
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gallery-item:nth-child(even) .gallery-image-wrapper::before {
    display: none;
  }

  .gallery-info {
    padding-left: 2rem;
  }
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
}

.lightbox-image {
  max-width: 70vw;
  max-height: 75vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-close:hover {
  color: #ccc;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  padding: 1rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-nav:hover {
  opacity: 1;
}

.lightbox-nav--prev {
  left: 1rem;
}

.lightbox-nav--next {
  right: 1rem;
}

.lightbox-nav.hidden {
  display: none;
}

@media (max-width: 768px) {
  .lightbox {
    padding: 1rem;
  }

  .lightbox-image {
    max-width: 95vw;
    max-height: 80vh;
  }

  .lightbox-close {
    top: 0.5rem;
    right: 0.75rem;
    font-size: 2rem;
  }

  .lightbox-nav {
    font-size: 2rem;
    padding: 0.5rem;
  }

  .lightbox-nav--prev {
    left: 0.25rem;
  }

  .lightbox-nav--next {
    right: 0.25rem;
  }
}

.gallery-image {
  cursor: pointer;
}

/* ===== Project Page (detailed layout) ===== */

.project-page {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  background: #fff;
}

.project-hero-full {
  width: 100%;
  margin-bottom: 18px;
}

.project-hero-full img {
  width: 100%;
  height: auto;
  display: block;
}

/* Info band below hero */
.project-info-band {
  background: #e6e3de;
  padding: 2rem;
  margin-bottom: 18px;
}

.project-info-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--text);
}

.project-info-title {
  font-size: 20px;
  font-weight: 400;
  margin: 0;
}

.project-info-location {
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
}

.project-info-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
}

.project-info-meta p {
  margin: 0.2rem 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.project-info-meta .meta-spacer {
  height: 0.75rem;
}

.project-info-description h2 {
  font-size: 0.95rem;
  font-weight: 600;
  font-style: italic;
  margin: 0 0 0.75rem;
}

.project-info-description p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0;
  max-width: none;
}

/* Content sections */
.project-content-section {
  margin: 0;
  margin-bottom: 18px;
  padding: 2rem;
  background: #e6e3de;
}

.project-content-section.project-content-section--with-image {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 0;
  align-items: stretch;
}

.project-content-section.project-content-section--image-left {
  grid-template-columns: 60% 40%;
}

.content-text-block {
  overflow: hidden;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.content-text-block h2 {
  font-size: 0.95rem;
  font-weight: 600;
  font-style: italic;
  margin: 0 0 1rem;
}

.content-text-block p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 1rem;
  max-width: 100%;
  word-wrap: break-word;
}

.content-text-block p:last-child {
  margin-bottom: 0;
}

.content-image-block {
  min-width: 0;
  overflow: hidden;
}

.content-image-block img {
  width: 100%;
  height: auto;
  display: block;
}

/* Flush images - pull image to edges with negative margins */
/* Image on RIGHT (text first, image second) */
.project-content-section--with-image:not(.project-content-section--image-left) .content-text-block {
  padding-right: 2rem;
  padding-left: 0;
}

.project-content-section--with-image:not(.project-content-section--image-left) .content-image-block {
  margin: -2rem -2rem -2rem 0;
}

.project-content-section--with-image .content-image-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Image on LEFT (image first, text second) */
.project-content-section--image-left .content-text-block {
  padding-right: 0;
  padding-left: 2rem;
}

.project-content-section--image-left .content-image-block {
  margin: -2rem 0 -2rem -2rem;
}

.content-image-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.content-image-stack img {
  width: 100%;
  height: auto;
  display: block;
}

/* Image row - 3 images side by side */
.project-image-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 18px;
}

.project-image-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .project-image-row {
    grid-template-columns: 1fr;
  }
}

/* Full width images between sections */
.project-full-image {
  width: 100%;
  margin: 0 0 18px;
}

.project-full-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Project page carousel adjustments */
.project-page .carousel {
  margin: 0;
  margin-top: 0 !important;
  margin-bottom: 8px;
}

.project-page .carousel-track {
  padding: 0;
  margin: 0;
}

@media (max-width: 768px) {
  /* Project info band */
  .project-info-band {
    padding: 1.25rem;
  }

  .project-info-header {
    flex-direction: column;
    gap: 0.25rem;
  }

  .project-info-title {
    font-size: 18px;
  }

  .project-info-location {
    font-size: 16px;
  }

  .project-info-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .project-info-meta p {
    font-size: 0.8rem;
  }

  .project-info-description h2 {
    font-size: 0.85rem;
  }

  .project-info-description p {
    font-size: 0.85rem;
  }

  /* Content sections with images */
  .project-content-section {
    padding: 1.25rem;
    margin-bottom: 12px;
  }

  /* Image+text sections on mobile: stack vertically, full width */
  .project-content-section.project-content-section--with-image,
  .project-content-section.project-content-section--image-left {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 !important;
    overflow: hidden;
  }

  .project-content-section--with-image .content-text-block,
  .project-content-section--image-left .content-text-block {
    padding: 1.25rem !important;
    order: 2;
  }

  .project-content-section--with-image .content-image-block,
  .project-content-section--image-left .content-image-block,
  .project-content-section--with-image:not(.project-content-section--image-left) .content-image-block {
    margin: 0 !important;
    order: 1;
  }

  .project-content-section--with-image .content-image-block img,
  .project-content-section--image-left .content-image-block img {
    width: 100%;
    height: auto;
  }

  .content-text-block h2 {
    font-size: 0.85rem;
    margin-top: 0;
  }

  .content-text-block p {
    font-size: 0.85rem;
  }

  /* Hero images */
  .project-hero-full {
    margin-bottom: 12px;
  }

  /* Carousels on mobile */
  .project-page .carousel {
    margin-bottom: 6px;
  }

  /* Built work grid */
  .work-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Footer */
  .site-footer-inner {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 1rem;
    padding: 1.25rem;
  }

  .footer-left {
    grid-column: 1;
    grid-row: 1;
  }

  .footer-nav {
    grid-column: 1;
    grid-row: 2;
    gap: 1.5rem;
  }

  .footer-pot {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
  }

  /* Page inner padding */
  .page-inner {
    padding: 1rem 1.25rem 2rem;
  }

  .project-page {
    padding: 0 1rem;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .site-header-inner {
    padding: 1rem 1rem 0.5rem;
  }

  .nav.active {
    gap: 0.75rem;
    font-size: 12px;
  }

  .site-title {
    font-size: 1rem;
  }

  .project-info-band {
    padding: 1rem;
  }

  .project-content-section {
    padding: 1rem;
  }

  .project-content-section.project-content-section--with-image,
  .project-content-section.project-content-section--image-left {
    padding: 0 !important;
  }

  .project-content-section--with-image .content-image-block,
  .project-content-section--image-left .content-image-block {
    margin: 0 !important;
  }

  .project-content-section--with-image .content-text-block,
  .project-content-section--image-left .content-text-block {
    padding: 1rem !important;
  }

  .carousel-slide img {
    max-height: min(50vh, 400px);
  }

  .carousel-button {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .carousel-button.prev { left: 8px; }
  .carousel-button.next { right: 8px; }

  .page-inner {
    padding: 0.75rem 1rem 1.5rem;
  }

  .project-page {
    padding: 0 0.75rem;
  }

  .about-wrapper {
    max-width: 100%;
  }

  .about-sampler {
    width: 100%;
    max-width: 250px;
  }
}

