/* THE GIFT: the Cedar Ridge Motors holiday event (a sample store).
   Evergreen paper printed with tiny foil cedars, a cream satin ribbon, candlelight.
   Motion is transform / opacity only. The paper geometry is set by js/wrap.js as transforms, never as layout. */

:root {
  --pine: #10291d; --pine-2: #1a3d2b; --pine-3: #0a1d14; --pine-4: #06130d;
  --cream: #f4ead6; --cream-2: #e6d6b5; --ink: #1d3a2a; --gold: #c9a35a; --berry: #b8432f;
  --foil: linear-gradient(100deg, #9c7330 0%, #e9cf8c 22%, #fff1c4 34%, #c4994a 52%, #f0d690 72%, #a47a35 100%);
  --satin: linear-gradient(90deg, #bfa77c 0%, #efe2c4 22%, #fffaf0 45%, #efe2c4 68%, #b39a6d 100%);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --script: "Mrs Saint Delafield", "Brush Script MT", cursive;
  --gutter: 16px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--pine-3); -webkit-text-size-adjust: 100%; }
body {
  background: var(--pine-3); color: var(--cream); font-family: var(--serif); font-variation-settings: "SOFT" 60;
  -webkit-font-smoothing: antialiased; overflow-x: clip; line-height: 1.4;
}
img, svg { display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #f0d690; outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--cream); color: var(--pine); padding: 10px 14px; border-radius: 30px; text-decoration: none; }
.skip:focus { top: 12px; }
.foiltext { background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------------------------------------------------------- header */
.top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; padding-top: max(14px, env(safe-area-inset-top));
}
.top::before { content: ""; position: absolute; inset: 0 0 -60px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(5, 12, 8, .62), rgba(5, 12, 8, 0)); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand svg { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .4)); }
.wm b { display: block; font-weight: 600; font-size: 13px; letter-spacing: .16em; line-height: 1; white-space: nowrap; }
.wm i { display: block; font-style: normal; font-weight: 400; font-size: 9px; letter-spacing: .42em; margin-top: 5px; opacity: .85; }
.chip { font-size: 8.5px; letter-spacing: .22em; text-transform: uppercase; border: 1px solid rgba(244, 234, 214, .5);
  padding: 4px 7px 3px; border-radius: 20px; font-weight: 500; white-space: nowrap; opacity: .9; }
.call { margin-left: auto; display: flex; align-items: center; gap: 12px; text-decoration: none; }
.call .num { display: none; font-size: 15px; letter-spacing: .04em; }
.seal { width: 44px; height: 44px; border-radius: 50%; background: var(--foil); display: grid; place-items: center; flex: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 0 0 3px rgba(120, 86, 30, .18); }
.seal svg { width: 18px; height: 18px; fill: var(--pine); }

/* ---------------------------------------------------------------- 1–3. the gift */
.gift { position: relative; height: 205svh; background: var(--pine-4); }
.stage { position: sticky; top: 0; height: 100svh; min-height: 520px; overflow: hidden; background: var(--pine-4); contain: paint; }
.car-box { position: absolute; inset: 0; }
.car { position: absolute; left: 0; top: 0; width: 1350px; height: 2400px; max-width: none; transform-origin: 0 0; will-change: transform; }
.lamp { position: absolute; left: 0; top: 0; width: 360px; height: 360px; transform-origin: 0 0; will-change: transform; pointer-events: none; }
.lamp i { position: absolute; inset: 0; border-radius: 50%; mix-blend-mode: screen;
  background: radial-gradient(closest-side, rgba(255, 220, 160, .55), rgba(255, 176, 92, .18) 45%, rgba(255, 160, 80, 0) 100%);
  animation: candle 3.2s ease-in-out infinite; }
@keyframes candle { 0%, 100% { opacity: .85; } 18% { opacity: 1; } 31% { opacity: .78; } 47% { opacity: .95; } 63% { opacity: .82; } 80% { opacity: 1; } }
.bokeh i { position: absolute; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255, 196, 120, .5), rgba(255, 170, 90, 0) 70%); animation: drift 9s ease-in-out infinite alternate; }
.bokeh i:nth-child(1) { width: 70px; height: 70px; left: 9%; top: 16%; opacity: .35; }
.bokeh i:nth-child(2) { width: 34px; height: 34px; left: 31%; top: 11%; opacity: .45; animation-duration: 11s; }
.bokeh i:nth-child(3) { width: 52px; height: 52px; left: 4%; top: 33%; opacity: .25; animation-duration: 13s; }
.bokeh i:nth-child(4) { width: 24px; height: 24px; left: 46%; top: 21%; opacity: .4; animation-duration: 8s; }
.bokeh i:nth-child(5) { width: 40px; height: 40px; left: 18%; top: 52%; opacity: .22; animation-duration: 12s; }
@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(8px, -14px, 0); } }
.grade { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 62% 46%, rgba(0, 0, 0, 0) 40%, rgba(6, 12, 8, .55) 100%),
              linear-gradient(180deg, rgba(40, 22, 6, .10), rgba(40, 22, 6, 0) 40%, rgba(6, 19, 13, .35) 100%); }
.shade { position: absolute; inset: 0; pointer-events: none; opacity: 0; will-change: opacity;
  background: linear-gradient(rgba(6, 19, 13, 0) 50%, var(--pine-4) 100%); }

