/* =====================
   Base / Reset
===================== */

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

body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  background-color: #ffffff;
  color: #1a1a1a;
  line-height: 1.6;
  font-weight: 300;
  animation: pageLoad 0.4s ease-out;
}

@keyframes pageLoad {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* =====================
   Header
===================== */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 48px 64px;
  position: relative;
  z-index: 100;
  background: #ffffff;
}

.logo {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: #999999;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.logo a {
  text-decoration: none;
  color: #999999;
  transition: color 0.3s ease;
}

.logo a:hover {
  color: #666666;
}

.nav a {
  margin-left: 40px;
  text-decoration: none;
  color: #666666;
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.3s ease, opacity 0.3s ease;
  opacity: 0.5;
}

.nav a:hover {
  opacity: 1;
}

.nav a.active {
  color: #666666;
  text-decoration: none;
  font-weight: 300;
  opacity: 1;
}

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

.nav-icon {
  display: inline-flex;
  align-items: center;
  margin-left: 40px;
}

.nav-icon svg {
  stroke: #666666;
  transition: stroke 0.3s ease;
}

.nav-icon:hover svg {
  stroke: #999999;
}

.nav-mobile-only {
  display: none;
}

/* =====================
   Page Titles
===================== */

/* Option A: Understated Minimal (centered with separators) */
.page-title-minimal {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #999999;
  text-align: center;
  padding: 6px 0;
  margin: 75px 64px 100px 64px;
  border-top: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
}

/* Option B: Editorial Statement */
.page-title-editorial {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 3rem;
  font-weight: 300;
  color: #1a1a1a;
  padding: 48px 64px 0 64px;
  margin: 0;
}

/* Option C: Centered Formal */
.page-title-centered {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666666;
  text-align: center;
  padding: 64px 64px;
  margin: 0;
}

/* =====================
   Gallery
===================== */

.gallery {
  column-count: 2;
  column-gap: 64px;
  padding: 0 64px 80px 64px;
}

.gallery-item {
  display: block;
  overflow: hidden;
  background: #fff;
  margin-bottom: 64px;
  break-inside: avoid;
  transition: opacity 0.3s ease;
}

.gallery-item:hover {
  opacity: 0.85;
}

.gallery-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  cursor: pointer;
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.5s ease;
}

.gallery-item img.loaded {
  opacity: 1;
}

.gallery-item:hover img {
  transform: scale(1.02);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: scale(0.9) rotate(-1deg);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lightbox.open {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.lightbox-content {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  transform: scale(0.7) translateY(30px) rotate(2deg);
  opacity: 0;
  filter: blur(2px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;
}

.lightbox.open .lightbox-content {
  transform: scale(1) translateY(0) rotate(0deg);
  opacity: 1;
  filter: blur(0);
}

.close {
  position: absolute;
  top: 32px;
  right: 48px;
  color: #1a1a1a;
  font-size: 32px;
  font-weight: 300;
  transition: 0.3s;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
}

.close:hover,
.close:focus {
  color: #666666;
  text-decoration: none;
}

/* Lightbox Navigation */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #1a1a1a;
  font-size: 48px;
  font-weight: 300;
  cursor: pointer;
  padding: 16px;
  transition: color 0.3s ease, opacity 0.3s ease;
  opacity: 0.6;
  z-index: 1001;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: #666666;
  opacity: 1;
}

.lightbox-prev {
  left: 32px;
}

.lightbox-next {
  right: 32px;
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    font-size: 32px;
    padding: 12px;
  }

  .lightbox-prev {
    left: 16px;
  }

  .lightbox-next {
    right: 16px;
  }
}

@media (max-width: 480px) {
  .lightbox-prev,
  .lightbox-next {
    font-size: 24px;
    padding: 8px;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }
}

/* =====================
   Content Pages (About)
===================== */

.about-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.about-body .site-header {
  flex-shrink: 0;
}

.about-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}

.about-content p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: #666666;
}

.about-body .site-footer {
  flex-shrink: 0;
}

.content {
  max-width: 800px;
  padding: 120px 64px;
  margin: 0 auto;
}

.content h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  margin-bottom: 48px;
  color: #1a1a1a;
}

.content h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-top: 40px;
  margin-bottom: 16px;
  color: #1a1a1a;
}

.content h3:first-of-type {
  margin-top: 0;
}

.content p {
  margin-bottom: 24px;
  font-size: 1.05rem;
  line-height: 1.9;
  color: #666666;
  font-weight: 300;
}

.content a {
  color: #1a1a1a;
  text-decoration: none;
  border-bottom: 1px solid #1a1a1a;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.content a:hover {
  color: #666666;
  border-bottom-color: #666666;
}

