/* ZWS Studio - Custom Styles */

:root {
  --bg: #F9F7F2;
  --bg-nav: rgba(249, 247, 242, 0.95);
  --text: #111111;
  --text-muted: #555555;
  --text-faint: #888888;
  --border: #E5E2D9;
  --card-bg: #ffffff;
  --glass-bg: rgba(0, 0, 0, 0.08);
}

.dark {
  --bg: #1a1a1a;
  --bg-nav: rgba(26, 26, 26, 0.95);
  --text: #f0f0f0;
  --text-muted: #aaaaaa;
  --text-faint: #777777;
  --border: #333333;
  --card-bg: #242424;
  --glass-bg: rgba(255, 255, 255, 0.08);
}

body {
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  color: var(--text);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Nav dark mode support (overrides Tailwind inline colors) */
nav, .bg-\\[\\#F9F7F2\\] {
  background-color: var(--bg-nav) !important;
  border-bottom-color: var(--border) !important;
}

a.nav-link, nav a {
  color: var(--text-muted) !important;
}
a.nav-link.text-black, nav a.text-black, a.nav-link.font-medium {
  color: var(--text) !important;
}

footer {
  border-top-color: var(--border) !important;
}

/* Transitions for dark mode */
* {
  transition-property: background-color, border-color, color;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}

/* ─── Scroll Reveal ────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Image Load Transition (opt-in via class) ────────── */

img.fade-in {
  opacity: 0;
  transition: opacity 0.4s ease;
}

img.fade-in.loaded {
  opacity: 1;
}

/* ─── Lightbox ─────────────────────────────────────────── */

#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

#lightbox.active {
  display: flex;
  animation: fadeInLightbox 0.2s ease forwards;
}

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

#lightbox img {
  max-width: 92%;
  max-height: 88%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 25px 60px -15px rgb(0 0 0 / 0.5);
}

.lightbox-controls {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  z-index: 10000;
}

.lightbox-btn {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
}

.lightbox-btn:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
}

#lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  transition: all 0.2s ease;
  z-index: 10001;
}

#lightbox-close:hover {
  background: rgba(255,255,255,0.15);
}

/* ─── Video Modal ──────────────────────────────────────── */

.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  backdrop-filter: blur(4px);
}

.video-modal.active {
  display: flex;
  animation: fadeInLightbox 0.2s ease forwards;
}

.video-modal-content {
  width: 100%;
  max-width: 1100px;
  position: relative;
}

.video-modal-content iframe,
.video-modal-content video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #000;
}

/* ─── Minimal Button (dark friendly) ───────────────────── */

.minimal-button {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--text);
  transition: all 0.2s ease;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.minimal-button:hover {
  background-color: var(--text);
  color: var(--bg);
}

/* ─── Dark button variant ──────────────────────────────── */

.minimal-button-outline {
  border-color: var(--border);
  color: var(--text-muted);
}
.minimal-button-outline:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ─── Work Card ────────────────────────────────────────── */

.work-card {
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.work-card:hover {
  transform: translateY(-4px);
}

/* ─── Photo Item Overlay ───────────────────────────────── */

.photo-caption {
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
}

/* ─── Blog Card ────────────────────────────────────────── */

.blog-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px -15px rgb(0 0 0 / 0.1);
}

/* Select styles for dark mode */
.dark .minimal-button {
  border-color: #888;
}
.dark .minimal-button:hover {
  background: #f0f0f0;
  color: #1a1a1a;
}

/* ─── Responsive ────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav-link {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  #lightbox img {
    max-width: 98%;
    max-height: 70%;
  }
  .lightbox-controls {
    bottom: 24px;
  }
}
