/**
 * Digivite Predefined Design: Romantic Botanical (v1)
 * Organic Flora, Hand-Pressed Stationery & Garden Romance
 */

:root {
  --dgvt-primary: #4a5d4e;
  --dgvt-secondary: #2e3b31;
  --dgvt-accent: #f9f8f5;
  --dgvt-card-bg: #ffffff;
  --dgvt-font-heading: 'Cormorant Garamond', Georgia, serif;
  --dgvt-font-body: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body.dgvt-botanical-body {
  margin: 0;
  padding: 0;
  background-color: var(--dgvt-accent);
  color: var(--dgvt-secondary);
  font-family: var(--dgvt-font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Typography Scale */
.dgvt-rb-heading {
  font-family: var(--dgvt-font-heading);
  letter-spacing: -0.01em;
  font-weight: 400;
  color: var(--dgvt-secondary);
}

.dgvt-rb-italic {
  font-style: italic;
  font-family: var(--dgvt-font-heading);
}

.dgvt-rb-subheading {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dgvt-primary);
}

/* Layout Wrappers */
.dgvt-rb-container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.dgvt-rb-section {
  padding: 5rem 0;
  position: relative;
}

@media (max-width: 640px) {
  .dgvt-rb-section {
    padding: 3.5rem 0;
  }
}

/* 1. Garden Hero Cover */
.dgvt-rb-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(3rem, 6vw, 4.5rem) 1.5rem clamp(3.5rem, 6vw, 5rem);
  text-align: center;
  position: relative;
  background: 
    radial-gradient(circle at 50% 20%, rgba(74, 93, 78, 0.08) 0%, transparent 70%),
    var(--dgvt-accent);
}

.dgvt-rb-wreath-monogram {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border: 1px dashed var(--dgvt-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--dgvt-font-heading);
  font-size: 1.35rem;
  color: var(--dgvt-primary);
  position: relative;
  background-color: rgba(255, 255, 255, 0.7);
}

.dgvt-rb-wreath-monogram::after {
  content: '🌿';
  position: absolute;
  bottom: -6px;
  right: -6px;
  font-size: 0.95rem;
}

.dgvt-rb-hero-names {
  font-family: var(--dgvt-font-heading);
  font-size: clamp(2.1rem, 6.5vw, 5.5rem);
  line-height: 1.05;
  margin: 0.5rem 0 1.25rem;
  color: var(--dgvt-secondary);
  font-weight: 400;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}

@media (max-width: 360px) {
  .dgvt-rb-hero-names {
    font-size: 1.85rem;
  }
}

.dgvt-rb-hero-names .botanical-amp {
  font-style: italic;
  color: var(--dgvt-primary);
  font-size: 0.85em;
  margin: 0 0.15em;
}

.dgvt-rb-tagline {
  max-width: 560px;
  margin: 0 auto 2.25rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: #55665a;
  font-style: italic;
  font-family: var(--dgvt-font-heading);
}

/* Organic Soft Portrait Frame */
.dgvt-rb-hero-frame {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  background: linear-gradient(135deg, rgba(74, 93, 78, 0.08) 0%, rgba(74, 93, 78, 0.03) 100%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 45px -12px rgba(46, 59, 49, 0.15);
  border: 1px solid rgba(74, 93, 78, 0.25);
  aspect-ratio: 4 / 5;
}

.dgvt-rb-hero-img {
  width: 100%;
  height: 100%;
  max-height: 560px;
  object-fit: cover;
  display: block;
}

@media (max-width: 640px) {
  .dgvt-rb-hero-frame {
    aspect-ratio: 3 / 4;
  }
}

/* 2. Hand-Pressed Invitation Card */
.dgvt-rb-card {
  background-color: var(--dgvt-card-bg);
  border: 1px solid rgba(74, 93, 78, 0.2);
  border-radius: 8px;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 18px 40px -15px rgba(46, 59, 49, 0.08);
  position: relative;
}

.dgvt-rb-leaf-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem auto;
  color: var(--dgvt-primary);
  font-size: 0.9rem;
}

.dgvt-rb-leaf-divider::before,
.dgvt-rb-leaf-divider::after {
  content: '';
  width: 50px;
  height: 1px;
  background-color: var(--dgvt-primary);
  opacity: 0.4;
}

/* 3. Celebration Gatherings (Events) */
.dgvt-rb-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.dgvt-rb-event-card {
  background-color: var(--dgvt-card-bg);
  border: 1px solid rgba(74, 93, 78, 0.18);
  border-radius: 8px;
  padding: 2.25rem 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 24px -8px rgba(46, 59, 49, 0.05);
}

.dgvt-rb-event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px -10px rgba(46, 59, 49, 0.12);
  border-color: var(--dgvt-primary);
}

