/* ============================================
   Wedding Order of Programme — Luxury Editorial Theme
   ============================================ */

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

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Editorial Color Palette */
  --primary: #A2826B;        /* Luxury warm bronze gold */
  --primary-light: #D4BEB0;  /* Muted rose gold / champagne shimmer */
  --primary-dark: #6C5243;
  --accent: #E5B4A6;         /* Soft warm clay blush */
  --accent-light: #F6E5E0;
  --cream: #FAF8F5;          /* Warm alabaster background */
  --charcoal: #2C2A29;       /* Rich charcoal black */
  --charcoal-light: #595654;
  --white: #FFFFFF;

  /* Neutrals */
  --gray-50: #FAF9F6;
  --gray-100: #F3F1EC;
  --gray-200: #E6E2DA;
  --gray-300: #C7C2B6;
  --gray-400: #9C9688;
  --gray-500: #6D695F;

  /* Feedback */
  --danger: #D96B6B;
  --danger-light: #FDECEC;
  --success: #6B9C7A;
  --success-light: #ECF7EF;

  /* Elevation & Shadows */
  --shadow-sm: 0 4px 12px rgba(44, 42, 41, 0.02);
  --shadow-md: 0 16px 36px -4px rgba(44, 42, 41, 0.04);
  --shadow-lg: 0 32px 64px -12px rgba(44, 42, 41, 0.08);

  /* Border Radii */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  /* Motion & Easing */
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Global Reset & Styles ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--charcoal);
  background: radial-gradient(circle at 10% 20%, #FAF8F5 0%, #FFFFFF 100%);
  min-height: 100vh;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  line-height: 1.25;
  color: var(--charcoal);
  letter-spacing: 0.01em;
}

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

a:hover {
  color: var(--primary-dark);
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem 1.5rem;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(162, 130, 107, 0.08);
  box-shadow: 0 4px 30px rgba(44, 42, 41, 0.01);
  padding: 0.9rem 0;
  transition: var(--transition);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  max-width: 960px;
}

.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--charcoal);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--charcoal-light);
  padding: 0.5rem 1.15rem;
  border-radius: 50px;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(162, 130, 107, 0.06);
}

/* ---------- Hero Section ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
  text-align: center;
  padding: 6rem 1.5rem;
  background:
    radial-gradient(ellipse at 10% 20%, rgba(229, 180, 166, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(212, 190, 176, 0.04) 0%, transparent 50%);
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.85rem;
  font-weight: 300;
  line-height: 1.15;
  color: var(--charcoal);
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}

.hero-title em {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--primary);
}

.hero-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--gray-500);
  max-width: 500px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}

/* ---------- Card Styles ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 2.5rem 2rem;
  transition: var(--transition);
  border: 1px solid rgba(162, 130, 107, 0.1);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(162, 130, 107, 0.22);
}

.ruled-frame {
  border: 1px solid rgba(162, 130, 107, 0.25);
  border-radius: calc(var(--radius-lg) - 8px);
  padding: 3rem 2.25rem;
  margin: 8px;
  position: relative;
}

.ruled-frame::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 0.5px solid rgba(162, 130, 107, 0.12);
  border-radius: calc(var(--radius-lg) - 12px);
  pointer-events: none;
}

.glass-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(162, 130, 107, 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.65rem;
  border-radius: 40px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  line-height: 1.2;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--charcoal);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(44, 42, 41, 0.12);
}

.btn-primary:hover {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(162, 130, 107, 0.2);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--primary-light);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(212, 190, 176, 0.15);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(162, 130, 107, 0.2);
  transform: translateY(-1px);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(217, 107, 107, 0.25);
  font-size: 0.72rem;
  padding: 0.45rem 1rem;
}

.btn-danger:hover {
  background: var(--danger);
  color: var(--white);
  border-color: transparent;
}

.btn-outline {
  background: transparent;
  color: var(--charcoal-light);
  border: 1px solid var(--gray-200);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(162, 130, 107, 0.02);
  transform: translateY(-1px);
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--charcoal-light);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1.15rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  color: var(--charcoal);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(162, 130, 107, 0.08);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--gray-400);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

.form-color {
  height: 48px;
  width: 70px;
  padding: 4px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--white);
  transition: var(--transition);
}

.form-color:focus {
  border-color: var(--primary);
}

/* ---------- Dashboard Grid ---------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* ---------- Event & Reorder Lists ---------- */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.25rem;
  padding: 1.15rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(162, 130, 107, 0.08);
  border-left: 3px solid var(--theme-color, var(--primary));
  transition: var(--transition);
}

.event-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(3px);
}

.event-handle {
  cursor: grab;
  color: var(--gray-300);
  font-size: 1.3rem;
  padding: 0.25rem;
  user-select: none;
  -webkit-user-select: none;
  transition: var(--transition);
}

.event-handle:hover {
  color: var(--primary);
}

.event-handle:active {
  cursor: grabbing;
}

.event-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.event-info {
  flex: 1;
  min-width: 0;
}

.event-info strong {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  color: var(--charcoal);
  font-weight: 500;
}

.event-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ---------- Drag & Drop States ---------- */
.sortable-ghost {
  opacity: 0.35;
  background: var(--cream) !important;
  border: 1.5px dashed var(--primary-light) !important;
}

.sortable-chosen {
  box-shadow: var(--shadow-lg) !important;
}

/* ---------- Timeline (Public View) ---------- */
.timeline {
  position: relative;
  padding-left: 2.75rem;
  margin: 3rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  left: 0.75rem;
  bottom: 0.5rem;
  width: 1px;
  background: rgba(162, 130, 107, 0.25);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.25rem;
}

.timeline-dot {
  position: absolute;
  left: -2.35rem;
  top: 1.15rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--theme-color, var(--primary));
  box-shadow: 0 0 0 4px var(--white), 0 0 0 6px rgba(162, 130, 107, 0.12);
  z-index: 2;
}

.timeline-content {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(162, 130, 107, 0.08);
  transition: var(--transition);
}

.timeline-content:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(162, 130, 107, 0.18);
}

/* ---------- Programme Header ---------- */
.programme-header {
  text-align: center;
  padding: 4rem 1rem 3rem;
}

.programme-couple {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.5rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--charcoal);
  line-height: 1.25;
}

.programme-couple span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.25rem;
  font-style: italic;
  font-weight: 300;
  color: var(--primary-light);
}

/* ---------- Badges & Alerts ---------- */
.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.alert {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.825rem;
  font-weight: 500;
}

.alert-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(107, 156, 122, 0.15);
}

.alert-error {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(217, 107, 107, 0.15);
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.slide-up {
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ---------- Responsive Queries ---------- */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.85rem;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .nav .container {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* ---------- Image Optimization & Fades ---------- */
.shimmer-bg {
  position: relative;
  background: linear-gradient(90deg, #FAF8F5 25%, #F0EAE1 50%, #FAF8F5 75%);
  background-size: 200% 100%;
  animation: shimmer-anim 1.6s infinite linear;
}

@keyframes shimmer-anim {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.graceful-image {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.graceful-image.loaded {
  opacity: 1;
}
