/* ============================================================
   WYCHECK PHOTOGRAPHY — styles.css
   Fonts: Playfair Display (serif), Inter (sans-serif)
   Design System from Figma
   ============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  --color-bg:           #F8F7F4;
  --color-text-primary: #1A1916;
  --color-text-muted:   #8A887E;
  --color-text-dark:    #383732;
  --color-placeholder:  #EEECEA;
  --color-border:       rgba(26, 25, 22, 0.10);
  --color-white:        #FFFFFF;

  --sidebar-width:      220px;

  --font-serif:         'Playfair Display', Georgia, serif;
  --font-sans:          'Inter', system-ui, sans-serif;

  --transition-base:    0.25s ease;
  --transition-slow:    0.45s ease;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
}

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

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

ul, ol {
  list-style: none;
}

/* ============================================================
   LAYOUT — Sidebar + Content
   ============================================================ */

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

/* ============================================================
   SIDEBAR / NAV
   ============================================================ */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--color-white);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  /* Subtle scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 3px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--color-border);
}

/* --- Logo / Brand --- */
.sidebar-logo {
  padding: 40px 32px 32px;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-logo a {
  display: block;
}



/* Real SVG logo — sized to fit sidebar width */
.sidebar-logo-mark {
  width: 156px;
  height: auto;
  display: block;
  /* Prevent any browser focus ring or outline on SVG elements */
  outline: none;
}

/* Kill the blue outline/box that some browsers draw around inline SVG inside <a> */
.sidebar-logo a {
  display: block;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.sidebar-logo a:focus-visible {
  outline: 2px solid var(--color-text-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Navigation --- */
.sidebar-nav {
  flex: 1;
  padding: 32px 0 32px;
}

.nav-section {
  margin-bottom: 0;
}

.nav-section + .nav-section {
  margin-top: 8px;
}

/* Primary nav items */
.nav-primary-item {
  display: block;
}

.nav-primary-link {
  display: block;
  padding: 7px 32px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--transition-base);
  position: relative;
}

.nav-primary-link:hover,
.nav-primary-link.active {
  color: var(--color-text-primary);
}

.nav-primary-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 16px;
  background: var(--color-text-primary);
}

/* Portfolio sub-nav toggle */
.nav-portfolio-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-arrow {
  width: 10px;
  height: 10px;
  display: inline-flex;
  align-items: center;
  transition: transform var(--transition-base);
}

.nav-arrow svg {
  width: 8px;
  height: 5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.nav-portfolio-item.open .nav-arrow {
  transform: rotate(180deg);
}

/* Sub-nav categories */
.nav-sub {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.nav-portfolio-item.open .nav-sub {
  max-height: 300px;
}

.nav-sub-link {
  display: block;
  padding: 5px 32px 5px 44px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--transition-base);
}

.nav-sub-link:hover,
.nav-sub-link.active {
  color: var(--color-text-primary);
}

/* Mobile toggle — hidden on desktop */
.mobile-menu-toggle {
  display: none;
}

/* --- Sidebar Footer / Copyright --- */
.sidebar-footer {
  padding: 24px 32px;
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.sidebar-footer p {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
}

/* ============================================================
   PAGE HEADER (used on category pages and about/contact)
   ============================================================ */

.page-header {
  padding: 64px 64px 40px;
  border-bottom: 1px solid var(--color-border);
}

.page-header-eyebrow {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.page-header-title {
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

.page-header-title em {
  font-style: italic;
}

.page-header-count {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-top: 12px;
}

/* ============================================================
   HOME HERO / INTRO
   ============================================================ */

.home-intro {
  padding: 72px 64px 56px;
}

.home-intro-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.home-intro-headline {
  font-family: var(--font-serif);
  font-size: 52px;
  font-weight: 400;
  line-height: 1.12;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  max-width: 680px;
}

.home-intro-headline em {
  font-style: italic;
  color: var(--color-text-muted);
}

.home-intro-sub {
  margin-top: 28px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 460px;
  letter-spacing: 0.01em;
}

/* ============================================================
   PHOTO GRID — Masonry 4-column
   ============================================================ */

.photo-grid {
  padding: 0 24px 64px;
}

/* CSS columns masonry */
.masonry {
  column-count: 4;
  column-gap: 8px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

/* Image fills column width, height auto from object-fit */
.masonry-item img,
.masonry-item .photo-placeholder {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-slow), filter var(--transition-slow);
}

/* Placeholder for missing images — preserves aspect ratio from data-attr */
.photo-placeholder {
  background-color: var(--color-placeholder);
  width: 100%;
}

/* Hover overlay */
.masonry-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(26, 25, 22, 0);
  transition: background var(--transition-base);
  pointer-events: none;
}

.masonry-item:hover::after {
  background: rgba(26, 25, 22, 0.12);
}

.masonry-item:hover img,
.masonry-item:hover .photo-placeholder {
  transform: scale(1.02);
}

/* Photo caption — hidden, shown in lightbox */
.masonry-item figcaption {
  display: none;
}

/* ============================================================
   CATEGORY SECTIONS (Home page grouped by category)
   ============================================================ */

.category-section {
  margin-bottom: 80px;
}

.category-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 32px 64px 20px;
}

.category-section-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

.category-section-link {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--transition-base);
  display: flex;
  align-items: center;
  gap: 6px;
}

.category-section-link:hover {
  color: var(--color-text-primary);
}

.category-section-link svg {
  width: 12px;
  height: 8px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: transform var(--transition-base);
}

.category-section-link:hover svg {
  transform: translateX(3px);
}

/* ============================================================
   PORTFOLIO INDEX PAGE — Category Cards Grid
   ============================================================ */

.portfolio-grid {
  padding: 40px 48px 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.portfolio-card {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: pointer;
}

.portfolio-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.portfolio-card-placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-placeholder);
  transition: transform var(--transition-slow);
}

.portfolio-card:hover .portfolio-card-image,
.portfolio-card:hover .portfolio-card-placeholder {
  transform: scale(1.04);
}

.portfolio-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,25,22,0.65) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 24px;
  transition: opacity var(--transition-base);
}