/* =====================
   Footer
===================== */

.site-footer {
  text-align: center;
  padding: 48px 32px;
  font-size: 0.75rem;
  color: #999999;
  letter-spacing: 0.08em;
  margin-top: 0;
}

.site-footer a {
  color: #999999;
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: #666666;
}

/* =====================
   Mobile Menu
===================== */

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-toggle span {
  display: block;
  width: 4px;
  height: 4px;
  background-color: #999999;
  border-radius: 50%;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Dots animation when open */
.menu-toggle.open span:nth-child(1) {
  opacity: 0;
  transform: translateX(10px);
}

.menu-toggle.open span:nth-child(2) {
  transform: scale(1.3);
}

.menu-toggle.open span:nth-child(3) {
  opacity: 0;
  transform: translateX(-10px);
}

/* =====================
   Landing Page (Standalone)
===================== */

html.landing-html,
.landing-body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.landing-body {
  animation: none;
}

.landing-page-standalone {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.landing-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
  width: 100%;
  height: calc(100% + env(safe-area-inset-bottom, 0px));
  object-fit: cover;
  object-position: 70% center;
}

.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px;
  z-index: 100;
}

.landing-header .menu-toggle {
  display: flex;
  opacity: 0;
  animation: fadeIn 1.5s ease-out forwards;
  animation-delay: 1s;
}

.landing-header .menu-toggle span {
  background-color: #1a1a1a;
}

.landing-header .landing-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: #1a1a1a;
  opacity: 0;
  animation: fadeIn 1.5s ease-out forwards;
  animation-delay: 1s;
}

.landing-dark .landing-header .menu-toggle span {
  background-color: #ffffff;
}

.landing-dark .landing-header .landing-name {
  color: #ffffff;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


/* =====================
   Gallery Counter
===================== */

.gallery-counter {
  display: none;
}

/* =====================
   Mobile Paged Gallery
===================== */

.gallery-paged {
  display: none;
}

/* =====================
   Responsive
===================== */

@media (max-width: 1024px) {
  .gallery {
    column-count: 2;
    column-gap: 48px;
    padding: 60px 48px;
  }
}

@media (max-width: 768px) {
  .site-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 32px 24px;
    position: relative;
    z-index: 500;
  }

  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
  }

  .nav.open {
    opacity: 1;
    visibility: visible;
  }

  .nav a {
    margin-left: 0;
    margin-right: 0;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
  }

  .nav-mobile-only {
    display: block;
  }

  .nav-icon {
    margin-left: 0;
    position: absolute;
    bottom: 48px;
  }

  .nav-icon svg {
    width: 24px;
    height: 24px;
  }

  /* Mobile page titles */
  .page-title-minimal {
    padding: 6px 0;
    margin: 48px 24px 64px 24px;
  }

  .page-title-editorial {
    font-size: 2rem;
    padding: 24px 16px 0 16px;
  }

  .page-title-centered {
    font-size: 1.2rem;
    padding: 48px 16px;
  }

  /* Mobile continuous scroll gallery */
  .gallery {
    display: block;
    column-count: 1;
    padding: 0 24px 48px 24px;
  }

  .gallery-item {
    margin-bottom: 24px;
  }

  .gallery-item:last-child {
    margin-bottom: 0;
  }

  .gallery-item img {
    width: 100%;
    height: auto;
  }

  /* Hide paged gallery elements */
  .gallery-paged {
    display: none;
  }

  /* Hide counter for continuous scroll */
  .gallery-counter {
    display: none;
  }

  /* Disable hover effects on touch */
  .gallery-item:hover {
    opacity: 1;
  }

  .gallery-item:hover img {
    transform: none;
  }

  /* Hide lightbox elements on mobile */
  .lightbox {
    display: none !important;
  }

  .content {
    padding: 32px 32px 80px 32px;
  }

  .content h2 {
    font-size: 2rem;
  }

  .close {
    top: 20px;
    right: 24px;
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 24px 16px;
  }

  .nav a {
    margin-right: 24px;
    font-size: 0.75rem;
  }

  /* Small mobile page titles */
  .page-title-minimal {
    padding: 6px 0;
    margin: 36px 16px 48px 16px;
  }

  .page-title-editorial {
    font-size: 1.75rem;
    padding: 16px 16px 0 16px;
  }

  .page-title-centered {
    font-size: 1rem;
    padding: 32px 16px;
  }

  .gallery {
    padding: 0 16px 40px 16px;
  }

  .gallery-item {
    margin-bottom: 16px;
  }

  .content {
    padding: 24px 24px 60px 24px;
  }
}
