@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=DM+Sans:wght@400;500;600&display=swap");
:root {
  --navy: #082e45;
  --blue: #1e5369;
  --ink: #153e50;
  --muted: #59727a;
  --paper: #f4f7f5;
  --line: #ccdbde;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 30px;
  background: #062638;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0 auto;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  position: relative;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 0 90px #0003;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

button,
a.button,
summary {
  touch-action: manipulation;
}

button {
  font: inherit;
  cursor: pointer;
}

a {
  color: inherit;
}

button,
a,
summary {
  outline-offset: 6px;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid #379db9;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h2 {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.13;
  letter-spacing: -1px;
}

h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 33px;
  line-height: 1.2;
}

.skip {
  position: absolute;
  left: 16px;
  top: -90px;
  background: white;
  padding: 12px;
  z-index: 20;
}

.skip:focus {
  top: 12px;
}

.topbar {
  position: absolute;
  z-index: 5;
  width: 100%;
  padding: max(16px, env(safe-area-inset-top)) 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #deedef;
}

.monogram {
  font: 25px var(--serif);
  letter-spacing: -2px;
  text-decoration: none;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
}

.monogram span {
  font-size: 13px;
  margin-left: 6px;
  color: #9bc3d4;
}

.motion-toggle {
  border: 1px solid #a4cad02e;
  background: #ffffff08;
  border-radius: 30px;
  color: #cce2e8;
  padding: 10px 15px;
  font-size: 11px;
  letter-spacing: 0.3px;
  min-height: 44px;
}

.motion-toggle span {
  margin-left: 8px;
}

