/*
 * Couple page portrait system.
 */

.couple-opening {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-height));
  padding: calc(var(--header-height) + 3rem) 4.5rem 5.5rem;
  color: #fff8ed;
  background: #050403;
}

.couple-opening::before,
.couple-opening::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.couple-opening::before {
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(5, 4, 3, 0.76), rgba(5, 4, 3, 0.18) 55%, rgba(5, 4, 3, 0.74)),
    linear-gradient(180deg, rgba(5, 4, 3, 0.04), rgba(5, 4, 3, 0.68));
}

.couple-opening::after {
  z-index: 5;
  border-top: 4.4rem solid #030202;
  border-bottom: 4.4rem solid #030202;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.couple-opening-bg {
  position: absolute;
  z-index: 0;
  inset: 0;
  transform: scale(1.04);
  animation: couplePosterDrift 18s ease-in-out infinite alternate;
}

.couple-opening-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
}

.couple-opening-bg img.active {
  opacity: 1;
}

.couple-opening-overlay,
.couple-opening-vignette {
  display: none;
}

.couple-opening-content {
  position: relative;
  z-index: 10;
  display: grid;
  gap: 1rem;
  width: min(64rem, 100%);
  color: #fff8ed;
}

.couple-opening-kicker,
.couple-opening-meta,
.couple-section-kicker,
.divider-subtitle,
.together-kicker,
.profile-label,
.heritage-label {
  font-family: var(--font-accent);
  letter-spacing: 0;
  text-transform: uppercase;
}

.couple-opening-kicker,
.couple-section-kicker,
.together-kicker,
.profile-label {
  color: #d8b861;
  font-size: 0.82rem;
  font-weight: 600;
}

.couple-opening-title {
  display: grid;
  gap: 0;
  margin: 0;
  color: #fff8ed;
  font-family: "Pinyon Script", var(--font-script);
  font-size: 8rem;
  font-weight: 400;
  line-height: 0.76;
  text-shadow: 0 24px 80px rgba(0, 0, 0, 0.68);
}

.couple-opening-title .name,
.couple-opening-title .amp {
  display: block;
}

.couple-opening-title .amp {
  color: #d8b861;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.38em;
  font-style: italic;
  line-height: 0.85;
}

.couple-opening-subtitle {
  width: min(43rem, 100%);
  margin: 0;
  color: rgba(255, 248, 237, 0.78);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-style: normal;
  line-height: 1.34;
}

.couple-opening-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  color: rgba(255, 248, 237, 0.66);
  font-size: 0.78rem;
  font-weight: 700;
}

.couple-opening-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.couple-opening-meta span + span::before {
  content: "";
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 999px;
  background: #d8b861;
}

.couple-opening-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.35rem;
}

.couple-opening-actions .btn {
  min-width: 11rem;
  min-height: 3.1rem;
  border-radius: 999px;
}

