/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-elevated: #1a1a1a;
  --bg-overlay: rgba(0,0,0,0.85);
  --text: #f0f0f0;
  --text-muted: #888;
  --text-dim: #555;
  --accent: #c8a86e;
  --accent-hover: #dbbf88;
  --accent-dim: rgba(200,168,110,0.15);
  --border: #222;
  --border-light: #333;
  --danger: #e74c3c;
  --success: #27ae60;
  --radius: 4px;
  --radius-lg: 8px;
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --header-height: 72px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }

/* ============ TYPOGRAPHY ============ */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.2; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.3; }
h3 { font-size: 1.25rem; }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }
.section-divider {
  width: 48px;
  height: 1px;
  background: var(--accent);
  margin: 16px auto;
}

/* ============ HEADER / NAV ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: background var(--transition), box-shadow var(--transition);
  background: transparent;
}
.site-header.scrolled {
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.logo span { color: var(--accent); }

.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  padding: 8px;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    top: 0; right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    transition: right var(--transition);
    box-shadow: -4px 0 24px rgba(0,0,0,0.5);
  }
  .main-nav.open { right: 0; }
  .main-nav a { font-size: 1rem; }
  .nav-close {
    position: absolute;
    top: 20px; right: 20px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
  }
}

/* ============ SPLASH PAGE ============ */
.splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 40px 60px;
  gap: 40px;
}
.splash-title {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-align: center;
}
.splash-images {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 1400px;
}
.splash-panel {
  overflow: hidden;
}
.splash-panel.side {
  flex: 0 0 auto;
  width: 300px;
  height: 460px;
}
.splash-panel.center {
  flex: 1 1 auto;
  height: 460px;
  max-width: 600px;
}
.splash-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.splash-enter {
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  padding: 14px 48px;
  transition: all var(--transition);
}
.splash-enter:hover {
  color: var(--text);
  border-color: var(--text);
}

@media (max-width: 1024px) {
  .splash { padding: 100px 20px 60px; gap: 32px; }
  .splash-images { flex-direction: column; gap: 12px; }
  .splash-panel.side,
  .splash-panel.center {
    width: 100%;
    max-width: 500px;
    height: auto;
    aspect-ratio: 16/10;
  }
}
@media (max-width: 640px) {
  .splash { padding: 88px 16px 48px; gap: 24px; }
  .splash-title { letter-spacing: 0.2em; }
  .splash-panel.side,
  .splash-panel.center {
    aspect-ratio: 3/2;
  }
}

/* ============ SPATIAL / VIDEO ============ */
.gallery-grid.spatial-grid {
  grid-template-columns: repeat(auto-fill, 160px);
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}
.gallery-grid.spatial-grid .gallery-item {
  aspect-ratio: 9/19.5;
  border-radius: 16px;
  width: 160px;
  max-width: 160px;
}
.gallery-grid.spatial-grid .gallery-item.wide {
  grid-column: span 1;
  aspect-ratio: 9/19.5;
}
.play-badge {
  position: absolute;
  bottom: 12px; left: 12px;
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: white;
  pointer-events: none;
}

@media (max-width: 640px) {
  .gallery-grid.spatial-grid { grid-template-columns: repeat(2, 140px); gap: 12px; max-width: 320px; }
  .gallery-grid.spatial-grid .gallery-item { width: 140px; max-width: 140px; }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ============ SECTIONS ============ */
section { padding: 96px 0; }

/* ============ GALLERY ============ */
.gallery-nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding-bottom: 48px;
  flex-wrap: wrap;
}
.gallery-nav-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
}
.gallery-nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--text);
  transition: width var(--transition);
}
.gallery-nav-link:hover,
.gallery-nav-link.active { color: var(--text); }
.gallery-nav-link:hover::after,
.gallery-nav-link.active::after { width: 100%; }

