/* =========================================================
   MARTIN BLUNDELL — ARTIST WEBSITE
   Font: Josefin Sans Bold (closest free substitute for Futura Bold)
   To use an actual Futura Bold logo, replace .logo text with <img>
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@700&family=Open+Sans:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --sidebar-w: 500px;
  --white: #ffffff;
  --black: #111111;
  --muted: #888888;
  --light-gray: #f5f5f5;
  --border: #e4e4e4;
  --font-logo: 'Josefin Sans', 'Futura', 'Century Gothic', sans-serif;
  --font-body: 'Open Sans', sans-serif;
}

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

html { font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  padding: 120px 28px 28px 80px;
  display: flex;
  flex-direction: column;
  z-index: 100;
  background: var(--white);
  overflow-y: auto;
}

.logo {
  font-family: var(--font-logo);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  line-height: 1.45;
  margin-bottom: 38px;
  color: var(--black);
  flex-shrink: 0;
}
.logo a { color: inherit; }

nav ul {
  list-style: none;
}

nav > ul > li {
  margin-bottom: 7px;
}

nav > ul > li > a {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--black);
  display: block;
  padding: 1px 0;
  transition: color 0.18s;
}

nav > ul > li > a:hover,
nav > ul > li > a.active {
  color: var(--muted);
}

/* =========================================================
   SUB-NAVIGATION (Nested)
   ========================================================= */
.sub-nav {
  padding-left: 15px;
  margin-top: 4px;
  margin-bottom: 8px;

  /* Collapse / Expand */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.sub-nav li {
  margin-bottom: 4px;
}

.sub-nav a {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
  display: block;
  transition: color 0.18s;
}

.sub-nav a:hover,
.sub-nav a.active {
  color: var(--black);
}

/* Show sub-nav when parent is hovered or active */
nav > ul > li:hover > .sub-nav,
nav > ul > li.active > .sub-nav {
  max-height: 300px;   /* Adjust if you have more items */
}
/* =========================================================
   PAGE WRAPPER
   ========================================================= */

.center {
  display: flex;
  justify-content: center;
  align-items: center;
}
.page-wrapper {

  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* Symmetric gutters = content centered in the full window.
     The left gutter also keeps content clear of the fixed sidebar. */
  padding-left: var(--sidebar-w);
  padding-right: var(--sidebar-w);
}

.content {
  flex: 1;
  padding: 	120px 52px 52px 52px;
}

/* =========================================================
   FOOTER
   ========================================================= */


footer {
  text-align: center;
  padding: 22px 20px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.07em;
  border-top: 0px solid var(--border);
}

/* =========================================================
   HOME PAGE — HERO
   ========================================================= */

/* Home page only: keep the left gutter clearing the sidebar (unchanged),
   but use a smaller right-hand margin so the hero image can be larger.
   Sidebar width/logo are untouched on every page. */
.home .page-wrapper {
  padding-right: 140px;
}

.hero-wrap {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

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

/* =========================================================
   GALLERY GRID
   ========================================================= */

.gallery-title {
  font-family: var(--font-logo);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 28px;
  color: var(--black);
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
}

.thumb-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--light-gray);
  position: relative;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.thumb-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.3s ease;
}

.thumb-item:hover img {
  transform: scale(1.05);
}

.thumb-item:hover::after {
  background: rgba(0,0,0,0.08);
}

