/* =====================================================
   Wedding Invitation - Pure CSS Styles
   ===================================================== */

/* CSS Variables - Color Palette */
:root {
  /* Base colors */
  --background: hsl(30, 20%, 98%);
  --foreground: hsl(30, 10%, 15%);

  /* Card colors */
  --card: hsl(30, 30%, 97%);
  --card-foreground: hsl(30, 10%, 15%);

  /* Primary colors */
  --primary: hsl(30, 40%, 35%);
  --primary-foreground: hsl(30, 20%, 98%);

  /* Secondary colors */
  --secondary: hsl(30, 25%, 92%);
  --secondary-foreground: hsl(30, 10%, 25%);

  /* Muted colors */
  --muted: hsl(30, 15%, 90%);
  --muted-foreground: hsl(30, 10%, 45%);

  /* Accent colors */
  --accent: hsl(350, 50%, 75%);
  --accent-foreground: hsl(30, 10%, 15%);

  /* Special colors */
  --gold: hsl(45, 80%, 55%);
  --gold-light: hsl(45, 70%, 75%);
  --blush: hsl(350, 50%, 85%);
  --sage: hsl(140, 25%, 75%);
  --cream: hsl(40, 30%, 95%);

  /* Border & input */
  --border: hsl(30, 20%, 88%);
  --input: hsl(30, 20%, 88%);
  --ring: hsl(30, 40%, 35%);

  /* Spacing */
  --radius: 0.75rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

/* Typography */
h1,
h2,
h3 {
  font-family: 'Noto Sans Armenian', 'Cormorant Garamond', 'Georgia', serif;
  font-weight: 500;
  line-height: 1.2;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(10px);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

.animate-fade-in {
  animation: fadeIn 2s ease forwards;
  opacity: 0;
}

.animate-fade-in-delay {
  animation: fadeIn 2s ease 0.3s forwards;
  opacity: 0;
}

.animate-slide-up {
  animation: slideUp 1s ease forwards;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}



/* =====================================================
   Toast Notification
   ===================================================== */

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--card);
  color: var(--foreground);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--gold-light);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 200;
  max-width: 350px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.toast-message {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* =====================================================
   Hero Section
   ===================================================== */

.hero {
  position: relative;
  height: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      hsla(30, 20%, 98%, 0.8) 0%,
      hsla(30, 20%, 98%, 0.6) 50%,
      hsl(30, 20%, 98%) 100%);
}

.hero-flower {
  position: absolute;
  width: 320px;
  height: 320px;
  background-image: url('assets/wedding-flowers.webp');
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0.3;
}

.hero-flower-left {
  top: -80px;
  left: -80px;
  transform: rotate(-15deg);
}

.hero-flower-right {
  bottom: -80px;
  right: -80px;
  transform: rotate(165deg);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 1rem;
}

