/* Daniel & Violet — styled after the wedding invitations:
   parchment, blackletter, illuminated borders, and marginalia beasts. */

/* Custom fonts: drop the files into assets/fonts/ (see README there).
   Until then the Google Fonts fallbacks below are used. */
@font-face{
  font-family:'Black Kiyrand';
  src:local('Black Kiyrand'), local('BlackKiyrand-Regular'),
      url("assets/fonts/BlackKiyrand.woff2") format('woff2'),
      url("assets/fonts/BlackKiyrand.otf") format('opentype'),
      url("assets/fonts/BlackKiyrand.ttf") format('truetype');
  font-display:swap;
}
@font-face{
  font-family:'Obra Letra';
  src:local('Obra Letra'), local('ObraLetra-Regular'),
      url("assets/fonts/ObraLetra.woff2") format('woff2'),
      url("assets/fonts/ObraLetra.otf") format('opentype'),
      url("assets/fonts/ObraLetra.ttf") format('truetype');
  font-display:swap;
}

:root{
  --parchment:#ecdcbc;
  --ink:#2a211a;
  --ink-soft:#54463a;
  --rubric:#9b2a1d;      /* the red ink of manuscript headings */
  --lapis:#2b4a8a;
  --verdigris:#3d6a4a;
  --gold:#b78a2e;
  --rule:rgba(42,33,26,.28);

  /* surround = everything outside the parchment page */
  --surround-bg:var(--parchment);
  --surround-ink:var(--ink);
  --surround-soft:var(--ink-soft);
  --surround-accent:var(--rubric);

  --blackletter:'Black Kiyrand', 'UnifrakturMaguntia', 'Old English Text MT', 'Times New Roman', serif;
  --hand:'Obra Letra', 'Fondamento', 'Palatino Linotype', Palatino, Georgia, serif;

  color-scheme:light;
  box-sizing:border-box;
  padding-top:env(safe-area-inset-top, 0px);
  padding-bottom:env(safe-area-inset-bottom, 0px);
}
*,*::before,*::after{ box-sizing:inherit; }
[hidden]{ display:none !important; }
html{ scroll-padding-top:env(safe-area-inset-top, 0px); }

body{
  margin:0;
  min-height:100vh;
  background-color:var(--surround-bg);
  background-image:radial-gradient(ellipse at center, transparent 45%, rgba(110,70,25,.32) 100%), url("assets/parchment.jpg");
  background-size:100% 100%, 1350px auto;
  background-attachment:fixed, scroll;
  color:var(--surround-ink);
  font-family:var(--hand);
  font-size:19px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
::selection{ background:var(--gold); color:var(--ink); }

h1,h2,h3{ font-weight:400; margin:0; }
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration-thickness:1px; text-underline-offset:3px; }
a:focus-visible, button:focus-visible, summary:focus-visible{
  outline:2px solid var(--lapis);
  outline-offset:3px;
}
.visually-hidden{
  position:absolute; width:1px; height:1px; overflow:hidden;
  clip:rect(0 0 0 0); white-space:nowrap;
}

