:root {
    --background: #fdfbf6;
    --text: #2f2c29;
    --muted: #7b7169;
    --accent: #d3a98c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: "Courier Prime", "Courier New", monospace;
    line-height: 1.7;
    overflow-x: hidden;
}

p {
    margin: 0 0 1.2rem;
}

ul {
    margin: 0;
    padding-left: 1.2rem;
}

li + li {
    margin-top: 0.6rem;
}

.locked {
    overflow: hidden;
}

a {
    color: inherit;
}

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

script,
style {
    font-family: monospace;
}

/* Keyframe animations for illustrations */
@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

@keyframes gentle-wobble {
    0%,
    100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(2deg);
    }
    75% {
        transform: rotate(-2deg);
    }
}

@keyframes icon-hover-wobble {
    0%,
    100% {
        transform: rotate(0deg) scale(1);
    }
    35% {
        transform: rotate(3deg) scale(1.03);
    }
    65% {
        transform: rotate(-3deg) scale(1.03);
    }
}

main {
    max-width: 880px;
    margin: 0 auto;
    padding: 3rem 1.5rem 6rem;
}

main > section {
    margin: 5rem 0;
}

.script {
  font-family: 'Qwitcher Grypen', cursive;
  letter-spacing: 0.04em;
}

.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--background);
  padding: 1rem 1.5rem 3rem;
}

.hero-inner {
  width: min(100%, 460px);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2.5rem auto 0;
  gap: 2rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 420px;
  width: 100%;
  padding: 0 1.5rem;
  margin: 0;
}

.hero-content .names {
  font-size: clamp(1.8rem, 8vw, 4rem);
  margin: 0.75rem 0 0.5rem;
  white-space: normal;
}

.hero-content .date {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-content .tagline {
  font-size: 1rem;
  margin: 0;
}

.hero-photo-band {
  width: 100%;
  background: var(--background);
  background-position: center;
  display: flex;
  justify-content: center;
  padding: 1.5rem 0 2.5rem;
  margin: 0;
}

.hero-photo-frame {
  width: min(60vw, 360px);
  aspect-ratio: 1 / 1;
  background: #7b2f3b;
  border: 10px solid #7b2f3b;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
}

.hero-photo {
  width: 100%;
  height: auto;
  max-height: min(70vh, 520px);
  object-fit: contain;
  object-position: center top;
  border-radius: 8px;
}

.illustration {
    position: absolute;
    pointer-events: none;
    opacity: 0.85;
    transition: transform 0.3s ease-out;
}

.illustration:hover {
    transform: scale(1.05) rotate(6deg);
    will-change: transform;
}

/* Section hover effects for illustrations */
.hero:hover .illustration,
.rsvp:hover .illustration,
.details:hover .illustration,
.footer:hover .illustration {
    transform: translateX(8px) rotate(3deg);
}

.illustration img {
    display: block;
    width: 100%;
    height: auto;
}

.hero-illustration--rings {
    width: clamp(70px, 14vw, 140px);
    top: 0;
    right: 12%;
    transform: rotate(-8deg);
}

.hero-illustration--heart {
    width: clamp(60px, 14vw, 120px);
    bottom: 6%;
    left: 10%;
    transform: rotate(7deg);
}

.hero-illustration--champagne {
    width: clamp(160px, 32vw, 360px);
    right: 0%;
    top: 80%;
    transform: translateY(-50%) rotate(8deg);
}

.hero-illustration--champagne img {
    filter: brightness(0);
}

.section-header {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 2rem;
}

.section-header h2 {
    margin-bottom: 0.5rem;
    font-size: clamp(2.2rem, 4vw, 3rem);
}

.section-header p {
    color: var(--muted);
    max-width: 520px;
    margin: 0.5rem auto 0;
}

.rsvp {
    margin-top: -6rem;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.rsvp-date {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.9rem;
    color: var(--muted);
    margin: 1rem 0 0.5rem;
    text-align: center;
    font-weight: 600;
}

.event-cards {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    margin: 3rem 0;
    align-items: stretch;
}

.event-card {
    padding-left: 0;
    max-width: 560px;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.event-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.85;
    margin-top: 0.5rem;
    transform-origin: center 70%;
    transition: transform 0.25s ease-out;
}

.event-card:hover .event-icon,
.event-card:focus-within .event-icon {
    animation: icon-hover-wobble 0.6s ease-in-out;
}

.event-content {
    flex: 1;
}

.event-card h3 {
    margin: 0.5rem 0;
    font-size: 1.25rem;
}

.event-time {
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.event-card p {
    margin: 0;
}

.event-card p + p {
    margin-top: 0.35rem;
}

.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    padding-top: 1.5rem;
    max-width: 560px;
    width: 100%;
}

.rsvp-form button {
    align-self: center;
    margin-top: 0.5rem;
}

.rsvp-illustration {
    position: absolute;
    width: clamp(70px, 11vw, 120px);
}

.rsvp-illustration--glass {
    top: 22%;
    left: -3%;
    transform: rotate(-5deg);
}

.rsvp-illustration--coup {
    bottom: 4%;
    right: -4%;
    transform: rotate(9deg);
}

.details,
.countdown {
    position: relative;
}

.details-illustration {
    position: absolute;
    width: clamp(80px, 11vw, 130px);
}

.details-illustration--knife {
    top: 4%;
    right: 5%;
    transform: rotate(-6deg);
}

.details-illustration--cake {
    bottom: -20%;
    left: -20%;
    transform: rotate(5deg);
}

.countdown-illustration {
    position: absolute;
    width: clamp(80px, 12vw, 140px);
    left: 50%;
    transform: translateX(-50%) rotate(-4deg);
    top: -36px;
}

.countdown-illustration--champagne {
    width: clamp(120px, 15vw, 180px);
    left: -5%;
    top: 50%;
    transform: translateY(-50%) rotate(-8deg);
}

.rsvp-feedback,
.rsvp-confirmation {
    margin-top: 2rem;
    text-align: center;
    color: var(--accent);
    font-size: 1.2rem;
}

.rsvp-feedback--error {
    color: var(--text);
}

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

label {
    font-weight: 700;
    margin-bottom: 0.35rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.7rem;
}

input,
textarea,
select {
    padding: 0.4rem 0 0.6rem;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(47, 44, 41, 0.35);
    font-family: inherit;
    background: transparent;
    font-size: 1rem;
}

textarea {
    resize: vertical;
    min-height: 140px;
}

#guest-address {
    min-height: 0;
    height: 2.6rem;
}

#dietary-requirements {
    min-height: 0;
    height: 4.5rem;
}

