/* -------------------------
   Root palette & typography
------------------------- */

:root {
  --bg: #f6f5f3;
  --text: #50533C;
  --muted: #857F68;

  --green: #B3C4A6;
  --green-dark: #5b6e4e;
  --blue: #B8AFA8;
  --yellow: #D4C070;

  --border: #DDD8CF;
}

/* -------------------------
   Base reset
------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  margin: 0;
  font-family: "EB Garamond", Georgia, serif;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  color: var(--text);
  line-height: 1.6;
}

/* -------------------------
   Header (fixed, stable)
------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;

  background: #f6f5f3;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brand */
.brand {
  font-variation-settings: "wght" 600;
  font-size: 1.05rem;
  color: var(--green-dark);
  white-space: nowrap;
}

/* Nav */
.nav {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--muted);
}

.nav a.active {
  color: var(--green-dark);
}

/* Mobile: allow wrapping */
@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: center;
  }

  .nav {
    justify-content: center;
  }
}

/* Spacer synced via JS */
.header-spacer {
  height: 0;
}

/* -------------------------
   Layout
------------------------- */

main {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* -------------------------
   Sections & separators
------------------------- */

section {
  padding: 3rem 0;
  text-align: center;
  position: relative;
}

section + section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 140px;
  height: 2px;

  background: var(--green);

  border-radius: 2px;
  opacity: 0.85;
}

section {
  scroll-margin-top: 140px;
}

/* -------------------------
   Typography
------------------------- */

h1,
h2 {
  font-variation-settings: "wght" 400;
  margin-bottom: 1rem;
  color: var(--green-dark);
}

.intro h1,
.intro h2 {
  font-style: italic;
}

h2 {
  font-size: 1.3rem;
}

p {
  max-width: 620px;
  margin: 0 auto 1.2rem;
  color: var(--muted);
}

/* -------------------------
   Images
------------------------- */

.section-image {
  width: 100%;
  max-width: 720px;
  margin: 2rem auto 0;
  border-radius: 18px;
  filter: saturate(0.9) contrast(0.95);
}

/* -------------------------
   RSVP form
------------------------- */

form {
  max-width: 520px;
  margin: 2rem auto 0;
}

form > label {
  display: block;
  text-align: left;
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.7rem;
  margin-bottom: 1.1rem;

  font-family: inherit;
  font-size: 0.9rem;

  border-radius: 10px;
  border: 1px solid var(--border);
  background: white;

  resize: vertical;
}

/* Prevent horizontal resize */
textarea {
  resize: vertical;
  min-height: 80px;
}

/* Button */
button {
  width: 100%;
  padding: 0.75rem;

  font-variation-settings: "wght" 600;
  font-size: 0.9rem;

  border: none;
  border-radius: 14px;

  background: var(--green);

  color: var(--text);
  cursor: pointer;
}

/* -------------------------
   Maps (static images)
------------------------- */

.map-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .map-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.map-static {
  display: block;
  position: relative;

  text-decoration: none;
  color: inherit;

  border-radius: 18px;
  overflow: hidden;

  background: var(--bg);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.05);
}

/* Image wrapper */
.map-image {
  position: relative;
}

.map-image img {
  width: 100%;
  display: block;

  filter: saturate(0.7) contrast(0.9) brightness(1.05);
  position: relative;
  z-index: 1;
}

/* Marker (raster, subtle) */
.map-image::before {
  content: "";
  display: block;              /* ← REQUIRED */

  position: absolute;
  top: 52%;
  left: 48%;

  width: 24px;
  height: 32px;

  background-image: url("images/marker.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  transform: translate(-50%, -100%);
  opacity: 0.9;

  z-index: 2;
  pointer-events: none;
}

/* Igreja */
.map-ceremony::before {
  top: 49%;
  left: 50%;
}

/* Quinta */
.map-party::before {
  top: 40%;
  left: 45%;
}

/* Label */
.map-static span {
  display: block;
  padding: 0.9rem 1rem;

  font-size: 0.9rem;
  font-variation-settings: "wght" 550;
  color: var(--green-dark);

  background: rgba(242, 238, 233, 0.9);
}

/* Hover (desktop only) */
@media (hover: hover) {
  .map-static:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
  }
}

/* -------------------------
   Footer
------------------------- */

footer {
  padding: 3rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* RSVP conditional logic */
.attending-yes {
  display: none;
  text-align: left;
}

.with-guest {
  display: none;
}

/* Show guest options only if attending */
.form-attending .attending-yes {
  display: block;
}

/* Show guest name only if accompanied */
.form-with-guest .with-guest {
  display: block;
}

.attending-yes,
.with-guest {
  transition: opacity 0.2s ease;
}

/* CHECKBOX */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;

  font-size: 0.9rem;
  color: var(--text);

  margin-bottom: 1.1rem;
}

.checkbox-row input {
  width: auto;
  margin: 0;
}

