:root {
  /* colours taken from the printed invitation cards */
  --cream-50:  #f7f1eb;
  --cream-100: #f1e8df;
  --cream-200: #e8dbcf;
  --cream-300: #dccbbb;
  --sand-500:  #8e7f74;
  --ink:       #262122;
  --ink-soft:  #5c5352;

  --lav-100: #ecebf5;
  --lav-200: #d7d5ea;
  --lav-300: #b9b6db;
  --lav-400: #9692c6;
  --lav-500: #7a75b2;
  --lav-600: #625d9a;
  --lav-700: #4c4880;
  --sage:    #8e9a72;

  --font-script: "Great Vibes", "Brush Script MT", cursive;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream-50);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
}

a { color: var(--lav-600); }

/* ================= HERO ================= */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
}

.sky {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 50% 85%, rgba(252, 248, 243, .95) 0%, rgba(252, 248, 243, 0) 55%),
    linear-gradient(180deg, #ebe8f0 0%, #f4eee8 38%, #f1e6dc 76%, #f6efe8 100%);
}

.sun {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(42vw, 360px);
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 252, 248, .95) 0%, rgba(246, 234, 222, .6) 45%, rgba(246, 234, 222, 0) 70%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 16vh 1.5rem 0;
  text-align: center;
  will-change: transform, opacity;
}

.eyebrow {
  margin: 0;
  font-size: clamp(.95rem, 2vw, 1.15rem);
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--lav-600);
}

.names {
  margin: .15em 0 .1em;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(3.2rem, 11vw, 7.5rem);
  line-height: 1.05;
  color: var(--ink);
  text-shadow: 0 2px 24px rgba(255, 255, 255, .6);
}

.names .amp { color: var(--lav-500); }

.hero-date {
  margin: 0;
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  letter-spacing: .12em;
  color: var(--ink-soft);
}

.scroll-cue {
  display: inline-block;
  margin-top: 2.2rem;
  width: 28px;
  height: 46px;
  border: 2px solid var(--lav-500);
  border-radius: 16px;
  position: relative;
}

.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 9px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--lav-500);
  animation: cue 1.8s ease-in-out infinite;
}

@keyframes cue {
  0%   { transform: translateY(0);    opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0);    opacity: 0; }
}

/* ---------- Skyline layers ---------- */

.skyline {
  position: absolute;
  inset: auto 0 0 0;
  height: 62%;
  z-index: 1;
  pointer-events: none;
}

.layer {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
}

.layer-far  { color: #e6dcd3; height: 88%; bottom: 9%; }
.layer-mid  { color: #d3c4b7; height: 92%; bottom: 4%; }
.layer-near { color: #a8988c; }
.layer-flowers { height: 46%; bottom: -3%; }

.layer-mid .cut { fill: #f7f1eb; opacity: .6; }

.layer-near .waves path { stroke: var(--lav-300); stroke-width: 2.5; }
.layer-near .waves path + path { stroke: var(--lav-400); stroke-width: 2; }

/* Gentle breeze for the lavender field */
.layer-flowers .sway {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: sway 5s ease-in-out infinite alternate;
}

@keyframes sway {
  from { rotate: -2.5deg; }
  to   { rotate: 2.5deg; }
}

/* Soft fade from hero into the content */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 6vh;
  z-index: 3;
  background: linear-gradient(to bottom, rgba(247, 241, 235, 0), var(--cream-50));
  pointer-events: none;
}

/* ================= SECTIONS ================= */

.section {
  padding: 6rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-alt {
  max-width: none;
  background:
    radial-gradient(circle at 12% 20%, rgba(185, 182, 219, .18), transparent 40%),
    radial-gradient(circle at 88% 80%, rgba(232, 219, 207, .8), transparent 40%),
    var(--cream-100);
}

.section-head {
  text-align: center;
  margin-bottom: 3rem;
}

.ornament {
  width: 76px;
  height: 100px;
  display: block;
  margin: 0 auto .5rem;
}

h2 {
  margin: 0;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.8rem, 6vw, 4rem);
  color: var(--lav-600);
}

.lead {
  margin: .5rem auto 0;
  max-width: 34rem;
  font-style: italic;
  color: var(--ink-soft);
}

/* ---------- Countdown ---------- */

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(.75rem, 3vw, 2rem);
  margin-bottom: 3.5rem;
}

.countdown div {
  min-width: 82px;
  padding: .8rem .6rem;
  text-align: center;
  border-radius: 14px;
  background: #fbf8f4;
  border: 1px solid var(--cream-200);
  box-shadow: 0 6px 20px rgba(90, 70, 60, .08);
}

.countdown span {
  display: block;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--lav-600);
  font-variant-numeric: lining-nums tabular-nums;
}

.countdown small {
  font-size: .8rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--sand-500);
}

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.25rem 1.75rem 2rem;
  text-align: center;
  background: #fbf8f4;
  border: 1px solid var(--cream-200);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(90, 70, 60, .08);
  transition: transform .3s ease, box-shadow .3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(90, 70, 60, .14);
}

.card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lav-100);
}

.card-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--lav-600);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin: 0 0 .4rem;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--lav-500);
}

.card p { margin: .2rem 0; }

.card p:last-of-type { margin-bottom: 1.1rem; }

.card .note {
  margin-top: .6rem;
  font-size: 1rem;
  font-style: italic;
  color: var(--ink-soft);
}

.card .big {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--ink);
}

.btn {
  display: inline-block;
  margin-top: auto;
  padding: .5rem 1.4rem;
  font-size: 1rem;
  letter-spacing: .08em;
  text-decoration: none;
  color: #fff;
  background: var(--lav-500);
  border-radius: 999px;
  transition: background .2s ease;
}

.btn:hover,
.btn:focus-visible { background: var(--lav-700); }

/* ---------- Info box ---------- */

.info-box {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: rgba(251, 248, 244, .9);
  border: 1px solid var(--cream-300);
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(90, 70, 60, .1);
  backdrop-filter: blur(4px);
}

.info-box::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed var(--lav-200);
  border-radius: 18px;
  pointer-events: none;
}

.info-sprig {
  position: absolute;
  width: 46px;
  height: 230px;
  top: -40px;
  pointer-events: none;
}

.info-sprig-left  { left: -14px;  rotate: -18deg; }
.info-sprig-right { right: -14px; rotate: 18deg; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.75rem 2.5rem;
  margin: 0;
}

.info-grid dt {
  margin-bottom: .2rem;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--lav-500);
}

.info-grid dd { margin: 0; }

/* ================= FOOTER ================= */

.footer {
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  color: var(--ink-soft);
  background: linear-gradient(180deg, var(--cream-100), var(--cream-200));
  border-top: 1px solid var(--cream-300);
}

.footer p { margin: .2rem 0; }

.footer-names {
  font-family: var(--font-script);
  font-size: 2.6rem;
  color: var(--lav-600);
}

.back-top {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--lav-500);
  text-decoration: none;
  letter-spacing: .1em;
}

.back-top:hover { color: var(--lav-700); }

/* ================= Reveal on scroll ================= */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s ease, transform .9s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.cards .reveal:nth-child(2) { transition-delay: .12s; }
.cards .reveal:nth-child(3) { transition-delay: .24s; }
.cards .reveal:nth-child(4) { transition-delay: .36s; }

@media (max-width: 600px) {
  .hero-content { padding-top: 13vh; }
  .skyline { height: 52%; }
  .countdown div { min-width: 64px; padding: .6rem .3rem; }
  .info-sprig { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue span,
  .layer-flowers .sway { animation: none; }
}
