:root {
  --ink: #211f1a;
  --ink-soft: #5e584d;
  --ivory: #f5efdf;
  --paper: #fffaf0;
  --paper-deep: #eee4d1;
  --gold-dark: #8d6525;
  --gold: #b98b3d;
  --gold-light: #e4c77e;
  --line: rgba(118, 91, 46, .27);
  --error: #8a302b;
  --serif: Baskerville, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 50% -20%, rgba(255,255,255,.72), transparent 42rem),
    linear-gradient(135deg, rgba(128,92,32,.025) 25%, transparent 25%) 0 0/7px 7px,
    var(--ivory);
  color: var(--ink);
  font: 16px/1.65 var(--serif);
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header,
footer {
  width: min(1160px, calc(100% - 40px));
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header {
  min-height: 92px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  color: inherit;
  text-decoration: none;
  font-size: .72rem;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.monogram {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: linear-gradient(140deg, var(--gold-dark), var(--gold-light) 48%, var(--gold-dark));
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  font-size: .83rem;
  letter-spacing: .04em;
}

.monogram i { font-weight: 400; }

main { min-height: calc(100vh - 164px); }

.hero,
.narrow {
  width: min(900px, calc(100% - 40px));
  margin: auto;
  padding: clamp(42px, 7vw, 88px) 0;
}

.invitation-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(130px, .55fr) minmax(0, 1.55fr);
  align-items: center;
  min-height: 470px;
  padding: clamp(45px, 7vw, 82px);
  overflow: hidden;
  border: 1px solid rgba(185,139,61,.42);
  background:
    linear-gradient(135deg, rgba(255,255,255,.55), transparent 42%),
    var(--paper);
  box-shadow: 0 28px 80px rgba(65, 46, 18, .10);
}

.invitation-panel::before,
.invitation-panel::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 42px;
  border-color: var(--gold);
  opacity: .7;
}

.invitation-panel::before { top: 17px; left: 17px; border-top: 1px solid; border-left: 1px solid; }
.invitation-panel::after { right: 17px; bottom: 17px; border-right: 1px solid; border-bottom: 1px solid; }

.botanical {
  display: block;
  background: linear-gradient(105deg, var(--gold-dark), var(--gold-light) 48%, var(--gold-dark) 74%);
  -webkit-mask: url("assets/gold-sprig.png") center/contain no-repeat;
  mask: url("assets/gold-sprig.png") center/contain no-repeat;
  mask-mode: luminance;
  filter: saturate(.72) contrast(1.25);
}

.botanical-hero {
  width: 155px;
  height: 300px;
  margin-left: -14px;
  opacity: .88;
}

.hero-copy { position: relative; z-index: 1; max-width: 540px; }

.eyebrow {
  margin: 0 0 17px;
  color: var(--gold-dark);
  font-size: .69rem;
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 26px;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: .89;
  letter-spacing: -.045em;
}

h1 em {
  background: linear-gradient(105deg, var(--gold-dark), var(--gold-light) 52%, var(--gold-dark));
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  font-weight: 400;
}

h2 { margin-bottom: 14px; font-size: clamp(2.65rem, 6vw, 4.4rem); line-height: 1; letter-spacing: -.035em; }
h3 { margin-bottom: 14px; font-size: 1.65rem; }

