:root {
  --ink: #19222a;
  --muted: #5d6868;
  --paper: #fffaf2;
  --shell: #f4e7d4;
  --foam: #e6f0ea;
  --sea: #256f7d;
  --sea-dark: #174a54;
  --coral: #d56c56;
  --marigold: #dba24a;
  --olive: #70845b;
  --white: #ffffff;
  --shadow: 0 22px 70px rgba(25, 34, 42, 0.18);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body.invite-open {
  overflow: hidden;
  width: 100%;
  touch-action: none;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 14px;
  left: 50%;
  width: min(calc(100% - 28px), 1120px);
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px 5px 8px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(25, 34, 42, 0.08);
  box-shadow: none;
  backdrop-filter: blur(8px);
}

.invite-screen {
  position: fixed;
  z-index: 100;
  inset: 0;
  width: 100dvw;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background:
    linear-gradient(rgba(25, 34, 42, 0.34), rgba(25, 34, 42, 0.62)),
    url("assets/generated/beach-hero-ai.png") center / cover;
  overflow: hidden;
  overscroll-behavior: contain;
  transition: opacity 650ms ease, visibility 650ms ease;
}

.invite-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 250, 242, 0.28), transparent 26%),
    linear-gradient(135deg, rgba(213, 108, 86, 0.16), rgba(37, 111, 125, 0.2));
  pointer-events: none;
}

.invite-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.invite-card {
  position: relative;
  width: min(620px, calc(100vw - 36px));
  display: grid;
  justify-items: center;
  text-align: center;
  place-items: center;
  padding: clamp(28px, 6vw, 54px);
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: inviteRise 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.invite-card::before,
.invite-card::after {
  content: "";
  position: absolute;
  width: 96px;
  height: 2px;
  top: 31px;
  background: linear-gradient(90deg, transparent, var(--coral), transparent);
}

.invite-card::before {
  left: 24px;
}

.invite-card::after {
  right: 24px;
}

.invite-mark {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-bottom: 22px;
  border-radius: 999px;
  color: var(--paper);
  background: var(--sea-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  box-shadow: 0 18px 34px rgba(23, 74, 84, 0.24);
  animation: invitePulse 2200ms ease-in-out infinite;
}

.invite-card h2 {
  width: 100%;
  color: var(--sea-dark);
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  text-align: center;
}

.invite-card p:not(.eyebrow) {
  max-width: 500px;
  margin: 18px 0 26px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

@keyframes inviteRise {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes invitePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.045);
  }
}

.brand {
  width: 88px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  opacity: 0.9;
  filter: drop-shadow(0 8px 18px rgba(25, 34, 42, 0.2));
}

.brand img {
  width: 100%;
  height: 100%;
}

nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 12px rgba(25, 34, 42, 0.36);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

nav a:hover,
.nav-rsvp {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 118px max(24px, calc((100vw - 1120px) / 2)) 34px;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(20, 32, 35, 0.78) 0%, rgba(20, 32, 35, 0.34) 48%, rgba(20, 32, 35, 0.05) 100%),
    linear-gradient(0deg, rgba(25, 34, 42, 0.72) 0%, rgba(25, 34, 42, 0) 42%);
}

.hero-content,
.hero-card {
  position: relative;
  z-index: 2;
}

.hero-content {
  width: min(690px, 100%);
  color: var(--white);
  padding-bottom: 84px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffd1a3;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

h1 {
  font-size: clamp(56px, 9vw, 112px);
  line-height: 0.92;
  max-width: 850px;
}

h2 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
}

h3 {
  font-size: 25px;
  line-height: 1.08;
}

.hero-lede {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.91);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button,
.submit-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.primary,
.submit-button {
  color: var(--white);
  background: var(--coral);
  box-shadow: 0 14px 28px rgba(213, 108, 86, 0.28);
}

.secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.38);
}

