/* ========================================
   Wedding Website — Madeleine & Damian
   Design System & Styles
   ======================================== */

/* --- 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&display=swap');

/* --- Custom Font: Ms Claudy ---
   Place your Ms Claudy font files in the fonts/ directory.
   Supported formats: .woff2 (preferred), .woff, .ttf */
@font-face {
  font-family: 'Ms Claudy';
  src: url('fonts/MsClaudy-Regular.woff2') format('woff2'),
    url('fonts/MsClaudy-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* --- CSS Custom Properties --- */
:root {
  /* Palette — from the invitation */
  --cream: #FFF8F0;
  --peach: #F5D6BA;
  --peach-light: #FAE8D4;
  --gold: #C9A96E;
  --gold-dark: #A8853A;
  --olive: #8B9A6B;
  --sage: #A4B08F;
  --brown: #5C4033;
  --brown-light: #7A5C4F;
  --teal: #2A6B5E;
  --teal-light: #3A8B7A;
  --white: #FFFFFF;
  --text: #3D2E22;
  --text-light: #6B5B50;

  /* Typography */
  --font-madeleine: 'Ms Claudy', cursive;
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Cormorant Garamond', serif;

  /* Spacing */
  --section-pad: 6rem 2rem;
  --section-pad-mobile: 4rem 1.25rem;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

a:hover {
  color: var(--teal-light);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.nav.scrolled {
  background: rgba(255, 248, 240, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(92, 64, 51, 0.08);
}

.nav a {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brown);
  padding: 0.4rem 0;
  position: relative;
  transition: color 0.3s var(--ease);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1.5px;
  background: var(--gold);
  transition: width 0.3s var(--ease), left 0.3s var(--ease);
}

.nav a:hover {
  color: var(--teal);
}

.nav a:hover::after {
  width: 100%;
  left: 0;
}

/* --- Sections (common) --- */
.section {
  padding: var(--section-pad);
  position: relative;
}

.section-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--brown);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 2.5rem;
}

.divider {
  width: 320px;
  margin: 0 auto 2.5rem;
  opacity: 0.8;
}

/* --- Fade-in animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background: url('assets/watercolor-bg.png') center / cover no-repeat;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
}

.hero::before {
  top: -20px;
  left: -20px;
  background-image: url('assets/leaves-top.png');
}

.hero::after {
  bottom: -20px;
  right: -20px;
  background-image: url('assets/leaves-bottom.png');
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
}

.hero-names {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.name-madeleine {
  font-family: var(--font-madeleine);
  color: var(--brown);
  font-size: clamp(4.5rem, 12vw, 8rem);
  line-height: 0.6;
}

.damian-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  align-self: flex-end;
  margin-right: 0.5rem;
  /* Shifts slightly left from full right alignment */
  margin-top: -0.5rem;
}

.name-damian {
  font-family: var(--font-heading);
  color: var(--teal);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1;
}

.hero-names .ampersand,
.footer-names .ampersand {
  font-family: var(--font-heading);
  color: var(--teal);
  font-style: normal;
}

.hero-names .ampersand {
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  font-weight: 300;
}

.footer-names .ampersand {
  font-size: 1.25rem;
  /* Leaving font-weight undeclared here so it doesn't inherit the hero's 300 weight */
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 0.5rem;
  letter-spacing: 0.04em;
}

.hero-date {
  margin-top: 2rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brown-light);
}

.hero-date .date-day {
  font-size: 3.2rem;
  font-weight: 600;
  color: var(--teal);
  display: block;
  line-height: 1;
  margin: 0.25rem 0;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
}

.scroll-indicator svg {
  width: 28px;
  height: 28px;
  stroke: var(--gold);
  stroke-width: 2;
  fill: none;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-12px);
  }

  60% {
    transform: translateX(-50%) translateY(-6px);
  }
}

/* ========================================
   COUNTDOWN
   ======================================== */
