:root {
  color-scheme: light;
  --paper: #fbfaf6;
  --paper-blue: #eef5f9;
  --blue-100: #dceaf2;
  --blue-300: #a9c7d8;
  --blue-500: #5e8ba5;
  --blue-700: #275b75;
  --navy: #123e56;
  --ink: #263238;
  --muted: #60717a;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(18, 62, 86, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 9% 12%, rgba(169, 199, 216, 0.45), transparent 23rem),
    radial-gradient(circle at 92% 86%, rgba(94, 139, 165, 0.23), transparent 28rem),
    linear-gradient(145deg, #edf5f8 0%, #f8faf8 48%, #e8f0f5 100%);
  color: var(--ink);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 19rem;
  height: 19rem;
  border: 1px solid rgba(94, 139, 165, 0.18);
  border-radius: 50%;
  content: "";
}

body::before {
  top: -10rem;
  right: -7rem;
}

body::after {
  bottom: -12rem;
  left: -8rem;
  width: 24rem;
  height: 24rem;
}

.page-shell {
  width: min(100% - 2rem, 75rem);
  margin-inline: auto;
  padding-block: clamp(1rem, 4vw, 4.5rem);
}

.invitation-layout {
  display: grid;
  grid-template-columns: minmax(19rem, 0.88fr) minmax(30rem, 1.12fr);
  overflow: hidden;
  min-height: 48rem;
  border: 1px solid rgba(94, 139, 165, 0.24);
  border-radius: 2.25rem;
  background: rgba(251, 250, 246, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.portrait-column {
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 3.5rem);
  background:
    linear-gradient(rgba(18, 62, 86, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 62, 86, 0.08) 1px, transparent 1px),
    linear-gradient(145deg, #d7e7ef, #a9c7d8);
  background-size: 2.8rem 2.8rem, 2.8rem 2.8rem, auto;
}

.portrait-frame {
  position: relative;
  width: min(100%, 28rem);
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 20px 50px rgba(18, 62, 86, 0.24);
  transform: rotate(-1.2deg);
}

.portrait-frame::after {
  position: absolute;
  right: -1.15rem;
  bottom: -1.15rem;
  width: 4rem;
  height: 4rem;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: rgba(238, 245, 249, 0.72);
  content: "";
}

.portrait-kicker {
  position: absolute;
  z-index: 1;
  top: -1rem;
  left: 50%;
  width: max-content;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.portrait-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.8rem;
}

.story-column {
  padding: clamp(2rem, 5vw, 4.75rem);
}

.hero-copy {
  max-width: 43rem;
}

.eyebrow,
.section-label {
  margin: 0 0 0.65rem;
  color: var(--blue-700);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.5;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1.35rem;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.25rem, 6.2vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

h1 span {
  display: inline-block;
  font-size: 0.42em;
  vertical-align: top;
}

h2 {
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 500;
  line-height: 1.2;
}

.hero-copy p {
  max-width: 42rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 1.03rem;
}

.hero-copy .lead {
  color: var(--ink);
  font-size: clamp(1.08rem, 2vw, 1.22rem);
  line-height: 1.65;
}

.hero-copy strong {
  color: var(--navy);
}

.event-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 2rem 0 2.5rem;
}

.detail-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--blue-100);
  border-radius: 1rem;
  background: var(--white);
}

.detail-card--wide {
  grid-column: 1 / -1;
}

.detail-card dt {
  margin-bottom: 0.15rem;
  color: var(--blue-700);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.detail-card dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.45;
}

.gift-section {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.35rem, 3vw, 2rem);
  border-radius: 1.35rem;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 30px rgba(18, 62, 86, 0.18);
}

.gift-section .section-label {
  color: var(--blue-300);
}

.gift-section h2 {
  margin-bottom: 0.45rem;
  color: var(--white);
}

.gift-section p {
  max-width: 32rem;
  margin-bottom: 0;
  line-height: 1.55;
}

.gift-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.7rem;
  gap: 0.7rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 8px 20px rgba(4, 27, 39, 0.24);
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.gift-button:hover {
  background: var(--paper-blue);
  box-shadow: 0 12px 26px rgba(4, 27, 39, 0.3);
  transform: translateY(-2px);
}

.gift-button:focus-visible {
  outline: 3px solid var(--blue-300);
  outline-offset: 4px;
}

.gift-button svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.notes {
  margin-top: 1.25rem;
  padding: 1.5rem 1.65rem;
  border: 1px solid var(--blue-100);
  border-radius: 1.35rem;
  background: var(--paper-blue);
}

.notes h2 {
  margin-bottom: 0.85rem;
  font-family: "Segoe UI", Inter, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notes ul {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes li {
  position: relative;
  padding-left: 1.35rem;
  color: #485c66;
  font-size: 0.95rem;
  line-height: 1.55;
}

.notes li::before {
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--blue-500);
  content: "";
}

.closing {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.1rem 0.9rem;
  align-items: start;
  margin-top: 2.25rem;
}

.closing-mark {
  grid-row: 1 / 3;
  color: var(--blue-500);
  font-size: 1.2rem;
}

.closing p {
  margin-bottom: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.5;
}

.closing .signature {
  margin-top: 0.35rem;
  color: var(--blue-700);
  font-size: 1.28rem;
  font-style: italic;
}

@media (max-width: 900px) {
  .page-shell {
    width: min(100% - 1.25rem, 45rem);
    padding-block: 0.625rem;
  }

  .invitation-layout {
    grid-template-columns: 1fr;
    border-radius: 1.5rem;
  }

  .portrait-column {
    padding: 2.75rem clamp(1.25rem, 8vw, 4rem) 2rem;
  }

  .portrait-frame {
    width: min(100%, 23rem);
  }

  .story-column {
    padding: clamp(1.5rem, 7vw, 3.5rem);
  }

  h1 {
    max-width: none;
  }
}

@media (max-width: 600px) {
  body {
    line-height: 1.62;
  }

  .story-column {
    padding: 1.65rem 1.2rem 2rem;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.7rem);
  }

  .event-details,
  .gift-section {
    grid-template-columns: 1fr;
  }

  .detail-card--wide {
    grid-column: auto;
  }

  .gift-button {
    width: 100%;
  }

  .notes {
    padding: 1.25rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .portrait-frame,
  .story-column > * {
    animation: reveal 620ms ease-out both;
  }

  .story-column > :nth-child(2) {
    animation-delay: 80ms;
  }

  .story-column > :nth-child(3) {
    animation-delay: 140ms;
  }

  .story-column > :nth-child(4) {
    animation-delay: 200ms;
  }

  .story-column > :nth-child(5) {
    animation-delay: 260ms;
  }

  @keyframes reveal {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
