/* ============================================
   Herman Davis — Ministry of Wood
   Modern, professional artist portfolio
   ============================================ */

:root {
  /* Warm wood-inspired palette */
  --color-bg: #F8F5F0;
  --color-bg-alt: #F0EBE3;
  --color-surface: #FFFFFF;
  --color-text: #2C241B;
  --color-text-muted: #5C534A;
  --color-accent: #8B5E3C;
  --color-accent-dark: #6B4423;
  --color-accent-light: #C4A484;
  --color-border: #E5DFD5;
  --color-hero-overlay: rgba(44, 36, 27, 0.55);

  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing & layout */
  --container: 1120px;
  --section-pad: 6rem 0;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(44, 36, 27, 0.08);
  --shadow-hover: 0 12px 40px rgba(44, 36, 27, 0.12);

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

ul {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Utilities */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-pad);
}

.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 540px;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header .section-desc {
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-outline:hover {
  background: #fff;
  color: var(--color-text);
  border-color: #fff;
}

.btn-full {
  width: 100%;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.header.scrolled {
  background: rgba(248, 245, 240, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
  transition: color 0.3s;
}

.logo-tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.3s;
}

.header.scrolled .logo-name {
  color: var(--color-text);
}

.header.scrolled .logo-tag {
  color: var(--color-accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s;
}

.nav-link:hover {
  color: #fff;
}

.header.scrolled .nav-link {
  color: var(--color-text-muted);
}

.header.scrolled .nav-link:hover {
  color: var(--color-accent);
}

.nav-cta {
  padding: 0.5rem 1.1rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #fff !important;
}

.header.scrolled .nav-cta {
  background: var(--color-accent);
  color: #fff !important;
}

.header.scrolled .nav-cta:hover {
  background: var(--color-accent-dark);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  transition: all 0.3s;
}

.header.scrolled .menu-toggle span {
  background: var(--color-text);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: url('images/hero.jpg') center top/cover no-repeat;
  color: #fff;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(ellipse at 30% 50%, rgba(139, 94, 60, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 20%, rgba(196, 164, 132, 0.1) 0%, transparent 50%);
  background-color: rgba(44, 36, 27, 0.7);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 4rem;
  max-width: 720px;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 600;
  line-height: 1.05;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 400;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
  max-width: 540px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* About */
.about {
  background: var(--color-surface);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
  align-items: start;
}

.about-image {
  position: relative;
}

.about-image-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
  background: var(--color-bg-alt);
}

.about-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
}

.about-image-frame:hover .about-portrait-img {
  transform: scale(1.03);
}

/* Gallery & Masonry */
.gallery {
  background: var(--color-bg);
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  color: var(--color-text-muted);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(44, 36, 27, 0.04);
  transition: all 0.25s var(--ease);
}

.filter-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(139, 94, 60, 0.25);
}

.filter-count {
  display: inline-block;
  background: rgba(0, 0, 0, 0.07);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  margin-left: 0.45rem;
  transition: all 0.25s var(--ease);
}

.filter-btn.active .filter-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Gallery Wrapper (Load More UX) */
.gallery-wrapper {
  position: relative;
  max-height: 1200px;
  overflow: hidden;
  transition: max-height 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-wrapper.expanded {
  max-height: 15000px;
}

.gallery-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 400px;
  background: linear-gradient(to bottom, rgba(248, 245, 240, 0), rgba(248, 245, 240, 1) 85%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 3rem;
  z-index: 10;
  transition: opacity 0.5s ease;
}

.gallery-wrapper.expanded .gallery-fade {
  opacity: 0;
  pointer-events: none;
}

/* Masonry Grid */
.gallery-masonry {
  column-count: 3;
  column-gap: 1.5rem;
  width: 100%;
}

.gallery-card {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), opacity 0.35s var(--ease);
  position: relative;
}

.gallery-card.hidden {
  display: none !important;
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.gallery-card-inner {
  position: relative;
  overflow: hidden;
}

.gallery-card-inner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  transition: transform 0.5s var(--ease);
}

.gallery-card:hover .gallery-card-inner img {
  transform: scale(1.04);
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(44, 36, 27, 0.88) 0%, rgba(44, 36, 27, 0.3) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.gallery-card:hover .gallery-card-overlay {
  opacity: 1;
}

.gallery-card-category {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: 0.25rem;
}

.gallery-card-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(24, 18, 12, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.lightbox-container {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  z-index: 20;
}

.lightbox-close:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: scale(1.08);
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  z-index: 20;
}

.lightbox-arrow:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}

.lightbox-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 960px;
  width: 100%;
  max-height: 88vh;
  margin: 0 auto;
}

