@font-face { font-family: "Italiana"; src: url(fonts/italiana-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Mrs Saint Delafield"; src: url(fonts/mrs-saint-delafield-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url(fonts/cormorant-garamond-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url(fonts/cormorant-garamond-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url(fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url(fonts/cormorant-garamond-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;
  --cream: #f9f5f2;
  --paper: #fdfbf8;
  --navy: #101a55;
  --ink: #232a57;
  --gold: #7f6126;
  --gold-line: #a98a45;
  --gold-pale: #e4d8bd;
  --blue: #5b85d8;
  --blue-pale: #e6ecf8;
  --error: #8f2a22;
  --display: "Italiana", "Cormorant Garamond", Georgia, serif;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --script: "Mrs Saint Delafield", "Snell Roundhand", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 500 1.25rem/1.55 var(--serif);
  font-variant-numeric: lining-nums;
}

a { color: var(--navy); text-decoration-color: var(--gold-line); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
sup { font-size: .6em; line-height: 0; letter-spacing: .1em; }
.center { text-align: center; }
.small { font-size: 1.08rem; }

/* The double gold frame with scooped corners, after the invitation */
.frame {
  width: min(1040px, calc(100% - 40px));
  min-height: calc(100vh - 40px);
  margin: 20px auto;
  border: 40px solid transparent;
  border-image: url(img/frame.svg) 40 / 40px stretch;
  display: flex;
  flex-direction: column;
}

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .2rem 1.75rem;
  padding: .25rem 0 .9rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--gold-pale);
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--cream);
}
.tabs a {
  padding: .5rem .1rem .4rem;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold);
  border-bottom: 1px solid transparent;
}
.tabs a:hover { color: var(--navy); }
.tabs a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--navy); }

main { flex: 1; }
.js .panel { display: none; }
.js .panel.active { display: block; }
.panel { padding: 0 clamp(0px, 4vw, 44px) 2rem; }

/* Headings */
h1, h2, h3 { font-weight: 400; color: var(--navy); margin: 0; }
.panel-head { text-align: center; margin: 1rem 0 1.75rem; }
.panel-head h2 { font: 400 clamp(2.5rem, 7vw, 3.75rem)/1.1 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.script { font: 400 clamp(2.3rem, 6vw, 3rem)/1 var(--script); color: var(--gold); margin: 0; }
.panel-head .script { margin-bottom: .35rem; }
.lede { font-size: 1.42rem; line-height: 1.5; max-width: 40rem; margin: 0 auto 1.75rem; }
.lede.center { text-align: center; }
.sub { font: 400 1.75rem/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; margin: 2.5rem 0 .75rem; }

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.1rem auto 0;
  max-width: 340px;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--gold-line); }
