:root {
  --ivory: #f7f4ed;
  --ivory-light: #fcfaf5;
  --olive: #667153;
  --deep-green: #34402e;
  --gold: #b79b6c;
  --line: rgba(103, 113, 83, 0.22);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  color: var(--deep-green);
  background: var(--ivory);
  font-family: Inter, system-ui, sans-serif;
  overflow-x: hidden;
}

.page-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 4vw, 4rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(183,155,108,.08), transparent 25%),
    radial-gradient(circle at 84% 75%, rgba(102,113,83,.06), transparent 28%),
    repeating-linear-gradient(100deg, transparent 0 7px, rgba(52,64,46,.012) 8px 9px),
    var(--ivory);
}

.page-shell::after {
  content: "";
  position: absolute;
  inset: clamp(.7rem, 2vw, 1.5rem);
  z-index: -1;
  border: 1px solid rgba(183,155,108,.18);
  pointer-events: none;
}

.church-watermark {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("../assets/igreja.webp") center / cover no-repeat;
  opacity: .055;
  filter: grayscale(1) sepia(.35);
  pointer-events: none;
}

.olive-branch {
  position: absolute;
  z-index: -1;
  width: clamp(18rem, 34vw, 39rem);
  height: auto;
  pointer-events: none;
  user-select: none;
}

.olive-branch--top { top: -7%; left: -5%; }
.olive-branch--bottom { right: -7%; bottom: -12%; transform: rotate(180deg); }

.entrance { animation: reveal 3s 2s ease-in-out both; }
.olive-branch--top {
  transform-origin: 8% 8%;
  animation:
    olive-enter-top 5s 2s cubic-bezier(.22,.75,.3,1) both,
    olive-breeze-top 11s 7s ease-in-out infinite alternate both;
}

.olive-branch--bottom {
  transform-origin: center;
  animation:
    olive-enter-bottom 5s 2s cubic-bezier(.22,.75,.3,1) both,
    olive-breeze-bottom 11s 7s ease-in-out infinite alternate both;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes olive-enter-top {
  from { translate: -18% -18%; opacity: 0; filter: blur(2px); }
  to { translate: 0 0; opacity: 1; filter: blur(0); }
}

@keyframes olive-enter-bottom {
  from { translate: 18% 18%; opacity: 0; filter: blur(2px); }
  to { translate: 0 0; opacity: 1; filter: blur(0); }
}

@keyframes olive-breeze-top {
  from { transform: rotate(-1.8deg) translate3d(-5px, -3px, 0); }
  to { transform: rotate(2.1deg) translate3d(8px, 5px, 0); }
}

@keyframes olive-breeze-bottom {
  from { transform: rotate(178.2deg) translate3d(-5px, -3px, 0); }
  to { transform: rotate(182.1deg) translate3d(8px, 5px, 0); }
}

.page-actions {
  position: absolute;
  top: clamp(1.2rem, 3vw, 2.4rem);
  right: clamp(1.2rem, 3vw, 2.4rem);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: .65rem;
}

.bell-notes {
  display: flex;
  align-items: center;
  gap: .25rem;
  padding: .3rem .35rem .3rem .65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(247,244,237,.72);
  backdrop-filter: blur(5px);
}

.bell-notes__label {
  margin-right: .2rem;
  color: var(--deep-green);
  font: 500 .62rem/1 Inter, sans-serif;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.bell-note {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: var(--olive);
  border: 1px solid rgba(183,155,108,.28);
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  font: 500 .63rem/1 Inter, sans-serif;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.bell-note:hover, .bell-note:focus-visible { border-color: var(--gold); background: white; outline: none; transform: translateY(-1px); }
.bell-note.is-ringing { animation: ring-note .4s ease; }

.bridal-theme {
  height: 2rem;
  margin-left: .18rem;
  padding: 0 .7rem;
  color: var(--ivory-light);
  border: 1px solid var(--olive);
  border-radius: 999px;
  background: var(--olive);
  font: 500 .6rem/1 Inter, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.bridal-theme:hover, .bridal-theme:focus-visible { background: var(--deep-green); outline: none; }
.bridal-theme.is-playing { animation: musical-pulse 1.1s ease-in-out infinite alternate; }

@keyframes musical-pulse {
  from { box-shadow: 0 0 0 0 rgba(102,113,83,.1); }
  to { box-shadow: 0 0 0 .3rem rgba(102,113,83,.14); }
}

@keyframes ring-note {
  0%, 100% { transform: rotate(0); }
  30% { transform: rotate(-8deg) scale(1.06); }
  60% { transform: rotate(7deg) scale(1.06); }
}

.save-the-date {
  width: min(100%, 68rem);
  text-align: center;
}

.monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  margin-bottom: .2rem;
}

.monogram span { width: clamp(1.8rem, 4vw, 3.5rem); height: 1px; background: rgba(183,155,108,.55); }
.monogram svg { width: 4.2rem; fill: none; stroke: var(--olive); stroke-width: 1.25; }

.eyebrow {
  margin: 0 0 clamp(1.2rem, 3vh, 2.2rem);
  color: rgba(52,64,46,.75);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(.9rem, 1.3vw, 1.05rem);
  letter-spacing: .05em;
}

.eyebrow strong { font-weight: 600; }

h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3.4rem, 8vw, 7.5rem);
  font-weight: 400;
  line-height: .85;
  letter-spacing: -.045em;
}

h1 i { color: var(--olive); font-weight: 400; }

.save-label {
  margin: clamp(.9rem, 2vh, 1.3rem) 0 0;
  color: var(--gold);
  font-size: clamp(.7rem, 1.1vw, .82rem);
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
}

.date {
  margin: .5rem 0 0;
  color: var(--olive);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.2rem, 2.1vw, 1.65rem);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  margin: clamp(1.1rem, 2.8vh, 1.8rem) auto .7rem;
}