/* the hero tag: the first offer, hung over the wrapping from the first paint; the paper rolls back beneath it */
.htag { position: absolute; left: 18px; top: 74px; width: 132px; height: 184px; z-index: 4; transform-origin: 50% -74px;
  animation: sway 6.4s ease-in-out infinite alternate; --r: -2deg; }
.htag::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 1px; height: 80px; background: linear-gradient(rgba(201, 163, 90, 0), #e6cf98); }
.htag::after { content: ""; position: absolute; inset: 14px 6px -4px; background: rgba(0, 0, 0, .5); filter: blur(12px); z-index: -1; transform: translateY(8px); }
.htag .gfor { font-size: 24px; }
.htag .unit { letter-spacing: .16em; }
.htag .fig { font-size: calc(var(--fs, 40px) * .86); }

/* the paper: a rotated clip (.sheet) whose child (.paper) is counter-transformed, so the paper stays put and its edge moves */
.sheet { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; transform-origin: 0 0; will-change: transform; z-index: 1; }
.paper { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-origin: 0 0; will-change: transform;
  background: radial-gradient(90% 80% at 25% 55%, #24503a, #163625 55%, #09190f 100%); }
.paper-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.glint { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(60% 45% at 30% 62%, rgba(255, 214, 150, .16), rgba(255, 214, 150, 0) 70%);
  animation: candle 3.8s ease-in-out infinite reverse; }
.words { position: absolute; left: 22px; bottom: 84px; z-index: 2; }
.words h1 { font-weight: 400; line-height: .86; letter-spacing: -.02em; font-size: 66px; }
.words .the { display: block; font-style: italic; font-weight: 300; font-size: .34em; letter-spacing: 0; margin: 0 0 .12em .06em; opacity: .92; }
.words .hol { display: block; font-style: italic; font-weight: 500; background: var(--foil); -webkit-background-clip: text; background-clip: text;
  color: transparent; padding: 0 .08em .26em 0; margin-bottom: -.2em; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .25)); }
.words .ev { display: block; font-weight: 300; letter-spacing: .01em; }
.sig { font-family: var(--script); font-weight: 400; line-height: 1; font-size: 40px; margin-top: 4px; display: inline-block;
  padding: .1em .3em .2em 0; transform: rotate(-4deg); transform-origin: left center;
  background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cue { position: absolute; left: 22px; bottom: 30px; display: flex; align-items: center; gap: 10px; font-size: 10px; letter-spacing: .32em;
  text-transform: uppercase; color: rgba(244, 234, 214, .78); font-weight: 500; z-index: 2; }
.cue .l { width: 28px; height: 1px; background: rgba(244, 234, 214, .6); transform-origin: right center; animation: tug 2.4s ease-in-out infinite; }
@keyframes tug { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.45); } }

/* the "For you" tag on the ribbon (a button: tap it and the ribbon is pulled for you) */
.fortag { position: absolute; right: 30px; bottom: 118px; width: 96px; height: 142px; z-index: 3; transform-origin: 50% 0;
  animation: sway 5.5s ease-in-out infinite alternate; --r: 7deg; }
