@font-face {
  font-family: Instrument;
  src: url("/assets/instrument.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: Instrument;
  src: url("/assets/instrument-italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: DM;
  src: url("/assets/dm.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  --paper: #f6f3e9;
  --ink: #1b3f39;
  --muted: #54675c;
  --clay: #a45e4e;
  --serif: Instrument, Georgia, serif;
  --sans: DM, Arial, sans-serif;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
}
button,
input,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.62;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 3px solid #d38d50;
  outline-offset: 5px;
}
button {
  border: 0;
  background: none;
}
a,
button {
  -webkit-tap-highlight-color: transparent;
}
img {
  display: block;
  max-width: 100%;
}
[hidden] {
  display: none !important;
}
.wrap {
  width: min(1220px, calc(100% - clamp(44px, 9vw, 160px)));
  margin-inline: auto;
}
.skip {
  position: fixed;
  left: 12px;
  top: -90px;
  z-index: 10;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 12px;
}
header {
  background: var(--paper);
}
.topbar,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar {
  min-height: 78px;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 38px/0.95 var(--serif);
  letter-spacing: -1.7px;
}
.brand-mark {
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  outline: 1px solid #215249;
  outline-offset: 2px;
  border-radius: 50%;
  width: 31px;
  height: 31px;
  margin: 3px 3px 3px 1px;
  font: 28px/1 Georgia;
}
.navlinks {
  margin-left: auto;
  display: flex;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
}
.navlinks a:hover,
.plain:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
#snow-toggle {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 40px;
  font-size: 13px;
  padding-inline: 3px;
}
#snow-toggle span {
  font: 18px/1 Georgia, serif;
}
#snow-toggle[aria-pressed="false"] {
  color: var(--muted);
  text-decoration: line-through;
}
#snowfall {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 4;
}
#snowfall i {
  position: absolute;
  top: -18px;
  color: #fffdf1;
  font: 12px/1 Georgia, serif;
  animation: snow-drift linear infinite;
}
#snowfall i:empty {
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: currentColor;
}
#snowfall.paused i {
  animation-play-state: paused;
}
@keyframes snow-drift {
  0% { transform: translate3d(0, 0, 0) rotate(-12deg); }
  52% { transform: translate3d(var(--drift), 54vh, 0) rotate(15deg); }
  100% { transform: translate3d(0, calc(100vh + 24px), 0) rotate(38deg); }
}
.small-button,
.solid-button,
.cream-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 650;
  transition:
    background 0.2s,
    transform 0.2s;
}
.small-button,
.solid-button {
  background: var(--ink);
  color: #fff9e9;
}
.small-button {
  padding: 10px 19px;
}
.small-button span {
  font-size: 18px;
  line-height: 1;
}
.small-button:hover,
.solid-button:hover {
  background: #30574c;
}
.cream-button {
  background: #f8ecd3;
  color: #173b34;
  padding: 16px 24px;
  box-shadow: 0 3px 0 #0001;
}
.cream-button:hover {
  background: #fff5dd;
  transform: translateY(-2px);
}
.envelope {
  position: relative;
  width: 20px;
  height: 14px;
  display: inline-block;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  overflow: hidden;
}
.envelope:before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 2.2px;
  top: -7px;
  border: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.hero {
  position: relative;
  background: #1b4541 url("/assets/night.webp") center bottom/100% 100%
    no-repeat;
  color: #f8efda;
  overflow: hidden;
}
.hero-layout {
  min-height: clamp(505px, 42vw, 630px);
  padding-block: 65px 58px;
  display: grid;
  grid-template-columns: 0.85fr 1.2fr;
  align-items: center;
  gap: clamp(30px, 6vw, 100px);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
.card-name {
  font-family: var(--serif);
  font-weight: 400;
}
.intro h1 {
  font-size: clamp(86px, 8.6vw, 140px);
  line-height: 0.84;
  letter-spacing: -0.038em;
  margin: 0 0 26px;
}
.intro h1 em {
  color: #bfdbcf;
  font-weight: 400;
}
.intro > p {
  color: #e1e7da;
  max-width: 340px;
  font-size: clamp(15px, 1.18vw, 18px);
  line-height: 1.58;
  margin: 0 0 28px;
}
.display {
  position: relative;
  min-width: 0;
  padding: 5px 7px 0;
  max-width: 660px;
  width: 100%;
  justify-self: end;
}
.postcard {
  position: relative;
  isolation: isolate;
  padding: clamp(9px, 1.05vw, 16px);
  padding-bottom: 0;
  background: #f9f2df;
  border-radius: 2px;
  transform: rotate(2.7deg);
  box-shadow:
    0 22px 32px -10px #041f2080,
    0 1px 3px #0d222266;
}
.postcard:before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8px 7px -5px -6px;
  background: #e6ddc7;
  transform: rotate(-2deg);
  box-shadow: 0 3px 9px #0b262b52;
}
.postcard:after {
  content: "";
  position: absolute;
  inset: 0;
  background: #f6efdb;
  border-radius: 2px;
  z-index: -1;
}
.picture {
  position: relative;
  overflow: hidden;
  background: #a5bfbe;
  aspect-ratio: 1200/746;
}
.picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.picture canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
  transition: opacity 0.75s ease;
}
.picture canvas:focus-visible {
  outline-offset: -4px;
}
.picture.thawed canvas {
  opacity: 0;
  pointer-events: none;
}
#swipe-hint {
  pointer-events: none;
  position: absolute;
  left: 50%;
  bottom: 11%;
  transform: translateX(-50%);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  color: #fff9e6;
  background: #173c3bcf;
  border: 1px solid #e3eed773;
  border-radius: 30px;
  font-size: 12px;
  letter-spacing: 0.025em;
  transition: opacity 0.2s;
}
.swipe-icon {
  font-size: 19px;
  line-height: 1;
}
.picture.working #swipe-hint,
.picture.thawed #swipe-hint {
  opacity: 0;
}
.postcard-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: clamp(59px, 5vw, 78px);
  gap: 10px;
  padding: 4px 2px;
  color: #294d46;
}
.lettering {
  min-width: 0;
}
.lettering > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lettering > span:first-child {
  font: italic clamp(22px, 2.05vw, 32px)/1.15 var(--serif);
}
.sender {
  font-size: 10px;
  letter-spacing: 0.025em;
  color: #5d6a60;
}
.postage {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
}
.postage img,
.large-stamp {
  height: 52px;
  width: 43px;
  object-fit: cover;
  mask:
    radial-gradient(circle at 3px 0, transparent 2px, #000 2.5px) 0 0/6px 51%,
    radial-gradient(circle at 3px 100%, transparent 2px, #000 2.5px) 0 100%/6px
      51%;
  mask-repeat: repeat-x;
}
.cancel-lines {
  font: 20px/0.22 Georgia;
  letter-spacing: -3px;
  color: #62736a;
  transform: rotate(-8deg);
  margin-right: -3px;
}
.postmark {
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 49px;
  height: 49px;
  border: 1px solid #6d8072;
  outline: 1px solid #6d80727a;
  outline-offset: -4px;
  border-radius: 50%;
  font: 6px/1.3 var(--sans);
  letter-spacing: 0.08em;
  color: #52685b;
  transform: rotate(-15deg);
  margin-right: -6px;
}
.postmark b {
  font: 17px/1.3 Georgia;
}
.display-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #d4e0d1;
  margin-top: 28px;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.display-caption button {
  font: inherit;
  color: inherit;
  padding: 4px 0;
  text-decoration: underline;
  text-decoration-color: #91a99c;
  text-underline-offset: 3px;
}
.caption-sep {
  opacity: 0.65;
}
.caption-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #dcb578;
}
.airmail {
  height: 5px;
  background: repeating-linear-gradient(
    125deg,
    #b57361 0 14px,
    #ebe5cf 14px 30px,
    #758b85 30px 44px,
    #ebe5cf 44px 60px
  );
}
.collection {
  padding-top: clamp(40px, 4.4vw, 74px);
  padding-bottom: clamp(46px, 5vw, 80px);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.section-head h2,
.how h2 {
  font-size: clamp(43px, 4.2vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.032em;
  margin: 0;
}
.section-head p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 32px);
}
.scene-card {
  padding: 0;
  text-align: left;
}
.thumbnail {
  position: relative;
  aspect-ratio: 1.6;
  overflow: hidden;
  background: #d3d9cf;
  border-radius: 3px;
}
.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.scene-card:hover img {
  transform: scale(1.035);
}
.card-name {
  display: block;
  font-size: clamp(24px, 2.1vw, 34px);
  margin: 8px 0 0;
}
.scene-open {
  position: absolute;
  right: 11px;
  bottom: 11px;
  background: var(--paper);
  border-radius: 50%;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  font-size: 15px;
}
.how {
  border-top: 1px solid #ced2c4;
  padding-block: 40px;
}
.how-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
}
.how h2 {
  font-size: 42px;
}
.how ol {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}
.how li {
  padding: 2px 0 8px 6px;
  font-size: 14px;
}
.how strong {
  color: var(--ink);
}
footer {
  border-top: 1px solid #ced2c4;
}
.footer-inner {
  min-height: 70px;
}
.footer-inner .brand {
  font-size: 27px;
}
.footer-inner button,
.plain {
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
dialog {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid #d3d2bc;
  border-radius: 9px;
  width: min(490px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  box-shadow: 0 25px 80px #09292363;
}
dialog::backdrop {
  background: #0d2527ad;
  backdrop-filter: blur(4px);
}
body:has(dialog[open]) {
  overflow: hidden;
}
.dialog-inner {
  padding: 32px;
  position: relative;
}
.dialog-inner h2 {
  font-size: 46px;
  letter-spacing: -0.035em;
  line-height: 1.07;
  margin: 0 25px 24px 0;
}
.close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 34px;
  height: 34px;
  font: 26px/1 var(--sans);
  border-radius: 50%;
}
.close:hover {
  background: #e8e7db;
}
fieldset {
  border: 0;
  margin: 0 0 18px;
  padding: 0;
}
legend,
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
legend {
  padding: 0;
  margin-bottom: 7px;
}
.options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}
.options button {
  min-width: 0;
  padding: 4px;
  border: 1px solid #c4cabc;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.55;
}
.options button[aria-pressed="true"] {
  border: 2px solid var(--ink);
  padding: 3px;
  background: #e1e9df;
}
.options img,
.upload-img {
  display: block;
  width: 100%;
  height: 40px;
  object-fit: cover;
  border-radius: 2px;
}
.upload-img {
  display: grid;
  place-items: center;
  background: #e7e9de center/cover;
  font-size: 24px;
  font-weight: 400;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
input,
textarea {
  width: 100%;
  border: 1px solid #bbc5b7;
  border-radius: 4px;
  padding: 10px 11px;
  background: #fffdf4;
  color: var(--ink);
  font: 15px/1.4 var(--sans);
  margin-top: 4px;
}
textarea {
  resize: vertical;
  min-height: 83px;
}
input:focus,
textarea:focus {
  outline: 2px solid #577b6e;
  outline-offset: 1px;
}
.form-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}
.solid-button {
  width: 100%;
  min-height: 46px;
  margin-top: 16px;
}
.error {
  margin: 8px 0 0;
  color: #934333;
  font-size: 13px;
}
.error:empty {
  display: none;
}
#sealed {
  text-align: center;
}
#sealed label {
  text-align: left;
}
#sealed h2 {
  margin: 12px 0;
}
#sealed p,
#about p {
  font-size: 15px;
}
.large-stamp {
  width: 57px;
  height: 70px;
  display: inline-block;
  transform: rotate(7deg);
}
.plain {
  display: inline-block;
  margin: 15px 6px 0;
}
.received-note {
  min-width: 0;
  width: 100%;
  max-width: 440px;
  perspective: 1000px;
}
.letter-paper {
  --rim: clamp(20px, 2.5vw, 38px);
  position: relative;
  padding: 19px var(--rim) 26px;
  color: #25463e;
  background:
    linear-gradient(28deg, transparent 72%, #c5b99c22),
    linear-gradient(to bottom, #fff8e8, #f7eed9 49.5%, #e2d8bf 50%, #f3ead6 51%, #f9f2e0 61%);
  box-shadow: 0 14px 26px -13px #081e20a8, 0 1px 3px #142d244f;
  transform-origin: center top;
  animation: unfold-letter 1.45s cubic-bezier(.22,.67,.21,1) both;
}
.letter-paper::before {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: 16px;
  height: 16px;
  background: linear-gradient(45deg, #dfd2b8 48%, #9fa99c 49%, #254c43 52%, #264b42);
}
.letter-ornament {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #8e7850;
  padding-bottom: 12px;
  font: 16px/1 Georgia, serif;
}
.letter-ornament::before, .letter-ornament::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #b5a47e80;
}
.received-note p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  font: clamp(23px, 2.1vw, 30px)/1.3 var(--serif);
  text-align: start;
}
.received-note #note-sign {
  margin-top: 16px;
  font: italic 21px/1.3 var(--serif);
  color: #586953;
}
#reply {
  float: right;
  margin-top: 6px;
  padding: 8px 0 8px 9px;
  color: #e5e7d8;
  font-size: 12px;
  text-underline-offset: 4px;
  animation: appear-reply .4s ease-out backwards;
}
#reply span { margin-right: 4px; }
#reply:hover { text-decoration: underline; }
@keyframes appear-reply {
  from { opacity: 0; }
}
@keyframes unfold-letter {
  0% { clip-path: inset(0 0 88%); transform: rotateX(-53deg) translateY(12px); opacity: 0; }
  24% { opacity: 1; }
  65% { clip-path: inset(0 0 8%); transform: rotateX(4deg) translateY(0); }
  100% { clip-path: inset(0); transform: rotateX(0); }
}
@media (min-width: 761px) {
  .hero-layout:has(.received-note:not([hidden])) {
    grid-template-areas: "intro display" "letter display";
    grid-template-rows: auto auto;
    align-content: center;
    row-gap: 18px;
  }
  .hero-layout:has(.received-note:not([hidden])) .intro {
    grid-area: intro;
    align-self: end;
  }
  .hero-layout:has(.received-note:not([hidden])) .intro h1 { margin-bottom: 0; }
  .hero-layout:has(.received-note:not([hidden])) .display { grid-area: display; }
  .received-note { grid-area: letter; align-self: start; }
}
.recipient .navlinks, .recipient .topbar .small-button,
.recipient .collection, .recipient .how {
  display: none;
}
.recipient .intro h1 {
  font-size: clamp(48px, 5.4vw, 82px);
  line-height: 0.98;
  overflow-wrap: anywhere;
}
.recipient .hero-layout {
  grid-template-columns: 0.88fr 1.15fr;
  min-height: max(520px, calc(100svh - 154px));
}
.recipient .received-note {
  padding-bottom: 38px;
  position: relative;
}
.recipient #reply {
  position: absolute;
  right: 0;
}
@media (max-width: 760px) {
  .wrap {
    width: calc(100% - 40px);
  }
  .topbar {
    min-height: 63px;
    gap: 10px;
  }
  #snow-toggle { margin-left: auto; }
  #snowfall i:nth-child(n+27) { display: none; }
  .brand {
    font-size: 32px;
  }
  .brand-mark {
    width: 25px;
    height: 25px;
    font-size: 23px;
  }
  .small-button {
    font-size: 12px;
    padding: 8px 12px;
  }
  .navlinks {
    display: none;
  }
  .hero-layout,
  .recipient .hero-layout {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 34px 0 24px;
  }
  .intro {
    text-align: center;
  }
  .intro h1 {
    font-size: clamp(65px, 13.3vw, 95px);
    line-height: 0.96;
    margin: 0 0 12px;
  }
  .intro h1 br {
    display: none;
  }
  .intro h1 em:before {
    content: " ";
  }
  .intro > p {
    max-width: 330px;
    margin: 0 auto 16px;
    font-size: 14px;
    line-height: 1.52;
  }
  .cream-button {
    padding: 10px 17px;
    font-size: 13px;
  }
  .display {
    max-width: 470px;
    justify-self: center;
    padding-inline: 7px;
  }
  .postcard {
    transform: rotate(2deg);
  }
  .postcard-foot {
    min-height: 55px;
  }
  .postage img {
    height: 40px;
    width: 34px;
  }
  .postmark {
    height: 39px;
    width: 39px;
    font-size: 5px;
  }
  .postmark b {
    font-size: 14px;
  }
  .display-caption {
    margin-top: 17px;
    font-size: 10px;
  }
  .hero {
    background-size: auto 100%;
  }
  .section-head {
    display: block;
    margin-bottom: 17px;
  }
  .section-head p {
    margin-top: 4px;
  }
  .gallery {
    gap: 13px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .scene-open {
    right: 6px;
    bottom: 6px;
    width: 22px;
    height: 22px;
  }
  .card-name {
    font-size: 21px;
  }
  .how-inner {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .received-note {
    width: calc(100% - 14px);
    margin: 0 auto;
    text-align: left;
  }
  .recipient .hero-layout {
    min-height: calc(100svh - 138px);
    align-content: start;
    gap: 19px;
    padding-block: 32px;
  }
  .recipient .intro > p { margin-bottom: 0; }
  .recipient .intro h1 {
    font-size: 43px;
    margin-bottom: 5px;
  }
  .collection {
    padding-top: 33px;
  }
}
@media (max-width: 520px) {
  .gallery {
    gap: 14px 12px;
  }
  .thumbnail {
    aspect-ratio: 1.55;
  }
  .card-name {
    font-size: clamp(20px, 5.4vw, 26px);
    margin: 4px 0 6px;
  }
  .section-head h2 {
    font-size: 41px;
  }
  .collection {
    padding-bottom: 24px;
  }
  .dialog-inner {
    padding: 25px 20px 22px;
  }
  .dialog-inner h2 {
    font-size: 39px;
    margin-bottom: 20px;
  }
  .how h2 {
    font-size: 35px;
  }
  .how {
    padding: 28px 0;
  }
  .picture {
    aspect-ratio: 1.64;
  }
  .letter-paper { padding-block: 15px 20px; }
  .options { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
  .letter-paper, #reply { animation: none; }
}
.picture.loading {
  background: #b1c7c7 url("/assets/frost.webp") center/cover;
}
.picture.loading img,
.picture.loading canvas,
.picture.loading #swipe-hint {
  visibility: hidden;
}
.info-page { max-width:720px; padding-block:clamp(38px,7vw,85px); }
.info-page h1 { font-size:clamp(48px,6vw,78px); line-height:1.05; margin-bottom:28px; }
.info-page h2 { font-size:32px; margin:28px 0 6px; }
.info-page p { max-width:65ch; }
