/* 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).
   Layout (client pick 2026-10-20, "плик" variant 1): the section is an open envelope — silk body,
   a flap folded up behind it with a plain cream liner, the cards slipping out over the fold. */

.gift { color: var(--white); padding-block: clamp(40px, 6vw, 80px); }
.gift-env { position: relative; isolation: isolate; padding-top: clamp(72px, 8vw, 104px); }

/* flap: dark outer edge, plain cream inside, shaded toward the fold */
.env-flap { position: absolute; left: 0; right: 0; top: 0; height: calc(clamp(72px, 8vw, 104px) + 1px); }
.env-flap-out, .env-flap-in { position: absolute; inset: 0; clip-path: polygon(0 100%, 50% 0, 100% 100%); }
.env-flap-out { background: linear-gradient(#8B7464, #6E5A4C); }
.env-flap-in { inset: 7px 3.4% 0; background: linear-gradient(#EFE6DB 55%, #E3D5C7); }

/* body: liquid silk (same WebGL shader as the hero), square top under the flap, rounded bottom */
.env-body {
  position: relative; isolation: isolate; overflow: visible;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 56px); align-items: center;
  padding: clamp(28px, 3vw, 40px) clamp(24px, 4vw, 56px);
  border-radius: 0 0 28px 28px;
  box-shadow: 0 30px 70px -34px rgba(119, 99, 84, .8);
}
.env-body > .liquid-bg { z-index: -3; border-radius: inherit; background-color: #776354; }
/* cocoa wash under the copy + the shadow the folded flap throws onto the body */
.env-shade {
  position: absolute; inset: 0; z-index: -2; pointer-events: none; border-radius: inherit;
  background:
    linear-gradient(rgba(60, 45, 35, .35), transparent 36px),
    linear-gradient(to right, rgba(62, 48, 38, .8), rgba(62, 48, 38, .6) 38%, rgba(62, 48, 38, .18) 62%, rgba(62, 48, 38, 0) 80%);
}
.gift-copy { display: grid; justify-items: start; gap: 14px; text-shadow: 0 1px 2px rgba(40, 30, 22, .6), 0 2px 14px rgba(40, 30, 22, .35); }
.gift-copy .h-lg { font-size: clamp(30px, 3.6vw, 44px); }
.gift-amounts, .gift-cta { text-shadow: none; }
.gift-amounts { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); background: rgba(119, 99, 84, .3); }
.gift .eyebrow { color: var(--white); opacity: 1; }
.gift h2 { color: var(--white); }
.gift h2 .italic { color: var(--white); }
.gift-lead { max-width: 42ch; color: #fff; font-size: 16px; font-weight: 500; line-height: 1.6; }

.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: var(--white); color: var(--text); box-shadow: 0 4px 12px -6px rgba(40, 30, 22, .6); }
.gift-amounts button:focus-visible { outline: 2px solid #E3D5C7; outline-offset: 2px; }
/* light button like the hero ones (.btn--light keeps the silk off); hover only lifts, colour stays */
.gift-cta {
  margin-top: 4px; background: var(--white); border-color: var(--white); color: var(--text);
  box-shadow: 0 6px 20px -8px rgba(80, 64, 52, .7);
  transition: box-shadow .35s ease, transform .35s cubic-bezier(.22, 1, .36, 1);
}
.gift-cta:hover { background: var(--white); border-color: var(--white); color: var(--text); transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(80, 64, 52, .75); }
@media (prefers-reduced-motion: reduce) { .gift-cta:hover { transform: none; } }

/* ---------- 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: var(--text);
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(250, 248, 244, .55), transparent 60%),
    radial-gradient(90% 80% at 90% 100%, rgba(208, 185, 167, .22), transparent 60%),
    #EFE6DB;
  box-shadow: 0 40px 70px -30px rgba(119, 99, 84, .65), 0 12px 24px -12px rgba(119, 99, 84, .35), inset 0 0 0 1px rgba(250, 248, 244, .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: #776354; }
.gc-sub { font: 500 1.9cqw/1 var(--body); letter-spacing: .32em; color: #776354; 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: #776354; 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: #776354; margin-top: 2.6cqw; }
.gc-rule { width: 70%; height: 1px; background: #D0B9A7; margin-top: 3.2cqw; }
.gc-tag { font: 500 1.9cqw/1 var(--body); letter-spacing: .3em; color: #776354; 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: #776354; text-align: right; }
.gc-text { font: 400 2.25cqw/1.55 var(--body); color: #776354; 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: #776354; }
.gc-field i { flex: 1; height: 1px; background: #D0B9A7; }
.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: #776354; 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%, #E3D5C7, #D0B9A7 70%, #D0B9A7);
  box-shadow: 0 14px 26px -12px rgba(119, 99, 84, .6), inset 0 1px 0 rgba(250, 248, 244, .5), inset 0 -2px 6px rgba(119, 99, 84, .25);
  color: var(--text); 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; }

/* ---------- card detail: paper grain, card edge, printed frame, foil type, light sheen ---------- */
.gcard {
  box-shadow:
    0 1px 0 #E3D5C7, 0 2px 0 #D0B9A7, 0 3px 0 rgba(168, 148, 127, .7),
    0 40px 70px -30px rgba(60, 45, 35, .7), 0 12px 24px -12px rgba(60, 45, 35, .45),
    inset 0 0 0 1px rgba(250, 248, 244, .55), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.gc-grain, .gc-frame, .gc-sheen { position: absolute; inset: 0; pointer-events: none; }
.gcard-wave { z-index: 1; }
.gcard-front, .gcard-back { z-index: 2; }
/* cotton-paper fibre + faint laid lines */
.gc-grain {
  z-index: 0; opacity: .55; mix-blend-mode: multiply;
  background:
    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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .47 0 0 0 0 .39 0 0 0 0 .33 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(90deg, rgba(168, 148, 127, .05) 0 1px, transparent 1px 5px);
}
/* printed double hairline frame */
.gc-frame { z-index: 3; inset: 3.2cqw; border: 1px solid rgba(168, 148, 127, .55); border-radius: 1.6cqw; }
.gc-frame::after { content: ""; position: absolute; inset: .9cqw; border: 1px solid rgba(168, 148, 127, .28); border-radius: 1cqw; }
/* light catching the card; follows the pointer through --mx/--my (set by gift.js) */
.gc-sheen {
  z-index: 4; mix-blend-mode: soft-light; opacity: .9;
  background:
    radial-gradient(55% 75% at var(--mx, 28%) var(--my, 18%), rgba(255, 255, 255, .75), transparent 62%),
    linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .35) 44%, transparent 56%);
  background-size: 100% 100%, 260% 100%;
  background-position: 0 0, calc(var(--mx, 28%) * -1.4 + 90%) 0;
  transition: background-position .5s ease;
}
/* champagne foil on brand + amount: a metallic gradient clipped to the letters */
.gc-brand, .gc-title, .gc-amount, .gc-amount b, .gift-seal b {
  background: linear-gradient(100deg, #6A5747 0%, #776354 30%, #9C8470 42%, #C2A68B 50%, #977F6B 58%, #776354 72%, #6A5747 100%);
  background-size: 260% 100%; background-position: calc(var(--mx, 28%) * -1.2 + 85%) 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: background-position .5s ease;
}
.gc-title { background-image: linear-gradient(100deg, #A8947F 0%, #A8947F 35%, #CDB59C 50%, #A8947F 65%); }
.gc-brand, .gc-amount { filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .55)); }
/* small diamond ornament between studio name and title */
.gc-orn { display: flex; align-items: center; gap: 1.6cqw; width: 34%; margin-top: 3cqw; color: #A8947F; }
.gc-orn i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #D0B9A7); }
.gc-orn i:last-child { background: linear-gradient(90deg, #D0B9A7, transparent); }
.gc-orn svg { width: 4cqw; height: 2cqw; flex: none; }
.gcard-front .gc-title { margin-top: 2.6cqw; }
/* serial number, bottom-right of the front */
.gc-serial { position: absolute; right: 6.4cqw; bottom: 5.6cqw; font: 600 1.6cqw/1 var(--body); letter-spacing: .2em; color: #A8947F; font-variant-numeric: tabular-nums; }
/* round studio stamp pressed onto the back, slightly faded like real ink */
.gc-stamp {
  position: absolute; right: 7cqw; bottom: 13cqw; width: 19cqw; aspect-ratio: 1;
  display: grid; place-items: center; color: var(--text); opacity: .62; transform: rotate(-14deg);
  mix-blend-mode: multiply;
  -webkit-mask: radial-gradient(circle at 30% 70%, #000 55%, rgba(0, 0, 0, .55) 80%);
  mask: radial-gradient(circle at 30% 70%, #000 55%, rgba(0, 0, 0, .55) 80%);
}
.gc-stamp svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gc-stamp text { font: 600 9px var(--body); letter-spacing: .12em; fill: currentColor; }
.gc-stamp b { font: 500 6cqw/1 var(--display); }
.gcard-back { grid-template-rows: auto auto 1fr auto auto; }
.gc-addr { font: 500 1.6cqw/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: #A8947F; margin-top: 2.2cqw; }
.gcard-back .gc-foot { margin-top: 1.6cqw; }
.gc-fields { max-width: 74%; }

.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; }
}

/* ---------- envelope layout: cards sit in the right column and slip out over the fold ---------- */
.gift-env .gift-stage { width: 100%; max-width: 520px; height: 300px; margin: 0; justify-self: center; align-self: center; z-index: 2; }
.gift-env .gift-seal { width: 64px; }
.gift-env .gift-seal b { font-size: 21px; }
.gift-env .gift-seal small { font-size: 5px; }
.gift-copy .gift-amounts { margin-top: 4px; }
.gift-copy .gift-cta { margin-top: 0; }
.gift-copy .gift-hint { font-size: 11.5px; font-weight: 600; color: rgba(250, 248, 244, .92); }

@media (max-width: 860px) {
  .gift-env { padding-top: 80px; }
  .env-flap { height: 81px; }
  .env-body { grid-template-columns: minmax(0, 1fr); padding-top: 12px; }
  .gift-env .gift-stage { order: -1; max-width: 460px; height: 250px; margin-top: -48px; }
}
@media (max-width: 640px) {
  .gift-env .gift-stage { height: auto; aspect-ratio: 1 / .78; margin-top: -40px; }
  .gift-copy .h-lg { font-size: 32px; }
}

/* legibility on the silk: darker glass behind the amount picker, full-white labels */
.gift-copy .gift-amounts { background: rgba(40, 30, 22, .38); border-color: rgba(250, 248, 244, .28); }
.gift-copy .gift-amounts button { color: var(--white); }
.gift-copy .gift-amounts button[aria-checked="true"] { color: var(--text); }
@media (max-width: 860px) {
  /* copy sits under the cards here: darken the lower part instead of the left side */
  .env-shade {
    background:
      linear-gradient(rgba(60, 45, 35, .35), transparent 36px),
      linear-gradient(rgba(62, 48, 38, 0) 30%, rgba(62, 48, 38, .55) 55%, rgba(62, 48, 38, .75));
  }
}

/* ---------- Readability of the copy on the silk ----------
   Crisp, light shadows (wide blurred ones made the letters look smeared) and a deeper cocoa wash
   behind the text, so the bright folds of the silk never sit behind a word. */
.gift-copy { text-shadow: 0 1px 2px rgba(40, 30, 22, .5); }
.gift-copy .h-lg { text-shadow: 0 1px 2px rgba(40, 30, 22, .45), 0 2px 18px rgba(40, 30, 22, .3); }
.gift-lead { font-weight: 500; color: #FAF8F4; }
.env-shade {
  background:
    linear-gradient(rgba(60, 45, 35, .35), transparent 36px),
    linear-gradient(to right, rgba(58, 45, 36, .88), rgba(58, 45, 36, .72) 40%, rgba(58, 45, 36, .25) 64%, rgba(58, 45, 36, 0) 82%);
}
@media (max-width: 860px) {
  .env-shade {
    background:
      linear-gradient(rgba(60, 45, 35, .35), transparent 36px),
      linear-gradient(rgba(58, 45, 36, 0) 18%, rgba(58, 45, 36, .72) 36%, rgba(58, 45, 36, .86) 52%, rgba(58, 45, 36, .9));
  }
  .gift-lead { font-size: 15.5px; line-height: 1.65; }
}
/* small screens: "Подари движение" stays on one line, scaling with the width */
@media (max-width: 640px) {
  .gift-copy .h-lg { white-space: nowrap; font-size: clamp(24px, 7.6vw, 32px); }
}

/* ---------- Clearer lettering on the gift cards ----------
   Darker foil with a narrower highlight, every printed line in cappuccino (no pale taupe text),
   small type heavier and never below a readable size, and a softer sheen/grain so they don't wash the ink out. */
.gc-brand, .gc-title, .gc-amount, .gc-amount b, .gift-seal b {
  background-image: linear-gradient(100deg, #5E4C3F 0%, #6A5747 32%, #8A735F 45%, #A58C76 50%, #8A735F 55%, #6A5747 68%, #5E4C3F 100%);
}
.gc-title { font-weight: 600; }
.gc-sub, .gc-note, .gc-tag, .gc-motto, .gc-field { font-weight: 700; color: #776354; }
.gc-sub, .gc-note, .gc-tag { font-size: max(1.9cqw, 7px); }
.gc-motto, .gc-field { font-size: max(1.8cqw, 6.5px); }
.gc-text, .gc-foot { font-weight: 500; color: #776354; font-size: max(2.25cqw, 7.5px); }
.gc-foot { font-size: max(1.85cqw, 6.5px); }
.gc-serial, .gc-addr, .gc-orn, .gc-foot svg { color: #776354; }
.gc-serial, .gc-addr { font-weight: 700; font-size: max(1.6cqw, 6px); }
.gc-rule, .gc-field i { background: #A8947F; }
.gc-sheen { opacity: .5; }
.gc-grain { opacity: .35; }
/* phones: the gift copy is centred, like the other sections */
@media (max-width: 760px) {
  .gift-copy { justify-items: center; text-align: center; }
  .gift-lead { margin-inline: auto; }
}

/* amount: the foil is clipped to the text box, so line-height 1 sliced the top off the "5";
   a taller line gives the figures room, the negative margins keep the card layout where it was */
.gc-amount { line-height: 1.24; margin-top: calc(1.6cqw - .12em); margin-bottom: -.12em; }

/* English title is longer than "Подари движение": let it wrap on phones instead of pushing the copy off-screen */
.gift-copy { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 640px) {
  html[lang="en"] .gift-copy .h-lg { white-space: normal; font-size: clamp(26px, 8.4vw, 32px); }
}
