:root {
  color-scheme: light;
  --bg: #f5efe6;
  --text: #4b3f35;
  --accent: #b6895b;
  --accent-dark: #7c5a3a;
  --accent-soft: #e8d8c2;
  --border: #ddcdb9;
  --card: rgba(255, 251, 246, 0.96);
  --navy: #12243c;
  --navy-2: #1f3551;
  --gold: #caa95d;
  --gold-soft: #f0e0b6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Times New Roman', serif;
  color: var(--text);
  background:
    repeating-linear-gradient(90deg, rgba(139, 119, 101, 0.03) 0px, rgba(139, 119, 101, 0.03) 2px, transparent 2px, transparent 4px),
    repeating-linear-gradient(0deg, rgba(139, 119, 101, 0.03) 0px, rgba(139, 119, 101, 0.03) 2px, transparent 2px, transparent 4px),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.65), transparent 25%),
    linear-gradient(135deg, #f5efe6 0%, #e8dbca 100%);
  font-size: 1.05rem;
  line-height: 1.7;
}

.page {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

.hero,
.details,
.gifts-section {
  margin-bottom: 2rem;
}

.hero {
  text-align: center;
  padding: 3.5rem 3rem 2.5rem;
  margin-bottom: 2.4rem;
  border-bottom: 1px solid rgba(122, 90, 58, 0.15);
  position: relative;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-text {
  text-align: center;
}

.mosaic-photos {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.8fr);
  grid-template-rows: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 1.5rem;
}

.mosaic-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.mosaic-photos img:first-child {
  grid-row: 1 / span 2;
}

.wedding-photo {
  box-shadow:
    inset 0 0 0 1px rgba(122, 90, 58, 0.2),
    0 8px 20px rgba(0, 0, 0, 0.12);
}

.venue-photo {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1.2rem;
  box-shadow:
    inset 0 0 0 1px rgba(122, 90, 58, 0.2),
    0 8px 20px rgba(0, 0, 0, 0.12);
}

.hero-photo {
  display: flex;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.45rem;
  color: var(--navy);
  font-size: 1.2rem;
  font-weight: 600;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 1.1;
  color: var(--navy);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.date-location {
  margin: 1rem auto 1.4rem;
  font-size: 1.08rem;
  line-height: 1.8;
  max-width: 680px;
}

.quote-line {
  margin: 0 auto;
  max-width: 480px;
  font-style: italic;
  font-size: 1rem;
  color: var(--accent-dark);
  opacity: 0.9;
}

.hero-line {
  width: 180px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--navy), transparent);
  margin: 0 auto;
  opacity: 0.6;
}

.details {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 1.25rem;
}

.detail-card,
.gift-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(106, 66, 53, 0.08);
  position: relative;
}

.detail-card::before,
.gift-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(139, 119, 101, 0.015) 0px, rgba(139, 119, 101, 0.015) 2px, transparent 2px, transparent 4px),
    repeating-linear-gradient(0deg, rgba(139, 119, 101, 0.015) 0px, rgba(139, 119, 101, 0.015) 2px, transparent 2px, transparent 4px);
  pointer-events: none;
  border-radius: 22px;
}

.detail-card {
  padding: 1.6rem;
  position: relative;
  z-index: 1;
}

.detail-card:not(.accent) {
  border-left: 6px solid var(--gold);
}

.detail-card.accent {
  background:
    linear-gradient(135deg, rgba(255, 245, 225, 0.24) 0%, rgba(255, 255, 255, 0.04) 100%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--gold-soft);
  border-color: rgba(202, 169, 93, 0.3);
  box-shadow: 0 18px 40px rgba(18, 36, 60, 0.18);
}

.detail-card.accent h2,
.detail-card.accent p {
  color: var(--gold-soft);
}

.detail-card.accent h2 {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 1.25rem;
  font-weight: 600;
}

.accent-detail {
  margin-bottom: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(202, 169, 93, 0.2);
}

.accent-detail:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.accent-detail p {
  margin: 0 0 0.3rem 0;
}

.accent-detail p:last-child {
  margin-bottom: 0;
}

.detail-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.15em;
  margin: 0 0 0.4rem 0;
  color: var(--accent-dark);
}

.detail-card.accent .detail-label {
  color: var(--gold-soft);
  opacity: 0.85;
}

.detail-label i {
  margin-right: 0.3rem;
}

.address-line {
  font-size: 0.9rem;
  margin-top: 1.2rem;
  opacity: 0.9;
  font-style: italic;
}

h2,
h3 {
  margin-top: 0;
  color: var(--navy);
  font-size: 1.75rem;
  font-weight: 700;
}

.gifts-section {
  padding: 1rem 0 0;
}

.gift-intro {
  text-align: center;
  margin-bottom: 1.3rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid rgba(122, 90, 58, 0.1);
}

.gift-intro h2 {
  font-size: 2rem;
}

.gift-intro p {
  max-width: 640px;
  margin: 0 auto;
}

.photo-frame {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 3/4;
  border: 8px solid #faf7f2;
  box-shadow:
    inset 0 0 0 1px rgba(122, 90, 58, 0.2),
    0 8px 20px rgba(0, 0, 0, 0.12);
  border-radius: 0;
  overflow: hidden;
  transform: rotate(-2deg);
  position: relative;
}

