/* =============================================
   Casamento — Ana & Felipe
   Estilo: papel marfim, traço fino, monocromático
   ============================================= */

@font-face {
  font-family: 'Snell Roundhand';
  src: url('fonts/snell-roundhand.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* --- Custom Properties --- */
:root {
  --color-paper: #f5f3ef;        /* fundo marfim do convite */
  --color-paper-alt: #f0eee9;    /* variação levemente mais quente */
  --color-card: #faf9f6;
  --color-ink: #34362f;          /* grafite dos títulos */
  --color-ink-soft: #5c605e;     /* corpo de texto */
  --color-ink-light: #74756c;    /* apoio / legendas */
  --color-line: #c9c8c2;         /* filetes */
  --color-botanical: #77786d;    /* ramos desenhados */

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-names: 'Snell Roundhand', 'Cormorant Garamond', cursive;
  --font-label: 'Montserrat', Arial, sans-serif;

  --max-width: 1040px;
  --nav-height: 72px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 1.15rem;
  line-height: 1.85;
  color: var(--color-ink-soft);
  background: var(--color-paper);
  background-image: radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, 0.35), transparent 60%);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--color-ink);
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* --- Ornamentos botânicos --- */
.botanical {
  position: absolute;
  color: #b4b7b0;
  width: clamp(110px, 16vw, 210px);
  pointer-events: none;
  opacity: 0.85;
  z-index: 0;
}

.botanical use {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.1;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.botanical--hero-tl {
  top: calc(var(--nav-height) + 2vh);
  left: -1.5vw;
  transform: rotate(-8deg);
}

.botanical--hero-br {
  bottom: 3vh;
  right: -1.5vw;
  transform: rotate(180deg);
}

.botanical--corner-tr {
  top: 2rem;
  right: -1vw;
  transform: rotate(96deg);
  width: clamp(100px, 13vw, 175px);
}

.botanical--corner-bl {
  bottom: 2rem;
  left: -1vw;
  transform: rotate(-96deg);
  width: clamp(100px, 13vw, 175px);
}

/* --- Filetes --- */
.rule {
  width: 64px;
  height: 1px;
  background: var(--color-line);
  margin: 1.6rem auto 1.8rem;
}

.rule--short {
  width: 38px;
  margin: 1.1rem auto;
}

.rule--hero {
  width: 96px;
  margin: 2rem auto 1.6rem;
}

/* --- Navegação --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(245, 243, 239, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(63, 67, 66, 0.08);
  transition: border-color 0.3s ease;
}

.nav.scrolled {
  border-bottom-color: rgba(63, 67, 66, 0.16);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
}

.nav__logo img {
  height: 48px; /* Proporção da nova logo transparente. */
  width: auto;
}

.nav__links {
  list-style: none;
  display: flex;
  gap: clamp(0.75rem, 5vw - 1.75rem, 2.4rem);
}

.nav__links a {
  font-family: var(--font-label);
  font-size: 0.65rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2.4px;
  color: var(--color-ink-light);
  transition: color 0.3s ease, border-color 0.3s ease;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid transparent;
}

.nav__links a:hover {
  color: var(--color-ink);
  border-bottom-color: var(--color-line);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 4rem) 2.5rem 4rem;
  background: var(--color-paper);
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 820px;
}

.hero__logo {
  width: clamp(120px, 14vw, 160px);
  margin: 0 auto 2.3rem;
}

/* Snell Roundhand incorporada ao site; a inclinação faz parte da fonte. */
.hero__names {
  font-family: var(--font-names);
  font-style: normal;
  font-size: clamp(3.4rem, 9vw, 6.4rem);
  font-weight: 400;
  text-transform: none;
  color: var(--color-ink);
  line-height: 1.3;
  letter-spacing: 0;
  text-indent: 0;
  white-space: nowrap;
}

.hero__amp {
  font-size: 0.8em;
  margin: 0 0.06em;
}

.hero__date {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem 0;
  font-family: var(--font-label);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--color-ink-soft);
  margin-bottom: 2.2rem;
}

.hero__date span + span {
  border-left: 1px solid var(--color-line);
  margin-left: 1rem;
  padding-left: 1rem;
}

.invitation__verse {
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1.9;
  color: var(--color-ink-soft);
  margin: 0 auto 2.4rem;
}

.invitation__verse cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 1.8px;
}

.hero .rule--hero { margin: 0.7rem auto 1.8rem; }
.hero .countdown { max-width: 440px; margin: 0 auto; }
.hero .countdown__item { padding: 0 1.4rem; }
.hero .countdown__number { font-size: 1.9rem; }

/* --- Countdown --- */
.countdown {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0;
}

.countdown__item {
  padding: 0 1.9rem;
  border-right: 1px solid var(--color-line);
}

.countdown__item:last-child {
  border-right: none;
}