.hero-card {
  width: min(420px, 100%);
  justify-self: end;
  margin-top: -145px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: var(--radius);
  color: var(--white);
  background: rgba(25, 34, 42, 0.48);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.card-label,
.date,
.house-topline span {
  color: #ffd1a3;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-card strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 22px;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.countdown span {
  min-width: 0;
  padding: 12px 8px;
  border-radius: var(--radius);
  text-align: center;
  background: rgba(255, 255, 255, 0.14);
}

.countdown b {
  display: block;
  font-size: 23px;
}

.section-pad {
  padding: 96px 24px;
}

.container {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.intro {
  background: linear-gradient(135deg, var(--paper), var(--foam));
}

.intro-grid,
.stay-layout,
.rsvp-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 42px;
  align-items: start;
}

.intro-copy p,
.section-heading p,
.rsvp-copy p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.quick-facts div {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 16px 42px rgba(25, 34, 42, 0.08);
}

.quick-facts span {
  color: var(--muted);
  font-weight: 800;
}

.quick-facts strong {
  color: var(--sea-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1;
}

.quick-facts small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.weekend {
  background: var(--paper);
}

.section-heading {
  max-width: 730px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 34px;
}

.timeline-item {
  min-height: 260px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--sea-dark);
  color: var(--white);
}

.timeline-item:nth-child(even) {
  background: var(--olive);
}

.timeline-item p {
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.55;
}

.stay {
  background: var(--sea-dark);
  color: var(--white);
}

.stay .section-heading p {
  color: rgba(255, 255, 255, 0.76);
}

.house-grid {
  display: grid;
  gap: 14px;
}

.house-card {
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.house-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.house-card h3 {
  font-size: 32px;
}

.house-card p {
  color: rgba(255, 255, 255, 0.78);
}

.house-card a {
  display: inline-flex;
  margin-top: 8px;
  color: #ffd1a3;
  font-weight: 900;
}

.gallery {
  background: var(--shell);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 255px;
  grid-auto-flow: dense;
  gap: 12px;
  margin-top: 34px;
}

figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--foam);
}

.photo-button {
  width: 100%;
  height: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.photo-button:focus-visible {
  outline: 4px solid var(--coral);
  outline-offset: -4px;
}

figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
  transition: transform 600ms ease;
}

figure:hover img {
  transform: scale(1.04);
}

.photo-tall {
  grid-row: span 2;
}

.photo-wide {
  grid-column: span 2;
}

.rsvp {
  background:
    radial-gradient(circle at 15% 15%, rgba(219, 162, 74, 0.24), transparent 27%),
    linear-gradient(135deg, var(--paper), var(--foam));
}

.rsvp-note {
  display: grid;
  gap: 6px;
  margin-top: 24px;
  padding: 18px;
  border-left: 4px solid var(--coral);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 16px 42px rgba(25, 34, 42, 0.08);
}

.rsvp-note span {
  color: var(--muted);
}

.rsvp-form {
  display: grid;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 12px;
  font-weight: 900;
}

.choice-grid {
  display: grid;
  gap: 10px;
}

.choice-card {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #d8ddd5;
  border-radius: var(--radius);
  cursor: pointer;
}

.choice-card:has(input:checked) {
  border-color: var(--sea);
  background: var(--foam);
  box-shadow: inset 0 0 0 1px var(--sea);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d8ddd5;
  border-radius: var(--radius);
  padding: 12px 13px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(37, 111, 125, 0.22);
  border-color: var(--sea);
}

.conditional-panel {
  display: none;
  padding: 18px;
  border-radius: var(--radius);
  background: #f5faf6;
}

.conditional-panel.is-visible {
  display: block;
}

.checkbox-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.checkbox-list label {
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;
  font-weight: 700;
}

.checkbox-list input,
.choice-card input {
  width: auto;
  min-height: auto;
  margin: 3px 0 0;
  accent-color: var(--sea);
}

.submit-button {
  width: 100%;
}

.hidden {
  display: none;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 32px 24px;
  color: var(--white);
  background: var(--ink);
}

.site-footer p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
}

.site-footer span {
  color: rgba(255, 255, 255, 0.72);
}

