:root {
  --ink-strong: #2f2530;
  --ink: #4b414d;
  --muted: #726777;
  --surface: #fcf8f2;
  --surface-soft: #f4eee5;
  --surface-strong: rgba(255, 251, 245, 0.88);
  --line: rgba(110, 90, 122, 0.14);
  --rose: #b48b9e;
  --rose-deep: #8f6177;
  --sage: #8c9b7c;
  --sage-deep: #607053;
  --gold: #d8c59d;
  --shadow-lg: 0 24px 64px rgba(47, 37, 48, 0.14);
  --shadow-md: 0 14px 32px rgba(47, 37, 48, 0.08);
  --radius: 10px;
  --radius-lg: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Sora", "Segoe UI", sans-serif;
  line-height: 1.7;
  background:
    radial-gradient(circle at top left, rgba(180, 139, 158, 0.16), transparent 28rem),
    radial-gradient(circle at right 14% top 22%, rgba(140, 155, 124, 0.16), transparent 24rem),
    linear-gradient(180deg, #fdf9f3 0%, #f6f0e8 55%, #fbf7f1 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(143, 97, 119, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 97, 119, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 16px clamp(16px, 4vw, 56px);
  transition: background 180ms ease, box-shadow 180ms ease, backdrop-filter 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(252, 248, 242, 0.8);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(47, 37, 48, 0.08);
}

.brand {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 4px;
  border: 1px solid rgba(143, 97, 119, 0.18);
  border-radius: 50%;
  background: rgba(252, 248, 242, 0.92);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.brand__mark {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 30px);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav a {
  position: relative;
  padding-block: 8px;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--rose-deep);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(143, 97, 119, 0.22);
  border-radius: 50%;
  background: rgba(252, 248, 242, 0.92);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--rose-deep);
}

.hero {
  position: relative;
  min-height: 94svh;
  display: grid;
  align-items: center;
  padding: 124px clamp(20px, 6vw, 88px) 92px;
  overflow: hidden;
}