.countdown__number {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--color-ink);
  line-height: 1.2;
  letter-spacing: 1px;
}

.countdown__label {
  font-family: var(--font-label);
  display: block;
  font-size: 0.62rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-ink-light);
  margin-top: 0.35rem;
}

/* --- Sections --- */
.section {
  position: relative;
  padding: 7rem 2rem;
  overflow: hidden;
}

.section__inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section__script {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  font-style: italic;
  font-weight: 300;
  color: var(--color-ink-light);
  text-align: center;
  line-height: 1.2;
  margin-bottom: 0.55rem;
}

.section__title {
  font-family: var(--font-label);
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  font-weight: 500;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--color-ink);
}

.section__subtitle {
  text-align: center;
  color: var(--color-ink-light);
  font-size: 1.05rem;
  font-style: italic;
  margin-bottom: 4rem;
}

/* --- Nossa História --- */
.historia {
  background: var(--color-paper-alt);
}

.historia__versiculo {
  max-width: 32rem;
  text-align: center;
}

.historia__texto {
  max-width: 39rem;
  margin: 0 auto;
  font-weight: 400;
}

.historia__texto p + p {
  margin-top: 1.15rem;
}

.historia__texto .historia__assinatura {
  color: var(--color-ink);
  font-style: italic;
  margin-top: 2rem;
}

.historia__assinatura span {
  font-family: var(--font-names);
  font-size: 1.9rem;
  font-style: normal;
  line-height: 1.5;
}

/* --- Cards (Cerimônia) --- */
.cerimonia {
  background: var(--color-paper);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  max-width: 820px;
  margin: 0 auto;
}

.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--color-line);
  padding: 3rem 2rem 2.5rem;
  text-align: center;
  background-image: url('church.jpeg');
  background-size: cover;
  background-repeat: no-repeat;
}

/* Aquarelas dos respectivos locais da celebração. */
.card:nth-child(1) { background-position: 50% 22%; }
.card:nth-child(2) {
  background-image: url('recepcao.jpeg');
  background-position: 50% 78%;
}

/* véu de papel marfim: mantém a aquarela como textura e o texto legível */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(245, 243, 239, 0.82);
  transition: background 0.5s ease;
}

.card:hover::before {
  background: rgba(245, 243, 239, 0.7);
}

.card__content {
  position: relative;
}

.card__sprig {
  width: 46px;
  color: var(--color-botanical);
  margin: 0 auto 1.2rem;
  display: block;
}

