/* ============================================
   JAMES ALLEN STUDIOS — CSS
   Edge-hiding via object-fit + scale transform
   No manual borders needed — ever
   ============================================ */

:root {
  --bg: #0f0f0f;
  --bg-elevated: #1a1a1a;
  --text: #f5f0e8;
  --text-muted: #a09888;
  --accent: #c9a96e;
  --border: rgba(245, 240, 232, 0.08);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, sans-serif;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   NAVIGATION
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(15, 15, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.nav-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

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

.desktop-nav a {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.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: 1.5px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.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(5px, -5px);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 1rem 2rem 2rem;
  background: rgba(15, 15, 15, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.mobile-nav a {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

/* ============================================
   HERO
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
}

.hero-label {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--text);
  padding: 1rem 2.5rem;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.hero-cta:hover {
  background: var(--accent);
  color: var(--bg);
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.hero-scroll span {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ============================================
   GALLERY SECTIONS
   ============================================ */

.gallery-section {
  padding: 6rem 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

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

.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.section-header p {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ============================================
   GALLERY GRID — CSS EDGE-HIDING TECHNIQUE
   ============================================
   
   HOW IT WORKS:
   1. Gallery item has overflow: hidden (clips anything outside)
   2. Image is scaled to 103% (slightly larger than container)
   3. object-fit: cover fills the container, cropping edges
   4. Result: No photo edges are ever visible. Zero manual borders.
   
   On hover: scale returns to 100%, revealing full image
   ============================================ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;              /* HIDES EDGES — KEY PROPERTY */
  aspect-ratio: 3 / 4;
  cursor: pointer;
  background: var(--bg-elevated);
}

.gallery-item.wide {
  grid-column: span 2;
  aspect-ratio: 3 / 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;             /* FILLS CONTAINER, CROPS EDGES */
  object-position: center;     /* KEEPS SUBJECT CENTERED */
  transform: scale(1.03);      /* 3% LARGER — EDGES BLEED PAST CONTAINER */
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: block;
}

.gallery-item:hover img {
  transform: scale(1.0);       /* ON HOVER: REVEAL FULL IMAGE */
}

/* Overlay */
.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

.gallery-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
}

.gallery-sub {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-top: 0.25rem;
}

/* ============================================
   ABOUT
   ============================================ */

.about-section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

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

.about-image {
  overflow: hidden;            /* EDGE-HIDING FOR ABOUT IMAGE */
  position: relative;
}

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

.about-image:hover img {
  transform: scale(1.0);
}

.about-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.about-lead {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 300;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.about-content p {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.about-clients {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.about-clients h3 {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.client-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.client-list span {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text);
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
}

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

.contact-section {
  padding: 6rem 2rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 300;
  margin-bottom: 0.75rem;
}

.contact-lead {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.contact-link {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.contact-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.contact-social {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.contact-social a {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-social a:hover {
  color: var(--text);
}

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

.site-footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
}

.site-footer p {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
}

.lightbox-caption {
  margin-top: 1.5rem;
  text-align: center;
}

.lightbox-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: #fff;
  display: block;
}

.lightbox-sub {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  display: block;
  margin-top: 0.25rem;
}

/* Lightbox Controls */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 0.75rem;
  transition: color 0.3s ease, transform 0.2s ease;
  z-index: 10;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: #fff;
}

.lightbox-close {
  top: 1.5rem;
  right: 1.5rem;
}

.lightbox-close:hover {
  transform: rotate(90deg);
}

.lightbox-prev {
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev:hover {
  transform: translateY(-50%) translateX(-4px);
}

.lightbox-next {
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next:hover {
  transform: translateY(-50%) translateX(4px);
}

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

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .about-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .about-image {
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
  }
  
  .gallery-item.wide {
    grid-column: span 2;
  }
  
  .gallery-section {
    padding: 4rem 1rem;
  }
  
  .hero {
    padding: 7rem 1.5rem 3rem;
  }
  
  .lightbox-prev,
  .lightbox-next {
    display: none;
  }
  
  .lightbox-content {
    max-width: 95vw;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-item.wide {
    grid-column: span 1;
    aspect-ratio: 3 / 4;
  }
  
  .nav-container {
    padding: 1.25rem 1rem;
  }
}

/* ============================================
   SCROLL REVEAL ANIMATION
   ============================================ */

.gallery-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

.section-header {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-header.revealed {
  opacity: 1;
  transform: translateY(0);
}