@media (max-width: 640px) {
  .gallery-nav { gap: 16px 24px; }
  .gallery-nav-link { font-size: 0.75rem; }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-item.wide { grid-column: span 2; }
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.wide { grid-column: span 1; }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  background: var(--bg-card);
}
.gallery-item.wide { aspect-ratio: 2/1; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-info h3 {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.gallery-item-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.lightbox.active { display: flex; opacity: 1; }
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-media {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-media img,
.lightbox-media video {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  padding: 16px;
  opacity: 0.7;
  transition: opacity var(--transition);
  z-index: 10;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { opacity: 1; }
.lightbox-close { top: -60px; right: 0; }
.lightbox-prev { left: -60px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: -60px; top: 50%; transform: translateY(-50%); }
.lightbox-info {
  position: absolute;
  bottom: -48px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.lightbox-info strong { color: var(--text); font-weight: 500; }
.lightbox-counter {
  position: absolute;
  top: -48px;
  left: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}
@media (max-width: 768px) {
  .lightbox-prev { left: 0; }
  .lightbox-next { right: 0; }
}

/* ============ ABOUT ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-image {
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-card);
}
.about-image img { width: 100%; height: 100%; object-fit: cover; }
.about-text h2 { margin-bottom: 24px; }
.about-text p { color: var(--text-muted); margin-bottom: 16px; font-size: 1.05rem; }
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ============ CONTACT ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.contact-info h2 { margin-bottom: 24px; }
.contact-info p { color: var(--text-muted); margin-bottom: 24px; }
.contact-links { display: flex; flex-direction: column; gap: 12px; }
.contact-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.contact-links a:hover { color: var(--accent); }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.form-group input, .form-group textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { min-height: 140px; resize: vertical; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 32px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.btn:hover {
  background: var(--accent);
  color: var(--bg);
}
.btn-solid {
  background: var(--accent);
  color: var(--bg);
}
.btn-solid:hover {
  background: var(--accent-hover);
}

.form-status {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: none;
}
.form-status.success { display: block; background: rgba(39,174,96,0.15); color: var(--success); border: 1px solid rgba(39,174,96,0.3); }
.form-status.error { display: block; background: rgba(231,76,60,0.15); color: var(--danger); border: 1px solid rgba(231,76,60,0.3); }

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ============ FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.footer-social {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}
.footer-social a { color: var(--text-muted); font-size: 1.1rem; }
.footer-social a:hover { color: var(--accent); }

/* ============ PAGE TRANSITIONS ============ */
.page-view {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  min-height: calc(100vh - var(--header-height));
}
.page-view.active {
  display: block;
  opacity: 1;
}

/* ============ LOADING ============ */
.loading-spinner {
  display: flex;
  justify-content: center;
  padding: 48px;
}
.spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: 16px; opacity: 0.3; }
.empty-state p { font-size: 1rem; }

/* ============ FADE IN ON SCROLL ============ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ ADMIN STYLES ============ */
.admin-page {
  padding-top: calc(var(--header-height) + 32px);
  min-height: 100vh;
}

.admin-login {
  max-width: 400px;
  margin: 120px auto;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.admin-login h2 {
  text-align: center;
  margin-bottom: 32px;
}
.admin-login .form-group { margin-bottom: 16px; }
.admin-login .btn { width: 100%; margin-top: 8px; }
.admin-login .error-msg { color: var(--danger); font-size: 0.85rem; text-align: center; margin-top: 12px; }

.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  min-height: calc(100vh - var(--header-height));
}

.admin-sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
}
.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  color: var(--text);
  background: var(--accent-dim);
  border-right: 2px solid var(--accent);
}

.admin-content {
  padding: 32px;
  max-width: 1100px;
}
.admin-content h2 { margin-bottom: 24px; }

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}
.stat-card .stat-number {
  font-size: 2rem;
  font-family: var(--font-display);
  color: var(--accent);
}
.stat-card .stat-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.admin-photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}
.admin-photo-item:hover { border-color: var(--accent); }
.admin-photo-item img { width: 100%; height: 100%; object-fit: cover; }
.admin-photo-item .photo-actions {
  position: absolute;
  top: 8px; right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition);
}
.admin-photo-item:hover .photo-actions { opacity: 1; }
.photo-action-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background var(--transition);
}
.photo-action-btn.edit { background: rgba(200,168,110,0.9); color: var(--bg); }
.photo-action-btn.delete { background: rgba(231,76,60,0.9); color: white; }
.photo-action-btn:hover { filter: brightness(1.1); }
.admin-photo-item .featured-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: var(--radius);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Admin modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.active { display: flex; }
.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 600px;
  width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
}
.modal h3 { margin-bottom: 24px; font-family: var(--font-display); }
.modal .form-group { margin-bottom: 16px; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  font-size: 0.85rem;
}
.btn-text:hover { color: var(--text); }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }

/* Messages table */
.messages-list { display: flex; flex-direction: column; gap: 8px; }
.message-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color var(--transition);
}
.message-item:hover { border-color: var(--accent); }
.message-item.unread { border-left: 3px solid var(--accent); }
.message-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.message-from { font-weight: 500; }
.message-date { color: var(--text-dim); font-size: 0.8rem; }
.message-subject { color: var(--text-muted); font-size: 0.9rem; }

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 24px;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.upload-zone p { color: var(--text-muted); margin-top: 8px; }
.upload-zone .upload-icon { font-size: 2rem; opacity: 0.5; }

.upload-progress {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 8px;
}
.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0;
}

/* Settings form */
.settings-form { max-width: 600px; }
.settings-form .form-group { margin-bottom: 20px; }
.settings-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Responsive admin */
@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: static;
    height: auto;
    display: flex;
    overflow-x: auto;
    padding: 0;
  }
  .admin-sidebar a {
    padding: 12px 16px;
    white-space: nowrap;
    border-right: none;
    font-size: 0.8rem;
  }
  .admin-sidebar a.active { border-right: none; border-bottom: 2px solid var(--accent); }
  .admin-content { padding: 16px; }
}