.countdown-section {
  background: linear-gradient(180deg, rgba(245, 214, 186, 0.25) 0%, var(--cream) 100%);
  padding: 3rem 2rem;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.countdown-item {
  text-align: center;
}

.countdown-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 600;
  color: var(--teal);
  line-height: 1;
}

.countdown-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* ========================================
   DETAILS SECTION
   ======================================== */
.details-section {
  background: var(--cream);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.detail-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(201, 169, 110, 0.2);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.detail-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(92, 64, 51, 0.08);
}

.detail-card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.detail-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--brown);
  margin-bottom: 0.5rem;
  letter-spacing: 0.08em;
}

.detail-card p {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.6;
}

.detail-card a {
  color: var(--teal);
  font-weight: 500;
}

/* ========================================
   VENUE / MAP SECTION
   ======================================== */
.venue-section {
  background: linear-gradient(180deg, var(--cream) 0%, rgba(245, 214, 186, 0.2) 100%);
}

.venue-map {
  margin-top: 2.5rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(92, 64, 51, 0.1);
  border: 1px solid rgba(201, 169, 110, 0.2);
}

.venue-map iframe {
  width: 100%;
  height: 350px;
  border: none;
}

/* ========================================
   RSVP SECTION
   ======================================== */
.rsvp-section {
  position: relative;
  background: url('assets/watercolor-bg.png') center / cover no-repeat;
  overflow: hidden;
}

.rsvp-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 248, 240, 0.85);
}

.rsvp-section .section-inner {
  position: relative;
  z-index: 2;
}

.rsvp-form {
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}

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

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brown);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid rgba(201, 169, 110, 0.35);
  border-radius: 8px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

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

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C9A96E' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
}

/* Radio group */
.radio-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.25rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  transition: border-color 0.3s var(--ease);
}

.radio-option input[type="radio"]:checked {
  border-color: var(--teal);
}

.radio-option input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: var(--teal);
  border-radius: 50%;
}

.radio-option span {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
}

/* Submit button */
.btn-submit {
  display: inline-block;
  width: 100%;
  padding: 1rem 2.5rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  margin-top: 0.5rem;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(42, 107, 94, 0.3);
}

.btn-submit:active {
  transform: translateY(0);
}

/* Form success / error */
.form-message {
  text-align: center;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(42, 107, 94, 0.1);
  color: var(--teal);
  border: 1px solid rgba(42, 107, 94, 0.2);
}

.form-message.error {
  display: block;
  background: rgba(180, 60, 60, 0.1);
  color: #8B3A3A;
  border: 1px solid rgba(180, 60, 60, 0.2);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--cream);
}

.footer-names {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-names .name-madeleine {
  font-family: var(--font-madeleine);
  color: var(--brown);
  font-size: 3.5rem;
  line-height: 0.6;
  font-weight: 350;
}

.footer-names .damian-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  align-self: flex-end;
  margin-right: 0.5rem;
  margin-top: -0.25rem;
}

.footer-names .name-damian {
  font-family: var(--font-heading);
  color: var(--teal);
  font-weight: 500;
  font-style: italic;
  font-size: 1.75rem;
  line-height: 1;
}

.footer-heart {
  margin-top: 0.5rem;
  font-size: 1.2rem;
  color: var(--gold);
}

.footer-date {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .nav {
    gap: 1rem;
    padding: 0.8rem 1rem;
    flex-wrap: wrap;
  }

  .nav a {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }

  .section {
    padding: var(--section-pad-mobile);
  }

  .section-title {
    font-size: 1.75rem;
  }

  .hero::before,
  .hero::after {
    width: 250px;
    height: 250px;
  }

  .hero-names {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .countdown {
    gap: 1.25rem;
  }

  .countdown-number {
    font-size: 2.2rem;
  }

  .details-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .radio-group {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {

  .hero::before,
  .hero::after {
    width: 180px;
    height: 180px;
  }

  .hero-date .date-day {
    font-size: 2.5rem;
  }
}