/* ══ VARIÁVEIS ══════════════════════════════════════════════════════════ */
:root {
  --color-bg:         #0d0d0d;
  --color-surface:    #1a1a1a;
  --color-surface-2:  #222222;
  --color-gold:       #c9a84c;
  --color-gold-light: #e8c97a;
  --color-gold-dim:   rgba(201, 168, 76, 0.15);
  --color-text:       #f0ece4;
  --color-muted:      #9e9e9e;
  --color-border:     rgba(201, 168, 76, 0.3);

  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'Lato', system-ui, sans-serif;

  --radius: 12px;
  --transition: 0.35s ease;
}

/* ══ RESET ══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ══ UTILITÁRIOS ════════════════════════════════════════════════════════ */
.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
  padding-block: 5rem;
}
.section-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 3rem;
}
.hidden { display: none !important; }

/* ══ DIVISORES DE SEÇÃO (linha dourada via ::before) ════════════════════ */
.details-section::before,
.gift-section::before,
.rsvp-section::before,
.countdown-section::before,
.footer::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(201, 168, 76, 0.35) 50%,
    transparent 100%
  );
}

/* ══ ANIMAÇÕES DE SCROLL ════════════════════════════════════════════════ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══ HERO ═══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse at 60% 40%, rgba(201,168,76,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(201,168,76,0.07) 0%, transparent 50%),
    var(--color-bg);
}

/* Quando a foto for adicionada, usar como fundo:
.hero {
  background-image: url('../assets/foto-fundo.jpg');
  background-size: cover;
  background-position: center;
}
*/

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(13,13,13,0.5) 0%, rgba(13,13,13,0.85) 100%);
  pointer-events: none;
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}
.hero__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 1.5rem;
}
.hero__name {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  overflow-wrap: break-word;
  word-break: break-word;
}
.hero__name em {
  font-style: italic;
  color: var(--color-gold-light);
}
.hero__course {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 2rem;
}
.hero__divider {
  width: 60px;
  height: 2px;
  background: var(--color-gold);
  margin: 0 auto 2rem;
}
.hero__subtitle {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--color-muted);
  line-height: 1.8;
}
.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: var(--color-gold);
  font-size: 1.2rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ══ CONTAGEM REGRESSIVA ════════════════════════════════════════════════ */
.countdown-section {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201,168,76,0.07) 0%, transparent 65%),
    var(--color-bg);
  text-align: center;
}
.countdown-section .container { padding-block: 5rem; }
.countdown {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
  padding: 1.5rem 1rem;
}
.countdown__num {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1;
  display: block;
}
.countdown__unit {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 0.5rem;
}
.countdown__sep {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 4rem);
  color: var(--color-gold);
  padding-top: 1.5rem;
  align-self: flex-start;
  opacity: 0.5;
}
.countdown__past {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--color-gold-light);
  margin-top: 1.5rem;
}

/* ══ DETALHES DO EVENTO ═════════════════════════════════════════════════ */
.details-section { background: var(--color-surface); }

.details__layout {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 5rem;
  align-items: start;
}

/* Foto */
.details__photo {
  position: sticky;
  top: 2rem;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid var(--color-border);
  box-shadow:
    0 24px 64px rgba(0,0,0,0.5),
    0 0 0 1px rgba(201,168,76,0.08),
    0 0 60px rgba(201,168,76,0.1);
}
.details__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Info */
.details__info {
  display: flex;
  flex-direction: column;
}
.details__info .section-title { margin-bottom: 2rem; }

/* Cards horizontais */
.details__cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.detail-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  transition: border-color var(--transition), transform var(--transition);
}
.detail-card:hover {
  border-color: var(--color-gold);
  transform: translateX(4px);
}
.detail-card__icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--color-gold);
  margin-top: 0.1rem;
}
.detail-card__body { display: flex; flex-direction: column; gap: 0.25rem; text-align: left; }
.detail-card__title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.detail-card__main {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.4;
}
.detail-card__sub {
  font-size: 0.85rem;
  color: var(--color-muted);
  line-height: 1.6;
}
.detail-card__map-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--color-gold);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-gold);
  transition: background var(--transition), color var(--transition);
  width: fit-content;
}
.detail-card__map-btn:hover {
  background: var(--color-gold);
  color: var(--color-bg);
}


/* ══ PRESENTE / PIX ════════════════════════════════════════════════════ */
.gift-section {
  background: var(--color-bg);
  padding-block: 5rem;
  display: flex;
  justify-content: center;
}

.gift__inner {
  width: min(520px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  text-align: center;
}

/* Topo */
.gift__icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-gold);
  margin-bottom: 0.25rem;
}
.gift__top { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.gift__top .section-label { margin-bottom: 0; }
.gift__title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}
.gift__desc {
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  max-width: 400px;
}

