/* ── VARIABLES ── */
:root {
  --bg:            #faf8f5;
  --bg-card:       #ffffff;
  --text:          #2c2c2c;
  --text-light:    #777;
  --accent:        #8a7060;
  --accent-hover:  #6d5548;
  --accent-light:  #c9b4a8;
  --border:        #e8e0d8;
  --error:         #b94040;
  --font-serif:    'Cormorant Garamond', Georgia, serif;
  --font-sans:     'Lato', system-ui, sans-serif;
  --radius:        6px;
  --max-w:         860px;
  --transition:    0.2s ease;
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── UTILITY ── */
.hidden { display: none !important; }

/* ── DIVIDER ── */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.75rem 0 2rem;
  color: var(--accent-light);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── PASSWORD OVERLAY ── */
.overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.overlay-card {
  text-align: center;
  width: 100%;
  max-width: 420px;
  animation: fadeIn 0.6s ease both;
}

.overlay-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.overlay-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 8vw, 4rem);
  font-weight: 300;
  color: var(--text);
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.overlay-hint {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 1.75rem;
}

.password-field {
  display: flex;
  gap: 0.5rem;
  max-width: 340px;
  margin: 0 auto;
}

/* ── INPUTS (shared) ── */
input[type="text"],
input[type="password"],
input[type="email"] {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color var(--transition);
  outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--accent);
}

.password-field input {
  flex: 1;
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.65rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius);
  padding: 0.45rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 0.75rem;
  transition: all var(--transition);
}
.btn-secondary:hover {
  background: var(--accent);
  color: #fff;
}

.btn-submit { width: 100%; margin-top: 0.5rem; padding: 0.85rem; }

/* ── ERROR MESSAGES ── */
.error-msg {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ── MAIN SITE LAYOUT ── */
#site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── HEADER ── */
header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 2rem 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-title { margin-bottom: 1.25rem; }

.header-eyebrow {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--text);
}

.header-sub {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0.2rem;
}

/* ── NAV ── */
nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
}

.tab-btn:hover { color: var(--accent); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── TAB CONTENT ── */
.tab-content { display: none; }
.tab-content.active { display: block; }

main {
  flex: 1;
  padding: 3rem 1.5rem 4rem;
}

main > section {
  max-width: var(--max-w);
  margin: 0 auto;
}

main h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 300;
  text-align: center;
  letter-spacing: 0.04em;
}

/* ── HOME TAB ── */
.hero { text-align: center; margin-bottom: 3rem; }

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 300;
  letter-spacing: 0.04em;
}

.venue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.home-rsvp-cta {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.venue-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
}

.venue-card h3 {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.venue-main {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.venue-sub {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

.venue-map-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.03em;
}
.venue-map-link:hover { text-decoration: underline; }

/* ── OUR STORY TAB ── */
.story-container { max-width: 680px; margin: 0 auto; }
.story-container h2 { text-align: center; }

.story-block {
  margin-bottom: 2.5rem;
}

.story-block h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.story-block p {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.8;
}

/* ── STORY PERSPECTIVES ── */
.story-perspectives {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.25rem;
}

.perspective-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.perspective-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin: 0;
}

.perspective-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.perspective-photo:not(:has(img))::after {
  content: '◇';
  color: var(--border);
  font-size: 1.5rem;
}

.perspective-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.perspective-photo:has(img) {
  border-style: solid;
}

/* ── HOME CAROUSEL ── */
.home-carousel {
  position: relative;
  margin-top: 2.5rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.carousel-track-wrapper {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  flex: 0 0 100%;
  aspect-ratio: 16 / 9;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.carousel-empty-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.carousel-empty-slide span {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-light);
}

.carousel-btn {
  position: absolute;
  top: calc(50% - 1.5rem);
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--accent);
  z-index: 10;
  transition: background var(--transition), color var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.carousel-btn-prev { left: -1.375rem; }
.carousel-btn-next { right: -1.375rem; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--accent-light);
  background: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition);
}

.carousel-dot.active {
  background: var(--accent);
  border-color: var(--accent);
}

/* ── RSVP TAB ── */
.rsvp-container { max-width: 580px; margin: 0 auto; }
.rsvp-container h2 { text-align: center; }

.rsvp-deadline {
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 2.5rem;
}

/* ── FORM ── */
.form-group {
  margin-bottom: 1.75rem;
}

.form-note {
  font-size: 0.78rem;
  color: #888;
  margin: 0.25rem 0 0.5rem;
  font-style: italic;
}

.form-group > label:first-child {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.required { color: var(--accent); }
.optional { font-weight: 300; color: var(--text-light); font-size: 0.8rem; text-transform: none; letter-spacing: 0; }

/* Radio & checkbox */
.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.radio-label,
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 300;
  cursor: pointer;
}

.radio-label input,
.checkbox-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* Guest name rows */
#guest-names-section { margin-top: 1rem; }

.guest-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.guest-name-row input { flex: 1; }

.remove-guest-btn {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  line-height: 1;
  transition: color var(--transition);
}
.remove-guest-btn:hover { color: var(--error); }

/* ── CONFIRMATION ── */
.confirmation-card {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  animation: fadeIn 0.5s ease both;
}

.confirmation-heart {
  font-size: 2.5rem;
  color: var(--accent-light);
  margin-bottom: 1rem;
}

.confirmation-card h3 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.confirmation-card p {
  color: var(--text-light);
  line-height: 1.8;
}

/* ── RESPONSES TAB ── */
.responses-container { max-width: var(--max-w); margin: 0 auto; }
.responses-container h2 { text-align: center; }

.responses-note {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.sheet-link-text {
  text-align: right;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.sheet-embed-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

#responses-iframe {
  width: 100%;
  height: 600px;
  display: block;
}

/* ── FOOTER ── */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 0.8rem;
  color: var(--text-light);
  font-family: var(--font-serif);
  font-style: italic;
}

.admin-btn {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  font-size: 0.9rem;
  color: var(--border);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  transition: color var(--transition);
}
.admin-btn:hover { color: var(--text-light); }

/* ── LANGUAGE TOGGLE ── */
.lang-toggle {
  position: fixed;
  top: 0.75rem;
  right: 1rem;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lang-btn {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  transition: color var(--transition);
}

.lang-btn:hover { color: var(--accent); }
.lang-btn.active { color: var(--accent); font-weight: 700; }

.lang-sep { color: var(--border); font-size: 0.7rem; }

/* ── ANIMATIONS ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  header { padding: 1.25rem 1rem 0; position: static; }
  main { padding: 2rem 1rem 3rem; }
  .venue-grid { grid-template-columns: 1fr; }
  .password-field { flex-direction: column; }
  .password-field input { width: 100%; }
  .btn-primary { width: 100%; text-align: center; }
  .tab-btn { padding: 0.65rem 0.85rem; font-size: 0.7rem; }
  .story-perspectives { grid-template-columns: 1fr; gap: 1.5rem; }
  .carousel-btn-prev { left: 0.25rem; }
  .carousel-btn-next { right: 0.25rem; }
  .radio-label,
  .checkbox-label { min-height: 44px; }
}
