/* ========= Theme: floral, light, classic =========== */

:root{
  --green-700:#2e5f3a; /* ivy */
  --green-600:#3c7547; /* garden */
  --stone-010:#fdfbf7; /* parchment light */
  --stone-050:#faf6ef; /* parchment */
  --stone-200:#ccc3b5; /* soft paper */
  --stone-600:#5a554d; /* ink */
  --link:#2f6b3a;
  --muted:#6e6a61;

  /* Layout helpers */
  --content-max: 700px;      /* RSVP / narrow content max width */
  --page-max: 1000px;        /* global wrapper max width */
  --side-pad: 1rem;          /* default horizontal padding */
}

/* ======= Base / Reset ======= */
*,*::before,*::after{ box-sizing:border-box; }
html,body{ height:100%; margin:0; }

body{
  font-family: 'Lora', serif;
  color:var(--stone-600);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0.5)),
    url('../images/background_1.jpg') center/cover no-repeat fixed;
}

/* subtle paper grain */
body::before{
  content:""; position:fixed; inset:0; pointer-events:none;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(0,0,0,0.03) 50%, transparent 51%),
    radial-gradient(1px 1px at 80% 70%, rgba(0,0,0,0.02) 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 60%, rgba(0,0,0,0.02) 50%, transparent 51%);
  background-size:330px 330px, 420px 420px, 380px 380px;
}

.wrap{ width:min(var(--page-max),92%); margin-inline:auto; }

/* ======= Header / Nav ======= */
header{
  background:linear-gradient(180deg, var(--stone-050), rgba(250,246,239,0));
}

.nav{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:.5rem 0;
}

.brand{
  text-decoration:none; color:var(--stone-600);
  font-weight:600; letter-spacing:.06em; font-variant:small-caps;
}

.brand em{ font-style:italic; font-weight:400; }

nav[aria-label="Primary"]{
  display:flex; gap:1.25rem;
}

.nav a{
  color:var(--link); text-decoration:none; font-size:.98rem; letter-spacing:.02em;
  padding-bottom:2px; border-bottom:1px solid transparent;
}
.nav a:hover{ border-bottom-color:var(--link); }
.nav a[aria-current="page"]{ border-bottom-color:var(--link); }

/* ======= Generic layout ======= */
main{ padding: 4svh 0 6svh; }

/* Sections with gentle paper background */
.section{
  background: rgba(250,246,239,0.85);
  border:1px solid var(--stone-200);
  border-radius:2px;
  padding: clamp(1rem, 2.2vw, 1.5rem);
  margin: 1rem 0;
}

/* ======= Typography ======= */
h1,h2,h3{ margin:0 0 .4rem; }
h1{
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
  letter-spacing:.015em;
}
h2{
  color:var(--green-700);
  font-size:1.2rem; letter-spacing:.04em; font-variant:small-caps;
}
p{ line-height:1.65; margin:.5rem 0 0; }
.lead{ font-size:1.05rem; color:var(--muted); }

/* ======= Simple two-column grid (used elsewhere) ======= */
.grid-2{ display:grid; gap:1rem; }
@media (min-width:760px){
  .grid-2{ grid-template-columns: 1fr 1fr; }
}

/* ======= Timeline ======= */
.timeline{
  list-style:none; padding:0; margin:0;
  border-left:2px solid var(--stone-200);
}
.timeline li{
  padding: .6rem 0 .6rem 1rem;
  position:relative;
}
.timeline li::before{
  content:""; width:8px; height:8px; border:2px solid var(--green-600);
  background:var(--stone-050);
  border-radius:2px; position:absolute; left:-5px; top:1rem; transform:translate(-50%, -50%);
}
.time{ font-weight:600; color:var(--green-700); display:block; margin-bottom:.25rem; }

/* ======= Figure (About) ======= */
.figure{
  border-radius:2px;
  overflow:hidden; background:rgba(255,255,255,0.6);
}
.figure img{ display:block; width:100%; height:auto; }
.figure figcaption{
  padding:.6rem .8rem; font-size:.95rem; color: var(--muted);
  border-top:1px solid var(--stone-200);
}

/* ======= Back link ======= */
.back-row{ margin:.5rem 0 0; font-size:.95rem; }
.back-row a{ color:var(--link); text-decoration:none; border-bottom:1px solid transparent; }
.back-row a:hover{ border-bottom-color:var(--link); }

/* ======= Shared content boxes (About + RSVP) ======= */
.box{
  background: rgba(255,255,255,0.85);
  border: 1px;
  border-radius: 2px;
  padding: 1.5rem;
}
.box h1,.box h2{ margin-top:0; }
.box h2{
  font-size:1.25rem; color:var(--green-700); font-variant:small-caps;
}

/* Compact form styling inside .box */
.box form{
  display:grid; gap:.6rem; width:100%; margin:0;
}
.box label{ font-weight:600; margin-bottom:.2rem; }

/* Thin green borders for fields + consistent look */
.box input,
.box select,
.box button{
  font:inherit;
  padding:.5rem .6rem;
  border:1px solid var(--green-600);
  border-radius:2px;
  background: rgba(255,255,255,0.85);
  color:var(--stone-600);
  margin:0;
}

/* Buttons */
.box button{
  color:var(--green-700);
  background:transparent;
  font-weight:700;
  cursor:pointer;
}
.box button:hover{ background: rgba(61,118,71,0.08); }

/* Inputs/selects: accessible focus */
.box input:focus,
.box select:focus,
.box button:focus{
  outline:none;
  border-color: var(--green-700);
  box-shadow: 0 0 0 1px var(--green-700);
}

/* Make <select> look like other boxes, keep custom arrow */
.box select{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--stone-600) 50%),
    linear-gradient(135deg, var(--stone-600) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 3px),
    calc(100% - 15px) calc(50% - 3px);
  background-size:5px 5px, 5px 5px;
  background-repeat:no-repeat;
  padding-right:2rem; /* room for arrow */
}

/* ======= RSVP grid: one column + centered on desktop ======= */
.rsvp-grid{
  display:grid;
  grid-template-columns: 1fr; /* always one column */
  gap:2rem;
  padding:8vh var(--side-pad);
  width:100%;
}
@media (min-width:768px){
  .rsvp-grid{
    max-width: var(--content-max);
    margin-inline:auto;
  }
}

/* Utilities */
.hidden{ display:none; } /* honeypot helper */

/* Placeholder text (Wedding box) */
.placeholder{
  text-align:center;
  padding:2rem 0;
  font-size:1.1rem;
  color:var(--muted);
}

/* Box header blocks */
.box-header{ text-align:center; margin-bottom:1rem; }
.box-title{
  font-size:1.3rem; color:var(--green-700); font-variant:small-caps; margin:0;
}
.box-date{
  font-size:1rem; color:var(--muted); margin:.2rem 0 .8rem 0;
}

/* Motion safety */
@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; }
}
/* Link styled exactly like RSVP buttons */
.button-link {
  display: inline-block;
  font: inherit;
  padding: .5rem .6rem;
  border: 1px solid var(--green-600);
  border-radius: 2px;
  background: transparent;
  color: var(--green-700);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease;
}
.button-link:hover,
.button-link:focus {
  background: rgba(61,118,71,0.08); /* same hover as RSVP buttons */
  outline: none;
}