.divider span { width: clamp(2.5rem, 6vw, 5rem); height: 1px; background: rgba(183,155,108,.5); }

.bell-button {
  display: grid;
  place-items: center;
  width: clamp(3.1rem, 5vw, 4rem);
  height: clamp(3.1rem, 5vw, 4rem);
  padding: .35rem;
  color: var(--gold);
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.bell-button svg {
  width: 100%;
  height: 100%;
  fill: rgba(183,155,108,.08);
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: 50% 10%;
  animation: bell-invitation 2.6s ease-in-out infinite;
}

.bell-button:hover, .bell-button:focus-visible { color: var(--olive); outline: 1px solid rgba(183,155,108,.35); }
.bell-button.is-playing svg { color: var(--olive); animation: bell-ringing .72s ease-in-out infinite; }

@keyframes bell-invitation {
  0%, 30%, 70%, 100% { transform: rotate(0); }
  42% { transform: rotate(-7deg); }
  58% { transform: rotate(7deg); }
}

@keyframes bell-ringing {
  0%, 100% { transform: rotate(-10deg); }
  50% { transform: rotate(10deg); }
}

.countdown-heading {
  margin: 0 0 clamp(1rem, 3vh, 2rem);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  font-style: italic;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.65rem, 1.8vw, 1.25rem);
  width: min(100%, 45rem);
  margin-inline: auto;
}

.countdown-card {
  display: grid;
  place-items: center;
  min-height: clamp(7.2rem, 12vw, 9.2rem);
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: rgba(252,250,245,.48);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
  backdrop-filter: blur(2px);
}

.countdown-value {
  display: inline-block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.7rem, 5vw, 4.25rem);
  line-height: .9;
  font-variant-numeric: tabular-nums;
}

.countdown-value.is-changing { animation: number-change .5s cubic-bezier(.22,.75,.3,1); }

@keyframes number-change {
  0% { opacity: .2; transform: translateY(-.16em) scale(.97); filter: blur(1px); }
  55% { opacity: 1; transform: translateY(.035em) scale(1.015); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.countdown-label {
  position: relative;
  padding-top: .9rem;
  color: var(--olive);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.countdown-label::before {
  content: "";
  position: absolute;
  top: .42rem;
  left: 50%;
  width: 1.6rem;
  height: 1px;
  background: rgba(183,155,108,.62);
  transform: translateX(-50%);
}

.wedding-day-message {
  margin: 1.35rem 0 0;
  color: var(--olive);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-style: italic;
}

.botanical-mark {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .6rem;
  margin-top: clamp(1rem, 3vh, 2rem);
  color: var(--olive);
  font-family: Georgia, serif;
  font-size: 1.35rem;
}

.botanical-mark span:first-child { transform: rotate(-20deg); }
.botanical-mark span:last-child { transform: scaleX(-1) rotate(-20deg); }
.botanical-mark i { color: var(--gold); font-size: 1rem; }

.coming-soon {
  margin: .55rem 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-style: italic;
}

.noscript { position: fixed; right: 1rem; bottom: 1rem; margin: 0; padding: .7rem 1rem; background: white; }

@media (max-width: 760px) {
  .page-shell { align-items: center; padding: 1.6rem 1.2rem; }
  .page-shell::after { inset: .55rem; }
  .olive-branch { width: clamp(11rem, 50vw, 17rem); opacity: .82; }
  .olive-branch--top { top: -3%; left: -10%; }
  .olive-branch--bottom { right: -12%; bottom: -5%; }
  .page-actions { top: 1rem; right: 1rem; gap: .4rem; }
  .bell-notes__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .bell-notes { padding: .25rem; }
  .bell-note { width: 1.8rem; height: 1.8rem; font-size: .57rem; }
  .bridal-theme { width: 1.8rem; padding: 0; overflow: hidden; color: transparent; font-size: 0; }
  .bridal-theme::after { content: "♫"; color: var(--ivory-light); font: 1rem/1 Georgia, serif; }
  .eyebrow { margin-bottom: clamp(1rem, 2.2vh, 1.5rem); }
  h1 { font-size: clamp(3.25rem, 13vw, 5.4rem); }
  .countdown { grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 35rem); }
  .countdown-card { min-height: clamp(5.8rem, 19vw, 7.2rem); }
  .countdown-value { font-size: clamp(2.4rem, 10vw, 3.5rem); }
}

@media (max-width: 560px) {
  .countdown { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 25rem); }
  .countdown-card:first-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - (2 * clamp(.65rem, 1.8vw, 1.25rem))) / 3);
    min-width: 5.5rem;
  }
}

@media (max-width: 370px), (max-height: 700px) and (max-width: 760px) {
  .page-shell { padding-block: 1.15rem; }
  .monogram { display: none; }
  .eyebrow { margin-bottom: .8rem; font-size: .8rem; }
  h1 { font-size: clamp(2.7rem, 12vw, 3.5rem); }
  .date { margin-top: .65rem; font-size: 1rem; }
  .divider { margin-block: .75rem .35rem; }
  .countdown-heading { margin-bottom: .65rem; font-size: 1.35rem; }
  .countdown { gap: .45rem; }
  .countdown-card { min-height: 4.75rem; padding: .45rem; }
  .countdown-value { font-size: 2.25rem; }
  .countdown-label { padding-top: .65rem; font-size: .58rem; }
  .countdown-label::before { top: .28rem; }
  .botanical-mark { margin-top: .65rem; }
  .coming-soon { margin-top: .2rem; font-size: .92rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
