/* ============================================================
   RAY BAKER PHOTO — Shared Stylesheet
   ============================================================ */

:root {
  --bg:      #F8F1EC;
  --text:    #2d2926;
  --accent:  #4a3f35;
  --muted:   #8c8279;
  --white:   #FFFFFF;
  --dark:    #0a0a0a;
}

* { box-sizing: border-box; }

body {
  margin: 0; padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

body.dark-page {
  background-color: var(--dark);
  color: var(--bg);
}

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--muted); }
body.dark-page ::-webkit-scrollbar-track { background: var(--dark); }
body.dark-page ::-webkit-scrollbar-thumb { background: var(--accent); }

/* ── Header ────────────────────────────────────────────── */
#header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem 4rem;
  color: white;
  transition: all 0.3s ease;
}
#header.scrolled {
  background: rgba(45,41,38,0.92);
  backdrop-filter: blur(12px);
  padding-top: 1rem;
  padding-bottom: 1rem;
}
body.dark-page #header { border-bottom: 1px solid rgba(255,255,255,0.06); }
body.dark-page #header.scrolled { background: rgba(10,10,10,0.92); }

.site-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  display: flex; gap: 3rem;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  position: relative;
  transition: opacity 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a:hover { opacity: 0.6; }

/* White nav for dark background pages */
body.dark-page .site-logo,
body.dark-page .nav-links a,
#header.scrolled .site-logo,
#header.scrolled .nav-links a { color: white; }

#mobile-nav-btn span { background: var(--text); }
body.dark-page #mobile-nav-btn span,
#header.scrolled #mobile-nav-btn span { background: white; }

/* Galleries dropdown */
.nav-galleries { position: relative; }
.nav-galleries:hover .galleries-dropdown { display: block; }
.galleries-dropdown {
  display: none;
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  background: rgba(45,41,38,0.97);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 1rem 0;
  min-width: 180px;
  margin-top: 0;
  z-index: 100;
}
/* Invisible bridge fills the gap between nav link and dropdown */
.galleries-dropdown::before {
  content: '';
  position: absolute;
  top: -12px; left: 0; right: 0;
  height: 12px;
}
.galleries-dropdown a {
  display: block;
  padding: 0.5rem 1.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(248,241,236,0.8);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.galleries-dropdown a:hover { color: white; background: rgba(255,255,255,0.06); }
.galleries-dropdown a::after { display: none; }

/* Mobile nav */
#mobile-nav-btn { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
#mobile-nav-btn span { display: block; width: 26px; height: 2px; background: white; margin: 5px 0; }
#mobile-nav-menu {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(45,41,38,0.98);
  z-index: 200;
  flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
  overflow-y: auto;
}
#mobile-nav-menu.open { display: flex; }
#mobile-nav-menu > a {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--bg);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Mobile submenu for Galleries */
.mobile-submenu-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.mobile-submenu-toggle {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--bg);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 0.75rem;
}
.mobile-submenu-toggle .arrow {
  font-size: 1rem; transition: transform 0.3s ease;
  display: inline-block;
}
.mobile-submenu-toggle.open .arrow { transform: rotate(180deg); }
.mobile-submenu {
  display: none;
  flex-direction: column; align-items: center; gap: 0.6rem;
  border-top: 1px solid rgba(248,241,236,0.15);
  padding-top: 0.75rem; width: 100%;
}
.mobile-submenu.open { display: flex; }
.mobile-submenu a {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.9rem !important;
  letter-spacing: 0.2em;
  color: rgba(248,241,236,0.7) !important;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}
.mobile-submenu a:hover { color: white !important; }

#mobile-close-btn {
  position: absolute; top: 1.5rem; right: 2rem;
  background: none; border: none; color: var(--bg);
  font-size: 1.8rem; cursor: pointer;
}

