/* Design tokens extracted from the live Squarespace site (see INVENTORY.md).
   Fonts: Mulish subs for Museo Sans, Inter subs for Proxima Nova. */
:root {
  --font-body: 'Mulish', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-heading: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --color-text: #666;
  --color-nav: #1f1f1f;
  --color-nav-active: #a3a3a3;
  --color-black: #000;
  --color-caption: #aaa;
  --color-button: #272727;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: .01em;
}

a { color: inherit; text-decoration: none; }
a.text-link { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .01em;
  margin: 1em 0;
}
h2 { font-size: 18px; }
h3 { font-size: 15.6px; }

/* ---- Layout: fixed left sidebar, as on the live site ---- */
.wrapper {
  max-width: 1233px;
  margin: 0 auto;
  padding: 50px;
  display: flex;
  gap: 50px;
  align-items: flex-start;
}

.sidebar {
  width: 200px;
  flex: none;
  position: sticky;
  top: 50px;
}

.site-title {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: .01em;
  line-height: 1.2;
  margin: 0 0 30px;
}
.site-title a { color: var(--color-black); }

.nav { display: flex; flex-direction: column; }
.nav a {
  color: var(--color-nav);
  font-size: 16px;
  line-height: 1.2;
  padding: .2em 0;
}
.nav a:hover { color: var(--color-black); }
.nav a.active { color: var(--color-nav-active); }
.nav-secondary { margin-top: 20px; }

.social-icon {
  display: inline-block;
  margin-top: 28px;
  color: var(--color-text);
  line-height: 0;
}
.social-icon:hover { color: var(--color-black); }

/* Active slide's caption, shown in the sidebar (slideshow mode only) */
.ss-caption { display: none; }
.js-slideshow .ss-caption { display: block; margin-top: 26px; }
.ss-caption p, .slide figcaption p { margin: 0 0 1em; color: var(--color-text); }
.cap-title { font-style: italic; }

/* Thumbnail grid navigator */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-top: 26px;
}
.thumb-grid a {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
}
.thumb-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-grid a.current img { opacity: .4; }
.thumb-grid a:hover img { opacity: .75; }
.thumb-grid a.current:hover img { opacity: .4; }

main { flex: 1; min-width: 0; }

/* ---- Content pages ---- */
.page-narrow { max-width: 466px; margin: 0 auto; }
.page-medium { max-width: 620px; margin: 0 auto; }
.page-narrow p, .page-medium p { margin: 1em 0; }
.page-narrow picture img, .contact-photo picture img { margin-bottom: 24px; }
.contact-photo { max-width: 466px; }

/* ---- Gallery ---- */
/* Without JS the slides render as a stacked, lazy-loaded list. */
.slide { margin: 0 0 40px; }
.slide figcaption { margin-top: 12px; }

/* With JS the same markup becomes a one-image-at-a-time slideshow,
   matching the live site's gallery: caption moves to the sidebar. */
.js-slideshow .slide figcaption { display: none; }
.js-slideshow .slide { display: none; margin: 0; cursor: pointer; }
.js-slideshow .slide.active { display: block; }
.js-slideshow .slide.active img {
  max-height: calc(100vh - 220px);
  width: auto;
  max-width: 100%;
}

.slideshow-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--color-caption);
}
.slideshow-controls button {
  background: none;
  border: none;
  padding: 0 4px;
  font-size: 20px;
  line-height: 1;
  color: var(--color-text);
  cursor: pointer;
}
.slideshow-controls button:hover { color: var(--color-black); }
#ss-expand { margin-left: auto; font-size: 16px; }

/* ---- Full-screen view (lightbox) ---- */
.lightbox-open { overflow: hidden; }
.lightbox-open .slide.active {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 56px;
  margin: 0;
}
.lightbox-open .slide.active img {
  max-height: calc(100vh - 110px);
  max-width: 100%;
  width: auto;
}
.lightbox-open .slideshow-controls {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 101;
  background: #fff;
  padding: 4px 10px;
  margin: 0;
}
.lightbox-open #ss-expand { margin-left: 0; }

/* ---- Contact form ---- */
.contact-form { max-width: 500px; margin-top: 32px; }
.contact-form label {
  display: block;
  margin: 18px 0 6px;
  color: var(--color-nav);
}
.contact-form .req { color: var(--color-caption); font-size: 12px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 0;
  background: #fff;
  font: inherit;
  color: #333;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #999;
}
.name-row { display: flex; gap: 10px; }
.contact-form button[type="submit"] {
  margin-top: 24px;
  padding: 12px 28px;
  background: var(--color-button);
  color: #fff;
  border: none;
  border-radius: 0;
  font: inherit;
  cursor: pointer;
}
.contact-form button[type="submit"]:hover { background: #2f2f2f; }

/* ---- Mobile ---- */
@media (max-width: 768px) {
  .wrapper {
    flex-direction: column;
    padding: 20px;
    gap: 24px;
  }
  .sidebar { position: static; width: 100%; }
  .site-title { margin-bottom: 12px; font-size: 22px; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 2px 18px; }
  .nav-secondary { margin-top: 0; }
  .social-icon { margin-top: 14px; }
  /* On mobile the caption returns under the image and the grid is hidden. */
  .js-slideshow .ss-caption, .thumb-grid { display: none; }
  .js-slideshow .slide.active figcaption { display: block; }
  .js-slideshow .slide.active img { max-height: none; width: 100%; }
  .name-row { flex-direction: column; }
}
