:root {
  color-scheme: light;
  --paper: #f6f3ec;
  --card: #fcfaf5;
  --ink: #373b30;
  --olive: #697354;
  --muted: #77766b;
  --line: #c9cbbb;
  --sans: "Segoe UI", Arial, sans-serif;
  --serif: "Baskerville", "Palatino Linotype", Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23797562' opacity='.035' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--olive); outline-offset: 6px; }
svg { display: block; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.eyebrow { font-size: 10px; font-weight: 500; letter-spacing: .23em; line-height: 1.8; }

.cover {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 48px 24px;
  text-align: center;
  overflow: hidden;
  transition: opacity .45s ease;
}
.cover-intro { color: var(--muted); margin: 0 0 76px; }
.envelope { position: relative; width: min(410px, 85vw); aspect-ratio: 1.58; }
.envelope-back {
  position: absolute; inset: 0; background: #e8e3d5; border: 1px solid #d3cfbf;
  box-shadow: 0 20px 45px #373b3010;
}
.envelope-card {
  position: absolute; inset: 10px 20px; z-index: 1; background: var(--card);
  padding: 12px; border: 1px solid #ddded0; transition: transform .6s ease;
}
.envelope-card > span { display: block; font: 24px var(--serif); padding-top: 8px; }
.cover-branch { width: 110px; height: 55px; margin: auto; color: #959d80; }
.envelope-front {
  position: absolute; inset: 0; z-index: 3; background: #eeeadf;
  clip-path: polygon(0 0, 50% 57%, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
.envelope-flap {
  position: absolute; inset: 0; z-index: 4; background: #dfdaca;
  clip-path: polygon(0 0, 100% 0, 50% 58%);
  transform-origin: top; transition: transform .5s ease; pointer-events: none;
}
.seal {
  position: absolute; z-index: 5; top: 43%; left: calc(50% - 32px);
  width: 64px; height: 64px; border-radius: 50%; border: 1px solid #81896e;
  background: #727d60; color: #faf8ee; font: 20px var(--serif);
  box-shadow: inset 0 0 0 4px #727d60, inset 0 0 0 5px #a6ad95;
  transition: opacity .2s, background .2s;
}
.seal:hover { background: #606d50; }
.seal-divider { font-size: 13px; margin: 0 2px; }
.cover-caption { margin-top: 48px; }
.cover-caption h1 { font: 36px var(--serif); margin: 0 0 14px; font-weight: 400; }
.cover-caption h1 span { color: var(--olive); font-style: italic; }
.cover-caption > .eyebrow { color: var(--muted); }
.open-invitation {
  display: inline-flex; align-items: center; gap: 22px; margin-top: 25px;
  padding: 14px 24px; border: 1px solid var(--line); color: var(--ink);
  background: transparent; font-size: 12px; letter-spacing: .07em;
  transition: background .2s;
}
.open-invitation:hover { background: #e8e8dc; }
.open-invitation svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.2; }
.cover-note { font: italic 15px var(--serif); color: var(--muted); margin-top: 22px; }
.cover.is-opening .envelope-flap { transform: scaleY(-1); }
.cover.is-opening .envelope-card { transform: translateY(-45px); }
.cover.is-opening .seal { opacity: 0; }
.cover.is-leaving { opacity: 0; }

.page-header {
  max-width: 1080px; margin: auto; padding: 28px 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.monogram { font: 24px var(--serif); text-decoration: none; letter-spacing: -.08em; }
.monogram span { font-size: 16px; color: var(--olive); margin: 0 3px; }
.page-header > .eyebrow { color: var(--muted); }
.header-date { font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.invitation-card {
  position: relative; max-width: 700px; margin: 20px auto 0; padding: 114px 68px 90px;
  text-align: center; background: var(--card); box-shadow: 0 10px 45px #373b3007;
}
.fine-border {
  position: absolute; inset: 21px; border: 1px solid var(--line);
  border-radius: 45% 3% 43% 3% / 2% 42% 2% 42%; pointer-events: none;
}
.fine-border::after {
  content: ""; position: absolute; inset: 4px -3px; border: 1px solid #c9cbbb70;
  border-radius: 3% 40% 3% 40% / 40% 2% 40% 2%;
}
.botanical { position: absolute; color: #929b7e; width: 190px; height: 95px; pointer-events: none; }
.botanical-top { top: 6px; right: 22px; transform: rotate(170deg); }
.botanical-bottom { bottom: 8px; left: 24px; }
.invitation-intro { color: var(--olive); margin: 0 0 30px; font-size: 9px; }
.invitation-card h2 { font: 51px/1.15 var(--serif); letter-spacing: .04em; font-weight: 400; margin: 0; }
.invitation-card h2 span { display: block; font-size: 34px; font-style: italic; color: var(--olive); margin: 10px 0; }
.invitation-card h2:focus { outline: none; }
.small-rule { height: 1px; width: 46px; margin: 31px auto; background: var(--line); }
blockquote { max-width: 415px; margin: auto; }
blockquote p { font: 19px/1.65 var(--serif); margin: 0 0 13px; }
blockquote cite { font-style: normal; font-size: 10px; letter-spacing: .16em; color: var(--olive); }
.date-block { margin: 37px auto 0; }
.date-block > .eyebrow { color: var(--olive); }
.date-row { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 4px; }
.date-row .eyebrow { width: 77px; padding: 13px 0; border-block: 1px solid var(--line); font-size: 9px; }
.day { font: 66px/1.2 var(--serif); }
.date-block > p { font-size: 9px; letter-spacing: .15em; margin: 8px 0 13px; }
time { font: 21px var(--serif); }
.venue { margin-top: 30px; }
.venue svg { width: 20px; height: 20px; margin: 0 auto 12px; fill: none; stroke: var(--olive); stroke-width: 1.2; }
.venue p { font: 13px/1.8 var(--sans); color: var(--muted); margin: 0; }
.venue > span { color: var(--ink); font: 20px/1.5 var(--serif); display: block; margin-bottom: 5px; }
.welcome { font: italic 18px/1.6 var(--serif); margin: 29px 0 0; }
.guest-links { max-width: 800px; margin: 55px auto 0; padding: 0 24px; text-align: center; }
.guest-links > .eyebrow { color: var(--olive); margin-bottom: 10px; }
.links-description { font: 18px/1.6 var(--serif); color: var(--muted); margin: 0 0 29px; }
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.action {
  display: flex; flex-direction: column; align-items: center; background: #fcfaf570;
  border: 1px solid #d9dacd; padding: 23px 8px 20px; text-decoration: none; color: var(--ink);
  transition: background .2s, border-color .2s, transform .2s;
}
.action:hover { background: var(--card); border-color: var(--olive); transform: translateY(-3px); }
.action-icon { color: var(--olive); margin-bottom: 15px; }
.action-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.action > span:not(.action-icon) { font-size: 11px; line-height: 1.5; }
.action small { color: var(--muted); font-size: 10px; margin-top: 6px; }
footer { text-align: center; padding: 55px 24px 32px; }
.footer-monogram { font: italic 25px var(--serif); color: var(--olive); }
footer p { font: italic 15px/1.5 var(--serif); color: var(--muted); margin: 15px 0 21px; }
footer .eyebrow { font-size: 8px; color: var(--muted); }
.noscript-note { font-size: 12px; line-height: 1.8; }

dialog {
  width: min(450px, calc(100% - 40px)); padding: 42px 30px 32px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  text-align: center; box-shadow: 0 15px 80px #373b3020;
}
dialog::backdrop { background: #30332855; backdrop-filter: blur(4px); }
.close-dialog { position: absolute; right: 12px; top: 8px; width: 36px; height: 36px; border: none; background: transparent; color: var(--muted); font-size: 25px; }
.dialog-branch { width: 100px; height: 50px; color: var(--olive); margin: auto; }
dialog > .eyebrow { font-size: 8px; color: var(--olive); margin-top: 20px; }
dialog h2 { font: 30px var(--serif); font-weight: 400; margin: 22px 0 17px; }
#dialog-text { font-size: 13px; line-height: 1.9; color: var(--muted); white-space: pre-line; }
.dialog-ok { background: var(--olive); color: var(--card); border: 1px solid var(--olive); padding: 11px 29px; font-size: 12px; margin-top: 14px; }

.general-dialog { width: min(660px, calc(100% - 32px)); max-height: calc(100svh - 32px); padding: 36px 40px; }
.general-dialog h2 { font-size: 34px; }
.general-dialog #dialog-text { font: 18px/1.6 var(--serif); margin-bottom: 28px; }
.general-section { border-top: 1px solid var(--line); padding-top: 26px; margin-top: 28px; }
.general-section h3 { font: 25px/1.4 var(--serif); font-weight: 400; margin: 0 0 20px; }
.invitation-guidance { text-align: left; font-size: 14px; line-height: 1.9; color: var(--muted); }
.invitation-guidance p { margin: 0 0 18px; }
.invitation-guidance p:last-child { margin-bottom: 0; }
.rsvp-form-link { display: flex; justify-content: center; align-items: center; gap: 14px; background: var(--olive); color: var(--card); padding: 16px; margin-top: 28px; font-size: 12px; line-height: 1.6; text-decoration: none; }
.rsvp-form-link:hover { background: #566044; }
.rsvp-dialog .dialog-ok { background: transparent; color: var(--olive); }
.schedule { list-style: none; padding: 0; margin: 26px 0 0; text-align: left; }
.schedule li { position: relative; border-left: 1px solid var(--line); padding: 0 0 28px 24px; margin-left: 5px; }
.schedule li:last-child { padding-bottom: 4px; }
.schedule li::before { content: ""; position: absolute; top: 4px; left: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--olive); }
.schedule-time, .schedule-time time { font: 20px/1.8 var(--sans); letter-spacing: .06em; color: var(--olive); }
.schedule h4 { font: 11px/1.5 var(--serif); font-weight: 400; margin: 7px 0 0; }
.schedule p { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 5px 0 0; }

.directions-dialog { width: min(740px, calc(100% - 32px)); max-height: calc(100svh - 32px); padding: 30px; }
.directions-dialog .dialog-branch { width: 75px; height: 38px; }
.directions-dialog h2 { margin: 16px 0 10px; }
.directions-dialog #dialog-text { margin: 0 0 22px; }
#directions-address { margin: 0 0 22px; }
.map-switch { display: flex; gap: 8px; margin-bottom: 12px; }
.map-switch button {
  flex: 1; min-height: 44px; padding: 10px; background: transparent;
  border: 1px solid var(--line); font-size: 12px; color: var(--ink);
}
.map-switch button[aria-pressed="true"] { background: var(--olive); border-color: var(--olive); color: var(--card); }
#location-map { display: block; width: 100%; height: 290px; border: 1px solid var(--line); background: var(--paper); }
.map-note { font-size: 11px; line-height: 1.7; color: var(--muted); text-align: left; }
.map-note a { text-underline-offset: 3px; }
.navigation-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.navigation-links a {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 14px; background: var(--olive); color: var(--card); text-decoration: none; font-size: 12px;
}
.navigation-links a:hover { background: #566044; }
.driving-options, .metro-option { text-align: left; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
#directions-content h3 { font: 22px/1.4 var(--serif); font-weight: 400; margin: 0 0 10px; }
.directions-description, .metro-option > p:not(.map-note) { color: var(--muted); font-size: 12px; line-height: 1.8; }
.route-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.route-options > a { display: flex; flex-direction: column; gap: 10px; padding: 17px; border: 1px solid var(--line); text-decoration: none; }
.route-options > a:hover { border-color: var(--olive); background: var(--paper); }
.route-options .eyebrow { color: var(--olive); font-size: 8px; }
.route-options strong { font: 17px/1.4 var(--serif); }
.route-options > a > span:last-child { font-size: 11px; color: var(--olive); }
.metro-option > .eyebrow { font-size: 9px; color: var(--olive); }
.metro-option h3 { margin-top: 10px !important; }
.metro-line { display: inline-block; padding: 5px 10px; background: #e7ecdf; color: #445735; font-size: 11px; }
.metro-links { display: flex; flex-direction: column; gap: 4px; }
.metro-links a { font-size: 12px; line-height: 1.7; padding: 8px 0; color: var(--olive); text-underline-offset: 4px; }
body:has(dialog[open]) { overflow: hidden; }

@media (max-width: 600px) {
  .cover { padding: 35px 20px; }
  .cover-intro { font-size: 8px; margin-bottom: 60px; }
  .cover-caption h1 { font-size: 29px; }
  .cover-caption { margin-top: 36px; }
  .page-header { padding: 22px; }
  .page-header > .eyebrow { font-size: 8px; letter-spacing: .15em; }
  .header-date { font-size: 9px; }
  .invitation-card { margin: 5px 14px 0; padding: 91px 32px 80px; }
  .fine-border { inset: 13px; }
  .botanical { width: 145px; height: 73px; }
  .botanical-top { right: 14px; }
  .botanical-bottom { left: 17px; }
  .invitation-intro { font-size: 8px; letter-spacing: .16em; margin-bottom: 26px; }
  .invitation-card h2 { font-size: clamp(28px, 8vw, 46px); letter-spacing: .03em; }
  .invitation-card h2 span { font-size: 27px; margin: 9px 0; }
  blockquote p { font-size: 17px; }
  .small-rule { margin: 26px auto; }
  .date-row { gap: 16px; }
  .date-row .eyebrow { width: 63px; font-size: 8px; }
  .day { font-size: 58px; }
  .venue { margin-top: 16px; }
  .venue p { font-size: 12px; }
  .venue > span { font-size: clamp(10px, 3.2vw, 13px); }
  .welcome { font-size: 17px; }
  .desktop-break { display: none; }
  .guest-links { margin-top: 40px; padding: 0 22px; }
  .guest-links > .eyebrow { font-size: 9px; }
  .links-description { font-size: 17px; max-width: 280px; margin: 0 auto 25px; }
  .actions { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .action { padding: 22px 8px; }
  footer { padding-top: 40px; }
  .general-dialog { padding: 30px 22px 24px; }
  .general-dialog h2 { font-size: 29px; }
  .general-dialog #dialog-text { font-size: 17px; }
  .general-section h3 { font-size: 24px; }
  .invitation-guidance { font-size: 13px; }
  .schedule-time, .schedule-time time { font-size: 19px; }
  .directions-dialog { padding: 30px 18px 22px; }
  #location-map { height: 240px; }
  .navigation-links, .route-options { grid-template-columns: 1fr; }
  .map-switch button { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
