:root {
  --sage: #8da58d;
  --sage-deep: #5f775f;
  --sage-soft: #dfe9df;
  --ivory: #fffaf2;
  --linen: #f2eadf;
  --blush: #ead1c8;
  --clay: #b98572;
  --ink: #28332f;
  --muted: #66756f;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(40, 51, 47, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

body.access-locked {
  overflow: hidden;
}

body.access-locked .site-header,
body.access-locked main,
body.access-locked .footer {
  pointer-events: none;
  user-select: none;
  filter: blur(12px);
}

body.access-locked .access-gate {
  opacity: 1;
  pointer-events: auto;
}

body::selection {
  background: var(--sage-soft);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 20;
  width: min(1120px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 250, 242, 0.82);
  border: 1px solid rgba(141, 165, 141, 0.28);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(40, 51, 47, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.brand strong {
  white-space: nowrap;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.nav a {
  padding: 9px 10px;
  border-radius: 999px;
  transition: background 180ms ease, color 180ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--sage-soft);
  color: var(--ink);
  outline: none;
}

.hero {
  position: relative;
  min-height: 94vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 130px max(24px, calc((100vw - 1120px) / 2)) 64px;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(255, 250, 242, 0.9) 0%, rgba(255, 250, 242, 0.72) 36%, rgba(255, 250, 242, 0.2) 72%),
    linear-gradient(180deg, rgba(40, 51, 47, 0.06), rgba(40, 51, 47, 0.18));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
}

.kicker,
.eyebrow {
  margin: 0 0 12px;
  color: var(--sage-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(4.2rem, 13vw, 9.5rem);
  line-height: 0.86;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 0.96;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.hero-copy {
  max-width: 560px;
  margin-bottom: 28px;
  color: #46534f;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.6;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button.primary {
  background: var(--sage-deep);
  color: var(--white);
  box-shadow: 0 16px 34px rgba(95, 119, 95, 0.28);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(95, 119, 95, 0.24);
  color: var(--sage-deep);
}

.button.wide {
  width: 100%;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(90deg, rgba(255, 250, 242, 0.94), rgba(255, 250, 242, 0.78)),
    url("assets/hero-wedding.png") center / cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}

.access-panel {
  width: min(100%, 460px);
  padding: 28px;
  border: 1px solid rgba(141, 165, 141, 0.3);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.access-panel h1 {
  margin-bottom: 14px;
  font-size: clamp(3.2rem, 12vw, 5rem);
}

.access-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.access-form {
  margin-top: 22px;
}

.access-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 8px;
}

.date-card {
  position: absolute;
  right: max(24px, calc((100vw - 1120px) / 2));
  bottom: 34px;
  z-index: 1;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.date-card span,
.quick-facts span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.8rem;
}

.date-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 86px 0;
}

.intro-grid,
.rsvp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 36px;
  align-items: start;
}

.intro-panel p,
.section-heading p,
.info-grid p,
.timeline p {
  color: var(--muted);
  line-height: 1.65;
}

.quick-facts {
  display: grid;
  gap: 12px;
}

.quick-facts div,
.countdown-grid div,
.rsvp-form,
.upload-zone,
.camera-module,
.location-grid article,
.abc-grid article,
.guestbook-form,
.guestbook-list,
.faq-list details,
.info-grid article {
  border: 1px solid rgba(141, 165, 141, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 48px rgba(40, 51, 47, 0.08);
}

.quick-facts div {
  padding: 20px;
}

.quick-facts strong {
  font-size: 1.1rem;
}

.countdown-section {
  padding-top: 34px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.countdown-grid div {
  min-height: 132px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 20px;
  text-align: center;
}

.countdown-grid strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
}

.countdown-grid span {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

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

.rsvp-form {
  padding: 22px;
}

.form-row {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

label,
legend {
  color: #41504b;
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(95, 119, 95, 0.28);
  border-radius: var(--radius);
  padding: 12px 13px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--sage-deep);
  outline: 3px solid rgba(141, 165, 141, 0.22);
}

.form-grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 14px;
}

.choice-set {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.choice-set label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(95, 119, 95, 0.2);
  border-radius: var(--radius);
  background: rgba(223, 233, 223, 0.28);
}

.choice-set input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--sage-deep);
}

.form-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--sage-deep);
  font-weight: 700;
}

.location-section {
  background: var(--ivory);
}

.location-grid,
.abc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.location-grid article,
.abc-grid article {
  padding: 22px;
}

.location-grid span,
.abc-grid strong {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-deep);
  font-weight: 800;
}

.location-grid p,
.abc-grid p,
.faq-list p,
.guestbook-entry p {
  color: var(--muted);
  line-height: 1.6;
}

.gallery-section,
.timeline-section {
  width: 100%;
  max-width: none;
  background: linear-gradient(180deg, var(--linen), #fffaf2);
  padding-inline: max(16px, calc((100vw - 1120px) / 2));
}

.upload-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 180px;
  margin: 30px 0;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.62);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.upload-zone.is-dragging {
  transform: translateY(-2px);
  border-color: var(--sage-deep);
  background: rgba(223, 233, 223, 0.78);
}

.upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-zone label {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
}

.upload-zone strong {
  font-size: 1.25rem;
}

.upload-zone span {
  color: var(--muted);
}

