/* ============================================
   Jim & Alysha — February 22, 2026
   Winter Wedding in the Cascades
   ============================================ */

/* --- Custom Properties --- */
:root {
  --deep-plum: #2D1B36;
  --royal-purple: #5B3A6B;
  --lavender: #C3A6D8;
  --pale-lavender: #EDE4F3;
  --snow: #FAFAFA;
  --cream: #FFF8F0;
  --silver: #C0C0C0;
  --charcoal: #2C2C2C;
  --warm-gray: #6B6270;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;

  --nav-height: 72px;
  --transition: 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--snow);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--royal-purple);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 0.5em;
}

/* --- Utility: Fade-in on Scroll --- */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children */
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* --- Section Shared --- */
.section {
  padding: 80px 24px;
}

.section__container {
  max-width: 1120px;
  margin: 0 auto;
}

.section__subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--warm-gray);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  text-align: center;
  letter-spacing: 0.01em;
}

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

/* decorative line under headings */
.section__heading-group::after {
  content: '';
  display: block;
  width: 56px;
  height: 1px;
  background: var(--silver);
  margin: 1rem auto 0;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  transition: background var(--transition), box-shadow var(--transition);
}

.nav--scrolled {
  background: var(--deep-plum);
  box-shadow: 0 2px 20px rgba(45, 27, 54, 0.3);
}

.nav__brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity var(--transition);
}

.nav--scrolled .nav__brand {
  opacity: 1;
}

.nav__links {
  display: none;
  list-style: none;
  gap: 2rem;
}

.nav__links a {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 2px;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--lavender);
  transition: width var(--transition);
}

.nav__links a:hover::after,
.nav__links a:focus::after {
  width: 100%;
}

/* Hamburger */
.nav__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 110;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: transform var(--transition), opacity var(--transition);
}

.nav__hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Overlay */
.nav__overlay {
  position: fixed;
  inset: 0;
  background: var(--deep-plum);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 105;
}

.nav__overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav__overlay-links {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.nav__overlay-links a {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: #fff;
  letter-spacing: 0.04em;
  transition: color var(--transition);
}

.nav__overlay-links a:hover,
.nav__overlay-links a:focus {
  color: var(--lavender);
}

/* Desktop nav */
@media (min-width: 768px) {
  .nav__links {
    display: flex;
  }

  .nav__hamburger {
    display: none;
  }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('../photos-web/hero-mobile.jpeg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}

@media (min-width: 768px) {
  .hero__bg {
    background-image: url('../photos-web/hero-desktop.jpeg');
  }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(45, 27, 54, 0.55) 0%,
    rgba(45, 27, 54, 0.4) 50%,
    rgba(45, 27, 54, 0.65) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 80px 24px 0;
}

.hero__names {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero__ampersand {
  display: inline-block;
  font-style: italic;
  font-weight: 400;
  opacity: 0.85;
  margin: 0 0.1em;
}

.hero__line {
  width: 72px;
  height: 1px;
  background: var(--silver);
  margin: 1.2rem auto;
}

.hero__date {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.hero__location {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.8);
}

.hero__congrats {
  display: none;
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: hero-bounce 2.4s ease-in-out infinite;
}

.hero__scroll svg {
  width: 28px;
  height: 28px;
  stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 2;
  fill: none;
}

@keyframes hero-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ============================================
   COUNTDOWN
   ============================================ */
.countdown-section {
  background: var(--cream);
  padding: 56px 24px;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.25rem;
  text-align: center;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown__number {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--royal-purple);
  line-height: 1;
  margin-bottom: 0.1em;
}

.countdown__label {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 300;
  color: var(--warm-gray);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ============================================
   TIMELINE — Our Day
   ============================================ */
.story-section {
  padding-bottom: 20px;
}

.timeline-section {
  background: var(--snow);
  padding-top: 20px;
}

.timeline__accent-photo {
  display: block;
  max-height: 400px;
  width: auto;
  max-width: 280px;
  margin: 0 auto 3rem;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 32px rgba(45, 27, 54, 0.12);
}

.timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 0;
}

/* Vertical line */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background: var(--lavender);
}

.timeline__item {
  position: relative;
  padding-left: 56px;
  margin-bottom: 3rem;
}

.timeline__item:last-child {
  margin-bottom: 0;
}

/* Dot */
.timeline__dot {
  position: absolute;
  left: 12px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--royal-purple);
  border: 3px solid var(--pale-lavender);
  box-shadow: 0 0 0 3px var(--royal-purple);
}

.timeline__time {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--royal-purple);
  margin-bottom: 0.25rem;
}

.timeline__title {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 0.15rem;
}

.timeline__desc {
  font-size: 0.95rem;
  color: var(--warm-gray);
  font-weight: 300;
}

/* Desktop: alternating layout */
@media (min-width: 768px) {
  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .timeline__item {
    width: 50%;
    padding-left: 0;
    margin-bottom: 4rem;
  }

  .timeline__item:nth-child(odd) {
    padding-right: 48px;
    text-align: right;
  }

  .timeline__item:nth-child(even) {
    margin-left: 50%;
    padding-left: 48px;
    text-align: left;
  }

  .timeline__dot {
    left: auto;
    right: -9px;
    top: 6px;
  }

  .timeline__item:nth-child(even) .timeline__dot {
    left: -9px;
    right: auto;
  }
}

/* ============================================
   VENUE
   ============================================ */
.venue-section {
  background: var(--pale-lavender);
}

.venue__grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.venue__photo {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  box-shadow: 0 8px 32px rgba(45, 27, 54, 0.1);
}

.venue__card {
  text-align: center;
}

.venue__label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-bottom: 0.75rem;
}

