/* All resources are local. This page also works when index.html is opened directly. */
@font-face {
  font-family: "Philosopher Invitation";
  src: url("assets/philosopher.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --olive: #595e39;
  --paper: #f8f8f4;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--paper); }

body {
  position: relative;
  margin: 0;
  min-width: 280px;
  color: var(--olive);
  background: var(--paper) url("assets/paper.jpg") center / cover fixed;
  font-family: "Philosopher Invitation", Georgia, "Times New Roman", serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

.botanicals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.branch { position: absolute; height: auto; }

.branch-top {
  width: clamp(220px, 23vw, 385px);
  top: -16%;
  right: -4%;
  transform: rotate(165deg);
}

.branch-bottom {
  width: clamp(200px, 21vw, 350px);
  bottom: -18%;
  left: -4.5%;
  transform: scaleX(-1) rotate(-8deg);
}

.invitation {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 90px 28px;
  text-align: center;
}

.invitation-content { width: min(100%, 800px); }

.names { margin: 0; font-size: inherit; font-weight: 400; }

.logo {
  display: block;
  width: min(100%, 690px);
  height: auto;
  margin-inline: auto;
}

.date {
  margin: 28px 0 0;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  line-height: 1.35;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 28px auto 23px;
}

.ornament span { width: 56px; height: 1px; background: #999e7c; opacity: .45; }
.ornament img { display: block; width: 36px; height: 36px; }

.notice {
  max-width: 470px;
  margin: 0 auto;
  font-size: 1.1875rem;
  line-height: 1.7;
  text-wrap: pretty;
}

.closing { margin: 22px 0 0; font-size: 1.125rem; line-height: 1.5; }

@media (min-width: 541px) and (max-width: 1000px) {
  .invitation-content { width: min(100%, 660px); }
  .logo { width: 90%; }
  .branch-top { width: 180px; right: -8%; top: -100px; }
  .branch-bottom { width: 160px; left: -8%; bottom: -100px; }
}

@media (max-width: 540px) {
  body { background-attachment: scroll; }
  .invitation { padding: 100px 32px 105px; }
  .invitation-content { max-width: 340px; }
  .logo { width: 215px; }
  .date { margin-top: 24px; font-size: 1.5rem; }
  .ornament { margin: 18px auto 16px; gap: 13px; }
  .ornament img { width: 30px; height: 30px; }
  .ornament span { width: 35px; }
  .notice { max-width: 300px; font-size: 1.0625rem; line-height: 1.65; }
  .closing { margin-top: 20px; font-size: 1.0625rem; }
  .branch-top { width: 150px; top: -115px; right: -55px; }
  .branch-bottom { width: 155px; bottom: -115px; left: -57px; }
}

@media (max-width: 350px) {
  .invitation { padding: 72px 28px 85px; }
  .logo { width: 165px; }
  .date { margin-top: 20px; font-size: 1.375rem; }
  .ornament { margin: 14px auto; }
  .branch-bottom { width: 130px; left: -70px; bottom: -105px; }
}

@media (max-height: 500px) and (min-width: 541px) {
  .invitation { padding-block: 48px; }
  .logo { width: min(68%, 470px); }
  .date { margin-top: 18px; font-size: 1.5rem; }
  .ornament { margin: 12px auto; }
  .notice { font-size: 1.0625rem; }
  .closing { margin-top: 14px; }
  .branch { width: 170px; }
}