.camera-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 30px 0;
  padding: 20px;
  border: 1px solid rgba(141, 165, 141, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 48px rgba(40, 51, 47, 0.08);
}

.camera-teaser h3,
.camera-teaser p {
  margin-bottom: 0;
}

.camera-teaser p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.camera-module {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: 18px;
  align-items: stretch;
  margin: 0 0 30px;
  padding: 18px;
}

.camera-copy {
  display: grid;
  align-content: center;
}

.camera-copy p {
  color: var(--muted);
  line-height: 1.6;
}

.camera-copy strong {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--sage-deep);
}

.camera-stage {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  border-radius: var(--radius);
  background: #1f2933;
}

.camera-preview,
.camera-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.camera-preview {
  object-fit: cover;
}

.camera-placeholder {
  display: grid;
  place-items: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.84);
  background: linear-gradient(135deg, rgba(95, 119, 95, 0.92), rgba(185, 133, 114, 0.72));
  text-align: center;
  font-weight: 800;
}

.camera-module.is-live .camera-placeholder {
  display: none;
}

.camera-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.camera-file {
  position: relative;
}

.camera-file + input,
.camera-canvas {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.camera-page {
  background: linear-gradient(180deg, var(--linen), var(--ivory) 42%, var(--sage-soft));
}

.camera-hero {
  position: relative;
  min-height: 68vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 130px max(24px, calc((100vw - 1120px) / 2)) 58px;
}

.camera-hero-content {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
}

.camera-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.75fr) minmax(0, 1.25fr);
  gap: 24px;
  align-items: start;
}

.name-card {
  padding: 22px;
  border: 1px solid rgba(141, 165, 141, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 48px rgba(40, 51, 47, 0.08);
}

.name-card p {
  color: var(--muted);
  line-height: 1.6;
}

.camera-workspace {
  margin: 0;
}

.camera-workspace .camera-copy {
  gap: 10px;
}

.camera-gallery-section {
  padding-top: 24px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.memory-card {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 18px 50px rgba(40, 51, 47, 0.1);
}

.memory-card img,
.memory-card video,
.memory-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.memory-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--sage-soft), var(--blush));
  color: rgba(40, 51, 47, 0.55);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
}

.memory-card figcaption {
  padding: 12px 14px 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.delete-photo {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(40, 51, 47, 0.82);
  color: var(--white);
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(40, 51, 47, 0.24);
}

.delete-photo:hover,
.delete-photo:focus-visible {
  background: var(--clay);
  outline: none;
}

.timeline {
  display: grid;
  gap: 18px;
  max-width: 820px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 22px;
  align-items: start;
  padding: 20px;
  border-left: 4px solid var(--sage);
  background: rgba(255, 255, 255, 0.68);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.timeline time {
  color: var(--clay);
  font-weight: 800;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.info-grid article {
  padding: 20px;
}

.abc-section {
  width: 100%;
  max-width: none;
  padding-inline: max(16px, calc((100vw - 1120px) / 2));
  background: linear-gradient(180deg, #fffaf2, var(--sage-soft));
}

.guestbook-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: 28px;
  align-items: start;
}

.guestbook-form {
  padding: 22px;
}

.guestbook-list {
  display: grid;
  gap: 12px;
  min-height: 120px;
  padding: 16px;
}

.guestbook-entry {
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(223, 233, 223, 0.42);
}

.guestbook-entry header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--sage-deep);
  font-weight: 800;
}

.guestbook-entry p {
  margin-bottom: 0;
}

.faq-section {
  padding-top: 48px;
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.faq-list details {
  padding: 18px 20px;
}

.faq-list summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
}

.faq-list p {
  margin: 14px 0 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 46px;
  color: var(--muted);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

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

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
  }

  .nav {
    max-width: 60%;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 0.78rem;
  }

  .nav a {
    padding: 7px 8px;
  }

  .hero {
    min-height: 92vh;
    padding-top: 150px;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(255, 250, 242, 0.86) 0%, rgba(255, 250, 242, 0.72) 52%, rgba(255, 250, 242, 0.5) 100%);
  }

  .date-card {
    position: relative;
    right: auto;
    bottom: auto;
    width: fit-content;
    margin-top: 34px;
  }

  .intro-grid,
  .rsvp-layout,
  .form-grid,
  .countdown-grid,
  .location-grid,
  .gallery-grid,
  .camera-module,
  .camera-layout,
  .info-grid,
  .abc-grid,
  .guestbook-section {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 64px 0;
  }
}

@media (max-width: 560px) {
  .site-header {
    top: 10px;
    width: calc(100% - 20px);
    padding: 9px;
  }

  .brand strong {
    font-size: 1.1rem;
  }

  .brand span {
    width: 30px;
    height: 30px;
  }

  .nav {
    max-width: 56%;
    gap: 2px;
    font-size: 0.72rem;
  }

  .hero {
    padding-inline: 18px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .camera-teaser {
    align-items: stretch;
    flex-direction: column;
  }

  .camera-teaser .button {
    width: 100%;
  }

  .camera-hero {
    min-height: 64vh;
    padding-inline: 18px;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .rsvp-form {
    padding: 16px;
  }

  .camera-actions .button {
    width: 100%;
  }

  .access-panel {
    padding: 22px;
  }

  .access-row {
    grid-template-columns: 1fr;
  }

  .access-row .button {
    width: 100%;
  }
}
