:root {
  --primary: #d4546a;
  --secondary: #fff7ee;
  --accent: #173f4f;
  --mint: #72b9a6;
  --sun: #f6bd60;
  --ink: #18272f;
  --muted: #66747a;
  --paper: rgba(255, 255, 255, 0.78);
  --line: rgba(23, 63, 79, 0.14);
  --shadow: 0 24px 70px rgba(23, 63, 79, 0.16);
  --heading: "Reem Kufi", "Cairo", sans-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:
    linear-gradient(135deg, rgba(114, 185, 166, 0.13), transparent 28rem),
    linear-gradient(225deg, rgba(246, 189, 96, 0.18), transparent 30rem),
    #fffaf4;
  line-height: 1.75;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
[hidden] { display: none !important; }

.motion-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}
.motion-field span {
  position: absolute;
  width: clamp(4rem, 9vw, 9rem);
  aspect-ratio: 1;
  border: 1px solid rgba(212, 84, 106, 0.22);
  border-radius: 32% 68% 56% 44%;
  background: rgba(255, 255, 255, 0.34);
  animation: floatShape 13s ease-in-out infinite;
}
.motion-field span:nth-child(1) { top: 12%; right: 8%; }
.motion-field span:nth-child(2) { top: 58%; right: 80%; animation-delay: -3s; border-color: rgba(114, 185, 166, 0.28); }
.motion-field span:nth-child(3) { top: 76%; right: 20%; animation-delay: -6s; }
.motion-field span:nth-child(4) { top: 28%; right: 67%; animation-delay: -8s; border-color: rgba(246, 189, 96, 0.3); }
.motion-field span:nth-child(5) { top: 6%; right: 44%; animation-delay: -10s; }

.hero {
  min-height: 100svh;
  padding: 1rem clamp(1rem, 4vw, 4rem) 2.5rem;
  position: relative;
  isolation: isolate;
}
.nav {
  position: sticky;
  top: 1rem;
  z-index: 10;
  width: fit-content;
  margin-inline: auto;
  display: flex;
  gap: 0.4rem;
  padding: 0.42rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(23, 63, 79, 0.1);
}
.nav a {
  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.95rem;
}
.nav a:hover { background: rgba(212, 84, 106, 0.12); }

.hero-grid {
  min-height: calc(100svh - 8rem);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 1.1fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 7rem);
  padding-top: 2rem;
}
.hero-copy { max-width: 43rem; }
.kicker, .eyebrow {
  margin: 0 0 0.65rem;
  color: var(--primary);
  font-weight: 800;
}
h1, h2 {
  margin: 0;
  font-family: var(--heading);
  color: var(--accent);
  line-height: 1.08;
}
h1 {
  display: grid;
  gap: 0.1rem;
  font-size: clamp(4.4rem, 11vw, 9rem);
}
h1 small {
  width: 3.8rem;
  height: 3.8rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  font-size: 1.55rem;
  box-shadow: 0 18px 40px rgba(212, 84, 106, 0.28);
}
h2 { font-size: clamp(2rem, 5vw, 4rem); }
.welcome {
  max-width: 38rem;
  margin: 1.25rem 0 0;
  color: #415159;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}
.btn {
  min-height: 3.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  font-weight: 800;
}
.btn svg, .floating-actions svg, .quick-details svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 18px 40px rgba(212, 84, 106, 0.28);
}
.btn.soft {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 14px 34px rgba(23, 63, 79, 0.11);
}
.btn:hover { transform: translateY(-2px); }