.divider { background: url(img/floret.svg) center / 26px 26px no-repeat; min-height: 26px; }
.divider::before { margin-right: 22px; }
.divider::after { margin-left: 22px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: .85rem 2rem .8rem;
  font: 600 1rem/1.2 var(--serif);
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  background: var(--navy);
  border: 1px solid var(--navy);
  outline: 1px solid var(--gold-line);
  outline-offset: 3px;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.btn:hover { background: #1c2a7a; color: var(--cream); }
.btn:focus-visible { outline: 2px solid var(--blue); }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn-quiet { background: transparent; color: var(--navy); border-color: var(--gold-line); outline-color: transparent; }
.btn-quiet:hover { background: var(--navy); color: var(--cream); }

/* Hero: laid out like the printed invitation */
.hero { position: relative; padding-top: clamp(11rem, 25vw, 15rem); min-height: 620px; }
.hero-flower {
  position: absolute;
  top: -.5rem;
  right: -1rem;
  width: min(60%, 500px);
  height: auto;
  pointer-events: none;
}
.names {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font: 400 clamp(3.8rem, 13vw, 6.8rem)/1 var(--display);
  letter-spacing: .03em;
  text-transform: uppercase;
}
.names .and {
  font: 400 clamp(3.4rem, 9.5vw, 5.2rem)/.8 var(--script);
  text-transform: none;
  letter-spacing: 0;
  margin: .02em 0 .02em 1em;
}
.invite-line {
  color: var(--gold);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: .2em;
  line-height: 1.9;
  text-transform: uppercase;
  margin: 1.75rem 0 0;
}
.invite-date {
  color: var(--gold);
  font-size: 1.55rem;
  letter-spacing: .17em;
  line-height: 1.7;
  text-transform: uppercase;
  margin: 1.25rem 0 0;
}
.invite-place { margin-top: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: 2rem; }

.panel > .divider { margin-top: 3rem; }
.glance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; text-align: center; margin: 2.25rem 0 1rem; }
.glance h2 { font: 400 1.6rem/1.2 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.glance p { margin: .5rem 0 .6rem; }
.glance a { font-size: 1.1rem; font-style: italic; font-weight: 400; }

/* The day */
.timeline { list-style: none; padding: 0; margin: 2.5rem auto 1.5rem; max-width: 34rem; border-left: 1px solid var(--gold-line); }
.timeline li { position: relative; padding: 0 0 2.25rem 2.25rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 1px;
  width: 23px;
  height: 23px;
  background: var(--cream) url(img/floret.svg) center / contain no-repeat;
}
.timeline-date { margin: 0; color: var(--gold); font-size: 1rem; font-weight: 600; letter-spacing: .17em; text-transform: uppercase; }
.timeline h3 { font: 400 1.75rem/1.25 var(--display); margin: .15rem 0 .25rem; }
.timeline p:last-child { margin: 0; }
.more { margin-top: 2.75rem; }

/* Stay */
.print { margin: 0 auto 2rem; max-width: 760px; }
.print img { display: block; width: 100%; height: auto; padding: 8px; background: var(--paper); border: 1px solid var(--gold-line); }
.print figcaption { text-align: center; font-style: italic; font-weight: 400; font-size: 1.05rem; color: var(--gold); margin-top: .5rem; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0; padding: 1.1rem 0; text-align: center; border-block: 1px solid var(--gold-line); }
.facts dt { color: var(--gold); font-size: .95rem; font-weight: 600; letter-spacing: .17em; text-transform: uppercase; }
.facts dd { margin: .2rem 0 0; color: var(--navy); font-size: 1.28rem; }

.table-wrap { overflow-x: auto; margin-top: 1.25rem; }
.rates { width: 100%; border-collapse: collapse; }
.rates th, .rates td { padding: .7rem .75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--gold-pale); }
.rates thead th { color: var(--gold); font-size: .95rem; font-weight: 600; letter-spacing: .17em; text-transform: uppercase; border-bottom-color: var(--gold-line); }
.rates tbody th { color: var(--navy); font-weight: 600; }
.rates td:nth-child(2) { white-space: nowrap; font-weight: 600; color: var(--navy); }
.table-note { font-style: italic; font-weight: 400; margin: .75rem 0 0; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps li { counter-increment: step; display: flex; gap: 1rem; padding: .55rem 0; align-items: baseline; }
.steps li::before { content: counter(step); flex: none; font: 400 1.9rem/1 var(--display); color: var(--blue); width: 1.4rem; }

/* Dress code */
.swatches { list-style: none; display: flex; justify-content: center; gap: clamp(1.5rem, 6vw, 4rem); padding: 0; margin: 2rem 0 2.25rem; text-align: center; letter-spacing: .15em; text-transform: uppercase; font-size: 1rem; font-weight: 600; color: var(--navy); }
.swatch { display: block; width: clamp(76px, 18vw, 110px); aspect-ratio: 1; margin: 0 auto .75rem; border-radius: 50%; border: 1px solid var(--gold-line); outline: 1px solid var(--gold-line); outline-offset: 4px; }
.swatch-navy { background: var(--navy); }
.swatch-gold { background: linear-gradient(135deg, #d7ba74, #a98a45 55%, #c9ab62); }
.swatch-white { background: linear-gradient(to top right, #fff 48.5%, var(--gold) 49%, var(--gold) 51%, #fff 51.5%); }
.swatch-no { color: var(--gold); }

/* Travel */
.address { font-style: normal; text-align: center; font-size: 1.42rem; line-height: 1.45; color: var(--navy); }
.address .btn { display: table; margin: 1.1rem auto 0; }
.travel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 3rem; margin: 2.5rem 0 2rem; }
.travel-grid h3 { font: 400 1.6rem/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; padding-bottom: .35rem; margin-bottom: .6rem; border-bottom: 1px solid var(--gold-pale); }
.travel-grid p { margin: 0 0 .7rem; }

/* Questions */
.faq { max-width: 42rem; margin: 0 auto 2rem; }
.faq details { border-bottom: 1px solid var(--gold-pale); }
.faq summary { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; font-size: 1.32rem; font-weight: 600; color: var(--navy); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 400 1.7rem/1 var(--serif); color: var(--gold); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 1.1rem; }

/* RSVP form */
form { max-width: 42rem; margin: 0 auto; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.group { margin-bottom: 2.5rem; }
.group > legend { display: block; width: 100%; padding: 0 0 .4rem; margin-bottom: 1.1rem; font: 400 1.65rem/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--navy); border-bottom: 1px solid var(--gold-line); }
.field { display: block; margin-bottom: 1.25rem; }
.field > legend, .label { display: block; padding: 0; margin-bottom: .4rem; color: var(--navy); font-weight: 600; }
.label em { font-weight: 400; color: var(--gold); }
.hint { display: block; margin: .35rem 0 1.1rem; font-size: 1.08rem; line-height: 1.4; }
.field .hint { margin-bottom: 0; }

input[type=text], input[type=email], input[type=tel], select, textarea {
  width: 100%;
  padding: .65rem .8rem;
  font: 500 1.2rem/1.35 var(--serif);
  color: var(--navy);
  background: var(--paper);
  border: 1px solid var(--gold-line);
  border-radius: 0;
}
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.invalid input[type=text], .invalid input[type=email], input.invalid { border-color: var(--error); outline: 1px solid var(--error); }
.invalid .choice span { border-color: var(--error); }

.choices { display: flex; flex-wrap: wrap; gap: .6rem; }
.choice { position: relative; flex: 1 1 13rem; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span { display: block; padding: .6rem .8rem; text-align: center; color: var(--navy); background: var(--paper); border: 1px solid var(--gold-line); transition: background-color .15s, color .15s; }
.choice input:hover + span { background: var(--blue-pale); }
.choice input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.choice input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.check { display: flex; gap: .65rem; align-items: baseline; margin-bottom: .5rem; cursor: pointer; }
.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--navy); flex: none; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }

.guest { padding: 1.1rem 1.25rem .25rem; margin-bottom: 1rem; background: var(--paper); border: 1px solid var(--gold-pale); }
.guest-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .6rem; }
.guest-title { font: 400 1.3rem/1.2 var(--display); letter-spacing: .06em; }
.guest input[type=text] { background: #fff; }

.link-btn { background: none; border: 0; padding: .2rem 0; font: italic 400 1.15rem/1.3 var(--serif); color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold-line); text-underline-offset: .18em; cursor: pointer; text-align: left; }
.link-btn:hover { color: var(--gold); }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: var(--error); text-align: center; font-weight: 600; margin: 0 0 1.25rem; }

.thanks { max-width: 34rem; margin: 2rem auto; text-align: center; font-size: 1.35rem; }
.thanks .script { font-size: clamp(3rem, 9vw, 4rem); margin-bottom: 1rem; }

/* Footer */
.foot { text-align: center; padding-top: 1.25rem; border-top: 1px solid var(--gold-pale); color: var(--gold); letter-spacing: .25em; font-size: 1rem; }
.foot p { margin: 0; }
.foot .script { letter-spacing: 0; font-size: 2.25rem; margin-bottom: .2rem; }

/* Tablet and phone */
@media (max-width: 760px) {
  body { font-size: 1.2rem; }
  .frame { width: calc(100% - 16px); margin: 8px auto; min-height: calc(100vh - 16px); border-width: 22px; border-image-width: 22px; }
  .tabs { position: static; gap: 0 .8rem; margin-bottom: 1rem; padding-top: .35rem; }
  .tabs a { font-size: .82rem; letter-spacing: .09em; padding: .45rem .1rem .35rem; }
  .panel { padding: 0 4px 1.5rem; }
  .hero { min-height: 0; padding-top: 44vw; }
  .hero-flower { width: 66%; right: -8px; top: -.25rem; }
  .invite-line { font-size: .84rem; letter-spacing: .07em; line-height: 1.75; }
  .invite-line:not(.invite-place) br { display: none; }
  .invite-date { font-size: 1.25rem; letter-spacing: .13em; }
  .btn { padding-inline: 1.4rem; letter-spacing: .16em; }
  .glance, .travel-grid, .two { grid-template-columns: 1fr; }
  .glance { gap: 1.75rem; }
  .facts { grid-template-columns: 1fr; gap: .8rem; }
  .lede { font-size: 1.3rem; }
  .sub { font-size: 1.5rem; }
  .rates th, .rates td { padding: .6rem .5rem; }
  .rates thead th { font-size: .82rem; letter-spacing: .1em; }
  .guest { padding: 1rem .85rem .1rem; }
}
