/* ==================== */
/* CSS Reset & Base     */
/* ==================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --brown-primary: #842e1a;
  --brown-dark: #6b2515;
  --pink-light: #fae6e6;
  --pink-medium: #cd7b68;
  --pink-pale: #f8d4d4;
  --white: #ffffff;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.15);
  --shadow-dark: rgba(0, 0, 0, 0.2);

  /* Typography */
  --font-cursive: 'Great Vibes', cursive;
  --font-serif: 'Alegreya SC', serif;
  --font-fallback: Georgia, 'Times New Roman', serif;
}

html,
body {
  overflow-x: clip;
}

body {
  -webkit-user-select: none;
  user-select: none;
  font-family: var(--font-serif), var(--font-fallback);
  background-color: var(--brown-primary);
  color: var(--brown-primary);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* ==================== */
/* Hero Sections        */
/* ==================== */

.hero-top {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero-bottom {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero-top {
  height: 503px;
  background-color: #a85a42;
}

.hero-bottom {
  z-index: 0;
  height: 673px;
  transform: scale(1.2);
  margin-top: -130px;
}

.hero-bottom-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(131, 45, 27, 0.46) 26.125%,
    rgba(205, 123, 104, 0.28) 97.605%
  );
  z-index: 1;
}

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

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 51.648%, rgb(205, 123, 104) 100%),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(131, 45, 27, 0.2) 100%
    );
  z-index: 2;
}

/* ==================== */
/* Gradient Section     */
/* ==================== */

.gradient-section {
  position: relative;
  width: 100%;
  background: linear-gradient(
    to bottom,
    var(--pink-medium) 0.982%,
    var(--brown-primary) 100%
  );
  padding: 1rem 1.5rem 3rem;
  margin-top: -2px;
}

.save-the-date-content {
  max-width: 390px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

/* ==================== */
/* Main Content         */
/* ==================== */

.main-content {
  z-index: 1;
  margin: 2.75rem auto 0;
  padding: 0;
  background-color: transparent;
  position: relative;
}

/* ==================== */
/* Save the Date Content */
/* ==================== */

.save-the-date-title {
  font-family: var(--font-cursive);
  font-size: 4.375rem;
  font-weight: 400;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 1rem;
  opacity: 0;
}

.save-the-date-title.animate {
  animation: slideUp 0.6s ease-out both;
}

.monogram {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  opacity: 0;
}

.monogram.animate {
  animation: fadeIn 0.6s ease-out both;
}

.monogram-image {
  width: 56px;
  height: 57px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.date-text {
  font-family: var(--font-serif);
  font-size: 4rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--white);
  line-height: 1;
  opacity: 0;
}

.date-text.animate {
  animation: fadeIn 0.6s ease-out both;
}

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

.countdown-section {
  background: radial-gradient(
    ellipse 100% 83.33% at 50% 50%,
    rgba(255, 242, 242, 1) 0%,
    rgba(242, 211, 211, 1) 100%
  );
  border-radius: 140px;
  padding: 3rem 2.5rem 6rem;
  margin-top: -40px;
  position: relative;
  opacity: 0;
}

.countdown-section.animate {
  animation: scaleUp 0.8s ease-out both;
}

.countdown-heading {
  font-family: var(--font-serif);
  font-size: 3.125rem;
  font-weight: 400;
  text-align: center;
  color: var(--brown-primary);
  margin-bottom: 1.5rem;
  letter-spacing: 0;
  transition: opacity 0.3s ease;
}

.countdown-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border-radius: 0;
  padding: 0.5rem 0;
  box-shadow: none;
  transition: transform 0.3s ease;
}

.countdown-item:hover {
  transform: none;
}

.countdown-value {
  font-family: var(--font-serif);
  font-size: 4rem;
  font-weight: 400;
  color: var(--brown-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
  transition: transform 0.2s ease;
}

.countdown-value.updating {
  animation: pulse 0.3s ease;
}

.countdown-label {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--brown-primary);
  letter-spacing: 0;
  text-align: center;
}

/* ==================== */
/* Calendar Button      */
/* ==================== */

.calendar-button-container {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  margin-top: 2rem;
  opacity: 0;
}

.calendar-button-container.animate {
  animation: fadeIn 0.6s ease-out both;
}

.calendar-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: var(--pink-light);
  color: var(--brown-primary);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.25;
  padding: 1.25rem 1.5rem;
  border: 2px solid var(--brown-primary);
  border-radius: 11px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(218, 188, 188, 1);
  transition: all 0.3s ease;
  max-width: 235px;
  width: 100%;
  text-align: center;
}

.calendar-button:hover {
  background: #f0d0d0;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(218, 188, 188, 1);
}

.calendar-button:active {
  transform: scale(0.98);
}

.calendar-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.calendar-button:hover .calendar-icon {
  transform: rotate(12deg);
}

/* ==================== */
/* Locations Section    */
/* ==================== */

.locations {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 0;
  margin-top: 1rem;
}

.location-card {
  background: transparent;
  border-radius: 0;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: none;
  transition: all 0.3s ease;
}

.location-ceremony {
  opacity: 0;
}

.location-ceremony.animate {
  animation: fadeInUp 0.5s ease-out both;
}

.location-reception {
  opacity: 0;
}

.location-reception.animate {
  animation: fadeInUp 0.5s ease-out 0.2s both;
}

.location-card:hover {
  transform: none;
}

.location-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 87px;
  height: 87px;
  flex-shrink: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.icon-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.location-info {
  flex: 1;
  text-align: left;
}

.location-reception .location-info {
  text-align: right;
}

.location-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--brown-primary);
  margin-bottom: 0.25rem;
  letter-spacing: 0;
  line-height: normal;
}

.location-city {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--brown-primary);
  margin-bottom: 0.75rem;
}

.location-button {
  display: inline-block;
  background: var(--brown-primary);
  color: #f8e1e1;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  text-decoration: none;
  padding: 0.5rem 1.5rem;
  border-radius: 11px;
  box-shadow: 0 4px 15px rgba(218, 188, 188, 1);
  transition: all 0.3s ease;
}

.location-button:hover {
  background: var(--brown-dark);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(218, 188, 188, 1);
}

.location-button:active {
  transform: scale(0.98);
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

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

@media (min-width: 480px) {
  .main-content {
    max-width: 480px;
  }
}

@media (min-width: 768px) {
  .main-content {
    max-width: 600px;
  }
  .hero-top {
    height: 1000px;
  }
}

/* ==================== */
/* Accessibility        */
/* ==================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Remove blue tap highlight on mobile */
button,
a {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

/* Focus styles for keyboard navigation only */
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--brown-primary);
  outline-offset: 2px;
}
