:root {
  --paper: #fffaf4;
  --paper-strong: #f5ecde;
  --ink: #2c2723;
  --muted: #746c63;
  --line: #ded0c2;
  --wine: #592536;
  --wine-dark: #3d1725;
  --rose: #bd7478;
  --sage: #687b60;
  --copper: #a9613e;
  --white: #ffffff;
  --shadow: 0 20px 55px rgba(44, 39, 35, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

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

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  color: var(--white);
  background: linear-gradient(rgba(44, 39, 35, 0.58), rgba(44, 39, 35, 0));
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  color: var(--white);
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
}

.nav {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(44, 39, 35, 0.22);
  backdrop-filter: blur(14px);
}

.nav a {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--white);
  text-decoration: none;
  font-size: 0.94rem;
}

.nav a:hover,
.nav a:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.hero {
  position: relative;
  min-height: 86svh;
  overflow: hidden;
  color: var(--white);
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  object-fit: cover;
}

.hero__shade {
  background:
    linear-gradient(90deg, rgba(33, 24, 20, 0.78), rgba(33, 24, 20, 0.44) 46%, rgba(33, 24, 20, 0.12)),
    linear-gradient(0deg, rgba(33, 24, 20, 0.42), rgba(33, 24, 20, 0.08) 52%);
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 86svh;
  flex-direction: column;
  justify-content: center;
  padding: 92px 0 100px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--copper);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f7c9a6;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  max-width: 740px;
  font-size: 2.75rem;
}

h2 {
  font-size: 2.2rem;
}

h3 {
  margin: 0;
  font-size: 1.1rem;
}

.hero__lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.1rem;
}

.hero__actions,
.form-grid,
.table-toolbar,
.admin-actions,
.admin-heading {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.hero__actions {
  margin-top: 32px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 11px 16px;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button--primary {
  background: var(--wine);
  color: var(--white);
}

.button--primary:hover,
.button--primary:focus-visible {
  background: var(--wine-dark);
}

.button--secondary {
  border-color: rgba(255, 255, 255, 0.62);
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.button--line {
  border-color: var(--wine);
  color: var(--wine);
  background: transparent;
}

.button--small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.88rem;
}

.hero__note {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 3;
  display: flex;
  width: min(1120px, calc(100% - 32px));
  transform: translateX(-50%);
  gap: 10px;
  flex-wrap: wrap;
}

.hero__note span {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  padding: 8px 10px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(33, 24, 20, 0.32);
  backdrop-filter: blur(12px);
  font-size: 0.9rem;
}

.section {
  padding: 86px 0;
}

.section--intro {
  padding-top: 64px;
}

.section--soft,
.section--rsvp,
.admin-section {
  background: var(--paper-strong);
}

.admin-section {
  min-height: 100vh;
  scroll-margin-top: 78px;
}

.intro {
  max-width: 820px;
}

.intro p,
.story__copy p,
.copy-block p,
.section-heading p,
.final-copy p {
  color: var(--muted);
  font-size: 1.08rem;
}

.story-section {
  padding-top: 34px;
}

.story {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(340px, 0.9fr);
  gap: 34px;
  align-items: center;
}

.story__copy {
  max-width: 520px;
}

.story__gallery {
  max-width: 520px;
  justify-self: end;
}

.story-photo {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--paper-strong);
}

.story-photo img {
  width: 100%;
  aspect-ratio: 4 / 5.35;
  object-fit: cover;
}

.details-layout,
.rsvp-layout,
.admin-grid,
.split-text {
  display: grid;
  gap: 36px;
}

.info-pairs {
  display: grid;
  gap: 44px;
}

.info-pair {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: start;
}

.details-layout {
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
}

.details-list {
  display: grid;
  gap: 12px;
  margin: 30px 0;
}

.details-list div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.details-list dt {
  color: var(--sage);
  font-weight: 700;
}

.details-list dd {
  margin: 0;
  color: var(--ink);
}

.feature-image {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.feature-image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 32px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li,
.metric,
.admin-form,
.guest-panel,
.rsvp-form,
details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.timeline li {
  min-height: 130px;
  padding: 18px;
}

.timeline time {
  display: block;
  margin-bottom: 14px;
  color: var(--wine);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
}

.timeline span {
  color: var(--muted);
}

.split-text {
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
}

.copy-block {
  max-width: 640px;
}

.rsvp-layout {
  grid-template-columns: minmax(260px, 0.72fr) minmax(320px, 1fr);
  align-items: start;
}

.rsvp-form,
.admin-form {
  display: grid;
  gap: 16px;
  padding: 24px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--wine);
  outline: 3px solid rgba(89, 37, 54, 0.16);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.segmented label {
  display: block;
}

.segmented input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
}

.segmented input:checked + span {
  border-color: var(--wine);
  color: var(--white);
  background: var(--wine);
}

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

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--sage);
  font-weight: 700;
}

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

details {
  padding: 18px;
}

summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
}

details p {
  margin: 12px 0 0;
  color: var(--muted);
}

