:root {
  --paper: #f8f4ec;
  --paper-warm: #efe4d5;
  --ink: #4a4838;
  --muted: #77735f;
  --sage: #9aa487;
  --sage-dark: #647055;
  --clay: #b45f43;
  --clay-soft: #d9a48b;
  --tile-blue: #244978;
  --tile-blue-dark: #18345d;
  --tile-cream: #f2e6d6;
  --line: rgba(74, 72, 56, 0.22);
  --white: rgba(255, 252, 246, 0.86);
  --title: "IM Fell English", Georgia, serif;
  --body: "EB Garamond", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(154, 164, 135, 0.12), transparent 28rem),
    linear-gradient(180deg, var(--paper), #fffaf2 46%, var(--paper-warm));
  color: var(--ink);
  font-family: var(--body);
  font-size: 20px;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 5rem 1.25rem 8rem;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 12rem;
  background: linear-gradient(0deg, var(--paper), transparent);
  pointer-events: none;
}

.topbar {
  position: absolute;
  z-index: 3;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 760px);
  display: flex;
  justify-content: center;
  gap: clamp(0.8rem, 4vw, 2.5rem);
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  background: rgba(248, 244, 236, 0.78);
  backdrop-filter: blur(10px);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.topbar a {
  text-decoration: none;
}

.hero__art {
  display: none;
}

.hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
  filter: saturate(0.86) contrast(0.94);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(90vw, 820px);
  text-align: center;
  padding: 8rem 1rem 4rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--sage-dark);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: var(--title);
  font-weight: 400;
  line-height: 1;
  margin: 0;
}

h1 {
  color: #4f563e;
  font-size: clamp(4rem, 12vw, 9.2rem);
  font-style: italic;
}

h2 {
  color: #565c43;
  font-size: clamp(2.7rem, 7vw, 5rem);
}

.date-line,
.place-line {
  margin: 1.4rem 0 0;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

.place-line {
  color: var(--muted);
  margin-top: 0.25rem;
}

.photo-strip {
  width: min(1120px, 92vw);
  margin: -4.5rem auto 5rem;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.photo-strip figure,
.venue-art {
  margin: 0;
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body[data-frame-style="simple"] .photo-strip figure,
body[data-frame-style="simple"] .venue-art {
  padding: 0.45rem;
  border: 1px solid var(--tile-blue);
  background: rgba(255, 252, 246, 0.88);
}

body[data-frame-style="simple"] .photo-strip figure::after,
body[data-frame-style="simple"] .venue-art::after,
body[data-frame-style="none"] .photo-strip figure::before,
body[data-frame-style="none"] .photo-strip figure::after,
body[data-frame-style="none"] .venue-art::before,
body[data-frame-style="none"] .venue-art::after,
body[data-frame-style="simple"] .photo-strip figure::after,
body[data-frame-style="simple"] .venue-art::after {
  display: none;
}

body[data-frame-style="none"] .photo-strip figure,
body[data-frame-style="none"] .venue-art {
  padding: 0;
  border: 0;
  background: transparent;
}

.photo-strip figure::before,
.venue-art::before {
  content: none;
  position: absolute;
  inset: 0.36rem;
  border: 1px solid rgba(242, 230, 214, 0.8);
  pointer-events: none;
  z-index: 2;
}

.photo-strip figure::after,
.venue-art::after {
  content: none;
  position: absolute;
  left: 50%;
  bottom: -2.25rem;
  width: 5.4rem;
  height: 2.25rem;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 35%, rgba(242, 230, 214, 0.88) 0 0.42rem, transparent 0.45rem),
    repeating-linear-gradient(
      90deg,
      var(--tile-blue-dark) 0 0.55rem,
      var(--tile-blue) 0.55rem 1.1rem,
      var(--tile-cream) 1.1rem 1.22rem
    );
  clip-path: polygon(0 0, 100% 0, 100% 42%, 75% 42%, 75% 70%, 61% 70%, 61% 100%, 39% 100%, 39% 70%, 25% 70%, 25% 42%, 0 42%);
  z-index: 1;
}

.photo-strip figure {
  aspect-ratio: 4 / 3;
}

.photo-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 74%;
  border: 0;
}

.countdown-band {
  width: min(1120px, 92vw);
  margin: 0 auto 4rem;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.countdown-band h2 {
  font-size: clamp(2.3rem, 5vw, 4rem);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(5rem, 1fr));
  gap: 0.75rem;
  min-width: min(100%, 520px);
}

.countdown span {
  min-height: 6.3rem;
  display: grid;
  place-items: center;
  padding: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.58);
  color: var(--muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
}

.countdown strong {
  display: block;
  color: var(--clay);
  font-family: var(--title);
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: 0;
}

.section {
  padding: clamp(4.5rem, 9vw, 8rem) 1.25rem;
}

.section:nth-of-type(even) {
  background: rgba(239, 228, 213, 0.46);
}

.section__inner {
  width: min(1020px, 92vw);
  margin: 0 auto;
}

.narrow {
  width: min(780px, 92vw);
  text-align: center;
}

.section p {
  margin: 1.4rem 0 0;
  font-size: clamp(1.18rem, 2vw, 1.45rem);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.venue-art {
  aspect-ratio: 16 / 10;
}

.venue-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 47%;
  border: 0;
  filter: saturate(1.05);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  margin-top: 1.5rem;
  padding: 0.72rem 1.4rem;
  border: 1px solid var(--sage-dark);
  background: var(--sage-dark);
  color: #fffaf2;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.button:hover {
  background: #4f5a42;
}

.button--ghost {
  background: transparent;
  color: var(--sage-dark);
}

.button--ghost:hover {
  color: #fffaf2;
}

.rsvp-section,
.message-section {
  background:
    linear-gradient(rgba(248, 244, 236, 0.88), rgba(248, 244, 236, 0.9)),
    url("./assets/identidade-casamento.jpeg") center 35% / cover;
}

.form {
  margin-top: 2rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.82);
}

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

