:root {
  --ink: #34281f;
  --ink-soft: #6f5c4b;
  --paper: #f8f3eb;
  --paper-deep: #eee2d1;
  --ivory: #fffaf2;
  --moss: #5f6d4f;
  --olive: #80835b;
  --rose: #a85f58;
  --copper: #ad7448;
  --line: rgba(52, 40, 31, 0.18);
  --shadow: 0 24px 80px rgba(52, 40, 31, 0.16);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Avenir, "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 8%, rgba(168, 95, 88, 0.16), transparent 28rem),
    radial-gradient(circle at 86% 16%, rgba(95, 109, 79, 0.18), transparent 26rem),
    linear-gradient(135deg, var(--paper), #fdf8ef 44%, var(--paper-deep));
  font-family: var(--sans);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(90deg, rgba(52, 40, 31, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(52, 40, 31, 0.04) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

a {
  color: inherit;
}

main {
  position: relative;
  z-index: 1;
}

.hero-shell {
  min-height: 100vh;
  padding: clamp(22px, 4vw, 56px);
  display: grid;
  align-items: center;
  gap: 18px;
}

.hero-card {
  width: min(1180px, 100%);
  min-height: min(720px, calc(100vh - 150px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(330px, 0.78fr);
  gap: clamp(20px, 4vw, 54px);
  align-items: stretch;
  padding: clamp(22px, 4.4vw, 64px);
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 250, 242, 0.94), rgba(255, 250, 242, 0.78)),
    linear-gradient(135deg, rgba(173, 116, 72, 0.12), rgba(95, 109, 79, 0.12));
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(52, 40, 31, 0.13);
  pointer-events: none;
}

.hero-card::before {
  inset: 16px;
}

.hero-card::after {
  width: 220px;
  height: 220px;
  right: -70px;
  top: -70px;
  transform: rotate(18deg);
  background: rgba(128, 131, 91, 0.09);
}

.hero-copy {
  align-self: center;
  max-width: 680px;
  position: relative;
  z-index: 1;
}

.kicker {
  margin: 0 0 18px;
  color: var(--rose);
  font: 700 0.76rem/1 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(4rem, 9vw, 8.6rem);
  line-height: 0.83;
}

h1 span {
  display: block;
}

h1 em {
  display: block;
  margin: 0.08em 0 0.06em 0.22em;
  color: var(--copper);
  font-size: 0.34em;
  font-style: italic;
}

.date-line {
  margin: 34px 0 0;
  font: 700 clamp(1.35rem, 2.2vw, 2.2rem)/1.1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.place-line,
.promise-line {
  max-width: 540px;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.8vw, 1.24rem);
  line-height: 1.55;
}

.place-line {
  margin: 14px 0 0;
}

.promise-line {
  margin: 6px 0 0;
}

.hero-actions,
.form-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  padding: 0 20px;
  text-decoration: none;
  font: 700 0.86rem/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.copy-link:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--ink);
  color: var(--ivory);
}

.button.secondary {
  background: rgba(255, 250, 242, 0.64);
}

.button.danger {
  border-color: rgba(168, 95, 88, 0.6);
  color: #7e3f39;
}

.venue-frame {
  margin: 0;
  min-height: 420px;
  align-self: stretch;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(52, 40, 31, 0.18);
  padding: 12px;
  background: rgba(255, 250, 242, 0.68);
  overflow: hidden;
}

.venue-frame img {
  width: 100%;
  height: 100%;
  min-height: 390px;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.86) contrast(0.96);
}

.slideshow {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 390px;
  overflow: hidden;
  background: rgba(52, 40, 31, 0.08);
}

.slideshow-image {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 1200ms ease, transform 6200ms ease;
}

.slideshow-image.is-active {
  opacity: 1;
  transform: scale(1);
}

.slide-1812 {
  object-position: 72% center;
}

.slide-0203 {
  object-position: 56% 60%;
}

.slide-5108 {
  object-position: 93% 54%;
}

.venue-frame figcaption {
  position: absolute;
  left: 22px;
  bottom: 22px;
  padding: 8px 10px;
  background: rgba(255, 250, 242, 0.82);
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.landing-note {
  margin-top: 22px;
  max-width: 520px;
  border: 1px solid rgba(95, 109, 79, 0.32);
  background: rgba(95, 109, 79, 0.1);
  padding: 13px 15px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.keepsake-strip {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: clamp(16px, 5vw, 68px);
  padding: 10px 0 0;
  color: var(--ink-soft);
  font: 700 0.78rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.address-section {
  width: min(1120px, calc(100% - 34px));
  margin: 0 auto 80px;
  display: grid;
  grid-template-columns: minmax(250px, 0.62fr) minmax(0, 1fr);
  gap: clamp(22px, 5vw, 68px);
  padding: clamp(24px, 4vw, 48px);
  background: rgba(255, 250, 242, 0.82);
  border: 1px solid var(--line);
  box-shadow: 0 16px 52px rgba(52, 40, 31, 0.1);
}

.confirm-shell {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: clamp(18px, 4vw, 52px) 0;
}

.confirm-card {
  margin-bottom: 0;
}

.section-heading {
  align-self: start;
  position: sticky;
  top: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 4.3rem);
  line-height: 0.96;
}

.section-heading p:not(.kicker) {
  color: var(--ink-soft);
  font-size: 1.04rem;
  line-height: 1.6;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--rose);
  font-weight: 700;
  text-underline-offset: 4px;
}

.address-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.field {
  grid-column: span 3;
}

.field.compact {
  grid-column: span 2;
}

.field.wide,
.form-message,
.form-footer {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font: 700 0.78rem/1.2 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(52, 40, 31, 0.22);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  padding: 13px 12px;
  font: 1rem/1.35 var(--sans);
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(168, 95, 88, 0.35);
  outline-offset: 1px;
  background: white;
}

.form-message {
  border: 1px solid;
  padding: 14px 16px;
  font-size: 0.96rem;
  line-height: 1.45;
}

.form-message.error {
  border-color: rgba(168, 95, 88, 0.36);
  background: rgba(168, 95, 88, 0.1);
}

.form-message.success {
  border-color: rgba(95, 109, 79, 0.34);
  background: rgba(95, 109, 79, 0.11);
}

.form-footer {
  justify-content: space-between;
}

.form-footer p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.4;
}

.copy-link {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.7);
  color: var(--ink);
  padding: 8px 10px;
  max-width: min(520px, 82vw);
  overflow-wrap: anywhere;
  cursor: pointer;
  font: 700 0.82rem/1.25 var(--sans);
}