/* ---------- Masthead & navigation ---------- */
.masthead{
  text-align:center;
  padding:28px 20px 6px;
}
.monogram{
  font-family:var(--blackletter);
  font-size:30px;
  line-height:1;
  color:var(--surround-ink);
  text-decoration:none;
}
/* Red ribbon banner behind the menu (assets/ribbon.webp) */
.sitenav{
  position:relative;              /* no z-index: lets the ribbon sit behind the tabs */
  display:flex; flex-wrap:wrap; justify-content:center;
  gap:2px 24px;
  width:fit-content;
  max-width:calc(100% - 90px);
  margin:18px auto 32px;
  padding:6px 30px 4px;
}
.sitenav::before{
  content:"";
  position:absolute;
  /* stretched a little wider than the original artwork so the band fits a row of tabs */
  left:-24%; right:-24%;
  top:50%;
  aspect-ratio:640 / 118;
  transform:translateY(-27%);     /* centre the tabs on the middle of the band */
  background:url("assets/ribbon.webp") no-repeat center / 100% 100%;
  z-index:-1;
  pointer-events:none;
}
.sitenav a{
  position:relative;
  color:#f8ecd6;
  text-decoration:none;
  font-size:18px;
  padding:6px 2px;
  text-shadow:0 1px 2px rgba(50,10,4,.75);
}
.sitenav a:hover{ color:#fffaf0; text-decoration:underline; text-decoration-color:rgba(244,214,140,.75); text-underline-offset:4px; }
.sitenav a[aria-current="page"]{ color:#f6d784; }
.sitenav a[aria-current="page"]::before{
  content:"✦";
  position:absolute; left:50%; top:-3px;
  transform:translateX(-50%);
  font-size:9px;
  color:#f6d784;
}
.sitenav a:focus-visible{ outline-color:#f6d784; }
.masthead{ overflow-x:clip; }     /* keep the tails from causing sideways scroll on tiny phones */
@media (max-width:480px){
  .sitenav{ gap:0 9px; padding:5px 6px 3px; max-width:calc(100% - 80px); margin:16px auto 5px; }
  .sitenav::before{ left:-19%; right:-19%; aspect-ratio:600 / 118; }
  .sitenav a{ font-size:14px; }
}
@media (max-width:380px){
  .sitenav{ gap:0 7px; padding:5px 4px 3px; max-width:calc(100% - 70px); }
  .sitenav a{ font-size:13.5px; }
}

/* ---------- Illuminated page (the frame from the RSVP card) ---------- */
main{ padding:26px 16px 40px; }
.folio{
  max-width:820px;
  margin:0 auto;
  border-style:solid;
  border-width:78px;
  border-image:url("assets/frame.webp") 150 round;
  background-color:var(--parchment);
  background-image:linear-gradient(rgba(255,249,234,.25), rgba(255,249,234,.25)), url("assets/paper.jpg");
  background-size:auto, cover;
  background-position:center;
  background-repeat:no-repeat;
  background-origin:border-box;   /* one sheet of paper under the border too, so no seam */
  color:var(--ink);
  padding:8px 34px 30px;
  text-align:center;
  box-shadow:0 18px 40px -24px rgba(30,20,10,.55);
}
@media (max-width:640px){
  .folio{ border-width:46px; padding:4px 6px 18px; }
}
.page-title{
  font-family:var(--blackletter);
  font-size:clamp(46px, 8vw, 72px);
  line-height:1.05;
  color:var(--ink);
}
.lede{
  max-width:34em;
  margin:12px auto 0;
  color:var(--ink-soft);
  font-style:normal;
}
.trumpets{
  width:min(340px, 82%);
  height:auto;
  margin:22px auto 26px;
}

/* Entries on the details & registry pages */
.entry{ padding:4px 0 6px; }
.ornament{
  width:min(300px, 76%);
  height:auto;
  margin:26px auto 22px;
}
.entry h3{
  font-family:var(--blackletter);
  font-size:38px;
  line-height:1.1;
  color:var(--rubric);
  margin-bottom:8px;
}
.entry p{ margin:2px 0; }
.entry .when{ font-size:22px; }
.entry .aside{ color:var(--ink-soft); font-style:normal; }
.placeholder{ color:var(--lapis); }

/* ---------- Buttons ---------- */
.btn{
  display:inline-block;
  font-family:var(--hand);
  font-size:20px;
  line-height:1.2;
  color:#f6ead2;
  background:var(--rubric);
  border:0;
  padding:13px 34px 14px;
  text-decoration:none;
  cursor:pointer;
  box-shadow:inset 0 0 0 1px rgba(246,234,210,.45), inset 0 0 0 4px var(--rubric), inset 0 0 0 5px rgba(246,234,210,.35);
  transition:background-color .15s ease;
}
.btn:hover{ background:#82211a; }
.btn-quiet{
  color:var(--ink);
  background:transparent;
  box-shadow:inset 0 0 0 1px var(--ink), inset 0 0 0 4px transparent, inset 0 0 0 5px rgba(42,33,26,.35);
}
.btn-quiet:hover{ background:rgba(42,33,26,.06); }

/* ---------- Home ---------- */
.home{
  position:relative;
  max-width:1240px;
  margin:0 auto;
  padding:30px 20px 40px;
  min-height:calc(100vh - 220px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
.proclamation{ max-width:720px; }

.proclamation{
  text-align:center;
  color:var(--surround-ink);
}
.proclamation .call{ font-size:23px; }
  .proclamation .wedding{ font-size:clamp(56px, 17vw, 76px); }
  .proclamation .names{ font-size:clamp(30px, 9vw, 40px); }
}
.proclamation .call{ font-size:28px; margin:0; }
.proclamation h1{
  font-family:var(--blackletter);
  line-height:1;
}
.proclamation .wedding{
  display:block;
  font-size:clamp(76px, 10vw, 128px);
  line-height:.95;
}
.proclamation .of{
  display:block;
  font-size:30px;
  margin:6px 0 10px;
}
.proclamation .names{
  display:block;
  font-size:clamp(40px, 4.6vw, 58px);
  line-height:1.1;
}
.proclamation .trumpets{ margin:26px auto 18px; }
.proclamation .when{ font-size:23px; margin:0; }
.proclamation .where{ margin:2px 0 0; font-size:20px; }
.proclamation .follow{ margin:14px 0 0; font-style:normal; color:var(--surround-soft); }
.proclamation .rsvp-by{ margin:18px 0 0; font-size:22px; color:var(--rubric); }
.actions{
  display:flex; flex-wrap:wrap; justify-content:center;
  gap:14px;
  margin-top:30px;
}


/* the home page now sits inside the bordered page, which is narrower on phones */
@media (max-width:640px){
  .home-folio .proclamation .call{ font-size:19px; }
  .home-folio .proclamation .wedding{ font-size:clamp(46px, 14vw, 64px); }
  .home-folio .proclamation .names{ font-size:clamp(22px, 6.8vw, 32px); }
  .home-folio .proclamation .when{ font-size:18px; }
  .home-folio .proclamation .where, .home-folio .proclamation .follow{ font-size:16px; }
  .home-folio .proclamation .rsvp-by{ font-size:18px; }
}

/* ---------- RSVP ---------- */
.rsvp-layout{
  display:grid;
  grid-template-columns:200px minmax(0, 1fr);
  gap:34px;
  align-items:start;
  text-align:left;
  margin-top:8px;
}
.rsvp-layout .lovers{ width:100%; height:auto; }
@media (max-width:640px){
  .rsvp-layout{ grid-template-columns:1fr; gap:10px; }
  .rsvp-layout .lovers{ width:150px; margin:0 auto; }
}
.rsvp-form{ display:flex; flex-direction:column; gap:18px; }
.field label{
  display:block;
  font-size:17px;
  color:var(--ink-soft);
  margin-bottom:2px;
}
.field input, .field select{
  width:100%;
  font:inherit;
  font-size:20px;
  color:var(--ink);
  background:rgba(255,250,238,.45);
  border:0;
  border-bottom:1.5px solid var(--ink);
  border-radius:0;
  padding:8px 10px 6px;
}
.field input:focus, .field select:focus{
  outline:none;
  background:rgba(255,250,238,.8);
  border-bottom-color:var(--lapis);
  box-shadow:0 1.5px 0 var(--lapis);
}
.rsvp-form .btn{ align-self:flex-start; margin-top:8px; }
.rsvp-confirm{
  font-size:22px;
  color:var(--verdigris);
  margin:10px 0 0;
}
.rsvp-error{ color:var(--rubric); margin:12px 0 0; }
.btn[disabled]{ opacity:.7; cursor:progress; }
.fine{ font-size:15px; color:var(--ink-soft); margin-top:24px; }

.celebration{
  position:fixed; inset:0;
  width:100%; height:100%;
  z-index:900;
  pointer-events:none;
}

.dance-floor{
  position:fixed; inset:0;
  z-index:901;
  pointer-events:none;
  overflow:hidden;
}
.dancer{
  position:absolute;
  height:auto;
  transition:transform .7s cubic-bezier(.2,.9,.3,1.2);
}
.dog{ bottom:-6px; width:clamp(170px, 28vw, 340px); transform:translateY(110%); }
.dog-1{ left:20%; margin-left:calc(clamp(170px, 28vw, 340px) / -2); }
.dog-2{ left:50%; margin-left:calc(clamp(170px, 28vw, 340px) / -2); transition-delay:.15s; }
.dog-3{ left:80%; margin-left:calc(clamp(170px, 28vw, 340px) / -2); transition-delay:.3s; }
.cat{ bottom:-4px; width:clamp(130px, 22vw, 260px); }
.cat-left{ left:0; transform:translateX(-105%); }
.cat-right{ right:0; transform:translateX(105%) scaleX(-1); }
.is-on .dog{ transform:translateY(0); }
.is-on .dog-2{ transform:translateY(0) scaleX(-1); }
.is-on .cat-left{ transform:translateX(0); }
.is-on .cat-right{ transform:translateX(0) scaleX(-1); }
/* the top crew, right side up, dropping in from above */
.dog-top{ top:0; bottom:auto; transform:translateY(-110%); }
.cat-top{ top:0; bottom:auto; }
.cat-tl{ left:0; transform:translateX(-105%); }
.cat-tr{ right:0; left:auto; transform:translateX(105%) scaleX(-1); }
.dog-top.dog-1{ transition-delay:.45s; }
.dog-top.dog-2{ transition-delay:.6s; }
.dog-top.dog-3{ transition-delay:.75s; }
.cat-top{ transition-delay:.3s; }
.is-on .dog-top{ transform:translateY(0); }
.is-on .dog-top.dog-2{ transform:translateY(0) scaleX(-1); }
.is-on .cat-tl{ transform:translateX(0); }
.is-on .cat-tr{ transform:translateX(0) scaleX(-1); }

@media (max-width:640px){
  .dog-1, .dog-3{ display:none; }
}

/* ---------- Registry: honeymoon fund buttons ---------- */
.fund-links{
  display:flex; flex-wrap:wrap; justify-content:center;
  gap:12px 14px;
  margin:16px 0 6px;
}
.fund-links .btn{ min-width:132px; text-align:center; }
@media (max-width:480px){ .fund-links .btn{ min-width:0; width:100%; max-width:220px; } }

/* ---------- Travel ---------- */
.venue{ margin-top:22px; }
/* extra room where the rabbit divider used to sit */
.lede + .rsvp-layout, .lede + .entry{ margin-top:30px; }

.venue p{ margin:2px 0; }
.venue .name{ font-family:var(--blackletter); font-size:36px; color:var(--rubric); line-height:1.15; margin-bottom:6px; }
.map{
  margin:28px 0 6px;
  padding:5px;
  border:1px solid var(--ink);
  outline:1px solid var(--rule);
  outline-offset:3px;
}
.map iframe{ display:block; width:100%; height:380px; border:0; filter:sepia(.25); }
.directions{ margin-top:18px; }

/* ---------- FAQ ---------- */
.faq{ text-align:left; max-width:560px; margin:0 auto; }
.faq details{ border-top:1px solid var(--rule); }
.faq details:last-child{ border-bottom:1px solid var(--rule); }
.faq summary{
  list-style:none;
  cursor:pointer;
  display:flex; gap:12px; align-items:baseline;
  padding:14px 4px;
  font-size:21px;
  color:var(--ink);
}
.faq summary::-webkit-details-marker{ display:none; }
.faq summary::before{
  content:"✦";
  color:var(--rubric);
  font-size:13px;
  flex:none;
  transition:transform .2s ease;
}
.faq details[open] summary::before{ transform:rotate(45deg); }
.faq-contact{ margin-top:30px; text-align:center; }
.faq-contact h3{
  font-family:var(--blackletter);
  font-size:32px;
  line-height:1.1;
  color:var(--rubric);
  margin-bottom:6px;
}
.faq-contact p{ margin:0; }
.faq-contact a{ white-space:nowrap; }
.faq .answer{ padding:0 4px 16px 27px; margin:0; color:var(--ink-soft); }

/* ---------- Travel ---------- */
.riders{
  width:min(250px, 64%);
  height:auto;
  margin:26px auto 0;
}

/* ---------- FAQ dragon ---------- */
.faq-layout{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 190px;
  gap:24px;
  align-items:start;
  max-width:640px;
  margin:0 auto;
}
.faq-layout .faq{ grid-column:1; grid-row:1; margin:0; max-width:none; }
.faq-layout .dragon{ grid-column:2; grid-row:1; width:100%; height:auto; margin-top:-6px; }
@media (max-width:640px){
  .faq-layout{ grid-template-columns:1fr; }
  .faq-layout .dragon{ grid-column:1; grid-row:2; width:150px; margin:10px auto 0; }
}

/* ---------- Footer ---------- */
footer{
  /* equal side columns keep the names dead center whatever the creatures' widths */
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:clamp(6px, 2vw, 24px);
  text-align:center;
  padding:16px 16px 46px;
  color:var(--surround-soft);
  font-size:16px;
}
.footer-text{ min-width:0; }
.fc-skeleton, .fc-wraith{ justify-self:end; }
.fc-gargoyle, .fc-bat{ justify-self:start; }
/* a creature on either side of the footer, facing the middle */
.footer-creature{ flex:none; height:auto; pointer-events:none; }
.fc-skeleton{ width:clamp(90px, 18vw, 170px); transform:rotate(4deg) scaleX(-1); }
.fc-gargoyle{ width:clamp(56px, 11vw, 104px); transform:rotate(-3deg); }
.fc-wraith{ width:clamp(90px, 18vw, 170px); transform:rotate(-6deg); }
.fc-bat{ width:clamp(80px, 15vw, 145px); transform:rotate(8deg) scaleX(-1); }
@media (max-width:480px){
  footer{ gap:6px; padding-left:8px; padding-right:8px; }
  footer .monogram{ font-size:23px; white-space:nowrap; }
  footer .footer-ornament{ width:140px; }
  .footer-text{ font-size:15px; white-space:nowrap; }
  .fc-skeleton, .fc-wraith{ width:72px; }
  .fc-bat{ width:64px; }
  .fc-gargoyle{ width:44px; }
}
.footer-ornament{
  width:190px;
  max-width:100%;
  height:auto;
  margin:0 auto 10px;
}
footer .monogram{ display:block; font-size:28px; margin-bottom:4px; }

/* ---------- Scroll-unrolling page transition (driven by scroll.js) ---------- */
.scroll-veil{
  position:fixed; inset:0;
  z-index:1000;
  pointer-events:none;
}
.veil{
  position:absolute; left:0; right:0;
  height:50%;
  background-color:#b08a5c;
  background-image:url("assets/paper.jpg");
  background-size:cover;
  background-blend-mode:multiply;
}
.veil-top{ box-shadow:inset 0 -40px 50px -30px rgba(40,22,6,.55); }
.veil-bottom{ box-shadow:inset 0 40px 50px -30px rgba(40,22,6,.55); }
.veil-top{ top:0; }
.veil-bottom{ bottom:0; }
.rod{
  position:absolute; left:50%;
  width:min(88vw, 960px);
  height:24px;
  margin-left:calc(min(88vw, 960px) / -2);
  border-radius:12px;
  background:linear-gradient(180deg, #4a2d15 0%, #9c6a3a 30%, #c89660 45%, #8a5a2e 70%, #3f2511 100%);
  box-shadow:0 6px 14px rgba(0,0,0,.45);
}
.rod::before, .rod::after{
  content:"";
  position:absolute; top:50%;
  width:30px; height:30px;
  margin-top:-15px;
  border-radius:50%;
  background:radial-gradient(circle at 35% 35%, #f4dc8a, #c4952e 55%, #7a5512 100%);
  box-shadow:0 2px 6px rgba(0,0,0,.4);
}
.rod::before{ left:-22px; }
.rod::after{ right:-22px; }
.veil-top .rod{ bottom:-12px; }
.veil-bottom .rod{ top:-12px; }

/* opening: the rolled scroll rests a beat, unrolls, then the rods fall away */
.is-opening .veil-top{ animation:unroll-up 1.05s cubic-bezier(.55,0,.25,1) both; }
.is-opening .veil-bottom{ animation:unroll-down 1.05s cubic-bezier(.55,0,.25,1) both; }
@keyframes unroll-up{
  0%,14%{ transform:translateY(0); opacity:1; }
  80%{ transform:translateY(-100%); opacity:1; }
  100%{ transform:translateY(-100%); opacity:0; }
}
@keyframes unroll-down{
  0%,14%{ transform:translateY(0); opacity:1; }
  80%{ transform:translateY(100%); opacity:1; }
  100%{ transform:translateY(100%); opacity:0; }
}
/* closing: the scroll rolls back up to the middle */
.is-closing .veil-top{ animation:roll-down .52s cubic-bezier(.5,0,.75,0) both; }
.is-closing .veil-bottom{ animation:roll-up .52s cubic-bezier(.5,0,.75,0) both; }
@keyframes roll-down{ from{ transform:translateY(-100%); } to{ transform:translateY(0); } }
@keyframes roll-up{ from{ transform:translateY(100%); } to{ transform:translateY(0); } }

@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; }
}