.final-section {
  background:
    linear-gradient(rgba(61, 23, 37, 0.82), rgba(61, 23, 37, 0.82)),
    url("assets/anniversary-still-life.png") center / cover;
  color: var(--white);
}

.final-section .section-kicker {
  color: #f7c9a6;
}

.final-copy {
  max-width: 760px;
}

.final-copy p {
  color: rgba(255, 255, 255, 0.84);
}

.signature {
  margin-top: 30px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}

.admin-heading {
  justify-content: space-between;
  margin-bottom: 28px;
}

.admin-actions {
  justify-content: flex-end;
}

.admin-login {
  display: grid;
  max-width: 420px;
  gap: 16px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.72);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}

.metric {
  min-height: 100px;
  padding: 16px;
}

.metric span {
  display: block;
  color: var(--wine);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1;
}

.metric p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-grid {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 18px;
}

.admin-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.admin-form h3,
.admin-form .form-grid,
.admin-form .link-output {
  grid-column: 1 / -1;
}

.admin-form .button {
  justify-self: start;
}

.link-output {
  display: none;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  color: var(--wine);
  background: var(--white);
  font-size: 0.9rem;
}

.link-output.is-visible {
  display: block;
}

.guest-panel {
  min-width: 0;
  padding: 18px;
}

.table-toolbar {
  justify-content: space-between;
  margin-bottom: 14px;
}

.table-toolbar label {
  min-width: 180px;
}

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

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

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

th {
  color: var(--sage);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  min-width: 96px;
  justify-content: center;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.84rem;
}

.status--yes,
.status--accepted {
  color: #244325;
  background: #dfeada;
}

.status--no,
.status--declined {
  color: #6b1e1e;
  background: #f1dcdc;
}

.status--pending {
  color: #604214;
  background: #f3e5c5;
}

.empty-state {
  display: none;
  margin: 16px 0 0;
  color: var(--muted);
}

.empty-state.is-visible {
  display: block;
}

@media (min-width: 760px) {
  h1 {
    font-size: 4.5rem;
  }

  h2 {
    font-size: 2.85rem;
  }
}

@media (min-width: 1120px) {
  h1 {
    font-size: 5.35rem;
  }
}

@media (max-width: 960px) {
  .details-layout,
  .rsvp-layout,
  .split-text,
  .story,
  .info-pair,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .story__copy {
    max-width: 720px;
  }

  .story__gallery {
    max-width: 560px;
    justify-self: start;
  }

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

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

@media (max-width: 720px) {
  body {
    font-size: 17px;
    line-height: 1.6;
  }

  .site-header {
    padding: 10px 12px;
  }

  .brand {
    width: 40px;
    height: 40px;
  }

  .nav {
    gap: 2px;
  }

  .nav a {
    min-height: 40px;
    padding: 9px 10px;
    font-size: 0.95rem;
  }

  .hero,
  .hero__content {
    min-height: 84svh;
  }

  .hero__shade {
    background:
      linear-gradient(0deg, rgba(33, 24, 20, 0.72), rgba(33, 24, 20, 0.16)),
      linear-gradient(90deg, rgba(33, 24, 20, 0.74), rgba(33, 24, 20, 0.28));
  }

  .hero__content {
    padding-top: 88px;
    padding-bottom: 128px;
  }

  .hero__lead {
    font-size: 1.08rem;
  }

  .hero__actions {
    align-items: stretch;
    flex-direction: column;
    width: min(100%, 360px);
  }

  .hero__note {
    bottom: 14px;
  }

  .hero__note span {
    font-size: 0.95rem;
  }

  .section {
    padding: 64px 0;
  }

  .section-kicker {
    font-size: 0.92rem;
  }

  .intro p,
  .story__copy p,
  .copy-block p,
  .section-heading p,
  .final-copy p {
    font-size: 1.08rem;
  }

  label,
  legend {
    font-size: 1rem;
  }

  input,
  textarea,
  select {
    min-height: 48px;
    padding: 13px 14px;
    font-size: 1rem;
  }

  textarea {
    line-height: 1.5;
  }

  .button {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 1rem;
  }

  .button--small {
    min-height: 42px;
    font-size: 0.95rem;
  }

  .segmented span {
    min-height: 48px;
    font-size: 1rem;
  }

  .timeline span,
  details p,
  .details-list dd,
  .copy-block p {
    font-size: 1.04rem;
  }

  summary {
    font-size: 1.05rem;
  }

  .metric p,
  .link-output,
  table,
  .empty-state {
    font-size: 1rem;
  }

  th {
    font-size: 0.9rem;
  }

  .status {
    min-width: 108px;
    font-size: 0.95rem;
  }

  .details-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .timeline,
  .faq-grid,
  .metrics,
  .admin-form,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .story-photo img {
    aspect-ratio: 4 / 4.9;
  }

  .timeline li {
    min-height: auto;
  }

  .admin-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .page-shell {
    width: min(100% - 24px, 1120px);
  }

  h1 {
    font-size: 2.45rem;
  }

  h2 {
    font-size: 2.05rem;
  }

  .nav a {
    padding: 8px;
    font-size: 0.9rem;
  }

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