@font-face {
  font-family: 'Invitation Serif';
  src: url('/assets/fonts/cormorant-garamond-cover-normal-wght-400-500.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
}

@font-face {
  font-family: 'Invitation Text';
  src: url('/assets/fonts/golos-text-cover-400.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Invitation Text';
  src: url('/assets/fonts/golos-text-cover-800.woff2') format('woff2');
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

:root {
  --paper: #f7f0e5;
  --paper-deep: #eee0ce;
  --ink: #4b433b;
  --muted: #7e7064;
  --line: #d8c5ae;
  --terracotta: #a84f47;
  --terracotta-dark: #7d3733;
  --terracotta-soft: #ead0c7;
  --olive: #697153;
  --ochre: #a97a3d;
  --shadow: 0 26px 70px rgba(86, 58, 33, .13), 0 3px 10px rgba(86, 58, 33, .08);
  --serif: 'Invitation Serif', Georgia, serif;
  --sans: 'Invitation Text', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 300px;
  background: #e8ddcf;
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 9%, rgba(255, 253, 246, .85) 0 8%, transparent 28%),
    radial-gradient(circle at 88% 82%, rgba(173, 90, 75, .08), transparent 31%),
    #e8ddcf url('/assets/ribbon-paper.svg');
  background-size: auto, auto, 760px auto;
  font: 400 15px/1.6 var(--sans);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 8px 12px;
  color: #fff;
  background: var(--terracotta-dark);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
}

.access-page::before,
.access-page::after {
  content: '';
  position: fixed;
  z-index: -1;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(132, 87, 55, .12);
  border-radius: 50%;
}

.access-page::before {
  top: -110px;
  right: -70px;
  box-shadow: 0 0 0 22px rgba(132, 87, 55, .025), 0 0 0 48px rgba(132, 87, 55, .02);
}

.access-page::after {
  bottom: -130px;
  left: -100px;
  box-shadow: 0 0 0 28px rgba(168, 79, 71, .03);
}

.admin-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 58px 0 80px;
}

.page-masthead {
  position: relative;
  max-width: 780px;
  margin: 0 0 44px;
  padding-left: 22px;
  border-left: 2px solid var(--terracotta);
}

.page-masthead::after {
  content: '';
  position: absolute;
  left: -7px;
  bottom: -15px;
  width: 12px;
  height: 12px;
  border: 1px solid var(--terracotta);
  transform: rotate(45deg);
  background: #e8ddcf;
}

.eyebrow,
.section-kicker {
  margin: 0 0 7px;
  color: var(--terracotta);
  font: 800 10px/1.3 var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  margin-top: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.02;
}

.page-masthead h1 {
  max-width: 680px;
  margin-bottom: 13px;
  font-size: clamp(46px, 7vw, 82px);
  letter-spacing: -.035em;
}

.page-lede {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.paper-panel,
.guest-card,
.invitation-card {
  position: relative;
  border: 1px solid rgba(154, 122, 85, .28);
  background: var(--paper) url('/assets/ribbon-paper.svg');
  background-size: 660px auto;
  box-shadow: var(--shadow);
}

.paper-panel::after,
.invitation-card::after {
  content: '';
  position: absolute;
  pointer-events: none;
  inset: 7px;
  border: 1px solid rgba(154, 122, 85, .12);
}

.paper-panel {
  padding: clamp(28px, 5vw, 52px);
}

.panel-copy h2,
.section-heading h2,
.desk-summary h2 {
  margin-bottom: 10px;
  font-size: clamp(34px, 5vw, 52px);
}

.panel-copy > p:last-child {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(220px, .85fr) minmax(300px, 1.15fr);
  gap: 42px 60px;
  align-items: end;
  max-width: 920px;
}

.login-panel .status-message {
  grid-column: 1 / -1;
}

.stamp {
  position: absolute;
  top: 25px;
  right: 28px;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 2px solid rgba(168, 79, 71, .54);
  border-radius: 50%;
  color: rgba(168, 79, 71, .72);
  font: 800 8px/1.45 var(--sans);
  letter-spacing: .13em;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(8deg);
}

label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

input[type='text'],
input[type='password'] {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  background: rgba(255, 253, 247, .82);
  box-shadow: inset 0 1px 3px rgba(81, 57, 35, .06);
}

input::placeholder {
  color: #9b8e82;
}

.field-row,
.create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.button {
  position: relative;
  z-index: 1;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .025em;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: .55;
}

.button-primary {
  color: #fffaf2;
  background: var(--terracotta);
  border-color: var(--terracotta);
}

.button-primary:hover:not(:disabled) {
  background: var(--terracotta-dark);
  border-color: var(--terracotta-dark);
}

.button-quiet {
  color: var(--terracotta-dark);
  border-color: rgba(168, 79, 71, .35);
  background: rgba(255, 252, 245, .52);
}

.button-quiet:hover:not(:disabled) {
  border-color: var(--terracotta);
  background: rgba(234, 208, 199, .38);
}

.button-danger {
  color: #7d3733;
  border-color: rgba(125, 55, 51, .34);
  background: transparent;
}

.button-danger:hover:not(:disabled) {
  color: #fff;
  background: #873d38;
  border-color: #873d38;
}

.status-message {
  min-height: 1.6em;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.status-message[data-tone='error'],
.card-status[data-tone='error'] {
  color: #963d38;
}

.status-message[data-tone='success'],
.card-status[data-tone='success'] {
  color: #596443;
}

.desk-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(410px, 1.4fr) auto;
  gap: 25px 35px;
  align-items: end;
  margin-bottom: 26px;
}

.desk-summary h2 {
  margin-bottom: 0;
}

.summary-counts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-counts div {
  padding: 11px 14px 12px;
  border-right: 1px solid var(--line);
}

.summary-counts div:last-child {
  border-right: 0;
}

.summary-counts dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.summary-counts dd {
  margin: 2px 0 0;
  color: var(--terracotta-dark);
  font: 400 29px/1 var(--serif);
}

.create-panel {
  display: grid;
  grid-template-columns: minmax(230px, .75fr) minmax(410px, 1.25fr);
  gap: 35px 60px;
  margin-bottom: 58px;
}

.create-panel .status-message {
  grid-column: 2;
  margin-top: -22px;
}

.check-field {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  margin: 18px 0 0;
  cursor: pointer;
  letter-spacing: 0;
  text-transform: none;
}

.check-field input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--terracotta);
}

