/* ============================================================
   EDIT-ME CONFIG
   Colors live in the --palette variables below; adjust them to
   restyle the whole page from one place.

   ACCESSIBILITY NOTES
   - All font-size values below are in rem, not px. rem is
     relative to the root <html> font-size, which is left at the
     browser default (we never override it), so this respects a
     visitor's OS/browser "larger text" setting and pinch-zoom.
     Do not reintroduce px font sizes or set html{font-size:...}.
   - --rose-deep, --sage and --gold were darkened slightly from
     the original design pass so that text and focus outlines
     using them meet WCAG AA contrast (4.5:1 for text, 3:1 for
     focus indicators) against the ivory backgrounds. Keep this
     in mind if you adjust the palette further.
   ============================================================ */

:root {
  --ivory: #fbf4f1;
  --ivory-deep: #f4e9e3;
  --plum: #4a3540;
  --plum-soft: #7c6470;
  --rose: #ce8a9a;
  --rose-deep: #a0546a;
  --sage: #5f6f52;
  --gold: #8b6d3f;
  --line: rgba(74, 53, 64, 0.15);
  --max-w: 720px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--plum);
  font-family: "Jost", sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  margin: 0;
  color: var(--plum);
}

a {
  color: inherit;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

.sprig {
  position: absolute;
  opacity: 0.9;
  pointer-events: none;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 64px 28px 48px;
  background: radial-gradient(
    ellipse 90% 60% at 50% 0%,
    var(--ivory-deep) 0%,
    var(--ivory) 60%
  );
}

.hero .sprig-tl {
  top: 0px;
  left: 0px;
  width: 220px;
  transform: rotate(90deg);
}
.hero .sprig-br {
  bottom: 0px;
  right: 0px;
  width: 260px;
  transform: scaleX(-1);
}

.hero-eyebrow {
  font-family: "Jost", sans-serif;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  color: var(--rose-deep);
  margin-bottom: 22px;
  font-weight: 400;
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 5.25rem);
  line-height: 1.04;
  font-weight: 500;
}
.hero h1 em {
  font-style: italic;
  color: var(--rose-deep);
  font-weight: 500;
}
.amp {
  display: block;
  font-size: 0.5em;
  font-style: italic;
  color: var(--sage);
  margin: 2px 0;
}

.hero-date {
  margin-top: 26px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.375rem;
  letter-spacing: 0.04em;
  color: var(--plum-soft);
}

.hero-sub {
  margin-top: 14px;
  font-size: 1rem;
  color: var(--plum-soft);
  max-width: 40ch;
}

.hero-cta {
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--rose-deep);
  color: var(--ivory);
  border: none;
  padding: 16px 34px;
  border-radius: 999px;
  font-family: "Jost", sans-serif;
  font-size: 0.9375rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
  box-shadow: 0 10px 24px -12px rgba(160, 84, 106, 0.55);
}
.hero-cta:hover {
  background: var(--plum);
  transform: translateY(-2px);
}
.hero-cta:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--plum-soft), transparent);
}
.scroll-hint::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 6px;
  height: 6px;
  background: var(--rose-deep);
  border-radius: 50%;
  transform: translateX(-50%);
  animation: dropfall 2.4s ease-in-out infinite;
}
@keyframes dropfall {
  0% {
    top: 0;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 38px;
    opacity: 0;
  }
}

/* ---------- SECTION shared ---------- */
section {
  padding: 96px 0;
  position: relative;
}
.section-heading {
  text-align: center;
  margin-bottom: 56px;
}
.section-heading .kicker {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.1875rem;
  color: var(--sage);
  margin-bottom: 6px;
}
.section-heading h2 {
  font-size: clamp(1.875rem, 5vw, 2.625rem);
}

.divider {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--rose-deep);
}
.divider .stem {
  height: 1px;
  width: 64px;
  background: var(--line);
}

/* ---------- COUNTDOWN ---------- */
.countdown-band {
  background: var(--plum);
  color: var(--ivory);
  padding: 64px 0;
}
.countdown-band .section-heading h2,
.countdown-band .section-heading .kicker {
  color: var(--ivory);
}
.countdown-band .section-heading .kicker {
  color: #e7c9ce;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 4vw, 36px);
  flex-wrap: wrap;
}
.countdown .unit {
  text-align: center;
  min-width: 72px;
}
.countdown .num {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.375rem, 8vw, 3.625rem);
  line-height: 1;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
}
.countdown .label {
  margin-top: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: #d8c3c8;
}
.countdown-note {
  text-align: center;
  margin-top: 36px;
  font-style: italic;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.125rem;
  color: #d8c3c8;
}

