:root {
  --terra: #b66349;
  --olive: #6d7148;
  --beige: #eee0c5;
  --ink: #28251f;
  --paper: #f8f1e3;
  --white: #fffaf2;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 13px 4vw;
  background: rgba(248, 241, 227, .94);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--ink);
}

.brand {
  font: 1.45rem "Permanent Marker";
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
}

.nav a {
  text-decoration: none;
  font-size: .9rem;
  font-weight: 700;
}

.nav a:hover {
  color: var(--terra);
}

.languages {
  display: flex;
  gap: 5px;
}

.lang {
  border: 1px solid var(--ink);
  background: transparent;
  padding: 6px;
  cursor: pointer;
}

.lang.active {
  background: var(--ink);
  color: white;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  font-size: 1.5rem;
}

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: white;
  background: linear-gradient(#0007, #0007), url('assets/images/hero.jpg') center/cover;
}

.hero-content {
  max-width: 900px;
  padding: 110px 20px 50px;
}

.eyebrow,
.tag {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 700;
}

.hero h1 {
  font: clamp(3.7rem, 11vw, 8.5rem)/.9 "Permanent Marker";
  margin: .15em 0;
  transform: rotate(-2deg);
}

.hero h1 span {
  color: var(--terra);
}

.lead {
  font-size: clamp(1.1rem, 3vw, 1.55rem);
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 25px 0;
}

.time {
  min-width: 90px;
  padding: 12px;
  background: #f8f1e3e8;
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--terra);
}

.time strong {
  font-size: 1.8rem;
  display: block;
}

.time small {
  text-transform: uppercase;
}

.btn {
  display: inline-block;
  border: 2px solid var(--ink);
  padding: 13px 20px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: .15s;
}

.btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.primary {
  background: var(--terra);
  color: white;
}

.secondary {
  background: var(--beige);
}

.ghost {
  color: white;
  border-color: white;
  box-shadow: 4px 4px 0 white;
}

.section {
  padding: 90px max(5vw, 20px);
}

.paper {
  background: var(--paper);
}

.olive {
  background: var(--olive);
  color: white;
}

.section-head {
  display: flex;
  align-items: end;
  gap: 20px;
  border-bottom: 3px solid currentColor;
  margin-bottom: 25px;
}

.section h2,
.venue h2 {
  font: clamp(2.4rem, 7vw, 5rem) "Permanent Marker";
  margin: 0 0 10px;
}

.section h3 {
  font: 2rem "Permanent Marker";
  margin-top: 55px;
}

.copy {
  max-width: 760px;
  font-size: 1.1rem;
  line-height: 1.7;
}

.carousel {
  position: relative;
  margin: 35px auto;
  max-width: 1060px;
}

.track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78vw, 520px);
  gap: 16px;
  overflow: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.track img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  scroll-snap-align: center;
  border: 3px solid var(--ink);
  cursor: zoom-in;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  border: 2px solid var(--ink);
  background: var(--beige);
  width: 42px;
  height: 42px;
  font-size: 2rem;
  cursor: pointer;
}

.prev {
  left: -18px;
}

.next {
  right: -18px;
}

.venue-hero {
  min-height: 65vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: white;
  background: linear-gradient(#0007, #0007), url('assets/images/can-vidal-hero.jpg') center/cover;
}

.rsvp {
  background: var(--beige);
}

form {
  max-width: 850px;
}

label > span,
legend {
  display: block;
  font-weight: 800;
  margin-bottom: 8px;
}

.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--ink);
  background: var(--white);
  font: inherit;
}

textarea {
  min-height: 100px;
}

fieldset {
  border: 0;
  padding: 25px 0;
  display: grid;
  gap: 22px;
}

.choice-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.choice-group label {
  position: relative;
}

.choice-group input {
  position: absolute;
  opacity: 0;
}

.choice-group span {
  display: block;
  border: 2px solid var(--ink);
  padding: 12px 18px;
  background: var(--white);
  cursor: pointer;
}

.choice-group input:checked + span {
  background: var(--olive);
  color: white;
}

.suggestions {
  position: absolute;
  z-index: 8;
  width: 100%;
  background: white;
  border: 2px solid var(--ink);
}

.suggestions button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px;
  border: 0;
  background: white;
  cursor: pointer;
}

.suggestions button:hover {
  background: var(--beige);
}

label {
  position: relative;
}

.status {
  font-weight: 700;
}

.error {
  color: #8c1d18;
}

.success {
  margin-top: 22px;
  padding: 20px;
  background: var(--olive);
  color: white;
  font-size: 1.25rem;
  font-weight: 800;
}

.hint {
  border-left: 5px solid var(--terra);
  padding-left: 12px;
}

.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
}

.check input {
  width: auto;
}

.arrival-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.maps img {
  width: 100%;
  margin-bottom: 18px;
  border: 3px solid var(--ink);
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 30px 5vw;
  background: var(--ink);
  color: white;
}

footer nav {
  display: flex;
  gap: 20px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000d;
  display: grid;
  place-items: center;
  padding: 30px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
}

.lightbox button {
  position: absolute;
  top: 15px;
  right: 22px;
  color: white;
  background: none;
  border: 0;
  font-size: 3rem;
}

@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    background: var(--paper);
    padding: 20px;
    flex-direction: column;
    border-bottom: 2px solid var(--ink);
  }

  .nav.open {
    display: flex;
  }

  .languages {
    margin-left: 0;
  }

  .grid.two,
  .arrival-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: 75px;
  }

  .carousel-btn {
    display: none;
  }
}