.hero__media,
.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__media {
  background-image: url("assets/hero-castelo-lilas.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.03);
}

.hero__shade {
  background:
    linear-gradient(90deg, rgba(252, 248, 242, 0.95), rgba(252, 248, 242, 0.8) 34%, rgba(252, 248, 242, 0.28) 76%),
    linear-gradient(180deg, rgba(252, 248, 242, 0.08), rgba(252, 248, 242, 0.95));
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--rose-deep);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
.gift-item-name {
  margin: 0;
  color: var(--ink-strong);
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 0.98;
}

h1 {
  max-width: 10ch;
  font-size: clamp(4.5rem, 11vw, 8.6rem);
  font-weight: 700;
}

.hero__date {
  margin: 20px 0 0;
  color: var(--sage-deep);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
}

.hero__copy {
  max-width: 58ch;
  margin: 18px 0 0;
  font-size: clamp(1rem, 1.4vw, 1.08rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button--primary {
  color: #fffdf9;
  background: linear-gradient(135deg, var(--rose-deep), #9d7186);
  box-shadow: 0 14px 28px rgba(143, 97, 119, 0.24);
}

.button--ghost {
  color: var(--rose-deep);
  border-color: rgba(143, 97, 119, 0.24);
  background: rgba(252, 248, 242, 0.74);
}

.countdown-band {
  position: relative;
  z-index: 3;
  margin-top: -48px;
  padding-inline: clamp(18px, 5vw, 72px);
}

.countdown {
  width: min(980px, 100%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(143, 97, 119, 0.12);
  border-radius: 20px;
  background: rgba(255, 252, 247, 0.84);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.countdown div {
  min-width: 0;
  padding: clamp(16px, 3vw, 28px);
  text-align: center;
  border-right: 1px solid rgba(143, 97, 119, 0.1);
}

.countdown div:last-child {
  border-right: 0;
}

.countdown strong {
  display: block;
  color: var(--rose-deep);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1;
}

.countdown span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
  padding-block: clamp(78px, 10vw, 124px);
}

.section__heading {
  max-width: 760px;
}

.section__heading h2 {
  font-size: clamp(2.7rem, 6vw, 5.2rem);
  font-weight: 600;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
  gap: clamp(24px, 6vw, 84px);
  align-items: end;
}

.intro__text {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
}

.details__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 42px;
}

.detail-card,
.gift-form,
.rsvp-form,
.gift-info-card,
.gift-item-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  box-shadow: var(--shadow-md);
}

.detail-card {
  position: relative;
  min-height: 292px;
  padding: 28px;
  overflow: hidden;
}

.detail-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -52px;
  width: 156px;
  height: 216px;
  border: 14px solid rgba(140, 155, 124, 0.14);
  border-bottom: 0;
  border-radius: 100px 100px 0 0;
}

.detail-card > * {
  position: relative;
  z-index: 1;
}

.detail-card__index {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--rose-deep);
  background: rgba(180, 139, 158, 0.16);
  font-size: 0.78rem;
  font-weight: 600;
}

.detail-card h3 {
  margin: 26px 0 14px;
  font-size: 2rem;
}

.detail-card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.program {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(300px, 0.78fr);
  gap: clamp(32px, 8vw, 94px);
  align-items: center;
}

.program__visual {
  position: relative;
  min-height: 470px;
}

.arch {
  position: absolute;
  bottom: 48px;
  display: block;
  border: 2px solid rgba(143, 97, 119, 0.22);
  border-bottom: 0;
  border-radius: 120px 120px 0 0;
  background: linear-gradient(180deg, rgba(252, 248, 242, 0.56), rgba(140, 155, 124, 0.16));
}

.arch--one {
  left: 9%;
  width: 48%;
  height: 72%;
}

.arch--two {
  right: 6%;
  width: 38%;
  height: 58%;
  border-color: rgba(140, 155, 124, 0.28);
}

.stem {
  position: absolute;
  display: block;
  width: 6px;
  height: 340px;
  background: linear-gradient(var(--sage), var(--sage-deep));
  border-radius: 999px;
  opacity: 0.58;
}

.stem::before,
.stem::after {
  content: "";
  position: absolute;
  width: 78px;
  height: 34px;
  border-radius: 78px 0;
  background: rgba(180, 139, 158, 0.22);
  box-shadow:
    28px 62px 0 rgba(216, 197, 157, 0.44),
    -16px 128px 0 rgba(180, 139, 158, 0.18),
    20px 198px 0 rgba(140, 155, 124, 0.28);
}

.stem::before {
  left: 8px;
  top: 24px;
  transform: rotate(-22deg);
}

.stem::after {
  right: 10px;
  top: 84px;
  transform: rotate(202deg);
}

.stem--left {
  left: 18%;
  top: 46px;
  transform: rotate(-14deg);
}

.stem--right {
  right: 20%;
  top: 74px;
  transform: rotate(16deg);
}

.timeline {
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(143, 97, 119, 0.16);
}

.timeline li {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(143, 97, 119, 0.16);
}

.timeline time {
  color: var(--rose-deep);
  font-weight: 600;
}

.timeline span {
  color: var(--muted);
}

.gifts-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 42px;
}

.gift-item-card {
  padding: 26px 22px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.gift-item-card:hover {
  transform: translateY(-4px);
  border-color: rgba(143, 97, 119, 0.24);
  box-shadow: var(--shadow-lg);
}

.gift-item-label {
  margin: 0 0 12px;
  color: var(--rose-deep);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gift-item-name {
  font-size: 1.9rem;
  font-weight: 600;
}

.gift-item-price {
  margin: 12px 0 0;
  color: var(--sage-deep);
  font-size: 1rem;
  font-weight: 600;
}

.gift-item-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.gift-item-actions {
  margin-top: 20px;
}

.gift-item-actions .button {
  width: 100%;
}

.gifts__grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1fr);
  gap: clamp(24px, 6vw, 54px);
  margin-top: 34px;
  align-items: start;
}

.gift-info-card,
.gift-form,
.rsvp-form {
  padding: clamp(22px, 4vw, 34px);
}

