/* ===== Custom Properties ===== */
:root {
  --bg: #faf8f5;
  --text: #2d2926;
  --accent: #c46b6b;
  --periwinkle: #8b8ec2;
  --branch: #8b6b5a;
  --muted: #948e89;
  --gold: #b8a88a;
  --border: #e2ddd8;
  --radius: 4px;
  --font-serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Raleway", "Segoe UI", sans-serif;
}

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

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

body {
  font-family: var(--font-serif);
  background:
    radial-gradient(ellipse at top right, rgba(196, 107, 107, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(139, 142, 194, 0.04) 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Blossom Divider ===== */
.blossom-divider {
  display: flex;
  justify-content: center;
  margin: 3rem auto;
  max-width: 240px;
}

.blossom-divider svg {
  width: 100%;
  height: auto;
  opacity: 0.7;
}

/* ===== Navigation ===== */
.site-nav {
  text-align: center;
  padding: 1.2rem 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

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

.site-nav a:hover::after {
  transform: scaleX(1);
}

.nav-dot {
  margin: 0 1rem;
  color: var(--muted);
}

/* ===== Main ===== */
main {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  position: relative;
  z-index: 1;
  animation: fade-in 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Hero / Home ===== */
.hero {
  text-align: center;
  padding: 2rem 0;
}

.couple-names {
  font-size: 3.5rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-indent: 0.04em;
  line-height: 1.2;
  color: var(--text);
}

.names-alt {
  margin-top: 0.5rem;
  font-size: 1.15rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-indent: 0.04em;
}

.cyrillic,
.japanese {
  font-style: normal;
}

.japanese {
  letter-spacing: 0.12em;
}

.script-separator {
  color: var(--border);
}

.save-the-date {
  margin-top: 2rem;
}

.save-the-date .label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.save-the-date .date {
  font-size: 1.15rem;
  font-weight: 400;
}

/* ===== Venue Block ===== */
.venue-block {
  margin-top: 0.5rem;
}

.venue-name {
  font-size: 1.15rem;
  color: var(--text);
}

.venue-room {
  font-size: 1rem;
  color: var(--muted);
}

.venue-address {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
}

.venue-address a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.venue-address a:hover {
  text-decoration: underline;
}

/* ===== Dress Code ===== */
.dress-code {
  font-family: var(--font-sans);
  margin-top: 0.8rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* ===== Venue Directions Link ===== */
.venue-directions {
  margin-top: 0.6rem;
  font-size: 0.85rem;
}

.venue-directions a {
  color: var(--periwinkle);
  text-decoration: none;
  font-family: var(--font-sans);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.venue-directions a:hover {
  text-decoration: underline;
}

/* ===== RSVP Deadline ===== */
.rsvp-deadline {
  margin-top: 2rem;
  font-size: 1rem;
  color: var(--accent);
}

/* ===== Countdown ===== */
.countdown {
  display: flex;
  justify-content: center;
  gap: 1.8rem;
  margin-top: 2.5rem;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-number {
  font-size: 2.4rem;
  font-weight: 300;
  line-height: 1;
  color: var(--text);
}

#seconds {
  animation: tick-pulse 1s ease-in-out infinite;
}

.countdown-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* ===== Buttons ===== */
.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.btn:hover::after {
  width: 200%;
  height: 200%;
  opacity: 1;
}

.btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(196, 107, 107, 0.25);
}

.btn:active {
  background: var(--accent);
  color: #fff;
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(196, 107, 107, 0.3);
}

.btn-secondary {
  border-color: var(--periwinkle);
  color: var(--periwinkle);
}

.btn-secondary:hover {
  background: var(--periwinkle);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(139, 142, 194, 0.25);
}

/* ===== RSVP Form ===== */
.rsvp {
  padding: 1rem 0;
}

.rsvp h1 {
  text-align: center;
  font-size: 2.4rem;
  font-weight: 400;
  margin-bottom: 0.3rem;
}

.rsvp-subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 2rem;
}

.rsvp-form {
  max-width: 500px;
  margin: 0 auto;
  background: #fef4f4;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 2rem 1.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

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

.form-group label,
.form-group legend {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  font-weight: 400;
}

fieldset.form-group {
  border: none;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  border: none;
  border-bottom: 1.5px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: 0 2px 6px rgba(196, 107, 107, 0.15);
}

.radio-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.3rem;
}

.radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 400;
  padding: 0.6rem 1.2rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.2s, background-color 0.2s;
}

.radio-label input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.radio-label:has(:checked) {
  border-color: var(--accent);
  background: rgba(196, 107, 107, 0.08);
}

.radio-label:has(:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.attending-fields {
  border-top: 1px solid var(--border);
  border-image: linear-gradient(to right, transparent, var(--border), transparent) 1;
  padding-top: 0;
  margin-top: 0.5rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding-top 0.3s ease;
}

.attending-fields.visible {
  max-height: 800px;
  opacity: 1;
  padding-top: 1.2rem;
}

.form-error {
  text-align: center;
  color: var(--accent);
  font-weight: 400;
  margin-bottom: 1rem;
}

/* ===== Per-Guest Meal Sections ===== */
.guest-meals {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  border-image: linear-gradient(to right, transparent, var(--border), transparent) 1;
}

.guest-meals:last-child {
  border-bottom: none;
}

.guest-meal-heading {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.field-error {
  border-bottom-color: var(--accent) !important;
  box-shadow: 0 2px 6px rgba(196, 107, 107, 0.2);
}

.inline-error {
  color: var(--accent);
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

.rsvp-form .btn {
  width: 100%;
  margin-top: 0.5rem;
}

/* ===== Thank You ===== */
.thanks {
  text-align: center;
  padding: 1rem 0;
}

.thanks h1 {
  font-size: 2.4rem;
  font-weight: 400;
  margin-bottom: 0.8rem;
}

.thanks p {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* ===== Thank You — Summary Card ===== */
.thanks-summary {
  text-align: left;
  max-width: 420px;
  margin: 0 auto 2.5rem;
  background: #fef4f4;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.8rem 2rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.thanks-summary-heading {
  font-size: 1.15rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 1.4rem;
  color: var(--text);
}

.thanks-detail {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  border-image: linear-gradient(to right, transparent, var(--border), transparent) 1;
}

.thanks-detail:last-child {
  border-bottom: none;
}

.thanks-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.thanks-value {
  font-size: 1rem;
  color: var(--text);
}

.thanks-meals {
  padding-top: 0.8rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.thanks-meals .thanks-label {
  display: block;
  margin-bottom: 0.6rem;
}

.thanks-meal-list {
  list-style: none;
  padding: 0;
}

.thanks-meal-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.4rem 0;
}

.thanks-meal-list li + li {
  border-top: 1px dashed var(--border);
}

.thanks-guest-name {
  font-weight: 400;
  font-size: 1rem;
}

.thanks-guest-entree {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
  margin-left: 1rem;
}

/* ===== Thank You — Calendar Links ===== */
.thanks-calendar {
  margin-bottom: 2rem;
}

.thanks-calendar-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.thanks-calendar-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.thanks-home-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 1rem;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.thanks-home-link:hover {
  text-decoration: underline;
}

/* ===== Schedule ===== */
.schedule {
  padding: 1rem 0;
}

.schedule h1 {
  text-align: center;
  font-size: 2.4rem;
  font-weight: 400;
  margin-bottom: 0.3rem;
}

.schedule-date {
  text-align: center;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.schedule-venue {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

.schedule-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2.5rem;
}

.timeline {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
  padding-left: 1.5rem;
}

/* Vertical line — left: 4.25px centers on the 10px dot (5px - 0.75px) */
.timeline::before {
  content: "";
  position: absolute;
  left: 4.25px;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding-bottom: 2.2rem;
  animation: slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.timeline-item:nth-child(1) { animation-delay: 0s; }
.timeline-item:nth-child(2) { animation-delay: 0.12s; }
.timeline-item:nth-child(3) { animation-delay: 0.24s; }
.timeline-item:nth-child(4) { animation-delay: 0.36s; }
.timeline-item:nth-child(5) { animation-delay: 0.48s; }

.timeline-item:last-child {
  padding-bottom: 0;
}

/* Dot sits at timeline left edge (0px), centered on the line */
.timeline-dot {
  position: absolute;
  left: -1.5rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: var(--bg);
  z-index: 1;
}

.timeline-time {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--accent);
  min-width: 4.5rem;
  letter-spacing: 0.04em;
}

.timeline-content {
  flex: 1;
  min-width: 0;
}

.timeline-title {
  font-size: 1.15rem;
}

.timeline-description {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 0.25rem;
}

/* ===== Travel / Getting There ===== */
.travel {
  padding: 1rem 0;
}

.travel h1 {
  text-align: center;
  font-size: 2.4rem;
  font-weight: 400;
  margin-bottom: 0.3rem;
}

.travel-venue {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.travel-address {
  margin-bottom: 0.5rem;
}

.travel .blossom-divider {
  margin: 1.5rem auto;
}

.travel-address a {
  color: var(--accent);
  text-decoration: none;
}

.travel-address a:hover {
  text-decoration: underline;
}

.travel-group {
  max-width: 580px;
  margin: 0 auto 1.5rem;
}

.travel-group h3 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.travel-group ul {
  list-style: none;
  padding: 0;
}

.travel-group li {
  padding: 0.5rem 0;
  font-size: 1rem;
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
  border-image: linear-gradient(to right, transparent, var(--border), transparent) 1;
}

.travel-distance {
  color: var(--muted);
  font-size: 0.85rem;
}

.travel-directions {
  font-size: 0.85rem;
  color: var(--muted);
}

.travel-group li:last-child {
  border-bottom: none;
}

.travel-group p {
  font-size: 1rem;
  line-height: 1.6;
}

.travel-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* ===== Travel Map ===== */
.travel-map {
  max-width: 580px;
  margin: 0 auto 1rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.travel-map iframe {
  display: block;
  width: 100%;
}

/* ===== FAQ ===== */
.faq {
  padding: 1rem 0;
}

.faq h1 {
  text-align: center;
  font-size: 2.4rem;
  font-weight: 400;
  margin-bottom: 0.3rem;
}

.faq-subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 2rem;
}

.faq-list {
  max-width: 520px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 1.8rem;
}

.faq-question {
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 0.3rem;
}

.faq-answer {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ===== Accommodations ===== */
.accommodations {
  text-align: center;
  padding: 0 0 2rem;
}

.accommodations h2 {
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.accommodations-note {
  color: var(--muted);
  font-size: 1rem;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 2rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.14em;
  position: relative;
  z-index: 1;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .site-nav {
    padding: 0.8rem 1rem;
  }

  .rsvp,
  .schedule,
  .travel,
  .faq,
  .thanks {
    padding: 0;
  }

  .hero {
    padding: 0.5rem 0;
  }

  .travel h1,
  .faq h1,
  .thanks h1 {
    font-size: 2rem;
  }

  .couple-names {
    font-size: 2.4rem;
  }

  .names-alt {
    font-size: 1rem;
  }

  .save-the-date .date {
    font-size: 1rem;
  }

  .countdown {
    gap: 1rem;
  }

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

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .nav-dot {
    margin: 0 0.6rem;
  }

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

  .radio-label {
    min-height: 48px;
    padding: 0.75rem 1.2rem;
  }

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

  .rsvp h1,
  .schedule h1 {
    font-size: 2rem;
  }

  .timeline {
    padding-left: 1.2rem;
  }

  .timeline-dot {
    left: -1.2rem;
  }

  .timeline-time {
    min-width: 4rem;
  }

  .timeline-title {
    font-size: 1rem;
  }

  .timeline-description {
    font-size: 0.85rem;
  }

  .timeline-item {
    gap: 0.6rem;
    padding-bottom: 1.8rem;
  }

  .thanks-summary {
    padding: 1.4rem 1.2rem;
  }

  .thanks-meal-list li {
    flex-direction: column;
    gap: 0.2rem;
  }

  .thanks-guest-entree {
    text-align: left;
    margin-left: 0;
  }

  .thanks-calendar-links {
    flex-direction: column;
    align-items: center;
  }

  .blossom-divider {
    max-width: 220px;
    margin: 1.5rem auto;
  }

  .faq h1 {
    font-size: 2rem;
  }
}

/* ===== Animations ===== */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes draw-branch {
  from { stroke-dashoffset: 220; }
  to { stroke-dashoffset: 0; }
}

.blossom-divider path:first-child {
  stroke-dasharray: 220;
  animation: draw-branch 1.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
