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

nav{
  position: relative;
  z-index: 999;
}

nav ul {
    display: flex;
    flex-wrap: wrap;    
    justify-content: center; 
    gap: 15px;             
    list-style: none;
    padding: 20px 0;        
    margin: 0;
}

nav li a {
    display: inline-block;
    text-decoration: none;
    color: var(--olive);        
    background-color: #fffff9; 
    padding: 12px 25px;
    border-radius: 50px;   
    font-family: sans-serif; 
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;   
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

nav li a:hover {
    background-color: #FDFDFD;
    transform: translateY(-3px);          
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); 
    color: var(--olive);                       
}

:root {
  --olive: #5c6b2e;
  --sage: #8a9e55;
  --ivory: #f5f3ee;
  --text: #282828;
  --muted: #6e7e6b;
  --ff-d: "Cormorant Garamond", Georgia, serif;
  --ff-b: "Jost", system-ui, sans-serif;
}

html {
  background: var(--ivory);
  overflow-x: hidden;
  /* Lenis takes over smooth scroll */
  scroll-behavior: auto;
}

body {
  background: var(--ivory);
  color: var(--text);
  font-family: var(--ff-b);
  overflow-x: hidden;
}

/* Grain texture overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 998;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

.logo-mark {
  display: block;
  width: var(--logo-w, 88px);
  height: var(--logo-h, 58px);
  background: var(--logo-color, var(--olive));
  -webkit-mask: url("images/logo-bg.svg") center / contain no-repeat;
  mask: url("images/logo-bg.svg") center / contain no-repeat;
}

/* Loader */
#loader {
  position: fixed;
  inset: 0;
  background: var(--ivory);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.2rem;
  transition: opacity 1.1s ease;
}
#loader.hidden {
  opacity: 0;
  pointer-events: none;
}
.loader-logo {
  --logo-w: 88px;
  --logo-h: 58px;
  --logo-color: var(--olive);
  animation: logo-breathe 2.4s ease-in-out infinite;
}
@keyframes logo-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}
.loader-track {
  width: 160px;
  height: 1px;
  background: rgba(92, 107, 46, 0.15);
  overflow: hidden;
}
#loader-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--sage), var(--olive));
  width: 0%;
  transition: width 0.2s ease;
}
.loader-caption {
  font-family: var(--ff-b);
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  color: var(--muted);
  text-transform: uppercase;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 56px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 243, 238, 0);
  color: var(--olive);
  pointer-events: none;
  transition:
    background 0.55s ease,
    box-shadow 0.55s ease,
    backdrop-filter 0.55s ease;
}
.site-header.scrolled {
  background: rgba(245, 243, 238, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(92, 107, 46, 0.08);
}
.site-header__inner {
  width: min(100% - 2rem, 1120px);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.site-header__logo {
  --logo-w: 32px;
  --logo-h: 22px;
  --logo-color: var(--olive);
}
.site-header__name {
  font-family: var(--ff-b);
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text);
}
/* Fixed canvas */
#canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--ivory);
}
#canvas {
  display: block;
}

/* Scroll hint */
#scroll-hint {
  position: fixed;
  bottom: 2.8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}
#scroll-hint.visible {
  opacity: 1;
}
.hint-lbl {
  font-family: var(--ff-b);
  font-size: 18px;
  font-weight: 7000;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(92, 107, 46, 0.65);
}
.hint-chevron {
  width: 17px;
  height: 17px;
  border-right: 1.5px solid rgba(92, 107, 46, 0.5);
  border-bottom: 1.5px solid rgba(92, 107, 46, 0.5);
  transform: rotate(45deg);
  animation: chev-bounce 1.9s ease-in-out infinite;
}
@keyframes chev-bounce {
  0%,
  100% {
    transform: rotate(45deg) translateY(0);
  }
  50% {
    transform: rotate(45deg) translateY(5px);
  }
}

/* Video scroll spacer */
#video-spacer {
  height: 300vh;
  position: relative;
  z-index: 2;
}

@media (max-width: 1024px) {
  #video-spacer {
    height: 150vh;
  }
}

@media (max-width: 767px) {
  #video-spacer {
    height: 120vh;
  }
  .site-header__inner {
    justify-content: center;
  }
  .site-header__name {
    display: none;
  }
}

/* Content sections (cover canvas) */
.page-content {
  position: relative;
  z-index: 10;
  background: var(--ivory);
}

/* soft radial glow behind each section */
.section {
  position: relative;
  padding: 9rem 2rem;
  text-align: center;
  overflow: hidden;
}
.section-mensagem,
.section-rsvp {
  background: var(--ivory);
}
.section-countdown {
  background: #eff0e9;
}
.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 70% 60% at 50% 0%,
      rgba(138, 158, 85, 0.06) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 60% 50% at 50% 100%,
      rgba(92, 107, 46, 0.04) 0%,
      transparent 70%
    );
  pointer-events: none;
}

