:root {
  --cream: #f7f0e1;
  --cream-soft: #fbf6ea;
  --ink: #1f1a14;
  --ink-soft: #4a3f30;
  --terracotta: #c2532a;
  --terracotta-deep: #973d1d;
  --olive: #5c6b3a;
  --lemon: #e8b73a;
  --line: #d9c9a3;
  --shadow: 0 1px 3px rgba(31, 26, 20, 0.08), 0 8px 24px rgba(31, 26, 20, 0.06);

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--terracotta-deep); }
a:hover { color: var(--terracotta); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 0.4em;
  color: var(--ink);
}

h2 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 0.6em;
}

p { margin: 0 0 1em; }

em { font-style: italic; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.4rem;
}
.wrap--narrow {
  max-width: 600px;
}

.section {
  padding: 4.5rem 0;
  position: relative;
}
.section + .section {
  border-top: 1px dashed var(--line);
}

.lede {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  font-style: italic;
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 2rem;
}

/* ===== HERO ===== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.4rem 4rem;
  color: #fdf6e6;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(20, 12, 5, 0.55) 0%, rgba(20, 12, 5, 0.35) 40%, rgba(20, 12, 5, 0.78) 100%),
    url("/photos/01-rooftop-sunset.webp");
  background-size: cover;
  background-position: center 60%;
  background-repeat: no-repeat;
  z-index: -1;
  filter: saturate(1.05);
}

.hero__content {
  max-width: 720px;
}

.hero__kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  opacity: 0.85;
}

.hero__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(4.5rem, 18vw, 9rem);
  line-height: 0.9;
  margin: 0 0 0.3em;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}

.hero__sub {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-style: italic;
  margin: 0 0 2.2rem;
  opacity: 0.95;
}
.hero__sub .age {
  color: var(--lemon);
  font-weight: 600;
  font-style: normal;
}

.hero__facts {
  display: grid;
  gap: 0.6rem;
  margin: 0 auto 2.4rem;
  max-width: 520px;
  font-size: 0.98rem;
}
.hero__facts > div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  align-items: baseline;
  text-align: left;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(253, 246, 230, 0.18);
}
.hero__facts dt {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  opacity: 0.7;
}
.hero__facts dd {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
}

/* ===== BUTTONS ===== */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2.4rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  color: inherit;
}

.btn--primary {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fdf6e6;
}
.btn--primary:hover {
  background: var(--terracotta-deep);
  border-color: var(--terracotta-deep);
  color: #fdf6e6;
}
.btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== DETAILS ===== */

.section--details {
  background: var(--cream-soft);
}

.howto {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  display: grid;
  gap: 0.1rem;
  max-width: 640px;
}
.howto li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.2rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px dotted var(--line);
}
.howto__k {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--olive);
}
.howto__v {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-style: italic;
  color: var(--ink);
}

.deadline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--terracotta-deep);
  border-left: 3px solid var(--terracotta);
  padding-left: 1.1rem;
  margin-top: 1rem;
}

/* ===== MOSAIC ===== */

.section--mood {
  padding-bottom: 0;
}

.mosaic {
  column-count: 2;
  column-gap: 0.6rem;
  padding: 2.5rem 0.6rem 0;
}
.mosaic figure {
  margin: 0 0 0.6rem;
  break-inside: avoid;
  box-shadow: var(--shadow);
  background: var(--cream-soft);
  transition: transform 0.3s ease;
}
.mosaic figure:hover {
  transform: translateY(-2px);
}
.mosaic img {
  width: 100%;
  height: auto;
  display: block;
}

@media (min-width: 640px) {
  .mosaic { column-count: 3; column-gap: 0.8rem; padding: 3rem 1rem 0; }
  .mosaic figure { margin-bottom: 0.8rem; }
}
@media (min-width: 980px) {
  .mosaic { column-count: 4; column-gap: 1rem; padding: 3rem 1.4rem 0; }
  .mosaic figure { margin-bottom: 1rem; }
}

/* ===== FORM ===== */

.section--rsvp {
  background: var(--cream-soft);
}

.form {
  display: grid;
  gap: 1.4rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--olive);
  font-weight: 500;
}
.field .hint {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-style: italic;
  font-weight: 400;
  margin-left: 0.3rem;
}

.field input,
.field select,
.field textarea {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  padding: 0.9rem 1rem;
  background: #fffdf6;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(194, 83, 42, 0.12);
}
.field textarea {
  resize: vertical;
  font-style: normal;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2 4l4 5 4-5' stroke='%23973d1d' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.6rem;
}

.field--honey {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.form__status {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  margin: 0;
  min-height: 1.4em;
}
.form__status.is-error { color: var(--terracotta-deep); }
.form__status.is-success { color: var(--olive); }

.form button[type="submit"] {
  justify-self: start;
  margin-top: 0.4rem;
}

/* ===== GUESTS ===== */

.guests {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}
@media (min-width: 540px) {
  .guests { grid-template-columns: 1fr 1fr; gap: 0.8rem 2rem; }
}
@media (min-width: 880px) {
  .guests { grid-template-columns: repeat(3, 1fr); }
}

.guests li {
  font-family: var(--serif);
  font-size: 1.2rem;
  padding: 0.55rem 0;
  border-bottom: 1px dotted var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: baseline;
}
.guests .g-title {
  font-style: italic;
  color: var(--olive);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}
.guests .g-name {
  color: var(--ink);
  font-weight: 600;
}

.guests li.is-new {
  animation: fadeIn 0.6s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ===== FOOTER ===== */

.footer {
  padding: 3rem 0 4rem;
  text-align: center;
  background: var(--cream);
  border-top: 1px dashed var(--line);
}
.footer p {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink-soft);
  margin: 0;
}
.footer em {
  font-size: 1.5rem;
  color: var(--terracotta-deep);
}

/* ===== SELECTION ===== */
::selection {
  background: var(--lemon);
  color: var(--ink);
}
