/* Elena & Miguel — ivory and wine
   Hosted on GraceInvite. Nothing of ours appears on this page. */

:root {
  --paper: #f4efe6;
  --cream: #fbf7f0;
  --ink: #2a2118;
  --muted: #6d6156;
  --line: #ddd4c6;
  --wine: #7a2e2a;
  --wine-deep: #5c1f1c;
  --gold: #c4a574;
  --sage: #8a9a78;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
.signature,
.footer__names,
.count b {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
}

h2 {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  max-width: 18ch;
}

h3 {
  font-size: 1.45rem;
}

p {
  margin: 0;
}

p + p {
  margin-top: 1rem;
}

a {
  color: inherit;
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--wine);
}

.section--dark .eyebrow {
  color: var(--gold);
}

.amp {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
  margin: 0 0.12em;
}

.fine {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.section--dark .fine {
  color: rgb(244 239 230 / 0.6);
}

/* ---- Buttons and pills ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 500 0.88rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--light {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.25);
}

.btn--light:hover {
  background: var(--gold);
}

.btn--ghost {
  border-color: rgb(255 255 255 / 0.4);
  color: #fff;
}

.btn--ghost:hover {
  border-color: #fff;
  background: rgb(255 255 255 / 0.1);
}

.link-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--cream);
  font-size: 0.82rem;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.link-pill:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  color: #fff;
  transition: background-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}

.nav.is-solid {
  background: rgb(244 239 230 / 0.94);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(12px);
  padding: 0.65rem 1.25rem;
}

.nav__brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.nav__brand span {
  color: var(--gold);
  font-style: italic;
}

.nav__links {
  display: flex;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
}

.nav__links a {
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.nav__links a:hover {
  opacity: 1;
}

.nav__cta {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  opacity: 1 !important;
}

.nav__toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  position: relative;
}

.nav__toggle span {
  position: absolute;
  left: 30%;
  right: 30%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s ease, top 0.3s ease;
}

.nav__toggle span:first-child {
  top: 42%;
}

.nav__toggle span:last-child {
  top: 58%;
}

.nav__toggle.is-open span:first-child {
  top: 50%;
  transform: rotate(45deg);
}

.nav__toggle.is-open span:last-child {
  top: 50%;
  transform: rotate(-45deg);
}

@media (max-width: 760px) {
  .nav__toggle {
    display: block;
  }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.25rem 1.25rem;
    background: rgb(244 239 230 / 0.98);
    color: var(--ink);
    box-shadow: 0 20px 40px rgb(0 0 0 / 0.15);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .nav__links.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav__links li {
    border-top: 1px solid var(--line);
  }
  .nav__links a {
    display: block;
    padding: 0.85rem 0;
    font-family: var(--serif);
    font-size: 1.3rem;
    opacity: 1;
  }
  .nav__cta {
    border: 0;
    padding: 0.85rem 0;
    color: var(--wine);
  }
  .nav:not(.is-solid) .nav__links {
    background: rgb(244 239 230 / 0.98);
  }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  animation: ken 30s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgb(20 14 10 / 0.88), rgb(20 14 10 / 0.35) 45%, rgb(20 14 10 / 0.2));
}

@keyframes ken {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1.14) translate(-1.5%, -1%);
  }
}

.hero__inner {
  padding: 6rem 1.25rem 5rem;
  max-width: 68rem;
  margin: 0 auto;
  width: 100%;
}

.hero .eyebrow {
  color: var(--gold);
}

.hero h1 {
  font-size: clamp(3rem, 11vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.hero__when {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: rgb(255 255 255 / 0.85);
}

.hero__when .dot {
  margin: 0 0.5rem;
  color: var(--gold);
}

.count {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.count span {
  display: grid;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.7);
}

.count b {
  font-size: 2.2rem;
  color: #fff;
  letter-spacing: 0;
}

.count__done {
  font-family: var(--serif);
  font-size: 1.6rem !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: #fff !important;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  width: 1.4rem;
  height: 2.3rem;
  border: 1px solid rgb(255 255 255 / 0.5);
  border-radius: 999px;
  transform: translateX(-50%);
}

.hero__scroll span {
  position: absolute;
  left: 50%;
  top: 0.45rem;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: #fff;
  transform: translateX(-50%);
  animation: drop 1.8s ease-in-out infinite;
}

@keyframes drop {
  0% {
    opacity: 0;
    top: 0.4rem;
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    top: 1.4rem;
  }
}

/* ---- Layout ---- */
.section {
  padding: 5rem 1.25rem;
}

.section--alt {
  background: var(--cream);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section--dark {
  background: var(--ink);
  color: var(--paper);
}

.wrap {
  max-width: 68rem;
  margin: 0 auto;
}

.wrap--narrow {
  max-width: 44rem;
}

.wrap--split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 860px) {
  .wrap--split {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
  }
  .wrap--split-reverse > :first-child {
    order: 1;
  }
}

/* ---- Story ---- */
.story__figure,
.dress__figure {
  margin: 0;
  overflow: hidden;
  border-radius: 1.5rem;
  aspect-ratio: 4 / 5;
  background: #241c16;
}

.story__figure img,
.dress__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story__text p:not(.eyebrow):not(.signature) {
  color: var(--muted);
  margin-top: 1.2rem;
  max-width: 46ch;
}

.signature {
  margin-top: 2rem !important;
  font-size: 2rem;
  font-style: italic;
  color: var(--wine);
}

/* ---- Timeline ---- */
.timeline {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 6.35rem;
  width: 1px;
  background: var(--line);
}

.timeline__row {
  display: grid;
  grid-template-columns: 5.5rem 1.7rem 1fr;
  gap: 0 0.5rem;
  padding: 1.1rem 0;
}

.timeline__time {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding-top: 0.35rem;
  text-align: right;
}

.timeline__dot {
  width: 0.7rem;
  height: 0.7rem;
  margin: 0.45rem auto 0;
  border-radius: 999px;
  background: var(--wine);
  box-shadow: 0 0 0 4px var(--cream);
}

.timeline__body p {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 520px) {
  .timeline::before {
    left: 0.85rem;
  }
  .timeline__row {
    grid-template-columns: 1.7rem 1fr;
  }
  .timeline__time {
    grid-column: 2;
    text-align: left;
    padding-top: 0;
    order: -1;
  }
  .timeline__dot {
    grid-row: 1 / span 2;
  }
}

/* ---- Cards ---- */
.venue__grid,
.stay__grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

@media (min-width: 760px) {
  .venue__grid {
    grid-template-columns: 1fr 1fr;
  }
  .venue__grid .card--note {
    grid-column: 1 / -1;
  }
  .stay__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--cream);
}