.photo-frame::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 50%, rgba(0, 0, 0, 0.03) 100%);
  pointer-events: none;
}

.couple-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.gift-grid {
  display: grid;
  gap: 1rem;
}

.gift-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1.4rem;
  padding: 1.4rem;
  align-items: center;
}

.icon-slot {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f4eadc 0%, #e4d0b6 100%);
  display: grid;
  place-items: center;
  color: var(--accent-dark);
}

.icon-slot svg {
  width: 48px;
  height: 48px;
}

.gift-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.gift-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.35rem;
}

.gift-content p {
  margin: 0;
}

.gift-price {
  margin-top: 0.5rem !important;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  opacity: 0.85;
  font-weight: 600;
}

.pix-form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(106, 66, 53, 0.08);
  padding: 1.8rem;
  margin-top: 1.25rem;
}

.pix-form-card h3 {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}

#pix-form {
  display: grid;
  gap: 0.3rem;
  max-width: 420px;
  margin: 0 auto;
}

#pix-form label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-dark);
  margin-top: 0.7rem;
}

#pix-form select,
#pix-form input[type="text"],
#pix-form input[type="number"] {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

#pix-form select:focus,
#pix-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

#generate-btn {
  margin-top: 1.4rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--gold-soft);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

#generate-btn:hover {
  opacity: 0.9;
}

#generate-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.pix-error {
  max-width: 420px;
  margin: 1rem auto 0;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: rgba(180, 60, 50, 0.1);
  color: #8a3226;
  font-size: 0.9rem;
  text-align: center;
}

.pix-result {
  max-width: 420px;
  margin: 1.6rem auto 0;
  text-align: center;
  border-top: 1px solid rgba(122, 90, 58, 0.15);
  padding-top: 1.6rem;
}

.pix-result-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-dark);
  margin-bottom: 1rem;
}

.qrcode-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.qrcode-container img,
.qrcode-container canvas {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px;
  background: #fff;
}

.pix-result-detail {
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.pix-copy-row {
  display: flex;
  gap: 0.5rem;
}

.pix-copy-row input {
  flex: 1;
  font-size: 0.8rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #faf7f2;
  color: var(--text);
  font-family: monospace;
}

.pix-copy-row button {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.6rem 1rem;
  border: 1px solid var(--accent-dark);
  border-radius: 10px;
  background: #fff;
  color: var(--accent-dark);
  cursor: pointer;
  white-space: nowrap;
}

.pix-copy-row button:hover {
  background: var(--accent-soft);
}

.pix-feedback {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--accent-dark);
  min-height: 1.2em;
}

.footer {
  text-align: center;
  padding: 2.5rem 0 0;
  color: var(--accent-dark);
}

.footer-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-dark);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
  color: var(--accent-dark);
}

.footer p {
  margin: 0;
  font-size: 0.95rem;
  font-style: italic;
}

@media (max-width: 960px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-photo {
    order: 1;
  }

  .hero-text {
    order: 2;
  }
}

@media (max-width: 760px) {
  .details {
    grid-template-columns: 1fr;
  }

  .gift-card {
    grid-template-columns: 72px 1fr;
    gap: 1rem;
  }

  .icon-slot {
    width: 72px;
    height: 72px;
  }

  .icon-slot svg {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 1.25rem 0.75rem 1.5rem;
  }

  .hero {
    padding: 1.8rem 1rem 1.2rem;
    margin-bottom: 1.5rem;
  }

  .hero-content {
    gap: 1rem;
  }

  .eyebrow {
    font-size: 1rem;
    letter-spacing: 0.25rem;
    margin-bottom: 0.75rem;
  }

  .date-location,
  .quote-line {
    font-size: 1rem;
    line-height: 1.5;
    max-width: 100%;
  }

  .hero-line {
    width: 130px;
  }

  .mosaic-photos {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .mosaic-photos img:first-child {
    grid-row: auto;
  }

  .mosaic-photos img {
    min-height: 180px;
  }

  .detail-card,
  .gift-card,
  .pix-form-card {
    padding: 1rem;
  }

  .gift-card {
    grid-template-columns: 56px 1fr;
    gap: 0.8rem;
  }

  .icon-slot {
    width: 56px;
    height: 56px;
  }

  .icon-slot svg {
    width: 28px;
    height: 28px;
  }

  .gift-intro {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
  }

  .gift-intro h2 {
    font-size: 1.5rem;
  }

  .gift-intro p,
  .address-line,
  .pix-result-detail,
  .pix-feedback {
    font-size: 0.95rem;
  }

  .photo-frame {
    max-width: 220px;
    border-width: 6px;
  }

  #pix-form {
    max-width: 100%;
  }

  #pix-form select,
  #pix-form input[type="text"],
  #pix-form input[type="number"],
  .pix-copy-row input {
    padding: 0.55rem 0.6rem;
    font-size: 0.95rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  #generate-btn {
    padding: 0.7rem 0.85rem;
    font-size: 0.95rem;
  }

  .qrcode-container {
    margin-bottom: 0.8rem;
  }

  .qrcode-container img,
  .qrcode-container canvas {
    width: 100%;
    max-width: 220px;
    padding: 8px;
  }

  .footer {
    padding: 1.5rem 0 0;
  }
}