@media (max-width: 768px) {
  #header { padding: 1.25rem 1.5rem; }
  .nav-links { display: none; }
  #mobile-nav-btn { display: block; }
}

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
  background: var(--text);
  color: var(--bg);
  padding: 6rem 4rem 3rem;
}
.footer-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 4rem;
  flex-wrap: wrap;
}
.footer-cta h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0 0 1.5rem;
}
.footer-cta p {
  font-size: 0.85rem;
  line-height: 1.8;
  opacity: 0.65;
  max-width: 320px;
  margin: 0 0 2.5rem;
}
.footer-btn {
  display: inline-block;
  border: 1px solid var(--bg);
  color: var(--bg);
  padding: 1rem 2.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
  margin-right: 1rem;
}
.footer-btn:hover { background: var(--bg); color: var(--text); }
.footer-nav { display: flex; gap: 4rem; }
.footer-nav h6 { font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.4; margin: 0 0 1rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 0.75rem; }
.footer-nav a { font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--bg); text-decoration: none; transition: opacity 0.2s; }
.footer-nav a:hover { opacity: 0.6; }
.footer-bottom {
  max-width: 1440px; margin: 4rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(248,241,236,0.15);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.4;
  flex-wrap: wrap; gap: 0.5rem;
}
body.dark-page .site-footer { background: #050505; }

/* ── Gallery cards — image protection overlay ───────────── */
.gallery-img-wrap {
  position: relative;
  overflow: hidden;
}
.gallery-img-wrap::after {
  content: '';
  position: absolute; inset: 0;
  z-index: 2;
  background: transparent;
  pointer-events: all; /* catches right-click */
}
.gallery-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.25,0.46,0.45,0.94);
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none; /* image itself not clickable — overlay handles it */
}
.gallery-card:hover .gallery-img-wrap img { transform: scale(1.05); }

/* ── Request Info Modal ─────────────────────────────────── */
#inquiry-modal {
  position: fixed; inset: 0; z-index: 300;
}
#inquiry-modal.hidden { display: none; }
#modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
}
.modal-box {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  background: #1a1614;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 2.5rem;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; }
.modal-header h2 { font-family: 'Playfair Display', serif; font-size: 1.8rem; color: white; margin: 0; }
.modal-close { background: none; border: none; color: rgba(255,255,255,0.5); font-size: 1.4rem; cursor: pointer; line-height: 1; transition: color 0.2s; }
.modal-close:hover { color: white; }
.modal-photo-ref {
  display: flex; align-items: center; gap: 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}
.modal-photo-ref img { width: 60px; height: 60px; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.modal-photo-ref-text p { margin: 0; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; }
.modal-photo-ref-text .ref-title { font-family: 'Playfair Display', serif; font-size: 1rem; color: white; margin-bottom: 2px; }
.modal-photo-ref-text .ref-cat { color: rgba(255,255,255,0.45); }

.modal-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label { font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.4); }
.form-field input,
.form-field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 0.6rem 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.form-field textarea { border: 1px solid rgba(255,255,255,0.2); padding: 0.75rem; resize: vertical; min-height: 100px; margin-top: 0.25rem; }
.form-field input:focus, .form-field textarea:focus { border-color: rgba(255,255,255,0.7); }
.modal-submit {
  margin-top: 0.5rem;
  padding: 1rem;
  border: 1px solid white;
  background: transparent;
  color: white;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
.modal-submit:hover { background: white; color: #1a1614; }
.modal-submit.sent { background: #4a3f35; border-color: #4a3f35; }
.modal-submit:disabled { opacity: 0.7; cursor: not-allowed; }

/* ── Gallery header shared ──────────────────────────────── */
.gallery-page-header {
  padding: 8rem 4rem 0;
  max-width: 1440px; margin: 0 auto;
}
.gallery-page-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(4rem, 11vw, 9rem);
  line-height: 0.85;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  margin: 0 0 3rem;
}
.gallery-page-meta {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: flex-end; gap: 1.5rem;
  border-top: 1px solid currentColor;
  padding-top: 1.5rem;
  opacity: 0.85;
}
.gallery-page-desc { font-size: clamp(0.95rem, 1.5vw, 1.1rem); font-weight: 300; line-height: 1.7; max-width: 520px; }

/* ── Hover action reveal ────────────────────────────────── */
.hover-actions {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.45s ease;
  z-index: 3;
}
.gallery-card:hover .hover-actions { opacity: 1; }
.hover-actions h3 { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: white; margin: 0 0 0.25rem; }
.hover-actions p { font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin: 0 0 1rem; }
.hover-btns { display: flex; gap: 0.5rem; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 0.75rem; }
.btn-info {
  flex: 1; padding: 0.6rem; border: 1px solid rgba(255,255,255,0.4);
  background: transparent; color: white;
  font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase;
  cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.btn-info:hover { background: rgba(255,255,255,0.12); border-color: white; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .gallery-page-header { padding: 6rem 1.5rem 0; }
  .footer-inner { flex-direction: column; }
  .footer-nav { flex-wrap: wrap; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; }
  .modal-box { padding: 1.75rem; }
}
