@import url("tokens.css");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--color-cream);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-weight: 400;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Nav ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  padding: 24px var(--side-padding-mobile);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-tan);
  background: var(--color-cream);
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
}

.btn-accent {
  background: var(--color-tan);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-tan);
  background: var(--color-cream);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 16px;
  height: 2px;
  background: var(--color-ink);
  position: relative;
}

.nav-toggle span::before {
  position: absolute;
  top: -5px;
}

.nav-toggle span::after {
  position: absolute;
  top: 5px;
}

/* Mobile full-screen nav overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-sage);
  z-index: 100;
  flex-direction: column;
}

.nav-overlay.is-open {
  display: flex;
}

.nav-overlay-header {
  display: flex;
  justify-content: flex-end;
  padding: 24px;
}

.nav-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-terracotta);
  border: none;
  cursor: pointer;
}

.nav-close svg {
  width: 12px;
  height: 12px;
}

.nav-overlay-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
}

.nav-overlay-footer {
  margin-top: auto;
  display: flex;
  justify-content: center;
  padding: 40px 24px;
}

.nav-overlay-footer img {
  width: 140px;
}

body.menu-open {
  overflow: hidden;
}

/* ---------- Homepage ---------- */

body.home {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.home .nav {
  flex: 0 0 auto;
}

.home-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.home-content .hero,
.home-content .illustration,
.home-content .motif,
.home-content .footer {
  flex: 0 0 auto;
}

/* ---------- Hero ---------- */

.hero {
  padding: 80px var(--side-padding-mobile) 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-eyebrow {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 48px;
  color: var(--color-terracotta);
  line-height: 1.2;
}

.hero-title-break {
  display: inline;
}

/* ---------- Illustration ---------- */

.illustration {
  padding: 0 var(--side-padding-mobile);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
}

.illustration picture {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
}

.illustration img {
  width: 100%;
  max-width: 354px;
}

/* ---------- Motif ---------- */

.motif {
  display: flex;
  justify-content: center;
  padding: 80px var(--side-padding-mobile) 0;
}

.motif img {
  width: 188px;
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  font-size: 12px;
  margin-top: 24px;
}

.footer a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Page title (RSVP / Venues / Details / Our Story) ---------- */

.page-title {
  padding: 80px var(--side-padding-mobile) 24px;
}

.page-title h1,
.page-title h2 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.page-title p {
  font-size: 12px;
  margin-top: 8px;
  letter-spacing: 0.02em;
  white-space: pre-line;
}

/* ---------- RSVP form ---------- */

.rsvp-form {
  padding: 0 var(--side-padding-mobile) 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

#guests-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.guest-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid var(--color-terracotta);
  border-radius: 20px;
  padding: 24px;
}

.guest-block-close {
  display: flex;
  justify-content: flex-end;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--color-ink);
}

.guest-title {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.form-row > label,
.field label {
  font-size: 14px;
  letter-spacing: 0.02em;
}

.field-input {
  width: 100%;
  border: 1px solid var(--color-ink);
  border-radius: 20px;
  background: #ffffff;
  padding: 9px 12px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--color-ink);
}

.field-input::placeholder {
  color: var(--color-ink);
  opacity: 1;
  font-family: var(--font-body);
  font-weight: 500;
}

textarea.field-input {
  resize: vertical;
  min-height: 80px;
  line-height: 1.4;
}

.radio-group {
  display: flex;
  gap: 24px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border-radius: 50%;
  border: 1px solid var(--color-ink);
  background: #ffffff;
  position: relative;
  flex-shrink: 0;
}

.radio-option input[type="radio"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
}

.radio-option input[type="radio"]:checked::after {
  background: var(--color-ink);
}

.add-guest-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.add-guest-row span {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.round-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 41px;
  height: 41px;
  border-radius: 50%;
  border: 1px solid var(--color-tan);
  background: var(--color-cream);
  cursor: pointer;
  flex-shrink: 0;
}

.form-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* ---------- Venues ---------- */

.venue-row {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0 var(--side-padding-mobile) 40px;
  padding: 24px;
  border: 1px solid var(--color-terracotta);
  border-radius: 20px;
}

.venue-media img {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
}

.venue-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.venue-info-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.venue-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  color: var(--color-terracotta);
  line-height: 1.2;
}

