:root {
  /* Palette sampled from the landing photo: overcast Paris sky (--sky),
     warm sienna from skin/hair (--accent), navy sweater (--ink). */
  --bg: #f6f1ea;
  --ink: #262830;
  --muted: #7c828c;
  --accent: #96634c;
  --accent-soft: #ecdfd2;
  --border: #ddd4c8;
  --sky: #aab3bf;
  --max-width: 640px;
  --font-body: 'Quicksand', sans-serif;
  --font-display: 'Kranky', cursive;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html.locked,
html.locked body {
  overflow: hidden;
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.6;
}

a {
  color: var(--accent);
}

/* --- hero / landing --- */

.hero {
  height: 100vh;
  min-height: 480px;
  background-color: var(--accent-soft);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: 0 1.5rem;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.15) 45%, rgba(0, 0, 0, 0.55) 100%);
}

.hero-names {
  font-family: var(--font-display);
  font-size: 4rem;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-tagline {
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0.5rem 0 3rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.9;
}

.scroll-cue-arrow {
  font-size: 1.4rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* --- invite gate --- */

.gate-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.gate-label {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.9;
}

.gate-row {
  display: flex;
  gap: 0.5rem;
}

.gate-row input {
  font: inherit;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 999px;
  text-align: center;
  min-width: 220px;
}

.gate-row input:focus {
  outline: 2px solid var(--sky);
}

.gate-row button {
  padding: 0.8rem 1.6rem;
}

.gate-error {
  min-height: 1.2em;
  color: #ffd7d7;
  font-weight: 600;
  margin: 0;
}

/* --- carousel-group: a set of images that cross-fade through each other --- */

.carousel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.carousel-img.is-active {
  opacity: 1;
}

/* --- corkboard: playful tilted photo carousels flanking the RSVP form --- */

.corkboard {
  display: none;
}

.corkboard-slot {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.corkboard-slot .carousel-img {
  padding: 8px 8px 24px;
  border-radius: 3px;
  background: #fff;
  box-sizing: border-box;
}

.corkboard-slot::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.corkboard-slot:nth-child(2)::before {
  background: var(--sky);
}

.corkboard-left .corkboard-slot:nth-child(1) { transform: rotate(-6deg); }
.corkboard-left .corkboard-slot:nth-child(2) { transform: rotate(4deg) translateX(6px); }
.corkboard-left .corkboard-slot:nth-child(3) { transform: rotate(-3deg) translateX(-4px); }

.corkboard-right .corkboard-slot:nth-child(1) { transform: rotate(5deg); }
.corkboard-right .corkboard-slot:nth-child(2) { transform: rotate(-4deg) translateX(-6px); }
.corkboard-right .corkboard-slot:nth-child(3) { transform: rotate(3deg) translateX(4px); }

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

.center-col {
  max-width: var(--max-width);
  margin: 0 auto;
}

.welcome {
  margin-bottom: 2.5rem;
}

.welcome p {
  margin: 0 0 1rem;
}

.details {
  margin-bottom: 2.5rem;
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--accent-soft);
  border-radius: 16px;
}

.detail {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.detail:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-label {
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.detail-value {
  text-align: right;
}

.content-wrap {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 1140px) {
  .content-wrap {
    max-width: 1800px;
    margin: 0 auto;
    grid-template-columns: minmax(160px, 1fr) var(--max-width) minmax(160px, 1fr);
    gap: 2rem;
    align-items: start;
  }

  .corkboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 480px;
    /* Fixed to one viewport's worth, deliberately not tied to the center
       column's height — that height shifts with RSVP form/success state,
       and the corkboards shouldn't resize when it does. */
    height: 100vh;
    justify-self: center;
  }
}

.rsvp h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  margin-top: 0;
  color: var(--accent);
}

.rsvp-deadline {
  color: var(--muted);
  font-size: 0.9rem;
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.rsvp-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 700;
}

.rsvp-form input[type="text"],
.rsvp-form textarea {
  font: inherit;
  padding: 0.7rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.rsvp-form input[type="text"]:focus,
.rsvp-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.rsvp-form fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.rsvp-form legend {
  font-weight: 700;
  padding: 0;
  margin-bottom: 0.6rem;
}

.optional {
  font-weight: normal;
  color: var(--muted);
}

/* --- big button-style choices --- */

.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.choice-btn {
  position: relative;
  display: block;
  font-weight: 600;
  cursor: pointer;
}

.choice-btn input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.choice-btn span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.1rem 1rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: #fff;
  transition: all 0.15s ease;
}

.choice-btn:hover span {
  border-color: var(--accent);
}

.choice-btn input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.choice-btn input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.choice-btn-toggle span {
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button {
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.9rem 2.2rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

.alert {
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  font-weight: 600;
}

.alert-success {
  background: #dff2df;
  color: #245a24;
}

.alert-error {
  background: #f7dcdc;
  color: #7a2222;
}


/* --- admin --- */

body.admin {
  font-family: system-ui, sans-serif;
  padding: 2rem;
}

.admin-counts {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.button:hover {
  opacity: 0.9;
}

.admin-table {
  border-collapse: collapse;
  width: 100%;
}

.admin-table th,
.admin-table td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.admin-table th {
  background: var(--accent-soft);
}
