/* Gift voucher showcase ("Подари движение") — home page section, client's MAISON LÉA gift card design.
   Cards are pure HTML/CSS so the amount can change live; text scales with the card (container units). */

.gift {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 100%, #5A4A3E 0%, #3A302A 46%, #2B2420 100%);
  color: var(--white);
  padding-block: clamp(64px, 9vw, 120px) clamp(40px, 6vw, 72px);
  margin-block: clamp(40px, 6vw, 80px);
}
/* warm glow under the cards */
.gift::before {
  content: ""; position: absolute; left: 50%; bottom: -18%; z-index: -1;
  width: min(1100px, 120vw); aspect-ratio: 2 / 1; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(208, 185, 167, .28), rgba(168, 148, 127, .08) 60%, transparent);
  filter: blur(10px);
}
.gift-in { display: grid; justify-items: center; text-align: center; gap: 18px; }
.gift .eyebrow { color: #D0B9A7; }
.gift h2 { color: var(--white); }
.gift h2 .italic { color: #E3D5C7; }
.gift-lead { max-width: 54ch; color: rgba(250, 248, 244, .78); font-size: clamp(15px, 1.4vw, 17px); line-height: 1.65; }

.gift-amounts { display: flex; gap: 8px; margin-top: 6px; padding: 5px; border-radius: 999px; background: rgba(250, 248, 244, .08); border: 1px solid rgba(250, 248, 244, .14); }
.gift-amounts button {
  border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer;
  font: 600 14px/1 var(--body); color: rgba(250, 248, 244, .8); background: transparent;
  transition: background .35s ease, color .35s ease;
}
.gift-amounts button:hover { color: var(--white); }
.gift-amounts button[aria-checked="true"] { background: #E3D5C7; color: var(--cocoa); }
.gift-amounts button:focus-visible { outline: 2px solid #E3D5C7; outline-offset: 2px; }
.gift-cta {
  margin-top: 4px; background: #E3D5C7; border-color: #E3D5C7; color: var(--cocoa);
}
.gift-cta:hover { background: var(--white); border-color: var(--white); color: var(--cocoa); }

/* ---------- stage with the two cards ---------- */
.gift-stage {
  position: relative; width: min(760px, 100%); height: clamp(290px, 40vw, 430px);
  margin-top: clamp(28px, 4vw, 48px); perspective: 1400px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.gift-tilt { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.gcard {
  position: absolute; width: min(470px, 74%); aspect-ratio: 1.6; container-type: inline-size;
  border-radius: 14px; overflow: hidden; color: #4A3D33;
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(255, 255, 255, .55), transparent 60%),
    radial-gradient(90% 80% at 90% 100%, rgba(208, 185, 167, .22), transparent 60%),
    #F2EAE0;
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .65), 0 12px 24px -12px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .5);
  transition: transform .9s cubic-bezier(.2, .7, .2, 1), z-index 0s .3s, filter .6s ease;
  will-change: transform;
}
/* resting layout: back card behind on the right, front card ahead on the left */
.gcard--back { left: 34%; top: 20%; z-index: 1; transform: rotate(9deg); filter: brightness(.94); }
.gcard--front { left: 4%; top: 6%; z-index: 2; transform: rotate(-6deg); }
.gift-stage.is-swapped .gcard--back { z-index: 3; transform: translate(-30%, -12%) rotate(-4deg); filter: none; }
.gift-stage.is-swapped .gcard--front { z-index: 1; transform: translate(26%, 14%) rotate(8deg); filter: brightness(.94); }
@media (hover: hover) {
  .gift-stage:not(.is-swapped):hover .gcard--front { transform: translate(-2%, -3%) rotate(-7deg); }
  .gift-stage:not(.is-swapped):hover .gcard--back { transform: translate(3%, 2%) rotate(11deg); }
}
/* entrance: cards rise and settle when the section scrolls in */
.gift-stage:not(.is-in) .gcard--front { transform: translateY(30%) rotate(-14deg); opacity: 0; }
.gift-stage:not(.is-in) .gcard--back { transform: translateY(40%) rotate(18deg); opacity: 0; }
.gcard { transition-property: transform, opacity, filter; }
.gift-stage.is-in .gcard--back { transition-delay: .12s; }

/* soft beige waves on the card edges (client design) */
.gcard-wave { position: absolute; top: 0; bottom: 0; width: 30%; pointer-events: none; }
.gcard-wave--l { left: 0; }
.gcard-wave--r { right: 0; transform: scaleX(-1); }
.gcard-wave path { vector-effect: non-scaling-stroke; }

/* front */
.gcard-front { position: absolute; inset: 0; display: grid; justify-items: center; align-content: center; text-align: center; padding: 6cqw 18cqw; }
.gc-brand { font: 500 6.4cqw/1 var(--display); letter-spacing: .1em; color: #4A3D33; }
.gc-sub { font: 500 1.9cqw/1 var(--body); letter-spacing: .32em; color: #8C7867; margin-top: 1.6cqw; }
.gc-title { font: 500 5.2cqw/1 var(--display); letter-spacing: .12em; color: #A8947F; margin-top: 5cqw; }
.gc-amount { font: 500 15cqw/1 var(--display); color: #4A3D33; margin-top: 1.6cqw; display: inline-flex; align-items: baseline; gap: 2cqw; }
.gc-amount b { font-weight: 500; display: inline-block; }
.gc-note { font: 500 1.9cqw/1.6 var(--body); letter-spacing: .14em; color: #6B5D52; margin-top: 2.6cqw; }
.gc-rule { width: 70%; height: 1px; background: #CDB8A3; margin-top: 3.2cqw; }
.gc-tag { font: 500 1.9cqw/1 var(--body); letter-spacing: .3em; color: #6B5D52; margin-top: 2.6cqw; word-spacing: .6em; }
.gc-amount b.is-rolling { animation: gc-roll .5s cubic-bezier(.2, .7, .2, 1); }
@keyframes gc-roll { 0% { opacity: 0; translate: 0 35%; } 100% { opacity: 1; translate: 0 0; } }

/* back */
.gcard-back { position: absolute; inset: 0; padding: 7cqw 7cqw 6cqw 8cqw; display: grid; grid-template-rows: auto auto 1fr auto; text-align: left; }
.gcard-back .gc-head { display: flex; justify-content: space-between; align-items: start; }
.gcard-back .gc-brand { font-size: 5.6cqw; }
.gcard-back .gc-sub { margin-top: 1.4cqw; }
.gc-motto { font: 500 1.8cqw/1.55 var(--body); letter-spacing: .24em; color: #6B5D52; text-align: right; }
.gc-text { font: 400 2.25cqw/1.55 var(--body); color: #5A4C41; margin-top: 3cqw; max-width: 74%; }
.gc-fields { display: grid; gap: 3.2cqw; align-content: center; margin-top: 2cqw; }
.gc-field { display: flex; align-items: end; gap: 1.6cqw; font: 600 1.8cqw/1 var(--body); letter-spacing: .14em; color: #6B5D52; }
.gc-field i { flex: 1; height: 1px; background: #CDB8A3; }
.gc-field--2 { gap: 1.6cqw; }
.gc-field--2 i { flex: 1; }
.gc-foot { display: flex; align-items: center; gap: 2.4cqw; font: 400 1.85cqw/1.5 var(--body); color: #6B5D52; margin-top: 2cqw; }
.gc-foot svg { width: 5cqw; height: 5cqw; flex: none; color: #A8947F; }

/* round "ML" seal sticker, like the envelope seal */
.gift-seal {
  position: absolute; z-index: 4; left: calc(4% + min(470px, 74%) - 9%); top: 0;
  width: clamp(64px, 9vw, 92px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; align-content: center; text-align: center;
  background: radial-gradient(circle at 35% 30%, #EADCCD, #D0B9A7 70%, #BFA690);
  box-shadow: 0 14px 26px -12px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 6px rgba(119, 99, 84, .25);
  color: #5A4A3E; transform: rotate(-8deg); transition: transform .9s cubic-bezier(.2, .7, .2, 1), opacity .6s ease;
}
.gift-seal b { font: 500 clamp(20px, 2.8vw, 30px)/1 var(--display); letter-spacing: -.02em; }
.gift-seal small { font: 600 clamp(5px, .62vw, 7px)/1.3 var(--body); letter-spacing: .18em; margin-top: 2px; }
.gift-stage.is-swapped .gift-seal { transform: translate(-40%, -10%) rotate(-20deg); }
.gift-stage:not(.is-in) .gift-seal { opacity: 0; transform: scale(.6) rotate(-30deg); }
.gift-stage.is-in .gift-seal { transition-delay: .35s; }

.gift-hint { margin-top: 0; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(250, 248, 244, .55); }

@media (max-width: 640px) {
  .gift-stage { height: auto; aspect-ratio: 1 / .9; }
  .gcard { width: 80%; }
  .gcard--front { left: 2%; top: 4%; }
  .gcard--back { left: 18%; top: 34%; }
  .gift-seal { left: auto; right: 8%; top: 0; }
  .gift-stage.is-swapped .gcard--back { transform: translate(-14%, -30%) rotate(-4deg); }
  .gift-stage.is-swapped .gcard--front { transform: translate(14%, 30%) rotate(7deg); }
  .gift-amounts button { padding: 10px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .gcard, .gift-seal, .gift-tilt { transition: none !important; }
  .gift-stage:not(.is-in) .gcard, .gift-stage:not(.is-in) .gift-seal { opacity: 1; }
  .gift-stage:not(.is-in) .gcard--front { transform: rotate(-6deg); }
  .gift-stage:not(.is-in) .gcard--back { transform: rotate(9deg); }
  .gc-amount b.is-rolling { animation: none; }
}