.fortag .string { position: absolute; left: 38px; top: 0; width: 20px; height: 34px; overflow: visible; }
.fortag .string path { stroke: #d9bf86; stroke-width: 1.4; fill: none; }
.fortag .ftc { position: absolute; left: 0; top: 30px; width: 96px; height: 112px; color: var(--ink); text-align: center;
  background: radial-gradient(120% 90% at 30% 10%, #fbf4e4 0%, #efe2c6 60%, #e2d0ab 100%);
  clip-path: polygon(22% 0, 78% 0, 100% 18%, 100% 100%, 0 100%, 0 18%); }
.fortag .ftc::before { content: ""; position: absolute; left: 50%; top: 12px; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%;
  background: var(--pine); box-shadow: inset 0 0 0 2px #c79d52; }
.fortag .ftc::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(160, 120, 50, .45);
  clip-path: polygon(22% 0, 78% 0, 100% 18%, 100% 100%, 0 100%, 0 18%); }
.fortag .for { position: absolute; left: 0; right: 0; top: 44px; font-family: var(--script); font-size: 34px; line-height: 1; color: #1d3a2a; }
@keyframes sway { from { transform: rotate(calc(var(--r) - 2.2deg)); } to { transform: rotate(calc(var(--r) + 2.2deg)); } }

/* the roll: the paper's cream reverse, rolled back along the fold; and the shadows it casts */
.fold { position: absolute; left: 0; top: 0; width: 100px; height: 0; transform-origin: 0 0; will-change: transform; z-index: 2; pointer-events: none; --T: 28px; }
.fold i { position: absolute; left: 0; right: 0; display: block; }
.fold .sh-car { top: -64px; height: 64px; background: linear-gradient(rgba(3, 8, 5, 0), rgba(3, 8, 5, .58)); }
.fold .sh-paper { top: calc(var(--T) * .55); height: calc(var(--T) * 2); background: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, 0)); }
.fold .roll { top: 0; height: var(--T); z-index: 2;
  background: linear-gradient(180deg, #5e4c33 0%, #b9a27a 16%, #fbf3e1 40%, #efe2c4 58%, #a88e62 84%, #3d3020 100%);
  box-shadow: 0 1px 0 rgba(201, 163, 90, .7); }
.fold .roll::after { content: ""; position: absolute; left: 0; right: 0; top: 36%; height: 2px; background: rgba(255, 255, 255, .6); filter: blur(1px); }
.tail { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; transform-origin: 0 0; will-change: transform, opacity; z-index: 3; pointer-events: none; }

/* no script: the paper sits at the key frame */
html:not(.js) .sheet { clip-path: polygon(0 40%, 100% 62%, 100% 100%, 0 100%); }
html:not(.js) .car { width: 100% !important; height: 100% !important; object-fit: cover; object-position: 50% 62%; }

/* ---------------------------------------------------------------- 4. the gift tags */
.gifts { position: relative; padding: 76px var(--gutter) 64px; overflow: hidden;
  background: radial-gradient(70% 40% at 50% 0%, rgba(255, 190, 110, .10), rgba(255, 190, 110, 0) 70%), var(--pine-4); }
.g-head { text-align: center; }
.g-head h2, .wish h2 { font-weight: 300; font-size: 40px; line-height: 1; letter-spacing: -.01em; }
.g-head h2 i, .wish h2 i { font-weight: 400; background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.garland { display: flex; flex-direction: column; gap: 6px; max-width: 1180px; margin: 30px auto 0; }
.row { position: relative; display: flex; }
.row-1 .gt { flex: 0 1 50%; } .row-1 { justify-content: center; }
.drape { position: absolute; left: -6%; width: 112%; top: 0; height: 40px; overflow: visible; pointer-events: none; }
.drape path { fill: none; stroke: #c9a35a; stroke-width: 1.2; opacity: .8; }
.gt { position: relative; flex: 1; height: calc(16px + var(--drop) + var(--th) + 26px); --tw: 152px; --th: 206px; }
.swing { position: absolute; left: 50%; top: 16px; width: var(--tw); margin-left: calc(var(--tw) / -2); height: calc(var(--drop) + var(--th));
  transform-origin: 50% 0; animation: sway var(--dur, 6s) ease-in-out infinite alternate; --r: 0deg; }
.swing::before { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: calc(var(--drop) + 16px); background: linear-gradient(#c9a35a, #e6cf98); }
.tagbtn { position: absolute; left: 0; top: var(--drop); width: var(--tw); height: var(--th); perspective: 900px; text-align: center; }
.tagbtn::before { content: ""; position: absolute; inset: 14px 6px -4px; background: rgba(0, 0, 0, .45); filter: blur(12px); border-radius: 8px; transform: translateY(8px); }
.flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .95s cubic-bezier(.2, .75, .2, 1); }
.gt.on .flip { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; color: var(--ink);
  background: radial-gradient(120% 90% at 30% 10%, #fbf4e4 0%, #efe2c6 60%, #e2d0ab 100%);
  clip-path: polygon(20% 0, 80% 0, 100% 14%, 100% 100%, 0 100%, 0 14%); display: flex; flex-direction: column; align-items: center; }
.face::after { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(160, 120, 50, .45); pointer-events: none;
  clip-path: polygon(20% 0, 80% 0, 100% 14%, 100% 100%, 0 100%, 0 14%); }
.face .eye { margin-top: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--pine-4); box-shadow: inset 0 0 0 2px #c79d52; flex: none; }
.front { justify-content: center; padding: 24px 8px 10px; }
.face .eye { position: absolute; top: 0; left: 50%; margin-left: -6px; }
.front .gfor { font-family: var(--script); font-size: 28px; line-height: .95; color: #1d3a2a; padding: 0 2px 2px; }
.back { transform: rotateY(180deg); justify-content: center; padding: 16px 14px 14px; }
.terms { font-size: 14px; font-style: italic; line-height: 1.35; color: #3d4a33; }
.mark { margin-top: 10px; font-size: 7.5px; letter-spacing: .26em; font-weight: 600; text-transform: uppercase; color: #7a5a24; border: 1px solid rgba(160, 120, 50, .55);
  padding: 4px 7px 3px; border-radius: 20px; white-space: nowrap; }
.fig { margin-top: 6px; font-size: var(--fs, 40px); font-weight: 400; line-height: 1; letter-spacing: -.02em; white-space: nowrap; color: var(--pine); }
.fig small { font-size: .38em; letter-spacing: .02em; margin-left: .12em; font-style: italic; }
.back .fig-s { margin: 0 0 10px; font-size: calc(var(--fs, 40px) * .72); }
.unit { margin-top: 7px; font-size: 9px; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; line-height: 1.5; color: #3d4a33; }
.gt:nth-child(1) { --drop: 14px; --dur: 6.2s; }
.gt:nth-child(2) { --drop: 44px; --dur: 5.4s; }
.row + .row .gt:nth-child(1) { --drop: 34px; --dur: 5.8s; }
.row + .row .gt:nth-child(2) { --drop: 8px; --dur: 6.8s; }
/* they fall onto the string when the section arrives */
.js .gt .swing { opacity: 0; translate: 0 -36px; transition: opacity .8s ease, translate 1.1s cubic-bezier(.2, .8, .2, 1.1); }
.js .gifts.in .gt .swing { opacity: 1; translate: 0 0; }
.js .gifts.in .row .gt:nth-child(2) .swing { transition-delay: .12s; }
.js .gifts.in .row + .row .gt:nth-child(1) .swing { transition-delay: .24s; }
.js .gifts.in .row + .row .gt:nth-child(2) .swing { transition-delay: .36s; }

/* ---------------------------------------------------------------- 5. put your name on one */
.wish { padding: 72px var(--gutter) 80px; text-align: center; background: linear-gradient(var(--pine-4), var(--pine-3)); }
.wish-in { max-width: 860px; margin: 30px auto 0; display: grid; gap: 34px; justify-items: center; }
.mytag-wrap { position: relative; width: 220px; height: 340px; transform: rotate(-3deg); transform-origin: 50% 0; }
.mytag-wrap::before { content: ""; position: absolute; inset: 20px 8px -6px; background: rgba(0, 0, 0, .5); filter: blur(16px); transform: translateY(10px); }
.mytag { position: absolute; inset: 0; color: var(--ink); display: flex; flex-direction: column; align-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 30% 10%, #fbf4e4 0%, #efe2c6 60%, #e2d0ab 100%);
  clip-path: polygon(20% 0, 80% 0, 100% 14%, 100% 100%, 0 100%, 0 14%); }
.mytag::after { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(160, 120, 50, .45); clip-path: polygon(20% 0, 80% 0, 100% 14%, 100% 100%, 0 100%, 0 14%); }
.mytag .eye { margin-top: 16px; width: 14px; height: 14px; border-radius: 50%; background: var(--pine-3); box-shadow: inset 0 0 0 2px #c79d52; }
.mt-for { margin-top: 26px; font-style: italic; font-weight: 300; font-size: 18px; color: #5a5440; }
/* the name is written ON the tag: the tag's own line is the field (round 5) */
.mt-name { font-family: var(--script); font-size: var(--nfs, 40px); line-height: 1.2; color: #1d3a2a; width: 100%; height: 88px; flex: none;
  padding: 0 16px; text-align: center; border: 0; border-radius: 0; outline: none; -webkit-appearance: none; appearance: none;
  caret-color: #c9503a; transform: rotate(-4deg); position: relative; z-index: 1;
  background: linear-gradient(90deg, rgba(90, 84, 64, .5) 55%, transparent 0) 50% 84% / 8px 1px repeat-x content-box transparent; }
.mt-name::placeholder { color: rgba(29, 58, 42, .36); opacity: 1; }
.mt-name:focus { background-image: linear-gradient(90deg, #c9503a 55%, transparent 0); }
/* the tag's second line: a phone or an email, in the tag's plain hand so a number stays legible (round 6) */
.mt-reach { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 16px; line-height: 1.2; color: #1d3a2a; width: 100%; height: 44px; flex: none;
  padding: 0 24px; text-align: center; border: 0; border-radius: 0; outline: none; -webkit-appearance: none; appearance: none;
  caret-color: #c9503a; transform: rotate(-4deg); position: relative; z-index: 1;
  background: linear-gradient(90deg, rgba(90, 84, 64, .5) 55%, transparent 0) 50% 86% / 8px 1px repeat-x content-box transparent; }
.mt-reach::placeholder { color: rgba(29, 58, 42, .5); opacity: 1; }
.mt-reach:focus, .wish.need-reach .mt-reach { background-image: linear-gradient(90deg, #c9503a 55%, transparent 0); }
.wish.need-reach .mytag { animation: tagNudge .5s cubic-bezier(.3, .6, .3, 1); }
.wish.is-tied .mt-reach { background-image: none; pointer-events: none; }
.mt-fit { position: absolute; left: 0; top: 0; visibility: hidden; white-space: pre; font-family: var(--script); font-size: 66px; pointer-events: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wish.need .mt-name { background-image: linear-gradient(90deg, #c9503a 55%, transparent 0); }
.wish.need .mytag { animation: tagNudge .5s cubic-bezier(.3, .6, .3, 1); }
@keyframes tagNudge { 0%, 100% { transform: none; } 25% { transform: rotate(-3.5deg); } 60% { transform: rotate(2.5deg); } 82% { transform: rotate(-1deg); } }
.wish.is-tied .mt-name { background-image: none; pointer-events: none; }
/* once the bow lands the tag swings on its string, the way a tied tag does */
.wish.is-tied .mytag-wrap { animation: tagSway 1.7s 1.45s cubic-bezier(.35, 0, .3, 1); }
@keyframes tagSway { 0%, 100% { transform: rotate(-3deg); } 22% { transform: rotate(3deg); } 50% { transform: rotate(-6deg); } 76% { transform: rotate(-1.5deg); } }
.w-hint { font-size: 15px; font-style: italic; color: #f0d690; text-align: center; margin-top: -12px; }
.w-hint:empty { display: none; }
.mt-in { margin-top: auto; margin-bottom: 26px; width: 66%; margin-right: 22%; font-size: 9px; line-height: 1.6; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: #7a5a24; }
.band { position: absolute; background: var(--satin); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); transition: transform .7s cubic-bezier(.6, 0, .2, 1); }
.band-h { left: 0; right: 0; top: 72%; height: 20px; transform: scaleX(0); transform-origin: left center;
  background: linear-gradient(180deg, #bfa77c 0%, #efe2c4 22%, #fffaf0 45%, #efe2c4 68%, #b39a6d 100%); }
.band-v { top: 0; bottom: 0; left: 72%; width: 20px; transform: scaleY(0); transform-origin: center top; transition-delay: .35s; }
.bow { position: absolute; left: 72%; top: 72%; width: 116px; margin: -38px 0 0 -58px; overflow: visible; pointer-events: none; }
.bow path, .bow ellipse { fill: #f3e7cc; stroke: #b0925a; stroke-width: .8; }
.bow .lp, .bow .tl, .bow .knot, .retie .lp, .retie .tl, .retie .knot { transform-box: view-box; transform-origin: 60px 40px; }
.bow .lp, .bow .tl, .bow .knot { transform: scale(0); transition: transform .6s cubic-bezier(.3, 1.6, .5, 1); }
.bow .lp-l { transition-delay: .9s; } .bow .lp-r { transition-delay: 1s; } .bow .tl { transition-delay: 1.1s; } .bow .knot { transition-delay: .85s; }
.wish.is-tied .band-h { transform: scaleX(1); }
.wish.is-tied .band-v { transform: scaleY(1); }
.wish.is-tied .bow .lp, .wish.is-tied .bow .tl, .wish.is-tied .bow .knot { transform: scale(1); }
.wish-form { width: 100%; max-width: 380px; display: grid; gap: 22px; text-align: left; }
.f-in legend { display: block; font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: rgba(244, 234, 214, .66); font-weight: 500; margin-bottom: 8px; }
.f-in { border: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips label { display: inline-flex; align-items: center; min-height: 44px; padding: 0 15px; border-radius: 30px; border: 1px solid rgba(244, 234, 214, .35); font-size: 15px; cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
.chips input:checked + label { background: var(--cream); color: var(--pine); border-color: var(--cream); }
.chips input:focus-visible + label { outline: 2px solid #f0d690; outline-offset: 2px; }
.tie { justify-self: start; padding: 15px 26px; border-radius: 40px; background: var(--foil); color: var(--pine); font-weight: 600; font-size: 16px;
  letter-spacing: .02em; box-shadow: 0 6px 22px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .6); }
.tied { max-width: 380px; text-align: center; }
.t-say { font-family: var(--script); font-size: 46px; line-height: 1; background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 .2em .1em; }
.t-note { margin-top: 10px; font-size: 15px; font-style: italic; color: rgba(244, 234, 214, .8); }
.untie { margin-top: 8px; min-height: 44px; min-width: 96px; padding: 0 12px; font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: rgba(244, 234, 214, .75);
  text-decoration: underline; text-decoration-color: rgba(244, 234, 214, .4); text-underline-offset: 7px; }

/* ---------------------------------------------------------------- 6. the card */
/* clip: mid-swing the cover leans out toward the reader and, in perspective, is wider than the phone */
.visit { position: relative; padding: 56px var(--gutter) 64px; background: var(--pine-3); overflow-x: clip; }
.card { position: relative; width: min(500px, 100%); height: 316px; margin: 0 auto 316px; perspective: 1800px; }
.inside { position: absolute; inset: 0; color: var(--ink); text-align: center; padding: 30px 22px 24px; display: flex; flex-direction: column; align-items: center;
  background: radial-gradient(120% 100% at 30% 0%, #fbf4e4 0%, #efe2c6 65%, #e4d3af 100%); box-shadow: 0 24px 50px rgba(0, 0, 0, .5); }
.inside::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(160, 120, 50, .4); pointer-events: none; }
.v-say { font-family: var(--script); font-weight: 400; font-size: 50px; line-height: 1; color: #1d3a2a; padding: 0 .2em; }
.v-phone { margin-top: 12px; font-size: 32px; font-weight: 400; letter-spacing: .01em; text-decoration: none; color: var(--pine); }
.v-how { margin-top: 4px; font-size: 13px; font-style: italic; color: #5a5440; }
.seals { margin-top: auto; display: flex; gap: 34px; }
.seal-btn { display: flex; flex-direction: column; align-items: center; gap: 7px; text-decoration: none; font-size: 9.5px; letter-spacing: .24em;
  text-transform: uppercase; font-weight: 600; color: #6b5020; }
.seal-btn .seal { width: 56px; height: 56px; }
.seal-btn .seal svg { width: 22px; height: 22px; }
.cover { position: absolute; inset: 0; transform-origin: 50% 100%; transform-style: preserve-3d; transition: transform 1.6s cubic-bezier(.45, .05, .2, 1); z-index: 2; }
.card.open .cover { transform: rotateX(-180deg); }
.c-front, .c-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.c-front { box-shadow: 0 24px 50px rgba(0, 0, 0, .5), inset 0 0 0 8px rgba(0, 0, 0, 0), inset 0 0 0 9px rgba(201, 163, 90, .65);
  background: var(--cedars, none), radial-gradient(90% 80% at 30% 30%, #24503a, #163625 60%, #0c2117 100%); background-size: 44px 52px, auto; }
.c-mark { width: 74px; height: 74px; background: var(--foil); -webkit-mask: var(--tree) center / contain no-repeat; mask: var(--tree) center / contain no-repeat; }
.c-open { margin-top: 18px; font-size: 10px; letter-spacing: .36em; text-transform: uppercase; color: rgba(244, 234, 214, .85); font-weight: 500; }
.c-back { transform: rotateX(180deg); justify-content: flex-end; padding-bottom: 18px; background: #2a2a1e 50% 54% / cover no-repeat;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .4), inset 0 0 0 10px #f1e6cd; }
.c-back::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(160, 120, 50, .5); }
.c-sig { position: relative; z-index: 1; font-family: var(--script); font-size: 58px; line-height: 1; transform: rotate(-4deg); padding: .1em .3em .2em;
  background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root { --tree: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 3 L26 12 H23 L28.5 19 H24.5 L30.5 27 H21.6 V31 H18.4 V27 H9.5 L15.5 19 H11.5 L17 12 H14 Z'/%3E%3Cpath d='M1 36 L9 30.5 L14 33.5 L20 28.5 L26 33.5 L31 30.5 L39 36' fill='none' stroke='%23000' stroke-width='2.6'/%3E%3C/svg%3E");
  --cedars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='52'%3E%3Cg fill='%23d6b46a' fill-opacity='.17'%3E%3Cpath transform='translate(2 2) scale(.34)' d='M20 3 L26 12 H23 L28.5 19 H24.5 L30.5 27 H21.6 V31 H18.4 V27 H9.5 L15.5 19 H11.5 L17 12 H14 Z'/%3E%3Cpath transform='translate(24 28) scale(.34)' d='M20 3 L26 12 H23 L28.5 19 H24.5 L30.5 27 H21.6 V31 H18.4 V27 H9.5 L15.5 19 H11.5 L17 12 H14 Z'/%3E%3C/g%3E%3C/svg%3E"); }

/* ---------------------------------------------------------------- footer: retie */
.foot { padding: 40px var(--gutter) calc(110px + env(safe-area-inset-bottom)); text-align: center; background: var(--pine-3); border-top: 1px solid rgba(201, 163, 90, .18); }
.retie { width: 110px; margin: -70px auto 22px; overflow: visible; }
.retie path, .retie ellipse { fill: #f3e7cc; stroke: #b0925a; stroke-width: .8; }
.js .retie .lp, .js .retie .tl, .js .retie .knot { transform: scale(0) rotate(-20deg); transition: transform .8s cubic-bezier(.3, 1.5, .5, 1); }
.js .retie .lp-r { transition-delay: .12s; } .js .retie .tl { transition-delay: .26s; }
.js .foot.in .retie .lp, .js .foot.in .retie .tl, .js .foot.in .retie .knot { transform: none; }
.f-brand { display: inline-flex; align-items: center; gap: 10px; }
.f-brand svg { width: 30px; height: 30px; }
.legal { max-width: 560px; margin: 22px auto 0; font-size: 12.5px; line-height: 1.6; color: rgba(244, 234, 214, .62); }
.credits { margin-top: 14px; font-size: 13px; font-style: italic; color: rgba(244, 234, 214, .8); }
.credits a { text-decoration-color: rgba(201, 163, 90, .7); text-underline-offset: 3px; }
.f-back { margin-top: 22px; }
.btn-back { display: inline-block; padding: 12px 20px; border-radius: 30px; border: 1px solid rgba(244, 234, 214, .4); text-decoration: none; font-size: 14px; }

/* ---------------------------------------------------------------- the dock: the call seal stays */
.dock { position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30; display: flex; align-items: center; gap: 10px;
  opacity: 0; transform: translateY(24px); pointer-events: none; transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.dock.show { opacity: 1; transform: none; pointer-events: auto; }
.d-in { padding: 13px 20px; border-radius: 30px; background: var(--cream); color: var(--pine); text-decoration: none; font-size: 15px; font-weight: 500;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .4); transition: opacity .4s ease, transform .4s ease; }
.dock.tuck .d-in, .dock.at-visit .d-in, .dock.at-wish .d-in { opacity: 0; transform: translateX(10px); pointer-events: none; }
.d-call .seal { width: 52px; height: 52px; }
.dock.writing { opacity: 0; transform: translateY(24px); pointer-events: none; }   /* nothing sits on the tag while a name is being written */

/* ---------------------------------------------------------------- small phones */
@media (max-width: 380px) {
  .brand { gap: 8px; } .wm b { font-size: 12px; letter-spacing: .12em; } .chip { font-size: 7.5px; padding: 3px 6px 2px; }
  .words h1 { font-size: 58px; } .sig { font-size: 36px; }
  .fortag { right: 14px; bottom: 112px; }
  .gt { --tw: 140px; --th: 202px; } .front .gfor { font-size: 26px; }
  .htag { left: 12px; width: 124px; height: 176px; } .htag .gfor { font-size: 22px; }
  .v-say { font-size: 44px; } .v-phone { font-size: 28px; }
}

/* ---------------------------------------------------------------- desk */
@media (min-width: 900px) {
  :root { --gutter: 40px; }
  .top { padding: 26px 40px; gap: 14px; }
  .brand svg { width: 44px; height: 44px; } .wm b { font-size: 16px; } .wm i { font-size: 10.5px; } .chip { font-size: 9.5px; }
  .call .num { display: block; } .call .seal { width: 52px; height: 52px; }
  .words { left: auto; right: 5.5%; bottom: auto; top: 42%; width: min(470px, 34%); }
  .sig { margin-left: .2em; }
  .words h1 { font-size: clamp(84px, 8.4vw, 132px); }
  .sig { font-size: 58px; margin-top: 8px; }
  .cue { left: calc(93% - min(470px, 34%)); bottom: 44px; }
  .fortag { right: auto; left: calc(88.5% - 59px); top: calc(21.5% - 6px); bottom: auto; width: 118px; height: 172px; --r: -5deg; }
  .fortag .string { left: 49px; }
  .fortag .ftc { width: 118px; height: 136px; top: 36px; }
  .fortag .for { font-size: 42px; top: 50px; }
  .gifts { padding: 110px var(--gutter) 90px; }
  .g-head h2, .wish h2 { font-size: 58px; }
  .garland { flex-direction: row; gap: 0; margin-top: 44px; }
  .row { flex: 2; } .row-1 { flex: 1; } .row-1 .gt { flex: 1; }
  .gt { --tw: 196px; --th: 258px; }
  .front .gfor { font-size: 38px; }
  .fig { font-size: calc(var(--fs, 40px) * 1.28); }
  .unit { font-size: 10px; } .terms { font-size: 17px; } .mark { font-size: 8.5px; }
  .back .fig-s { font-size: calc(var(--fs, 40px) * .92); }
  .htag { left: 6%; top: 140px; width: 172px; height: 228px; transform-origin: 50% -140px; }
  .htag::before { height: 146px; }
  .htag .gfor { font-size: 34px; } .htag .fig { font-size: calc(var(--fs, 40px) * 1.12); }
  .wish { padding: 100px var(--gutter) 110px; }
  .wish-in { grid-template-columns: 1fr 1fr; align-items: center; margin-top: 50px; gap: 60px; }
  .mytag-wrap { width: 260px; height: 390px; justify-self: end; margin-right: 30px; }
  .wish-form, .tied { justify-self: start; }
  .visit { padding-top: 40px; }
  .photo { max-width: 620px; }
  .card { width: 540px; height: 340px; margin-bottom: 340px; }
  .dock { right: 26px; bottom: 26px; }
}

/* ---------------------------------------------------------------- reduced motion: the key frame, then quiet cuts */
.rm .gift { height: auto; }
.rm .stage { position: relative; }
.rm *, .rm *::before, .rm *::after { animation: none !important; transition-duration: .01s !important; transition-delay: 0s !important; }
.rm .cue { display: none; }

/* ---------------------------------------------------------------- desk, round 8: every screen below the first is set for a desk.
   Everything here is behind (min-width: 900px), so a phone never reads it. Motion stays transform / opacity (and the
   single-axis transform properties `scale`), and the .rm rule above stills all of it. */
@media (min-width: 900px) {
  /* the opened gift is a diptych: the car on the left at or under its real size (js/wrap.js keeps it inside --split),
     a close still of the same car on the right, a satin ribbon between them */
  .car-box picture { position: absolute; left: 0; top: 0; bottom: 0; width: var(--split, 100%); overflow: hidden; }
  .car-box::before { content: ""; position: absolute; top: 0; bottom: 0; right: 0; left: var(--split, 100%);
    background: linear-gradient(90deg, #8f7a52 0%, #efe2c4 24%, #fffaf0 46%, #efe2c4 70%, #8f7a52 100%) 0 0 / 10px 100% no-repeat,
                url(../media/car-close.jpg) 36% 100% / auto var(--close-h, 115%) no-repeat var(--pine-4); }

  /* 4. under the tree: the string runs the width of the desk and the tags are hung at desk size */
  .gifts { padding: 120px var(--gutter) 70px; }
  .g-head h2 { font-size: clamp(58px, 5.4vw, 104px); }
  .garland { max-width: min(1600px, 92vw); margin-top: 56px; }
  .gt { --k: 1; height: calc(16px + (var(--drop) + var(--th)) * var(--k) + 26px); }
  .swing { scale: var(--k); }

  /* 5. put your name on one: the line on the left, the tag in the middle, what goes inside on the right */
  .wish { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 3vw;
    padding: 120px max(var(--gutter), 6vw) 140px; text-align: left; }
  .wish h2 { font-size: min(5.4vw, 104px); line-height: .98; white-space: nowrap; }
  .wish-in { --k: 1; max-width: none; margin: 0; grid-template-columns: minmax(0, 1fr) auto; gap: 3vw; }
  .wish-form, .tied { width: 380px; justify-self: end; }
  .mytag-wrap { scale: var(--k); justify-self: center; margin: 0 calc(130px * (var(--k) - 1)) calc(390px * (var(--k) - 1)); }
  .mt-name:focus-visible, .mt-reach:focus-visible { background-size: 8px 2px; }

  /* 6. the card is a desk-sized card, printed from a sharp still */
  .visit { padding: 70px var(--gutter) 120px; }
  .card { --cw: clamp(540px, 50vw, 960px); width: var(--cw); height: calc(var(--cw) * .556); margin-bottom: calc(var(--cw) * .556); perspective: 2400px; }
  .inside { padding: calc(var(--cw) * .06) 30px calc(var(--cw) * .05); }
  .v-say { font-size: calc(var(--cw) * .105); }
  .v-phone { font-size: calc(var(--cw) * .064); margin-top: calc(var(--cw) * .02); }
  .v-how { font-size: calc(var(--cw) * .022); margin-top: 6px; }
  .seals { gap: calc(var(--cw) * .07); }
  .seal-btn { font-size: 10.5px; gap: 9px; }
  .seal-btn .seal { width: calc(var(--cw) * .092); height: calc(var(--cw) * .092); }
  .seal-btn .seal svg { width: 38%; height: 38%; }
  .c-mark { width: calc(var(--cw) * .14); height: calc(var(--cw) * .14); }
  .c-open { font-size: 11.5px; margin-top: 24px; }
  .c-sig { font-size: calc(var(--cw) * .12); }
  .c-back { padding-bottom: calc(var(--cw) * .035);
    background-image: linear-gradient(rgba(10, 29, 20, 0) 45%, rgba(10, 29, 20, .82)), url(../media/car-detail-1000.jpg) !important; background-position: 50% 50%; }
}
@media (min-width: 1200px) {
  .gt { --k: 1.3; }
  .wish-in { --k: 1.15; }
  .wish-form, .tied { width: 400px; max-width: 400px; }
}
@media (min-width: 1700px) {
  .gt { --k: 1.62; }
  .wish-in { --k: 1.45; }
  .wish-form, .tied { width: 470px; max-width: 470px; gap: 28px; }
  .f-in legend { font-size: 12px; margin-bottom: 12px; }
  .chips { gap: 10px; }
  .chips label { min-height: 52px; padding: 0 20px; font-size: 18px; }
  .tie { padding: 19px 34px; font-size: 19px; }
  .w-hint, .t-note { font-size: 18px; }
  .t-say { font-size: 60px; }
  .legal { font-size: 14px; max-width: 640px; } .credits { font-size: 15px; } .btn-back { font-size: 15px; padding: 14px 24px; }
}

/* hover and focus, for a mouse at a desk: the foil catches the light and lifts, a seal turns, a tag starts to turn over,
   the card lifts its cover. Transform and opacity only. */
@media (hover: hover) and (min-width: 900px) {
  .tie, .btn-back, .chips label { position: relative; transition: transform .25s cubic-bezier(.2, .8, .2, 1), background-color .25s ease, color .25s ease, border-color .25s ease; }
  .d-in { position: relative; }
  .tie::after, .d-in::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s ease;
    background: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .06)); }
  .tie:hover, .tie:focus-visible, .d-in:hover, .d-in:focus-visible, .btn-back:hover, .btn-back:focus-visible { transform: translateY(-2px); }
  .tie:hover::after, .tie:focus-visible::after, .d-in:hover::after, .d-in:focus-visible::after { opacity: 1; }
  .tie:active, .btn-back:active, .d-in:active { transform: translateY(0); }
  /* a chip lifts and takes a foil rim */
  .chips label::after, .btn-back::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; border: 1px solid #f0d690; pointer-events: none; opacity: 0; transition: opacity .25s ease; }
  .chips label:hover { transform: translateY(-2px); }
  .chips label:hover::after, .btn-back:hover::after, .btn-back:focus-visible::after { opacity: 1; }
  .btn-back::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(244, 234, 214, .1); pointer-events: none; opacity: 0; transition: opacity .25s ease; }
  .btn-back:hover::before, .btn-back:focus-visible::before { opacity: 1; }
  /* the foil seals turn like a pressed seal */
  .seal { transition: transform .35s cubic-bezier(.3, 1.5, .5, 1); }
  .call:hover .seal, .call:focus-visible .seal, .seal-btn:hover .seal, .seal-btn:focus-visible .seal, .d-call:hover .seal, .d-call:focus-visible .seal { transform: scale(1.09) rotate(-9deg); }
  .brand svg { transition: transform .35s cubic-bezier(.3, 1.5, .5, 1); }
  .brand:hover svg, .brand:focus-visible svg { transform: translateY(-3px); }
  /* a gift tag starts to turn over under the mouse; the "For you" tag lifts off the paper */
  .gt:not(.on) .tagbtn:hover .flip, .gt:not(.on) .tagbtn:focus-visible .flip { transform: rotateY(18deg); }
  .gt.on .tagbtn:hover .flip, .gt.on .tagbtn:focus-visible .flip { transform: rotateY(162deg); }
  .fortag { transition: scale .3s cubic-bezier(.3, 1.5, .5, 1); }
  .fortag:hover, .fortag:focus-visible { scale: 1.07; }
  /* the card lifts its cover a little before it is opened or closed */
  .card:not(.open) .cover:hover, .card:not(.open) .cover:focus-visible { transform: rotateX(-9deg); }
  .card.open .cover:hover, .card.open .cover:focus-visible { transform: rotateX(-172deg); }
  .untie:hover, .untie:focus-visible { color: var(--cream); text-decoration-color: #f0d690; }
  .v-phone:hover, .v-phone:focus-visible { text-decoration: underline; text-decoration-color: #b0925a; text-underline-offset: 6px; }
  .credits a:hover, .credits a:focus-visible { color: #f0d690; }
}