.gift-info-card__label {
  margin: 0 0 12px;
  color: var(--rose-deep);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gift-info-card h3 {
  margin-bottom: 14px;
  font-size: 2rem;
}

.gift-info-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.gift-form,
.rsvp-form {
  display: grid;
  gap: 16px;
}

.gift-form label,
.rsvp-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.gift-form input,
.gift-form select,
.gift-form textarea,
.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  padding: 14px 16px;
  color: var(--ink-strong);
  border: 1px solid rgba(96, 112, 83, 0.18);
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.96);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.gift-form textarea,
.rsvp-form textarea {
  resize: vertical;
}

.gift-form input:focus,
.gift-form select:focus,
.gift-form textarea:focus,
.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(180, 139, 158, 0.12);
}

.rsvp {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(320px, 0.95fr);
  gap: clamp(28px, 7vw, 86px);
  align-items: start;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--sage-deep);
  font-size: 0.92rem;
  font-weight: 600;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 32px clamp(20px, 6vw, 88px);
  color: var(--muted);
  border-top: 1px solid rgba(143, 97, 119, 0.12);
}

.footer p {
  margin: 0;
  color: var(--rose-deep);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
}

.footer span {
  align-self: center;
}

@media (max-width: 860px) {
  .site-header {
    min-height: 66px;
    padding: 12px 18px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 72px;
    left: 18px;
    right: 18px;
    display: grid;
    gap: 4px;
    max-height: calc(100svh - 96px);
    padding: 14px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(252, 248, 242, 0.96);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    padding: 12px 10px;
  }

  .hero {
    min-height: auto;
    padding: 104px 20px 68px;
  }

  .hero__media {
    background-position: 62% center;
  }

  .hero__shade {
    background:
      linear-gradient(90deg, rgba(252, 248, 242, 0.96), rgba(252, 248, 242, 0.8) 58%, rgba(252, 248, 242, 0.46)),
      linear-gradient(180deg, rgba(252, 248, 242, 0.12), rgba(252, 248, 242, 0.96));
  }

  .countdown {
    grid-template-columns: repeat(2, 1fr);
  }

  .countdown div:nth-child(2) {
    border-right: 0;
  }

  .countdown div:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(143, 97, 119, 0.1);
  }

  .countdown-band {
    margin-top: -24px;
    padding-inline: 20px;
  }

  .intro,
  .details__grid,
  .program,
  .gifts__grid,
  .rsvp {
    grid-template-columns: 1fr;
  }

  .program__visual {
    min-height: 280px;
    max-width: 420px;
    width: 100%;
    margin-inline: auto;
  }

  .stem {
    height: 220px;
  }
}

@media (max-width: 540px) {
  .site-header {
    padding: 10px 14px;
  }

  .brand {
    width: 48px;
    height: 48px;
  }

  .nav-toggle {
    width: 42px;
    height: 42px;
  }

  .site-nav {
    top: 66px;
    left: 12px;
    right: 12px;
    padding: 12px;
  }

  .hero,
  .section {
    width: auto;
  }

  .hero {
    padding: 92px 16px 56px;
  }

  .hero__content {
    max-width: 100%;
  }

  .hero__shade {
    background:
      linear-gradient(180deg, rgba(252, 248, 242, 0.76), rgba(252, 248, 242, 0.94) 52%, rgba(252, 248, 242, 0.98)),
      linear-gradient(90deg, rgba(252, 248, 242, 0.88), rgba(252, 248, 242, 0.38));
  }

  h1 {
    max-width: 8ch;
    font-size: clamp(3.1rem, 16vw, 4.8rem);
    line-height: 0.92;
  }

  .hero__actions,
  .footer {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .section {
    width: min(100% - 32px, 1120px);
    padding-block: 58px;
  }

  .section__heading h2 {
    font-size: clamp(2.1rem, 12vw, 3.2rem);
    line-height: 1;
  }

  .countdown-band {
    padding-inline: 16px;
  }

  .gifts-list-grid {
    grid-template-columns: 1fr;
  }

  .countdown div {
    padding: 14px 8px;
  }

  .detail-card {
    min-height: 0;
    padding: 22px 20px;
  }

  .gift-item-card,
  .gift-info-card,
  .gift-form,
  .rsvp-form {
    padding: 20px 16px;
  }

  .timeline li {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    padding: 16px 0;
  }

  .footer {
    padding: 24px 16px 32px;
  }

  .footer span {
    align-self: flex-start;
  }
}