.card__sprig use {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.card h3 {
  font-family: var(--font-label);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 4.5px;
  margin-bottom: 0.8rem;
}

.card__time {
  font-size: 2rem;
  font-weight: 300;
  color: var(--color-ink);
  letter-spacing: 2px;
  line-height: 1.2;
}

.card__time--reception {
  font-size: 1.35rem;
  letter-spacing: 0.5px;
  line-height: 1.5;
}

.card__date {
  font-style: italic;
  color: var(--color-ink-soft);
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.card__location {
  color: var(--color-ink-light);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.7;
}

/* --- Dress Code --- */
.dresscode {
  background: var(--color-paper);
  border-top: 1px solid var(--color-line);
  text-align: center;
}

.dresscode__text {
  max-width: 37rem;
  margin: 0 auto;
  font-weight: 400;
}

.dresscode__text p + p {
  margin-top: 0.85rem;
}

.dresscode__text strong {
  color: var(--color-ink);
  font-weight: 600;
}

.dresscode__illustration {
  max-width: 42rem;
  margin: 2rem auto 0;
  background: var(--color-paper);
}

.dresscode__illustration img {
  width: 100%;
  aspect-ratio: 15 / 8;
  object-fit: cover;
  object-position: center 48%;
  mix-blend-mode: multiply;
}

/* --- Galeria --- */
.galeria {
  background: var(--color-paper-alt);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 6 fotos = duas fileiras completas */
  gap: 1.5rem;
}

@media (max-width: 820px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gallery__item {
  margin: 0;
  aspect-ratio: 3 / 4; /* a maioria das fotos é retrato */
  overflow: hidden;
  background: var(--color-card);
  border: 1px solid var(--color-line);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%; /* privilegia os rostos ao cortar em retrato */
  /* leve dessaturação para as fotos coloridas conversarem com o marfim */
  filter: saturate(0.82) contrast(1.02);
  transition: transform 0.7s ease, filter 0.5s ease;
}

.gallery__item:hover img {
  transform: scale(1.04);
  filter: saturate(1) contrast(1);
}

/* --- RSVP --- */
.rsvp {
  background: var(--color-paper);
}

.form {
  max-width: 560px;
  margin: 0 auto;
}

.form__group {
  margin-bottom: 2.2rem;
}

.form__group label,
.form__legend {
  font-family: var(--font-label);
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-ink-light);
  margin-bottom: 0.6rem;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.6rem 0;
  border: none;
  border-bottom: 1px solid var(--color-line);
  border-radius: 0;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--color-ink);
  background: transparent;
  transition: border-color 0.3s ease;
}

textarea {
  resize: vertical;
  line-height: 1.7;
}

input::placeholder,
textarea::placeholder {
  color: #b9bab5;
  font-style: italic;
}

input:focus,
textarea:focus {
  outline: none;
  border-bottom-color: var(--color-ink);
}

.form__radio-group {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.form__radio {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 1.02rem;
  font-style: italic;
  color: var(--color-ink-soft);
}

.form__radio input[type="radio"] {
  accent-color: var(--color-ink);
  width: 1rem;
  height: 1rem;
}

.btn {
  font-family: var(--font-label);
  display: block;
  width: 100%;
  padding: 1.05rem;
  background: transparent;
  color: var(--color-ink);
  border: 1px solid var(--color-ink);
  border-radius: 0;
  font-family: var(--font-serif);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease;
}

.btn:hover {
  background: var(--color-ink);
  color: var(--color-paper);
}

.form__success {
  text-align: center;
  padding: 2rem 1rem;
}

.form__success-sprig {
  width: 46px;
  color: var(--color-botanical);
  margin: 0 auto 1.2rem;
  display: block;
}

.form__success-sprig use {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.form__success p {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--color-ink);
}

/* --- Presentes --- */
.presentes {
  border-top: 1px solid var(--color-line);
}

.presentes .section__subtitle {
  margin-bottom: 2rem;
}

.pix {
  max-width: 26rem;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 5vw, 2rem) 1rem;
  border: 1px solid var(--color-line);
  background: var(--color-card);
  text-align: center;
}

.pix__qr {
  width: 212px;
  margin: 0 auto 1rem;
}

.pix .btn {
  margin-top: 1rem;
}

.pix__manual {
  margin-top: 1rem;
  text-align: left;
}

.pix__manual textarea {
  padding: 0.5rem;
  border: 1px solid var(--color-line);
  font-family: monospace;
  font-size: 1rem;
  resize: vertical;
}

.pix__status {
  margin-top: 0.5rem;
  min-height: 1.5em;
  line-height: 1.5;
}

/* --- Footer --- */
.footer {
  background: var(--color-paper-alt);
  border-top: 1px solid var(--color-line);
  text-align: center;
  padding: 4rem 2rem;
}

.monogram {
  width: clamp(110px, 14vw, 150px);
  margin: 0 auto;
}

.footer__names {
  font-family: var(--font-names);
  font-style: normal;
  font-size: 2.7rem;
  font-weight: 400;
  color: var(--color-ink);
  margin-top: 1rem;
}

.footer__date {
  font-family: var(--font-label);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-ink-light);
  margin-top: 0.4rem;
}

.footer__quote {
  margin-top: 2rem;
  margin-bottom: 0;
}

/* --- Animações --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* --- Utilitários --- */
.hidden {
  display: none;
}

/* --- Responsivo --- */
@media (max-width: 768px) {
  .nav__links {
    display: none;
  }

  .hero__names {
    letter-spacing: 0;
    text-indent: 0;
  }

  .section__title {
    letter-spacing: 0.22em;
    text-indent: 0.22em;
  }

  .nav__logo img {
    height: 48px;
  }

  .hero__date {
    letter-spacing: 1.3px;
    margin-bottom: 2rem;
  }

  .countdown__item {
    padding: 0 1rem;
  }

  .countdown__number {
    font-size: 1.7rem;
  }

  .botanical--hero-tl,
  .botanical--hero-br,
  .botanical--corner-tr,
  .botanical--corner-bl {
    width: 105px;
    opacity: 0.7;
  }

  .section {
    padding: 4.5rem 1.5rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 1.08rem;
  }

  .cards,
  .gallery {
    grid-template-columns: 1fr;
  }

  .countdown__item {
    padding: 0 0.75rem;
  }

  .countdown__number {
    font-size: 1.45rem;
  }

  .countdown__label {
    font-size: 0.55rem;
    letter-spacing: 2px;
  }
}

/* Convite no celular: ajusta a leitura dos nomes e da data. */
@media (max-width: 600px) {
  .hero { padding: calc(var(--nav-height) + 3rem) 1.5rem 3rem; }
  .hero__names { font-size: clamp(3rem, 12vw, 4.5rem); }
  .hero__date { font-size: 0.56rem; }
  .hero__date span:first-child { flex-basis: 100%; }
  .hero__date span:nth-child(2) { border-left: 0; margin-left: 0; padding-left: 0; }
  .hero__date span + span { margin-left: 0.7rem; padding-left: 0.7rem; }
  .hero .countdown__item { padding: 0 0.8rem; }
  .hero .countdown__number { font-size: 1.6rem; }
  .nav__inner { padding: 0 1rem; }
  .section__title { font-size: 1.15rem; }
}