/* Input */
.gift__form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.gift__form-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  text-align: left;
}
.gift__input-wrap {
  display: flex;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.gift__input-wrap:focus-within {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}
.gift__currency {
  padding: 1rem 1.25rem;
  background: var(--color-surface-2);
  color: var(--color-gold);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  border-right: 1px solid var(--color-border);
  user-select: none;
  white-space: nowrap;
}
.gift__input-wrap input {
  flex: 1;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  min-width: 0;
}
.gift__input-wrap input::placeholder { color: var(--color-muted); opacity: 0.3; }
.gift__input-wrap input::-webkit-outer-spin-button,
.gift__input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gift__input-wrap input[type=number] { -moz-appearance: textfield; }

/* Área QR */
.gift__qr-area {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.45s ease, box-shadow 0.45s ease, min-height 0.45s ease;
}
.gift__qr-area.has-qr {
  border-color: rgba(201,168,76,0.5);
  box-shadow: 0 0 60px rgba(201,168,76,0.08);
}

.gift__qr-placeholder {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.gift__qr-arrow {
  font-size: 0.75rem;
  opacity: 0.5;
  animation: nudge 1.8s ease-in-out infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

.gift__qr-content {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  animation: revealUp 0.4s ease;
}
.gift__qr-content.visible { display: flex; }
@keyframes revealUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.gift__qr-amount {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: -0.01em;
}
.gift__qr-box {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  line-height: 0;
}
.gift__qr-container img,
.gift__qr-container canvas { display: block; }
.gift__qr-label {
  font-size: 0.78rem;
  color: var(--color-muted);
  line-height: 1.6;
}
.gift__copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 50px;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  transition: border-color var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.gift__copy-btn:hover  { border-color: var(--color-gold); color: var(--color-gold); }
.gift__copy-btn.copied { border-color: #25D366; color: #25D366; }

/* ══ RSVP ═══════════════════════════════════════════════════════════════ */
.rsvp-section {
  background: var(--color-surface);
  text-align: center;
}
.rsvp__text {
  color: var(--color-muted);
  max-width: 460px;
  margin-inline: auto;
  margin-bottom: 2.5rem;
  font-size: 1rem;
}
.rsvp__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2.5rem;
  background: #25D366;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 50px;
  min-height: 52px;
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: 0 4px 24px rgba(37,211,102,0.25);
}
.rsvp__btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}
.rsvp__btn i { font-size: 1.25rem; }

/* ══ RODAPÉ ═════════════════════════════════════════════════════════════ */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  text-align: center;
  padding: 2.5rem 1rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 2;
}
.footer__sub { font-size: 0.8rem; color: rgba(158,158,158,0.6); }

/* ══ RESPONSIVO ═════════════════════════════════════════════════════════ */

/* Suporte a safe-area do iOS (notch / barra inferior) */
.hero        { padding-top: max(2rem, env(safe-area-inset-top)); }
.footer      { padding-bottom: max(2.5rem, env(safe-area-inset-bottom)); }

/* Toque: remove highlight azul no iOS/Android */
a, button { -webkit-tap-highlight-color: transparent; }

@media (max-width: 768px) {
  /* Containers menos espaçosos */
  .container                    { padding-block: 3.5rem; }
  .countdown-section .container { padding-block: 3rem; }

  /* Títulos de seção */
  .section-title { font-size: clamp(1.6rem, 5vw, 2.2rem); margin-bottom: 2rem; }

  /* Countdown: reduz separadores e números em tablets */
  .countdown__item  { min-width: 80px; padding: 1rem 0.5rem; }
  .countdown__num   { font-size: clamp(2rem, 7vw, 3.5rem); }
  .countdown__sep   { font-size: clamp(1.6rem, 5vw, 3rem); padding-top: 1rem; }
  .countdown__unit  { font-size: 0.65rem; }

  /* Detalhes: empilha foto em cima dos cards */
  .details__layout  { grid-template-columns: 1fr; gap: 2.5rem; }
  .details__photo   { position: static; max-width: 320px; margin-inline: auto; }
  .details__info    { text-align: center; }
  .detail-card      { text-align: left; }
}

@media (max-width: 480px) {
  /* Containers compactos */
  .container                    { padding-block: 2.75rem; width: 100%; padding-inline: 1.25rem; }
  .countdown-section .container { padding-block: 2.5rem; }

  /* Hero */
  .hero                { padding: 1.25rem; padding-top: max(1.25rem, env(safe-area-inset-top)); }
  .hero__label         { letter-spacing: 0.15em; margin-bottom: 1rem; }
  .hero__name          { font-size: clamp(2rem, 10vw, 2.8rem); }
  .hero__course        { font-size: 0.78rem; letter-spacing: 0.1em; margin-bottom: 1.5rem; }
  .hero__divider       { margin-bottom: 1.5rem; }
  .hero__subtitle      { font-size: 0.9rem; }

  /* Contagem: grade 2×2 sem separadores */
  .countdown           { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: 1rem; }
  .countdown__sep      { display: none; }
  .countdown__item     { min-width: unset; padding: 1rem 0.5rem; background: var(--color-surface-2); border-radius: 8px; }
  .countdown__num      { font-size: clamp(2rem, 12vw, 3rem); }
  .countdown__unit     { font-size: 0.62rem; letter-spacing: 0.12em; }

  /* Detalhes */
  .details__photo      { max-width: min(260px, 80vw); }
  .detail-card         { padding: 1.25rem; gap: 1rem; }
  .detail-card__icon   { width: 40px; height: 40px; font-size: 1rem; }
  .detail-card__main   { font-size: 1rem; }
  .detail-card__map-btn {
    padding: 0.55rem 1rem;
    font-size: 0.78rem;
    min-height: 44px;
  }

  /* Presente */
  .gift-section        { padding-block: 2.75rem; }
  .gift__inner         { gap: 2rem; }
  .gift__title         { font-size: 1.7rem; }
  .gift__qr-area       { padding: 1.75rem 1.25rem; }


  /* RSVP: botão largura total */
  .rsvp__btn           {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
  }
  .rsvp__text          { font-size: 0.9rem; margin-bottom: 1.75rem; }

  /* Rodapé */
  .footer              { font-size: 0.8rem; padding-inline: 1.25rem; line-height: 1.9; }
  .footer__sub         { font-size: 0.72rem; }

  /* Títulos */
  .section-title       { font-size: 1.65rem; margin-bottom: 1.75rem; }
  .section-label       { font-size: 0.68rem; }
}