.venue__address {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  color: var(--royal-purple);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.venue__note {
  font-size: 0.95rem;
  color: var(--warm-gray);
  font-weight: 300;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.venue__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 14px 32px;
  background: var(--royal-purple);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 40px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.venue__btn:hover,
.venue__btn:focus {
  background: var(--deep-plum);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(45, 27, 54, 0.25);
}

.venue__btn:focus {
  outline: 2px solid var(--lavender);
  outline-offset: 3px;
}

.venue__btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

@media (min-width: 768px) {
  .venue__grid {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }

  .venue__card {
    text-align: left;
  }
}

/* ============================================
   GALLERY — Our Story
   ============================================ */
.gallery-section {
  background: var(--snow);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 200px;
  grid-auto-flow: dense;
  gap: 12px;
}

.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.4s ease;
}

.gallery__item:hover img,
.gallery__item:focus-within img {
  transform: scale(1.04);
}

.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(45, 27, 54, 0);
  transition: background 0.3s ease;
  pointer-events: none;
}

.gallery__item:hover::after {
  background: rgba(45, 27, 54, 0.08);
}

/* Featured spans */
.gallery__item--portrait {
  grid-row: span 2;
}

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

@media (min-width: 640px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 220px;
    gap: 14px;
  }
}

@media (min-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 260px;
    gap: 16px;
  }
}

/* ============================================
   LIGHTBOX (native <dialog>)
   ============================================ */
.lightbox {
  border: none;
  background: transparent;
  max-width: 92vw;
  max-height: 92vh;
  padding: 0;
  overflow: visible;
  margin: auto;
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox:not([open]) {
  display: none;
}

.lightbox::backdrop {
  background: rgba(45, 27, 54, 0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lightbox__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 4px;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.4);
}

.lightbox__close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--deep-plum);
  color: #fff;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.lightbox__close:hover,
.lightbox__close:focus {
  background: var(--royal-purple);
  transform: scale(1.1);
}

.lightbox__close:focus {
  outline: 2px solid var(--lavender);
  outline-offset: 2px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--deep-plum);
  color: #fff;
  text-align: center;
  padding: 56px 24px;
}

.footer__names {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.footer__date {
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lavender);
  margin-bottom: 1.5rem;
}

.footer__line {
  width: 40px;
  height: 1px;
  background: var(--lavender);
  margin: 0 auto 1.5rem;
  opacity: 0.5;
}

.footer__made {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 300;
}

.footer__azure {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.2);
  font-weight: 300;
  margin-top: 1rem;
}

/* ============================================
   STORY TIMELINE
   ============================================ */
.story-timeline {
  position: relative;
  max-width: 960px;
  margin: 0 auto 4rem;
  padding: 2rem 0;
}

.story-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background: var(--lavender);
}

.story-event {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding-left: 56px;
  margin-bottom: 3.5rem;
}

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

.story-event__photo {
  flex-shrink: 0;
  width: 140px;
  aspect-ratio: 4 / 3;
  background: #E0E0E0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  order: 1;
}

.story-event__photo span {
  font-size: 0.75rem;
  color: var(--warm-gray);
  text-align: center;
  padding: 0.5rem;
}

.story-event__dot {
  position: absolute;
  left: 12px;
  top: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--royal-purple);
  border: 3px solid var(--pale-lavender);
  box-shadow: 0 0 0 3px var(--royal-purple);
  z-index: 1;
}

.story-event__content {
  order: 2;
}

.story-event__date {
  display: inline-block;
  background: var(--royal-purple);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 0.5rem;
}

.story-event__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--royal-purple);
  margin-bottom: 0.25rem;
}

.story-event__desc {
  font-size: 0.95rem;
  color: var(--warm-gray);
  font-weight: 300;
}

.story-event--finale .story-event__dot {
  background: var(--deep-plum);
  box-shadow: 0 0 0 3px var(--deep-plum);
  width: 22px;
  height: 22px;
  left: 10px;
}

.story-event--finale .story-event__date {
  background: var(--deep-plum);
}

.story-event--finale .story-event__title {
  color: var(--deep-plum);
  font-size: 1.35rem;
}

.story-divider {
  width: 56px;
  height: 1px;
  background: var(--silver);
  margin: 0 auto 3rem;
}

@media (min-width: 768px) {
  .story-timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .story-event {
    width: 50%;
    padding-left: 0;
    align-items: center;
  }

  .story-event__dot {
    top: 50%;
    transform: translateY(-50%);
  }

  .story-event--right {
    padding-right: 48px;
    flex-direction: row-reverse;
    text-align: right;
  }

  .story-event--right .story-event__dot {
    left: auto;
    right: -9px;
    transform: translateY(-50%);
  }

  .story-event--left {
    margin-left: 50%;
    padding-left: 48px;
  }

  .story-event--left .story-event__dot {
    left: -9px;
    transform: translateY(-50%);
  }

  .story-event--finale.story-event--left .story-event__dot {
    left: -11px;
  }

  .story-event__photo {
    width: 180px;
  }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  .nav,
  .hero__scroll,
  .nav__overlay {
    display: none !important;
  }

  .hero {
    height: auto;
    min-height: auto;
    padding: 2rem;
    color: #000;
  }

  .hero__bg,
  .hero__scrim {
    display: none;
  }

  .hero__names,
  .hero__date,
  .hero__location {
    color: #000;
  }

  .section {
    padding: 2rem 1rem;
    break-inside: avoid;
  }

  .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }

  .gallery__item {
    break-inside: avoid;
  }
}
