/* ============ GIFT ============
   A wrapped birthday present on a plinth that refuses to open until
   10 December. Rose paper with tiny ∞ and dots, maroon satin ribbon, a bow,
   a paper tag on a thread, a warm glow leaking from the lid seam. Tap it
   and it jiggles, the lid lifts a hair, the bow bounces and the tag flips
   over with a line. Below: sleeps + rolling h·m·s + the unwrapping line.
   On the day the ribbon unties, the lid flies off, a card rises out of
   the box and unfolds into a letter. Logic in gift.js. */

.gift {
  position: relative;
  padding: 5rem 1.2rem 7rem;
  overflow: hidden;
  overflow: clip;
  text-align: center;
}
.gift .section-head { margin-bottom: 2.4rem; }
.gift .statement-sub { text-wrap: balance; }
.gf-eyebrow-text { display: inline-block; }

/* ---- Stage ---- */
.gf-stage {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
}
.gf-stage.is-open { max-width: 720px; }
.gf-scene {
  position: relative;
  padding-bottom: 2.4rem;
}
.gf-scene[hidden] { display: none; }
.gf-holder {
  position: relative;
  transform-origin: 50% 100%;
}
/* the plinth the box stands on */
.gf-plinth {
  position: absolute;
  left: 1%;
  right: 1%;
  top: 80.5%;
  height: 19.5%;
  isolation: isolate;
  border-radius: 50%;
  background: radial-gradient(60% 72% at 50% 38%, #FBF0EB 0%, #F4E3DC 58%, #ECD6CD 100%);
  box-shadow:
    0 34px 54px -32px rgba(110, 36, 54, 0.4),
    0 10px 30px -18px rgba(217, 108, 138, 0.28),
    inset 0 -8px 14px -10px rgba(110, 36, 54, 0.22),
    inset 0 2px 0 rgba(255, 255, 255, 0.95);
  pointer-events: none;
}
.gf-plinth::before {
  content: '';
  position: absolute;
  inset: 12% 5%;
  border-radius: 50%;
  border: 1px solid rgba(217, 108, 138, 0.16);
}
/* the plinth's thickness */
.gf-plinth::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 16%;
  bottom: -11%;
  z-index: -1;
  border-radius: 50%;
  background: linear-gradient(180deg, #EBD5CC 0%, #E3C9BF 100%);
  box-shadow: 0 6px 14px -8px rgba(110, 36, 54, 0.3);
}
/* a soft rose halo behind everything */
.gf-holder::before {
  content: '';
  position: absolute;
  inset: 10% -8% -4%;
  border-radius: 50%;
  background: radial-gradient(50% 46% at 50% 56%, rgba(232, 160, 176, 0.32), rgba(242, 196, 179, 0.16) 55%, transparent 76%);
  filter: blur(16px);
  pointer-events: none;
}

/* ---- The box (one big tap target) ---- */
.gf-box {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2rem;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transform-origin: 50% 88%;
}
.gf-box:focus-visible { outline: 2px solid var(--rose-soft); outline-offset: 6px; }
.gf-box:disabled { cursor: default; }
.gf-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.gf-lid,
.gf-bow,
.gf-rib-v,
.gf-rib-h,
.gf-seam {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}
.gf-bow { transform-origin: 50% 62%; }
.gf-seam { opacity: 0.4; }
.gf-thread { transition: opacity 0.4s ease; }
/* light at the seam: three blurred layers on their own compositor layers */
.gf-light {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 62%;
  height: 9%;
  translate: -50% -50%;
  pointer-events: none;
}
.gf-glow,
.gf-warm,
.gf-flare {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  filter: blur(10px);
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}
.gf-glow {
  background: radial-gradient(ellipse at 50% 50%, #FFE7BF 0%, rgba(255, 211, 154, 0.75) 45%, rgba(255, 192, 138, 0) 72%);
  opacity: 0.55;
}
.gf-warm {
  inset: -20% -8%;
  background: radial-gradient(ellipse at 50% 50%, #FFC98A 0%, rgba(247, 169, 109, 0.7) 50%, rgba(247, 169, 109, 0) 74%);
  opacity: 0;
  transition: opacity 1.2s ease;
}
.gf-flare {
  inset: -90% -22%;
  background: radial-gradient(ellipse at 50% 50%, #FFE7BF 0%, rgba(255, 211, 154, 0.7) 40%, rgba(255, 192, 138, 0) 70%);
  filter: blur(14px);
  opacity: 0;
}
/* the glow breathes, only while she can see it */
.gf-stage.is-live .gf-glow { animation: gf-breathe 3.4s ease-in-out infinite alternate; }
@keyframes gf-breathe {
  from { opacity: 0.4; transform: scale(0.94, 0.88); }
  to   { opacity: 0.85; transform: scale(1.06, 1.18); }
}
/* ≤ 30 days: a touch warmer */
.gf-stage.is-month .gf-warm { opacity: 0.7; }
.gf-stage.is-month.is-live .gf-glow { animation-duration: 2.6s; }

/* ---- Tag on a thread ---- */
.gf-tag {
  position: absolute;
  left: 59.6%;
  top: 40.1%;
  width: 34%;
  aspect-ratio: 1.42;
  transform-origin: 7% 10%;
  rotate: 9deg;
  perspective: 700px;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 12px 16px rgba(82, 26, 40, 0.28));
  transition: opacity 0.4s ease;
}
.gf-tag-card {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.85s var(--ease-spring);
}
.gf-tag.is-flipped .gf-tag-card { transform: rotateY(180deg) scale(1.22); }
.gf-tag-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8% 9% 8% 12%;
  border-radius: 5px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #FFFBF7 0%, #F8ECE6 100%);
  border: 1px solid rgba(110, 36, 54, 0.14);
  box-shadow: inset 0 1px 0 #fff;
  color: var(--ink);
  text-align: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.gf-tag-face::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(217, 108, 138, 0.2);
  border-radius: 3px;
  pointer-events: none;
}
.gf-tag-back { transform: rotateY(180deg); padding: 7% 8%; }
.gf-tag-hole {
  position: absolute;
  left: 6%;
  top: 9%;
  width: 9%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #FDF8F5 0 42%, rgba(110, 36, 54, 0.5) 46% 62%, transparent 68%);
}
.gf-tag-back .gf-tag-hole { left: auto; right: 6%; }
.gf-tag-for {
  font-size: clamp(0.72rem, 3.3vw, 0.9rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.25;
  white-space: nowrap;
}
.gf-tag-for .ar { font-weight: 500; color: var(--maroon); }
.gf-tag-main {
  display: none;
  font-size: clamp(0.88rem, 4.2vw, 1.12rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--maroon);
}
.gf-tag-front.has-main .gf-tag-main { display: block; }
.gf-tag-front.has-main .gf-tag-for { font-size: clamp(0.58rem, 2.6vw, 0.72rem); margin-top: 0.15em; }
.gf-tag-text {
  font-size: clamp(0.58rem, 2.7vw, 0.72rem);
  font-weight: 500;
  line-height: 1.28;
  color: var(--maroon);
  text-wrap: pretty;
}
.gf-tag-text .ar { font-weight: 700; }

/* the Iraqi line under the box */
.gf-say {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  font-size: clamp(0.98rem, 4.1vw, 1.12rem);
  font-weight: 700;
  line-height: 1.5;
  color: var(--maroon);
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition: opacity 0.25s ease, transform 0.5s var(--ease-out-strong);
  pointer-events: none;
}
.gf-say.is-on { opacity: 1; transform: none; }

/* ≤ 7 days: a small ribbon */
.gf-week {
  position: absolute;
  top: 14%;
  left: 0;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.36rem 0.85rem 0.36rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(160deg, var(--maroon), var(--maroon-deep));
  color: var(--maroon-paper);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 14px 30px -12px rgba(82, 26, 40, 0.6), inset 0 1px 0 rgba(255, 249, 244, 0.16);
  rotate: -5deg;
  transform-origin: 0 50%;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.gf-stage.is-week .gf-week { display: inline-flex; }
.gf-week svg { width: 0.85rem; height: 0.85rem; flex: none; color: var(--rose-soft); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.gf-week .ar { color: #F9C9D7; font-weight: 700; font-size: 0.86rem; }
/* ...and a tiny idle wiggle every ~8s */
.gf-stage.is-week.is-live .gf-box:not(.is-refuse):not(:disabled) { animation: gf-idle 8s ease-in-out 2.5s infinite; }
@keyframes gf-idle {
  0%, 7%, 100% { transform: rotate(0); }
  1.5% { transform: rotate(-2.6deg); }
  3.4% { transform: rotate(2.4deg); }
  5.3% { transform: rotate(-1.1deg); }
}

/* the card that rises out of the box */
.gf-rise-clip {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 46.6%;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  perspective: 900px;
}
.gf-rise {
  position: absolute;
  left: 31%;
  width: 38%;
  bottom: -3%;
  height: 94%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6%;
  border-radius: 6px;
  background:
    radial-gradient(120% 40% at 50% 0%, #FFFFFF 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #FFFDFB 0%, #FCF3EE 100%);
  border: 1px solid rgba(217, 108, 138, 0.18);
  box-shadow: 0 18px 40px -18px rgba(82, 26, 40, 0.55), inset 0 1px 1px #fff;
  transform-origin: 50% 100%;
  transform: translate3d(0, 104%, 0) rotateX(-58deg);
  opacity: 0;
}
.gf-rise::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(217, 108, 138, 0.16);
  border-radius: 3px;
}
.gf-rise-in {
  font-size: clamp(0.82rem, 3.6vw, 1.02rem);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.gf-rise-in .ar { color: var(--rose); }

/* the burst of light */
.gf-flash {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 150%;
  aspect-ratio: 1;
  z-index: 3;
  border-radius: 50%;
  translate: -50% -50%;
  background: radial-gradient(circle, rgba(255, 238, 205, 0.98) 0%, rgba(255, 216, 165, 0.6) 20%, rgba(232, 160, 176, 0.28) 38%, transparent 60%);
  opacity: 0;
  pointer-events: none;
}

/* ---- Refusal: jiggle, the lid lifts a hair, the glow flares, the bow bounces ---- */
.gf-box.is-refuse { animation: gf-jiggle 0.66s var(--ease-out-strong); }
@keyframes gf-jiggle {
  0% { transform: rotate(0); }
  16% { transform: rotate(-6deg); }
  38% { transform: rotate(6deg); }
  58% { transform: rotate(-3.4deg); }
  78% { transform: rotate(1.4deg); }
  100% { transform: rotate(0); }
}
.gf-box.is-refuse .gf-lid { animation: gf-lidlift 0.74s var(--ease-out-strong); }
@keyframes gf-lidlift {
  0% { transform: none; }
  32% { transform: translateY(-6px) rotate(-1.6deg); }
  52% { transform: translateY(-5px) rotate(-1.1deg); }
  100% { transform: none; }
}
.gf-box.is-refuse .gf-flare { animation: gf-flare 0.74s ease-out; }
@keyframes gf-flare {
  0% { opacity: 0; transform: scale(0.8, 0.6); }
  34% { opacity: 0.95; transform: scale(1.05, 1.3); }
  100% { opacity: 0; transform: scale(1.1, 1.4); }
}
.gf-box.is-refuse .gf-seam { animation: gf-seamlit 0.74s ease-out; }
@keyframes gf-seamlit {
  0% { opacity: 0.4; }
  34% { opacity: 1; transform: scaleY(2.4); }
  100% { opacity: 0.4; }
}
.gf-box.is-refuse .gf-bow { animation: gf-bowbounce 0.8s var(--ease-spring) 0.08s; }
@keyframes gf-bowbounce {
  0% { transform: none; }
  30% { transform: translateY(-7px) scale(1.06, 0.94); }
  56% { transform: translateY(2px) scale(0.97, 1.05); }
  100% { transform: none; }
}
.gf-box.is-refuse .gf-tag { animation: gf-tagswing 1.1s var(--ease-out-strong); }
@keyframes gf-tagswing {
  0% { rotate: 9deg; }
  22% { rotate: 19deg; }
  52% { rotate: 2deg; }
  78% { rotate: 12deg; }
  100% { rotate: 9deg; }
}

/* ---- Entrance ---- */
.gf-anim .gf-holder {
  opacity: 0;
  transform: translate3d(0, 56px, 0) scale(0.94);
}
.gf-anim.is-in .gf-holder {
  opacity: 1;
  transform: none;
  transition: transform 1.2s var(--ease-out-strong), opacity 0.6s ease;
}
.gf-anim .gf-tag { rotate: -18deg; opacity: 0; }
.gf-anim.is-in .gf-tag {
  rotate: 9deg;
  opacity: 1;
  transition: rotate 1.2s var(--ease-spring) 0.55s, opacity 0.4s ease 0.5s;
}
.gf-anim .gf-week { opacity: 0; transform: translate3d(-10px, 0, 0); }
.gf-anim.is-in .gf-week { opacity: 1; transform: none; transition: opacity 0.5s ease 0.9s, transform 0.8s var(--ease-out-strong) 0.9s; }
.gf-anim .gf-sleeps,
.gf-anim .gf-sleeps-t,
.gf-anim .gf-slot,
.gf-anim .gf-line,
.gf-anim .gf-note {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
}
.gf-anim.is-in .gf-sleeps { opacity: 1; transform: none; transition: opacity 0.6s ease 0.3s, transform 0.9s var(--ease-out-strong) 0.3s; }
.gf-anim.is-in .gf-sleeps-t { opacity: 1; transform: none; transition: opacity 0.6s ease 0.4s, transform 0.9s var(--ease-out-strong) 0.4s; }
.gf-anim.is-in .gf-slot {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease calc(0.5s + var(--i) * 70ms), transform 0.9s var(--ease-out-strong) calc(0.5s + var(--i) * 70ms);
}
.gf-anim.is-in .gf-line { opacity: 1; transform: none; transition: opacity 0.7s ease 0.85s, transform 0.9s var(--ease-out-strong) 0.85s; }
.gf-anim.is-in .gf-note { opacity: 1; transform: none; transition: opacity 0.7s ease 1s, transform 0.9s var(--ease-out-strong) 1s; }

/* ---- Countdown ---- */
.gf-meta {
  max-width: 560px;
  margin: 1.1rem auto 0;
  transition: opacity 0.7s ease, transform 0.8s var(--ease-in-out-strong), filter 0.7s ease;
}
.gf-meta[hidden] { display: none; }
.gf-meta.is-gone {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  filter: blur(6px);
  pointer-events: none;
}
.gf-sleeps {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.3rem;
}
.gf-moon {
  width: clamp(1.4rem, 6vw, 1.7rem);
  height: clamp(1.4rem, 6vw, 1.7rem);
  margin-top: 0.42em;
  flex: none;
  fill: none;
  stroke: var(--rose);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gf-sleeps-n {
  display: inline-flex;
  font-size: clamp(3.6rem, 18vw, 5.2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.gf-sleeps-t {
  margin-top: 0.15rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.gf-count {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.4rem, 2.4vw, 1rem);
  margin-top: 1.3rem;
  padding: 0 0.2rem;
}
.gf-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.32rem;
  min-width: 0;
}
.gf-num {
  display: inline-flex;
  font-size: clamp(2rem, 9.6vw, 2.8rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.gf-slot:last-of-type .gf-num { color: var(--rose); }
.gf-d {
  display: inline-block;
  width: 0.6em;
  height: 1.08em;
  overflow: hidden;
  text-align: center;
}
.gf-r {
  display: flex;
  flex-direction: column;
  transform: translate3d(0, -1em, 0);
  transition: transform 0.55s var(--ease-out-strong);
  will-change: transform;
}
.gf-r i {
  display: block;
  height: 1em;
  line-height: 1.08;
  font-style: normal;
}
.gf-sep {
  font-size: clamp(1.4rem, 6.6vw, 1.9rem);
  font-weight: 900;
  line-height: 1;
  padding-top: 0.2em;
  color: var(--rose-soft);
}
.gf-lbl {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* the unwrapping line */
.gf-line {
  max-width: 340px;
  margin: 1.7rem auto 0;
}
.gf-line-text {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.gf-line-text strong { font-weight: 700; color: var(--rose); }
.gf-track {
  position: relative;
  height: 3px;
  margin-top: 0.7rem;
  border-radius: 99px;
  background: rgba(217, 108, 138, 0.14);
}
.gf-fill {
  --gf-p: 0;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rose-soft), var(--rose) 70%, var(--maroon-soft));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1.6s var(--ease-in-out-strong) 0.9s;
}
.gf-fill::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  translate: 0 -50%;
  background: var(--rose);
  box-shadow: 0 0 0 3px rgba(253, 248, 245, 0.95), 0 0 14px 2px rgba(217, 108, 138, 0.5);
  transform: scaleX(calc(1 / max(var(--gf-p), 0.01)));
}
.gf-stage.is-in .gf-fill { transform: scaleX(var(--gf-p)); }
.gf-stage:not(.gf-anim) .gf-fill { transform: scaleX(var(--gf-p)); transition: none; }
.gf-note {
  margin-top: 1.3rem;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-soft);
}

/* ---- Paper (the birthday letter) ---- */
.gf-paper {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(2.6rem, 7.5vw, 3.8rem) clamp(1.6rem, 6.4vw, 3.8rem) clamp(2.2rem, 6vw, 3.4rem);
  background:
    radial-gradient(70% 30% at 50% 0%, rgba(246, 220, 227, 0.7) 0%, rgba(246, 220, 227, 0) 70%),
    radial-gradient(120% 40% at 50% 0%, #FFFFFF 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #FFFDFB 0%, #FCF3EE 100%);
  border: 1px solid rgba(217, 108, 138, 0.16);
  box-shadow: var(--shadow-ambient), inset 0 1px 1px rgba(255, 255, 255, 0.95);
  text-align: left;
}
.gf-paper[hidden] { display: none; }
.gf-paper::before {
  content: '';
  position: absolute;
  inset: 0.7rem;
  border: 1px solid rgba(217, 108, 138, 0.15);
  border-radius: calc(var(--radius-xl) - 0.7rem);
  pointer-events: none;
}
.gf-paper::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.gf-paper.is-enter {
  opacity: 0;
  transform: translate3d(0, 22px, 0) scale(0.96);
}
.gf-paper.is-enter.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease 0.2s, transform 1.1s var(--ease-out-strong) 0.2s;
}
.gf-ribbon {
  position: absolute;
  top: 3rem;
  right: -4.6rem;
  z-index: 3;
  padding: 0.3rem 3.6rem;
  background: linear-gradient(145deg, var(--rose), var(--maroon-soft));
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 8px 18px -8px rgba(110, 36, 54, 0.6);
  transform: rotate(45deg) translate3d(0, -160%, 0);
  opacity: 0;
  transition: transform 0.7s var(--ease-out-strong) 0.9s, opacity 0.3s ease 0.9s;
  pointer-events: none;
}
.gf-paper.is-in .gf-ribbon { transform: rotate(45deg); opacity: 1; }
.gf-phead {
  display: flex;
  justify-content: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose);
}
.gf-kicker { display: inline-flex; align-items: center; gap: 0.55rem; }
.gf-kicker svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gf-ptitle {
  margin-top: 0.9rem;
  font-size: clamp(1.9rem, 7.6vw, 2.7rem);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-align: left;
  color: var(--ink);
}
.gf-ptitle .ar { color: var(--rose); }
.gf-ornament {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.5rem 0 1.9rem;
  color: var(--rose);
}
.gf-ornament svg { width: 0.85rem; height: 0.85rem; fill: currentColor; }
.gf-ornament span {
  width: 3.4rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(217, 108, 138, 0.55), transparent);
}
.gf-ornament span:first-child { transform: scaleX(-1); }
.gf-pbody p {
  font-size: clamp(1.06rem, 4.1vw, 1.26rem);
  line-height: 2.05;
  color: var(--ink);
  text-wrap: pretty;
  margin-bottom: 1.35em;
}
.gf-pbody p:last-child { margin-bottom: 0; }
.gf-pbody .gf-salute {
  font-size: clamp(1.4rem, 5.6vw, 1.85rem);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
}
.gf-pbody p.gf-beat {
  max-width: 17em;
  margin: 2.3em auto;
  font-size: clamp(1.24rem, 5.1vw, 1.6rem);
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  text-wrap: balance;
  color: var(--maroon);
}
.gf-pbody p.gf-beat::before {
  content: '';
  display: block;
  width: 2.2rem;
  height: 1px;
  margin: 0 auto 1em;
  background: rgba(217, 108, 138, 0.5);
}
.gf-pbody p.ar {
  text-align: right;
  line-height: 2.2;
  font-size: clamp(1.14rem, 4.5vw, 1.34rem);
  margin-bottom: 0.5em;
}
.gf-pbody p.gf-beat + p.ar { margin-top: 0; }

/* masked words */
.gf-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.14em 0.04em 0.16em;
  margin: -0.14em -0.04em -0.16em;
}
.gf-w-ar { padding: 0.26em 0.06em 0.22em; margin: -0.26em -0.06em -0.22em; }
.gf-wi { display: inline-block; }
.gf-punct { display: inline; }
.gf-paper.is-masked .gf-wi { transform: translate3d(0, 108%, 0); }
.gf-paper.is-masked.is-inked .gf-wi {
  transform: none;
  transition: transform 0.85s var(--ease-out-strong) calc(var(--i, 0) * 16ms);
}

/* signature */
.gf-sign { position: relative; margin-top: 2.4rem; text-align: right; }
.gf-sign-name {
  display: inline-block;
  font-size: clamp(1.45rem, 5.6vw, 1.9rem);
  font-weight: 900;
  line-height: 1.6;
  background: linear-gradient(120deg, var(--rose), var(--maroon-soft));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease, transform 0.8s var(--ease-out-strong);
}
.gf-underline {
  display: block;
  width: min(13rem, 62%);
  height: 0.9rem;
  margin: 0.15rem 0 0 auto;
  overflow: visible;
  fill: none;
  stroke: var(--rose-soft);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transform: scaleX(-1);
}
.gf-paper.is-signed .gf-sign-name { opacity: 1; transform: none; }
.gf-paper.is-signed .gf-underline {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.2s var(--ease-in-out-strong) 0.35s;
}
.gf-stage.is-instant .gf-sign-name,
.gf-stage.is-instant .gf-underline,
.gf-stage.is-instant .gf-ribbon { transition: none; }

/* ---- The ceremony ---- */
/* 0. the tag lets go */
.gf-stage.is-ceremony .gf-tag,
.gf-stage.is-ceremony .gf-thread,
.gf-stage.is-ceremony .gf-week { opacity: 0; }
.gf-stage.is-ceremony .gf-box { animation: none; }
/* 1. the ribbon unties: both bands slide off, the bow lifts then falls away */
.gf-stage.is-untie .gf-rib-v { animation: gf-ribv 1.05s cubic-bezier(0.65, 0, 0.35, 1) forwards; }
@keyframes gf-ribv {
  0% { transform: none; opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translateY(-200px); opacity: 0; }
}
.gf-stage.is-untie .gf-rib-h { animation: gf-ribh 1.05s cubic-bezier(0.65, 0, 0.35, 1) 0.12s forwards; }
@keyframes gf-ribh {
  0% { transform: none; opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translateX(270px); opacity: 0; }
}
.gf-stage.is-untie .gf-bow { animation: gf-bowfly 1.6s cubic-bezier(0.45, 0, 0.55, 1) forwards; }
@keyframes gf-bowfly {
  0% { transform: none; opacity: 1; }
  28% { transform: translateY(-36px) scale(1.06) rotate(-6deg); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translate(64px, 160px) rotate(40deg) scale(0.92); opacity: 0; }
}
/* 2. the lid flies up and off, light pours out */
.gf-stage.is-unlid .gf-lid { animation: gf-lidfly 1.6s cubic-bezier(0.4, 0, 0.6, 1) forwards; }
@keyframes gf-lidfly {
  0% { transform: none; opacity: 1; }
  38% { transform: translate(-10px, -156px) rotate(-16deg); opacity: 1; }
  82% { opacity: 1; }
  100% { transform: translate(-84px, 96px) rotate(-48deg); opacity: 0; }
}
.gf-stage.is-unlid .gf-glow { animation: gf-glowup 1.8s ease-out forwards; }
@keyframes gf-glowup {
  0% { opacity: 0.7; transform: none; }
  30% { opacity: 1; transform: translateY(-6px) scale(1.3, 2.4); }
  100% { opacity: 0.35; transform: translateY(-4px) scale(1.1, 1.6); }
}
.gf-stage.is-unlid .gf-flare { animation: gf-bigflare 1.4s ease-out 0.28s forwards; }
@keyframes gf-bigflare {
  0% { opacity: 0; transform: scale(0.9, 0.7); }
  30% { opacity: 1; transform: scale(1.3, 2); }
  100% { opacity: 0; transform: scale(1.6, 2.6); }
}
.gf-stage.is-unlid .gf-seam { opacity: 1; transform: scaleY(3); transition: opacity 0.3s ease, transform 0.5s ease; }
.gf-stage.is-unlid .gf-warm { opacity: 0; }
/* 3. a card rises out of the box and unfolds */
.gf-stage.is-rising .gf-rise {
  opacity: 1;
  transform: translate3d(0, 0, 0) rotateX(-34deg);
  transition: transform 0.95s var(--ease-out-strong), opacity 0.3s ease;
}
.gf-stage.is-unfold .gf-rise {
  transform: translate3d(0, 0, 0) rotateX(0deg) scale(1.04);
  transition: transform 0.85s var(--ease-in-out-strong);
}
/* 4. it becomes the letter: the scene fades, the paper takes the stage */
.gf-stage.is-settling .gf-holder {
  opacity: 0;
  transform: translate3d(0, 16px, 0) scale(0.96);
  transition: opacity 0.75s ease 0.1s, transform 1s var(--ease-in-out-strong);
  pointer-events: none;
}
.gf-stage.is-settling .gf-rise {
  opacity: 0;
  transform: translate3d(0, -34%, 0) scale(1.55);
  transition: transform 1s var(--ease-in-out-strong), opacity 0.5s ease 0.25s;
}
.gf-stage.is-settling .gf-say { opacity: 0; }

/* ---- Desktop ---- */
@media (min-width: 768px) {
  .gift { padding: 8rem 1.2rem 10rem; }
  .gift .section-head { margin-bottom: 3rem; }
  .gf-stage { max-width: 470px; }
  .gf-stage.is-open { max-width: 720px; }
  .gf-scene { padding-bottom: 2.8rem; }
  .gf-meta { margin-top: 2rem; }
  .gf-sleeps-t { font-size: 0.78rem; }
  .gf-lbl { font-size: 0.66rem; }
  .gf-count { margin-top: 1.5rem; }
  .gf-pbody p { line-height: 2.1; }
  .gf-week { font-size: 0.8rem; }
}

/* ---- Hover only where hover exists ---- */
@media (hover: hover) and (pointer: fine) {
  .gf-box:not(:disabled):hover .gf-glow { opacity: 0.9; }
  .gf-box:not(:disabled):hover .gf-tag-card { transform: rotate(-3deg); transition-duration: 0.6s; }
  .gf-box:not(:disabled):hover .gf-tag.is-flipped .gf-tag-card { transform: rotateY(180deg) scale(1.22); }
}

/* ---- Reduced motion: no loops, plain updates, simple fades ---- */
@media (prefers-reduced-motion: reduce) {
  .gf-glow, .gf-warm, .gf-flare { will-change: auto; }
  .gf-stage.is-live .gf-glow,
  .gf-stage.is-week.is-live .gf-box,
  .gf-box.is-refuse,
  .gf-box.is-refuse .gf-lid,
  .gf-box.is-refuse .gf-flare,
  .gf-box.is-refuse .gf-seam,
  .gf-box.is-refuse .gf-bow,
  .gf-box.is-refuse .gf-tag { animation: none; }
  .gf-r { transition: none; }
  .gf-tag-card { transition: opacity 0.3s ease; }
  .gf-tag.is-flipped .gf-tag-card { transform: rotateY(180deg); }
  .gf-say { transform: none; transition: opacity 0.3s ease; }
  .gf-anim .gf-holder,
  .gf-anim .gf-tag,
  .gf-anim .gf-week,
  .gf-anim .gf-sleeps,
  .gf-anim .gf-sleeps-t,
  .gf-anim .gf-slot,
  .gf-anim .gf-line,
  .gf-anim .gf-note { opacity: 1; transform: none; transition: none; }
  .gf-anim .gf-tag { rotate: 9deg; }
  .gf-fill { transition: none; }
  .gf-meta { transition: opacity 0.3s ease; transform: none; filter: none; }
  .gf-meta.is-gone { transform: none; filter: none; }
  .gf-paper.is-enter { transform: none; }
  .gf-paper.is-enter.is-in { transition: opacity 0.5s ease; }
  .gf-ribbon { transform: rotate(45deg); transition: opacity 0.3s ease; }
  .gf-underline { transition: none; }
  .gf-sign-name { transform: none; transition: opacity 0.3s ease; }
}