.lightbox {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(25, 34, 42, 0.86);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  width: auto;
  max-width: min(100%, 1180px);
  max-height: 88svh;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.thanks-page {
  min-height: 100svh;
  background:
    linear-gradient(rgba(25, 34, 42, 0.38), rgba(25, 34, 42, 0.68)),
    url("assets/generated/beach-hero-ai.png") center / cover;
}

.thanks-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.thanks-brand {
  position: fixed;
  top: 24px;
  left: 24px;
}

.thanks-card {
  width: min(540px, 100%);
  padding: 34px;
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.thanks-card h1 {
  color: var(--sea-dark);
}

.thanks-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

@media (max-width: 920px) {
  .invite-card {
    width: min(560px, calc(100vw - 28px));
  }

  .hero {
    min-height: auto;
    padding-top: 126px;
  }

  .hero-card {
    justify-self: start;
    margin-top: -50px;
  }

  .intro-grid,
  .stay-layout,
  .rsvp-layout,
  .timeline {
    grid-template-columns: 1fr;
  }

  .quick-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .timeline-item {
    min-height: auto;
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo-wide {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .invite-screen {
    align-items: center;
    width: 100dvw;
    height: 100dvh;
    padding: 14px;
    background-position: center, 68% center;
    background-size: auto, cover;
  }

  .invite-card {
    width: 100%;
    max-width: 100%;
    max-height: calc(100svh - 28px);
    overflow: hidden;
    padding: 22px 16px;
    background: rgba(255, 250, 242, 0.76);
  }

  .invite-card::before,
  .invite-card::after {
    width: 54px;
    top: 22px;
  }

  .invite-card::before {
    left: 14px;
  }

  .invite-card::after {
    right: 14px;
  }

  .invite-mark {
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
    font-size: 22px;
  }

  .invite-card h2 {
    font-size: clamp(34px, 10.5vw, 48px);
    max-width: 100%;
  }

  .invite-card p:not(.eyebrow) {
    margin: 14px 0 20px;
    font-size: 16px;
  }

  .site-header {
    top: 8px;
    left: 8px;
    width: auto;
    height: 50px;
    padding: 0;
    transform: none;
    border: 0;
    background: transparent;
    backdrop-filter: none;
  }

  nav {
    display: none;
  }

  .brand {
    width: 82px;
    height: 45px;
  }

  .hero {
    min-height: auto;
    padding: 92px 18px 24px;
  }

  .hero-media {
    height: 100%;
  }

  .hero-media img {
    object-position: 68% center;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(25, 34, 42, 0.86) 0%, rgba(25, 34, 42, 0.42) 60%, rgba(25, 34, 42, 0.2) 100%);
  }

  .hero-content {
    padding-bottom: 22px;
  }

  h1 {
    font-size: clamp(42px, 14vw, 62px);
    line-height: 0.98;
  }

  h2 {
    font-size: clamp(30px, 9vw, 42px);
  }

  h3 {
    font-size: 22px;
  }

  .hero-lede {
    margin-top: 18px;
    font-size: 17px;
    line-height: 1.5;
  }

  .button {
    width: 100%;
  }

  .hero-card {
    width: 100%;
    justify-self: stretch;
    margin-top: 10px;
    padding: 16px;
  }

  .countdown {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .countdown span {
    padding: 10px 4px;
    font-size: 12px;
  }

  .countdown b {
    font-size: 20px;
  }

  .section-pad {
    padding: 58px 18px;
  }

  .quick-facts,
  .form-grid,
  .checkbox-list,
  .photo-grid {
    grid-template-columns: 1fr;
  }

  .quick-facts div {
    min-height: auto;
    gap: 12px;
    padding: 18px;
  }

  .photo-grid {
    grid-auto-rows: minmax(260px, 72vw);
  }

  .photo-tall {
    grid-row: span 1;
  }

  .photo-wide {
    grid-column: span 1;
  }

  .rsvp-form,
  .thanks-card {
    padding: 18px;
  }

  .choice-card {
    align-items: start;
  }

  .house-topline,
  .site-footer {
    align-items: flex-start;
  }

  .site-footer {
    display: grid;
    padding: 28px 18px;
  }

  .lightbox {
    padding: 14px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
  }

  .lightbox img {
    max-height: 82svh;
  }
}

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

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