/* Palette from invitation art: paper, rose-gold line, charcoal type */
:root {
  --bg-cream: #f5f2f0;
  --gold-mid: #a68966;
  --gold-light: #c4a080;
  --gold-deep: #8f7352;
  --text-charcoal: #4a4a4a;
  --text-muted: #5c5c5c;
}

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

html {
  font-size: 112.5%;
}

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

body {
  font-family: "Jost", system-ui, sans-serif;
  background: var(--bg-cream);
  color: var(--text-charcoal);
  -webkit-font-smoothing: antialiased;
}

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  opacity: 0;
  animation: pageFade 1.4s ease forwards;
}

@keyframes pageFade {
  to {
    opacity: 1;
  }
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.35;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.florals {
  position: fixed;
  z-index: 0;
  top: 0;
  right: 0;
  height: 100vh;
  height: 100dvh;
  width: auto;
  max-width: min(46vw, 22rem);
  min-width: 9rem;
  opacity: 0;
  pointer-events: none;
}

@keyframes floralsFade {
  to {
    opacity: 1;
  }
}

@keyframes floralsGlint {
  0%,
  100% {
    filter: drop-shadow(0 0 20px rgba(166, 139, 103, 0.15)) brightness(1);
  }
  50% {
    filter: drop-shadow(0 0 30px rgba(197, 179, 152, 0.32)) brightness(1.06);
  }
}

.florals.florals--right {
  animation:
    floralsFade 1.2s ease 0.3s forwards,
    floralsGlint 7s ease-in-out infinite 2.2s;
}

.floral-path {
  stroke-dasharray: var(--path-len, 800);
  stroke-dashoffset: var(--path-len, 800);
  animation: drawStroke 2.1s ease forwards;
}

@keyframes drawStroke {
  to {
    stroke-dashoffset: 0;
  }
}

.shimmer-target {
  position: relative;
  background: linear-gradient(
    110deg,
    var(--gold-deep) 0%,
    var(--gold-mid) 25%,
    var(--gold-light) 45%,
    var(--gold-mid) 55%,
    var(--gold-deep) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: goldShimmer 4s ease-in-out infinite;
}

.line--script.shimmer-target {
  background: linear-gradient(
    105deg,
    var(--gold-deep) 0%,
    var(--gold-mid) 30%,
    var(--gold-light) 50%,
    var(--gold-mid) 70%,
    var(--gold-deep) 100%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  animation:
    lineRevealScript 1.15s cubic-bezier(0.2, 0.9, 0.2, 1) forwards,
    goldShimmer 4s ease-in-out infinite 1.1s;
}

@keyframes goldShimmer {
  0%,
  100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

.content {
  position: relative;
  z-index: 2;
  isolation: isolate;
  max-width: 34rem;
  padding: clamp(2.5rem, 8vw, 4.5rem) clamp(1.5rem, 6vw, 3rem);
  padding-right: min(36vw, 11rem);
}

.line {
  margin: 0;
  opacity: 0;
  transform: translateY(20px);
  filter: blur(8px);
  animation: lineIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes lineIn {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes lineRevealScript {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.88) rotate(-1deg);
    filter: blur(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
    filter: blur(0);
  }
}

@keyframes lineRevealHeading {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
    letter-spacing: 0.32em;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    letter-spacing: 0.18em;
  }
}

@keyframes lineRevealHeadingTight {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
    letter-spacing: 0.22em;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    letter-spacing: 0.12em;
  }
}

@keyframes lineRevealNames {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.94);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes lineRevealSub {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.details .line--detail {
  animation: lineRevealDetail 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes lineRevealDetail {
  from {
    opacity: 0;
    transform: translateX(-18px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

.line--script {
  font-family: "Great Vibes", cursive;
  font-size: clamp(3.1rem, 11vw, 4.6rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.line--heading {
  font-family: "Cinzel", serif;
  font-size: clamp(0.88rem, 2.55vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.55;
  animation: lineRevealHeading 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.line--heading + .line--heading {
  margin-top: 0.2rem;
}

.line--heading.shimmer-target {
  animation:
    lineRevealHeading 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    goldShimmer 4s ease-in-out infinite 1.05s;
}

.line--heading.line--heading--tight {
  animation: lineRevealHeadingTight 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.line--heading.line--heading--tight.shimmer-target {
  animation:
    lineRevealHeadingTight 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    goldShimmer 4s ease-in-out infinite 1.05s;
}

.line--heading .shimmer-target {
  margin-right: 0.25em;
}

.line--heading--tight {
  max-width: 26rem;
  letter-spacing: 0.12em;
  line-height: 1.5;
  font-size: clamp(0.78rem, 2.35vw, 0.95rem);
}

.line--sub {
  font-family: "Jost", sans-serif;
  font-size: clamp(0.75rem, 2.15vw, 0.88rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  margin-top: 1.75rem;
  margin-bottom: 0.35rem;
  animation: lineRevealSub 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.line--sub--invite {
  letter-spacing: 0.06em;
  text-transform: none;
  font-weight: 400;
  font-size: clamp(0.82rem, 2.15vw, 0.98rem);
}

.line--names {
  font-family: "Cinzel", serif;
  font-size: clamp(1.15rem, 3.75vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.35;
  animation: lineRevealNames 1.1s cubic-bezier(0.25, 1, 0.3, 1) forwards;
}

.line--names.shimmer-target {
  animation:
    lineRevealNames 1.1s cubic-bezier(0.25, 1, 0.3, 1) forwards,
    goldShimmer 4s ease-in-out infinite 1.1s;
}

.line--names--couple {
  font-size: clamp(1.45rem, 5vw, 1.9rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: none;
  line-height: 1.25;
  margin-top: 0.35rem;
}

.line--event {
  font-size: clamp(0.98rem, 3.25vw, 1.22rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  margin-top: 0.2rem;
}

.details {
  margin-top: 2rem;
}

.details .line--detail {
  font-family: "Jost", sans-serif;
  font-size: clamp(0.8rem, 2.35vw, 0.92rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.detail-text {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.45;
  padding-top: 0.08em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.line--detail--map {
  align-items: stretch;
}

.line--detail--map .detail-link {
  flex: 1 1 auto;
  min-width: 0;
}

.detail-ico {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  height: 1.15em;
  color: inherit;
}

.detail-ico svg {
  width: 100%;
  height: 100%;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-ico svg :is(path, rect, circle, line) {
  stroke: currentColor;
  stroke-width: 1.35;
  fill: none;
}

.detail-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
  letter-spacing: inherit;
  font: inherit;
  padding: 0.4rem 0;
  margin: -0.4rem 0;
  border-radius: 2px;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: rgba(166, 137, 102, 0.25);
  touch-action: manipulation;
  cursor: pointer;
}

.detail-link:hover {
  color: var(--gold-mid);
}

.detail-link:active {
  color: var(--gold-deep);
}

.detail-link:focus-visible {
  outline: 2px solid var(--gold-mid);
  outline-offset: 3px;
  color: var(--gold-mid);
}

.emoji-pulse {
  display: inline-block;
  animation: emojiPulse 2.4s ease-in-out infinite;
}

.emoji-pulse--2 {
  animation-delay: 0.5s;
}

@keyframes emojiPulse {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.08);
    filter: brightness(1.15);
  }
}

.actions {
  margin-top: 2.5rem;
  padding-bottom: clamp(1.5rem, 5vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(22px);
  filter: blur(6px);
  animation: actionsIn 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes actionsIn {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.btn {
  font-family: "Jost", system-ui, sans-serif;
  font-size: clamp(0.72rem, 1.85vw, 0.86rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.95rem 1.4rem;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid var(--gold-mid);
  background: transparent;
  color: var(--text-charcoal);
  transition:
    background 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.2s ease;
}

.btn:hover {
  border-color: var(--gold-deep);
  box-shadow: 0 6px 24px rgba(166, 139, 103, 0.22);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid var(--gold-mid);
  outline-offset: 3px;
}

.btn--primary {
  background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold-mid) 45%, var(--gold-light) 100%);
  color: #fdfcfa;
  border-color: var(--gold-deep);
}

.btn--primary:hover {
  background: linear-gradient(135deg, #7a6548 0%, var(--gold-mid) 50%, var(--gold-light) 100%);
  color: #fff;
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.55);
}

@media (max-width: 520px) {
  html {
    font-size: 106%;
  }

  /* Shared width so copy stays left of fixed florals (siblings under .page) */
  .page {
    --floral-w: min(40vw, 10.5rem);
  }

  .content {
    padding-right: max(1rem, calc(var(--floral-w) + 0.85rem));
    max-width: 100%;
    box-sizing: border-box;
  }

  .florals {
    max-width: var(--floral-w);
    min-width: 7rem;
    opacity: 1;
  }

  .details .line--detail {
    letter-spacing: 0.12em;
    margin-bottom: 0.85rem;
  }

  .detail-ico {
    width: 1.35em;
    height: 1.35em;
    margin-top: 0.06em;
  }

  .detail-ico svg :is(path, rect, circle, line) {
    stroke-width: 1.6;
  }

  .detail-link {
    align-items: center;
    min-height: 2.75rem;
    padding: 0.5rem 0;
    margin: -0.5rem 0;
  }

  .detail-link .detail-text {
    padding-top: 0;
  }
}