.event-line {
  width: fit-content;
  margin: 0 0 28px;
  padding-top: 18px;
  border-top: 1px solid var(--gold);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.intro { margin: 0; color: var(--ink-soft); font-size: 1.19rem; line-height: 1.75; }

.card {
  position: relative;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  background: rgba(255,250,240,.92);
  box-shadow: 0 18px 55px rgba(70, 48, 15, .07);
}

.login-card { width: min(720px, calc(100% - 30px)); margin: -28px auto 0; z-index: 2; }
.section-mark { position: absolute; top: -13px; left: 50%; width: 26px; transform: translateX(-50%); background: var(--paper); color: var(--gold); text-align: center; }

.row { display: grid; grid-template-columns: 1fr auto; gap: 12px; }

label {
  display: block;
  margin: 8px 0;
  color: var(--ink);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

input, select, textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: rgba(255,255,255,.6);
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  background: #fffdf8;
  box-shadow: 0 0 0 3px rgba(185,139,61,.13);
}

textarea { min-height: 90px; resize: vertical; }

button {
  min-height: 50px;
  padding: 13px 22px;
  border: 1px solid var(--gold-dark);
  border-radius: 0;
  background: linear-gradient(112deg, #76501d, #bd9043 48%, #8e6528);
  color: #fffaf0;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s, filter .2s, box-shadow .2s;
}

button:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(91,62,20,.16); transform: translateY(-1px); }
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
button:active { transform: translateY(0); }

.link {
  min-height: auto;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  box-shadow: none;
  color: var(--ink);
}

.link:hover { box-shadow: none; color: var(--gold-dark); }
.back-link { margin-bottom: 34px; }
.hint, .error, .save-message { margin-bottom: 0; font-size: .84rem; }
.hint { color: var(--ink-soft); }
.error { min-height: 1.3em; color: var(--error); }

.narrow { width: min(640px, calc(100% - 40px)); position: relative; }
.narrow > p, .narrow > h2 { text-align: center; }
.narrow .card { margin-top: 32px; }
.botanical-section { width: 78px; height: 128px; margin: 0 auto 28px; }
.code { margin-bottom: 14px; text-align: center; font-size: 1.65rem; letter-spacing: .38em; }
.code + button { width: 100%; }

.portal { width: min(1100px, calc(100% - 40px)); margin: auto; padding: clamp(42px, 7vw, 76px) 0; }
.portal-heading { display: flex; align-items: center; gap: 28px; margin-bottom: 32px; }
.portal-heading p { margin-bottom: 0; }
.botanical-heading { flex: 0 0 72px; width: 72px; height: 128px; }

.guest-card { margin: 18px 0; }
.guest-card::after { content: "✦"; position: absolute; top: 16px; right: 18px; color: var(--gold); font-size: .7rem; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.attendance { display: flex; flex-wrap: wrap; gap: 24px; margin: 12px 0 20px; }
.attendance label { display: flex; align-items: center; gap: 9px; font-weight: 400; letter-spacing: .04em; text-transform: none; }
.attendance input { width: auto; min-height: 0; accent-color: var(--gold-dark); }
#saveRsvp { margin-top: 10px; }
.save-message { color: var(--gold-dark); }

.tabs { display: flex; gap: 8px; margin: 22px 0; padding-bottom: 14px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs button { min-height: 42px; white-space: nowrap; padding: 10px 16px; border-color: var(--line); background: transparent; color: var(--ink); }
.tabs button:hover { border-color: var(--gold); box-shadow: none; color: var(--gold-dark); }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--gold-dark); font-size: .7rem; letter-spacing: .13em; text-transform: uppercase; }
tbody tr:hover { background: rgba(185,139,61,.055); }

footer {
  min-height: 72px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.footer-flourish { color: var(--gold); }
.hidden { display: none !important; }

@media (max-width: 720px) {
  .site-header, footer { width: min(100% - 28px, 1160px); }
  .brand > span:last-child { display: none; }
  .hero, .narrow, .portal { width: min(100% - 28px, 900px); }
  .hero { padding-top: 28px; }
  .invitation-panel { grid-template-columns: 1fr; min-height: 510px; padding: 48px 28px; text-align: center; }
  .botanical-hero { position: absolute; right: -8px; bottom: -72px; width: 155px; height: 300px; opacity: .12; transform: rotate(-8deg); }
  .hero-copy { max-width: none; }
  .event-line { margin-inline: auto; }
  .intro { font-size: 1.08rem; }
  .login-card { width: calc(100% - 18px); padding: 26px 20px; }
  .row, .choices { grid-template-columns: 1fr; }
  .row button { width: 100%; }
  .portal-heading { gap: 16px; }
  .botanical-heading { flex-basis: 52px; width: 52px; height: 96px; }
  footer { justify-content: center; }
  footer > span:not(.footer-flourish) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
