/* ==========================================================
   Wedding Pricing Page
   ========================================================== */

.wedding-pricing-page {
  background:
    radial-gradient(
      circle at 15% 12%,
      rgba(215, 195, 163, 0.28),
      transparent 32rem
    ),
    radial-gradient(
      circle at 82% 38%,
      rgba(154, 165, 140, 0.16),
      transparent 30rem
    ),
    linear-gradient(135deg, var(--ivory), #fbf7ef 42%, var(--paper));
}

.pricing-hero {
  min-height: 82svh;
  display: grid;
  place-items: center;
  padding: 8rem 1.25rem 5rem;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--ivory);
  text-align: center;
}

.pricing-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(32, 26, 22, 0.52), rgba(32, 26, 22, 0.72)),
    url("../images/collectionshero.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transform-origin: center;
  will-change: transform;
}

.pricing-hero-content {
  width: min(100%, 940px);
}

.pricing-hero h1 {
  margin: 0;
  font-family: var(--serif1);
  font-size: clamp(4rem, 10vw, 9.5rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.pricing-hero h1 span,
h2 span {
  display: block;
  font-style: italic;
  color: #f3dcb8;
}

.pricing-hero p:not(.eyebrow) {
  width: min(100%, 680px);
  margin: 1.25rem auto 0;
  color: rgba(255, 250, 242, 0.84);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.pricing-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.pricing-card,
.custom-card {
  position: relative;
  perspective: 1400px;
}

.pricing-card {
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.pricing-card.reveal {
  opacity: 1;
  filter: none;
  transition: transform 0.95s cubic-bezier(0.18, 0.72, 0.22, 1);
}

.pricing-card:focus-within,
.custom-card:focus-within,
.combined-package-card:focus-within,
.summary-panel:focus-within {
  box-shadow:
    0 0 0 3px rgba(185, 130, 114, 0.14),
    var(--shadow);
}

body.reveal-ready .pricing-card.reveal,
body.reveal-ready .custom-card.reveal,
body.reveal-ready .combined-package-card.reveal,
body.reveal-ready .editorial-note.reveal,
body.reveal-ready .photo-video-note.reveal {
  transform: translate3d(0, 20px, 0) scale(0.985);
}

body.reveal-ready .pricing-card.reveal {
  opacity: 1;
  filter: none;
}

.pricing-card-inner {
  min-height: 39rem;
  position: relative;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.2, 0.72, 0.2, 1);
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .pricing-card:hover .pricing-card-inner,
  .pricing-card:focus-within .pricing-card-inner {
    transform: rotateY(180deg);
  }
}

.pricing-card.is-flipped .pricing-card-inner {
  transform: rotateY(180deg);
}

.pricing-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 242, 0.76);
  border: 1px solid rgba(32, 26, 22, 0.1);
  box-shadow: var(--soft-shadow);
  opacity: 1;
  transition: none;
}

.pricing-card-front {
  justify-content: flex-end;
  color: var(--ivory);
  transform: translateZ(1px);
}

.pricing-card-front::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(32, 26, 22, 0.78),
    rgba(32, 26, 22, 0.08) 62%
  );
}

.pricing-card-front img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.9s cubic-bezier(0.18, 0.72, 0.22, 1),
    filter 0.45s ease;
}

.pricing-card:hover .pricing-card-front img,
.pricing-card:focus-within .pricing-card-front img {
  transform: scale(1.035);
  filter: saturate(0.96) contrast(1.02);
}

.pricing-card-front > div,
.pricing-card-back > * {
  position: relative;
  z-index: 1;
}

.pricing-card-front > div {
  padding: 1.4rem;
}

.pricing-card-front .select-package {
  margin-top: 1rem;
}

.pricing-card-front .mini-label {
  color: rgba(255, 250, 242, 0.8);
}

.pricing-card h3,
.custom-card h3 {
  font-family: var(--serif1);
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.pricing-card-back {
  transform: rotateY(180deg) translateZ(1px);
  padding: 1.4rem;
  color: var(--ink);
}

.pricing-card-back ul {
  margin: 1rem 0;
  padding-left: 1.15rem;
  color: var(--muted-ink);
  line-height: 1.7;
}

.pricing-card-back .select-package {
  margin-top: auto;
}

.featured-pricing-card {
  transform: translateY(-16px);
}

.photo-video-section {
  background:
    radial-gradient(
      circle at 18% 10%,
      rgba(215, 195, 163, 0.28),
      transparent 26rem
    ),
    linear-gradient(
      to bottom,
      rgba(255, 250, 242, 0.58),
      rgba(239, 229, 212, 0.46)
    );
}

.photo-video-card .pricing-card-back ul {
  line-height: 1.48;
}

.photo-video-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  margin-top: clamp(1.4rem, 4vw, 2.2rem);
  padding: clamp(1.35rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 242, 0.82);
  border: 1px solid rgba(138, 111, 92, 0.16);
  box-shadow: var(--soft-shadow);
}

.photo-video-note h3 {
  font-size: clamp(2rem, 3.6vw, 3.2rem);
}

.photo-video-note p:not(.mini-label) {
  margin-bottom: 0;
  color: var(--muted-ink);
}

