/* ========================
   PAGE LAYOUT
======================== */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-20) var(--space-6);
}

.page__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: var(--weight-regular);
  margin-bottom: var(--space-4);
  letter-spacing: var(--tracking-wide);
}

.page__subtitle {
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-16);
}

.page__text {
  max-width: 700px;
  text-align: center;
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  font-weight: var(--weight-light);
  color: var(--color-text-secondary);
}

/* ========================
   PAGE NAV (top bar)
======================== */
.page-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-toolbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  background: var(--color-bg-overlay-heavy);
  backdrop-filter: blur(12px);
  border-bottom: var(--border-thin) solid var(--color-border-subtle);
}

.page-nav__logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text-primary);
  text-decoration: none;
  letter-spacing: var(--tracking-wide);
}

.page-nav__links {
  display: flex;
  gap: var(--space-6);
}

.page-nav__link {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  text-decoration: none;
  transition: color var(--duration-normal) var(--ease-smooth);
}

.page-nav__link:hover,
.page-nav__link.active {
  color: var(--color-accent);
}

/* ========================
   PAGE BACKGROUNDS
======================== */
.page--photography {
  background: linear-gradient(rgba(10,10,10,0.45), rgba(10,10,10,0.25)),
              url('../assets/backgrounds/photos.webp') center/cover no-repeat fixed;
  padding-bottom: 0;
  overflow: hidden;
}

.page--paintings {
  background: var(--color-bg-primary);
  padding-bottom: 0;
  overflow: hidden;
}

.page--video {
  background: var(--color-bg-tertiary);
  position: relative;
  padding-bottom: 0;
  overflow: hidden;
}

.page--video .bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: var(--z-base);
  opacity: 0.4;
}

.page--video > *:not(.bg-video) {
  position: relative;
  z-index: 1;
}

.page--contact {
  background: var(--color-bg-primary);
}

/* ========================
   CONTACT LINKS
======================== */
.contact__links {
  display: flex;
  gap: var(--space-8);
  margin-top: var(--space-8);
}

.contact__links a {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--duration-normal) var(--ease-smooth);
}

.contact__links a:hover {
  color: var(--color-accent-light);
}

/* ========================
   COLLAGE OVERRIDES
======================== */
.collage--paintings { height: 2000px; }
.collage--video { height: 800px; }

/* Video play button */
.collage__play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
}

.collage__play-btn::after {
  content: '';
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-bg-overlay);
  border: var(--border-default) solid rgba(240,236,230,0.7);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f0ece6'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-size: 24px;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform var(--duration-fast) var(--ease-smooth), background-color var(--duration-fast) var(--ease-smooth);
}

.collage__item:hover .collage__play-btn::after {
  transform: scale(1.15);
  background-color: var(--color-bg-overlay-heavy);
}

.collage__item.playing .collage__play-btn { display: none; }
.collage__item.playing img { display: none; }

.collage__item video {
  display: none;
  width: 100%;
  height: auto;
}

.collage__item.playing video { display: block; }

.collage__mute-btn {
  position: absolute;
  bottom: var(--space-2);
  right: var(--space-2);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--color-bg-overlay);
  cursor: pointer;
  z-index: 6;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.collage__item.playing .collage__mute-btn { display: flex; }

.collage__mute-btn svg {
  width: 16px;
  height: 16px;
  fill: var(--color-text-primary);
}

/* Edit mode */
.edit-mode .collage__item { cursor: grab; }
.edit-mode .collage__item:active { cursor: grabbing; }
.edit-mode .collage__item.selected .collage__handle { display: block; }
.edit-mode .collage__item.selected .collage__rotate-handle { display: block; }
.edit-mode .collage__item.selected {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ========================
   LIGHTBOX
======================== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  background: var(--color-bg-overlay-dense);
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: none;
  border: none;
  color: var(--color-text-primary);
  font-size: var(--text-3xl);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--duration-fast) var(--ease-smooth);
}

.lightbox__close:hover { opacity: 1; }

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-primary);
  font-size: var(--text-4xl);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--duration-fast) var(--ease-smooth);
  padding: var(--space-4);
}

.lightbox__nav:hover { opacity: 1; }
.lightbox__nav--prev { left: var(--space-4); }
.lightbox__nav--next { right: var(--space-4); }

.lightbox__counter {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
}

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 768px) {
  .page-nav__links { gap: var(--space-3); }
  .page-nav__link { font-size: var(--text-xs); }

  .contact__links {
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
  }
}
