/* Tristan & Leslie — RSVP microsite */
:root{
  --bg:#f0e6d5;           /* light kraft */
  --paper:#f8f1e2;
  --ink:#22140f;          /* deep brown */
  --accent:#c83d2b;       /* pumpkin red */
  --accent-2:#b56b1e;     /* harvest gold */
  --shadow: 0 10px 30px rgba(0,0,0,.15);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--ink);
  background: var(--bg);
  line-height:1.6;
}

/* Hero */
.hero{
  position:relative;
  height: 52vh;
  min-height: 360px;
  display:grid;
  place-items:center;
  text-align:center;
  background: url('img/invite.png') center/cover no-repeat fixed;
  border-bottom: 6px solid var(--accent);
  box-shadow: var(--shadow);
}
.hero__overlay{
  position:absolute; inset:0;
  background: radial-gradient(ellipse at center, rgba(34,20,15,0.1) 0%, rgba(34,20,15,0.55) 70%);
}
.hero__content{ position:relative; z-index:1; padding: 0 1rem; }
h1.script{
  font-family: 'Great Vibes', cursive;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 1.05;
  margin: 0;
  color: #ffe9db;
  text-shadow: 0 3px 12px rgba(0,0,0,.5);
}
h1 .amp{color:var(--accent)}
.date, .place{
  margin:.25rem 0;
  font-weight:700;
  letter-spacing:.02em;
  color:#fff;
  text-shadow: 0 2px 6px rgba(0,0,0,.55);
}

/* Black badges behind date/address + map link */
.badge{
  display:inline-block;
  background: rgba(0,0,0,.9);
  padding: 6px 12px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.45);
}
.maplink a{
  display:inline-block;
  margin-top: 8px;
  background: rgba(0,0,0,.95);
  color:#fff;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight:700;
  letter-spacing:.02em;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.maplink a:hover{ text-decoration: underline; }

/* Layout */
main{
  width:min(960px, 92vw);
  margin: -60px auto 60px;
}
/* Decorative line before RSVP */
.section-line{
  height: 4px;
  width: 100%;
  margin: 0 auto 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, #000 0%, #000 32%, var(--accent) 50%, #000 68%, #000 100%);
  box-shadow: var(--shadow);
}

.card{
  background: var(--paper);
  padding: clamp(16px, 2.4vw, 28px);
  border-radius: 18px;
  box-shadow: var(--shadow);
  margin: 20px 0;
  border: 2px solid #e4d5be;
}
.card h2{
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3.2vw, 34px);
  margin: 0 0 10px;
}
.muted{ color:#6b554b; }

/* Form */
.form{ display:block; }
.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width:720px){
  .grid{ grid-template-columns: repeat(2,1fr); }
}
.field{ display:flex; flex-direction:column; gap:8px; }
.field span{ font-weight:600; }
input, textarea{
  font: inherit;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid #d7c6b2;
  background: #fffdf8;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(200,61,43,.12);
}
textarea{ resize: vertical; }
.hp{ position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }

.btn{
  margin-top: 10px;
  display:inline-block;
  padding: 12px 18px;
  border-radius: 14px;
  border: none;
  font-weight:700;
  letter-spacing:.02em;
  background: linear-gradient(180deg, var(--accent), #7f1f14);
  color:#fff;
  cursor:pointer;
  box-shadow: 0 6px 16px rgba(200,61,43,.35);
  transition: transform .05s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:disabled{ filter: grayscale(.3); opacity:.7; cursor:not-allowed; }
.btn:active{ transform: translateY(1px); }

.status{ min-height: 1.4em; margin:.5rem 0 0; font-weight:600; }

/* Gifts */
.gift-details summary{
  cursor:pointer;
  font-weight:700;
  color:var(--accent);
  list-style:none;
}
.gift-details summary::-webkit-details-marker{ display:none; }
.gift-details summary::after{
  content:"▾";
  margin-left:.4rem;
}
.gift-list{ margin:.6rem 0 0 1rem; }

/* Footer */
.footer{
  text-align:center;
  padding: 22px 10px 40px;
  color:#846c61;
}


/* Red separators and list bullets */
.sep{ color: var(--accent); }
.gift-list li::marker{ color: var(--accent); }


@media (max-width: 520px){
  h1.script{
    /* Larger scaling on small screens but never above the desktop max */
    font-size: clamp(42px, 22vw, 92px);
    white-space: nowrap;      /* keep on one line */
  }
}


@media (max-width: 520px){
  h1.script{
    font-size: clamp(42px, 16vw, 92px);
    white-space: normal;     /* allow wrapping to prevent overflow */
    display: inline-block;
    max-width: 92vw;         /* never exceed viewport width */
    overflow-wrap: anywhere; /* safe breaks if needed */
    text-wrap: balance;      /* nicer two-line balance (supported on modern browsers) */
  }
}


@media (max-width: 520px){
  main{
    /* Remove the pull-up overlap on phones so content never hides under the hero */
    margin: 8px auto 56px;
  }
  .hero{
    padding-bottom: 14px; /* small cushion when text wraps */
  }
}




/* Map buttons — pumpkin gradient + newline */
.maplinks{
  display: flex;           /* block-level flex so it starts on a new line */
  width: 100%;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  clear: both;             /* just in case any inline elements float */
}
a.mapbtn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;    /* pill */
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #fff !important;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .015em;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(200,61,43,.30);
  border: 1px solid rgba(255,255,255,.18);
  transform: translateZ(0);
}
a.mapbtn.alt{
  background: linear-gradient(180deg, #b85a18, #7f1f14);
}
a.mapbtn:hover{
  text-decoration: none;
  filter: brightness(1.05);
  box-shadow: 0 8px 18px rgba(200,61,43,.35);
}
.mapbtn .icon{ display:block; flex:0 0 auto; }
@media (max-width:520px){
  .maplinks{ gap: 10px; }
  a.mapbtn{ padding: 11px 14px; }
  .mapbtn .icon{ width: 18px; height: 18px; }
}


/* Attendance radios as segmented buttons */
.attend{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 6px 0 10px;
}
.attend-option{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fffdf8;
  border: 1.5px solid #d7c6b2;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  user-select: none;
}
.attend-option input{
  appearance: none;
  width: 14px; height: 14px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: grid; place-items: center;
  background: #fff;
}
.attend-option input:checked{
  background: radial-gradient(circle at center, var(--accent) 0 50%, transparent 51%);
}
.attend-option:hover{ border-color: var(--accent); }
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Add this to the end of your style.css file */

/* Status message styles */
.status {
  min-height: 1.4em;
  margin: 0.5rem 0 0;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.status.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Form submission states */
.btn:disabled {
  filter: grayscale(0.3);
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* Loading state for button */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/* Add this to the end of your style.css file */

/* Status message styles */
.status {
  min-height: 1.4em;
  margin: 0.5rem 0 0;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.status.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Form submission states */
.btn:disabled {
  filter: grayscale(0.3);
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* Loading state for button */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Gift options styling */
.gift-options {
  margin-top: 1rem;
}

.gift-option {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #fffdf8;
  border-radius: 8px;
  border: 1px solid #e4d5be;
}

.gift-option h3 {
  font-family: 'Playfair Display', serif;
  color: var(--accent);
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.gift-option p {
  margin: 0.5rem 0;
}

.address {
  background: #f8f1e2;
  padding: 0.75rem;
  border-radius: 6px;
  border-left: 3px solid var(--accent);
  font-family: 'Montserrat', sans-serif;
  line-height: 1.4;
}

.qr-container {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0;
}

.qr-code {
  width: 150px;
  height: 150px;
  border: 2px solid #d7c6b2;
  border-radius: 8px;
  background: white;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.venmo-link {
  display: inline-block;
  background: linear-gradient(135deg, #3D95CE, #1F5F8C);
  color: white !important;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(61, 149, 206, 0.3);
}

.venmo-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(61, 149, 206, 0.4);
  text-decoration: none;
}

@media (max-width: 520px) {
  .gift-option {
    padding: 0.75rem;
  }
  
  .qr-code {
    width: 120px;
    height: 120px;
  }
}