.custom-collections-note {
  margin-top: clamp(1.4rem, 4vw, 2.2rem);
}

.pricing-sample-link {
  max-width: 860px;
  grid-template-columns: minmax(260px, 0.95fr) minmax(260px, 0.85fr);
  justify-content: center;
  margin-top: clamp(2rem, 5vw, 3.2rem);
}

.pricing-sample-link .photo-film-process-copy {
  text-align: center;
}

.custom-builder-section + .photo-film-section,
.custom-builder-section + .photo-film-section + .combined-packages-section {
  display: none;
}

.price-badge {
  position: absolute;
  top: -0.65rem;
  right: -0.3rem;
  z-index: 4;
  display: grid;
  place-items: center;
  min-width: 5.8rem;
  min-height: 2.7rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid rgba(32, 26, 22, 0.14);
  box-shadow: var(--soft-shadow);
  font-family: var(--serif2);
  font-size: 1.3rem;
  font-weight: 700;
  transform: rotate(3deg);
}

.pricing-card.is-selected .price-badge,
.custom-card.is-selected {
  box-shadow:
    0 0 0 2px rgba(215, 195, 163, 0.62),
    var(--shadow);
}

.text-link {
  justify-self: start;
  width: fit-content;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--soft-brown);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    color 0.22s ease,
    transform 0.22s ease;
}

.text-link:focus-visible,
.pricing-card .select-package:focus-visible,
.custom-card .select-package:focus-visible,
.addon-tile:focus-visible,
.stepper button:focus-visible,
.stepper input:focus-visible,
.modal-close:focus-visible {
  outline: 2px solid rgba(185, 130, 114, 0.42);
  outline-offset: 4px;
}

.pricing-card button,
.custom-card button,
.summary-panel button {
  font: inherit;
}

.pricing-card .select-package,
.custom-card .select-package,
.summary-panel .button {
  border: 0;
  cursor: pointer;
}

.pricing-card .select-package,
.custom-card .select-package {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 100%;
  min-height: 46px;
  border-radius: 999px;
  color: var(--ivory);
  background: var(--ink);
  border: 1px solid var(--ink);
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.custom-card {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: center;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    145deg,
    rgba(255, 250, 242, 0.9),
    rgba(239, 229, 212, 0.74)
  );
  border: 1px solid rgba(32, 26, 22, 0.1);
  box-shadow: var(--soft-shadow);
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease;
}

.custom-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.custom-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 10px);
}

.builder-controls {
  display: grid;
  gap: 1rem;
  margin: 1.4rem 0;
}

.builder-controls label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted-ink);
  font-weight: 700;
}

.stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(32, 26, 22, 0.12);
  background: rgba(255, 250, 242, 0.76);
}

.stepper button,
.stepper input {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
}

.stepper button {
  cursor: pointer;
  font-weight: 800;
}

.summary-panel {
  position: static;
  display: grid;
  gap: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    145deg,
    rgba(32, 26, 22, 0.95),
    rgba(77, 59, 46, 0.94)
  );
  color: var(--ivory);
  box-shadow: var(--shadow);
}

.estimate-section {
  background:
    radial-gradient(
      circle at 82% 14%,
      rgba(154, 165, 140, 0.16),
      transparent 28rem
    ),
    rgba(247, 242, 232, 0.62);
}

.summary-panel .chapter-label,
.summary-panel .mini-label {
  color: var(--champagne);
}

.summary-line,
.total-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  border-bottom: 1px solid rgba(255, 250, 242, 0.14);
  padding-bottom: 0.8rem;
}

.summary-line span,
.total-line span {
  color: rgba(255, 250, 242, 0.68);
}

.summary-line strong,
.total-line strong {
  font-family: var(--serif2);
  font-size: 1.8rem;
}

.addon-list {
  display: grid;
  gap: 0.65rem;
}

.addon-tile {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  width: 100%;
  border: 1px solid rgba(255, 250, 242, 0.16);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem;
  color: var(--ivory);
  background: rgba(255, 250, 242, 0.06);
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}

.addon-tile.is-selected {
  border-color: rgba(215, 195, 163, 0.72);
  background: rgba(215, 195, 163, 0.16);
}

.addon-tile span {
  color: rgba(255, 250, 242, 0.8);
}

.photo-film-toggle {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: rgba(255, 250, 242, 0.78);
  line-height: 1.5;
}

.photo-film-toggle input {
  margin-top: 0.35rem;
  accent-color: var(--champagne);
}

.summary-panel .button-primary {
  background: var(--ivory);
  color: var(--ink);
}

.summary-panel .button-ghost.dark {
  color: var(--ivory);
  border-color: rgba(255, 250, 242, 0.34);
  background: rgba(255, 250, 242, 0.08);
}

.photo-film-section .button {
  margin-top: 1.3rem;
}

.combined-packages-section {
  background:
    radial-gradient(
      circle at 18% 10%,
      rgba(215, 195, 163, 0.28),
      transparent 26rem
    ),
    linear-gradient(
      to bottom,
      rgba(255, 250, 242, 0.58),
      rgba(239, 229, 212, 0.46)
    );
}

