/* =============================================
   PetPhotos — Elegant Dark Theme
   ============================================= */

:root {
  --bg-primary: #050505;
  --bg-secondary: #0e0e0e;
  --bg-card: #111111;
  --bg-card-hover: #161616;
  --bg-elevated: #1a1a1a;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(212, 175, 55, 0.3);
  --text-primary: #f0ece4;
  --text-secondary: #a09888;
  --text-muted: #6b6560;
  --accent-gold: #d4af37;
  --accent-gold-light: #e8c84a;
  --accent-gold-dim: rgba(212, 175, 55, 0.15);
  --accent-blue: #6b8cf7;
  --accent-blue-dim: rgba(107, 140, 247, 0.12);
  --shadow-soft: 0 2px 20px rgba(0, 0, 0, 0.4);
  --shadow-medium: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 60px rgba(212, 175, 55, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =============================================
   Typography
   ============================================= */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.display-3, .display-4, .display-5 {
  font-weight: 700;
  line-height: 1.15;
}

.lead {
  color: var(--text-secondary);
  font-weight: 300;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-white {
  color: var(--text-primary) !important;
}

/* =============================================
   Navbar
   ============================================= */

.site-navbar {
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.8rem 0;
  position: sticky;
  top: 0;
  z-index: 1050;
}

.brand-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary) !important;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.brand-logo svg {
  color: var(--accent-gold);
}

.brand-logo:hover {
  color: var(--accent-gold-light) !important;
}

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  padding: 0.5rem 1rem !important;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary) !important;
}

.nav-link.active {
  color: var(--accent-gold) !important;
}

/* =============================================
   Container
   ============================================= */

.site-container {
  min-height: calc(100vh - 140px);
  padding-top: 2rem;
}

.container {
  max-width: 1200px;
}

/* =============================================
   Cards
   ============================================= */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--transition-smooth);
}

.card:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
}

.shadow-sm {
  box-shadow: var(--shadow-soft) !important;
}

/* =============================================
   Buttons
   ============================================= */

.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  padding: 0.6rem 1.5rem;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
  border: none;
  color: #0a0a0a;
  font-weight: 600;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-gold-light), #f0d060);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
  color: #0a0a0a;
}

.btn-outline-secondary {
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  background: transparent;
}

.btn-outline-secondary:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.btn-outline-primary {
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
}

.btn-outline-primary:hover {
  background: var(--accent-gold);
  color: #0a0a0a;
}

.btn-success {
  background: linear-gradient(135deg, #2d8a4e, #34a853);
  border: none;
  color: #fff;
}

.btn-success:hover {
  background: linear-gradient(135deg, #34a853, #43c060);
  transform: translateY(-1px);
  color: #fff;
}

.btn:focus, .btn:active:focus {
  box-shadow: 0 0 0 0.1rem rgba(212, 175, 55, 0.25);
}

/* =============================================
   Forms
   ============================================= */

.form-control, .form-select {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  transition: all var(--transition-fast);
}

.form-control:focus, .form-select:focus {
  background-color: var(--bg-elevated);
  border-color: var(--accent-gold);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px var(--accent-gold-dim);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.form-text {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* =============================================
   Alerts
   ============================================= */

.alert {
  border-radius: var(--radius-md);
  border: 1px solid;
  font-size: 0.9rem;
}

.alert-info {
  background: var(--accent-blue-dim);
  border-color: rgba(107, 140, 247, 0.2);
  color: var(--accent-blue);
}

.alert-success {
  background: rgba(52, 168, 83, 0.1);
  border-color: rgba(52, 168, 83, 0.2);
  color: #5ec96e;
}

.alert-danger {
  background: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.2);
  color: #e06070;
}

.alert-link {
  color: var(--text-primary);
  font-weight: 500;
}

/* =============================================
   Image Gallery — Generated Photo Display
   ============================================= */

.gallery-frame {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.gallery-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  padding: 1px;
  background: linear-gradient(135deg, var(--border-accent), transparent 40%, transparent 60%, var(--border-accent));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

.gallery-image-wrapper {
  position: relative;
  line-height: 0;
}

.gallery-image-wrapper img {
  width: 100%;
  height: auto;
  max-height: 700px;
  object-fit: contain;
  display: block;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  transition: transform var(--transition-smooth);
}

.gallery-frame:hover .gallery-image-wrapper img {
  transform: scale(1.01);
}

.gallery-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  padding: 3rem 2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  opacity: 0;
  transition: opacity var(--transition-smooth);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.gallery-frame:hover .gallery-image-overlay {
  opacity: 1;
}

.gallery-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gallery-meta {
  position: relative;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
}

.gallery-meta-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.gallery-meta-text strong {
  color: var(--text-secondary);
  font-weight: 500;
}

/* =============================================
   Original Photo Comparison
   ============================================= */

.comparison-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition-smooth);
}

.comparison-card:hover {
  border-color: var(--border-medium);
}

.comparison-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 500;
}

.comparison-card img {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-smooth);
}

.comparison-card:hover img {
  border-color: var(--border-medium);
}

/* =============================================
   Upload Area
   ============================================= */

.upload-area {
  cursor: pointer;
  transition: all var(--transition-fast);
  background-color: var(--bg-elevated);
  border: 2px dashed var(--border-medium) !important;
  border-radius: var(--radius-lg) !important;
}

.upload-area:hover {
  border-color: var(--accent-gold) !important;
  background-color: var(--accent-gold-dim) !important;
}

.upload-area.dragover {
  border-color: var(--accent-gold) !important;
  background-color: var(--accent-gold-dim) !important;
  transform: scale(1.01);
}

.upload-icon svg {
  color: var(--text-muted);
}

.upload-area:hover .upload-icon svg {
  color: var(--accent-gold);
}

/* =============================================
   Section Headings
   ============================================= */

.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}

.section-heading h1 {
  margin-bottom: 1rem;
}

.section-heading p {
  max-width: 560px;
  margin: 0 auto;
}

/* =============================================
   Feature Cards
   ============================================= */

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition-smooth);
  height: 100%;
}

.feature-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
}

.feature-icon svg {
  color: var(--accent-gold);
  width: 28px;
  height: 28px;
}

.feature-card h5 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
}

/* =============================================
   Badges / Tags
   ============================================= */

.badge {
  font-weight: 400;
  letter-spacing: 0.03em;
  font-size: 0.78rem;
}

.style-tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  transition: all var(--transition-fast);
}

.style-tag:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: var(--accent-gold-dim);
}

/* =============================================
   Footer
   ============================================= */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
  margin-top: 3rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  color: var(--text-secondary);
}

/* =============================================
   Animations
   ============================================= */

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

.animate-fade-up {
  animation: fadeUp 0.6s ease-out forwards;
}

.animate-fade-up-delay-1 {
  animation: fadeUp 0.6s ease-out 0.1s forwards;
  opacity: 0;
}

.animate-fade-up-delay-2 {
  animation: fadeUp 0.6s ease-out 0.2s forwards;
  opacity: 0;
}

/* =============================================
   Scrollbar
   ============================================= */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* =============================================
   Selection
   ============================================= */

::selection {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 768px) {
  .gallery-image-wrapper img {
    max-height: 500px;
  }

  .gallery-image-overlay {
    opacity: 1;
  }

  .section-heading h1 {
    font-size: 2rem;
  }
}