.couple-opening-scroll {
  width: max-content;
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.35rem;
  padding: 0;
  border: 0;
  color: #d8b861;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.couple-opening-scroll:focus-visible,
.couple-opening-actions .btn:focus-visible,
.together-cta .btn:focus-visible {
  outline: 3px solid rgba(216, 184, 97, 0.86);
  outline-offset: 5px;
}

.scroll-arrow {
  width: 1.45rem;
  height: 1.45rem;
  border: 1px solid rgba(216, 184, 97, 0.72);
  border-radius: 50%;
  position: relative;
}

.scroll-arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  width: 0.42rem;
  height: 0.42rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.couple-portrait {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(18rem, 0.65fr);
  gap: 2rem;
  align-items: center;
  scroll-margin-top: 5.75rem;
  padding: 5rem 4.5rem;
  color: #fff8ed;
  background:
    radial-gradient(circle at 12% 18%, rgba(216, 184, 97, 0.13), transparent 30rem),
    linear-gradient(135deg, #050403 0%, #10251e 44%, #5b1e2d 100%);
}

.couple-portrait__copy {
  display: grid;
  gap: 1rem;
  width: min(48rem, 100%);
}

.couple-portrait h2,
.together-title {
  margin: 0;
  color: #fff8ed;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 300;
  line-height: 1;
}

.couple-portrait p:not(.couple-section-kicker),
.together-subtitle {
  margin: 0;
  color: rgba(255, 248, 237, 0.72);
  font-size: 1.05rem;
  line-height: 1.7;
}

.couple-portrait__frames {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  transform: rotate(2deg);
}

.couple-portrait__frames figure {
  aspect-ratio: 4 / 5;
  margin: 0;
  overflow: hidden;
  border: 0.45rem solid rgba(255, 248, 237, 0.86);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.couple-portrait__frames figure:last-child {
  margin-top: 3rem;
}

.couple-portrait__frames img,
.profile-photo img,
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
  scroll-margin-top: 5.75rem;
  overflow: hidden;
  background: #f2e5ce;
}

.profile-section.bride {
  direction: rtl;
}

.profile-section.bride > * {
  direction: ltr;
}

.profile-photo {
  position: relative;
  overflow: hidden;
  min-height: 36rem;
}

.profile-photo img {
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-photo:hover img {
  transform: scale(1.035);
}

.profile-photo-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, transparent 58%, rgba(5, 4, 3, 0.32) 100%),
    linear-gradient(180deg, transparent 0%, rgba(5, 4, 3, 0.18) 100%);
  pointer-events: none;
}

.profile-section.bride .profile-photo-overlay {
  background:
    linear-gradient(-90deg, transparent 0%, transparent 58%, rgba(5, 4, 3, 0.32) 100%),
    linear-gradient(180deg, transparent 0%, rgba(5, 4, 3, 0.18) 100%);
}

.profile-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 4.5rem;
  color: #24170d;
  background: linear-gradient(135deg, #f7edd8 0%, #e2cfa5 100%);
}

.profile-content::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.28rem;
  background: linear-gradient(180deg, #5b1e2d, #b88a1b, #0e6b4f);
}

.profile-name {
  margin: 0;
  color: #8c6510;
  font-family: "Pinyon Script", var(--font-script);
  font-size: 6rem;
  font-weight: 400;
  line-height: 0.9;
}

.profile-fullname {
  margin: 0 0 0.5rem;
  color: rgba(36, 23, 13, 0.72);
  font-family: var(--font-accent);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-lineage,
.profile-verse,
.heritage-item {
  border: 1px solid rgba(36, 23, 13, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.7);
  box-shadow: 0 18px 42px rgba(80, 51, 22, 0.1);
}

.profile-lineage,
.profile-verse {
  padding: 1rem;
}

.profile-lineage-label,
.verse-reference {
  color: #8c6510;
  font-family: var(--font-accent);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-lineage-names {
  margin-top: 0.35rem;
  color: #24170d;
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.42;
}

.profile-verse {
  display: grid;
  gap: 0.75rem;
  background: rgba(255, 250, 241, 0.54);
}

.profile-verse::before {
  content: none;
}

.verse-text {
  margin: 0;
  color: rgba(36, 23, 13, 0.78);
  font-family: var(--font-primary);
  font-size: 1.08rem;
  font-style: italic;
  line-height: 1.75;
}

.verse-reference {
  text-align: right;
}

.profile-heritage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.heritage-item {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem;
  text-align: center;
}

.heritage-label {
  color: #8c6510;
  font-size: 0.72rem;
  font-weight: 700;
}

.heritage-value {
  color: #24170d;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
}

.couple-divider {
  padding: 4rem 1rem;
  color: #fff8ed;
  background: linear-gradient(135deg, #5b1e2d, #8c6510 48%, #0e6b4f);
  text-align: center;
}

.divider-content {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  width: min(46rem, 100%);
  margin: 0 auto;
}

.divider-monogram {
  width: 6rem;
  height: 6rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 248, 237, 0.54);
  border-radius: 50%;
  background: rgba(255, 248, 237, 0.12);
}

.divider-monogram span {
  color: #fff8ed;
  font-family: "Pinyon Script", var(--font-script);
  font-size: 2.4rem;
}

.divider-text {
  margin: 0;
  color: #fff8ed;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
}

.divider-subtitle {
  margin: 0;
  color: rgba(255, 248, 237, 0.82);
  font-size: 0.82rem;
  font-weight: 700;
}

.couple-together {
  padding: 5rem 4.5rem;
  color: #24170d;
  background: #f2e5ce;
}

.together-header {
  display: grid;
  gap: 0.85rem;
  width: min(48rem, 100%);
  margin: 0 auto 2rem;
  text-align: center;
}

.together-kicker {
  color: #8c6510;
}

.together-title {
  color: #24170d;
}

.together-subtitle {
  color: rgba(36, 23, 13, 0.72);
}

.together-gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(2, 18.75rem);
  gap: 0.85rem;
  width: min(86rem, 100%);
  margin: 0 auto 2rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(80, 51, 22, 0.18);
}

.gallery-item:nth-child(1) {
  grid-column: 1 / 5;
  grid-row: 1 / 3;
}

.gallery-item:nth-child(2) {
  grid-column: 5 / 9;
  grid-row: 1 / 2;
}

.gallery-item:nth-child(3) {
  grid-column: 9 / 13;
  grid-row: 1 / 2;
}

.gallery-item:nth-child(4) {
  grid-column: 5 / 8;
  grid-row: 2 / 3;
}

.gallery-item:nth-child(5) {
  grid-column: 8 / 13;
  grid-row: 2 / 3;
}

.gallery-item img {
  transition: transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.together-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.together-cta .btn {
  min-width: 12rem;
}

@keyframes couplePosterDrift {
  from {
    transform: scale(1.04) translate3d(-0.8rem, -0.4rem, 0);
  }
  to {
    transform: scale(1.12) translate3d(0.8rem, 0.4rem, 0);
  }
}
