/* Reversible letter trial. Texture opacity controls do not fade content. */
:root {
  --letter-surround: #e7e2da;
  --letter-canvas: #f0e8dc;
  /* Whole-page paper texture: 0 = off, 1 = strongest. Try .20 for more grain. */
  --letter-grain-opacity: .225;
  --letter-fiber-opacity: .12;
}
html, body { background: var(--letter-surround) !important; }
.site-frame {
  width: min(1100px, calc(100% - 64px));
  margin: 32px auto;
  border-radius: 1px;
  background: var(--paper);
  box-shadow: 0 8px 36px rgb(75 60 44 / 12%), 0 1px 4px rgb(75 60 44 / 8%);
}
.site-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.site-frame::after { content: none; }
/* Texture belongs to the paper sheet, so it naturally scrolls with the content. */
.site-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 110;
  pointer-events: none;
  background: url("letter-grain.png") repeat;
  background-size: 256px 256px;
  opacity: var(--letter-grain-opacity);
}
.site-frame::before {
  background: url("letter-fibers.svg") repeat;
  opacity: var(--letter-fiber-opacity);
  mask-image: linear-gradient(90deg, #000, transparent 12%, transparent 88%, #000);
}
.paper-section::after { content: none; }
#siteFrame > main > section, #siteFrame > main > footer {
  border-top: 0;
  background-image: none;
}
footer .footer__hosts { margin-top: clamp(40px, 5vw, 64px) !important; }
@media (max-width: 680px) {
  .site-frame { width: calc(100% - 12px); margin: 6px auto; }
}

/* Closing copy follows the invitation paragraph scale. */
#siteFrame footer .signature,
#siteFrame footer .footer__hosts {
  font: 400 var(--body-size)/1.85 var(--serif) !important;
  letter-spacing: 0 !important;
}


/* Continuous craft-paper canvas for the interlude and date/time chapter. */
#date {
  position: relative;
  isolation: isolate;
  width: min(100% - 28px, 760px);
  margin-inline: auto;
  background-color: var(--letter-canvas) !important;
  border: 1px solid rgb(179 152 112 / 26%);
  border-radius: 2px;
  box-shadow: 0 9px 28px rgb(75 60 44 / 10%), 0 1px 3px rgb(75 60 44 / 8%);
  overflow: visible;
}
#date::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: url("letter-grain.png") repeat;
  background-size: 256px 256px;
  opacity: .045;
  mix-blend-mode: multiply;
}
.date-section__lead,
#date > .section-inner {
  position: relative;
  z-index: 1;
  width: auto;
  margin-inline: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.date-section__lead { margin-top: 0; padding-top: 72px; }
#date > .section-inner { margin-top: 0; }
#venue > .section-inner {
  position: relative;
  isolation: isolate;
  width: min(100% - 28px, 760px);
  margin: 28px auto 0;
  background-color: var(--letter-canvas) !important;
  border: 1px solid rgb(179 152 112 / 26%);
  border-radius: 2px;
  box-shadow: 0 9px 28px rgb(75 60 44 / 10%), 0 1px 3px rgb(75 60 44 / 8%);
}
#venue > .section-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("letter-grain.png") repeat;
  background-size: 256px 256px;
  opacity: .045;
  mix-blend-mode: multiply;
}
@media (max-width: 680px) {
  #date { width: calc(100% - 20px); }
  #venue > .section-inner { width: calc(100% - 20px); }
  .date-section__lead { padding-top: 54px; }
}


/* Section headings are clear, upright, and consistently emphasized. */
.display-title,
.rsvp h2,
.venue .venue__name,
.calendar__heading,
.countdown-section h2 { font-weight: 700 !important; }

