﻿:root {
  --ruby: #0f6f8f;
  --ruby-dark: #093b4d;
  --rose: #c8edf4;
  --ivory: #f7fcfb;
  --paper: #eaf7f5;
  --teal: #b9852c;
  --ink: #12313a;
  --muted: #5f7880;
  --line: rgba(15, 111, 143, 0.16);
  --shadow: 0 24px 64px rgba(9, 59, 77, 0.22);
}

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

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

body {
  min-height: 100dvh;
  font-family: "Nunito Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(200, 237, 244, 0.55), transparent 26rem),
    linear-gradient(135deg, #f7fcfb, #e1f3f5 46%, #fff7e7);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  touch-action: manipulation;
}

img {
  display: block;
  width: 100%;
}

.invite-frame {
  position: relative;
  width: min(100%, 560px);
  height: min(100dvh, 930px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(247, 252, 251, 0.96), rgba(234, 247, 245, 0.98)),
    url("../assets/flower.png") top right/360px auto no-repeat;
  box-shadow: var(--shadow);
}

.cover-screen {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: minmax(210px, 42%) minmax(0, 1fr);
  background: var(--ivory);
  transition: opacity 0.75s ease, visibility 0.75s ease, transform 0.75s ease;
}

.cover-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-18px);
  pointer-events: none;
}

.cover-photo {
  position: relative;
  background:
    linear-gradient(180deg, rgba(9, 59, 77, 0.04), rgba(9, 59, 77, 0.34)),
    url("../img/cover.JPG") center/cover;
}

.cover-photo::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -38px;
  width: 86px;
  height: 86px;
  border: 8px solid var(--ivory);
  border-radius: 999px;
  background: var(--ruby);
  transform: translateX(-50%);
}

.cover-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  overflow-y: auto;
  padding: 46px 22px 24px;
  text-align: center;
}

.microcopy {
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cover-panel h1,
.hero-card h2,
.section-heading h3,
.person-card h3 {
  font-family: "Fraunces", serif;
  font-weight: 800;
  line-height: 1.06;
}

.cover-panel h1 {
  margin: 10px 0 12px;
  color: var(--ruby-dark);
  font-size: clamp(1.95rem, 9vw, 3.6rem);
  text-wrap: balance;
}

.line {
  display: block;
  width: 72px;
  height: 3px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--rose);
}

.recipient-label {
  color: var(--muted);
}

.guest-name {
  margin: 4px 0 18px;
  color: var(--ruby);
  font-weight: 800;
}

.open-button,
.rsvp-form button,
.rsvp-form a,
.event-card a {
  min-height: 44px;
  border: none;
  border-radius: 999px;
  color: var(--ivory);
  background: linear-gradient(135deg, var(--ruby), var(--teal));
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.open-button {
  position: relative;
  z-index: 2;
  width: min(100%, 240px);
  flex: 0 0 auto;
  padding: 12px 22px;
}

.open-button:hover,
.rsvp-form button:hover,
.rsvp-form a:hover,
.event-card a:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15, 111, 143, 0.22);
}

.content {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 14px 34px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 0.75s ease, visibility 0.75s ease, transform 0.75s ease;
  -webkit-overflow-scrolling: touch;
}

.content.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hero-section,
.countdown-section,
.couple-section,
.story-section,
.event-section,
.gallery-section,
.wish-section,
.rsvp-section {
  margin-bottom: 16px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: var(--ruby-dark);
}

.hero-image {
  height: 430px;
}

.hero-image img {
  height: 100%;
  object-fit: cover;
}

.hero-card {
  position: relative;
  margin: -88px 14px 14px;
  padding: 22px 18px;
  border-radius: 22px;
  background: rgba(247, 252, 251, 0.94);
  text-align: center;
  box-shadow: 0 18px 40px rgba(9, 59, 77, 0.2);
}

.hero-card h2 {
  margin: 8px 0 10px;
  color: var(--ruby-dark);
  font-size: clamp(2rem, 11vw, 4.1rem);
  text-wrap: balance;
}

.date {
  margin-bottom: 10px;
  color: var(--ruby);
  font-weight: 800;
}

.quote,
.person-card p,
.timeline p,
.event-card p,
.wish-list,
.rsvp-form p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

.guest-chip {
  display: inline-flex;
  gap: 4px;
  margin-top: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ruby-dark);
  background: rgba(200, 237, 244, 0.5);
  font-size: 0.9rem;
}

.countdown-section,
.story-section,
.event-section,
.gallery-section,
.wish-section,
.rsvp-section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(247, 252, 251, 0.78);
}

.timer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.timer-grid div {
  min-width: 0;
  padding: 12px 6px;
  border-radius: 16px;
  background: var(--paper);
  text-align: center;
}

.timer-grid strong {
  display: block;
  color: var(--ruby);
  font-size: 1.28rem;
}

.timer-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.couple-section {
  display: grid;
  gap: 10px;
}

.person-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 24px;
  background: var(--ivory);
  box-shadow: 0 12px 30px rgba(9, 59, 77, 0.09);
}

.person-card-right {
  grid-template-columns: 1fr 112px;
  text-align: right;
}

.person-card-right img {
  grid-column: 2;
  grid-row: 1;
}

.person-card-right div {
  grid-column: 1;
  grid-row: 1;
}

.person-card img {
  height: 138px;
  border-radius: 18px;
  object-fit: cover;
}

.person-card h3 {
  margin: 5px 0 7px;
  color: var(--ruby-dark);
  font-size: 1.62rem;
}

