:root {
  /* Cecilia-inspired palette: ivory, olive, rust */
  --ivory: #f6f1e7;
  --ivory-deep: #efe7d6;
  --ink: #2b2a24;
  --olive: #5b5d27;
  --olive-deep: #44461d;
  --rust: #9c5a3c;
  --rust-deep: #82452c;
  --sage: #9a9b6f;
  --line: rgba(43, 42, 36, 0.16);

  color: var(--ink);
  background: var(--ivory);
  font-family: "Jost", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--ivory);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  overflow: clip;
}

/* ---------- Display typography ---------- */
h1,
h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0.005em;
}

h2 {
  font-size: clamp(2.3rem, 5.5vw, 4rem);
  line-height: 1.06;
  font-weight: 300;
}

.section-kicker {
  margin: 0 0 18px;
  color: var(--rust);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

/* ---------- Decorative ---------- */
.sprig {
  display: block;
  width: clamp(90px, 14vw, 130px);
  height: auto;
  margin: 0 auto 26px;
  color: var(--sage);
}

.sprig--muted {
  margin-top: 22px;
  opacity: 0.8;
}

.monogram {
  width: clamp(96px, 16vw, 132px);
  height: auto;
  margin: 0 auto 28px;
  color: var(--rust);
}

.monogram__text {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 46px;
  font-weight: 500;
  letter-spacing: 0.02em;
  fill: currentColor;
}

/* ---------- Top bar ---------- */
.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(22px, 4vw, 38px) clamp(24px, 5vw, 56px);
  color: var(--ivory);
}

.topbar__mark {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.4rem;
  letter-spacing: 0.18em;
}

