:root {
  --paper: #fbf7f1;
  --paper-deep: #f1e7da;
  --ink: #000000;
  --ink-soft: #30393f;
  --line: rgba(0, 0, 0, 0.16);
  --line-strong: rgba(0, 0, 0, 0.28);
  --accent: #30393f;
  --accent-deep: #30393f;
  --hero-button: #8ebed5;
  --hero-button-deep: #79abc3;
  --button-text: #fbf7f1;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Libre Baskerville", serif;
  color: var(--ink-soft);
  background:
    radial-gradient(circle at top left, rgba(0, 0, 0, 0.03), transparent 26%),
    linear-gradient(180deg, #fdfaf5 0%, var(--paper) 55%, #f8f0e5 100%);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: var(--accent-deep);
  text-decoration-color: rgba(106, 67, 52, 0.35);
  text-underline-offset: 0.2em;
}

.page-shell {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.hero-panel {
  min-height: min(100vh - 56px, 820px);
  display: grid;
  place-items: center;
  padding: 48px 24px;
  background: transparent;
  position: relative;
  overflow: hidden;
  transition:
    opacity 900ms ease,
    transform 900ms ease,
    min-height 900ms ease,
    padding 900ms ease,
    margin 900ms ease,
    height 900ms ease;
}

.hero-panel.is-hidden {
  opacity: 0;
  transform: translateY(-18px);
  height: 0;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  border: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-panel.is-hidden .hero-panel__inner {
  opacity: 0;
}

.hero-panel__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  text-align: center;
  animation: heroReveal 1s ease both;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Libre Baskerville", serif;
  font-weight: 600;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.3;
}

h3 {
  font-size: clamp(1.15rem, 2.4vw, 1.3rem);
  line-height: 1.35;
}

.hero-date {
  margin: 38px 0 0;
  font-size: clamp(1rem, 2vw, 1.2rem);
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.hero-copy,
.section p,
label,
legend,
.form-status {
  line-height: 1.75;
}

.section p {
  text-align: justify;
}

.hero-copy {
  max-width: 560px;
  margin: 22px auto 38px;
  font-size: 1rem;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
  margin-left: auto;
  margin-right: auto;
}

.primary-button {
  border: 1px solid rgba(116, 159, 217, 0.28);
  background: linear-gradient(135deg, var(--hero-button), var(--hero-button-deep));
  color: var(--button-text);
  cursor: pointer;
}

.spotify-button {
  display: flex;
  width: fit-content;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.46);
  color: var(--ink-soft);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(0);
}

.content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  pointer-events: none;
  transition: opacity 950ms ease, transform 950ms ease;
}

.content.is-visible {
  max-height: none;
  overflow: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.section {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.invitation-intro {
  padding-top: 0;
  border-top: none;
}

.invitation-intro {
  text-align: center;
}

.couple-banner {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.location-layout,
.timeline {
  display: grid;
  gap: 10px;
}

.location-layout {
  grid-template-columns: 1fr;
  align-items: start;
}

.location-copy {
  display: grid;
  gap: 12px;
  align-content: start;
}

.location-address {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-soft);
}


.location-photo,
.map-container {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.location-photo {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
}

.text-section h2 {
  margin-bottom: 18px;
}

.location-layout .secondary-button {
  justify-self: center;
}

.overnight-heading {
  margin-top: 48px;
}

.map-container iframe {
  display: block;
  width: 100%;
  min-height: 340px;
}

.timeline {
  text-align: center;
}

.timeline p {
  margin: 0;
  line-height: 1.4;
}

.timeline p {
  text-align: center;
}

.text-section {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.closing-section {
  display: grid;
  gap: 28px;
  margin-left: auto;
  margin-right: auto;
  justify-items: center;
  text-align: center;
}

.closing-line {
  margin: 0;
  font-family: "Libre Baskerville", serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--ink-soft);
  text-align: center;
  text-align-last: center;
  line-height: 1.3;
  letter-spacing: 0;
  width: 100%;
  display: block;
}

.closing-photo {
  width: min(420px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.rsvp-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
}

.rsvp-form label,
.checkbox-group {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
}

.full-width {
  grid-column: 1 / -1;
}

.checkbox-group {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
}

.checkbox-group legend {
  padding: 0 8px;
  color: var(--ink-soft);
}

.checkbox-option {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.checkbox-option input {
  width: 20px;
  height: 20px;
  margin: 0;
  flex: 0 0 20px;
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  display: grid;
  place-content: center;
}

.checkbox-option input::before {
  content: "";
  width: 10px;
  height: 10px;
  transform: scale(0);
  transition: transform 120ms ease-in-out;
  box-shadow: inset 1em 1em var(--hero-button-deep);
  border-radius: 2px;
}

.checkbox-option input:checked::before {
  transform: scale(1);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  padding: 14px 16px;
  color: var(--ink-soft);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(138, 91, 71, 0.1);
}

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

.form-status {
  margin: 0;
  min-height: 1.7em;
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .location-layout,
  .timeline,
  .rsvp-form {
    grid-template-columns: 1fr;
  }

  .location-photo {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100%, calc(100% - 24px));
    padding: 12px 0 40px;
  }

  .hero-panel {
    min-height: calc(100vh - 24px);
    padding: 36px 18px;
  }

  .hero-copy {
    margin-bottom: 28px;
  }

  .section {
    padding: 30px 0;
  }

  .invitation-intro {
    padding-top: 0;
  }

  .couple-banner,
  .location-photo,
  .map-container {
    border-radius: 18px;
  }

  .checkbox-group {
    padding: 16px;
  }

  .checkbox-option {
    gap: 10px;
  }

  .checkbox-option span {
    font-size: 0.96rem;
    line-height: 1.45;
  }

  .checkbox-option input {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  .checkbox-option input::before {
    width: 9px;
    height: 9px;
  }
}
