/* ─── Design tokens ─── */
:root {
  --ivory:      #FAF7F2;
  --espresso:   #2A2420;
  --sand:       #C4A882;
  --sand-rgb: 196 168 130;
  --linen:      #E8DDD0;
  --stone:      #7A6B5D;
  --white:      #FFFFFF;

  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --max-width: 900px;
  --header-height: 64px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--ivory);
  color: var(--stone);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── Typography ─── */
h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--espresso); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-style: italic; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.kicker {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--sand);
  display: block;
  margin-bottom: 0.75rem;
}

/* ─── Layout ─── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
}

.section--linen {
  background: var(--linen);
}

/* ─── Divider ─── */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 48px 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--linen);
}
.divider span {
  font-family: var(--font-serif);
  color: var(--sand);
  font-size: 1.1rem;
}

/* ─── Header / Nav ─── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--ivory);
  border-bottom: 1px solid var(--linen);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 100;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand);
}

.site-nav {
  display: flex;
  gap: 28px;
  list-style: none;
}

.site-nav a {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--espresso);
  border-bottom-color: var(--sand);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--espresso);
  transition: all 0.2s;
}

/* mobile nav overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--ivory);
  z-index: 101;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.nav-overlay.open { display: flex; }
.nav-overlay a {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--espresso);
  font-style: italic;
}
.nav-overlay .close-btn {
  position: absolute;
  top: 20px; right: 28px;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--espresso);
}

/* ─── Page hero (inner pages) ─── */
.page-hero {
  padding: calc(var(--header-height) + 64px) 0 64px;
  text-align: center;
}

.page-hero h1 {
  margin-bottom: 12px;
}

.page-hero .subtitle {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--stone);
}

/* ─── Buttons ─── */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--espresso);
  color: var(--ivory);
}
.btn-primary:hover { background: #3d3530; }

.btn-secondary {
  background: transparent;
  color: var(--stone);
  border: 1px solid var(--sand);
}
.btn-secondary:hover { border-color: var(--espresso); color: var(--espresso); }

/* ─── Form inputs ─── */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 8px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--espresso);
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--espresso);
  outline: 2px solid var(--espresso);
  outline-offset: 2px;
}

.form-textarea { resize: vertical; min-height: 100px; }

/* ─── Cards ─── */
.card {
  background: var(--white);
  border: 1px solid var(--linen);
  border-radius: 4px;
  padding: 24px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* ─── Timeline ─── */
.timeline { list-style: none; padding: 0; }
.timeline-item {
  display: flex;
  gap: 24px;
  padding-bottom: 40px;
  position: relative;
}
.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 54px;
  top: 28px;
  bottom: 0;
  width: 1px;
  background: var(--linen);
}
.timeline-time {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--sand);
  min-width: 56px;
  padding-top: 2px;
  text-align: right;
}
.timeline-dot {
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--sand);
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
  background: var(--ivory);
}
.timeline-content h3 {
  font-family: var(--font-serif);
  color: var(--espresso);
  margin-bottom: 4px;
}
.timeline-content p { font-size: 0.9rem; margin-bottom: 0; }

/* ─── Footer ─── */
.site-footer {
  padding: 40px 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--sand);
  letter-spacing: 0.1em;
  border-top: 1px solid var(--linen);
}

/* ─── FAQ accordion ─── */
.faq-item { border-bottom: 1px solid var(--linen); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 20px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--espresso);
}
.faq-question .icon {
  font-size: 1.2rem;
  color: var(--sand);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 16px;
}
.faq-item.open .icon { transform: rotate(45deg); }
.faq-answer {
  display: none;
  padding-bottom: 20px;
  font-size: 0.95rem;
  color: var(--stone);
  line-height: 1.75;
}
.faq-item.open .faq-answer { display: block; }

/* ─── RSVP toggle buttons ─── */
.attend-toggle {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.attend-btn {
  flex: 1;
  padding: 14px;
  border: 1.5px solid var(--linen);
  background: var(--white);
  border-radius: 2px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  transition: all 0.2s;
}
.attend-btn:hover { border-color: var(--sand); }
.attend-btn.selected-yes {
  background: var(--espresso);
  color: var(--ivory);
  border-color: var(--espresso);
}
.attend-btn.selected-no {
  background: var(--stone);
  color: var(--ivory);
  border-color: var(--stone);
}

/* ─── Admin table ─── */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th {
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  padding: 12px 16px;
  border-bottom: 2px solid var(--linen);
}
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--linen); color: var(--espresso); }
.admin-table tr:hover td { background: var(--ivory); }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}
/* status colours — intentionally outside brand palette */
.badge-yes { background: #e8f5e9; color: #2e7d32; }
.badge-no  { background: #fce4ec; color: #c62828; }

/* ─── Landing page (full-screen) ─── */
.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--espresso);
}
.landing-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.5;
}
.landing-content {
  position: relative;
  text-align: center;
  padding: 40px 24px;
  max-width: 480px;
  width: 100%;
}
.landing-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--ivory);
  font-style: italic;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 8px;
}
.landing-date {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--sand);
  margin-bottom: 40px;
}
.landing-rule {
  width: 40px;
  height: 1px;
  background: var(--sand);
  margin: 0 auto 40px;
}
.landing-form { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.landing-form .form-input {
  background: rgba(255,255,255,0.1);
  border-color: rgb(var(--sand-rgb) / 0.4);
  color: var(--ivory);
  text-align: center;
  letter-spacing: 0.15em;
  max-width: 280px;
}
.landing-form .form-input::placeholder { color: rgb(var(--sand-rgb) / 0.6); }
.landing-form .form-input:focus { border-color: var(--sand); }
/* error — status colour, not brand palette */
.landing-error {
  font-size: 0.8rem;
  color: #f48fb1;
  min-height: 1.2em;
  letter-spacing: 0.05em;
}

/* ─── Story page grid ─── */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* ─── Responsive ─── */
@media (max-width: 700px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .section { padding: 48px 0; }
  .card-grid { grid-template-columns: 1fr; }
  .attend-toggle { flex-direction: column; }
  .site-header { padding: 0 20px; }
  .container { padding: 0 16px; }
  .story-grid { grid-template-columns: 1fr; }
  .travel-grid { grid-template-columns: 1fr !important; }
}