.hero-stage {
  position: relative;
  min-height: clamp(34rem, 58vw, 47rem);
}
.orbit-card {
  position: absolute;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  border: 0.55rem solid rgba(255, 255, 255, 0.88);
  overflow: hidden;
}
.main-photo {
  inset: 5% 10% 11% 10%;
  border-radius: 42% 58% 46% 54%;
  background-image: linear-gradient(rgba(23, 63, 79, 0.1), rgba(212, 84, 106, 0.14)), url("assets/img/4.jpg");
  animation: morph 10s ease-in-out infinite;
}
.small {
  width: 32%;
  aspect-ratio: 1;
  border-radius: 28px;
  animation: hoverCard 5s ease-in-out infinite;
}
.small.one {
  top: 6%;
  right: 3%;
  background-image: url("assets/img/1.jpg");
}
.small.two {
  bottom: 7%;
  left: 2%;
  background-image: url("assets/img/2.jpg");
  animation-delay: -2.5s;
}
.date-badge {
  position: absolute;
  right: 2%;
  bottom: 19%;
  display: grid;
  gap: 0.15rem;
  min-width: 13rem;
  padding: 1rem 1.1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.date-badge strong { color: var(--accent); font-size: 1.2rem; }
.date-badge em { color: var(--primary); font-style: normal; font-weight: 800; }

.countdown-panel {
  width: min(840px, 100%);
  margin: -1rem auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.countdown-panel div {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 8.2rem;
  border-radius: 28px;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 46px rgba(23, 63, 79, 0.11);
  backdrop-filter: blur(18px);
  overflow: hidden;
}
.countdown-panel div::before {
  content: "";
  position: absolute;
  inset: auto 10% -35% 10%;
  height: 70%;
  border-radius: 50%;
  background: rgba(114, 185, 166, 0.18);
  animation: pulse 2s ease-in-out infinite;
}
.countdown-panel strong {
  position: relative;
  font-family: var(--heading);
  color: var(--accent);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1;
}
.countdown-panel span {
  position: relative;
  color: var(--muted);
  font-weight: 700;
}

.section {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 0;
}
.quick-details, .notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}
.quick-details article, .notes article, .rsvp, .map-card, .story-strip, .quote-band {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.quick-details article, .notes article { padding: 1.25rem; }
.quick-details svg {
  width: 2.1rem;
  height: 2.1rem;
  color: var(--primary);
  margin-bottom: 0.6rem;
}
.quick-details h2, .notes h2 {
  font-family: var(--body);
  font-size: 1.22rem;
  margin-bottom: 0.35rem;
}
.quick-details p, .notes p { margin: 0.2rem 0; color: var(--muted); }

.quote-band {
  margin-top: clamp(1rem, 3vw, 2.5rem);
  margin-bottom: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}
.quote-band p {
  margin: 0;
  font-family: var(--heading);
  color: var(--accent);
  font-size: clamp(1.55rem, 4vw, 3.4rem);
}
.story-strip, .rsvp, .map-card {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(1.35rem, 4vw, 3rem);
}
.story-strip {
  margin-top: clamp(1rem, 3vw, 2.5rem);
  margin-bottom: clamp(1rem, 3vw, 2.5rem);
}
.map-card {
  margin-top: clamp(1.5rem, 4vw, 3.5rem);
}
.story-strip > p { color: #415159; font-size: 1.15rem; }
.section-title { margin-bottom: 1.3rem; }

.kinetic-gallery {
  height: clamp(38rem, 66vw, 49rem);
  position: relative;
}
.gallery-card {
  position: absolute;
  border-radius: 30px;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  transition: transform 360ms ease, filter 360ms ease;
}
.gallery-card:hover {
  transform: translateY(-12px) rotate(0deg) scale(1.03) !important;
  filter: saturate(1.08);
  z-index: 9;
}
.gallery-card:nth-child(1) { width: 40%; height: 68%; top: 0; right: 3%; transform: rotate(-4deg); }
.gallery-card:nth-child(2) { width: 31%; height: 42%; top: 7%; left: 5%; transform: rotate(5deg); }
.gallery-card:nth-child(3) { width: 35%; height: 42%; bottom: 0; left: 2%; transform: rotate(-3deg); }
.gallery-card:nth-child(4) { width: 29%; height: 34%; bottom: 7%; right: 44%; transform: rotate(7deg); }

.timeline-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(9rem, 1fr));
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
}
.timeline-item {
  min-height: 10rem;
  display: grid;
  align-content: space-between;
  padding: 1rem;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #266f74);
  box-shadow: 0 18px 42px rgba(23, 63, 79, 0.15);
}
.timeline-item time { direction: ltr; color: var(--sun); font-weight: 800; }
.timeline-item strong { font-size: 1.15rem; }

.rsvp-form {
  display: grid;
  gap: 1rem;
}
label { display: grid; gap: 0.35rem; color: var(--accent); font-weight: 800; }
input {
  min-height: 3.25rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.75rem 1rem;
  background: #fff;
  color: var(--ink);
}
input:focus, .btn:focus-visible, .floating-actions button:focus-visible {
  outline: 3px solid rgba(212, 84, 106, 0.24);
  outline-offset: 3px;
}
.map-card { grid-template-columns: 1fr auto; }

.footer {
  width: min(900px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 7rem;
  text-align: center;
  color: var(--muted);
}
.floating-actions {
  position: fixed;
  z-index: 20;
  right: 50%;
  bottom: 1rem;
  transform: translateX(50%);
  display: flex;
  gap: 0.55rem;
  padding: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(23, 63, 79, 0.16);
}
.floating-actions button {
  width: 3rem;
  height: 3rem;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
}

.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 800ms ease, transform 800ms ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0) scale(1); }

@keyframes floatShape {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(1.2rem, -1.6rem, 0) rotate(18deg); }
}
@keyframes morph {
  0%, 100% { border-radius: 42% 58% 46% 54%; transform: translateY(0); }
  50% { border-radius: 56% 44% 58% 42%; transform: translateY(-0.9rem); }
}
@keyframes hoverCard {
  0%, 100% { transform: translateY(0) rotate(4deg); }
  50% { transform: translateY(-0.8rem) rotate(-2deg); }
}
@keyframes pulse {
  0%, 100% { transform: scaleX(0.86); opacity: 0.5; }
  50% { transform: scaleX(1.08); opacity: 0.85; }
}

@media (max-width: 900px) {
  .hero-grid, .story-strip, .rsvp, .map-card { grid-template-columns: 1fr; }
  .hero-stage { min-height: 33rem; order: -1; }
  .quick-details, .notes { grid-template-columns: 1fr; }
  .countdown-panel { grid-template-columns: repeat(2, 1fr); margin-top: 1rem; }
  .timeline-track { grid-template-columns: repeat(5, 11rem); }
}

@media (max-width: 560px) {
  .nav { width: calc(100% - 1rem); justify-content: center; }
  .nav a { padding-inline: 0.62rem; font-size: 0.84rem; }
  .hero { padding-inline: 0.75rem; }
  h1 { font-size: clamp(3.8rem, 21vw, 5.4rem); }
  h1 small { width: 3rem; height: 3rem; font-size: 1.2rem; }
  .hero-stage { min-height: 28rem; }
  .date-badge { right: 0; bottom: 12%; }
  .countdown-panel div { min-height: 7.1rem; border-radius: 22px; }
  .btn { width: 100%; }
  .kinetic-gallery { height: 33rem; }
  .gallery-card:nth-child(1) { width: 66%; right: 0; }
  .gallery-card:nth-child(2) { width: 48%; left: 0; }
  .gallery-card:nth-child(3) { width: 52%; left: 0; }
  .gallery-card:nth-child(4) { width: 48%; right: 28%; }
}

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