/* Kyleu gift cards (assets/js/giftcard.js): the card itself, used by gift.html and the admin.
   Sizes are in cqw (a share of the card's width), so a small card in a list looks like the big one. */
.gc { position: relative; width: 100%; max-width: 460px; aspect-ratio: 856 / 540; perspective: 1600px; container-type: inline-size; font-family: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; color: #fff; }
.gc-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.gc.flipped .gc-in { transform: rotateY(180deg); }
.gc-face { position: absolute; inset: 0; border-radius: 4.6cqw; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; box-shadow: 0 2.4cqw 6cqw -2.4cqw rgba(30, 16, 6, .55), 0 0 0 1px rgba(255, 255, 255, .08) inset; }
.gc-flat .gc-face { box-shadow: 0 6px 16px -8px rgba(30, 16, 6, .5); }
.gc-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gc-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .28) 0%, rgba(0, 0, 0, 0) 26%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, .55) 100%); }
.gc-shine { position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .28) 50%, transparent 60%); transform: translateX(-60%); pointer-events: none; }
.gc:hover .gc-shine, .gc.shine .gc-shine { animation: gcShine 1.4s ease; }
@keyframes gcShine { to { transform: translateX(60%); } }
.gc-top { position: absolute; left: 5.5cqw; right: 5.5cqw; top: 5cqw; display: flex; align-items: center; justify-content: space-between; gap: 2cqw; }
.gc-brand { display: inline-flex; align-items: center; gap: 1.2cqw; font-weight: 800; font-size: 3.3cqw; letter-spacing: .14em; text-transform: uppercase; text-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.gc-brand svg { width: 4.2cqw; height: 4.2cqw; color: #ffd27a; }
.gc-pill { font-size: 2.6cqw; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; padding: .9cqw 2.4cqw; border-radius: 99px; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.gc-bot { position: absolute; left: 5.5cqw; right: 5.5cqw; bottom: 5cqw; display: flex; align-items: flex-end; justify-content: space-between; gap: 3cqw; }
.gc-ttl { min-width: 0; }
.gc-ttl b { display: block; font-family: 'Fraunces', Georgia, 'Times New Roman', serif; font-weight: 600; font-size: 6.6cqw; line-height: 1.05; text-shadow: 0 2px 10px rgba(0, 0, 0, .4); overflow-wrap: anywhere; }
.gc-ttl span { display: block; margin-top: 1.2cqw; font-family: 'Caveat', 'Segoe Print', cursive; font-size: 5.4cqw; line-height: 1; color: #ffe3a3; text-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
.gc-val { flex: none; text-align: right; }
.gc-val b { display: block; font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 7.2cqw; line-height: 1; color: #ffd27a; text-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.gc-val span { display: block; font-size: 2.6cqw; font-weight: 700; letter-spacing: .04em; opacity: .92; margin-top: .8cqw; }
.gc-stamp { position: absolute; right: 6cqw; top: 40%; transform: rotate(-12deg); border: .6cqw solid rgba(255, 255, 255, .9); color: #fff; border-radius: 1.6cqw; padding: .6cqw 2.4cqw; font-weight: 900; font-size: 5cqw; letter-spacing: .12em; text-transform: uppercase; background: rgba(120, 30, 20, .55); }
.gc-front:has(.gc-stamp) .gc-art { filter: grayscale(.7) brightness(.85); }

/* the back: a card of paper with the message, what it is worth and the code */
.gc-back { transform: rotateY(180deg); background: #fffaf0; color: #2a1b12; }
.gc-paper { position: absolute; inset: 0; padding: 5.5cqw 6cqw; display: grid; grid-template-rows: 1fr auto auto; gap: 2.4cqw;
  background: radial-gradient(circle at 12% 8%, rgba(244, 183, 64, .18), transparent 40%), repeating-linear-gradient(0deg, rgba(74, 52, 36, .035) 0 1px, transparent 1px 4px), #fffaf0; }
.gc-paper::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1.6cqw; background: linear-gradient(90deg, #e8731c, #f4b740, #7e8c4e, #b8461a); }
.gc-msg { min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.gc-msg p { margin: 0; font-family: 'Caveat', 'Segoe Print', cursive; font-size: 5.6cqw; line-height: 1.08; color: #3b2718; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.gc-from { margin-top: 1.2cqw; font-family: 'Caveat', 'Segoe Print', cursive; font-size: 4.8cqw; color: #b8461a; text-align: right; }
.gc-facts { display: grid; grid-template-columns: 1.15fr 1.35fr .9fr; gap: 2cqw; padding-top: 2.2cqw; border-top: 1px dashed rgba(74, 52, 36, .3); }
.gc-facts small { display: block; font-size: 2.2cqw; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #8a7a68; }
.gc-facts b { display: block; font-size: 3.4cqw; line-height: 1.15; margin-top: .6cqw; }
.gc-facts em { font-style: normal; font-weight: 600; font-size: 2.6cqw; color: #6b5544; }
.gc-facts .gc-left { color: #3f7d3a; text-transform: none; letter-spacing: 0; font-size: 2.5cqw; margin-top: .4cqw; }
.gc-code { display: flex !important; align-items: center; gap: .6cqw; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .06em; }
.gc-code span { background: #2a1b12; color: #ffd27a; border-radius: 1cqw; padding: .5cqw 1.1cqw; font-size: 3cqw; }
.gc-code i { font-style: normal; color: #8a7a68; }
.gc-how { margin: 0; font-size: 2.3cqw; line-height: 1.35; color: #6b5544; }

/* the night look: its fire and stars move */
.gc-tw { animation: gcTw 3.2s ease-in-out infinite; }
@keyframes gcTw { 50% { opacity: .15; } }
.gc-fire { transform-origin: 50% 100%; transform-box: fill-box; animation: gcFire .5s ease-in-out infinite alternate; }
@keyframes gcFire { from { transform: scale(1, .92) skewX(-2deg); } to { transform: scale(.94, 1.08) skewX(3deg); } }
.gc-glow { animation: gcGlow 1.6s ease-in-out infinite alternate; }
@keyframes gcGlow { from { opacity: .7; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .gc-in { transition: none; }
  .gc-tw, .gc-fire, .gc-glow, .gc:hover .gc-shine, .gc.shine .gc-shine { animation: none; }
}

/* ---------- the gift card page (gift.html, assets/js/gift.js) ---------- */
.gp-hero { background: radial-gradient(ellipse at 50% 115%, #6b3a2a 0%, #2a1d33 42%, #0e1428 100%); padding-bottom: 72px; min-height: 640px; }
.gp-sky { position: absolute; inset: 0; pointer-events: none; opacity: .8;
  background-image: radial-gradient(1.4px 1.4px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 27% 8%, #fff 50%, transparent 51%), radial-gradient(1.6px 1.6px at 44% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 63% 12%, #fff 50%, transparent 51%), radial-gradient(1.3px 1.3px at 78% 26%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 90% 9%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 6% 40%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 96% 44%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 35% 4%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 56% 32%, #fff 50%, transparent 51%);
  animation: gpTw 6s ease-in-out infinite alternate; }
@keyframes gpTw { to { opacity: .45; } }
.gp-wrap { position: relative; text-align: center; }
.gp-wrap .crumbs { justify-content: center; }
.gp-find { max-width: 620px; margin: 0 auto; }
.gp-find h1 { color: #fff; }
.gp-find .eyebrow { color: var(--gold, #f4b740); }
.gp-form { display: flex; gap: 10px; max-width: 460px; margin: 26px auto 0; }
.gp-form input { flex: 1; min-width: 0; font: inherit; font-size: 1.15rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: center; padding: 14px 16px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .1); color: #fff; }
.gp-form input::placeholder { color: rgba(255, 255, 255, .5); }
.gp-form input:focus { outline: none; border-color: #f4b740; background: rgba(255, 255, 255, .16); }
.gp-msg { min-height: 1.5em; margin: 14px 0 0; color: #ffe3a3; font-weight: 700; }
.gp-msg.bad { color: #ffb4a3; }
.gp-for { font-family: 'Caveat', 'Segoe Print', cursive; font-size: clamp(2rem, 4.4vw, 2.8rem); color: #ffd27a; margin: 6px 0 18px; transform: rotate(-2deg); }
.btn-ghost-light { --bg: transparent; --fg: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.btn-ghost-light:hover { --fg: var(--bark, #2a1b12); background: #fff; }

/* the stage: the envelope, the card and the camp behind it, all in one box */
.gp-stage { position: relative; width: min(780px, 100%); aspect-ratio: 1200 / 640; margin: 0 auto; }
.gp-camp { position: absolute; inset: 0; border-radius: 24px; overflow: hidden; opacity: 0; transform: scale(.55); transition: transform 1.2s cubic-bezier(.2, .8, .2, 1), opacity .5s; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); pointer-events: none; }
.gp-camp .gs-art { width: 100%; height: 100%; display: block; animation: gsZoom 14s ease-out both paused; }
.is-camp .gp-camp { opacity: 1; transform: none; }
.is-camp .gp-camp .gs-art { animation-play-state: running; }
@keyframes gsZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.gs-fly { animation: gsFly 6s ease-in-out infinite; }
@keyframes gsFly { 0% { transform: translate(0, 0); opacity: 0; } 20% { opacity: 1; } 50% { transform: translate(14px, -28px); } 80% { opacity: .8; } 100% { transform: translate(-10px, -56px); opacity: 0; } }
.gs-spark { animation: gsSpark 2.6s linear infinite; }
@keyframes gsSpark { 0% { transform: translate(0, 0); opacity: 1; } 100% { transform: translate(8px, -96px); opacity: 0; } }

.gp-cardbox { position: absolute; left: 50%; top: 50%; width: 59%; transform: translate(-50%, -50%); z-index: 6; transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.gp-cardbox .gc { max-width: none; cursor: pointer; }
.gp-cardbox:hover .gc:not(.flipped) .gc-in { transform: rotateX(4deg) rotateY(-6deg); }
.gp-cardbox:hover .gc.flipped .gc-in { transform: rotateY(180deg) rotateX(-4deg) rotateY(-6deg); }

/* the envelope (only while the card is in it): a back layer under the card and a front layer over it, moving together */
.gp-env { position: absolute; left: 50%; top: 50%; width: 64%; aspect-ratio: 856 / 560; transform: translate(-50%, -46%); opacity: 0; pointer-events: none; transition: transform .9s cubic-bezier(.4, 0, .2, 1), opacity .7s; }
.gp-env-b { z-index: 1; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .45)); }
.gp-env-f { z-index: 3; }
.gp-env-back, .gp-env-front, .gp-env-flap { position: absolute; left: 0; right: 0; }
.gp-env-back { inset: 0; background: #d9c4a0; border-radius: 14px; }
.gp-env-front { inset: 0; z-index: 3; border-radius: 14px; background: linear-gradient(160deg, #f4e7cf, #e4cfaa); clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7%; }
.gp-env-front b { font-family: 'Fraunces', Georgia, serif; font-size: clamp(.8rem, 2.4vw, 1.2rem); letter-spacing: .14em; text-transform: uppercase; color: #8a4a22; }
.gp-env-flap { top: 0; height: 60%; z-index: 4; background: linear-gradient(180deg, #ecdcbc, #dcc499); clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: 50% 0; }
/* the flap opens in two halves of its turn: over the card until it stands up, then behind it */
.gp-flap-f { transition: transform .3s ease-in; }
.gp-flap-b { transform: perspective(700px) rotateX(90deg); visibility: hidden; background: linear-gradient(0deg, #e9d7b4, #d6bd90); transition: transform .35s ease-out .3s, visibility 0s .3s; }
.gp-env-f::after { content: 'K'; position: absolute; left: 50%; top: 56%; width: 13%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 5; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d9542e, #9c2f16); color: #ffd9b8; font: 700 clamp(.9rem, 2.6vw, 1.5rem) / 1 'Fraunces', Georgia, serif; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); transition: opacity .3s; }
.is-sealed .gp-env { opacity: 1; pointer-events: auto; cursor: pointer; animation: gpBob 2.4s ease-in-out infinite; }
@keyframes gpBob { 50% { transform: translate(-50%, -49%) rotate(-1deg); } }
.is-sealed .gp-cardbox { transform: translate(-50%, -44%) scale(.86); z-index: 2; }
.is-sealed .gp-cardbox .gc { pointer-events: none; }
.is-opening .gp-env { animation: none; }
.is-opening .gp-env-f::after { opacity: 0; }
.is-opening .gp-flap-f { transform: perspective(700px) rotateX(90deg); }
.is-opening .gp-flap-b { transform: perspective(700px) rotateX(180deg); visibility: visible; }
.is-out .gp-cardbox { transform: translate(-50%, -96%) scale(.86); transition-duration: .95s; }
.is-landing .gp-cardbox { transform: translate(-50%, -50%); z-index: 6; }
.is-landing .gp-env { transform: translate(-50%, 30%) scale(.9); opacity: 0; }
.gp-tap { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); z-index: 7; border: 0; border-radius: 99px; padding: 10px 22px; font: inherit; font-weight: 800; background: #f4b740; color: #2a1b12; cursor: pointer; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6); animation: gpPulse 1.8s ease-in-out infinite; }
@keyframes gpPulse { 50% { transform: translateX(-50%) scale(1.06); } }

/* Use my gift card: the card opens like two doors */
.gp-half { position: absolute; inset: 0; transition: transform 1.2s cubic-bezier(.5, 0, .2, 1), opacity 1.2s ease-in; }
.gp-half .gc { max-width: none; }
.gp-half-l { clip-path: inset(0 50% 0 0); transform-origin: 0 50%; }
.gp-half-r { clip-path: inset(0 0 0 50%); transform-origin: 100% 50%; }
.is-camp .gp-cardbox > .gc { visibility: hidden; }
.is-swing .gp-half-l { transform: perspective(1400px) rotateY(-118deg); opacity: 0; }
.is-swing .gp-half-r { transform: perspective(1400px) rotateY(118deg); opacity: 0; }
.is-camp .gp-cardbox { pointer-events: none; }

.gp-actions, .gp-btns { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.gp-open { max-width: 640px; margin: 28px auto 0; animation: gpUp .7s cubic-bezier(.2, .8, .2, 1) both; }
.gp-open h2 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.gp-open p { color: rgba(255, 255, 255, .85); font-size: 1.05rem; }
@keyframes gpUp { from { opacity: 0; transform: translateY(16px); } }
.gp-state { margin: 18px auto 0; max-width: 560px; font-weight: 700; color: #c9f0b8; }
.gp-state.bad { color: #ffc4b6; }
.gp-share { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 26px; color: rgba(255, 255, 255, .75); font-weight: 700; font-size: .92rem; }
.gp-sh { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-size: .9rem; text-decoration: none; cursor: pointer; }
.gp-sh:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.gp-sh svg { width: 16px; height: 16px; }
.gp-note { margin: 12px auto 0; font-size: .85rem; color: rgba(255, 255, 255, .6); max-width: 520px; }
.gp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.gp-step { background: var(--paper, #fffcf6); border-radius: var(--radius, 18px); padding: 26px; box-shadow: var(--shadow-sm); }
.gp-step > span { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--sun, #e8731c); color: #fff; font-weight: 900; margin-bottom: 12px; }
.gp-step h3 { font-size: 1.25rem; }
.gp-step p { margin: 0; color: var(--ink-soft, #6b5544); }
.gp-give { margin: 32px 0 0; text-align: center; font-size: 1.05rem; }
@media (max-width: 760px) {
  .gp-hero { min-height: 0; }
  .gp-stage { aspect-ratio: 4 / 3.4; }
  .gp-cardbox { width: 90%; }
  .gp-env { width: 94%; }
  .gp-camp { border-radius: 18px; }
  .gp-form { flex-direction: column; }
  .gp-steps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .gp-sky, .is-sealed .gp-env, .gp-tap, .gs-fly, .gs-spark, .gp-camp .gs-art, .gp-open { animation: none; }
  .gp-camp, .gp-cardbox, .gp-half, .gp-env, .gp-env-flap, .gp-flap-b { transition: none; }
}
@media print {
  .site-header, .site-footer, .gp-actions, .gp-share, .gp-note, .gp-tap, .gp-how, .crumbs, .gp-open, .float-btns, .gp-sky { display: none !important; }
  .gp-hero { background: none; color: #000; padding: 0; min-height: 0; }
  .gp-for { color: #b8461a; }
  .gp-stage { aspect-ratio: auto; width: 100%; }
  .gp-camp, .gp-env { display: none; }
  .gp-cardbox { position: static; transform: none !important; width: 100%; display: grid; gap: 24px; justify-items: center; }
  .gp-cardbox .gc { width: 12cm; perspective: none; aspect-ratio: auto; }
  .gp-cardbox .gc-in { position: relative; transform: none !important; display: grid; gap: 1cm; }
  .gp-cardbox .gc-face { position: relative; inset: auto; aspect-ratio: 856 / 540; transform: none; -webkit-backface-visibility: visible; backface-visibility: visible; box-shadow: none; border: 1px solid #ccc; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
