/*
 * Webinar landing, Atarim x MariaDB (/webinar/mariadb/), page-mariadb.php.
 * Loaded only on that page, after page-webinar.css (which supplies the shared
 * Gravity Forms card restyle, FAQ icon, hovers and success state).
 *
 *   1. The design's keyframes (door and sign rattle, floating dust, the
 *      closer's cupboard door, items, screens and LEDs), names as authored.
 *   2. This form's four answer icons.
 *   3. Responsive, ported from the design's helmet: hero stacks at <=1179 and
 *      the scene drops under the form, scaled per breakpoint; phone gutters at
 *      <=767; the closer's stacked cupboard at <=720.
 *   All decorative motion stops under prefers-reduced-motion.
 */

/* 1. Motion */
@keyframes doorRattle { 0%, 62%, 100% { transform: translate(0,0) rotate(0deg); } 65% { transform: translate(2px,-1px) rotate(0.9deg); } 68% { transform: translate(-1px,0) rotate(-0.6deg); } 71% { transform: translate(3px,-1px) rotate(1.1deg); } 74% { transform: translate(-1px,0) rotate(-0.4deg); } 77% { transform: translate(2px,0) rotate(0.6deg); } 81% { transform: translate(0,0) rotate(0deg); } }
@keyframes signRattle { 0%, 62%, 100% { transform: rotate(-2deg) translate(0,0); } 65% { transform: rotate(-0.6deg) translate(3px,-2px); } 68% { transform: rotate(-3deg) translate(-1px,0); } 71% { transform: rotate(0deg) translate(4px,-2px); } 74% { transform: rotate(-2.6deg) translate(-1px,0); } 77% { transform: rotate(-1.2deg) translate(2px,-1px); } 81% { transform: rotate(-2deg) translate(0,0); } }
@keyframes dustFloat { 0% { transform: translate(0,0); opacity: 0; } 15% { opacity: .55; } 50% { transform: translate(14px,-40px); opacity: .45; } 85% { opacity: .3; } 100% { transform: translate(-6px,-90px); opacity: 0; } }
@keyframes cupItem { 0%, 12.93% { opacity: 0; transform: translateY(16px) scale(.88); } 13.73% { opacity: 1; transform: translateY(-3px) scale(1.03); } 14.13% { transform: none; } 15.27% { opacity: 1; transform: none; } 15.67%, 100% { opacity: 0; transform: translateY(8px) scale(.94); } }
@keyframes cupBlink { 0%, 46%, 50%, 100% { transform: scaleY(1); } 48% { transform: scaleY(.1); } }
.cupBlink { animation: cupBlink 2.2s infinite; transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes cupOpen3d { 0%, 73% { transform: rotateY(0deg); animation-timing-function: cubic-bezier(.45,0,.2,1); } 80% { transform: rotateY(-118deg); animation-timing-function: cubic-bezier(.3,0,.5,1); } 81.5% { transform: rotateY(-112deg); } 83%, 91.5% { transform: rotateY(-115deg); animation-timing-function: cubic-bezier(.55,0,.35,1); } 97% { transform: rotateY(2deg); } 98%, 100% { transform: rotateY(0deg); } }
@keyframes cupShade { 0%, 73% { opacity: 0; } 78% { opacity: .5; } 92% { opacity: .5; } 97%, 100% { opacity: 0; } }
@keyframes cupScreen { 0%, 100% { opacity: .25; } 8% { opacity: .9; } 12% { opacity: .35; } 20% { opacity: .85; } 26% { opacity: .3; } 40% { opacity: .7; } 55% { opacity: .4; } 70% { opacity: .8; } }
.cupScreen { animation: cupScreen 1.6s steps(1,end) infinite; filter: drop-shadow(0 0 6px rgba(62,214,150,.6)); }
@keyframes cupLed { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .2; } }
.cupLed { animation: cupLed .9s steps(1,end) infinite; }
@media (prefers-reduced-motion: reduce) {
	.wm-hero [data-anim], .wm-hero [style*="Rattle"], .wm-closer [style*="Rattle"] { animation: none !important; }
	[data-dustfloat] span { animation: none !important; opacity: .35 !important; }
	.cupLeaf, .cupShade, .cupItem, .cupBlink, .cupScreen, .cupLed { animation: none !important; }
}

.wm-hero [style*="border-radius"], .wm-sec [style*="border-radius"], .wm-closer [style*="border-radius"] { corner-shape: squircle; }
.wm-hero h1, .wm-sec h2, .wm-sec h3, .wm-sec p { text-wrap: pretty; }