.venue-subtitle {
  font-size: 14px;
  font-weight: 500;
}

.venue-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.venue-detail-row svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.venue-detail-row a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.venue-description {
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  white-space: pre-line;
}

.venue-description-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.schedule-time {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.schedule-desc {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

/* ---------- Wedding party ---------- */

.party-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 0 var(--side-padding-mobile) 40px;
}

.party-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  border: 1px solid var(--color-terracotta);
  border-radius: 20px;
  padding: 24px;
}

.party-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

.party-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  color: var(--color-terracotta);
  line-height: 1.2;
}

.party-role {
  font-size: 14px;
  font-weight: 500;
  margin-top: 4px;
}

.party-bio {
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  white-space: pre-line;
}

.party-bio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

/* ---------- FAQ accordion ---------- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 var(--side-padding-mobile) 40px;
}

.faq-item {
  border: 1px solid var(--color-terracotta);
  border-radius: 20px;
  padding: 24px;
}

.faq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  color: var(--color-ink);
}

.faq-question {
  font-size: 14px;
  font-weight: 500;
}

.faq-icon-minus {
  display: none;
}

.faq-item.is-open .faq-icon-plus {
  display: none;
}

.faq-item.is-open .faq-icon-minus {
  display: block;
}

.faq-item.is-open .round-btn {
  background: var(--color-terracotta);
  border-color: var(--color-terracotta);
}

.faq-item.is-open .faq-icon-minus path {
  stroke: var(--color-cream);
}

.faq-content {
  display: none;
  margin-top: 24px;
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  white-space: pre-line;
}

.faq-item.is-open .faq-content {
  display: block;
}

/* ---------- Desktop ---------- */

@media (min-width: 900px) {
  .nav {
    justify-content: center;
    padding: 80px var(--side-padding-desktop) 0;
  }

  .nav-links {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .hero {
    padding: 120px var(--side-padding-desktop) 24px;
  }

  .hero-eyebrow {
    font-size: 22px;
  }

  .hero-title {
    font-size: 68px;
  }

  .hero-title-break {
    display: none;
  }

  .illustration {
    padding: 0 var(--side-padding-desktop);
  }

  .illustration img {
    max-width: clamp(180px, 17.5vw, 300px);
  }

  .motif {
    padding: 120px var(--side-padding-desktop) 0;
  }

  .footer {
    padding: 24px var(--side-padding-desktop);
    justify-content: center;
    margin-top: 0;
  }

  .page-title {
    padding: 120px var(--side-padding-desktop) 24px;
  }

  .rsvp-form {
    padding: 0 var(--side-padding-desktop) 40px;
  }

  .guest-block {
    padding: 40px;
  }

  .form-row-names {
    flex-direction: row;
  }

  .venue-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 72px;
    margin: 0 var(--side-padding-desktop) 40px;
    padding: 40px;
    border: 1px solid var(--color-terracotta);
    border-radius: 20px;
  }

  .venue-row--reverse {
    flex-direction: row-reverse;
  }

  .venue-row--split .venue-media,
  .venue-row--split .venue-info {
    flex: 1 1 0;
  }

  .venue-row--compact {
    padding: 0;
    border: none;
  }

  .venue-row--compact .venue-media {
    flex: 0 0 264px;
  }

  .venue-row--compact .venue-info {
    flex: 1 1 0;
    border: 1px solid var(--color-terracotta);
    border-radius: 20px;
    padding: 40px;
  }

  .venue-row--60-40 {
    padding: 32px;
  }

  .venue-row--60-40 .venue-info {
    flex: 6 1 0;
  }

  .venue-row--60-40 .venue-media {
    flex: 4 1 0;
  }

  .venue-name {
    font-size: 42px;
  }

  .faq-list {
    padding: 0 var(--side-padding-desktop) 40px;
  }

  .faq-item {
    padding: 40px;
  }

  .party-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0 var(--side-padding-desktop) 40px;
  }

  .party-card {
    padding: 40px;
  }

  .party-name {
    font-size: 42px;
  }
}
