@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Nunito+Sans:wght@400;600;700;800&display=swap');

:root {
  --sg-ink: #19312b;
  --sg-muted: #6d776f;
  --sg-green: #1f6b5a;
  --sg-gold: #b28a5a;
  --sg-soft: #fffaf1;
  --sg-paper: #f7efe2;
  --sg-line: rgba(178, 138, 90, .28);
  --sg-shadow: 0 18px 50px rgba(25, 49, 43, .14);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body.sg-body {
  background:
    radial-gradient(circle at top left, rgba(216, 177, 106, .24), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(31, 107, 90, .16), transparent 30rem),
    linear-gradient(180deg, #fffaf1 0%, #f7efe2 48%, #fffaf1 100%);
  color: var(--sg-ink);
  font-family: 'Nunito Sans', Arial, sans-serif;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body.sg-locked {
  overflow: hidden;
}

body.sg-locked .sg-pages {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.sg-welcome {
  align-items: center;
  background:
    linear-gradient(rgba(25, 49, 43, .54), rgba(25, 49, 43, .54)),
    var(--sg-cover, linear-gradient(135deg, #1f6b5a, #b28a5a));
  background-position: center;
  background-size: cover;
  color: #fffaf1;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  text-align: center;
  z-index: 9999;
}

.sg-welcome-card {
  max-width: 520px;
  width: min(100%, 520px);
}

.sg-mark {
  height: 82px;
  margin-bottom: 18px;
  width: 82px;
}

.sg-eyebrow {
  color: var(--sg-gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.sg-welcome h1,
.sg-title,
.sg-script,
.sg-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.sg-welcome h1 {
  font-size: clamp(42px, 10vw, 86px);
  line-height: .9;
  margin: 12px 0;
}

.sg-welcome p {
  font-size: 16px;
  line-height: 1.7;
  margin: 0 auto 26px;
  max-width: 420px;
}

.sg-button {
  align-items: center;
  background: var(--sg-green);
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(31, 107, 90, .28);
  color: #fff !important;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  text-decoration: none !important;
}

.sg-button.is-light {
  background: #fffaf1;
  border-color: var(--sg-line);
  color: var(--sg-green) !important;
}

.sg-button.is-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .48);
  color: #fff !important;
}

.sg-audio {
  align-items: center;
  background: rgba(255, 250, 241, .94);
  border: 1px solid var(--sg-line);
  border-radius: 999px;
  bottom: 18px;
  box-shadow: var(--sg-shadow);
  color: var(--sg-green);
  display: flex;
  height: 46px;
  justify-content: center;
  position: fixed;
  right: 18px;
  width: 46px;
  z-index: 80;
}

.sg-audio.is-playing::after {
  animation: sgPulse 1.8s infinite;
  border: 1px solid var(--sg-gold);
  border-radius: 999px;
  content: "";
  inset: -7px;
  position: absolute;
}

@keyframes sgPulse {
  0% { opacity: .85; transform: scale(.86); }
  100% { opacity: 0; transform: scale(1.18); }
}

.sg-nav {
  background: rgba(255, 250, 241, .9);
  border: 1px solid var(--sg-line);
  border-radius: 999px;
  box-shadow: var(--sg-shadow);
  display: flex;
  gap: 4px;
  left: 50%;
  max-width: calc(100% - 24px);
  overflow-x: auto;
  padding: 6px;
  position: fixed;
  top: 12px;
  transform: translateX(-50%);
  z-index: 70;
}

.sg-pages {
  height: 100vh;
  height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

.sg-nav a,
.sg-icon-btn {
  align-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--sg-ink);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  text-decoration: none !important;
  white-space: nowrap;
}

.sg-nav a:hover,
.sg-nav a.is-active,
.sg-icon-btn:hover {
  background: var(--sg-green);
  color: #fffaf1;
}

.sg-section {
  align-items: center;
  display: flex;
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  padding: 82px 18px 64px;
  position: relative;
  scroll-margin-top: 18px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.sg-section::before,
.sg-section::after {
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  content: "";
  height: clamp(96px, 18vw, 190px);
  opacity: .92;
  pointer-events: none;
  position: absolute;
  width: clamp(96px, 18vw, 190px);
}

.sg-section::before {
  background-image: url('../svg/corner-top.svg');
  right: 18px;
  top: 22px;
}

.sg-section::after {
  background-image: url('../svg/corner-bottom.svg');
  bottom: 22px;
  left: 18px;
}

.sg-wrap {
  margin: 0 auto;
  max-width: 1080px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.sg-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: clamp(18px, 4vw, 36px);
}

.sg-center {
  text-align: center;
}

.sg-title {
  color: var(--sg-green);
  font-size: clamp(54px, 12vw, 124px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: .84;
  margin: 16px 0;
}

.sg-heading {
  color: var(--sg-green);
  font-size: clamp(36px, 7vw, 68px);
  line-height: .95;
  margin: 0;
}

.sg-script {
  color: var(--sg-gold);
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1;
  margin: 0;
}

.sg-muted {
  color: var(--sg-muted);
  line-height: 1.75;
}

.sg-divider {
  background: url('../svg/divider.svg') center / contain no-repeat;
  height: 50px;
  margin: 18px auto;
  max-width: 420px;
}

.sg-hero-grid,
.sg-couple-grid,
.sg-event-grid,
.sg-gift-grid {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sg-cover-photo {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--sg-line);
  border-radius: 30px;
  box-shadow: var(--sg-shadow);
  height: auto;
  object-fit: cover;
  width: 100%;
}

.sg-photo-frame {
  position: relative;
}

.sg-photo-frame::before {
  border: 1px solid var(--sg-gold);
  border-radius: 30px;
  content: "";
  inset: 14px -14px -14px 14px;
  position: absolute;
  z-index: -1;
}

.sg-date-card,
.sg-person-card,
.sg-event-card,
.sg-story-card,
.sg-comment,
.sg-gift-card {
  background: rgba(255, 250, 241, .68);
  border: 1px solid rgba(178, 138, 90, .18);
  border-radius: 18px;
  padding: 22px;
}

.sg-date-card {
  display: inline-block;
  margin-top: 12px;
  min-width: min(100%, 280px);
}

.sg-date-card strong {
  color: var(--sg-green);
  display: block;
  font-size: 22px;
}

.sg-person-card {
  text-align: center;
}

.sg-person-card img {
  aspect-ratio: 1;
  border: 7px solid #fffaf1;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(25, 49, 43, .16);
  object-fit: cover;
  width: min(190px, 72vw);
}

.sg-person-card h3 {
  color: var(--sg-green);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 32px;
  margin: 18px 0 8px;
}

.sg-event-grid {
  align-items: stretch;
}

.sg-event-card h3,
.sg-story-card h3,
.sg-gift-card h3 {
  color: var(--sg-green);
  font-size: 22px;
  margin: 0 0 12px;
}

.sg-event-meta {
  color: var(--sg-muted);
  line-height: 1.8;
  margin: 0;
}

.sg-gallery {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
}

.sg-gallery a,
.sg-gallery img {
  border-radius: 18px;
  display: block;
  overflow: hidden;
}

.sg-gallery img {
  aspect-ratio: 1;
  border: 1px solid var(--sg-line);
  object-fit: cover;
  width: 100%;
}

.sg-story-list,
.sg-comment-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.sg-story-card .date {
  color: var(--sg-gold);
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.sg-form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.sg-form input,
.sg-form textarea {
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--sg-line);
  border-radius: 16px;
  color: var(--sg-ink);
  outline: none;
  padding: 14px 16px;
  width: 100%;
}

.sg-form textarea {
  min-height: 118px;
  resize: vertical;
}

.sg-comment {
  text-align: left;
}

.sg-comment strong {
  color: var(--sg-green);
  display: block;
  margin-bottom: 6px;
}

.sg-modal {
  align-items: center;
  background: rgba(25, 49, 43, .58);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 120;
}

.sg-modal.is-open {
  display: flex;
}

.sg-modal-card {
  background: #fffaf1;
  border: 1px solid var(--sg-line);
  border-radius: 24px;
  box-shadow: var(--sg-shadow);
  max-height: 90vh;
  max-width: 520px;
  overflow: auto;
  padding: 24px;
  position: relative;
  text-align: center;
  width: min(100%, 520px);
}

.sg-modal-card h3 {
  color: var(--sg-green);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 34px;
  margin: 0 0 16px;
}

.sg-close {
  background: #f4eadb;
  border: 1px solid var(--sg-line);
  border-radius: 999px;
  color: var(--sg-ink);
  cursor: pointer;
  height: 36px;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 36px;
}

.sg-qr-img {
  border: 10px solid #fff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(25, 49, 43, .16);
  max-width: 260px;
  width: 100%;
}

.sg-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.sg-footer {
  padding-bottom: 42px;
}

@media (max-width: 860px) {
  .sg-nav {
    bottom: 12px;
    justify-content: center;
    top: auto;
    width: calc(100% - 24px);
  }

  .sg-nav a span {
    display: none;
  }

  .sg-hero-grid,
  .sg-couple-grid,
  .sg-event-grid,
  .sg-gift-grid {
    grid-template-columns: 1fr;
  }

  .sg-hero-grid .sg-photo-frame {
    order: -1;
  }

  .sg-cover-photo {
    max-height: 36svh;
  }

  .sg-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  body.sg-body {
    background:
      radial-gradient(circle at top left, rgba(216, 177, 106, .18), transparent 18rem),
      linear-gradient(180deg, #fffaf1 0%, #f7efe2 100%);
  }

  .sg-section {
    height: 100vh;
    height: 100svh;
    min-height: 100vh;
    min-height: 100svh;
    padding: 58px 14px 74px;
  }

  .sg-panel {
    padding: 0;
  }

  .sg-section::before,
  .sg-section::after {
    opacity: .46;
  }

  .sg-title {
    font-size: clamp(42px, 16vw, 66px);
    margin: 10px 0;
  }

  .sg-heading {
    font-size: clamp(34px, 13vw, 52px);
  }

  .sg-script {
    font-size: clamp(30px, 12vw, 46px);
  }

  .sg-muted {
    font-size: 13px;
    line-height: 1.6;
  }

  .sg-button {
    width: 100%;
  }

  .sg-hero-grid,
  .sg-couple-grid,
  .sg-event-grid {
    gap: 14px;
  }

  .sg-photo-frame::before {
    display: none;
  }

  .sg-cover-photo {
    border-radius: 22px;
    max-height: 34svh;
  }

  .sg-date-card,
  .sg-person-card,
  .sg-event-card,
  .sg-story-card,
  .sg-comment,
  .sg-gift-card {
    background: rgba(255, 250, 241, .42);
    border-color: rgba(178, 138, 90, .14);
    border-radius: 16px;
    padding: 14px;
  }

  .sg-person-card img {
    width: min(128px, 42vw);
  }

  .sg-person-card h3 {
    font-size: 24px;
    margin: 10px 0 4px;
  }

  .sg-event-card h3,
  .sg-story-card h3,
  .sg-gift-card h3 {
    font-size: 18px;
    margin-bottom: 6px;
  }

  .sg-event-meta {
    font-size: 13px;
    line-height: 1.55;
  }

  .sg-event-grid {
    max-height: 54svh;
    overflow-y: auto;
    padding-right: 2px;
  }

  .sg-gallery {
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 54svh;
    overflow-y: auto;
    padding-right: 2px;
  }

  .sg-gallery img {
    border-radius: 12px;
  }

  .sg-story-list,
  .sg-comment-list {
    gap: 10px;
    margin-top: 14px;
    max-height: 52svh;
    overflow-y: auto;
    padding-right: 2px;
  }

  .sg-form {
    gap: 9px;
    margin-top: 14px;
  }

  .sg-form input,
  .sg-form textarea {
    border-radius: 12px;
    padding: 11px 12px;
  }

  .sg-form textarea {
    min-height: 84px;
  }

  .sg-divider {
    height: 34px;
    margin: 8px auto;
  }

  .sg-date-card strong {
    font-size: 18px;
  }

  .sg-nav {
    border-radius: 18px;
    gap: 2px;
    padding: 5px;
  }

  .sg-nav a,
  .sg-icon-btn {
    font-size: 11px;
    min-height: 32px;
    padding: 0 9px;
  }

  .sg-audio {
    bottom: 78px;
    height: 40px;
    right: 12px;
    width: 40px;
  }
}