/* 2. Answer icons: tick, calendar, question mark, padlock (the design's). */
.wm-gform .wb-f-ai .gchoice:nth-child(1) { --wb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.wm-gform .wb-f-ai .gchoice:nth-child(2) { --wb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h18v18H3z M16 2v4 M8 2v4 M3 10h18'/%3E%3C/svg%3E"); }
.wm-gform .wb-f-ai .gchoice:nth-child(3) { --wb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20Z M9.1 9a3 3 0 0 1 5.8 1c0 2-3 3-3 3 M12 17h.01'/%3E%3C/svg%3E"); }
.wm-gform .wb-f-ai .gchoice:nth-child(4) { --wb-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11h14a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2Z M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }
/* First and last name side by side (stack under 360px). */
.wm-gform .gform_fields { display: grid !important; grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; column-gap: 12px !important; row-gap: 16px !important; }
.wm-gform .gfield { grid-column: 1 / -1 !important; }
.wm-gform .wb-f-first { grid-column: 1 !important; }
.wm-gform .wb-f-last { grid-column: 2 !important; }
@media (max-width: 360px) {
	.wm-gform .wb-f-first, .wm-gform .wb-f-last { grid-column: 1 / -1 !important; }
}

/* 3. Responsive. Desktop (>=1180) is the authored spec. */
@media (max-width: 1179px) {
	.wm-floor { display: none; }
	.wm-hero { display: flex; flex-direction: column; min-height: 0 !important; }
	.wm-grid { order: 1; width: 100%; grid-template-columns: minmax(0,1fr) !important; grid-template-areas: 'text' 'form' 'dog' !important; min-height: 0 !important; }
	.wm-grid > div:nth-child(2) { display: none; }
	.wm-scene { position: relative !important; top: auto !important; bottom: auto !important; order: 2; height: calc(100vw * 0.53) !important; min-height: 0; margin: 0 -24px; overflow: hidden; }
	.wm-scene::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 140px; z-index: 9; pointer-events: none; background: linear-gradient(180deg, #1f0d3b 0%, rgba(31,13,59,0.85) 22%, rgba(31,13,59,0.5) 50%, rgba(31,13,59,0.18) 78%, rgba(31,13,59,0) 100%); }
	.wm-scene > div { position: absolute !important; left: 0 !important; bottom: 0 !important; width: 1200px !important; max-width: none !important; height: 640px !important; margin: 0 !important; transform-origin: bottom left; transform: scale(0.75) !important; }
}
@media (max-width: 1100px) { .cupScene { left: auto !important; right: -540px; } }
@media (max-width: 899px) { .wm-scene > div { transform: scale(0.62) !important; } }
@media (max-width: 740px) { .wm-scene > div { transform: scale(0.5) !important; } }
@media (max-width: 767px) {
	.wm-hero { padding-left: 16px !important; padding-right: 16px !important; padding-top: 32px !important; }
	.wm-scene { margin: 0 -16px; }
	.wm-learn { padding: 72px 16px !important; }
	.wm-hosts { padding: 72px 16px 0 !important; }
	.wm-hosts-grid { margin-top: 36px !important; }
	.wm-hosts > div[style*="height:120px"] { height: 72px !important; }
	.wm-faqsec { padding: 72px 16px 160px !important; }
	.wm-card { padding: 22px 18px !important; border-radius: 20px !important; }
	.wm-gform .ginput_container input[type="text"], .wm-gform .ginput_container input[type="email"] { font-size: 16px !important; }
	.wm-gform .wb-f-optin-first .gfield_consent_label { white-space: normal; }
	.wm-faqsec .wb-faq summary { padding: 18px 18px !important; }
	.wm-faqsec .wb-faq summary + div { padding: 0 18px 20px !important; }
}
@media (max-width: 720px) {
	.wm-closer { height: auto !important; padding: 150px 24px 0 !important; }
	.wm-closer .cupText { height: auto !important; justify-content: flex-start !important; padding-bottom: 350px !important; text-align: center; align-items: center; margin: 0 auto; }
	.wm-closer .cupText h2 { font-size: 46px !important; }
	.wm-closer .wm-blur { display: none; }
	.cupScene { display: block; left: calc(50% - 72px) !important; right: auto !important; bottom: -10px !important; transform: scale(0.62) !important; transform-origin: left bottom !important; }
}
@media (max-width: 640px) {
	.wm-scene { height: 410px !important; margin-top: 6px !important; }
	.wm-scene > div { transform: translateX(14px) scale(0.64) !important; }
}
@media (max-width: 560px) {
	.wm-logos img:first-child { height: 36px !important; }
	.wm-logos img:last-child { height: 29px !important; }
}
@media (max-width: 520px) {
	.wm-scene { height: 340px !important; }
	.wm-scene > div { transform: translateX(12px) scale(0.53) !important; }
}
@media (max-width: 440px) {
	.wm-scene { height: 300px !important; }
	.wm-scene > div { transform: translateX(12px) scale(0.47) !important; }
	.wm-text p { font-size: 18px !important; }
}
@media (max-width: 380px) {
	.cupScene { left: calc(50% - 67px) !important; bottom: -4px !important; transform: scale(0.58) !important; }
	.wm-closer .cupText { padding-bottom: 330px !important; }
}
@media (max-width: 370px) {
	.wm-scene { height: 278px !important; }
	.wm-scene > div { transform: translateX(10px) scale(0.435) !important; }
}

/* The two demo opt-ins sit in their own boxes here (form 8 joins them). */
.wm-gform .wb-f-optin, .wm-gform .wb-f-optin-first, .wm-gform .wb-f-optin-last { border: 1px solid rgba(26,8,48,0.10) !important; border-radius: 14px; padding: 14px 16px !important; margin-top: 0 !important; }
.wm-gform .wb-f-optin-first .gfield_consent_label { white-space: normal; overflow: visible; }
.wm-gform .wb-opt { color: #8a7ea3; }
