/* The brand's tokens and the page's foundations: type roles, buttons, the header and the sticky
   bar. Carmine on bright paper, Bodoni for display, Instrument Sans for reading. Italic Bodoni
   carries what is personal (the name, the couple's side of a sentence). */

:root {
  --paper: #fbfaf7;
  --ink: #15131a;
  --carmine: #c8102e;
  --stone: #f3efe9;
  --stamp-paper: #fffefb;
  --rule: rgb(21 19 26 / 0.16);

  --display: "Bodoni Moda", "Didot", Georgia, serif;
  --body: "Instrument Sans", system-ui, sans-serif;

  --gutter: 20px;
  --measure: 1240px;
}
@media (max-width: 370px) {
  :root {
    --gutter: 16px;
  }
}
@media (min-width: 900px) {
  :root {
    --gutter: 48px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* The postmark's lines run off the page edge on purpose; clipping keeps them from adding a
   sideways scroll. */
html {
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
figure,
ol,
ul {
  margin: 0;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.display {
  font-family: var(--display);
  font-weight: 800;
  font-variation-settings: "opsz" 24;
  letter-spacing: -0.01em;
  line-height: 0.98;
  text-wrap: balance;
}
/* The personal half of a headline: italic, in carmine. */
.display em {
  color: var(--carmine);
  font-style: italic;
  font-weight: 700;
}
/* A section heading turns on its italic half: that half starts its own line. */
h2.display em {
  display: block;
}

.label {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: "opsz" 9;
  font-size: 12px;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

/* The discount code: bold, spaced, with a carmine perforated rule under it. */
.code {
  border-bottom: 1.5px dashed var(--carmine);
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 30px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font: 600 17px/1 var(--body);
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease;
}
.button:hover {
  background: var(--carmine);
}
.button:active {
  transform: translateY(1px);
}
.button:focus-visible,
.link:focus-visible {
  outline: 2px solid var(--carmine);
  outline-offset: 3px;
}
.button.small {
  min-height: 44px;
  padding: 0 16px;
  font-size: 15px;
}

.link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.link:hover {
  color: var(--carmine);
}

/* Header: the wordmark and one button. The name sits on two rows on a phone, one row wider. */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 14px var(--gutter);
}
/* The link is at least 44px tall for a thumb; --h is the height the name is drawn at. */
.wordmark {
  --h: 36px;
  --ratio: 3.4296;
  display: block;
  flex: none;
  width: calc(var(--h) * var(--ratio));
  height: max(44px, var(--h));
  background: url("../logo/stacked-ink.svg") left center / auto var(--h) no-repeat;
}
@media (min-width: 560px) {
  .wordmark {
    --h: 26px;
    --ratio: 9.6361;
    background-image: url("../logo/compact-ink.svg");
  }
}
@media (min-width: 900px) {
  .bar {
    padding-top: 26px;
    padding-bottom: 26px;
  }
  .wordmark {
    --h: 32px;
  }
}

/* Sticky button bar, phone only, shown by js/sticky.js once the hero's button has gone. */
.sticky {
  position: fixed;
  inset: auto 0 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-top: 1px solid var(--rule);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.sticky[hidden] {
  display: none;
}
.sticky p {
  font: 700 15px/1.2 var(--display);
  font-variation-settings: "opsz" 11;
}
@media (min-width: 900px) {
  .sticky,
  .sticky:not([hidden]) {
    display: none;
  }
}
