/* Book a Nila demo 02: the booking form (moved from Contact). Fields rise in one by one, the submit key presses,
   on success a felt card flips in and a stamp slaps it. Transforms and opacity only; nothing moves under reduced motion. */
.bf__wrap { display: grid; justify-items: center; }
.bf__head { text-align: center; max-width: 36em; }
.bf__h { font-size: clamp(32px, 4vw, 52px); }
.bf__lead { margin-top: 10px; font-size: var(--t-body); color: var(--ink-2); }
.bf__write { margin-top: 22px; font: 700 17px/1.4 var(--font-body); color: var(--ink-2); text-align: center; }
.bf__write a { color: var(--blue-deep); font-weight: 800; }
.dm { width: min(100%, 720px); margin-top: 26px; perspective: 1200px; }
.dm [hidden] { display: none !important; }
.dm__form { --pk-pad: clamp(18px, 3.4vw, 34px); }
.dm__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dm__f { display: grid; gap: 6px; align-content: start; min-width: 0; }
.dm__f--wide { grid-column: 1 / -1; }
.dm__f > label { font: 800 16px/1.3 var(--font-body); color: var(--ink); }
.dm__f > label b { color: #A32413; }
.dm input[type="text"], .dm input[type="tel"], .dm input[type="email"], .dm select {
  width: 100%; min-height: 48px; padding: 10px 14px; font: 600 16px/1.35 var(--font-body); color: var(--ink); background: #fff;
  border: 0; border-radius: var(--pk-cut-sm); box-shadow: inset 0 0 0 2px rgba(30, 42, 90, .2), inset 0 2px 3px rgba(90, 42, 0, .06); }
.dm select { appearance: none; padding-right: 40px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' fill='none' stroke='%231E2A5A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; }
.dm :is(input, select):focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; box-shadow: inset 0 0 0 2px var(--blue); }
.dm [aria-invalid="true"] { box-shadow: inset 0 0 0 3px #C2321F; }
.dm__e { display: none; font: 700 15px/1.35 var(--font-body); color: #A32413; }
.dm__e.dm__e--on { display: block; }
.dm__hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.dm__consent { margin-top: 18px; }
.dm__check { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; font: 600 16.5px/1.5 var(--font-body); color: var(--ink); cursor: pointer; }
.dm__check input { width: 26px; height: 26px; margin: 2px 0 0; accent-color: var(--blue); cursor: pointer; }
.dm__check a { color: var(--blue-deep); font-weight: 800; }
.dm__act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 22px; }
.dm__fine { font: 600 15px/1.45 var(--font-body); color: var(--ink-2); max-width: 26em; }

/* the submit key: a dark base that never moves, a blue face that sinks onto it */
.dm__key { position: relative; display: inline-block; min-width: 200px; height: 62px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; touch-action: manipulation; }
.dm__key::before { content: ""; position: absolute; inset: 8px 0 0 0; border-radius: 16px; background: var(--blue-deep); box-shadow: 0 8px 14px -6px rgba(30, 42, 90, .5); }
.dm__face { position: absolute; inset: 0 0 8px 0; display: grid; place-items: center; padding: 0 28px; border-radius: 16px; background: var(--blue); color: #fff; font: 800 19px/1 var(--font-display);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .28); transform: translateY(0); transition: transform 90ms ease-out; }
.dm__key:hover .dm__face { background: #2A56E0; }
.dm__key:active .dm__face, .dm__key.is-down .dm__face { transform: translateY(6px); }
.dm__key:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: 18px; }
.dm__key[disabled] { cursor: progress; }
.dm__key[disabled] .dm__face { opacity: .7; transform: translateY(6px); }

/* success: a felt card that flips in, then the stamp */
.dm__sheet { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); align-items: center; gap: 18px 26px; --pk-pad: clamp(22px, 3.4vw, 38px); position: relative; overflow: visible; backface-visibility: hidden; transform-origin: 50% 50%; }
.dm__sheet::before { content: ""; position: absolute; inset: 9px; border: 2.5px dashed rgba(30, 42, 90, .28); border-radius: 18px; pointer-events: none; }
.dm__nila { width: 100%; height: auto; display: block; filter: drop-shadow(0 12px 12px rgba(30, 33, 87, .25)); }
.dm__okt h3 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1; }
.dm__okt p { margin-top: 10px; font-size: var(--t-lead, 19px); line-height: 1.4; }
.dm__okt .dm__fine { font-size: 15px; }
.dm__stamp { position: absolute; right: clamp(14px, 3vw, 30px); top: clamp(-18px, -2vw, -12px); display: grid; place-items: center; width: 108px; height: 108px; border-radius: 50%; color: #C2321F; rotate: 12deg;
  background: rgba(255, 253, 248, .6); box-shadow: inset 0 0 0 4px #C2321F; }
.dm__stamp::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 2.5px dashed #C2321F; }
.dm__stamp span { font: 800 17px/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; }
.dm__fail { --pk-pad: clamp(18px, 3vw, 28px); }
.dm__fail h3 { font-size: clamp(21px, 2vw, 26px); line-height: 1.2; }
.dm__fail p { margin-top: 10px; }
.dm__fail .btn { height: auto; min-height: 52px; padding-block: 10px; white-space: normal; text-align: center; overflow-wrap: anywhere; }
.dm :focus { scroll-margin-top: 110px; }

@media (prefers-reduced-motion: no-preference) {
  .dm__form.is-armed:not(.is-in) .dm__f, .dm__form.is-armed:not(.is-in) .dm__act { opacity: 0; transform: translateY(20px); }
  .dm__form.is-in .dm__f, .dm__form.is-in .dm__act { animation: dm-rise 620ms var(--pm-glide, cubic-bezier(.16, .8, .3, 1)) calc(var(--i, 0) * 85ms) backwards; }
  .dm__ok:not([hidden]) .dm__sheet { animation: dm-flip 780ms cubic-bezier(.2, .8, .25, 1) backwards; }
  .dm__ok:not([hidden]) .dm__stamp { animation: dm-stamp 560ms cubic-bezier(.5, 0, .3, 1) 620ms backwards; }
  .dm__ok:not([hidden]) .dm__okt > * { animation: dm-rise 560ms var(--pm-glide, cubic-bezier(.16, .8, .3, 1)) backwards; }
  .dm__ok:not([hidden]) .dm__okt > :nth-child(1) { animation-delay: 420ms; }
  .dm__ok:not([hidden]) .dm__okt > :nth-child(2) { animation-delay: 500ms; }
  .dm__ok:not([hidden]) .dm__okt > :nth-child(3) { animation-delay: 580ms; }
}
@keyframes dm-rise { from { opacity: 0; transform: translateY(20px); } }
@keyframes dm-flip { 0% { opacity: 0; transform: rotateX(-88deg) translateY(30px); } 55% { opacity: 1; transform: rotateX(8deg); } 100% { transform: rotateX(0); } }
@keyframes dm-stamp { 0% { opacity: 0; transform: scale(2.2) rotate(-14deg); } 55% { opacity: 1; transform: scale(.9) rotate(2deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }

@media (max-width: 599.98px) {
  .dm__grid { grid-template-columns: minmax(0, 1fr); }
  .dm__sheet { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .dm__nila { width: 120px; }
  .dm__key { width: 100%; }
  .dm__stamp { width: 88px; height: 88px; top: -22px; }
}
@media (forced-colors: active) { .dm :is(input, select) { border: 2px solid CanvasText; } }