/* Botanical SVG divider */
.divider-wrap {
  display: flex;
  justify-content: center;
  padding: 0 2rem 2.5rem;
}
.botanical-divider {
  width: 280px;
  max-width: 90vw;
  overflow: visible;
  opacity: 0.8;
}

/* MENSAGEM section */
.mensagem-mono {
  --logo-w: 86px;
  --logo-h: 57px;
  --logo-color: var(--olive);
  margin: 0 auto 2.8rem;
  opacity: 0.9;
}
.mensagem-text {
  font-family: var(--ff-d);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  line-height: 1.95;
  color: var(--text);
  max-width: 620px;
  margin: 0 auto;
  letter-spacing: 0.012em;
  padding: 10px;
}
.mensagem-assin {
  font-family: var(--ff-d);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--olive);
  margin-top: 3.6rem;
  letter-spacing: 0.07em;
  padding-bottom: 20px;
}

/* COUNTDOWN section */
.section-countdown {
  padding-top: 5rem;
  padding-bottom: 7rem;
}

.cd-eyebrow {
  display: block;
  font-family: var(--ff-b);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 3.8rem;
}
.cd-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(1.8rem, 4.5vw, 4.5rem);
  flex-wrap: nowrap;
}
@media (max-width: 640px) {
  .cd-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 2rem;
    max-width: 280px;
    margin: 0 auto;
  }
  .cd-sep {
    display: none;
  }
}
.cd-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}
.cd-num {
  font-family: var(--ff-d);
  font-weight: 300;
  font-size: clamp(3rem, 6.5vw, 5.5rem);
  color: var(--olive);
  opacity: 1;
  line-height: 1;
  letter-spacing: -0.03em;
  min-width: 2ch;
  text-align: center;
}
.cd-lbl {
  font-family: var(--ff-b);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.cd-sep {
  font-family: var(--ff-b);
  font-weight: 300;
  font-size: 1.6rem;
  color: var(--sage);
  opacity: 0.55;
  line-height: 1;
  padding-top: 1rem;
  user-select: none;
}

/* RSVP section */
.section-rsvp {
  padding-top: 8rem;
  padding-bottom: 7rem;
}

.s-eyebrow {
  display: block;
  font-family: var(--ff-b);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.s-title {
  font-family: var(--ff-d);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 3.5rem;
  line-height: 1.15;
}

.rsvp-form {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  text-align: left;
}
.f-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 560px) {
  .f-row {
    grid-template-columns: 1fr;
  }
}
.f-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.f-lbl {
  font-family: var(--ff-b);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.f-field {
  font-family: var(--ff-b);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(110, 126, 107, 0.4);
  padding: 0.55rem 0;
  outline: none;
  width: 100%;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.35s ease;
}
.f-field:focus {
  border-bottom-color: var(--olive);
}
.f-field::placeholder {
  color: rgba(110, 126, 107, 0.45);
}
textarea.f-field {
  resize: vertical;
  min-height: 78px;
}

/* select caret */
.f-select-wrap {
  position: relative;
}
.f-select-wrap::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-40%) rotate(45deg);
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  pointer-events: none;
}

.radio-row {
  display: flex;
  gap: 2.2rem;
  padding-top: 0.3rem;
  flex-wrap: wrap;
}
.radio-opt {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
}
.radio-opt input[type="radio"] {
  accent-color: var(--olive);
  width: 14px;
  height: 14px;
  cursor: pointer;
}
.radio-txt {
  font-family: var(--ff-b);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text);
}

.btn-confirm {
  font-family: var(--ff-b);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ivory);
  background: var(--olive);
  border: none;
  padding: 1.1rem 3.2rem;
  cursor: pointer;
  align-self: center;
  transition:
    background 0.3s ease,
    transform 0.2s ease;
}
.btn-confirm:hover {
  background: #4a5526;
  transform: translateY(-2px);
}
.btn-confirm:active {
  transform: translateY(0);
}
.btn-confirm:disabled {
  background: var(--sage);
  transform: none;
  cursor: default;
}

.rsvp-note {
  font-family: var(--ff-d);
  font-style: italic;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
  line-height: 1.75;
}

@media (min-width: 1280px) {
  .s-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
  }
  .rsvp-form {
    max-width: 700px;
  }
  .f-lbl {
    font-size: 0.68rem;
  }
  .f-field {
    font-size: 1.1rem;
    padding: 0.75rem 0;
  }
  .btn-confirm {
    font-size: 0.68rem;
    padding: 1.3rem 4rem;
  }
}

/* Footer */
footer {
  position: relative;
  padding: 5.5rem 2rem 4rem;
  text-align: center;
  background: var(--ivory);
  border-top: 1px solid rgba(110, 126, 107, 0.18);
}
.footer-mono {
  --logo-w: 88px;
  --logo-h: 58px;
  --logo-color: var(--olive);
  margin: 0 auto 1.8rem;
  opacity: 0.82;
}
.footer-names {
  font-family: var(--ff-d);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.footer-date {
  font-family: var(--ff-b);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.75rem;
}
.footer-love {
  font-family: var(--ff-b);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-top: 3.5rem;
}