.card--note {
  background: transparent;
  border-style: dashed;
}

.card__label {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wine);
  margin-bottom: 0.75rem;
}

.card h3 + p,
.card__label + p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

/* ---- Dress ---- */
.dress__text > p:not(.eyebrow) {
  color: var(--muted);
  margin-top: 1.2rem;
  max-width: 46ch;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.swatches li {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
}

.swatches span {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 1px solid rgb(0 0 0 / 0.08);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.4);
}

/* ---- Gallery ---- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  padding: 0 0.5rem;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 1rem;
}

@media (min-width: 760px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    padding: 0 1.25rem;
  }
  .gallery img:nth-child(2),
  .gallery img:nth-child(4) {
    margin-top: 2.5rem;
  }
}

/* ---- FAQ ---- */
.faq {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: 1.3rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--wine);
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq p {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 60ch;
}

/* ---- RSVP ---- */
.section--dark h2 {
  color: var(--paper);
}

.section--dark > .wrap > p:not(.eyebrow) {
  color: rgb(244 239 230 / 0.75);
  margin-top: 1rem;
}

.section--dark strong {
  color: var(--gold);
  font-weight: 500;
}

.form {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.form__row {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 560px) {
  .form__row {
    grid-template-columns: 1fr 1fr;
  }
}

.form__row.is-muted {
  opacity: 0.4;
}

.field {
  display: grid;
  gap: 0.5rem;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.field > span,
.field legend {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(244 239 230 / 0.6);
  padding: 0;
}

.field em {
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.7;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid rgb(244 239 230 / 0.2);
  border-radius: 0.8rem;
  background: rgb(255 255 255 / 0.05);
  color: var(--paper);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.field textarea {
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgb(244 239 230 / 0.35);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgb(255 255 255 / 0.08);
}

.field select option {
  color: var(--ink);
}

.opts {
  display: grid;
  gap: 0.6rem;
}

@media (min-width: 560px) {
  .opts {
    grid-template-columns: 1fr 1fr;
  }
}

.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgb(244 239 230 / 0.2);
  border-radius: 0.8rem;
  cursor: pointer;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.opt::before {
  content: "";
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 1px solid rgb(244 239 230 / 0.5);
  flex-shrink: 0;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.opt:has(input:checked) {
  border-color: var(--gold);
  background: rgb(196 165 116 / 0.12);
}

.opt:has(input:checked)::before {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: inset 0 0 0 3px var(--ink);
}

.opt:has(input:focus-visible) {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.form__error {
  font-size: 0.85rem;
  color: #f0b3ad;
}

.form .btn {
  justify-self: start;
}

.form .fine {
  margin-top: -0.5rem;
}

.success {
  margin-top: 2.5rem;
  padding: 2rem;
  border: 1px solid rgb(196 165 116 / 0.4);
  border-radius: 1.5rem;
  text-align: center;
}

.success__mark {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 1.3rem;
}

.success h3 {
  font-size: 2rem;
  color: var(--paper);
}

.success p {
  color: rgb(244 239 230 / 0.75);
  margin-top: 0.75rem;
}

/* ---- Calendar ---- */
.calendar {
  text-align: center;
}

.calendar h2 {
  margin: 0 auto;
}

.calendar > p:not(.eyebrow) {
  color: var(--muted);
  margin-top: 1rem;
  max-width: 44ch;
  margin-left: auto;
  margin-right: auto;
}

.calendar__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.75rem;
}

/* ---- Footer ---- */
.footer {
  padding: 4rem 1.25rem 3rem;
  text-align: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer__names {
  font-size: 2.4rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.footer__tag {
  margin-top: 1.25rem;
  color: var(--wine);
  letter-spacing: 0.06em;
}

/* ---- Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.hero .reveal {
  transition-delay: 0.15s;
}

.hero h1.reveal {
  transition-delay: 0.25s;
}

.hero .hero__when.reveal {
  transition-delay: 0.4s;
}

.hero .count.reveal {
  transition-delay: 0.5s;
}

.hero .hero__cta.reveal {
  transition-delay: 0.6s;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