.couple-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: -3px auto;
  border-radius: 999px;
  color: var(--ivory);
  background: var(--ruby);
  font-family: "Fraunces", serif;
  font-size: 1.6rem;
}

.section-heading {
  margin-bottom: 16px;
  text-align: center;
}

.section-heading h3 {
  margin-top: 5px;
  color: var(--ruby-dark);
  font-size: 1.74rem;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline article {
  position: relative;
  padding: 14px 14px 14px 56px;
  border-radius: 18px;
  background: var(--paper);
}

.timeline span {
  position: absolute;
  left: 14px;
  top: 14px;
  color: var(--teal);
  font-family: "Fraunces", serif;
  font-weight: 800;
}

.timeline h4 {
  margin-bottom: 4px;
}

.event-grid {
  display: grid;
  gap: 12px;
}

.event-card {
  padding: 16px;
  border-radius: 18px;
  background: var(--paper);
}

.event-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.event-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ruby-dark);
  line-height: 1.45;
}

.event-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 10px 15px;
  font-size: 0.9rem;
}

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

.gallery-thumb {
  overflow: hidden;
  aspect-ratio: 1 / 1.18;
  border: none;
  border-radius: 18px;
  background: var(--paper);
  cursor: zoom-in;
}

.gallery-thumb img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-thumb:hover img {
  transform: scale(1.06);
}

.wish-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.wish-list li {
  padding: 14px;
  border-radius: 18px;
  background: var(--paper);
}

.wish-list strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ruby-dark);
}

.rsvp-form {
  display: grid;
  gap: 10px;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--ivory);
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  outline: none;
  border-color: var(--ruby);
  box-shadow: 0 0 0 3px rgba(15, 111, 143, 0.12);
}

.rsvp-form button,
.rsvp-form a {
  display: grid;
  place-items: center;
  padding: 12px 18px;
}

.music-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 999px;
  color: var(--ivory);
  background: var(--ruby);
  box-shadow: 0 12px 28px rgba(9, 59, 77, 0.24);
  cursor: pointer;
  font-weight: 800;
}

.music-button.is-muted {
  background: #8d7e81;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 49, 58, 0.86);
  backdrop-filter: blur(8px);
}

.lightbox-panel {
  position: relative;
  width: min(92vw, 760px);
}

.lightbox-panel img {
  max-height: 82dvh;
  border: 1px solid rgba(247, 252, 251, 0.55);
  border-radius: 22px;
  object-fit: contain;
  background: var(--ink);
  box-shadow: 0 24px 64px rgba(18, 49, 58, 0.42);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  color: var(--ivory);
  background: var(--ruby);
  cursor: pointer;
}

.lightbox-close {
  top: 12px;
  right: 12px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 12px;
}

.lightbox-next {
  right: 12px;
}

@media (max-width: 390px) {
  .timer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .person-card,
  .person-card-right {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .person-card-right img,
  .person-card-right div {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-height: 720px) {
  .cover-screen {
    grid-template-rows: minmax(170px, 36%) minmax(0, 1fr);
  }

  .cover-photo::after {
    width: 68px;
    height: 68px;
    bottom: -30px;
    border-width: 6px;
  }

  .cover-panel {
    padding-top: 36px;
    padding-bottom: 18px;
  }

  .cover-panel h1 {
    font-size: clamp(1.65rem, 8vw, 2.6rem);
    margin-bottom: 8px;
  }

  .line {
    margin-bottom: 10px;
  }

  .guest-name {
    margin-bottom: 12px;
  }
}

@media (min-width: 720px) {
  .invite-frame {
    min-height: 92dvh;
    margin: 28px auto;
    border: 1px solid var(--line);
    border-radius: 34px;
  }

  .content {
    padding: 18px;
  }

  .hero-section {
    display: grid;
    grid-template-columns: 0.95fr 1fr;
  }

  .hero-image {
    height: auto;
    min-height: 520px;
  }

  .hero-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 18px 18px 18px -34px;
  }

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

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

/* Ocean Pearl layout identity */
.theme-ocean-pearl .invite-frame { width: min(100%, 620px); background: linear-gradient(180deg, rgba(247,252,251,.98), rgba(234,247,245,.98)); }
.theme-ocean-pearl .cover-screen { grid-template-rows: 56% 44%; }
.theme-ocean-pearl .cover-photo { border-bottom-left-radius: 46% 12%; border-bottom-right-radius: 46% 12%; overflow: hidden; }
.theme-ocean-pearl .cover-photo::after { background: linear-gradient(135deg, var(--ruby), var(--teal)); box-shadow: 0 14px 40px rgba(15,111,143,.24); }
.theme-ocean-pearl .cover-panel { justify-content: center; padding-top: 54px; }
.theme-ocean-pearl .hero-section { border-radius: 32px 32px 140px 32px; background: linear-gradient(145deg, var(--ruby-dark), var(--ruby)); }
.theme-ocean-pearl .hero-card { margin: -58px 26px 22px; border-radius: 999px 999px 34px 34px; padding: 30px 24px; }
.theme-ocean-pearl .timer-grid div { border-radius: 999px; }
.theme-ocean-pearl .person-card { border-radius: 999px 28px 28px 999px; grid-template-columns: 132px 1fr; }
.theme-ocean-pearl .person-card-right { border-radius: 28px 999px 999px 28px; grid-template-columns: 1fr 132px; }
.theme-ocean-pearl .person-card img { border-radius: 999px; }
.theme-ocean-pearl .gallery-thumb:first-child { grid-column: span 2; aspect-ratio: 2 / 1; }
@media (min-width: 720px) { .theme-ocean-pearl .hero-card { margin: 28px 28px 28px -62px; } }
