/* ============================================================
   Shellebrate — The Summer I Turned Forty
   Palette pulled from the invite: turquoise sea, soft sand,
   foam white, with a warm sunset-coral accent.
   ============================================================ */
:root {
  --sea-deep:  #1f7a8c;
  --sea:       #2a9d9c;
  --sea-light: #6fc3c0;
  --sand:      #f4ece0;
  --sand-deep: #e6d8c3;
  --foam:      #ffffff;
  --ink:       #173e4f;   /* deep teal-navy for text */
  --coral:     #ef8a6a;   /* sunset accent */
  --coral-dk:  #d96f4f;

  --shadow: 0 18px 50px -18px rgba(23, 62, 79, 0.45);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Shared ---------- */
.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  font-weight: 500;
}

.section-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  text-align: center;
  color: var(--sea-deep);
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--coral);
  color: var(--foam);
  box-shadow: 0 10px 24px -8px rgba(217, 111, 79, 0.7);
}
.btn--primary:hover { background: var(--coral-dk); }

.btn--ghost {
  background: transparent;
  color: var(--foam);
  border-color: rgba(255, 255, 255, 0.7);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.15); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--foam);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255,255,255,0.25), transparent 55%),
    linear-gradient(180deg, var(--sea-deep) 0%, var(--sea) 45%, var(--sea-light) 78%, var(--sand) 100%);
}

/* Soft sun + drifting light */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 18%, rgba(255, 240, 200, 0.55), transparent 38%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  line-height: 1.04;
  font-size: clamp(2.8rem, 11vw, 6rem);
  margin: 0.6rem 0 0.4rem;
  text-shadow: 0 4px 24px rgba(23, 62, 79, 0.35);
}
.hero__title em { color: #ffe7d3; font-style: italic; }

/* Name overline — "─── SHELLEY ───" sitting above the headline */
.hero__name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.7rem, 3vw, 1.3rem);
  margin: 0.8rem 0 0.1rem;
}
.hero__name::before,
.hero__name::after {
  content: "";
  height: 1px;
  width: clamp(26px, 11vw, 72px);
  background: #ffe7d3;
  opacity: 0.55;
}
.hero__name span {
  font-family: var(--serif);
  text-transform: uppercase;
  letter-spacing: 0.42em;
  padding-left: 0.42em; /* offsets trailing letter-spacing so it stays centered */
  font-size: clamp(1rem, 3.8vw, 1.5rem);
  font-weight: 500;
  color: #ffe7d3;
  text-shadow: 0 2px 16px rgba(23, 62, 79, 0.35);
}

.hero__subtitle {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-weight: 300;
  font-size: clamp(0.7rem, 2.4vw, 0.95rem);
  opacity: 0.95;
  margin-bottom: 2.4rem;
}

/* ---------- Countdown ---------- */
.countdown {
  display: flex;
  gap: clamp(0.6rem, 3vw, 1.8rem);
  justify-content: center;
  margin-bottom: 0.8rem;
}
.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 62px;
  padding: 0.8rem 0.4rem;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  backdrop-filter: blur(6px);
}
.countdown__num {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  font-weight: 600;
  line-height: 1;
}
.countdown__label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.6rem;
  margin-top: 0.4rem;
  opacity: 0.85;
}
.countdown__message {
  min-height: 1.2em;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 2rem;
  color: #fff2e6;
}

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

.hero__scroll {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  color: var(--ink);
  opacity: 0.6;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ============================================================
   DETAILS
   ============================================================ */
.details { padding: clamp(3.5rem, 9vw, 6rem) 1.5rem; max-width: 1040px; margin: 0 auto; }
.details__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.4rem;
}
.detail-card {
  background: var(--foam);
  border-radius: 18px;
  padding: 2rem 1.4rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--sand-deep);
  transition: transform 0.2s ease;
}
.detail-card:hover { transform: translateY(-4px); }
.detail-card__icon { font-size: 2rem; display: block; margin-bottom: 0.6rem; }
.detail-card h3 {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--sea);
  margin-bottom: 0.6rem;
}
.detail-card p { font-size: 1rem; }
.detail-card strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.detail-card a { color: var(--coral-dk); text-decoration: none; }
.detail-card a:hover { text-decoration: underline; }

/* ============================================================
   INVITE
   ============================================================ */
.invite {
  padding: clamp(2rem, 6vw, 4rem) 1.5rem clamp(3.5rem, 9vw, 6rem);
  text-align: center;
  background: linear-gradient(180deg, var(--sand) 0%, var(--sand-deep) 100%);
}
.invite__frame {
  max-width: 420px;
  margin: 0 auto 2rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}
.invite__frame:hover { transform: scale(1.02) rotate(-0.5deg); }
.invite__frame img { display: block; width: 100%; height: auto; }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery { padding: clamp(3.5rem, 9vw, 6rem) 1.5rem; max-width: 1100px; margin: 0 auto; }
.gallery__intro {
  text-align: center;
  max-width: 520px;
  margin: -1rem auto 2.6rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--sea-deep);
}
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-auto-rows: 200px;
  gap: 0.8rem;
}

/* Invite guests to contribute their own photos */
.gallery__share {
  text-align: center;
  max-width: 540px;
  margin: 2.8rem auto 0;
  padding: 1.8rem 1.6rem;
  background: var(--foam);
  border: 1px solid var(--sand-deep);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.gallery__share-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--sea-deep);
  margin-bottom: 0.5rem;
}
.gallery__share-text { font-size: 0.98rem; }
.gallery__share-text a {
  color: var(--coral-dk);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.gallery__share-text a:hover { text-decoration: underline; }
.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: var(--shadow);
  background: var(--sand-deep);
}
/* Let a few photos span larger cells for a curated mosaic feel */
.gallery__item--tall { grid-row: span 2; }
.gallery__item--wide { grid-column: span 2; }
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gallery__item:hover img { transform: scale(1.08); }
.gallery__item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.9rem 0.8rem 0.6rem;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.66rem;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(23, 62, 79, 0.78));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.gallery__item:hover figcaption { opacity: 1; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  text-align: center;
  padding: 3rem 1.5rem 3.5rem;
  background: var(--sea-deep);
  color: var(--foam);
}
.footer__pun { font-family: var(--serif); font-style: italic; font-size: 1.6rem; margin-bottom: 0.5rem; }
.footer__domain { text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.72rem; opacity: 0.8; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(13, 38, 48, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2rem;
}
.lightbox.is-open { display: flex; }
.lightbox__figure { max-width: 90vw; max-height: 88vh; text-align: center; }
.lightbox__figure img {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.lightbox__figure figcaption {
  color: #fff;
  margin-top: 0.9rem;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
}
.lightbox__close, .lightbox__nav {
  position: absolute;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,0.28); }
.lightbox__close { top: 1.2rem; right: 1.2rem; width: 46px; height: 46px; font-size: 1.8rem; line-height: 1; }
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 56px; height: 56px; font-size: 2.2rem; }
.lightbox__nav--prev { left: 1rem; }
.lightbox__nav--next { right: 1rem; }

@media (max-width: 600px) {
  .lightbox__nav { width: 44px; height: 44px; font-size: 1.8rem; }
  .countdown__unit { min-width: 54px; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