.copy-link.small {
  min-width: 92px;
  white-space: nowrap;
}

.admin-body {
  background: #f5efe6;
}

.admin-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 18px;
  padding: 12px clamp(18px, 4vw, 40px);
  background: rgba(52, 40, 31, 0.96);
  color: var(--ivory);
  font: 700 0.78rem/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-nav a {
  text-decoration: none;
}

.admin-wrap {
  width: min(1220px, calc(100% - 32px));
  margin: 34px auto 70px;
}

.admin-hero,
.admin-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 24px;
}

.admin-hero h1,
.admin-detail h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 5.3rem);
  line-height: 0.94;
}

.admin-hero p,
.admin-detail p {
  color: var(--ink-soft);
  line-height: 1.55;
}

.quick-create,
.admin-detail aside,
.table-panel,
.stats-grid > div,
.link-box,
.message-box,
.reset-box {
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.78);
}

.quick-create {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.stats-grid > div {
  padding: 18px;
}

.stats-grid strong {
  display: block;
  font: 400 2.6rem/1 var(--serif);
}

.stats-grid span {
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.table-panel {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink-soft);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

td small {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
}

.status {
  display: inline-flex;
  border: 1px solid var(--line);
  padding: 5px 8px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status.confirmed {
  background: rgba(95, 109, 79, 0.14);
}

.status.viewed {
  background: rgba(173, 116, 72, 0.14);
}

.admin-detail aside {
  padding: 22px;
}

.admin-detail h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 400;
}

.link-box {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  margin: 18px 0;
}

.reset-box {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  padding: 12px;
}

.reset-box p {
  margin: 0;
  font-size: 0.86rem;
}

code {
  overflow-wrap: anywhere;
}

.message-box {
  padding: 14px;
  text-transform: none;
  letter-spacing: 0;
}

.detail-list {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
  gap: 10px 16px;
  margin: 0;
}

.detail-list dt {
  color: var(--ink-soft);
  font-weight: 700;
}

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 880px) {
  .hero-card,
  .address-section,
  .admin-hero,
  .admin-detail {
    grid-template-columns: 1fr;
  }

  .hero-card {
    min-height: auto;
  }

  .venue-frame,
  .venue-frame img,
  .slideshow {
    min-height: 290px;
  }

  .slide-0203 {
    object-position: 55% 62%;
  }

  .slide-5108 {
    object-position: 78% 52%;
  }

  .section-heading {
    position: static;
  }

  .keepsake-strip {
    align-items: center;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .hero-shell {
    padding: 14px;
  }

  .hero-card {
    padding: 24px 18px;
  }

  .hero-card::before {
    inset: 9px;
  }

  h1 {
    font-size: clamp(3.5rem, 18vw, 5rem);
  }

  .address-section {
    width: calc(100% - 20px);
    padding: 20px 14px;
  }

  .field,
  .field.compact {
    grid-column: 1 / -1;
  }

  .button,
  .form-footer .button,
  .hero-actions .button {
    width: 100%;
  }

  .reset-box {
    align-items: stretch;
    flex-direction: column;
  }

  .form-footer {
    align-items: stretch;
  }

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

  .admin-nav {
    overflow-x: auto;
  }
}
