@font-face { font-family: Gilroy; src: url('/fonts/gilroy/Gilroy-Regular.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Gilroy; src: url('/fonts/gilroy/Gilroy-Medium.otf') format('opentype'); font-weight: 500; font-display: swap; }
@font-face { font-family: Gilroy; src: url('/fonts/gilroy/Gilroy-SemiBold.otf') format('opentype'); font-weight: 600; font-display: swap; }
@font-face { font-family: Gilroy; src: url('/fonts/gilroy/Gilroy-Bold.otf') format('opentype'); font-weight: 700; font-display: swap; }

:root {
  --ink: #125338;
  --paper: #f2e6cb;
  --rule: #a89b7f;
  --sans: Gilroy, 'Avenir Next', Arial, sans-serif;
  --paper-grain: repeating-linear-gradient(97deg, transparent 0 4px, #392b1605 4px 5px);
  font: 500 100%/1.45 var(--sans);
  background: var(--ink);
  color: var(--paper);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, figure, blockquote { margin: 0; }
a { color: inherit; text-underline-offset: .23em; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
::selection { background: var(--paper); color: var(--ink); }
.wrap { width: min(91%, 88rem); margin-inline: auto; }
.sr, .skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { inset: .6rem auto auto .6rem; z-index: 10; width: auto; height: auto; padding: .7rem; clip-path: none; color: var(--ink); background: var(--paper); }


.mast {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  column-gap: 1rem; padding-block: clamp(.4rem, 1.8vh, 1.4rem);
}
.home-link, .mast nav a { display: inline-flex; align-items: center; min-height: 44px; }
.wordmark { width: clamp(7.5rem, 14vw, 12rem); height: auto; display: block; }
.mast nav { display: flex; flex-wrap: wrap; gap: 0 clamp(.8rem, 2.6vw, 2.5rem); }
.mast nav a { font-size: clamp(.82rem, 1.4vw, .97rem); text-decoration: none; }
.mast nav a:hover { text-decoration: underline; }

/* The artwork is the hinged lid. The card and lined tray occupy the same footprint. */
.unwrap-section {
  background: radial-gradient(ellipse at 46% 34%, #246448 0%, #123f2f 64%, #0b3025 100%);
  isolation: isolate;
}
.unwrap-pin { padding-bottom: clamp(2rem, 6vh, 4rem); }
.gift-block { width: min(86%, 68rem, 116svh); margin: clamp(2rem, 6svh, 5rem) auto 0; }
.gift-box { position: relative; }
.cover-frame {
  position: relative; background: #155438; padding: clamp(3px, .48vw, 7px);
  border: 1px solid #d4c3a2;
  box-shadow: 0 4px #184732, 0 7px #092e21, 0 9px 0 -1px #9b875e, 0 20px 38px #05271e80;
}
.poster { display: block; width: 100%; height: auto; }
/* A narrow ribbon wraps below the manger and turns with the lid. */
.gift-ribbon {
  position: absolute; z-index: 1; inset: auto -2px 4.2%;
  height: clamp(4px, .65vw, 10px);
  background: linear-gradient(180deg, #947d52, #ecdbac 19%, #beaa79 55%, #d9cba3 86%, #816c43);
  box-shadow: 0 2px 3px #11301e80;
}
.gift-ribbon i {
  position: absolute; left: 83%; top: 50%; width: clamp(8px, 1.2vw, 17px); height: 135%;
  transform: translateY(-50%) rotate(8deg); border: 1px solid #877046; border-radius: 30%;
  background: linear-gradient(115deg, #a08b5a, #f6e6bb 48%, #9e895a);
}
.gift-ribbon i::before, .gift-ribbon i::after {
  content: ''; position: absolute; bottom: 25%; width: 200%; height: 140%;
  border: clamp(2px, .25vw, 4px) solid #d9c69a; background: linear-gradient(155deg, #9a8051, #665a39 52%, #c0ad7b);
  box-shadow: 0 2px 2px #17302366;
}
.gift-ribbon i::before { right: 85%; border-radius: 80% 80% 0 65%; transform: rotate(13deg); }
.gift-ribbon i::after { left: 85%; border-radius: 80% 80% 65% 0; transform: rotate(-23deg); }
.box-tray { display: none; }
.inside-cover {
  width: 90%; margin: 1.8rem auto 0; padding: clamp(.45rem, .9vw, .8rem);
  color: #143f2e; background: var(--paper-grain), #f1e5cb;
  box-shadow: 0 .55rem 1.5rem #08281e55; text-align: center;
}
.invitation {
  position: relative; padding: clamp(1rem, 3vw, 3rem) clamp(.85rem, 2vw, 2rem);
  border: 1px solid #a89169; outline: 1px solid #b5a181; outline-offset: -.28rem;
}
.paper-star { display: block; color: #826939; font-size: clamp(1.45rem, 3vw, 2.8rem); line-height: 1; }
.invitation h2 { margin: .12em 0 .16em; font: 700 clamp(2.15rem, 5.6vw, 6rem)/.98 var(--sans); letter-spacing: -.055em; }
.invitation p { max-width: 34ch; margin: 0 auto; line-height: 1.35; font-size: clamp(1rem, 1.45vw, 1.3rem); }
.invitation a { display: inline-flex; align-items: center; min-height: 44px; margin-top: .28em; gap: .55em; font-weight: 700; }
.gift-caption {
  display: flex; align-items: center; justify-content: space-between; gap: .7rem 1.25rem; flex-wrap: wrap;
  position: relative; margin-top: clamp(1.3rem, 3svh, 2.1rem);
}
.gift-caption p { font-size: clamp(.95rem, 1.45vw, 1.18rem); }
.gift-caption p span { color: #dcc291; margin-inline: .35rem; }
.open-controls { display: flex; align-items: center; gap: 1rem; }
.scroll-cue { display: none; color: #e3d9c1; font-size: .9rem; }
.unwrap-toggle {
  position: relative; min-height: 44px; border: 1px solid #ddc8a3; border-radius: 2px;
  color: #133d2c; background: #efe3c9; padding: .6rem 1rem; font-weight: 700;
}
.unwrap-toggle:hover { background: #fff4dc; }
.unwrap-ready .gift-box { perspective: 1250px; }
.unwrap-ready .box-tray {
  display: block; position: absolute; inset: 0; border: clamp(5px, 1vw, 14px) solid #355f44;
  background: repeating-linear-gradient(133deg, #ccbb97 0 2px, #d4c4a2 2px 11px, #d9c9ab 11px 14px);
  box-shadow: inset 0 8px 18px #372c2261, 0 0 0 1px #bfa77c, 0 7px #153c2b, 0 9px #b99c73, 0 22px 40px #05271e66;
}
.unwrap-ready .cover-frame {
  z-index: 3; transform-origin: center 0;
  transform: rotateX(var(--lid-angle, 0deg)) rotateY(var(--tilt, 0deg));
  backface-visibility: hidden; pointer-events: none;
}
.unwrap-ready .inside-cover {
  position: absolute; z-index: 2; inset: auto 6% 8%; width: 88%; margin: 0;
  opacity: var(--letter-alpha, 0); transform: translateY(var(--letter-y, 8%)) scale(var(--letter-scale,.83)) rotate(var(--letter-angle,2deg));
}
.unwrap-ready.card-out .inside-cover { z-index: 4; }
.unwrap-ready .inside-cover[inert] { pointer-events: none; }
.unwrap-ready .gift-box { cursor: grab; touch-action: pan-y pinch-zoom; }
.unwrap-ready.card-out .gift-box { cursor: auto; }
@media (min-height: 520px) and (prefers-reduced-motion: no-preference) {
  .unwrap-ready { min-height: 178svh; }
  .unwrap-ready .unwrap-pin { position: sticky; top: 0; min-height: 93svh; display: flex; flex-direction: column; }
  .unwrap-ready .gift-block { margin-block: auto; padding-block: clamp(1.3rem, 3svh, 3rem); }
  .unwrap-ready .scroll-cue { display: inline; }
  .unwrap-ready.card-out .scroll-cue { display: none; }
}
@media (max-width: 670px) {
  .gift-block { width: 91%; }
  .gift-caption { flex-direction: column; justify-content: center; text-align: center; gap: .65rem; }
  .unwrap-ready .inside-cover { inset-inline: 3%; width: 94%; bottom: 7%; }
  .invitation { padding: 1.1rem .8rem .65rem; }
  .open-controls { gap: .8rem; }
  .unwrap-ready .gift-block { padding-top: 3.4rem; }
  .unwrap-ready .unwrap-pin { min-height: 78svh; }
}
@media (max-height: 519px) {
  .gift-block { width: min(88%, 38rem); margin-top: 4rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .unwrap-ready .gift-block { margin-top: 3rem; }
}
