/*
 * invite-wow-final/style.css
 *
 * This stylesheet defines the soft pastel colour palette and layout
 * rules for the wedding invitation of Jithin & Binju. The design
 * emphasises a modern premium feel using gentle gradients, subtle
 * shadows and rounded corners. Change the CSS variables below to
 * adjust the overall colour scheme.
 */

/* Colour variables */
:root {
  /* Base backgrounds */
  --colour-bg: #FDF6F6;        /* very pale blush */
  --colour-bg-light: #F8EDEE;  /* light peach */
  --colour-card: rgba(255,255,255,0.8);
  /* Accents */
  --colour-primary: #DFA2A2;   /* soft rose */
  --colour-secondary: #A1C9C9; /* muted teal */
  --colour-tertiary: #EBDCCB;  /* light sand */
  --colour-text: #453F3C;      /* dark taupe */
  --colour-muted: #776E6A;     /* medium taupe */
  /* Shadows and radius */
  --shadow-small: 0 2px 6px rgba(0,0,0,0.1);
  --shadow-large: 0 8px 20px rgba(0,0,0,0.15);
  --radius: 16px;
}

/* Reset some defaults */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--colour-bg);
  color: var(--colour-text);
  line-height: 1.6;
}

a {
  color: var(--colour-primary);
  text-decoration: none;
  cursor: pointer;
}

/* Container utility */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* Section styling */
.section {
  padding: 3rem 0;
}

.section.light {
  background: var(--colour-bg-light);
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  margin-bottom: 1.2rem;
  text-align: center;
  color: var(--colour-primary);
}

.section-intro {
  margin: 0 auto 2rem;
  max-width: 600px;
  text-align: center;
  color: var(--colour-muted);
}

/* Hero */
.hero {
  position: relative;
  height: 90vh;
  min-height: 500px;
  color: #fff;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-vignette {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4));
}
.hero-wrap {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.hero-card {
  backdrop-filter: blur(12px) saturate(140%);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  max-width: 600px;
  box-shadow: var(--shadow-large);
}
.tagline {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #FBE7E7;
}
.couple {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 7vw, 4rem);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}
.amp {
  color: var(--colour-secondary);
}
.wedding-date, .venue {
  margin-bottom: 0.3rem;
  font-weight: 500;
  color: #f5ecec;
}
.hero-buttons {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-weight: 600;
  border: none;
  box-shadow: var(--shadow-small);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn.primary {
  background: var(--colour-primary);
  color: #fff;
}
.btn.secondary {
  background: var(--colour-secondary);
  color: #fff;
}
.btn.tertiary {
  background: var(--colour-tertiary);
  color: var(--colour-text);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

/* WhatsApp button styling */
.btn.whatsapp {
  background: linear-gradient(90deg, #25D366, #128C7E);
  color: #fff;
}
.btn.whatsapp:hover {
  box-shadow: 0 6px 14px rgba(18, 140, 126, 0.4);
}

/* Countdown section */
.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.time-box {
  background: var(--colour-card);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--radius);
  padding: 1rem;
  min-width: 90px;
  text-align: center;
  box-shadow: var(--shadow-small);
}
.time-box span:first-child {
  display: block;
  font-size: 2rem;
  font-weight: 600;
  color: var(--colour-primary);
}
.time-box .label {
  font-size: 0.8rem;
  color: var(--colour-muted);
  text-transform: uppercase;
}

/* Story section */
.story-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}
.story-text {
  flex: 1 1 55%;
}
.story-image {
  flex: 1 1 40%;
  text-align: center;
}
.story-image img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-small);
}

/* Schedule */
.schedule-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.event-card {
  background: var(--colour-card);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-small);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}
.event-card h3 {
  margin-bottom: 0.5rem;
  color: var(--colour-primary);
}
.event-card p {
  margin-bottom: 0.5rem;
  color: var(--colour-text);
}

/* Gallery */
.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.gallery-grid img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow-small);
}

/* Responsive adjustments for small screens */
@media (max-width: 700px) {
  /* Stack story elements vertically and center them */
  .story-container {
    flex-direction: column;
    align-items: center;
  }
  .story-text,
  .story-image {
    flex: 1 1 100%;
    text-align: center;
  }
  .story-image img {
    max-width: 80%;
    margin: 0 auto;
  }
  /* Use single column for schedule cards */
  .schedule-grid {
    grid-template-columns: 1fr;
  }
  /* Adjust gallery layout: two columns on medium screens, one on very small */
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
  /* Hero card width adjustment */
  .hero-card {
    width: 95%;
    padding: 1.5rem;
  }
  /* Countdown boxes shrink slightly */
  .time-box {
    min-width: 70px;
    padding: 0.8rem;
  }
}

@media (max-width: 480px) {
  /* Gallery becomes single column on very narrow screens */
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid img {
    height: 200px;
  }
}

/* Override gallery cropping on small screens to show full images */
@media (max-width: 560px) {
  /* Display one column for better aspect ratio on small screens */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  /* Remove fixed height and fit the whole portrait image */
  .gallery-grid img {
    width: 100%;
    height: auto !important;
    aspect-ratio: auto;
    object-fit: contain !important;
    background: #fff;
  }
}

/* RSVP */
#rsvp-form {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
#rsvp-form label {
  font-weight: 500;
}
#rsvp-form input,
#rsvp-form select {
  padding: 0.6rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}
#rsvp-form button {
  align-self: flex-start;
}
#rsvp-message {
  margin-top: 1rem;
  color: var(--colour-primary);
}
#rsvp-message.hidden {
  display: none;
}

/* Footer */
.footer {
  padding: 1.5rem 0;
  background: var(--colour-bg-light);
  text-align: center;
  color: var(--colour-muted);
  font-size: 0.9rem;
}