/* Custom Design System for Audrey & Steve's Wedding Website */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Tokens */
  --deep-red: #7C0D0E;
  --deep-red-rgb: 124, 13, 14;
  --powder-pink: #FFB2D0;
  --powder-pink-rgb: 255, 178, 208;
  --champagne: #F7E6CA;
  --champagne-rgb: 247, 230, 202;
  --linen: #FAF5EC;
  --linen-dark: #F0E8D7;
  --charcoal: #2D2D2D;
  
  /* Fonts */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--deep-red) var(--linen);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--linen);
}
::-webkit-scrollbar-thumb {
  background-color: var(--deep-red);
  border-radius: 4px;
  border: 2px solid var(--linen);
}

/* General Resets */
body {
  font-family: var(--font-sans);
  color: var(--charcoal);
  background-color: var(--linen);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-serif-signature {
  font-family: var(--font-serif);
}

/* Elegant Text Gradients */
.text-gold-gradient {
  background: linear-gradient(135deg, var(--deep-red) 30%, #C49B55 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassmorphism Panels */
.glass-panel {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 32px 0 rgba(124, 13, 14, 0.05);
}

.glass-nav {
  background: rgba(250, 245, 236, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(124, 13, 14, 0.08);
}

/* Timeline Custom Styles */
.timeline-line {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--powder-pink), var(--deep-red), var(--powder-pink));
}

@media (max-width: 768px) {
  .timeline-line {
    left: 20px;
    transform: none;
  }
}

.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translate(-50%, 6px);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--deep-red);
  border: 4px solid var(--powder-pink);
  box-shadow: 0 0 10px rgba(124, 13, 14, 0.3);
  z-index: 10;
}

@media (max-width: 768px) {
  .timeline-dot {
    left: 20px;
    transform: translate(-50%, 6px);
  }
}

/* Custom Interactive Photo Frames */
.gallery-frame {
  overflow: hidden;
  position: relative;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 4px solid #fff;
}

.gallery-frame:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(124, 13, 14, 0.15);
  border-color: var(--powder-pink);
}

/* Native Dialog Lightbox Styling */
#lightbox-dialog {
  padding: 0;
  border: none;
  border-radius: 12px;
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  background: transparent;
  outline: none;
}

#lightbox-dialog::backdrop {
  background: rgba(15, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  transition: backdrop-filter 0.3s ease;
}

/* FAQ Accordion Details Styles */
details {
  border-bottom: 1px solid rgba(124, 13, 14, 0.1);
  transition: all 0.3s ease;
}

details[open] {
  background: rgba(255, 178, 208, 0.1);
  border-radius: 8px;
  padding-bottom: 0.5rem;
}

summary {
  list-style: none;
  cursor: pointer;
  outline: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '✦';
  float: right;
  color: var(--deep-red);
  transition: transform 0.3s ease;
}

details[open] summary::after {
  transform: rotate(45deg);
  color: var(--powder-pink);
}

/* Required Form Field Visuals (:user-invalid and custom fallback) */
.error-msg {
  display: none;
  color: var(--deep-red);
  font-size: 0.825rem;
  margin-top: 0.25rem;
  font-weight: 500;
  animation: fadeIn 0.2s ease forwards;
}

input:user-invalid,
textarea:user-invalid,
select:user-invalid {
  border-color: var(--deep-red) !important;
  background-color: rgba(124, 13, 14, 0.03) !important;
  box-shadow: 0 0 0 2px rgba(124, 13, 14, 0.1) !important;
}

input:user-invalid + .error-msg,
textarea:user-invalid + .error-msg,
select:user-invalid + .error-msg {
  display: block;
}

/* Fallback for browsers that don't support :user-invalid yet */
input.user-invalid-fallback,
textarea.user-invalid-fallback,
select.user-invalid-fallback {
  border-color: var(--deep-red) !important;
  background-color: rgba(124, 13, 14, 0.03) !important;
}

input.user-invalid-fallback + .error-msg,
textarea.user-invalid-fallback + .error-msg,
select.user-invalid-fallback + .error-msg {
  display: block;
}

/* Custom transitions and animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Hover effects */
.hover-scale {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-scale:hover {
  transform: scale(1.03);
}

.btn-premium {
  background-color: var(--deep-red);
  color: white;
  transition: all 0.3s ease;
  border: 1px solid var(--deep-red);
}

.btn-premium:hover {
  background-color: transparent;
  color: var(--deep-red);
  box-shadow: 0 4px 15px rgba(124, 13, 14, 0.2);
}

.btn-secondary-premium {
  background-color: transparent;
  color: var(--charcoal);
  border: 1px solid var(--deep-red);
  transition: all 0.3s ease;
}

.btn-secondary-premium:hover {
  background-color: rgba(124, 13, 14, 0.05);
  color: var(--deep-red);
}

/* Card highlight borders */
.premium-border {
  position: relative;
}
.premium-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--deep-red), var(--powder-pink), var(--deep-red));
  border-radius: 8px 8px 0 0;
}