.combined-package-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.combined-package-card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.35rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    145deg,
    rgba(255, 250, 242, 0.88),
    rgba(239, 229, 212, 0.66)
  );
  border: 1px solid rgba(138, 111, 92, 0.16);
  box-shadow: var(--soft-shadow);
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease;
}

.combined-package-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.featured-combined-card {
  background:
    radial-gradient(
      circle at top right,
      rgba(215, 195, 163, 0.58),
      transparent 15rem
    ),
    rgba(255, 250, 242, 0.92);
  transform: translateY(-16px);
  box-shadow: var(--shadow);
}

.featured-combined-card:hover {
  transform: translateY(-20px);
}

.combined-package-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.1rem;
}

.combined-package-topline .mini-label {
  margin: 0;
}

.combined-package-topline strong {
  white-space: nowrap;
  color: var(--ink);
  font-size: 0.95rem;
}

.combined-package-card h3 {
  font-size: clamp(2rem, 3.4vw, 3.2rem);
}

.combined-package-card p:not(.mini-label) {
  color: var(--muted-ink);
}

.combined-package-card ul {
  display: grid;
  gap: 0.62rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.combined-package-card li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--muted-ink);
}

.combined-package-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--clay);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(32, 26, 22, 0.54);
  backdrop-filter: blur(8px);
}

.modal[hidden] {
  display: none;
}

.modal-panel {
  position: relative;
  width: min(100%, 620px);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius-lg);
  background: var(--ivory);
  box-shadow: var(--shadow);
}

.modal-panel h2 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.modal-panel p:not(.mini-label) {
  color: var(--muted-ink);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--ivory);
  cursor: pointer;
  transition:
    transform 0.22s ease,
    background 0.22s ease;
}

@media (hover: hover) and (pointer: fine) {
  .pricing-card .select-package:hover,
  .custom-card .select-package:hover,
  .summary-panel .button:hover {
    transform: translateY(-2px);
  }

  .pricing-card .select-package:hover,
  .custom-card .select-package:hover {
    background: #3a2e26;
    box-shadow: 0 14px 34px rgba(32, 26, 22, 0.14);
  }

  .addon-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(215, 195, 163, 0.4);
    background: rgba(255, 250, 242, 0.1);
  }

  .text-link:hover {
    color: var(--clay);
    transform: translateX(2px);
  }

  .modal-close:hover {
    transform: rotate(4deg) scale(1.04);
    background: #3a2e26;
  }
}

#pdf-layout {
  display: none;
  color: #201a16;
  background: #fffaf2;
  font-family: var(--sans);
}

.pdf-container {
  width: 85%;
  margin: 0 auto;
  padding: 28px 0;
}

.pdf-brand,
.pdf-title {
  font-family: var(--serif2);
}

.pdf-brand {
  font-size: 22px;
  font-weight: 700;
}

.pdf-title {
  font-size: 34px;
  margin-bottom: 16px;
}

.pdf-total {
  font-size: 34px;
  font-weight: 800;
}

#qr-wrapper {
  margin-top: 24px;
  text-align: center;
}

#qr-code {
  display: inline-block;
  padding: 8px;
  border: 1px solid #201a16;
}

@media (max-width: 980px) {
  .pricing-card-grid,
  .builder-layout,
  .custom-card,
  .combined-package-grid,
  .photo-video-note {
    grid-template-columns: 1fr;
  }

  .featured-pricing-card,
  .featured-combined-card {
    transform: none;
  }

  .featured-combined-card:hover {
    transform: none;
  }

  .summary-panel {
    position: static;
  }

  .pricing-sample-link {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .pricing-hero h1 {
    font-size: clamp(2.85rem, 14vw, 4.8rem);
    line-height: 0.95;
  }

  .pricing-hero {
    min-height: 76svh;
  }

  .pricing-card h3,
  .custom-card h3,
  .combined-package-card h3 {
    font-size: clamp(1.75rem, 8.5vw, 2.65rem);
    line-height: 0.98;
  }

  .pricing-card-inner {
    min-height: 30rem;
  }

  .pricing-card-back,
  .pricing-card-front > div {
    padding: 1.15rem;
  }

  .price-badge {
    right: 0.2rem;
    min-width: 5rem;
    min-height: 2.4rem;
    font-size: 1.1rem;
  }

  .summary-line,
  .total-line,
  .addon-tile {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Sticky scroll-over hero reveal */

.pricing-hero {
  position: sticky;
  top: 0;
  z-index: 0;
}

.wedding-pricing-page main > section:not(.pricing-hero) {
  position: relative;
  z-index: 2;
}

.pricing-hero + .section {
  margin-top: -1px;
  isolation: isolate;
  box-shadow: 0 -34px 90px rgba(21, 17, 13, 0.16);
}

.pricing-hero + .section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 18% 8%,
      rgba(215, 195, 163, 0.24),
      transparent 28rem
    ),
    linear-gradient(
      to bottom,
      rgba(247, 242, 232, 0.98),
      rgba(247, 242, 232, 0.94) 9rem,
      rgba(239, 229, 212, 0.9)
    );
}