.nav {
  display: flex;
  gap: clamp(18px, 3vw, 38px);
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav a {
  position: relative;
  padding-bottom: 4px;
  transition: opacity 180ms ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 220ms ease;
}

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

@media (max-width: 720px) {
  .nav {
    gap: 16px;
    font-size: 0.62rem;
  }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 64px);
  color: var(--ivory);
  background: linear-gradient(180deg, #6a6c2e 0%, var(--olive) 55%, var(--olive-deep) 100%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.08), transparent 60%),
    radial-gradient(60% 50% at 50% 120%, rgba(0, 0, 0, 0.25), transparent 70%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: clamp(16px, 3vw, 30px);
  border: 1px solid rgba(246, 241, 231, 0.32);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  animation: float-in 1100ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero__eyebrow {
  margin: 0 0 clamp(20px, 4vw, 34px);
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  opacity: 0.85;
}

h1 {
  margin: 0;
  font-family: "Tangerine", "Snell Roundhand", cursive;
  font-weight: 700;
  font-size: clamp(5.5rem, 17vw, 15rem);
  line-height: 0.74;
  letter-spacing: 0;
}

h1 span {
  display: block;
}

.hero__amp {
  font-size: 0.42em;
  line-height: 1;
  margin: clamp(4px, 1vw, 10px) 0;
  opacity: 0.9;
}

.hero__date {
  margin: clamp(26px, 5vw, 44px) 0 6px;
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.hero__place {
  margin: 0 0 clamp(30px, 5vw, 44px);
  font-size: 0.82rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  opacity: 0.85;
}

.hero__scroll {
  position: absolute;
  bottom: clamp(28px, 5vw, 48px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 10px;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.85;
}

.hero__scroll i {
  width: 1px;
  height: 42px;
  background: currentColor;
  animation: scroll-pulse 2200ms ease-in-out infinite;
  transform-origin: top;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0 32px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: background 200ms ease, color 200ms ease, transform 200ms ease;
}

.button:hover {
  background: var(--ivory);
  color: var(--olive-deep);
  transform: translateY(-2px);
}

.button--solid {
  border-color: var(--rust);
  background: var(--rust);
  color: var(--ivory);
}

.button--solid:hover {
  background: var(--rust-deep);
  border-color: var(--rust-deep);
  color: var(--ivory);
}

/* ---------- Shared section frame ---------- */
.welcome,
.story,
.details,
.schedule,
.rsvp {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(80px, 13vw, 168px) 0;
}

/* ---------- Welcome ---------- */
.welcome {
  text-align: center;
}

.welcome h2 {
  max-width: 20ch;
  margin: 0 auto;
}

/* ---------- Story ---------- */
.story {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: clamp(40px, 7vw, 96px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.story__intro h2 {
  margin-top: 10px;
}

.story__body {
  margin: 0;
  align-self: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 300;
  line-height: 1.5;
  color: rgba(43, 42, 36, 0.86);
}

.story__body::first-letter {
  color: var(--rust);
}

/* ---------- Details ---------- */
.details {
  text-align: center;
}

.details-grid {
  margin-top: clamp(36px, 6vw, 60px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 5vw, 56px);
  text-align: center;
}

.detail {
  display: grid;
  gap: 12px;
  padding: clamp(28px, 4vw, 44px) 18px;
  border: 1px solid var(--line);
  background: var(--ivory-deep);
}

.detail span {
  color: var(--rust);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.detail strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 400;
  line-height: 1.1;
}

.detail p {
  margin: 0;
  color: rgba(43, 42, 36, 0.7);
  font-size: 0.95rem;
}

/* ---------- Schedule ---------- */
.schedule {
  text-align: center;
}

.schedule__head {
  margin-bottom: clamp(20px, 4vw, 40px);
}

.timeline {
  margin: 0 auto;
  padding: 0;
  list-style: none;
  max-width: 620px;
  text-align: left;
}

.timeline li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: clamp(18px, 3vw, 36px);
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

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

.timeline__time {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
  padding-top: 6px;
}

.timeline strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 400;
  line-height: 1.1;
}

.timeline p {
  margin: 6px 0 0;
  color: rgba(43, 42, 36, 0.7);
  font-size: 0.95rem;
}

/* ---------- Invite ---------- */
.invite {
  text-align: center;
  background: var(--ivory-deep);
  padding: clamp(80px, 13vw, 168px) 24px;
}

.invite__card {
  margin: clamp(34px, 5vw, 52px) auto;
  width: min(440px, 100%);
  background: #fff;
  padding: clamp(12px, 2vw, 18px);
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px -40px rgba(43, 42, 36, 0.55);
  transition: transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.invite__card:hover {
  transform: translateY(-6px);
}

.invite__card img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- RSVP ---------- */
.rsvp {
  text-align: center;
  display: grid;
  justify-items: center;
}

.rsvp__copy {
  max-width: 54ch;
  margin: 18px auto 34px;
  color: rgba(43, 42, 36, 0.72);
  font-size: clamp(1.02rem, 1.9vw, 1.2rem);
}

.rsvp__thanks {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 300;
  color: var(--olive-deep);
}

.rsvp-form {
  width: min(640px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 3vw, 26px);
  text-align: left;
}

.field {
  display: grid;
  gap: 8px;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(91, 93, 39, 0.14);
}

.rsvp-form .button {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: 8px;
  border: none;
  cursor: pointer;
}

@media (max-width: 560px) {
  .rsvp-form {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: clamp(60px, 9vw, 110px) 24px clamp(50px, 7vw, 80px);
  background: var(--olive-deep);
  color: var(--ivory);
}

.footer .monogram {
  color: rgba(246, 241, 231, 0.85);
}

.footer__names {
  margin: 0;
  font-family: "Tangerine", cursive;
  font-weight: 700;
  font-size: clamp(3.4rem, 8vw, 5.5rem);
  line-height: 1;
}

.footer__date {
  margin: 14px 0 0;
  font-size: 0.74rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* ---------- Admin (guest list) ---------- */
.admin {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(48px, 8vw, 90px) 0;
}

.admin__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}

.admin__summary {
  color: var(--rust);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.admin code {
  background: var(--ivory-deep);
  padding: 2px 6px;
  border-radius: 3px;
}

.admin__table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 0.92rem;
}

.admin__table th,
.admin__table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.admin__table th {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rust);
}

.admin__remove {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 14px;
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--rust-deep);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.admin__remove:hover {
  background: var(--rust);
  color: #fff;
}

/* ---------- Motion ---------- */
.reveal {
  animation: fade-up both;
  animation-timeline: view();
  animation-range: entry 6% cover 32%;
}

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

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

@keyframes scroll-pulse {
  0%,
  100% {
    transform: scaleY(0.3);
    opacity: 0.4;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .hero__content {
    animation: none;
  }
  .hero__scroll i {
    animation: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .story {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero::after {
    inset: 12px;
  }
  .timeline li {
    grid-template-columns: 84px 1fr;
    gap: 14px;
  }
  .topbar {
    flex-direction: column;
    gap: 12px;
  }
}