.hero {
  position: relative;
  min-height: max(720px, 100svh);
  background:
    radial-gradient(ellipse at 18% 20%, #22617666, transparent 48%),
    radial-gradient(ellipse at 92% 85%, #276c8177, transparent 45%),
    linear-gradient(145deg, #0b354b, #062a40 58%, #12445b);
  color: #edf6f5;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 24px 150px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.7px;
  line-height: 1.8;
}

.light {
  color: #b5d2dc;
  letter-spacing: 2px;
  font-size: 9px;
  max-width: 290px;
  margin: auto;
}

.age {
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 400;
  margin: 30px 0 0;
  margin-top: 30px;
}

.age span + span {
  font-style: italic;
}

.hero h1 {
  font: italic 500 clamp(65px, 9vw, 124px)/1.1 var(--serif);
  letter-spacing: -2.7px;
  margin: 8px auto 18px;
  font-size: clamp(62px, 18vw, 82px);
  max-width: 100%;
  line-height: 1.06;
  overflow-wrap: break-word;
}

.tiny-rule {
  display: flex;
  gap: 19px;
  align-items: center;
  justify-content: center;
  color: #a3c8d4;
  font-size: 22px;
}

.tiny-rule span {
  width: 58px;
  height: 1px;
  background: #b6d6dc55;
}

.hero-date {
  font-size: 13px;
  letter-spacing: 2.5px;
  margin: 18px 0 3px;
}

.hero-time {
  font-size: 14px;
  color: #b9d1d8;
  letter-spacing: 1px;
}

.hero-quote {
  max-width: 300px;
  margin: 27px auto 0;
  font: italic 21px/1.5 var(--serif);
  color: #cedfe4;
  font-size: 22px;
  margin-top: 24px;
}

.scroll-cue {
  position: absolute;
  bottom: 79px;
  z-index: 3;
  font-size: 10px;
  letter-spacing: 1.2px;
  color: #c2dae0;
  text-decoration: none;
  display: grid;
  gap: 8px;
}

.scroll-cue span {
  font-size: 21px;
  animation: float 3s ease-in-out infinite;
}

.waves {
  width: 100%;
  height: 90px;
  position: absolute;
  bottom: -1px;
  left: 0;
}

/* Only transforms and opacity animate: no canvas, video or rendering loop. */
.ocean-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  contain: paint;
}

.ocean-glow {
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(ellipse at 44% 0%, #76d2db55, transparent 57%),
    radial-gradient(ellipse at 90% 90%, #277fa855, transparent 50%);
  animation: ocean-breath 13s ease-in-out infinite alternate;
}

.ocean-rays {
  position: absolute;
  inset: -15% -35% -30%;
  transform-origin: 50% 0;
  background: repeating-conic-gradient(
    from 145deg at 50% -8%,
    transparent 0deg 7deg,
    #b4eef21f 9deg,
    transparent 12deg 19deg,
    #88d9e312 21deg,
    transparent 25deg 32deg
  );
  -webkit-mask-image: linear-gradient(#000b, #0008 40%, transparent 90%);
  mask-image: linear-gradient(#000b, #0008 40%, transparent 90%);
  animation: ray-sway 17s ease-in-out infinite alternate;
}

.water-reflections {
  position: absolute;
  inset: -30% -20% 35%;
  background:
    repeating-radial-gradient(
      ellipse at 32% 40%,
      transparent 0 43px,
      #b5f0ee20 46px,
      transparent 50px 96px
    ),
    repeating-radial-gradient(
      ellipse at 70% 60%,
      transparent 0 60px,
      #92e3e918 64px,
      transparent 68px 120px
    );
  -webkit-mask-image: linear-gradient(#0008, transparent 90%);
  mask-image: linear-gradient(#0008, transparent 90%);
  transform-origin: center top;
  animation: water-drift 19s ease-in-out infinite alternate;
}

.bubbles {
  position: absolute;
  inset: 0;
}

.bubbles i {
  --drift: 25px;
  position: absolute;
  bottom: -25px;
  left: 8%;
  width: 7px;
  height: 7px;
  border: 1px solid #bbe6ec66;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #edffff66, transparent 55%);
  opacity: 0;
  animation: bubble-rise 19s linear infinite;
}

.bubbles i:nth-child(2) {
  left: 20%;
  width: 4px;
  height: 4px;
  animation-duration: 24s;
  animation-delay: -14s;
}

.bubbles i:nth-child(3) {
  left: 85%;
  width: 9px;
  height: 9px;
  animation-duration: 22s;
  animation-delay: -6s;
  --drift: -26px;
}

.bubbles i:nth-child(4) {
  left: 93%;
  width: 5px;
  height: 5px;
  animation-duration: 17s;
  animation-delay: -11s;
}

.bubbles i:nth-child(5) {
  left: 12%;
  width: 11px;
  height: 11px;
  animation-duration: 27s;
  animation-delay: -20s;
  --drift: -18px;
}

.bubbles i:nth-child(6) {
  left: 74%;
  width: 3px;
  height: 3px;
  animation-duration: 20s;
  animation-delay: -15s;
}

.bubbles i:nth-child(7) {
  left: 32%;
  width: 4px;
  height: 4px;
  animation-duration: 25s;
  animation-delay: -7s;
}

.bubbles i:nth-child(8) {
  left: 65%;
  width: 5px;
  height: 5px;
  animation-duration: 23s;
  animation-delay: -18s;
  --drift: -22px;
}

.waves {
  width: 110%;
  left: -5%;
  animation: wave-drift 11s ease-in-out infinite alternate;
  height: 63px;
}

.sparkles i {
  animation: shimmer 7s ease-in-out infinite alternate;
}

.sparkles i:nth-child(even) {
  animation-delay: -4s;
}

.hero.motion-paused *,
.hero.motion-paused *::before,
.hero.motion-paused *::after {
  animation-play-state: paused !important;
}

@keyframes ocean-breath {
  from {
    transform: scale(1);
    opacity: 0.6;
  }
  to {
    transform: scale(1.08) translate3d(2%, 1%, 0);
    opacity: 1;
  }
}

@keyframes ray-sway {
  from {
    transform: rotate(-7deg) scaleX(0.95);
    opacity: 0.5;
  }
  to {
    transform: rotate(7deg) scaleX(1.08);
    opacity: 1;
  }
}

@keyframes water-drift {
  from {
    transform: perspective(500px) rotateX(35deg) rotate(-9deg) scale(1);
    opacity: 0.35;
  }
  to {
    transform: perspective(500px) rotateX(40deg) rotate(7deg) scale(1.14);
    opacity: 0.8;
  }
}

@keyframes bubble-rise {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0;
  }
  12% {
    opacity: 0.55;
  }
  80% {
    opacity: 0.3;
  }
  100% {
    transform: translate3d(var(--drift), -105vh, 0);
    opacity: 0;
  }
}

@keyframes wave-drift {
  from {
    transform: translate3d(-2%, 3px, 0);
  }
  to {
    transform: translate3d(2%, -3px, 0);
  }
}

@keyframes shimmer {
  from {
    opacity: 0.18;
  }
  to {
    opacity: 0.65;
  }
}

.orbit {
  position: absolute;
  width: 760px;
  height: 860px;
  border: 1px solid #9cd1dc12;
  border-radius: 44% 56% 54% 46%;
  transform: rotate(-35deg);
  pointer-events: none;
}

.orbit-one {
  left: -550px;
  top: 40px;
}

.orbit-two {
  right: -540px;
  bottom: -250px;
  border-width: 30px;
  border-color: #9cd1dc04;
}

.sparkles i {
  position: absolute;
  font-style: normal;
  color: #b8e5eb;
  opacity: 0.65;
}

.sparkles i:nth-child(1) {
  top: 26%;
  left: 12%;
  font-size: 19px;
}

.sparkles i:nth-child(2) {
  top: 39%;
  right: 17%;
  font-size: 28px;
}

.sparkles i:nth-child(3) {
  bottom: 25%;
  right: 12%;
  font-size: 10px;
}

.sparkles i:nth-child(4) {
  bottom: 30%;
  left: 15%;
  font-size: 24px;
}

.sparkles i:nth-child(5) {
  top: 19%;
  right: 32%;
  font-size: 10px;
}

.section {
  max-width: 1020px;
  margin: 0 auto;
  padding: 48px 24px;
  width: 100%;
}

.section .eyebrow {
  margin-bottom: 14px;
}

.section-intro {
  color: var(--muted);
  margin-top: 13px;
  font-size: 14px;
}

.countdown {
  text-align: center;
  padding-top: 32px;
  padding-bottom: 42px;
}

.countdown h2 {
  font-style: italic;
}

.timer {
  display: grid;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 30px auto 0;
  margin-top: 26px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
}

.timer div {
  min-width: 0;
  display: grid;
}

.timer strong {
  font: 400 54px/1.2 var(--serif);
  font-variant-numeric: tabular-nums;
  font-size: clamp(38px, 11vw, 50px);
}

.timer span {
  font-size: 10px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  margin-top: 8px;
  color: var(--muted);
}

.timer b {
  font: 24px var(--serif);
  color: #9fb7be;
  margin-top: -20px;
  font-size: 19px;
  display: none;
}

.story {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  align-items: center;
  border-top: 1px solid var(--line);
  margin: 0 24px;
  padding: 44px 0;
  width: auto;
}

.portrait {
  position: relative;
  width: 80%;
  aspect-ratio: 4/4.5;
  border-radius: 48% 48% 8px 8px;
  background: #c8dce1;
  padding: 10px;
  outline: 1px solid #b8ced5;
  outline-offset: 8px;
  overflow: hidden;
  max-width: 310px;
  justify-self: center;
}

.portrait-art {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  background: radial-gradient(ellipse at 30% 15%, #a1c8d4, #376b80 90%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #e6eff0;
}

.art-star {
  font-size: 32px;
  margin-bottom: 10px;
}

.art-number {
  font: italic 120px/1 var(--serif);
  letter-spacing: -8px;
}

.art-word {
  font: italic 22px var(--serif);
  margin-top: 12px;
}

.portrait-art svg {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 38%;
}

.photo-note {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #244c5d;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.story-copy h2 {
  margin-bottom: 22px;
  font-size: 37px;
}

.story-copy > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 14px;
}

.signature {
  display: block;
  font: italic 34px var(--serif);
  margin-top: 25px;
  font-size: 31px;
}

.little-star {
  display: block;
  font-size: 30px;
  color: #6e9ca9;
  margin-top: 20px;
}

.occasion {
  text-align: center;
  padding-top: 24px;
}

.venue-card {
  margin-top: 26px;
  background: white;
  border: 1px solid #dce6e8;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr;
  text-align: left;
  overflow: hidden;
}

.venue-art {
  background:
    radial-gradient(ellipse at bottom left, #8eb7c633, transparent), #e7eff0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  color: #5a8592;
  position: relative;
  min-height: 145px;
}

.venue-art svg {
  width: 46px;
  height: 46px;
}

.venue-art span {
  font: italic 25px var(--serif);
  font-size: 22px;
}

.venue-info {
  padding: 24px 20px;
  text-align: center;
}

.venue-info .eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
}

.venue-info h3 {
  margin-bottom: 13px;
  font-size: 31px;
}

.venue-info > p:not(.eyebrow) {
  font-size: 14px;
  color: var(--muted);
}

.pending {
  margin: 13px 0 20px;
  font-size: 12px !important;
  max-width: 310px;
  line-height: 1.6;
}

.button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 15px 20px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition:
    background 0.2s,
    transform 0.2s;
  width: 100%;
}

.button:hover {
  transform: translateY(-2px);
}

.button span {
  font-size: 17px;
  line-height: 1;
}

.primary {
  background: var(--navy);
  color: #f1f7f7;
}

.primary:hover {
  background: #205870;
}

.rsvp {
  text-align: center;
  padding-top: 20px;
}

.line-heart {
  display: block;
  font: 42px var(--serif);
  margin-bottom: 17px;
  color: #6b929f;
}

.rsvp .button {
  margin-top: 25px;
  min-width: 0;
}

.small-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 13px;
}

.gifts {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
  padding-top: 50px;
  padding-bottom: 85px;
  margin: 0 24px;
  padding: 36px 0 48px;
  text-align: center;
  width: auto;
}

.gifts h2 {
  font-size: 34px;
}

.gifts > div > p:last-child {
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
}

details {
  border: 1px solid #cbdcdf;
  background: #edf3f3;
  border-radius: 5px;
  margin-top: 14px;
}

summary {
  list-style: none;
  cursor: pointer;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  min-height: 60px;
  gap: 10px;
}

summary::-webkit-details-marker {
  display: none;
}

summary > span {
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

details[open] summary > span {
  transform: rotate(45deg);
}

.gift-content {
  border-top: 1px solid #cbdcdf;
  padding: 18px;
  font-size: 14px;
  text-align: left;
}

.gift-content > p {
  color: var(--muted);
}

.gift-content ul {
  list-style: none;
  padding: 0;
  margin: 15px 0;
}

.gift-content li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #d7e4e5;
  gap: 15px;
}

.gift-content li span {
  color: var(--muted);
}

.gift-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.gift-tags span {
  border: 1px solid #b7cfd5;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
}

.footer {
  text-align: center;
  padding: 43px 24px max(28px, env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 95% 100%, #23566a, #082e45 75%);
  color: #e4eff0;
  position: relative;
  padding-top: 43px;
}

.footer-star {
  display: block;
  color: #9fc6ce;
  font-size: 28px;
  margin-bottom: 16px;
}

.footer h2 {
  font-size: 38px;
  font-style: italic;
}

.footer .signature {
  font-size: 41px;
  margin-top: 20px;
}

.footer-date {
  font-size: 12px;
  letter-spacing: 1px;
  color: #b4cfd6;
  margin-top: 12px;
}

.footer-date > span:nth-child(2) {
  margin: 0 10px;
}

.footer-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 29px;
  flex-direction: column;
  max-width: none;
  margin: 26px auto 0;
}

.pale {
  background: #e1eef0;
  color: var(--navy);
}

.outline {
  border-color: #8cb4c166;
  background: transparent;
  color: #e1eef0;
}

.made-with {
  font-size: 9px;
  letter-spacing: 1.2px;
  margin-top: 43px;
  color: #9abac5;
}

.toast {
  position: fixed;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  padding: 16px 22px;
  border: 1px solid #c2d7dc;
  background: #fff;
  color: var(--navy);
  box-shadow: 0 8px 40px #082e4526;
  border-radius: 8px;
  font-size: 14px;
  width: calc(100% - 32px);
  max-width: 448px;
  z-index: 10;
  transition:
    opacity 0.2s,
    transform 0.2s;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.rsvp-dialog {
  width: min(560px, calc(100% - 28px));
  max-height: min(760px, calc(100dvh - 28px));
  border: 0;
  border-radius: 14px;
  padding: 0;
  color: var(--navy);
  background: #f8fbfa;
  box-shadow: 0 24px 90px #021d2c66;
}

.rsvp-dialog::backdrop {
  background: #031e2dbf;
  backdrop-filter: blur(4px);
}

.rsvp-form {
  position: relative;
  padding: 36px 28px 30px;
}

.rsvp-form h2 {
  font-size: 36px;
  margin-bottom: 8px;
}

.dialog-intro {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #e5eff0;
  color: var(--navy);
  font-size: 27px;
  line-height: 1;
}

.form-field {
  display: grid;
  gap: 7px;
  margin: 15px 0;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}

.form-field small {
  color: var(--muted);
  font-weight: 400;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid #bdd0d4;
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  padding: 12px;
  font: 16px/1.4 var(--sans);
}

.form-field input {
  min-height: 48px;
}

.form-field textarea {
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 3px solid #8bb9c552;
  border-color: #608f9c;
}

.form-field.compact input {
  max-width: 120px;
}

.status-options {
  border: 0;
  padding: 0;
  margin: 20px 0 15px;
  text-align: left;
}

.status-options legend {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 9px;
}

.status-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  margin-top: 7px;
  border: 1px solid #cbdadc;
  border-radius: 7px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}

.status-options input {
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
}

.attendance-details.disabled {
  display: none;
}

.website-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error {
  min-height: 20px;
  margin: 8px 0;
  color: #9d303c;
  font-size: 13px;
}

.submit-rsvp:disabled {
  opacity: 0.65;
  cursor: wait;
}

@media (max-width: 480px) {
  .rsvp-form {
    padding: 32px 20px 24px;
  }
  .rsvp-form h2 {
    font-size: 31px;
    padding-right: 34px;
  }
}

.noscript {
  padding: 25px;
  position: fixed;
  bottom: 0;
  background: white;
  z-index: 9;
}

.reveal.ready {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s,
    transform 0.7s;
}

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

@keyframes float {
  50% {
    transform: translateY(6px);
  }
}

.story-copy {
  text-align: center;
}

.story-copy .eyebrow {
  font-size: 9px;
}

.occasion h2 {
  font-size: 35px;
}

.venue-info .pending {
  margin: 12px auto 20px;
}

.venue-info .button {
  width: 100%;
}

.rsvp h2 {
  max-width: 320px;
  margin: auto;
  font-size: 37px;
}

@media (prefers-reduced-motion: reduce) {
  .motion-toggle,
  .bubbles {
    display: none;
  }
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal.ready {
    opacity: 1;
    transform: none;
  }
}