.portfolio-card-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--color-white);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.portfolio-card-count {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
}

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

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: calc(100vh - 120px);
}

.about-text-col {
  padding: 64px 64px 80px;
  border-right: 1px solid var(--color-border);
}

.about-images-col {
  padding: 64px 48px 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: flex-start;
}

.about-image-item {
  width: 100%;
  max-width: 340px;
  overflow: hidden;
}

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

.about-section-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.about-headline {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 32px;
}

.about-headline em {
  font-style: italic;
}

.about-body {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
}

.about-body p + p {
  margin-top: 16px;
}

.about-body strong {
  font-weight: 500;
  color: var(--color-text-primary);
}

.about-signature {
  margin-top: 40px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-style: italic;
  color: var(--color-text-primary);
}

/* Contact specific */
.contact-info {
  margin-top: 40px;
}

.contact-item {
  margin-bottom: 20px;
}

.contact-item-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.contact-item-value {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-text-primary);
  letter-spacing: 0.01em;
}

.contact-item-value a {
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border);
  transition: border-color var(--transition-base), color var(--transition-base);
}

.contact-item-value a:hover {
  color: var(--color-text-muted);
  border-color: var(--color-text-muted);
}

/* About images grid */
.about-image-item {
  overflow: hidden;
}

/* About image placeholder (kept for products page parity) */
.about-image-placeholder {
  background: var(--color-placeholder);
  aspect-ratio: 3/4;
  width: 100%;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(26, 25, 22, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap {
  position: relative;
  max-width: 85vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 85vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  /* Handle both landscape and portrait photos */
}

/* Lightbox placeholder (before real images) */
.lightbox-placeholder {
  background: var(--color-placeholder);
  width: 60vw;
  height: 75vh;
  max-width: 900px;
}

/* Lightbox controls */
.lightbox-close {
  position: fixed;
  top: 28px;
  right: 36px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(248,247,244,0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-base), border-color var(--transition-base);
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(248,247,244,0.08);
  border-color: rgba(248,247,244,0.5);
}

.lightbox-close svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-bg);
  stroke-width: 1.5;
  fill: none;
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: transparent;
  border: 1px solid rgba(248,247,244,0.20);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-base), border-color var(--transition-base);
  z-index: 10;
}

