:root {
  --bg-gradient-start: #266c41;
  --bg-gradient-end: #319256;
  --text-primary: #2f243a;
  --text-secondary: #334f34;
  --accent: #6fa671;
  --muted: rgba(63, 47, 61, 0.4);
  --white: #ffffff;
  --max-width: 960px;
  --shadow-soft: 0 25px 60px -25px rgba(47, 36, 58, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: linear-gradient(160deg, var(--bg-gradient-start), var(--bg-gradient-end));
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
}

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

.hero {
  display: grid;
  place-items: center;
  padding: 6rem 1.5rem 5rem;
  text-align: center;
}

.hero__content {
  max-width: 700px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border-radius: 32px;
  padding: 3.5rem 3rem;
  box-shadow: var(--shadow-soft);
}

.gallery-hero {
  display: grid;
  place-items: center;
  padding: 4rem 1.5rem 3rem;
  text-align: center;
}

.gallery-hero__content {
  max-width: 700px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border-radius: 32px;
  padding: 2.5rem 3rem;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.gallery-hero h1 {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.2;
  margin: 0 0 1rem;
}

.gallery-hero__lead {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  font-weight: 500;
  font-size: 0.9rem;
  transition: transform 200ms ease, background 200ms ease;
  margin-bottom: 1.5rem;
}

.back-button:hover {
  transform: translateX(-3px);
  background: var(--white);
}

.hero__eyebrow {
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  /* color: var(--muted); */
  color: var(--text-secondary);
  display: block;
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: clamp(2.5rem, 7vw, 4rem);
  line-height: 1.1;
  margin: 0 0 1.5rem;
}

.hero__lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 2.5rem;
}

.hero__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  transition: transform 200ms ease, box-shadow 200ms ease;
  box-shadow: 0 12px 30px -12px rgba(229, 143, 179, 0.7);
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 36px -14px rgba(229, 143, 179, 0.75);
}

.button--secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  box-shadow: 0 12px 30px -12px rgba(47, 36, 58, 0.25);
}

.button--secondary:hover {
  background: var(--white);
  box-shadow: 0 15px 36px -14px rgba(47, 36, 58, 0.3);
}

main {
  display: grid;
  gap: 4.5rem;
  padding: 0 1.5rem 5rem;
}

section {
  max-width: var(--max-width);
  margin: 0 auto;
}

.story {
  max-width: 1200px;
}

.section__heading {
  margin-bottom: 1.5rem;
  text-align: center;
}

.section__eyebrow {
  font-size: 1.0rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  /* color: var(--muted); */
  display: block;
  margin-bottom: 0.9rem;
}

.section__heading h2 {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}

.subtitle {
  font-size: 0.7em;
  font-weight: 400;
}

.timeline li {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: 2rem 3rem;
  box-shadow: var(--shadow-soft);
  transition: all 200ms ease;
}

.timeline li:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 70px -30px rgba(47, 36, 58, 0.4);
}

.timeline h3 {
  font-family: "Playfair Display", "Times New Roman", serif;
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
  font-weight: 600;
}

.timeline p {
  margin: 0 0 1.25rem 0;
  line-height: 1.7;
  color: var(--text-secondary);
}

.timeline p:last-child {
  margin-bottom: 0;
}

.proposal-quote {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  border-left: 3px solid var(--accent);
  font-style: italic;
}

.proposal-quote p {
  margin: 0;
}

.love-note blockquote {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 32px;
  padding: 2.75rem 2.5rem;
  box-shadow: var(--shadow-soft);
  font-style: italic;
  line-height: 1.8;
  position: relative;
}

.love-note blockquote::before {
  content: "\201C";
  position: absolute;
  top: -36px;
  left: 20px;
  font-size: 6rem;
  color: rgba(229, 143, 179, 0.2);
}

.love-note footer {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  font-style: normal;
  color: var(--text-secondary);
}

.gallery__grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.gallery__item {
  aspect-ratio: 1;
  border-radius: 24px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.78);
  border: 2px dashed rgba(229, 143, 179, 0.45);
  color: var(--text-secondary);
  transition: border-color 200ms ease, background 200ms ease;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.gallery__photo-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gallery__item--photo {
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.gallery__item--photo:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-soft);
}

.gallery__item--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__photo-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.lightbox--active {
  opacity: 1;
  visibility: visible;
}

.lightbox__close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 3rem;
  color: var(--white);
  cursor: pointer;
  z-index: 1001;
  transition: transform 200ms ease;
}

.lightbox__close:hover {
  transform: scale(1.2);
}

.lightbox__content {
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lightbox__content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 25px 80px -20px rgba(0, 0, 0, 0.6);
}

.lightbox__caption {
  color: var(--white);
  font-size: 1.1rem;
  text-align: center;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  margin: 0;
}

.gallery__item:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.95);
}

.gallery__label {
  font-size: 0.95rem;
  line-height: 1.5;
}

.gallery__cta {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer {
  padding: 3rem 1.5rem 4rem;
}

.footer__content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  color: var(--text-secondary);
}

.footer__nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer__nav a {
  position: relative;
}

.footer__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.4rem;
  width: 100%;
  height: 2px;
  background: rgba(229, 143, 179, 0.5);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 200ms ease;
}

.footer__nav a:hover::after {
  transform: scaleX(1);
}

@media (max-width: 640px) {
  .hero__content {
    padding: 2.75rem 2.25rem;
  }

  main {
    gap: 3.5rem;
    padding-bottom: 4rem;
  }

  .timeline li {
    padding: 1.5rem;
  }

  .love-note blockquote {
    padding: 2.25rem 2rem;
  }

  .footer__nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Story Overlay Styles */
.timeline li {
  cursor: pointer;
}

.timeline li .story-preview {
  display: block;
}

.timeline li .story-full {
  display: none;
}

.story-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 2rem;
}

.story-overlay.active {
  display: flex;
  opacity: 1;
}

.story-overlay-content {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  padding: 3rem;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px -25px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.story-overlay.active .story-overlay-content {
  transform: scale(1);
}

.story-overlay-close {
  position: sticky;
  top: 0;
  right: 0;
  float: right;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(47, 36, 58, 0.1);
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  z-index: 10;
}

.story-overlay-close:hover {
  background: rgba(47, 36, 58, 0.2);
  transform: rotate(90deg);
}

.story-overlay h3 {
  font-family: "Playfair Display", "Times New Roman", serif;
  margin: 0 0 1.5rem;
  font-size: 2rem;
  color: var(--text-primary);
}

.story-overlay p {
  margin: 0 0 1.25rem 0;
  line-height: 1.7;
  color: var(--text-secondary);
}

.story-overlay p:last-child {
  margin-bottom: 0;
}

.story-overlay .proposal-quote {
  background: rgba(111, 166, 113, 0.1);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
}

.story-overlay .proposal-quote p {
  margin: 0;
}

.story-overlay .subtitle {
  font-size: 1.0 em;
  font-style: italic;
  color: var(--muted);
}

@media (max-width: 768px) {
  .story-overlay {
    padding: 1rem;
  }

  .story-overlay-content {
    padding: 2rem;
    max-height: 90vh;
  }

  .story-overlay h3 {
    font-size: 1.5rem;
  }
}