#notes {
    min-height: 0;
    height: 4.5rem;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-bottom-color: var(--text);
}

button {
    cursor: pointer;
    font-size: 1rem;
    border-radius: 0;
    border: 1px solid rgba(47, 44, 41, 0.7);
    padding: 0.75rem 2.25rem;
    background: transparent;
    color: var(--text);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

button:hover,
button:focus {
    background: var(--text);
    color: var(--background);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem 3rem;
}

.detail-grid article {
    padding-left: 1.5rem;
    border-left: 1px solid rgba(47, 44, 41, 0.2);
    max-width: 320px;
}

.detail-grid h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.detail-grid ul {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
}

.detail-grid li {
    margin-bottom: 0.5rem;
}

.gallery-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.gallery-grid img {
    border-radius: 8px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.countdown {
    margin: 6rem 0 0;
    text-align: center;
    padding: 3rem 1rem 4.5rem;
    background: #7b2f3b;
    color: var(--background);
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
}

.countdown h2 {
    display: none;
}

.timer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.time-block {
    padding: 0;
    text-align: center;
}

.number {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
}

.countdown .label {
    display: block;
    margin-top: 0.5rem;
    letter-spacing: 0.15em;
    color: rgba(253, 251, 246, 0.8);
    text-transform: uppercase;
    font-size: 0.75rem;
}

.footer {
  position: relative;
  text-align: center;
  padding: 3rem 1.5rem 4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer p {
  margin: 0;
}

.footer-illustration {
  position: absolute;
  left: max(5%, 40px);
  bottom: 1.5rem;
  transform: rotate(-6deg);
  width: clamp(70px, 12vw, 120px);
  opacity: 0.85;
}

.footer-illustration img {
  display: block;
  width: 100%;
  height: auto;
}

.rings-divider {
    width: clamp(80px, 12vw, 140px);
    margin: 2rem auto 4rem;
    display: block;
    transform: rotate(-4deg);
}

.bow-divider {
    width: 100%;
    max-width: 500px;
    margin: -3rem auto -3rem;
    display: block;
}

.bow-divider img {
    width: 100%;
    height: auto;
    display: block;
    background: transparent;
}

.password-overlay {
    position: fixed;
    inset: 0;
    background: rgba(253, 251, 246, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 2rem;
}

.password-card {
    background: transparent;
    padding: 2.5rem;
    max-width: 420px;
    text-align: center;
}

.password-card form {
    margin-top: 1.5rem;
    display: grid;
    gap: 1rem;
}

.password-card input {
    text-align: center;
    font-size: 1.05rem;
}

.error {
    color: #c95c4d;
    min-height: 1.2rem;
}

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.verification-question {
    background: rgba(211, 169, 140, 0.08);
    padding: 1.25rem 1.5rem 1.5rem;
    border-radius: 2px;
    border: 1px solid rgba(211, 169, 140, 0.25);
}

.heart-checkbox-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.heart-checkbox-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.heart-checkbox-label {
    cursor: pointer;
    font-size: 2.5rem;
    line-height: 1;
    user-select: none;
    transition: transform 0.2s ease;
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.heart-checkbox-label:hover {
    transform: scale(1.1);
}

.heart-icon,
.heart-icon-filled {
    position: absolute;
    transition: opacity 0.2s ease;
}

.heart-icon {
    color: #d3a98c;
    opacity: 1;
}

.heart-icon-filled {
    color: #c76969;
    opacity: 0;
}

.heart-checkbox-input:checked ~ .heart-checkbox-label .heart-icon {
    opacity: 0;
}

.heart-checkbox-input:checked ~ .heart-checkbox-label .heart-icon-filled {
    opacity: 1;
}

.heart-text {
    cursor: pointer;
    font-size: 1rem;
    color: var(--text);
    user-select: none;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0.5rem 0 0;
    font-style: italic;
}

@media (min-width: 768px) {
  .hero-content .names {
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  main {
    padding: 0 1rem 4rem;
  }

  main > section {
    margin: 3.5rem 0;
  }

  .hero {
    min-height: unset;
    padding: 2.75rem 1rem 4rem;
  }

  .hero-inner {
    width: min(100%, 360px);
    margin: 2rem auto 0;
    gap: 1.5rem;
  }

  .hero-content {
    padding: 0;
  }

  .hero-content .names {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }

  .hero-photo-band {
    background: var(--background);
    background-position: center;
    padding: 1.1rem 0 1.85rem;
    margin: 0;
  }

  .hero-photo-frame {
    width: min(78vw, 320px);
    padding: 0.75rem;
  }

  .hero-illustration--champagne {
    width: clamp(120px, 45vw, 200px);
    left: 50%;
    right: auto;
    top: 100%;
    transform: translate(calc(-50% + 10px), -50%) rotate(4deg);
  }

  .hero-illustration--rings {
    width: clamp(60px, 22vw, 120px);
    top: 4%;
    right: 6%;
  }

  .hero-illustration--heart {
    width: clamp(50px, 18vw, 100px);
    bottom: auto;
    top: calc(28% + 38px);
    left: 8%;
    transform: rotate(7deg);
  }

  .rsvp {
    margin-top: 3rem;
    padding: 0 0 3rem;
  }

  .rsvp-illustration {
    display: none;
  }

  .event-cards {
    gap: 1.5rem;
  }

  .event-card {
    gap: 0.75rem;
  }

  .event-icon {
    width: 34px;
    height: 34px;
    margin-top: 0.35rem;
  }

  .rsvp-form {
    gap: 1.35rem;
  }

  .rsvp-form button {
    width: 100%;
  }

  label {
    font-size: 0.75rem;
  }

  #guest-address,
  #dietary-requirements,
  #notes {
    height: auto;
    min-height: 3.75rem;
  }

  .countdown {
    margin: 1rem auto 1rem;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 2rem 1rem 2rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .timer {
    gap: 1.1rem;
    margin-top: 2rem;
  }

  .footer {
    padding: 3rem 1rem 5rem;
  }

  .footer-illustration {
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) rotate(-4deg);
    width: 80px;
  }

  .password-overlay {
    padding: 1.5rem;
  }

  .password-card {
    padding: 2rem 1.5rem;
    width: 100%;
  }

  .rings-divider {
    display: none;
  }

  /* Mobile improvements */
  .bow-divider {
    display: none;
  }

  .rsvp-date {
    border-bottom: 2px dashed #7B2F3B;
  }
}