/* ---------- DETAILS ---------- */
.detail-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.detail-card {
  padding: 40px 34px;
  text-align: center;
}
.detail-card + .detail-card {
  border-left: 1px solid var(--line);
}
.detail-card .tag {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--sage);
  font-weight: 400;
}
.detail-card h3 {
  font-size: 1.75rem;
  margin-top: 10px;
}
.detail-card .time {
  margin-top: 10px;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--rose-deep);
}
.detail-card .place {
  margin-top: 14px;
  font-size: 0.9375rem;
  color: var(--plum-soft);
  line-height: 1.6;
}
.detail-card .map-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--rose-deep);
  border-bottom: 1px solid var(--rose);
  padding-bottom: 2px;
}

@media (max-width: 600px) {
  .detail-cards {
    grid-template-columns: 1fr;
  }
  .detail-card + .detail-card {
    border-left: none;
    border-top: 1px solid var(--line);
  }
}

/* ---------- RSVP ---------- */
.rsvp {
  background: var(--ivory-deep);
}
.rsvp-card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 44px clamp(24px, 6vw, 52px);
}

.field {
  margin-bottom: 22px;
  text-align: left;
}
.field label {
  display: block;
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  color: var(--plum-soft);
  margin-bottom: 8px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  font-family: "Jost", sans-serif;
  font-size: 1rem;
  color: var(--plum);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 2px;
  transition: border-color 0.2s ease;
}
.field textarea {
  resize: vertical;
  min-height: 70px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom: 1.5px solid var(--rose-deep);
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.attending-toggle {
  display: flex;
  gap: 12px;
}
.attending-toggle label {
  flex: 1;
  text-align: center;
  padding: 13px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--plum-soft);
  transition: all 0.2s ease;
}
.attending-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.attending-toggle input:checked + label {
  background: var(--rose-deep);
  border-color: var(--rose-deep);
  color: var(--ivory);
}
.attending-toggle input:focus-visible + label {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.meal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 520px) {
  .meal-row {
    grid-template-columns: 1fr;
  }
}

.guest-group {
  padding-top: 22px;
  margin-top: 14px;
  border-top: 1px dashed var(--line);
}
.guest-group:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}
.guest-group-title {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--sage);
  margin: 0 0 14px;
}

.submit-btn {
  width: 100%;
  margin-top: 12px;
  background: var(--plum);
  color: var(--ivory);
  border: none;
  padding: 16px;
  border-radius: 999px;
  font-family: "Jost", sans-serif;
  font-size: 0.9375rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition:
    background 0.25s ease,
    transform 0.25s ease;
}
.submit-btn:hover {
  background: var(--rose-deep);
  transform: translateY(-1px);
}
.submit-btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.error-text {
  color: var(--rose-deep);
  font-size: 0.8125rem;
  margin-top: 6px;
  display: none;
}
.field.has-error input,
.field.has-error select {
  border-bottom-color: var(--rose-deep);
}
.field.has-error .error-text {
  display: block;
}

/* ---------- confirmation state ---------- */
.confirm {
  display: none;
  text-align: center;
  padding: 20px 0 6px;
}
.confirm.show {
  display: block;
  animation: fadeUp 0.6s ease both;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.confirm .mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
}
.confirm h3 {
  font-size: 1.625rem;
}
.confirm p {
  color: var(--plum-soft);
  margin-top: 10px;
  font-size: 0.9375rem;
}
.confirm .summary {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  text-align: left;
  font-size: 0.875rem;
  color: var(--plum-soft);
}
.confirm .summary div {
  margin-bottom: 6px;
}
.confirm .summary b {
  color: var(--plum);
  font-weight: 500;
}
.edit-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 0.8125rem;
  color: var(--rose-deep);
  cursor: pointer;
  border-bottom: 1px solid var(--rose);
}

form.hide {
  display: none;
}

/* ---------- footer ---------- */
footer {
  text-align: center;
  padding: 56px 28px 72px;
  color: var(--plum-soft);
}
footer .names {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--rose-deep);
}
footer .fine {
  margin-top: 8px;
  font-size: 0.8125rem;
}