.check-field strong,
.check-field small {
  display: block;
}

.check-field strong {
  color: var(--ink);
  font-size: 13px;
}

.check-field small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
}

.list-status {
  margin: -9px 0 18px;
}

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

.invitation-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 27px;
}

.card-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  margin-bottom: 22px;
}

.card-label {
  margin: 0 0 8px;
  color: var(--ink);
  font: 500 clamp(26px, 4vw, 35px)/1 var(--serif);
}

.card-date {
  flex: 0 0 auto;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .05em;
  text-align: right;
  text-transform: uppercase;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.badge {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.badge-active {
  color: var(--olive);
  border-color: rgba(105, 113, 83, .4);
  background: rgba(105, 113, 83, .06);
}

.badge-preview {
  color: #875d27;
  border-color: rgba(169, 122, 61, .45);
  background: rgba(169, 122, 61, .08);
}

.badge-muted {
  color: #816f67;
  background: rgba(126, 112, 100, .07);
}

.card-facts {
  display: grid;
  grid-template-columns: .65fr 1.15fr 1.15fr;
  margin: auto 0 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.card-facts div {
  padding: 0 12px;
  border-right: 1px solid var(--line);
}

.card-facts div:first-child {
  padding-left: 0;
}

.card-facts div:last-child {
  padding-right: 0;
  border-right: 0;
}

.card-facts dt {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.card-facts dd {
  margin: 3px 0 0;
  font-size: 12px;
}

.link-fallback {
  position: relative;
  z-index: 1;
  margin: 0 0 13px;
  padding: 12px;
  border: 1px dashed var(--line);
  background: rgba(255, 253, 248, .58);
}

.link-fallback label {
  margin-bottom: 5px;
  font-size: 8px;
}

.link-fallback textarea {
  width: 100%;
  min-height: 94px;
  padding: 10px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  font: 400 12px/1.5 var(--sans);
  overflow-wrap: anywhere;
  word-break: break-all;
  resize: vertical;
}

.link-fallback p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.card-status {
  position: relative;
  z-index: 1;
  min-height: 1.5em;
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 11px;
}

.card-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-actions .button {
  flex: 1 1 auto;
  min-height: 39px;
  padding: 8px 11px;
  font-size: 10px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 60px 25px;
  border: 1px dashed rgba(154, 122, 85, .5);
  text-align: center;
}

.empty-state h3 {
  margin-bottom: 8px;
  font-size: 35px;
}

.empty-state p {
  max-width: 480px;
  margin: 0 auto;
  color: var(--muted);
}

.confirm-dialog {
  width: min(460px, calc(100% - 30px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  background: var(--paper) url('/assets/ribbon-paper.svg');
  box-shadow: var(--shadow);
}

.confirm-dialog::backdrop {
  background: rgba(57, 42, 32, .55);
  backdrop-filter: blur(3px);
}

.confirm-dialog form {
  padding: 32px;
}

.confirm-dialog h2 {
  margin-bottom: 15px;
  font-size: 36px;
}

.confirm-dialog p:not(.section-kicker) {
  color: var(--muted);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 25px;
}

.guest-page {
  display: grid;
  place-items: center;
  padding: 28px;
}

.guest-shell {
  width: min(100%, 990px);
}

.guest-card {
  min-height: min(720px, calc(100svh - 56px));
}

.public-card {
  display: grid;
  place-items: center;
  align-content: center;
  padding: clamp(45px, 9vw, 110px) clamp(26px, 11vw, 140px);
  text-align: center;
  overflow: hidden;
}

.public-card::before,
.public-card::after {
  content: '';
  position: absolute;
  width: 130px;
  height: 46px;
  border-top: 1px solid rgba(168, 79, 71, .36);
  border-bottom: 1px solid rgba(168, 79, 71, .2);
}

.public-card::before {
  top: 35px;
  left: -28px;
  transform: rotate(-34deg);
}

.public-card::after {
  right: -28px;
  bottom: 35px;
  transform: rotate(-34deg);
}

.ribbon-mark {
  position: relative;
  width: min(330px, 68vw);
  height: 54px;
  margin-bottom: 18px;
  border-top: 1px solid rgba(168, 79, 71, .34);
  border-bottom: 1px solid rgba(168, 79, 71, .2);
  opacity: .72;
}

.ribbon-mark::before,
.ribbon-mark::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 37%;
  border-top: 1px solid rgba(168, 79, 71, .48);
}

.ribbon-mark::before {
  left: 0;
}

.ribbon-mark::after {
  right: 0;
}

.ribbon-mark {
  background:
    linear-gradient(45deg, transparent 42%, rgba(168, 79, 71, .66) 43% 57%, transparent 58%) center / 25px 25px no-repeat;
}

.public-card h1 {
  max-width: 700px;
  margin-bottom: 22px;
  font-size: clamp(45px, 8vw, 78px);
  letter-spacing: -.025em;
}

.public-copy {
  max-width: 540px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
}

.seal {
  display: grid;
  place-items: center;
  width: 59px;
  height: 59px;
  margin: 32px auto 20px;
  border-radius: 45% 55% 48% 52%;
  color: #f5dfd0;
  background: var(--terracotta);
  box-shadow: inset 0 0 0 4px rgba(255, 230, 213, .16), 0 5px 12px rgba(92, 48, 39, .16);
  font: 400 26px/1 var(--serif);
  transform: rotate(-8deg);
}

.public-actions {
  min-height: 44px;
}

.noscript-note {
  position: fixed;
  right: 15px;
  bottom: 15px;
  left: 15px;
  margin: 0;
  padding: 12px;
  color: #fff;
  background: var(--terracotta-dark);
  text-align: center;
}

@media (max-width: 900px) {
  .desk-summary {
    grid-template-columns: 1fr auto;
  }

  .summary-counts {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .login-panel,
  .create-panel {
    grid-template-columns: 1fr;
  }

  .create-panel .status-message {
    grid-column: 1;
    margin-top: -20px;
  }

}

@media (max-width: 720px) {
  .admin-shell {
    width: min(100% - 26px, 620px);
    padding: 34px 0 54px;
  }

  .page-masthead {
    margin-bottom: 30px;
  }

  .page-masthead h1 {
    font-size: clamp(42px, 14vw, 64px);
  }

  .paper-panel {
    padding: 27px 21px;
  }

  .stamp {
    top: 17px;
    right: 18px;
    width: 66px;
    height: 66px;
    font-size: 6px;
  }

  .login-panel {
    gap: 27px;
  }

  .login-panel .panel-copy {
    padding-right: 60px;
  }

  .field-row,
  .create-row {
    grid-template-columns: 1fr;
  }

  .field-row .button,
  .create-row .button {
    width: 100%;
  }

  .desk-summary {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .summary-counts {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-counts div:nth-child(2) {
    border-right: 0;
  }

  .summary-counts div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .create-panel {
    gap: 25px;
    margin-bottom: 42px;
  }

  .invitation-list {
    grid-template-columns: 1fr;
  }

  .card-heading {
    display: block;
  }

  .card-date {
    margin-top: 12px;
    text-align: left;
  }

  .guest-page {
    display: block;
    padding: 12px;
  }

  .guest-card {
    min-height: calc(100svh - 24px);
  }

  .public-card {
    padding-inline: 24px;
  }

  .public-card h1 {
    font-size: clamp(42px, 14vw, 62px);
  }

  .guest-card.welcome-card {
    min-height: 0;
  }

}

@media (max-width: 420px) {
  .desk-summary {
    grid-template-columns: 1fr;
  }

  .desk-summary .button {
    justify-self: start;
  }

  .summary-counts {
    grid-column: 1;
    grid-row: auto;
  }

  .section-heading {
    align-items: center;
  }

  .section-heading .button {
    padding-inline: 11px;
  }

  .card-facts {
    grid-template-columns: 1fr;
  }

  .card-facts div,
  .card-facts div:first-child,
  .card-facts div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 7px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(216, 197, 174, .65);
  }

  .card-facts div:last-child {
    border-bottom: 0;
  }

  .card-facts dd {
    margin: 0;
    text-align: right;
  }

  .card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .dialog-actions {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

