:root {
  --pink: #ef7f9a;
  --peach: #ffc6a8;
  --cream: #fffaf5;
  --paper: #ffffff;
  --ink: #463038;
  --muted: #816b72;
  --line: rgba(239, 127, 154, 0.22);
  --shadow: 0 22px 60px rgba(189, 96, 119, 0.16);
  --heading: "Playfair Display", "Times New Roman", serif;
  --body: "Cairo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 198, 168, 0.3), transparent 18rem),
    radial-gradient(circle at 86% 28%, rgba(239, 127, 154, 0.18), transparent 20rem),
    linear-gradient(180deg, #fff7fa 0%, #fffaf5 48%, #fff4ec 100%);
  line-height: 1.8;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
[hidden] { display: none !important; }

.soft-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.soft-bg::before,
.soft-bg::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  filter: blur(2px);
  animation: drift 12s ease-in-out infinite;
}
.soft-bg::before { width: 12rem; height: 12rem; right: 7%; top: 18%; }
.soft-bg::after { width: 9rem; height: 9rem; left: 9%; top: 60%; animation-delay: -5s; }

.hero {
  min-height: 100svh;
  padding: 1rem clamp(0.9rem, 4vw, 4rem) 3rem;
}
.nav {
  width: fit-content;
  margin: 0 auto;
  display: flex;
  gap: 0.35rem;
  padding: 0.42rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 32px rgba(189, 96, 119, 0.12);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 1rem;
  z-index: 10;
}
.nav a {
  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}
.nav a:hover { background: #ffe8ef; color: var(--pink); }

.hero-card {
  width: min(1180px, 100%);
  min-height: calc(100svh - 10rem);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(19rem, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding-top: 2rem;
}
.hero-text {
  padding: clamp(1.2rem, 4vw, 3rem);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.kicker, .eyebrow {
  margin: 0 0 0.7rem;
  color: var(--pink);
  font-weight: 800;
}
h1, h2 {
  margin: 0;
  color: var(--ink);
  line-height: 1.08;
}
h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  font-family: var(--heading);
  font-size: clamp(4rem, 10vw, 8.4rem);
}
h1 b {
  width: 3rem;
  height: 3rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--peach));
  color: #fff;
  font-family: var(--body);
  font-size: 1.3rem;
  box-shadow: 0 14px 28px rgba(239, 127, 154, 0.2);
}
h2 {
  font-family: var(--heading);
  font-size: clamp(2rem, 5vw, 3.8rem);
}
.welcome {
  max-width: 42rem;
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
}
.date-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  width: fit-content;
  margin: 1.35rem auto 0;
  padding: 0.68rem 1rem;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(189, 96, 119, 0.1);
}
.date-pill em { color: var(--pink); font-style: normal; font-weight: 800; }
.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.btn {
  min-height: 3.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 220ms ease;
}
.btn.primary {
  background: linear-gradient(135deg, var(--pink), #f5a6b8);
  color: #fff;
  box-shadow: 0 14px 30px rgba(239, 127, 154, 0.22);
}
.btn.quiet {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn:hover { transform: translateY(-2px); }

.photo-bubble {
  position: relative;
  min-height: clamp(29rem, 54vw, 42rem);
  border-radius: 42% 58% 54% 46%;
  padding: 0.75rem;
  background: #fff;
  box-shadow: var(--shadow);
  animation: softMorph 9s ease-in-out infinite;
}
.photo-bubble img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}
.photo-bubble span {
  position: absolute;
  right: -0.5rem;
  bottom: 15%;
  width: 5.2rem;
  height: 5.2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #ffe2ea);
  box-shadow: var(--shadow);
}

.countdown {
  width: min(860px, 100%);
  margin: clamp(1.5rem, 4vw, 3rem) auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.countdown div {
  min-height: 7rem;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 34px rgba(189, 96, 119, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.countdown strong {
  font-family: var(--heading);
  color: var(--pink);
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
}
.countdown span { color: var(--muted); font-weight: 800; }

.section {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3.2rem, 8vw, 6rem) 0;
}
.quote {
  text-align: center;
}
.quote p {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.4rem);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-family: var(--heading);
  font-size: clamp(1.45rem, 4vw, 3.25rem);
}
.details, .notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}
.details article, .notes article, .story, .rsvp, .map {
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
}
.details article, .notes article {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 0.4rem;
  padding: clamp(1.15rem, 2.4vw, 1.45rem);
}
.details h2, .notes h2 {
  font-family: var(--body);
  font-size: 1.18rem;
  margin: 0 0 0.35rem;
}
.details p, .notes p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.story, .rsvp, .map {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 3rem);
  padding: clamp(1.3rem, 4vw, 2.5rem);
}
.story > p, .map p { color: var(--muted); }
.sweet-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.8rem, 2vw, 1.25rem);
}
.gallery-tile {
  min-height: clamp(15rem, 30vw, 22rem);
  border-radius: 32px;
  border: 0.55rem solid #fff;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  transition: transform 260ms ease;
}
.gallery-tile:nth-child(1),
.gallery-tile:nth-child(4) {
  transform: translateY(2rem);
}
.gallery-tile:hover { transform: translateY(-0.35rem); }

.timeline-list {
  display: grid;
  gap: 0.8rem;
}
.timeline-item {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(189, 96, 119, 0.09);
}
.timeline-item time {
  direction: ltr;
  color: var(--pink);
  font-weight: 800;
  text-align: right;
}
.timeline-item strong { color: var(--ink); }

.rsvp { margin-top: clamp(1rem, 3vw, 2.5rem); }
.rsvp-form {
  display: grid;
  gap: 1rem;
}
label {
  display: grid;
  gap: 0.4rem;
  color: var(--ink);
  font-weight: 800;
}
input {
  min-height: 3.25rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  padding: 0.8rem 1rem;
}
input:focus, .btn:focus-visible, .footer-actions button:focus-visible {
  outline: 3px solid rgba(239, 127, 154, 0.22);
  outline-offset: 3px;
}
.map {
  grid-template-columns: 1fr auto;
  margin-top: clamp(1.5rem, 4vw, 3rem);
}

.footer {
  width: min(900px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 4rem;
  text-align: center;
  color: var(--muted);
}
.footer-actions {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1rem;
}
.footer-actions button {
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--pink);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(189, 96, 119, 0.1);
}
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 750ms ease, transform 750ms ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.2rem); }
}
@keyframes softMorph {
  0%, 100% { border-radius: 42% 58% 54% 46%; }
  50% { border-radius: 55% 45% 44% 56%; }
}

@media (max-width: 900px) {
  .hero-card, .story, .rsvp, .map { grid-template-columns: 1fr; }
  .photo-bubble { order: -1; min-height: 30rem; }
  .details, .notes { grid-template-columns: 1fr; }
  .sweet-gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery-tile:nth-child(1),
  .gallery-tile:nth-child(4) { transform: none; }
  .countdown { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .hero { padding-inline: 0.75rem; }
  .nav { width: calc(100% - 1rem); justify-content: center; }
  .nav a { padding-inline: 0.58rem; font-size: 0.82rem; }
  h1 { font-size: clamp(3.7rem, 19vw, 5.4rem); }
  h1 b { width: 2.5rem; height: 2.5rem; font-size: 1rem; }
  .photo-bubble { min-height: 26rem; }
  .sweet-gallery { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .timeline-item { grid-template-columns: 1fr; gap: 0.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