.lightbox-image-wrapper {
  max-height: 70vh;
  max-width: 85vw;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.2);
}

.lightbox-img {
  max-height: 70vh;
  max-width: 85vw;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg);
  transition: transform 0.3s var(--ease);
}

.lightbox-caption {
  margin-top: 1.25rem;
  color: #fff;
  text-align: center;
  max-width: 600px;
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.lightbox-badge {
  background: var(--color-accent);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lightbox-counter {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  font-weight: 500;
}

.lightbox-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #fff;
}

.lightbox-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

/* Process */
.process {
  background: var(--color-surface);
}

.process-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: start;
}

.process-content p {
  color: var(--color-text-muted);
  margin-bottom: 1.15rem;
  font-size: 1.02rem;
}

.process-list {
  margin-top: 1.75rem;
}

.process-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.65rem;
  color: var(--color-text);
  font-size: 0.98rem;
}

.process-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 7px;
  height: 7px;
  background: var(--color-accent);
  border-radius: 50%;
}

.quote {
  background: var(--color-bg-alt);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-accent);
  margin-bottom: 1.75rem;
}

.quote p {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.quote cite {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 500;
  color: var(--color-accent);
}

.process-card {
  background: var(--color-text);
  color: #fff;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
}

.process-card h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.process-card ul li {
  padding: 0.4rem 0;
  font-size: 0.95rem;
  opacity: 0.9;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.process-card ul li:last-child {
  border-bottom: none;
}

/* Contact */
.contact {
  background: var(--color-bg);
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  background: var(--color-surface);
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid var(--color-border);
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.06);
  border-color: var(--color-accent);
}

.contact-card .contact-icon {
  font-size: 2rem;
  background: var(--color-bg);
  width: 4.5rem;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-text);
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  transition: color 0.2s, border-color 0.2s;
}

.contact-card:hover .contact-icon {
  color: var(--color-accent);
  border-color: var(--color-accent-light);
}

.contact-card-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-card-info p {
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

.contact-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.contact-footer-location {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-footer-location p {
  font-size: 1.05rem;
  color: var(--color-text);
}

.contact-icon-small {
  font-size: 1.4rem;
}

.contact-social {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.contact-social h4 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  display: inline-flex;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text);
  transition: all 0.2s;
}

.social-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}



/* Footer */
.footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer .logo-name {
  color: #fff;
  font-size: 1.2rem;
}

.footer .logo-tag {
  color: var(--color-accent-light);
}

.footer-copy {
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
}

.footer-links a:hover {
  color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
  .about-grid,
  .process-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-methods {
    grid-template-columns: 1fr;
  }

  .contact-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .contact-social {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .about-image {
    max-width: 360px;
    margin: 0 auto;
  }

  .about-badge {
    right: 0;
  }

  .gallery-masonry {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  :root {
    --section-pad: 4rem 0;
  }

  .nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg);
    padding: 1.5rem;
    gap: 0;
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: flex;
  }

  .nav-link {
    color: var(--color-text) !important;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-border);
    width: 100%;
  }

  .nav-cta {
    background: var(--color-accent) !important;
    color: #fff !important;
    text-align: center;
    margin-top: 0.75rem;
    border-radius: 4px;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-content {
    padding-top: 2rem;
  }

  .about-stats {
    gap: 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .gallery-masonry {
    column-count: 1;
  }

  .lightbox-container {
    padding: 1rem;
  }

  .lightbox-arrow {
    width: 44px;
    height: 44px;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