/* Loading state placeholder */
.thumb-placeholder {
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   SLIDESHOW PAGE
   ========================================================= */

.slideshow-back {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  display: block;
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 28px;
  transition: color 0.18s;
}

.slideshow-back:hover { color: var(--black); }

.slideshow-image-wrap {
  max-width: 840px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.slideshow-image-wrap img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

.slideshow-bottom {
  max-width: 840px;
  margin-top: 22px;
  margin-left: auto;
  margin-right: auto;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.artwork-info {
  text-align: center;
}
.artwork-info .artwork-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.artwork-info .artwork-meta {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.06em;
  line-height: 1.7;
}

.slideshow-controls {
  display: flex;
  align-items: center;
	justify-content: center;
  gap: 16px;
  flex-shrink: 0;
}

.slide-counter {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.1em;
  min-width: 40px;
  text-align: center;
}

.nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  font-size: 20px;
  color: var(--black);
  line-height: 1;
  transition: color 0.2s, transform 0.2s;
}

.nav-btn:hover { color: var(--muted); transform: scale(1.15); }
.nav-btn:disabled { color: #d0d0d0; cursor: default; transform: none; }

/* =========================================================
   TWO-COLUMN (ABOUT / STATEMENT)
   ========================================================= */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  align-items: start;
  padding-top: 8px;
}

.text-col h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.text-col .subtitle {
  font-size: 18px;
  color: var(--muted);
  letter-spacing: 0.07em;
  margin-bottom: 18px;
}

.text-col p {
  font-size: 15px;
  line-height: 1.8;
  color: #2a2a2a;
  margin-bottom: 16px;
}

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

/* =========================================================
   CONTACT PAGE
   ========================================================= */

.contact-wrap {
  display: grid;
  grid-template-columns: 195px 1fr;
  gap: 64px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 8px;
  align-items: start;
}

.contact-left h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.contact-left p,
.contact-left a {
  font-size: 15px;
font-weight: 700;
  line-height: 2;
  color: #333;
  display: block;
}

.contact-left a:hover { color: var(--black); text-decoration: underline; text-underline-offset: 2px; }

.contact-right .form-intro {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 26px;
  max-width: 460px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 7px;
  color: var(--black);
}

.form-label .req {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
  text-transform: lowercase;
  letter-spacing: 0;
  margin-left: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 9px 11px;
  background: var(--light-gray);
  border: none;
  border-bottom: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--black);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-bottom-color: var(--black);
  background: #ececec;
}

textarea {
  min-height: 110px;
  resize: vertical;
  border: 1px solid var(--border);
}

textarea:focus { border-color: var(--black); }

.btn-send {
  margin-top: 6px;
  padding: 9px 26px;
  background: var(--white);
  border: 1px solid var(--black);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-send:hover {
  background: var(--black);
  color: var(--white);
}

/* =========================================================
   GALLERIES PAGE
   ========================================================= */

.galleries-wrap {
  display: grid;
  grid-template-columns: 450px 1fr;
  gap: 64px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 8px;
  align-items: start;
}

.galleries-intro p {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
}

.gallery-logos {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.gallery-logo-link {
  display: block;
  transition: opacity 0.22s;
}

.gallery-logo-link:hover { opacity: 0.75; }

.gallery-logo-link img {
  max-width: 260px;
  height: auto;
}

/* Fallback text links if image not available */
.gallery-text-link {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 0;
  border-bottom: 1.5px solid var(--black);
  transition: color 0.2s, border-color 0.2s;
}

.gallery-text-link:hover { color: var(--muted); border-color: var(--muted); }

/* =========================================================
   MOBILE HEADER + HAMBURGER
   ========================================================= */

.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 58px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
}

.mobile-logo {
  display: block;
  width: 300px;
  max-width: 60vw;
  height: 22px;
  /* Reuse the same logo artwork as the sidebar */
  background: url('martin-logo.svg') no-repeat left center / contain;
  /* Hide the fallback text but keep it for screen readers */
  text-indent: -9999px;
  overflow: hidden;
  white-space: nowrap;
}

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--black);
  transition: all 0.25s;
}

/* Nav overlay (mobile) */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 95;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    z-index: 160;
    width: 210px;
    box-shadow: none;
    padding-top: 78px; /* clear the fixed mobile header, no room needed for a second logo */
  }

  /* Mobile header already shows the logo — hide the sidebar's own copy */
  .sidebar .logo {
    display: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 6px 0 24px rgba(0,0,0,0.12);
  }

  .nav-overlay.open {
    display: block;
  }

  .mobile-header {
    display: flex;
  }

  .page-wrapper,
  .home .page-wrapper {
    margin-left: 0;
    padding-left: 0;
    padding-right: 0;
    padding-top: 58px;
  }

  .content {
    padding: 28px 20px 48px;
  }

  .thumbnail-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .galleries-wrap {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .slideshow-bottom {
    flex-direction: column;
    gap: 16px;
  }

  /* Swipe replaces arrow navigation on mobile */
  .nav-btn {
    display: none;
  }
}

@media (max-width: 480px) {
  .thumbnail-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
  }

  .content {
    padding: 22px 16px 40px;
  }
}
