/* ============================================================
   RAPTURE Photography — Photo Purchase Page (photo-page.css)
   Used by: photo.html (every photograph's own purchase page).

   Design tokens match the main site exactly:
   - Background: #EDF5FD
   - Font: Century Gothic → Futura → Nunito → sans-serif
   - Text: #1e2329 headings / #5a6472 body / #8e99a6 muted
   - Accent: #4a7fb5
   - Divider: #d6e4f0
============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }


/* ── Page fade-in on load ── */

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

body {
  font-family: 'Century Gothic', 'Futura', 'Gill Sans', 'Gill Sans MT', 'Nunito', sans-serif;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  color: #1e2329;

  background: #EDF5FD;
  min-height: 100vh;
  background-attachment: fixed;

  animation: pageFadeIn 0.55s ease both;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

body.fade-out {
  opacity: 0;
  transform: translateY(-8px);
}


/* ── Top navigation bar ── */

.photo-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 2.5rem;
  border-bottom: 1px solid #d6e4f0;
}

.photo-nav__brand {
  font-size: 0.95rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #1e2329;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.photo-nav__brand:hover { opacity: 1; }

.photo-nav__back {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1e2329;
  text-decoration: none;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.photo-nav__back:hover { opacity: 0.85; }


/* ── Main layout: image left, details right ── */

.photo-main {
  max-width: 1200px;
  margin-inline: auto;
  padding: 4rem 2rem 6rem;

  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 3.5rem;
  align-items: start;
}

/* Large display image */
.photo-figure {
  border-radius: 4px;
  overflow: hidden;
  background: #f7f8fa;
  touch-action: pan-y;
}

.photo-figure img {
  width: 100%;
  height: auto;
  display: block;
  /* Extra discouragement against drag-saving */
  -webkit-user-drag: none;
  user-select: none;
}

/* ── Manual swipe transition only ─────────────────────────────
   The image fades out, pauses briefly over the white figure
   background, then fades the next image back in. The figure's
   layout remains unchanged throughout the animation. */
@keyframes swipePhotoTransition {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  34% {
    opacity: 0;
    transform: scale(1.01);
  }
  78% {
    opacity: 0;
    transform: scale(1.01);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.photo-figure.is-photo-transitioning img {
  animation: swipePhotoTransition 300ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
  will-change: opacity, transform;
}

@media (prefers-reduced-motion: reduce) {
  .photo-figure.is-photo-transitioning img {
    animation-duration: 180ms;
  }
}


/* ── Details column ── */

.photo-details__title {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.25;
  color: #1e2329;
  margin-bottom: 1.5rem;
}

.photo-details__rule {
  width: 40px;
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
  margin-bottom: 1.5rem;
}

/* Photographer / Location / Gallery rows */
.photo-details__meta {
  margin-bottom: 1.75rem;
}

.photo-details__meta-row {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: #5a6472;
  line-height: 2;
}

.photo-details__meta-label {
  min-width: 8.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8e99a6;
  line-height: 2.4;
}

/* Price */
.photo-details__price {
  font-size: 1.375rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: #1e2329;
  margin-bottom: 2rem;
}

/* Buttons */
.photo-details__buttons {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-bottom: 1.75rem;
  max-width: 340px;
}

.photo-btn {
  display: block;
  width: 100%;
  padding: 0.95rem 1.5rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  border-radius: 3px;
  cursor: pointer;
  transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

/* Digital Download — primary, quiet dark button */
.photo-btn--download {
  background-color: #1e2329;
  color: #ffffff;
  border: 1px solid #1e2329;
}

.photo-btn--download:hover { opacity: 0.85; }

/* Digital Download while the price is still "To Be Added" —
   the button is inactive and visibly quiet, like the Print button */
.photo-btn--download:disabled {
  background-color: transparent;
  color: #8e99a6;
  border: 1px solid #d6e4f0;
  cursor: not-allowed;
  opacity: 1;
}

/* Print — Coming Soon, visibly not yet available */
.photo-btn--print {
  background-color: transparent;
  color: #8e99a6;
  border: 1px solid #d6e4f0;
  cursor: not-allowed;
}

/* License link + agreement note */
.photo-details__license {
  font-size: 0.8125rem;
  color: #5a6472;
  line-height: 1.9;
}

.photo-details__license a {
  color: #4a7fb5;
  text-decoration: none;
  border-bottom: 1px solid rgba(74, 127, 181, 0.35);
  transition: border-color 0.2s ease;
}

.photo-details__license a:hover { border-color: #4a7fb5; }

.photo-details__agreement {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  font-style: italic;
  color: #8e99a6;
}

/* Placeholder checkout notice — shown after pressing Digital Download
   until a real payment provider is connected. Hidden by default. */
.photo-details__checkout-note {
  display: none;
  margin-bottom: 1.75rem;
  padding: 0.9rem 1.1rem;
  border: 1px dashed #d6e4f0;
  border-radius: 3px;
  font-size: 0.8125rem;
  color: #5a6472;
  line-height: 1.8;
  background-color: rgba(255, 255, 255, 0.5);
}

.photo-details__checkout-note.is-visible { display: block; }


/* ── "Photo not found" message ── */

.photo-not-found {
  max-width: 640px;
  margin-inline: auto;
  padding: 6rem 2rem 8rem;
  text-align: center;
  display: none;
}

.photo-not-found.is-visible { display: block; }

.photo-not-found h1 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.photo-not-found p {
  font-size: 0.9375rem;
  color: #5a6472;
}

.photo-not-found a {
  color: #4a7fb5;
  text-decoration: none;
}


/* ── Footer ── */

.photo-footer {
  border-top: 1px solid #d6e4f0;
  padding-block: 2.5rem;
  text-align: center;
}

.photo-footer p {
  font-size: 0.8125rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: #8e99a6;
}

.photo-footer__links {
  margin-top: 0.9rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

.photo-footer__links a {
  font-size: 0.8125rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: #8e99a6;
  text-decoration: none;
  transition: color 0.2s ease;
}

.photo-footer__links a:hover { color: #4a7fb5; }

.footer-verse {
  max-width: 48rem;
  margin: 1.75rem auto 0;
  padding-inline: 1.5rem;
}

.footer-verse p {
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: #8e99a6;
}

.footer-verse p + p {
  margin-top: 0.35rem;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  font-style: normal;
}


/* ── Responsive — mobile ── */

@media (max-width: 768px) {

  .photo-nav { padding: 1.2rem 1.5rem; }

  /* Stack: image above, details below */
  .photo-main {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    padding: 2.5rem 1.5rem 4.5rem;
  }

  .photo-details__buttons { max-width: none; }
}