/* Final type pass: two families only, with no italic styles. */
:root { --sans: var(--serif); }
#siteFrame, #siteFrame * { font-style: normal !important; }
.date-section__lead p {
  font-family: var(--serif) !important;
  font-style: normal !important;
  font-size: clamp(18px, 2.4vw, 28px) !important;
  line-height: 1.5 !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.countdown-section h2 {
  font-family: var(--serif) !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  letter-spacing: .04em;
}
.rsvp h2 { font-size: clamp(26px, 3vw, 32px) !important; }
.rsvp__card > p:not(.kicker),
.rsvp form label > span,
.rsvp legend,
.rsvp input, .rsvp textarea, .rsvp__choice { font-size: 15px !important; line-height: 1.55 !important; }
.rsvp .dark-button { font-size: 14px !important; }
.event-date-summary__day { font-size: clamp(58px, 16vw, 78px) !important; }
.calendar__grid .is-event::before { display: none !important; }
@media (max-width: 680px) {
  /* Mobile only: give the title lockup a much larger upper breathing zone. */
  .hero__content { top: clamp(102px, 25vw, 138px) !important; }
  .date-section__lead p { font-size: clamp(17px, 5vw, 23px) !important; }
}

/* Date lockup: one upright serif family and one wine color, with size hierarchy retained. */
.event-date-summary,
.event-date-summary__date,
.event-date-summary__month,
.event-date-summary__weekday,
.event-date-summary__times,
.event-date-summary__times dt,
.event-date-summary__times dd,
.calendar__heading {
  font-family: var(--serif) !important;
  color: var(--wine) !important;
}
.calendar__grid .is-event::before { display: block !important; }
.venue .venue__name { color: var(--wine) !important; }
.venue__kicker { margin: 0 0 14px; color: var(--wine); }

/* Read the date as one line of information rather than a giant isolated day. */
.event-date-summary__date {
  display: block !important;
  font-size: clamp(30px, 4vw, 42px) !important;
  line-height: 1.2 !important;
}
.event-date-summary__times dt,
.event-date-summary__times dd {
  font-size: clamp(22px, 3.8vw, 34px) !important;
  line-height: 1.35 !important;
}
.event-date-summary__day,
.event-date-summary__month {
  display: inline !important;
  margin: 0 !important;
  font-family: var(--serif) !important;
  font-size: inherit !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.event-date-summary__month {
  color: var(--wine) !important;
}
.event-date-summary__weekday {
  margin: 5px 0 0 !important;
  font-size: 18px !important;
  line-height: 1.4 !important;
  color: var(--wine) !important;
}

/* Ivory calendar pairs with the landscape, with wine ink for contrast. */
.calendar {
  padding: clamp(22px, 4vw, 34px) clamp(18px, 4vw, 30px);
  border-radius: 2px;
  background: #faf6ef !important;
  color: var(--wine) !important;
  border: 1px solid #d8b68a;
  box-shadow: none;
}
.calendar :is(.calendar__heading, .calendar__days, .calendar__grid > span) { color: var(--wine) !important; }
.calendar .calendar__days span { color: var(--wine) !important; }
.calendar .calendar__days { border-bottom-color: rgb(250 246 239 / 28%); }
.calendar .calendar__grid .is-event { color: #faf6ef !important; }
.calendar .calendar__grid .is-event::before { background: var(--wine) !important; }
.calendar .calendar__grid .is-event i { border-color: #d8b68a !important; }

/* Trial 2: four-size type scale. */
:root {
  --display-size: 132px;
  --section-size: 38px;
  --body-size: 18px;
  --small-size: 14px;
}
.hero__bride-name,
.invitation__address { font-size: clamp(58px, 15vw, 96px) !important; }
.hero__bride-name { font-size: var(--display-size) !important; }
.hero__event-type,
.date-section__lead p,
.event-date-summary__date,
.rsvp h2,
.venue .venue__name { font-size: var(--section-size) !important; }
.hero__event-type { font-size: clamp(20px, 3vw, 30px) !important; }
.body-copy,
.event-date-summary__weekday,
.event-date-summary__times dt,
.event-date-summary__times dd,
.venue__type,
.venue .venue__address,
.rsvp__card > p:not(.kicker),
.rsvp input, .rsvp textarea, .rsvp__choice { font-size: var(--body-size) !important; }
.event-date-summary__month,
.calendar__heading,
.calendar__days,
.calendar__grid > span,
.countdown-section h2,
.rsvp form label > span,
.rsvp legend,
.soft-button, .dark-button,
.footer__hosts, footer > button { font-size: var(--small-size) !important; }
/* Secondary copy shares one scale; utility buttons share one touch target. */
#replayIntro {
  font-family: var(--serif);
  font-size: 13px !important;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
  text-transform: none;
}
.language-toggle, .music-toggle {
  box-sizing: border-box;
  width: 114px;
  height: 50px;
  min-height: 50px;
  justify-content: center;
}
.event-date-summary__month { font-size: inherit !important; }
/* Paper-insert trial: identical surfaces, texture and edge treatment. */
#date, #venue > .section-inner {
  background: var(--letter-canvas) !important;
  border: 1px solid #c8b89c55;
  border-radius: 1px;
  box-shadow: inset 0 1px #fffdf5, 0 2px 3px #57412d12, 0 10px 20px -12px #57412d55;
}
#date::after, #venue > .section-inner::after {
  content: "";
  inset: 0;
  position: absolute;
  z-index: -1;
  background: url("letter-fibers.svg") repeat, url("letter-grain.png") repeat;
  background-size: 400px 400px, 180px 180px;
  opacity: .12;
  mix-blend-mode: multiply;
  pointer-events: none;
}
#date::before, #venue > .section-inner::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid #b9a48730;
  z-index: -1;
  pointer-events: none;
}
/* Unframed interlude: a threshold image with one short, readable epigraph. */
.yurt-interlude {
  display: grid;
  grid-template-columns: 58% 42%;
  align-items: center;
  margin: 0 auto 56px;
  position: relative;
}
.yurt-interlude__image {
  display: block;
  grid-area: 1 / 1 / 2 / 3;
  width: 100%;
  height: auto;
  mask-image: linear-gradient(to right, #000 55%, transparent 96%);
}
.yurt-interlude__text {
  grid-area: 1 / 2;
  z-index: 1;
  justify-self: center;
  width: min(100%, 23rem);
  padding: 24px 48px 24px 20px;
  text-align: center;
}
.yurt-interlude__text h2 {
  margin: 0;
  color: var(--wine);
  font: 500 clamp(22px, 2.7vw, 32px)/1.42 var(--serif);
  font-style: normal;
  letter-spacing: 0;
  text-wrap: balance;
}
@media (max-width: 680px) {
  .yurt-interlude { display: flex; flex-direction: column; gap: 18px; margin-bottom: 40px; }
  .yurt-interlude__text { order: -1; width: min(100%, 28rem); padding: 12px 28px 0; }
  .yurt-interlude__image { mask-image: linear-gradient(to bottom, #000 90%, transparent 100%); }
}
#date > .section-inner { padding: 32px 30px; }
#date .event-date-summary { margin: 0 auto 32px; }
#date .countdown-section { margin: 24px auto 48px; background: transparent; }
#date .countdown-section { position: relative; z-index: 1; }
#venue > .section-inner { padding: 48px 30px; margin-top: 0; }
#venue { padding-block: 0; margin-top: 64px; }
#rsvp { margin-top: 64px; }
/* The closing illustration alone remains beneath the hosts' signature. */
.signature-landscape {
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 0;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 94%, transparent), linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
  mask-composite: intersect;
}
#siteFrame main > footer:has(.signature-landscape) {
  position: relative;
  isolation: isolate;
  width: min(100% - 20px, 760px);
  margin-inline: auto;
  padding-inline: 24px;
  padding-bottom: min(88vw, 670px);
}
footer > .signature, footer > #replayIntro { position: relative; z-index: 1; }
/* Ivory remains the continuous page surface. */
#siteFrame > main { background: var(--paper) !important; }
#siteFrame #invitation { background: var(--paper); }
#siteFrame #venue, #siteFrame #rsvp, #siteFrame main > footer { background: transparent !important; }
/* Shared section rhythm and feathered illustration edges. */
:root { --chapter-gap: clamp(72px, 8vw, 112px); }
#invitation { margin-top: var(--chapter-gap); }
.yurt-interlude { margin-top: var(--chapter-gap); margin-bottom: var(--chapter-gap); }
#venue { margin-top: var(--chapter-gap); }
#rsvp { margin-top: var(--chapter-gap); }
.hero__image {
  mask-image: linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent), linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
  mask-composite: intersect;
}
.yurt-interlude__image {
  mask-image: linear-gradient(to right, #000 55%, transparent 96%), linear-gradient(to bottom, transparent, #000 5%, #000 94%, transparent);
  mask-composite: intersect;
}
.artwork-reveal { opacity: 0; translate: 0 10px; transition: opacity 1.2s ease-out, translate 1.2s cubic-bezier(.2,.65,.3,1); }
.artwork-reveal.artwork-visible { opacity: 1; translate: 0 0; }
@media (max-width: 680px) {
  .yurt-interlude { margin-bottom: var(--chapter-gap); }
  .yurt-interlude__image {
    mask-image: linear-gradient(to bottom, transparent, #000 5%, #000 90%, transparent);
    mask-composite: add;
  }
  .yurt-interlude__text h2 { font-size: clamp(22px, 5.6vw, 28px); line-height: 1.4; }
}
@media (prefers-reduced-motion: reduce) {
  .artwork-reveal { opacity: 1; translate: none; transition: none; }
}
@media (max-width: 680px) {
  #invitation .section-inner { padding: 40px 28px 56px; }
  #date > .section-inner, #venue > .section-inner { padding-inline: 28px; }
}
@media (max-width: 680px) {
  :root {
    --display-size: 84px;
    --section-size: 30px;
    --body-size: 16px;
    --small-size: 13px;
  }
}