.lightbox-prev { left: 32px; }
.lightbox-next { right: 32px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(248,247,244,0.08);
  border-color: rgba(248,247,244,0.45);
}

.lightbox-prev svg,
.lightbox-next svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-bg);
  stroke-width: 1.5;
  fill: none;
}

/* Lightbox footer — caption + counter */
.lightbox-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to top, rgba(26,25,22,0.6), transparent);
}

.lightbox-caption {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(248,247,244,0.75);
}

.lightbox-counter {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(248,247,244,0.45);
}

/* Lightbox image transition */
.lightbox-img-wrap {
  transition: opacity 0.2s ease;
}

.lightbox-img-wrap.fade {
  opacity: 0;
}

/* ============================================================
   DIVIDER LINE
   ============================================================ */

.section-divider {
  width: 48px;
  height: 1px;
  background: var(--color-border);
  margin: 40px 64px;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   KEYBOARD / FOCUS STYLES
   ============================================================ */

:focus-visible {
  outline: 2px solid var(--color-text-primary);
  outline-offset: 2px;
}

/* ============================================================
   RESPONSIVE — Tablet (≤1024px)
   ============================================================ */

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 200px;
  }

  .masonry {
    column-count: 3;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 32px 32px 64px;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-text-col {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding: 48px 48px 56px;
  }

  .about-images-col {
    padding: 40px 48px;
  }

  .home-intro {
    padding: 56px 48px 40px;
  }

  .home-intro-headline {
    font-size: 42px;
  }

  .page-header {
    padding: 48px 48px 32px;
  }
}

/* ============================================================
   RESPONSIVE — Mobile (≤768px)
   ============================================================ */

@media (max-width: 768px) {
  /* Sidebar becomes top bar on mobile */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    overflow: visible;
    z-index: 200;
  }

  .sidebar-logo {
    padding: 16px 20px;
    border-bottom: none;
    border-right: 1px solid var(--color-border);
    min-width: 160px;
  }

  .sidebar-logo-mark {
    width: 120px;
    height: auto;
  }

  .sidebar-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 20px 0;
    flex-direction: column;
  }

  .sidebar.mobile-open .sidebar-nav {
    display: flex;
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
  }

  .mobile-menu-toggle svg {
    width: 20px;
    height: 14px;
    stroke: var(--color-text-primary);
    stroke-width: 1.5;
    fill: none;
  }

  .sidebar-footer {
    display: none;
  }

  .main-content {
    margin-left: 0;
    margin-top: 64px;
  }

  .masonry {
    column-count: 2;
    column-gap: 4px;
  }

  .masonry-item {
    margin-bottom: 4px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 20px 16px 48px;
  }

  .home-intro {
    padding: 36px 20px 32px;
  }

  .home-intro-headline {
    font-size: 32px;
  }

  .page-header {
    padding: 36px 20px 24px;
  }

  .page-header-title {
    font-size: 28px;
  }

  .photo-grid {
    padding: 0 8px 40px;
  }

  .category-section-header {
    padding: 24px 20px 12px;
  }

  .about-text-col {
    padding: 32px 20px 40px;
  }

  .about-images-col {
    padding: 24px 20px 40px;
  }

  .about-headline {
    font-size: 28px;
  }

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

  .lightbox-img {
    max-width: 95vw;
    max-height: 75vh;
  }

  .lightbox-close {
    top: 16px;
    right: 16px;
  }
}

/* ============================================================
   REDUCE MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