.dgvt-rb-event-badge {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  background-color: rgba(74, 93, 78, 0.1);
  color: var(--dgvt-primary);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.dgvt-rb-event-title {
  font-family: var(--dgvt-font-heading);
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

/* 4. Sunlit Memories Gallery (Polaroid style) */
.dgvt-rb-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.dgvt-rb-gallery-item {
  background-color: var(--dgvt-card-bg);
  border: 1px solid rgba(74, 93, 78, 0.15);
  border-radius: 6px;
  padding: 0.85rem 0.85rem 1.25rem;
  box-shadow: 0 12px 30px -10px rgba(46, 59, 49, 0.08);
  transition: transform 0.3s ease;
}

.dgvt-rb-gallery-item:hover {
  transform: translateY(-4px) rotate(0.5deg);
}

.dgvt-rb-gallery-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.dgvt-rb-gallery-caption {
  font-family: var(--dgvt-font-heading);
  font-size: 0.95rem;
  font-style: italic;
  color: #55665a;
  text-align: center;
  margin-top: 0.75rem;
}

/* 5. Love Story Timeline */
.dgvt-rb-timeline {
  margin-top: 3rem;
  position: relative;
}

.dgvt-rb-timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px dashed rgba(74, 93, 78, 0.2);
}

@media (max-width: 640px) {
  .dgvt-rb-timeline-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.dgvt-rb-timeline-date {
  font-family: var(--dgvt-font-heading);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--dgvt-primary);
}

/* 6. Buttons & Interactive Controls */
.dgvt-rb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2.5rem;
  background-color: var(--dgvt-primary);
  color: #ffffff;
  font-family: var(--dgvt-font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: 9999px;
  transition: all 0.25s ease;
  box-shadow: 0 10px 25px -5px rgba(74, 93, 78, 0.35);
}

.dgvt-rb-btn:hover {
  background-color: #3b4b3e;
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(74, 93, 78, 0.45);
}

.dgvt-rb-btn-outline {
  background-color: transparent;
  color: var(--dgvt-secondary);
  border: 1.5px solid var(--dgvt-primary);
  box-shadow: none;
}

.dgvt-rb-btn-outline:hover {
  background-color: var(--dgvt-primary);
  color: #ffffff;
}

/* 7. Floating Audio Controller (Top-right botanical pill) */
.dgvt-rb-audio-toggle {
  position: fixed;
  top: max(1.25rem, env(safe-area-inset-top, 0px));
  right: max(1.25rem, env(safe-area-inset-right, 0px));
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  background: rgba(46, 59, 49, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-family: var(--dgvt-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, background-color 0.2s;
}

.dgvt-rb-audio-toggle:hover {
  transform: translateY(-1px);
  background: rgba(46, 59, 49, 0.98);
}

/* Floating Quick-Action Navigation Pill */
.dgvt-floating-nav {
  position: fixed;
  bottom: max(1.25rem, env(safe-area-inset-bottom, 1.25rem));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  background: var(--dgvt-card-bg);
  border: 1px solid var(--dgvt-primary);
  border-radius: 9999px;
  box-shadow: 0 12px 30px -5px rgba(46, 59, 49, 0.22), 0 2px 6px rgba(46, 59, 49, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dgvt-floating-nav.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dgvt-nav-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  padding: 0.45rem 0.85rem;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  color: var(--dgvt-secondary);
  font-family: var(--dgvt-font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 9999px;
  transition: background-color 0.2s, color 0.2s;
}

.dgvt-nav-pill-btn:hover {
  background-color: rgba(74, 93, 78, 0.12);
  color: var(--dgvt-primary);
}

.dgvt-nav-pill-divider {
  width: 1px;
  height: 16px;
  background: var(--dgvt-primary);
  opacity: 0.35;
}

/* Touch Accessibility & Tap Targets */
.dgvt-rb-btn, .dgvt-rb-btn-outline, .dgvt-rb-audio-toggle {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Studio Live Edit Mode Affordances */
body.dgvt-is-editing [data-dgvt-field][contenteditable="true"] {
  outline: 1.5px dashed var(--dgvt-primary);
  outline-offset: 3px;
  border-radius: 4px;
  cursor: text;
  transition: outline-color 0.2s, background-color 0.2s;
}

body.dgvt-is-editing [data-dgvt-field][contenteditable="true"]:hover {
  background-color: rgba(74, 93, 78, 0.06);
}

body.dgvt-is-editing [data-dgvt-field][contenteditable="true"]:focus {
  outline: 2px solid var(--dgvt-primary);
  outline-offset: 3px;
  background-color: rgba(74, 93, 78, 0.1);
}

/* Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
