/* Darrel & Lemlie wedding site. Shared by every page: fonts, colours, the wallpaper page and the pinned Back button. */

@font-face { font-family: "Bellefair"; src: url("../fonts/Bellefair-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pinyon Script"; src: url("../fonts/PinyonScript-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../fonts/Cormorant-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --burgundy: #560d1a;
  --burgundy-ink: #631523;
  --olive-deep: #33371a;
  --pearl: #f7f2ea;
  --ink: #3b3226;
  --silver-foil: linear-gradient(115deg, #8b9096 0%, #f4f5f6 28%, #a4a8ae 46%, #e9ebed 64%, #8f949a 82%, #dfe2e4 100%);
  --display: "Bellefair", "Times New Roman", serif;
  --serif: "Cormorant", Georgia, serif;
  --script: "Pinyon Script", cursive;
  --label: "Montserrat", "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* --u is one design pixel. Every size on the site is a number times --u.
     Phones show the approved 390px design scaled to their own width, so text wraps exactly as approved on every phone.
     From 760px up the desktop design is used at its true size. */
  --u: 1px;
  --wall: 440;
}
@supports (width: min(1px, 2px)) {
  :root { --u: calc(min(100vw, 520px) / 390); }
}
@media (min-width: 760px) {
  :root { --u: 1px; --wall: 815; }
}

*, *::before, *::after { box-sizing: border-box; }
html { background: #efe2d1; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: var(--serif); font-weight: 500; color: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
img { display: block; }

/* the damask wallpaper, toned down very slightly so it sits behind the stationery */
.page {
  position: relative; overflow: hidden; min-height: 100vh;
  background-color: #efe2d1;
  background-image: linear-gradient(rgba(88, 62, 40, .027), rgba(88, 62, 40, .027)), url("../img/wallpaper.jpg");
  background-image: linear-gradient(rgba(88, 62, 40, .027), rgba(88, 62, 40, .027)), image-set(url("../img/wallpaper.webp") type("image/webp"), url("../img/wallpaper.jpg") type("image/jpeg"));
  background-position: 0 0, center top;
  background-size: 100% 100%, calc(var(--wall) * var(--u)) auto;
  background-repeat: no-repeat, repeat;
}

/* the one way back: a button pinned to the bottom of the screen on every inner page. It is never animated.
   48 design pixels tall: on a 360px-wide phone that is 44px, the smallest size that is still comfortable to tap. */
.stick {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; display: flex; justify-content: center; pointer-events: none;
  padding: calc(30 * var(--u)) calc(16 * var(--u)) calc(16 * var(--u));
  padding-bottom: calc(16 * var(--u) + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(240, 228, 212, 0) 0%, rgba(240, 228, 212, .95) 46%);
}
.pill {
  pointer-events: auto; position: relative; display: flex; align-items: center; justify-content: center; gap: calc(11 * var(--u));
  width: 100%; max-width: calc(300 * var(--u)); height: calc(48 * var(--u)); border-radius: calc(24 * var(--u));
  font-family: var(--display); font-size: calc(14.5 * var(--u)); text-transform: uppercase; letter-spacing: .16em; white-space: nowrap;
  text-decoration: none; color: var(--pearl); background: linear-gradient(180deg, #671422 0%, #490a15 100%);
  box-shadow: 0 0 0 1.5px rgba(206, 210, 214, .95), 0 2px 3px rgba(40, 10, 14, .45), 0 9px 20px rgba(40, 10, 14, .34);
  -webkit-tap-highlight-color: transparent; transition: transform .15s ease, filter .15s ease;
}
.pill::after {
  content: ""; position: absolute; top: calc(4 * var(--u)); right: calc(4 * var(--u)); bottom: calc(4 * var(--u)); left: calc(4 * var(--u));
  border-radius: calc(20 * var(--u)); border: 1px solid rgba(214, 218, 222, .42);
}
.pill svg { flex: none; width: calc(21 * var(--u)); height: calc(9.6 * var(--u)); margin-top: -1px; transition: transform .2s ease; }
.pill:active { transform: scale(.975); filter: brightness(.9); }
.pill:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (hover: hover) {
  .pill:hover { filter: brightness(1.14); }
  .pill:hover svg { transform: translateX(-3px); }
}
@media (min-width: 760px) {
  .stick { background: radial-gradient(34% 100% at 50% 100%, rgba(240, 228, 212, .95) 0%, rgba(240, 228, 212, .8) 45%, rgba(240, 228, 212, 0) 100%); }
}