.hero-subtitle {
  color: var(--muted-foreground);
  letter-spacing: 0.4em;
  font-size: 0.875rem;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.hero-names {
  margin-bottom: 1rem;
}

.hero-name {
  font-size: clamp(3rem, 8vw, 4.5rem);
  color: var(--primary);
  letter-spacing: 0.05em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero-heart {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
  color: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

.hero-divider {
  width: 160px;
  height: 1px;
  background: linear-gradient(to right,
      transparent,
      var(--gold),
      transparent);
  margin: 2rem auto;
}

.hero-date {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.hero-message {
  color: var(--muted-foreground);
  max-width: 28rem;
  margin: 0 auto;
  line-height: 1.8;
}



/* =====================================================
   Section Common Styles
   ===================================================== */

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

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.section-icon {
  color: var(--gold);
}

.section-divider {
  width: 96px;
  height: 1px;
  background-color: var(--gold);
  margin: 0 auto;
}

/* =====================================================
   Countdown Section
   ===================================================== */

.countdown-section {
  padding: 5rem 1rem;
  background-color: hsla(30, 25%, 92%, 0.3);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .countdown-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }
}

.countdown-item {
  background-color: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid hsla(45, 70%, 75%, 0.3);
  text-align: center;
}

.countdown-value {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.countdown-label {
  color: var(--muted-foreground);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* =====================================================
   Gallery Section
   ===================================================== */

.gallery-section {
  padding: 5rem 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery-item {
  /* cursor default */
}

.gallery-image-wrapper {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 2px solid hsla(45, 70%, 75%, 0.3);
  aspect-ratio: 1;
  position: relative;
}

.gallery-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}



.gallery-caption {
  text-align: center;
  margin-top: 0.75rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Venue Gallery specifics */
.venue-gallery {
  background-color: var(--background);
}

.venue-subtitle {
  color: var(--muted-foreground);
  margin-top: 1rem;
}

.venue-image-wrapper {
  aspect-ratio: 4/3;
}

.venue-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1rem;
}

.venue-title {
  color: white;
  font-weight: 500;
  font-size: 1.125rem;
}

/* =====================================================
   Story Section
   ===================================================== */

.story-section {
  padding: 5rem 1rem;
  background-color: hsla(30, 25%, 92%, 0.3);
}

.story-timeline {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .story-item {
    flex-direction: row;
  }

  .story-item-reverse {
    flex-direction: row-reverse;
  }
}

.story-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: hsla(350, 50%, 85%, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.story-content {
  text-align: center;
}

@media (min-width: 640px) {
  .story-content {
    text-align: left;
  }

  .story-content-right {
    text-align: right;
  }
}

.story-date {
  color: var(--gold);
  font-size: 0.875rem;
  font-weight: 500;
}

.story-title {
  font-size: 1.5rem;
  color: var(--primary);
  margin: 0.25rem 0 0.5rem;
}

.story-description {
  color: var(--muted-foreground);
  max-width: 28rem;
}

/* =====================================================
   Details Section
   ===================================================== */

.details-section {
  padding: 5rem 1rem;
  background-color: hsla(30, 25%, 92%, 0.3);
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .details-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.details-card {
  background-color: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid hsla(45, 70%, 75%, 0.3);
  text-align: center;
}

.details-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: hsla(350, 50%, 85%, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--accent);
}

.details-title {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.details-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.details-list p {
  color: var(--muted-foreground);
}

/* =====================================================
   Dress Code Section
   ===================================================== */

.dresscode-section {
  padding: 5rem 1rem;
}

.dresscode-text {
  color: var(--muted-foreground);
  margin-top: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.color-palette {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.color-item {
  text-align: center;
  cursor: default;
  transition: transform 0.3s ease;
}

.color-item:hover {
  transform: scale(1.1);
}

.color-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: 2px solid white;
  margin: 0 auto 0.5rem;
}

.color-name {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* =====================================================
   RSVP Section
   ===================================================== */

.rsvp-section {
  padding: 5rem 1rem;
  background-color: hsla(30, 25%, 92%, 0.3);
}

.rsvp-text {
  color: var(--muted-foreground);
  margin-top: 1.5rem;
}

.rsvp-form {
  background-color: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid hsla(45, 70%, 75%, 0.3);
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group label svg {
  color: var(--muted-foreground);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background-color: var(--background);
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.875rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px hsla(45, 80%, 55%, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted-foreground);
}

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

.form-group select {
  cursor: pointer;
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 2rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: calc(var(--radius) - 2px);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.submit-btn:hover {
  background-color: hsla(30, 40%, 30%, 1);
}

.submit-btn:active {
  transform: scale(0.98);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.submit-btn.loading svg {
  animation: spin 1s linear infinite;
}

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

.footer {
  padding: 4rem 1rem;
  text-align: center;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer-flower {
  width: 128px;
  height: 128px;
  object-fit: contain;
  margin: 0 auto 1.5rem;
  opacity: 0.8;
}

.footer-names {
  font-size: 1.875rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.footer-date {
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.footer-hearts {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  color: var(--accent);
}

.footer-star {
  color: var(--gold);
}

.footer-message {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-top: 2rem;
}

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

@media (max-width: 639px) {
  .hero-flower {
    width: 200px;
    height: 200px;
  }

  .countdown-item {
    padding: 1rem;
  }

  .details-card {
    padding: 1.5rem;
  }

  .rsvp-form {
    padding: 1.5rem;
  }
}