label,
legend {
  display: grid;
  gap: 0.45rem;
  color: var(--sage-dark);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(100, 112, 85, 0.42);
  border-radius: 0;
  background: rgba(255, 252, 246, 0.88);
  color: var(--ink);
  font: 1.2rem var(--body);
  padding: 0.8rem 0.9rem;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(180, 95, 67, 0.34);
  outline-offset: 2px;
}

fieldset {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.radio-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.1rem;
}

.radio-row input {
  width: auto;
}

.form > label,
.form-grid,
.form > fieldset {
  margin-bottom: 1rem;
}

.form-message {
  min-height: 1.8rem;
  color: var(--clay);
  font-weight: 600;
}

.message-wall {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.message-card {
  min-height: 11rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.78);
}

.message-card h3 {
  margin: 0 0 0.65rem;
  color: var(--clay);
  font-family: var(--title);
  font-size: 1.7rem;
  font-weight: 400;
}

.message-card p {
  margin: 0;
  font-size: 1.08rem;
}

.photo-strip--closing {
  margin-top: 5rem;
  margin-bottom: 5rem;
}

.footer {
  padding: 3rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.footer p {
  margin: 0;
}

@media (max-width: 860px) {
  body {
    font-size: 18px;
  }

  .topbar {
    width: calc(100% - 1.2rem);
    gap: 0.7rem;
    overflow-x: auto;
    justify-content: flex-start;
    white-space: nowrap;
  }

  .hero {
    min-height: 86vh;
  }

  .photo-strip,
  .message-wall {
    grid-template-columns: 1fr;
  }

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

  .countdown-band,
  .two-column {
    grid-template-columns: 1fr;
  }

  .countdown-band {
    display: grid;
    padding: 1.2rem 0;
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .hero__content {
    padding-top: 5rem;
  }

  .date-line,
  .place-line {
    font-size: 1.16rem;
  }

  .countdown {
    grid-template-columns: 1fr 1fr;
  }

  .countdown span {
    min-height: 5.6rem;
  }

  .countdown strong {
    font-size: 2rem;
  }

  fieldset {
    display: grid;
  }
}
